You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Client/StubSettings' getEndpoint() returns the resolved endpoint (#2440)
## Changes
- Client|StubSettings `getEndpoint()` will now return the fully resolved
endpoint
- Client|StubSettings `getUniverseDomain()` will not return the fully
resolved universe domain
- Remove the generated `getEndpoint()` method in the
{Client}StubSettings class. The call to `getEndpoint()` will now always
hit the parent StubSettings and return the fully resolved endpoint.
---------
Co-authored-by: Blake Li <[email protected]>
Copy file name to clipboardExpand all lines: gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/comment/SettingsCommentComposer.java
-3
Original file line number
Diff line number
Diff line change
@@ -52,9 +52,6 @@ public class SettingsCommentComposer {
Copy file name to clipboardExpand all lines: gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/common/AbstractServiceStubSettingsClassComposer.java
Copy file name to clipboardExpand all lines: gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/DeprecatedServiceStubSettings.golden
-18
Original file line number
Diff line number
Diff line change
@@ -101,15 +101,6 @@ public class DeprecatedServiceStubSettings extends StubSettings<DeprecatedServic
101
101
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
102
102
}
103
103
104
-
/** Returns the endpoint set by the user or the the service's default endpoint. */
105
-
@Override
106
-
public String getEndpoint() {
107
-
if (super.getEndpoint() != null) {
108
-
return super.getEndpoint();
109
-
}
110
-
return getDefaultEndpoint();
111
-
}
112
-
113
104
/** Returns a builder for the default ExecutorProvider for this service. */
114
105
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
Copy file name to clipboardExpand all lines: gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/EchoStubSettings.golden
-18
Original file line number
Diff line number
Diff line change
@@ -285,15 +285,6 @@ public class EchoStubSettings extends StubSettings<EchoStubSettings> {
285
285
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
286
286
}
287
287
288
-
/** Returns the endpoint set by the user or the the service's default endpoint. */
289
-
@Override
290
-
public String getEndpoint() {
291
-
if (super.getEndpoint() != null) {
292
-
return super.getEndpoint();
293
-
}
294
-
return getDefaultEndpoint();
295
-
}
296
-
297
288
/** Returns a builder for the default ExecutorProvider for this service. */
298
289
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
Copy file name to clipboardExpand all lines: gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/LoggingServiceV2StubSettings.golden
-18
Original file line number
Diff line number
Diff line change
@@ -421,15 +421,6 @@ public class LoggingServiceV2StubSettings extends StubSettings<LoggingServiceV2S
421
421
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
422
422
}
423
423
424
-
/** Returns the endpoint set by the user or the the service's default endpoint. */
425
-
@Override
426
-
public String getEndpoint() {
427
-
if (super.getEndpoint() != null) {
428
-
return super.getEndpoint();
429
-
}
430
-
return getDefaultEndpoint();
431
-
}
432
-
433
424
/** Returns the default service name. */
434
425
@Override
435
426
public String getServiceName() {
@@ -738,15 +729,6 @@ public class LoggingServiceV2StubSettings extends StubSettings<LoggingServiceV2S
738
729
return tailLogEntriesSettings;
739
730
}
740
731
741
-
/** Returns the endpoint set by the user or the the service's default endpoint. */
742
-
@Override
743
-
public String getEndpoint() {
744
-
if (super.getEndpoint() != null) {
745
-
return super.getEndpoint();
746
-
}
747
-
return getDefaultEndpoint();
748
-
}
749
-
750
732
@Override
751
733
public LoggingServiceV2StubSettings build() throws IOException {
Copy file name to clipboardExpand all lines: gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/PublisherStubSettings.golden
-18
Original file line number
Diff line number
Diff line change
@@ -430,15 +430,6 @@ public class PublisherStubSettings extends StubSettings<PublisherStubSettings> {
430
430
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
431
431
}
432
432
433
-
/** Returns the endpoint set by the user or the the service's default endpoint. */
434
-
@Override
435
-
public String getEndpoint() {
436
-
if (super.getEndpoint() != null) {
437
-
return super.getEndpoint();
438
-
}
439
-
return getDefaultEndpoint();
440
-
}
441
-
442
433
/** Returns the default service name. */
443
434
@Override
444
435
public String getServiceName() {
@@ -810,15 +801,6 @@ public class PublisherStubSettings extends StubSettings<PublisherStubSettings> {
810
801
return detachSubscriptionSettings;
811
802
}
812
803
813
-
/** Returns the endpoint set by the user or the the service's default endpoint. */
814
-
@Override
815
-
public String getEndpoint() {
816
-
if (super.getEndpoint() != null) {
817
-
return super.getEndpoint();
818
-
}
819
-
return getDefaultEndpoint();
820
-
}
821
-
822
804
@Override
823
805
public PublisherStubSettings build() throws IOException {
Copy file name to clipboardExpand all lines: gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/EchoStubSettings.golden
-18
Original file line number
Diff line number
Diff line change
@@ -301,15 +301,6 @@ public class EchoStubSettings extends StubSettings<EchoStubSettings> {
301
301
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
302
302
}
303
303
304
-
/** Returns the endpoint set by the user or the the service's default endpoint. */
305
-
@Override
306
-
public String getEndpoint() {
307
-
if (super.getEndpoint() != null) {
308
-
return super.getEndpoint();
309
-
}
310
-
return getDefaultEndpoint();
311
-
}
312
-
313
304
/** Returns a builder for the default ExecutorProvider for this service. */
314
305
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
Copy file name to clipboardExpand all lines: gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/WickedStubSettings.golden
-18
Original file line number
Diff line number
Diff line change
@@ -99,15 +99,6 @@ public class WickedStubSettings extends StubSettings<WickedStubSettings> {
99
99
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
100
100
}
101
101
102
-
/** Returns the endpoint set by the user or the the service's default endpoint. */
103
-
@Override
104
-
public String getEndpoint() {
105
-
if (super.getEndpoint() != null) {
106
-
return super.getEndpoint();
107
-
}
108
-
return getDefaultEndpoint();
109
-
}
110
-
111
102
/** Returns a builder for the default ExecutorProvider for this service. */
112
103
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
Copy file name to clipboardExpand all lines: gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/rest/goldens/ComplianceStubSettings.golden
-18
Original file line number
Diff line number
Diff line change
@@ -131,15 +131,6 @@ public class ComplianceStubSettings extends StubSettings<ComplianceStubSettings>
131
131
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
132
132
}
133
133
134
-
/** Returns the endpoint set by the user or the the service's default endpoint. */
135
-
@Override
136
-
public String getEndpoint() {
137
-
if (super.getEndpoint() != null) {
138
-
return super.getEndpoint();
139
-
}
140
-
return getDefaultEndpoint();
141
-
}
142
-
143
134
/** Returns a builder for the default ExecutorProvider for this service. */
144
135
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
0 commit comments