Skip to content
Permalink
Browse files
feat!: release gapic-generator-java v2.0.0 (#327)
  • Loading branch information
gcf-owl-bot[bot] committed Aug 10, 2021
1 parent bc2288e commit 760ed31b2976011a284dcb2e5e96165ef1495165
Showing with 173 additions and 594 deletions.
  1. +3 −21 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceClient.java
  2. +1 −2 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/OsConfigServiceSettings.java
  3. +36 −70 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/GrpcOsConfigServiceStub.java
  4. +1 −2 ...-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1/stub/OsConfigServiceStubSettings.java
  5. +5 −36 ...e-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceClient.java
  6. +1 −2 ...cloud-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/OsConfigZonalServiceSettings.java
  7. +50 −91 ...-os-config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/GrpcOsConfigZonalServiceStub.java
  8. +1 −2 ...config/src/main/java/com/google/cloud/osconfig/v1alpha/stub/OsConfigZonalServiceStubSettings.java
  9. +4 −27 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceClient.java
  10. +1 −2 google-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/OsConfigServiceSettings.java
  11. +61 −120 ...-cloud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/GrpcOsConfigServiceStub.java
  12. +1 −2 ...ud-os-config/src/main/java/com/google/cloud/osconfig/v1beta/stub/OsConfigServiceStubSettings.java
  13. +8 −0 proto-google-cloud-os-config-v1/clirr-ignored-differences.xml
  14. +0 −217 proto-google-cloud-os-config-v1/src/main/java/com/google/cloud/osconfig/v1/InstanceName.java
@@ -16,7 +16,6 @@

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

@@ -1288,14 +1282,7 @@ public static ApiFuture<ListPatchJobInstanceDetailsPagedResponse> createAsync(
.createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<
ListPatchJobInstanceDetailsPage, ListPatchJobInstanceDetailsPagedResponse>() {
@Override
public ListPatchJobInstanceDetailsPagedResponse apply(
ListPatchJobInstanceDetailsPage input) {
return new ListPatchJobInstanceDetailsPagedResponse(input);
}
},
input -> new ListPatchJobInstanceDetailsPagedResponse(input),
MoreExecutors.directExecutor());
}

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

