Skip to content
Permalink
Browse files
fix: migrate to grpc_service_config (#248)
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/e9c50d75-a1ba-4ad3-a81e-eb3c5e7845ef/targets

- [ ] To automatically regenerate this PR, check this box.

PiperOrigin-RevId: 320442976
Source-Link: googleapis/googleapis@ec05fa8
PiperOrigin-RevId: 320442657
Source-Link: googleapis/googleapis@979372f
  • Loading branch information
yoshi-automation committed Jul 10, 2020
1 parent f246195 commit bef1b0d43ffa90cf27303a87ce8e020083512841
Showing with 3,456 additions and 2,978 deletions.
  1. +76 −75 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java
  2. +16 −16 ...e-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceSettings.java
  3. +138 −138 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerClient.java
  4. +23 −23 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerSettings.java
  5. +113 −113 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerClient.java
  6. +26 −26 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerSettings.java
  7. +439 −439 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClient.java
  8. +25 −25 ...le-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceSettings.java
  9. +2 −1 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java
  10. +5 −5 ...-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStub.java
  11. +150 −42 ...ataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStubSettings.java
  12. +10 −10 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStub.java
  13. +85 −71 ...cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStubSettings.java
  14. +36 −36 ...ud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceStub.java
  15. +35 −35 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcClusterControllerStub.java
  16. +36 −36 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcJobControllerStub.java
  17. +71 −71 ...oud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcWorkflowTemplateServiceStub.java
  18. +11 −11 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStub.java
  19. +173 −71 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStubSettings.java
  20. +9 −9 ...e-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStub.java
  21. +86 −72 ...dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStubSettings.java
  22. +134 −134 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerClient.java
  23. +23 −23 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerSettings.java
  24. +113 −113 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/JobControllerClient.java
  25. +26 −26 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/JobControllerSettings.java
  26. +445 −445 ...cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClient.java
  27. +25 −25 ...oud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceSettings.java
  28. +123 −15 ...oc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/AutoscalingPolicyServiceStubSettings.java
  29. +10 −10 ...le-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStub.java
  30. +102 −88 ...-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStubSettings.java
  31. +35 −35 ...loud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcClusterControllerStub.java
  32. +36 −36 ...le-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcJobControllerStub.java
  33. +71 −71 ...ataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcWorkflowTemplateServiceStub.java
  34. +11 −11 google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStub.java
  35. +175 −73 ...loud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStubSettings.java
  36. +9 −9 ...ud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/WorkflowTemplateServiceStub.java
  37. +95 −81 ...roc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/WorkflowTemplateServiceStubSettings.java
  38. +15 −15 ...cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClientTest.java
  39. +52 −52 google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/ClusterControllerClientTest.java
  40. +62 −62 google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/JobControllerClientTest.java
  41. +104 −104 ...-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClientTest.java
  42. +52 −52 ...e-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/ClusterControllerClientTest.java
  43. +64 −64 google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/JobControllerClientTest.java
  44. +104 −104 ...d-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClientTest.java
  45. +5 −5 synth.metadata
@@ -44,8 +44,9 @@
* <pre>
* <code>
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
* RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
* AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
* AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(policy);
* AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
* }
* </code>
* </pre>
@@ -157,80 +158,6 @@ public AutoscalingPolicyServiceStub getStub() {
return stub;
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Updates (replaces) autoscaling policy.
*
* <p>Disabled check for update_mask, because all updates will be full replacements.
*
* <p>Sample code:
*
* <pre><code>
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
* AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
* AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(policy);
* }
* </code></pre>
*
* @param policy Required. The updated autoscaling policy.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AutoscalingPolicy updateAutoscalingPolicy(AutoscalingPolicy policy) {
UpdateAutoscalingPolicyRequest request =
UpdateAutoscalingPolicyRequest.newBuilder().setPolicy(policy).build();
return updateAutoscalingPolicy(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Updates (replaces) autoscaling policy.
*
* <p>Disabled check for update_mask, because all updates will be full replacements.
*
* <p>Sample code:
*
* <pre><code>
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
* AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
* UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder()
* .setPolicy(policy)
* .build();
* AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AutoscalingPolicy updateAutoscalingPolicy(UpdateAutoscalingPolicyRequest request) {
return updateAutoscalingPolicyCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Updates (replaces) autoscaling policy.
*
* <p>Disabled check for update_mask, because all updates will be full replacements.
*
* <p>Sample code:
*
* <pre><code>
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
* AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
* UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder()
* .setPolicy(policy)
* .build();
* ApiFuture&lt;AutoscalingPolicy&gt; future = autoscalingPolicyServiceClient.updateAutoscalingPolicyCallable().futureCall(request);
* // Do something
* AutoscalingPolicy response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<UpdateAutoscalingPolicyRequest, AutoscalingPolicy>
updateAutoscalingPolicyCallable() {
return stub.updateAutoscalingPolicyCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Creates new autoscaling policy.
@@ -376,6 +303,80 @@ public final AutoscalingPolicy createAutoscalingPolicy(CreateAutoscalingPolicyRe
return stub.createAutoscalingPolicyCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Updates (replaces) autoscaling policy.
*
* <p>Disabled check for update_mask, because all updates will be full replacements.
*
* <p>Sample code:
*
* <pre><code>
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
* AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
* AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(policy);
* }
* </code></pre>
*
* @param policy Required. The updated autoscaling policy.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AutoscalingPolicy updateAutoscalingPolicy(AutoscalingPolicy policy) {
UpdateAutoscalingPolicyRequest request =
UpdateAutoscalingPolicyRequest.newBuilder().setPolicy(policy).build();
return updateAutoscalingPolicy(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Updates (replaces) autoscaling policy.
*
* <p>Disabled check for update_mask, because all updates will be full replacements.
*
* <p>Sample code:
*
* <pre><code>
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
* AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
* UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder()
* .setPolicy(policy)
* .build();
* AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(request);
* }
* </code></pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final AutoscalingPolicy updateAutoscalingPolicy(UpdateAutoscalingPolicyRequest request) {
return updateAutoscalingPolicyCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Updates (replaces) autoscaling policy.
*
* <p>Disabled check for update_mask, because all updates will be full replacements.
*
* <p>Sample code:
*
* <pre><code>
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
* AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
* UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder()
* .setPolicy(policy)
* .build();
* ApiFuture&lt;AutoscalingPolicy&gt; future = autoscalingPolicyServiceClient.updateAutoscalingPolicyCallable().futureCall(request);
* // Do something
* AutoscalingPolicy response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<UpdateAutoscalingPolicyRequest, AutoscalingPolicy>
updateAutoscalingPolicyCallable() {
return stub.updateAutoscalingPolicyCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Retrieves autoscaling policy.
@@ -49,16 +49,16 @@
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
* <p>For example, to set the total timeout of updateAutoscalingPolicy to 30 seconds:
* <p>For example, to set the total timeout of createAutoscalingPolicy to 30 seconds:
*
* <pre>
* <code>
* AutoscalingPolicyServiceSettings.Builder autoscalingPolicyServiceSettingsBuilder =
* AutoscalingPolicyServiceSettings.newBuilder();
* autoscalingPolicyServiceSettingsBuilder
* .updateAutoscalingPolicySettings()
* .createAutoscalingPolicySettings()
* .setRetrySettings(
* autoscalingPolicyServiceSettingsBuilder.updateAutoscalingPolicySettings().getRetrySettings().toBuilder()
* autoscalingPolicyServiceSettingsBuilder.createAutoscalingPolicySettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings = autoscalingPolicyServiceSettingsBuilder.build();
@@ -69,20 +69,20 @@
@BetaApi
public class AutoscalingPolicyServiceSettings
extends ClientSettings<AutoscalingPolicyServiceSettings> {
/** Returns the object with the settings used for calls to updateAutoscalingPolicy. */
public UnaryCallSettings<UpdateAutoscalingPolicyRequest, AutoscalingPolicy>
updateAutoscalingPolicySettings() {
return ((AutoscalingPolicyServiceStubSettings) getStubSettings())
.updateAutoscalingPolicySettings();
}

/** Returns the object with the settings used for calls to createAutoscalingPolicy. */
public UnaryCallSettings<CreateAutoscalingPolicyRequest, AutoscalingPolicy>
createAutoscalingPolicySettings() {
return ((AutoscalingPolicyServiceStubSettings) getStubSettings())
.createAutoscalingPolicySettings();
}

/** Returns the object with the settings used for calls to updateAutoscalingPolicy. */
public UnaryCallSettings<UpdateAutoscalingPolicyRequest, AutoscalingPolicy>
updateAutoscalingPolicySettings() {
return ((AutoscalingPolicyServiceStubSettings) getStubSettings())
.updateAutoscalingPolicySettings();
}

/** Returns the object with the settings used for calls to getAutoscalingPolicy. */
public UnaryCallSettings<GetAutoscalingPolicyRequest, AutoscalingPolicy>
getAutoscalingPolicySettings() {
@@ -205,18 +205,18 @@ public Builder applyToAllUnaryMethods(
return this;
}

/** Returns the builder for the settings used for calls to updateAutoscalingPolicy. */
public UnaryCallSettings.Builder<UpdateAutoscalingPolicyRequest, AutoscalingPolicy>
updateAutoscalingPolicySettings() {
return getStubSettingsBuilder().updateAutoscalingPolicySettings();
}

/** Returns the builder for the settings used for calls to createAutoscalingPolicy. */
public UnaryCallSettings.Builder<CreateAutoscalingPolicyRequest, AutoscalingPolicy>
createAutoscalingPolicySettings() {
return getStubSettingsBuilder().createAutoscalingPolicySettings();
}

/** Returns the builder for the settings used for calls to updateAutoscalingPolicy. */
public UnaryCallSettings.Builder<UpdateAutoscalingPolicyRequest, AutoscalingPolicy>
updateAutoscalingPolicySettings() {
return getStubSettingsBuilder().updateAutoscalingPolicySettings();
}

/** Returns the builder for the settings used for calls to getAutoscalingPolicy. */
public UnaryCallSettings.Builder<GetAutoscalingPolicyRequest, AutoscalingPolicy>
getAutoscalingPolicySettings() {

0 comments on commit bef1b0d

Please sign in to comment.