Skip to content
Permalink
Browse files
feat!: release gapic-generator-java v2.0.0 (#86)
  • Loading branch information
gcf-owl-bot[bot] committed Aug 6, 2021
1 parent 52605e7 commit 9d4e3f6079fbcfb8f7c21851a53549147658b5a7
Showing with 207 additions and 950 deletions.
  1. +2 −13 ...cloud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreClient.java
  2. +1 −2 ...oud-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1/DataprocMetastoreSettings.java
  3. +1 −2 ...roc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/DataprocMetastoreStubSettings.java
  4. +42 −74 ...ataproc-metastore/src/main/java/com/google/cloud/metastore/v1/stub/GrpcDataprocMetastoreStub.java
  5. +3 −21 ...-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClient.java
  6. +1 −2 ...ataproc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreSettings.java
  7. +1 −2 ...etastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/DataprocMetastoreStubSettings.java
  8. +62 −109 ...oc-metastore/src/main/java/com/google/cloud/metastore/v1alpha/stub/GrpcDataprocMetastoreStub.java
  9. +3 −21 ...d-dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClient.java
  10. +1 −2 ...dataproc-metastore/src/main/java/com/google/cloud/metastore/v1beta/DataprocMetastoreSettings.java
  11. +1 −2 ...metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/DataprocMetastoreStubSettings.java
  12. +62 −109 ...roc-metastore/src/main/java/com/google/cloud/metastore/v1beta/stub/GrpcDataprocMetastoreStub.java
  13. +5 −5 ...d-dataproc-metastore/src/test/java/com/google/cloud/metastore/v1/DataprocMetastoreClientTest.java
  14. +5 −5 ...aproc-metastore/src/test/java/com/google/cloud/metastore/v1alpha/DataprocMetastoreClientTest.java
  15. +5 −5 ...taproc-metastore/src/test/java/com/google/cloud/metastore/v1beta/DataprocMetastoreClientTest.java
  16. +4 −0 proto-google-cloud-dataproc-metastore-v1/clirr-ignored-differences.xml
  17. +0 −192 ...o-google-cloud-dataproc-metastore-v1/src/main/java/com/google/cloud/metastore/v1/NetworkName.java
  18. +4 −0 proto-google-cloud-dataproc-metastore-v1alpha/clirr-ignored-differences.xml
  19. +0 −192 ...loud-dataproc-metastore-v1alpha/src/main/java/com/google/cloud/metastore/v1alpha/NetworkName.java
  20. +4 −0 proto-google-cloud-dataproc-metastore-v1beta/clirr-ignored-differences.xml
  21. +0 −192 ...-cloud-dataproc-metastore-v1beta/src/main/java/com/google/cloud/metastore/v1beta/NetworkName.java
@@ -16,7 +16,6 @@

package com.google.cloud.metastore.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;
@@ -1462,12 +1461,7 @@ public static ApiFuture<ListServicesPagedResponse> createAsync(
ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListServicesPage, ListServicesPagedResponse>() {
@Override
public ListServicesPagedResponse apply(ListServicesPage input) {
return new ListServicesPagedResponse(input);
}
},
input -> new ListServicesPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -1543,12 +1537,7 @@ public static ApiFuture<ListMetadataImportsPagedResponse> createAsync(
ListMetadataImportsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListMetadataImportsPage, ListMetadataImportsPagedResponse>() {
@Override
public ListMetadataImportsPagedResponse apply(ListMetadataImportsPage input) {
return new ListMetadataImportsPagedResponse(input);
}
},
input -> new ListMetadataImportsPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -249,14 +249,13 @@ public DataprocMetastoreStubSettings.Builder getStubSettingsBuilder() {
return ((DataprocMetastoreStubSettings.Builder) getStubSettings());
}

// NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
@@ -806,14 +806,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.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
}
@@ -25,7 +25,6 @@
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.metastore.v1.CreateMetadataImportRequest;
import com.google.cloud.metastore.v1.CreateServiceRequest;
@@ -50,7 +49,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;

@@ -237,133 +235,103 @@ protected GrpcDataprocMetastoreStub(
GrpcCallSettings.<ListServicesRequest, ListServicesResponse>newBuilder()
.setMethodDescriptor(listServicesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListServicesRequest>() {
@Override
public Map<String, String> extract(ListServicesRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();
GrpcCallSettings<GetServiceRequest, Service> getServiceTransportSettings =
GrpcCallSettings.<GetServiceRequest, Service>newBuilder()
.setMethodDescriptor(getServiceMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetServiceRequest>() {
@Override
public Map<String, String> extract(GetServiceRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();
GrpcCallSettings<CreateServiceRequest, Operation> createServiceTransportSettings =
GrpcCallSettings.<CreateServiceRequest, Operation>newBuilder()
.setMethodDescriptor(createServiceMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateServiceRequest>() {
@Override
public Map<String, String> extract(CreateServiceRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();
GrpcCallSettings<UpdateServiceRequest, Operation> updateServiceTransportSettings =
GrpcCallSettings.<UpdateServiceRequest, Operation>newBuilder()
.setMethodDescriptor(updateServiceMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateServiceRequest>() {
@Override
public Map<String, String> extract(UpdateServiceRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("service.name", String.valueOf(request.getService().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("service.name", String.valueOf(request.getService().getName()));
return params.build();
})
.build();
GrpcCallSettings<DeleteServiceRequest, Operation> deleteServiceTransportSettings =
GrpcCallSettings.<DeleteServiceRequest, Operation>newBuilder()
.setMethodDescriptor(deleteServiceMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteServiceRequest>() {
@Override
public Map<String, String> extract(DeleteServiceRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();
GrpcCallSettings<ListMetadataImportsRequest, ListMetadataImportsResponse>
listMetadataImportsTransportSettings =
GrpcCallSettings.<ListMetadataImportsRequest, ListMetadataImportsResponse>newBuilder()
.setMethodDescriptor(listMetadataImportsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListMetadataImportsRequest>() {
@Override
public Map<String, String> extract(ListMetadataImportsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();
GrpcCallSettings<GetMetadataImportRequest, MetadataImport> getMetadataImportTransportSettings =
GrpcCallSettings.<GetMetadataImportRequest, MetadataImport>newBuilder()
.setMethodDescriptor(getMetadataImportMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetMetadataImportRequest>() {
@Override
public Map<String, String> extract(GetMetadataImportRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();
GrpcCallSettings<CreateMetadataImportRequest, Operation> createMetadataImportTransportSettings =
GrpcCallSettings.<CreateMetadataImportRequest, Operation>newBuilder()
.setMethodDescriptor(createMetadataImportMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateMetadataImportRequest>() {
@Override
public Map<String, String> extract(CreateMetadataImportRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();
GrpcCallSettings<UpdateMetadataImportRequest, Operation> updateMetadataImportTransportSettings =
GrpcCallSettings.<UpdateMetadataImportRequest, Operation>newBuilder()
.setMethodDescriptor(updateMetadataImportMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateMetadataImportRequest>() {
@Override
public Map<String, String> extract(UpdateMetadataImportRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"metadata_import.name",
String.valueOf(request.getMetadataImport().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"metadata_import.name",
String.valueOf(request.getMetadataImport().getName()));
return params.build();
})
.build();
GrpcCallSettings<ExportMetadataRequest, Operation> exportMetadataTransportSettings =
GrpcCallSettings.<ExportMetadataRequest, Operation>newBuilder()
.setMethodDescriptor(exportMetadataMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ExportMetadataRequest>() {
@Override
public Map<String, String> extract(ExportMetadataRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("service", String.valueOf(request.getService()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("service", String.valueOf(request.getService()));
return params.build();
})
.build();

@@ -16,7 +16,6 @@

package com.google.cloud.metastore.v1alpha;

import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
@@ -2182,12 +2181,7 @@ public static ApiFuture<ListServicesPagedResponse> createAsync(
ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListServicesPage, ListServicesPagedResponse>() {
@Override
public ListServicesPagedResponse apply(ListServicesPage input) {
return new ListServicesPagedResponse(input);
}
},
input -> new ListServicesPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -2263,12 +2257,7 @@ public static ApiFuture<ListMetadataImportsPagedResponse> createAsync(
ListMetadataImportsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListMetadataImportsPage, ListMetadataImportsPagedResponse>() {
@Override
public ListMetadataImportsPagedResponse apply(ListMetadataImportsPage input) {
return new ListMetadataImportsPagedResponse(input);
}
},
input -> new ListMetadataImportsPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -2350,14 +2339,7 @@ public static ApiFuture<ListBackupsPagedResponse> createAsync(
ApiFuture<ListBackupsPage> futurePage =
ListBackupsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListBackupsPage, ListBackupsPagedResponse>() {
@Override
public ListBackupsPagedResponse apply(ListBackupsPage input) {
return new ListBackupsPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListBackupsPagedResponse(input), MoreExecutors.directExecutor());
}

private ListBackupsPagedResponse(ListBackupsPage page) {
@@ -295,14 +295,13 @@ public DataprocMetastoreStubSettings.Builder getStubSettingsBuilder() {
return ((DataprocMetastoreStubSettings.Builder) getStubSettings());
}

// NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
@@ -1070,14 +1070,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.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
}

0 comments on commit 9d4e3f6

Please sign in to comment.