@@ -221,14 +221,13 @@ public OsConfigServiceStubSettings.Builder getStubSettingsBuilder() {
return ((OsConfigServiceStubSettings.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;
@@ -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.osconfig.v1.PatchDeployments;
import com.google.cloud.osconfig.v1.PatchJobs;
@@ -35,7 +34,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;

@@ -249,41 +247,32 @@ protected GrpcOsConfigServiceStub(
GrpcCallSettings.<PatchJobs.ExecutePatchJobRequest, PatchJobs.PatchJob>newBuilder()
.setMethodDescriptor(executePatchJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PatchJobs.ExecutePatchJobRequest>() {
@Override
public Map<String, String> extract(PatchJobs.ExecutePatchJobRequest 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<PatchJobs.GetPatchJobRequest, PatchJobs.PatchJob>
getPatchJobTransportSettings =
GrpcCallSettings.<PatchJobs.GetPatchJobRequest, PatchJobs.PatchJob>newBuilder()
.setMethodDescriptor(getPatchJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PatchJobs.GetPatchJobRequest>() {
@Override
public Map<String, String> extract(PatchJobs.GetPatchJobRequest 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<PatchJobs.CancelPatchJobRequest, PatchJobs.PatchJob>
cancelPatchJobTransportSettings =
GrpcCallSettings.<PatchJobs.CancelPatchJobRequest, PatchJobs.PatchJob>newBuilder()
.setMethodDescriptor(cancelPatchJobMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PatchJobs.CancelPatchJobRequest>() {
@Override
public Map<String, String> extract(PatchJobs.CancelPatchJobRequest 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<PatchJobs.ListPatchJobsRequest, PatchJobs.ListPatchJobsResponse>
@@ -292,13 +281,10 @@ public Map<String, String> extract(PatchJobs.CancelPatchJobRequest request) {
.<PatchJobs.ListPatchJobsRequest, PatchJobs.ListPatchJobsResponse>newBuilder()
.setMethodDescriptor(listPatchJobsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PatchJobs.ListPatchJobsRequest>() {
@Override
public Map<String, String> extract(PatchJobs.ListPatchJobsRequest 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<
@@ -311,14 +297,10 @@ public Map<String, String> extract(PatchJobs.ListPatchJobsRequest request) {
newBuilder()
.setMethodDescriptor(listPatchJobInstanceDetailsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PatchJobs.ListPatchJobInstanceDetailsRequest>() {
@Override
public Map<String, String> extract(
PatchJobs.ListPatchJobInstanceDetailsRequest 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<
@@ -329,14 +311,10 @@ public Map<String, String> extract(
newBuilder()
.setMethodDescriptor(createPatchDeploymentMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PatchDeployments.CreatePatchDeploymentRequest>() {
@Override
public Map<String, String> extract(
PatchDeployments.CreatePatchDeploymentRequest 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<PatchDeployments.GetPatchDeploymentRequest, PatchDeployments.PatchDeployment>
@@ -346,14 +324,10 @@ public Map<String, String> extract(
newBuilder()
.setMethodDescriptor(getPatchDeploymentMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PatchDeployments.GetPatchDeploymentRequest>() {
@Override
public Map<String, String> extract(
PatchDeployments.GetPatchDeploymentRequest 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<
@@ -366,29 +340,21 @@ public Map<String, String> extract(
newBuilder()
.setMethodDescriptor(listPatchDeploymentsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PatchDeployments.ListPatchDeploymentsRequest>() {
@Override
public Map<String, String> extract(
PatchDeployments.ListPatchDeploymentsRequest 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<PatchDeployments.DeletePatchDeploymentRequest, Empty>
deletePatchDeploymentTransportSettings =
GrpcCallSettings.<PatchDeployments.DeletePatchDeploymentRequest, Empty>newBuilder()
.setMethodDescriptor(deletePatchDeploymentMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<PatchDeployments.DeletePatchDeploymentRequest>() {
@Override
public Map<String, String> extract(
PatchDeployments.DeletePatchDeploymentRequest 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();

@@ -688,14 +688,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;
}
@@ -16,7 +16,6 @@

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

@@ -2121,14 +2115,7 @@ public static ApiFuture<ListOSPolicyAssignmentRevisionsPagedResponse> createAsyn
.createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<
ListOSPolicyAssignmentRevisionsPage, ListOSPolicyAssignmentRevisionsPagedResponse>() {
@Override
public ListOSPolicyAssignmentRevisionsPagedResponse apply(
ListOSPolicyAssignmentRevisionsPage input) {
return new ListOSPolicyAssignmentRevisionsPagedResponse(input);
}
},
input -> new ListOSPolicyAssignmentRevisionsPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -2225,15 +2212,7 @@ public static ApiFuture<ListInstanceOSPoliciesCompliancesPagedResponse> createAs
.createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<
ListInstanceOSPoliciesCompliancesPage,
ListInstanceOSPoliciesCompliancesPagedResponse>() {
@Override
public ListInstanceOSPoliciesCompliancesPagedResponse apply(
ListInstanceOSPoliciesCompliancesPage input) {
return new ListInstanceOSPoliciesCompliancesPagedResponse(input);
}
},
input -> new ListInstanceOSPoliciesCompliancesPagedResponse(input),
MoreExecutors.directExecutor());
}

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

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

@@ -279,14 +279,13 @@ public OsConfigZonalServiceStubSettings.Builder getStubSettingsBuilder() {
return ((OsConfigZonalServiceStubSettings.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;

0 comments on commit 760ed31

Please sign in to comment.