From 1873e8ce220874aa3252cacaf053d29b93a84667 Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Tue, 10 Aug 2021 18:28:10 +0000
Subject: [PATCH] feat!: release gapic-generator-java v2.0.0 (#481)
Committer: @miraleung
PiperOrigin-RevId: 388535346
Source-Link: https://github.com/googleapis/googleapis/commit/d9eaf41de44d953458b18712a3f240bb4c564e48
Source-Link: https://github.com/googleapis/googleapis-gen/commit/976c5ab6f24b58c91fe04847ead1953f99d19e6a
---
.../v1/LookupServiceSettings.java | 3 +-
.../v1/RegistrationServiceClient.java | 22 +-
.../v1/RegistrationServiceSettings.java | 3 +-
.../v1/stub/GrpcLookupServiceStub.java | 13 +-
.../v1/stub/GrpcRegistrationServiceStub.java | 200 +++++++-----------
.../v1/stub/LookupServiceStubSettings.java | 3 +-
.../stub/RegistrationServiceStubSettings.java | 3 +-
.../v1beta1/LookupServiceSettings.java | 3 +-
.../v1beta1/RegistrationServiceClient.java | 22 +-
.../v1beta1/RegistrationServiceSettings.java | 3 +-
.../v1beta1/stub/GrpcLookupServiceStub.java | 13 +-
.../stub/GrpcRegistrationServiceStub.java | 200 +++++++-----------
.../stub/LookupServiceStubSettings.java | 3 +-
.../stub/RegistrationServiceStubSettings.java | 3 +-
.../RegistrationServiceClientTest.java | 10 +-
.../clirr-ignored-differences.xml | 8 +
.../servicedirectory/v1beta1/NetworkName.java | 193 -----------------
17 files changed, 179 insertions(+), 526 deletions(-)
delete mode 100644 proto-google-cloud-servicedirectory-v1beta1/src/main/java/com/google/cloud/servicedirectory/v1beta1/NetworkName.java
diff --git a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/LookupServiceSettings.java b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/LookupServiceSettings.java
index 2eca0904..aa715f81 100644
--- a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/LookupServiceSettings.java
+++ b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/LookupServiceSettings.java
@@ -156,14 +156,13 @@ public LookupServiceStubSettings.Builder getStubSettingsBuilder() {
return ((LookupServiceStubSettings.Builder) getStubSettings());
}
- // NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
*
Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
+ ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
diff --git a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/RegistrationServiceClient.java b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/RegistrationServiceClient.java
index cd24e077..0dd2a391 100644
--- a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/RegistrationServiceClient.java
+++ b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/RegistrationServiceClient.java
@@ -16,7 +16,6 @@
package com.google.cloud.servicedirectory.v1;
-import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
@@ -1951,12 +1950,7 @@ public static ApiFuture createAsync(
ListNamespacesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
- new ApiFunction() {
- @Override
- public ListNamespacesPagedResponse apply(ListNamespacesPage input) {
- return new ListNamespacesPagedResponse(input);
- }
- },
+ input -> new ListNamespacesPagedResponse(input),
MoreExecutors.directExecutor());
}
@@ -2032,12 +2026,7 @@ public static ApiFuture createAsync(
ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
- new ApiFunction() {
- @Override
- public ListServicesPagedResponse apply(ListServicesPage input) {
- return new ListServicesPagedResponse(input);
- }
- },
+ input -> new ListServicesPagedResponse(input),
MoreExecutors.directExecutor());
}
@@ -2112,12 +2101,7 @@ public static ApiFuture createAsync(
ListEndpointsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
- new ApiFunction() {
- @Override
- public ListEndpointsPagedResponse apply(ListEndpointsPage input) {
- return new ListEndpointsPagedResponse(input);
- }
- },
+ input -> new ListEndpointsPagedResponse(input),
MoreExecutors.directExecutor());
}
diff --git a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/RegistrationServiceSettings.java b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/RegistrationServiceSettings.java
index 50e21b4d..c290e5ea 100644
--- a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/RegistrationServiceSettings.java
+++ b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/RegistrationServiceSettings.java
@@ -259,14 +259,13 @@ public RegistrationServiceStubSettings.Builder getStubSettingsBuilder() {
return ((RegistrationServiceStubSettings.Builder) getStubSettings());
}
- // NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
+ ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
diff --git a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/GrpcLookupServiceStub.java b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/GrpcLookupServiceStub.java
index 51e63e9e..21571cc0 100644
--- a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/GrpcLookupServiceStub.java
+++ b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/GrpcLookupServiceStub.java
@@ -21,7 +21,6 @@
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
-import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.servicedirectory.v1.ResolveServiceRequest;
import com.google.cloud.servicedirectory.v1.ResolveServiceResponse;
@@ -30,7 +29,6 @@
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
-import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;
@@ -102,13 +100,10 @@ protected GrpcLookupServiceStub(
GrpcCallSettings.newBuilder()
.setMethodDescriptor(resolveServiceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(ResolveServiceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
diff --git a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/GrpcRegistrationServiceStub.java b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/GrpcRegistrationServiceStub.java
index 931c9d5b..6ec909dd 100644
--- a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/GrpcRegistrationServiceStub.java
+++ b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/GrpcRegistrationServiceStub.java
@@ -25,7 +25,6 @@
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
-import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.servicedirectory.v1.CreateEndpointRequest;
import com.google.cloud.servicedirectory.v1.CreateNamespaceRequest;
@@ -59,7 +58,6 @@
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
-import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;
@@ -330,13 +328,10 @@ protected GrpcRegistrationServiceStub(
GrpcCallSettings.newBuilder()
.setMethodDescriptor(createNamespaceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(CreateNamespaceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings
@@ -344,208 +339,160 @@ public Map extract(CreateNamespaceRequest request) {
GrpcCallSettings.newBuilder()
.setMethodDescriptor(listNamespacesMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(ListNamespacesRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings getNamespaceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(getNamespaceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(GetNamespaceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings updateNamespaceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(updateNamespaceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(UpdateNamespaceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("namespace.name", String.valueOf(request.getNamespace().getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("namespace.name", String.valueOf(request.getNamespace().getName()));
+ return params.build();
})
.build();
GrpcCallSettings deleteNamespaceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(deleteNamespaceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(DeleteNamespaceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings createServiceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(createServiceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(CreateServiceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings listServicesTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(listServicesMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(ListServicesRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings getServiceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(getServiceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(GetServiceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings updateServiceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(updateServiceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(UpdateServiceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("service.name", String.valueOf(request.getService().getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("service.name", String.valueOf(request.getService().getName()));
+ return params.build();
})
.build();
GrpcCallSettings deleteServiceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(deleteServiceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(DeleteServiceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings createEndpointTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(createEndpointMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(CreateEndpointRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings listEndpointsTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(listEndpointsMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(ListEndpointsRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings getEndpointTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(getEndpointMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(GetEndpointRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings updateEndpointTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(updateEndpointMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(UpdateEndpointRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("endpoint.name", String.valueOf(request.getEndpoint().getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("endpoint.name", String.valueOf(request.getEndpoint().getName()));
+ return params.build();
})
.build();
GrpcCallSettings deleteEndpointTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(deleteEndpointMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(DeleteEndpointRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings getIamPolicyTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(getIamPolicyMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(GetIamPolicyRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("resource", String.valueOf(request.getResource()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
})
.build();
GrpcCallSettings setIamPolicyTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(setIamPolicyMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(SetIamPolicyRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("resource", String.valueOf(request.getResource()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
})
.build();
GrpcCallSettings
@@ -553,13 +500,10 @@ public Map extract(SetIamPolicyRequest request) {
GrpcCallSettings.newBuilder()
.setMethodDescriptor(testIamPermissionsMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(TestIamPermissionsRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("resource", String.valueOf(request.getResource()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
})
.build();
diff --git a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/LookupServiceStubSettings.java b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/LookupServiceStubSettings.java
index 8531c043..a5d07953 100644
--- a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/LookupServiceStubSettings.java
+++ b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/LookupServiceStubSettings.java
@@ -249,14 +249,13 @@ private static Builder initDefaults(Builder builder) {
return builder;
}
- // NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
+ ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
}
diff --git a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/RegistrationServiceStubSettings.java b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/RegistrationServiceStubSettings.java
index 96c67704..ac3a3dde 100644
--- a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/RegistrationServiceStubSettings.java
+++ b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1/stub/RegistrationServiceStubSettings.java
@@ -757,14 +757,13 @@ private static Builder initDefaults(Builder builder) {
return builder;
}
- // NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
+ ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
}
diff --git a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/LookupServiceSettings.java b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/LookupServiceSettings.java
index 31dff0e5..226cc6ac 100644
--- a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/LookupServiceSettings.java
+++ b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/LookupServiceSettings.java
@@ -157,14 +157,13 @@ public LookupServiceStubSettings.Builder getStubSettingsBuilder() {
return ((LookupServiceStubSettings.Builder) getStubSettings());
}
- // NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
+ ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
diff --git a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/RegistrationServiceClient.java b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/RegistrationServiceClient.java
index f6001edf..6e4fce2c 100644
--- a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/RegistrationServiceClient.java
+++ b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/RegistrationServiceClient.java
@@ -16,7 +16,6 @@
package com.google.cloud.servicedirectory.v1beta1;
-import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
@@ -1952,12 +1951,7 @@ public static ApiFuture createAsync(
ListNamespacesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
- new ApiFunction() {
- @Override
- public ListNamespacesPagedResponse apply(ListNamespacesPage input) {
- return new ListNamespacesPagedResponse(input);
- }
- },
+ input -> new ListNamespacesPagedResponse(input),
MoreExecutors.directExecutor());
}
@@ -2033,12 +2027,7 @@ public static ApiFuture createAsync(
ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
- new ApiFunction() {
- @Override
- public ListServicesPagedResponse apply(ListServicesPage input) {
- return new ListServicesPagedResponse(input);
- }
- },
+ input -> new ListServicesPagedResponse(input),
MoreExecutors.directExecutor());
}
@@ -2113,12 +2102,7 @@ public static ApiFuture createAsync(
ListEndpointsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
- new ApiFunction() {
- @Override
- public ListEndpointsPagedResponse apply(ListEndpointsPage input) {
- return new ListEndpointsPagedResponse(input);
- }
- },
+ input -> new ListEndpointsPagedResponse(input),
MoreExecutors.directExecutor());
}
diff --git a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/RegistrationServiceSettings.java b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/RegistrationServiceSettings.java
index 63fa499b..cb71e22d 100644
--- a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/RegistrationServiceSettings.java
+++ b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/RegistrationServiceSettings.java
@@ -260,14 +260,13 @@ public RegistrationServiceStubSettings.Builder getStubSettingsBuilder() {
return ((RegistrationServiceStubSettings.Builder) getStubSettings());
}
- // NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
- ApiFunction, Void> settingsUpdater) throws Exception {
+ ApiFunction, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
diff --git a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/GrpcLookupServiceStub.java b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/GrpcLookupServiceStub.java
index 0d755c99..95c018bb 100644
--- a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/GrpcLookupServiceStub.java
+++ b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/GrpcLookupServiceStub.java
@@ -22,7 +22,6 @@
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
-import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.servicedirectory.v1beta1.ResolveServiceRequest;
import com.google.cloud.servicedirectory.v1beta1.ResolveServiceResponse;
@@ -31,7 +30,6 @@
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
-import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;
@@ -105,13 +103,10 @@ protected GrpcLookupServiceStub(
GrpcCallSettings.newBuilder()
.setMethodDescriptor(resolveServiceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(ResolveServiceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
diff --git a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/GrpcRegistrationServiceStub.java b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/GrpcRegistrationServiceStub.java
index a21b38c9..50223fcf 100644
--- a/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/GrpcRegistrationServiceStub.java
+++ b/google-cloud-servicedirectory/src/main/java/com/google/cloud/servicedirectory/v1beta1/stub/GrpcRegistrationServiceStub.java
@@ -26,7 +26,6 @@
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
-import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest;
import com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest;
@@ -60,7 +59,6 @@
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
-import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;
@@ -336,13 +334,10 @@ protected GrpcRegistrationServiceStub(
GrpcCallSettings.newBuilder()
.setMethodDescriptor(createNamespaceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(CreateNamespaceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings
@@ -350,208 +345,160 @@ public Map extract(CreateNamespaceRequest request) {
GrpcCallSettings.newBuilder()
.setMethodDescriptor(listNamespacesMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(ListNamespacesRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings getNamespaceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(getNamespaceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(GetNamespaceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings updateNamespaceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(updateNamespaceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(UpdateNamespaceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("namespace.name", String.valueOf(request.getNamespace().getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("namespace.name", String.valueOf(request.getNamespace().getName()));
+ return params.build();
})
.build();
GrpcCallSettings deleteNamespaceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(deleteNamespaceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(DeleteNamespaceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings createServiceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(createServiceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(CreateServiceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings listServicesTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(listServicesMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(ListServicesRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings getServiceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(getServiceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(GetServiceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings updateServiceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(updateServiceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(UpdateServiceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("service.name", String.valueOf(request.getService().getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("service.name", String.valueOf(request.getService().getName()));
+ return params.build();
})
.build();
GrpcCallSettings deleteServiceTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(deleteServiceMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(DeleteServiceRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings createEndpointTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(createEndpointMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(CreateEndpointRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings listEndpointsTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(listEndpointsMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(ListEndpointsRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("parent", String.valueOf(request.getParent()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
})
.build();
GrpcCallSettings getEndpointTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(getEndpointMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(GetEndpointRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings updateEndpointTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(updateEndpointMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(UpdateEndpointRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("endpoint.name", String.valueOf(request.getEndpoint().getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("endpoint.name", String.valueOf(request.getEndpoint().getName()));
+ return params.build();
})
.build();
GrpcCallSettings deleteEndpointTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(deleteEndpointMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(DeleteEndpointRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("name", String.valueOf(request.getName()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
})
.build();
GrpcCallSettings getIamPolicyTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(getIamPolicyMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(GetIamPolicyRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("resource", String.valueOf(request.getResource()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
})
.build();
GrpcCallSettings setIamPolicyTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(setIamPolicyMethodDescriptor)
.setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(SetIamPolicyRequest request) {
- ImmutableMap.Builder params = ImmutableMap.builder();
- params.put("resource", String.valueOf(request.getResource()));
- return params.build();
- }
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
})
.build();
GrpcCallSettings
@@ -559,13 +506,10 @@ public Map extract(SetIamPolicyRequest request) {
GrpcCallSettings.