From 48110e6a7c6426172b81b126001a609650a4f3bd Mon Sep 17 00:00:00 2001 From: Hanzhen Yi Date: Wed, 1 Apr 2020 14:21:16 -0700 Subject: [PATCH] fix!: AutoscalingPolicyName now uses locations instead of regions (#118) BREAKING CHANGE: Please use AutoscalingPolicyName$Builder.setLocation(String) --- .../v1/AutoscalingPolicyServiceClient.java | 340 ++++++++++++++---- .../v1/AutoscalingPolicyServiceSettings.java | 32 +- .../v1/WorkflowTemplateServiceClient.java | 150 +++++++- .../cloud/dataproc/v1/package-info.java | 3 +- .../v1/stub/AutoscalingPolicyServiceStub.java | 10 +- .../AutoscalingPolicyServiceStubSettings.java | 58 +-- .../stub/ClusterControllerStubSettings.java | 32 +- .../GrpcAutoscalingPolicyServiceStub.java | 72 ++-- .../WorkflowTemplateServiceStubSettings.java | 16 +- .../AutoscalingPolicyServiceClient.java | 80 ++++- .../v1beta2/ClusterControllerClient.java | 8 +- .../v1beta2/ClusterControllerSettings.java | 4 +- .../WorkflowTemplateServiceClient.java | 150 +++++++- .../AutoscalingPolicyServiceStubSettings.java | 2 +- .../v1beta2/stub/ClusterControllerStub.java | 3 +- .../stub/ClusterControllerStubSettings.java | 49 ++- .../stub/GrpcClusterControllerStub.java | 5 +- .../stub/JobControllerStubSettings.java | 6 +- .../WorkflowTemplateServiceStubSettings.java | 16 +- .../AutoscalingPolicyServiceClientTest.java | 91 ++--- .../v1/WorkflowTemplateServiceClientTest.java | 33 +- .../AutoscalingPolicyServiceClientTest.java | 21 +- .../WorkflowTemplateServiceClientTest.java | 33 +- .../v1beta2/WorkflowTemplateServiceGrpc.java | 12 +- .../clirr-ignored-differences.xml | 5 + .../dataproc/v1/AutoscalingPoliciesProto.java | 88 ++--- .../dataproc/v1/AutoscalingPolicyName.java | 228 +++++++++--- .../cloud/dataproc/v1/LocationName.java | 182 ++++++++++ .../dataproc/v1/WorkflowTemplateName.java | 207 +++++++++-- .../dataproc/v1/autoscaling_policies.proto | 52 ++- .../clirr-ignored-differences.xml | 9 + .../v1beta2/AutoscalingPoliciesProto.java | 123 +++---- .../v1beta2/AutoscalingPolicyName.java | 228 +++++++++--- .../v1beta2/ListWorkflowTemplatesRequest.java | 28 +- ...ListWorkflowTemplatesRequestOrBuilder.java | 8 +- .../cloud/dataproc/v1beta2/LocationName.java | 182 ++++++++++ .../cloud/dataproc/v1beta2/OrderedJob.java | 28 +- .../dataproc/v1beta2/OrderedJobOrBuilder.java | 8 +- .../dataproc/v1beta2/TemplateParameter.java | 104 +++--- .../v1beta2/TemplateParameterOrBuilder.java | 32 +- .../UpdateAutoscalingPolicyRequest.java | 24 +- ...dateAutoscalingPolicyRequestOrBuilder.java | 6 +- .../v1beta2/WorkflowTemplateName.java | 207 +++++++++-- .../v1beta2/WorkflowTemplatesProto.java | 139 +++---- .../v1beta2/autoscaling_policies.proto | 55 +-- .../dataproc/v1beta2/workflow_templates.proto | 74 ++-- synth.metadata | 21 +- 47 files changed, 2410 insertions(+), 854 deletions(-) create mode 100644 proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LocationName.java create mode 100644 proto-google-cloud-dataproc-v1beta2/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LocationName.java diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java index bca2309b..bc2cb235 100644 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java +++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java @@ -44,9 +44,8 @@ *
  * 
  * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- *   String formattedParent = RegionName.format("[PROJECT]", "[REGION]");
  *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
- *   AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(formattedParent, policy);
+ *   AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(policy);
  * }
  * 
  * 
@@ -160,155 +159,217 @@ public AutoscalingPolicyServiceStub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates new autoscaling policy. + * Updates (replaces) autoscaling policy. + * + *

Disabled check for update_mask, because all updates will be full replacements. * *

Sample code: * *


    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   String formattedParent = RegionName.format("[PROJECT]", "[REGION]");
    *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(formattedParent, policy);
+   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(policy);
    * }
    * 
* - * @param parent Required. The "resource name" of the region or location, as described in - * https://cloud.google.com/apis/design/resource_names. - *

* For `projects.regions.autoscalingPolicies.create`, the resource name of the region - * has the following format: `projects/{project_id}/regions/{region}` - *

* For `projects.locations.autoscalingPolicies.create`, the resource name of the - * location has the following format: `projects/{project_id}/locations/{location}` - * @param policy The autoscaling policy to create. + * @param policy Required. The updated autoscaling policy. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final AutoscalingPolicy createAutoscalingPolicy(String parent, AutoscalingPolicy policy) { - CreateAutoscalingPolicyRequest request = - CreateAutoscalingPolicyRequest.newBuilder().setParent(parent).setPolicy(policy).build(); - return createAutoscalingPolicy(request); + public final AutoscalingPolicy updateAutoscalingPolicy(AutoscalingPolicy policy) { + UpdateAutoscalingPolicyRequest request = + UpdateAutoscalingPolicyRequest.newBuilder().setPolicy(policy).build(); + return updateAutoscalingPolicy(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates new autoscaling policy. + * Updates (replaces) autoscaling policy. + * + *

Disabled check for update_mask, because all updates will be full replacements. * *

Sample code: * *


    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   String formattedParent = RegionName.format("[PROJECT]", "[REGION]");
    *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   CreateAutoscalingPolicyRequest request = CreateAutoscalingPolicyRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *   UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder()
    *     .setPolicy(policy)
    *     .build();
-   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(request);
+   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(request);
    * }
    * 
* * @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 createAutoscalingPolicy(CreateAutoscalingPolicyRequest request) { - return createAutoscalingPolicyCallable().call(request); + public final AutoscalingPolicy updateAutoscalingPolicy(UpdateAutoscalingPolicyRequest request) { + return updateAutoscalingPolicyCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates new autoscaling policy. + * Updates (replaces) autoscaling policy. + * + *

Disabled check for update_mask, because all updates will be full replacements. * *

Sample code: * *


    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   String formattedParent = RegionName.format("[PROJECT]", "[REGION]");
    *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   CreateAutoscalingPolicyRequest request = CreateAutoscalingPolicyRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *   UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder()
    *     .setPolicy(policy)
    *     .build();
-   *   ApiFuture<AutoscalingPolicy> future = autoscalingPolicyServiceClient.createAutoscalingPolicyCallable().futureCall(request);
+   *   ApiFuture<AutoscalingPolicy> future = autoscalingPolicyServiceClient.updateAutoscalingPolicyCallable().futureCall(request);
    *   // Do something
    *   AutoscalingPolicy response = future.get();
    * }
    * 
*/ - public final UnaryCallable - createAutoscalingPolicyCallable() { - return stub.createAutoscalingPolicyCallable(); + public final UnaryCallable + updateAutoscalingPolicyCallable() { + return stub.updateAutoscalingPolicyCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates (replaces) autoscaling policy. - * - *

Disabled check for update_mask, because all updates will be full replacements. + * Creates new autoscaling policy. * *

Sample 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);
    * }
    * 
* - * @param policy Required. The updated autoscaling policy. + * @param parent Required. The "resource name" of the region or location, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.autoscalingPolicies.create`, the resource name of the region + * has the following format: `projects/{project_id}/regions/{region}` + *

* For `projects.locations.autoscalingPolicies.create`, the resource name of the + * location has the following format: `projects/{project_id}/locations/{location}` + * @param policy The autoscaling policy to create. * @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); + public final AutoscalingPolicy createAutoscalingPolicy( + RegionName parent, AutoscalingPolicy policy) { + CreateAutoscalingPolicyRequest request = + CreateAutoscalingPolicyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPolicy(policy) + .build(); + return createAutoscalingPolicy(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates (replaces) autoscaling policy. + * Creates new autoscaling policy. * - *

Disabled check for update_mask, because all updates will be full replacements. + *

Sample code: + * + *


+   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
+   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
+   * }
+   * 
+ * + * @param parent Required. The "resource name" of the region or location, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.autoscalingPolicies.create`, the resource name of the region + * has the following format: `projects/{project_id}/regions/{region}` + *

* For `projects.locations.autoscalingPolicies.create`, the resource name of the + * location has the following format: `projects/{project_id}/locations/{location}` + * @param policy The autoscaling policy to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AutoscalingPolicy createAutoscalingPolicy( + LocationName parent, AutoscalingPolicy policy) { + CreateAutoscalingPolicyRequest request = + CreateAutoscalingPolicyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPolicy(policy) + .build(); + return createAutoscalingPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates new autoscaling policy. * *

Sample code: * *


    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
+   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
    *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder()
-   *     .setPolicy(policy)
+   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(parent.toString(), policy);
+   * }
+   * 
+ * + * @param parent Required. The "resource name" of the region or location, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.autoscalingPolicies.create`, the resource name of the region + * has the following format: `projects/{project_id}/regions/{region}` + *

* For `projects.locations.autoscalingPolicies.create`, the resource name of the + * location has the following format: `projects/{project_id}/locations/{location}` + * @param policy The autoscaling policy to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AutoscalingPolicy createAutoscalingPolicy(String parent, AutoscalingPolicy policy) { + CreateAutoscalingPolicyRequest request = + CreateAutoscalingPolicyRequest.newBuilder().setParent(parent).setPolicy(policy).build(); + return createAutoscalingPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates new autoscaling policy. + * + *

Sample code: + * + *


+   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
+   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
+   *   CreateAutoscalingPolicyRequest request = CreateAutoscalingPolicyRequest.newBuilder()
+   *     .setParent(parent.toString())
    *     .build();
-   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(request);
+   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(request);
    * }
    * 
* * @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); + public final AutoscalingPolicy createAutoscalingPolicy(CreateAutoscalingPolicyRequest request) { + return createAutoscalingPolicyCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates (replaces) autoscaling policy. - * - *

Disabled check for update_mask, because all updates will be full replacements. + * Creates new autoscaling policy. * *

Sample code: * *


    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder()
-   *     .setPolicy(policy)
+   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
+   *   CreateAutoscalingPolicyRequest request = CreateAutoscalingPolicyRequest.newBuilder()
+   *     .setParent(parent.toString())
    *     .build();
-   *   ApiFuture<AutoscalingPolicy> future = autoscalingPolicyServiceClient.updateAutoscalingPolicyCallable().futureCall(request);
+   *   ApiFuture<AutoscalingPolicy> future = autoscalingPolicyServiceClient.createAutoscalingPolicyCallable().futureCall(request);
    *   // Do something
    *   AutoscalingPolicy response = future.get();
    * }
    * 
*/ - public final UnaryCallable - updateAutoscalingPolicyCallable() { - return stub.updateAutoscalingPolicyCallable(); + public final UnaryCallable + createAutoscalingPolicyCallable() { + return stub.createAutoscalingPolicyCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -319,8 +380,39 @@ public final AutoscalingPolicy updateAutoscalingPolicy(UpdateAutoscalingPolicyRe * *

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   String formattedName = AutoscalingPolicyName.format("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
-   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(formattedName);
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
+   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(name);
+   * }
+   * 
+ * + * @param name Required. The "resource name" of the autoscaling policy, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.autoscalingPolicies.get`, the resource name of the policy + * has the following format: + * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` + *

* For `projects.locations.autoscalingPolicies.get`, the resource name of the policy + * has the following format: + * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AutoscalingPolicy getAutoscalingPolicy(AutoscalingPolicyName name) { + GetAutoscalingPolicyRequest request = + GetAutoscalingPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAutoscalingPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves autoscaling policy. + * + *

Sample code: + * + *


+   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
+   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(name.toString());
    * }
    * 
* @@ -348,9 +440,9 @@ public final AutoscalingPolicy getAutoscalingPolicy(String name) { * *

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   String formattedName = AutoscalingPolicyName.format("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
    *   GetAutoscalingPolicyRequest request = GetAutoscalingPolicyRequest.newBuilder()
-   *     .setName(formattedName)
+   *     .setName(name.toString())
    *     .build();
    *   AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(request);
    * }
@@ -371,9 +463,9 @@ public final AutoscalingPolicy getAutoscalingPolicy(GetAutoscalingPolicyRequest
    *
    * 

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   String formattedName = AutoscalingPolicyName.format("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
    *   GetAutoscalingPolicyRequest request = GetAutoscalingPolicyRequest.newBuilder()
-   *     .setName(formattedName)
+   *     .setName(name.toString())
    *     .build();
    *   ApiFuture<AutoscalingPolicy> future = autoscalingPolicyServiceClient.getAutoscalingPolicyCallable().futureCall(request);
    *   // Do something
@@ -394,8 +486,70 @@ public final AutoscalingPolicy getAutoscalingPolicy(GetAutoscalingPolicyRequest
    *
    * 

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   String formattedParent = RegionName.format("[PROJECT]", "[REGION]");
-   *   for (AutoscalingPolicy element : autoscalingPolicyServiceClient.listAutoscalingPolicies(formattedParent).iterateAll()) {
+   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
+   *   for (AutoscalingPolicy element : autoscalingPolicyServiceClient.listAutoscalingPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The "resource name" of the region or location, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.autoscalingPolicies.list`, the resource name of the region + * has the following format: `projects/{project_id}/regions/{region}` + *

* For `projects.locations.autoscalingPolicies.list`, the resource name of the + * location has the following format: `projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(RegionName parent) { + ListAutoscalingPoliciesRequest request = + ListAutoscalingPoliciesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAutoscalingPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists autoscaling policies in the project. + * + *

Sample code: + * + *


+   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (AutoscalingPolicy element : autoscalingPolicyServiceClient.listAutoscalingPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The "resource name" of the region or location, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.autoscalingPolicies.list`, the resource name of the region + * has the following format: `projects/{project_id}/regions/{region}` + *

* For `projects.locations.autoscalingPolicies.list`, the resource name of the + * location has the following format: `projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(LocationName parent) { + ListAutoscalingPoliciesRequest request = + ListAutoscalingPoliciesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAutoscalingPolicies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists autoscaling policies in the project. + * + *

Sample code: + * + *


+   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
+   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
+   *   for (AutoscalingPolicy element : autoscalingPolicyServiceClient.listAutoscalingPolicies(parent.toString()).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
@@ -423,9 +577,9 @@ public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(String
    *
    * 

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   String formattedParent = RegionName.format("[PROJECT]", "[REGION]");
+   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
    *   ListAutoscalingPoliciesRequest request = ListAutoscalingPoliciesRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *     .setParent(parent.toString())
    *     .build();
    *   for (AutoscalingPolicy element : autoscalingPolicyServiceClient.listAutoscalingPolicies(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -449,9 +603,9 @@ public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(
    *
    * 

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   String formattedParent = RegionName.format("[PROJECT]", "[REGION]");
+   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
    *   ListAutoscalingPoliciesRequest request = ListAutoscalingPoliciesRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *     .setParent(parent.toString())
    *     .build();
    *   ApiFuture<ListAutoscalingPoliciesPagedResponse> future = autoscalingPolicyServiceClient.listAutoscalingPoliciesPagedCallable().futureCall(request);
    *   // Do something
@@ -474,9 +628,9 @@ public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(
    *
    * 

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   String formattedParent = RegionName.format("[PROJECT]", "[REGION]");
+   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
    *   ListAutoscalingPoliciesRequest request = ListAutoscalingPoliciesRequest.newBuilder()
-   *     .setParent(formattedParent)
+   *     .setParent(parent.toString())
    *     .build();
    *   while (true) {
    *     ListAutoscalingPoliciesResponse response = autoscalingPolicyServiceClient.listAutoscalingPoliciesCallable().call(request);
@@ -507,8 +661,40 @@ public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(
    *
    * 

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   String formattedName = AutoscalingPolicyName.format("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
-   *   autoscalingPolicyServiceClient.deleteAutoscalingPolicy(formattedName);
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
+   *   autoscalingPolicyServiceClient.deleteAutoscalingPolicy(name);
+   * }
+   * 
+ * + * @param name Required. The "resource name" of the autoscaling policy, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.autoscalingPolicies.delete`, the resource name of the policy + * has the following format: + * `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` + *

* For `projects.locations.autoscalingPolicies.delete`, the resource name of the + * policy has the following format: + * `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAutoscalingPolicy(AutoscalingPolicyName name) { + DeleteAutoscalingPolicyRequest request = + DeleteAutoscalingPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteAutoscalingPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by + * one or more clusters. + * + *

Sample code: + * + *


+   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
+   *   autoscalingPolicyServiceClient.deleteAutoscalingPolicy(name.toString());
    * }
    * 
* @@ -537,9 +723,9 @@ public final void deleteAutoscalingPolicy(String name) { * *

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   String formattedName = AutoscalingPolicyName.format("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
    *   DeleteAutoscalingPolicyRequest request = DeleteAutoscalingPolicyRequest.newBuilder()
-   *     .setName(formattedName)
+   *     .setName(name.toString())
    *     .build();
    *   autoscalingPolicyServiceClient.deleteAutoscalingPolicy(request);
    * }
@@ -561,9 +747,9 @@ public final void deleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest request
    *
    * 

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   String formattedName = AutoscalingPolicyName.format("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
    *   DeleteAutoscalingPolicyRequest request = DeleteAutoscalingPolicyRequest.newBuilder()
-   *     .setName(formattedName)
+   *     .setName(name.toString())
    *     .build();
    *   ApiFuture<Void> future = autoscalingPolicyServiceClient.deleteAutoscalingPolicyCallable().futureCall(request);
    *   // Do something
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceSettings.java
index 36d59fbf..5bd24dff 100644
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceSettings.java
+++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceSettings.java
@@ -49,16 +49,16 @@
  * 

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. * - *

For example, to set the total timeout of createAutoscalingPolicy to 30 seconds: + *

For example, to set the total timeout of updateAutoscalingPolicy to 30 seconds: * *

  * 
  * AutoscalingPolicyServiceSettings.Builder autoscalingPolicyServiceSettingsBuilder =
  *     AutoscalingPolicyServiceSettings.newBuilder();
  * autoscalingPolicyServiceSettingsBuilder
- *     .createAutoscalingPolicySettings()
+ *     .updateAutoscalingPolicySettings()
  *     .setRetrySettings(
- *         autoscalingPolicyServiceSettingsBuilder.createAutoscalingPolicySettings().getRetrySettings().toBuilder()
+ *         autoscalingPolicyServiceSettingsBuilder.updateAutoscalingPolicySettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings = autoscalingPolicyServiceSettingsBuilder.build();
@@ -69,13 +69,6 @@
 @BetaApi
 public class AutoscalingPolicyServiceSettings
     extends ClientSettings {
-  /** Returns the object with the settings used for calls to createAutoscalingPolicy. */
-  public UnaryCallSettings
-      createAutoscalingPolicySettings() {
-    return ((AutoscalingPolicyServiceStubSettings) getStubSettings())
-        .createAutoscalingPolicySettings();
-  }
-
   /** Returns the object with the settings used for calls to updateAutoscalingPolicy. */
   public UnaryCallSettings
       updateAutoscalingPolicySettings() {
@@ -83,6 +76,13 @@ public class AutoscalingPolicyServiceSettings
         .updateAutoscalingPolicySettings();
   }
 
+  /** Returns the object with the settings used for calls to createAutoscalingPolicy. */
+  public UnaryCallSettings
+      createAutoscalingPolicySettings() {
+    return ((AutoscalingPolicyServiceStubSettings) getStubSettings())
+        .createAutoscalingPolicySettings();
+  }
+
   /** Returns the object with the settings used for calls to getAutoscalingPolicy. */
   public UnaryCallSettings
       getAutoscalingPolicySettings() {
@@ -205,18 +205,18 @@ public Builder applyToAllUnaryMethods(
       return this;
     }
 
-    /** Returns the builder for the settings used for calls to createAutoscalingPolicy. */
-    public UnaryCallSettings.Builder
-        createAutoscalingPolicySettings() {
-      return getStubSettingsBuilder().createAutoscalingPolicySettings();
-    }
-
     /** Returns the builder for the settings used for calls to updateAutoscalingPolicy. */
     public UnaryCallSettings.Builder
         updateAutoscalingPolicySettings() {
       return getStubSettingsBuilder().updateAutoscalingPolicySettings();
     }
 
+    /** Returns the builder for the settings used for calls to createAutoscalingPolicy. */
+    public UnaryCallSettings.Builder
+        createAutoscalingPolicySettings() {
+      return getStubSettingsBuilder().createAutoscalingPolicySettings();
+    }
+
     /** Returns the builder for the settings used for calls to getAutoscalingPolicy. */
     public UnaryCallSettings.Builder
         getAutoscalingPolicySettings() {
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClient.java
index 8db2a56e..ec3d964c 100644
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClient.java
+++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClient.java
@@ -208,6 +208,39 @@ public final WorkflowTemplate createWorkflowTemplate(
     return createWorkflowTemplate(request);
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Creates new workflow template.
+   *
+   * 

Sample code: + * + *


+   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
+   *   WorkflowTemplate response = workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
+   * }
+   * 
+ * + * @param parent Required. The resource name of the region or location, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.workflowTemplates,create`, the resource name of the region + * has the following format: `projects/{project_id}/regions/{region}` + *

* For `projects.locations.workflowTemplates.create`, the resource name of the + * location has the following format: `projects/{project_id}/locations/{location}` + * @param template Required. The Dataproc workflow template to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final WorkflowTemplate createWorkflowTemplate( + LocationName parent, WorkflowTemplate template) { + CreateWorkflowTemplateRequest request = + CreateWorkflowTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTemplate(template) + .build(); + return createWorkflowTemplate(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates new workflow template. @@ -297,7 +330,7 @@ public final WorkflowTemplate createWorkflowTemplate(CreateWorkflowTemplateReque * *


    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   WorkflowTemplate response = workflowTemplateServiceClient.getWorkflowTemplate(name);
    * }
    * 
@@ -330,7 +363,7 @@ public final WorkflowTemplate getWorkflowTemplate(WorkflowTemplateName name) { * *

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   WorkflowTemplate response = workflowTemplateServiceClient.getWorkflowTemplate(name.toString());
    * }
    * 
@@ -361,7 +394,7 @@ public final WorkflowTemplate getWorkflowTemplate(String name) { * *

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   GetWorkflowTemplateRequest request = GetWorkflowTemplateRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -386,7 +419,7 @@ public final WorkflowTemplate getWorkflowTemplate(GetWorkflowTemplateRequest req
    *
    * 

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   GetWorkflowTemplateRequest request = GetWorkflowTemplateRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -425,7 +458,7 @@ public final WorkflowTemplate getWorkflowTemplate(GetWorkflowTemplateRequest req
    *
    * 

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name).get();
    * }
    * 
@@ -475,7 +508,7 @@ public final OperationFuture instantiateWorkflowTemplat * *

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name.toString()).get();
    * }
    * 
@@ -523,7 +556,7 @@ public final OperationFuture instantiateWorkflowTemplat * *

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   Map<String, String> parameters = new HashMap<>();
    *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name, parameters).get();
    * }
@@ -577,7 +610,7 @@ public final OperationFuture instantiateWorkflowTemplat
    *
    * 

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   Map<String, String> parameters = new HashMap<>();
    *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name.toString(), parameters).get();
    * }
@@ -631,7 +664,7 @@ public final OperationFuture instantiateWorkflowTemplat
    *
    * 

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -673,7 +706,7 @@ public final OperationFuture instantiateWorkflowTemplat
    *
    * 

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -713,7 +746,7 @@ public final OperationFuture instantiateWorkflowTemplat
    *
    * 

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -784,6 +817,62 @@ public final OperationFuture instantiateInlineWorkflowT
     return instantiateInlineWorkflowTemplateAsync(request);
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Instantiates a template and begins execution.
+   *
+   * 

This method is equivalent to executing the sequence + * [CreateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.CreateWorkflowTemplate], + * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.InstantiateWorkflowTemplate], + * [DeleteWorkflowTemplate][google.cloud.dataproc.v1.WorkflowTemplateService.DeleteWorkflowTemplate]. + * + *

The returned Operation can be used to track execution of workflow by polling + * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when + * entire workflow is finished. + * + *

The running workflow can be aborted via + * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any + * inflight jobs to be cancelled and workflow-owned clusters to be deleted. + * + *

The [Operation.metadata][google.longrunning.Operation.metadata] will be + * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). + * Also see [Using + * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). + * + *

On successful completion, [Operation.response][google.longrunning.Operation.response] will + * be [Empty][google.protobuf.Empty]. + * + *

Sample code: + * + *


+   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
+   *   workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(parent, template).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the region or location, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.workflowTemplates,instantiateinline`, the resource name of + * the region has the following format: `projects/{project_id}/regions/{region}` + *

* For `projects.locations.workflowTemplates.instantiateinline`, the resource name of + * the location has the following format: `projects/{project_id}/locations/{location}` + * @param template Required. The workflow template to instantiate. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture instantiateInlineWorkflowTemplateAsync( + LocationName parent, WorkflowTemplate template) { + InstantiateInlineWorkflowTemplateRequest request = + InstantiateInlineWorkflowTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTemplate(template) + .build(); + return instantiateInlineWorkflowTemplateAsync(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Instantiates a template and begins execution. @@ -1085,6 +1174,37 @@ public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(RegionName return listWorkflowTemplates(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists workflows that match the specified filter in the request. + * + *

Sample code: + * + *


+   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (WorkflowTemplate element : workflowTemplateServiceClient.listWorkflowTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The resource name of the region or location, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.workflowTemplates,list`, the resource name of the region has + * the following format: `projects/{project_id}/regions/{region}` + *

* For `projects.locations.workflowTemplates.list`, the resource name of the location + * has the following format: `projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(LocationName parent) { + ListWorkflowTemplatesRequest request = + ListWorkflowTemplatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listWorkflowTemplates(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Lists workflows that match the specified filter in the request. @@ -1205,7 +1325,7 @@ public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates( * *


    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   workflowTemplateServiceClient.deleteWorkflowTemplate(name);
    * }
    * 
@@ -1236,7 +1356,7 @@ public final void deleteWorkflowTemplate(WorkflowTemplateName name) { * *

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   workflowTemplateServiceClient.deleteWorkflowTemplate(name.toString());
    * }
    * 
@@ -1265,7 +1385,7 @@ public final void deleteWorkflowTemplate(String name) { * *

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   DeleteWorkflowTemplateRequest request = DeleteWorkflowTemplateRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -1288,7 +1408,7 @@ public final void deleteWorkflowTemplate(DeleteWorkflowTemplateRequest request)
    *
    * 

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   DeleteWorkflowTemplateRequest request = DeleteWorkflowTemplateRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java
index 08b875d1..80b05478 100644
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java
+++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java
@@ -28,9 +28,8 @@
  * 
  * 
  * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- *   String formattedParent = RegionName.format("[PROJECT]", "[REGION]");
  *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
- *   AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(formattedParent, policy);
+ *   AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(policy);
  * }
  * 
  * 
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStub.java index 01685310..337a677c 100644 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStub.java +++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStub.java @@ -40,16 +40,16 @@ @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public abstract class AutoscalingPolicyServiceStub implements BackgroundResource { - public UnaryCallable - createAutoscalingPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: createAutoscalingPolicyCallable()"); - } - public UnaryCallable updateAutoscalingPolicyCallable() { throw new UnsupportedOperationException("Not implemented: updateAutoscalingPolicyCallable()"); } + public UnaryCallable + createAutoscalingPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: createAutoscalingPolicyCallable()"); + } + public UnaryCallable getAutoscalingPolicyCallable() { throw new UnsupportedOperationException("Not implemented: getAutoscalingPolicyCallable()"); diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStubSettings.java index aece81fc..cd4e933d 100644 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStubSettings.java +++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStubSettings.java @@ -71,16 +71,16 @@ *

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. * - *

For example, to set the total timeout of createAutoscalingPolicy to 30 seconds: + *

For example, to set the total timeout of updateAutoscalingPolicy to 30 seconds: * *

  * 
  * AutoscalingPolicyServiceStubSettings.Builder autoscalingPolicyServiceSettingsBuilder =
  *     AutoscalingPolicyServiceStubSettings.newBuilder();
  * autoscalingPolicyServiceSettingsBuilder
- *     .createAutoscalingPolicySettings()
+ *     .updateAutoscalingPolicySettings()
  *     .setRetrySettings(
- *         autoscalingPolicyServiceSettingsBuilder.createAutoscalingPolicySettings().getRetrySettings().toBuilder()
+ *         autoscalingPolicyServiceSettingsBuilder.updateAutoscalingPolicySettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * AutoscalingPolicyServiceStubSettings autoscalingPolicyServiceSettings = autoscalingPolicyServiceSettingsBuilder.build();
@@ -95,10 +95,10 @@ public class AutoscalingPolicyServiceStubSettings
   private static final ImmutableList DEFAULT_SERVICE_SCOPES =
       ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
 
-  private final UnaryCallSettings
-      createAutoscalingPolicySettings;
   private final UnaryCallSettings
       updateAutoscalingPolicySettings;
+  private final UnaryCallSettings
+      createAutoscalingPolicySettings;
   private final UnaryCallSettings
       getAutoscalingPolicySettings;
   private final PagedCallSettings<
@@ -109,18 +109,18 @@ public class AutoscalingPolicyServiceStubSettings
   private final UnaryCallSettings
       deleteAutoscalingPolicySettings;
 
-  /** Returns the object with the settings used for calls to createAutoscalingPolicy. */
-  public UnaryCallSettings
-      createAutoscalingPolicySettings() {
-    return createAutoscalingPolicySettings;
-  }
-
   /** Returns the object with the settings used for calls to updateAutoscalingPolicy. */
   public UnaryCallSettings
       updateAutoscalingPolicySettings() {
     return updateAutoscalingPolicySettings;
   }
 
+  /** Returns the object with the settings used for calls to createAutoscalingPolicy. */
+  public UnaryCallSettings
+      createAutoscalingPolicySettings() {
+    return createAutoscalingPolicySettings;
+  }
+
   /** Returns the object with the settings used for calls to getAutoscalingPolicy. */
   public UnaryCallSettings
       getAutoscalingPolicySettings() {
@@ -211,8 +211,8 @@ public Builder toBuilder() {
   protected AutoscalingPolicyServiceStubSettings(Builder settingsBuilder) throws IOException {
     super(settingsBuilder);
 
-    createAutoscalingPolicySettings = settingsBuilder.createAutoscalingPolicySettings().build();
     updateAutoscalingPolicySettings = settingsBuilder.updateAutoscalingPolicySettings().build();
+    createAutoscalingPolicySettings = settingsBuilder.createAutoscalingPolicySettings().build();
     getAutoscalingPolicySettings = settingsBuilder.getAutoscalingPolicySettings().build();
     listAutoscalingPoliciesSettings = settingsBuilder.listAutoscalingPoliciesSettings().build();
     deleteAutoscalingPolicySettings = settingsBuilder.deleteAutoscalingPolicySettings().build();
@@ -295,10 +295,10 @@ public static class Builder
       extends StubSettings.Builder {
     private final ImmutableList> unaryMethodSettingsBuilders;
 
-    private final UnaryCallSettings.Builder
-        createAutoscalingPolicySettings;
     private final UnaryCallSettings.Builder
         updateAutoscalingPolicySettings;
+    private final UnaryCallSettings.Builder
+        createAutoscalingPolicySettings;
     private final UnaryCallSettings.Builder
         getAutoscalingPolicySettings;
     private final PagedCallSettings.Builder<
@@ -350,10 +350,10 @@ protected Builder() {
     protected Builder(ClientContext clientContext) {
       super(clientContext);
 
-      createAutoscalingPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
       updateAutoscalingPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
+      createAutoscalingPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
       getAutoscalingPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       listAutoscalingPoliciesSettings =
@@ -363,8 +363,8 @@ protected Builder(ClientContext clientContext) {
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
-              createAutoscalingPolicySettings,
               updateAutoscalingPolicySettings,
+              createAutoscalingPolicySettings,
               getAutoscalingPolicySettings,
               listAutoscalingPoliciesSettings,
               deleteAutoscalingPolicySettings);
@@ -384,13 +384,13 @@ private static Builder createDefault() {
     private static Builder initDefaults(Builder builder) {
 
       builder
-          .createAutoscalingPolicySettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .updateAutoscalingPolicySettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .updateAutoscalingPolicySettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .createAutoscalingPolicySettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
@@ -414,16 +414,16 @@ private static Builder initDefaults(Builder builder) {
     protected Builder(AutoscalingPolicyServiceStubSettings settings) {
       super(settings);
 
-      createAutoscalingPolicySettings = settings.createAutoscalingPolicySettings.toBuilder();
       updateAutoscalingPolicySettings = settings.updateAutoscalingPolicySettings.toBuilder();
+      createAutoscalingPolicySettings = settings.createAutoscalingPolicySettings.toBuilder();
       getAutoscalingPolicySettings = settings.getAutoscalingPolicySettings.toBuilder();
       listAutoscalingPoliciesSettings = settings.listAutoscalingPoliciesSettings.toBuilder();
       deleteAutoscalingPolicySettings = settings.deleteAutoscalingPolicySettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
-              createAutoscalingPolicySettings,
               updateAutoscalingPolicySettings,
+              createAutoscalingPolicySettings,
               getAutoscalingPolicySettings,
               listAutoscalingPoliciesSettings,
               deleteAutoscalingPolicySettings);
@@ -445,18 +445,18 @@ public Builder applyToAllUnaryMethods(
       return unaryMethodSettingsBuilders;
     }
 
-    /** Returns the builder for the settings used for calls to createAutoscalingPolicy. */
-    public UnaryCallSettings.Builder
-        createAutoscalingPolicySettings() {
-      return createAutoscalingPolicySettings;
-    }
-
     /** Returns the builder for the settings used for calls to updateAutoscalingPolicy. */
     public UnaryCallSettings.Builder
         updateAutoscalingPolicySettings() {
       return updateAutoscalingPolicySettings;
     }
 
+    /** Returns the builder for the settings used for calls to createAutoscalingPolicy. */
+    public UnaryCallSettings.Builder
+        createAutoscalingPolicySettings() {
+      return createAutoscalingPolicySettings;
+    }
+
     /** Returns the builder for the settings used for calls to getAutoscalingPolicy. */
     public UnaryCallSettings.Builder
         getAutoscalingPolicySettings() {
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStubSettings.java
index 54146695..19e44023 100644
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStubSettings.java
+++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStubSettings.java
@@ -470,13 +470,13 @@ private static Builder initDefaults(Builder builder) {
           .setPollingAlgorithm(
               OperationTimedPollAlgorithm.create(
                   RetrySettings.newBuilder()
-                      .setInitialRetryDelay(Duration.ofMillis(1000L))
-                      .setRetryDelayMultiplier(2.0)
-                      .setMaxRetryDelay(Duration.ofMillis(10000L))
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
                       .setInitialRpcTimeout(Duration.ZERO) // ignored
                       .setRpcTimeoutMultiplier(1.0) // ignored
                       .setMaxRpcTimeout(Duration.ZERO) // ignored
-                      .setTotalTimeout(Duration.ofMillis(900000L))
+                      .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
       builder
           .updateClusterOperationSettings()
@@ -493,13 +493,13 @@ private static Builder initDefaults(Builder builder) {
           .setPollingAlgorithm(
               OperationTimedPollAlgorithm.create(
                   RetrySettings.newBuilder()
-                      .setInitialRetryDelay(Duration.ofMillis(1000L))
-                      .setRetryDelayMultiplier(2.0)
-                      .setMaxRetryDelay(Duration.ofMillis(10000L))
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
                       .setInitialRpcTimeout(Duration.ZERO) // ignored
                       .setRpcTimeoutMultiplier(1.0) // ignored
                       .setMaxRpcTimeout(Duration.ZERO) // ignored
-                      .setTotalTimeout(Duration.ofMillis(900000L))
+                      .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
       builder
           .deleteClusterOperationSettings()
@@ -516,13 +516,13 @@ private static Builder initDefaults(Builder builder) {
           .setPollingAlgorithm(
               OperationTimedPollAlgorithm.create(
                   RetrySettings.newBuilder()
-                      .setInitialRetryDelay(Duration.ofMillis(1000L))
-                      .setRetryDelayMultiplier(2.0)
-                      .setMaxRetryDelay(Duration.ofMillis(10000L))
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
                       .setInitialRpcTimeout(Duration.ZERO) // ignored
                       .setRpcTimeoutMultiplier(1.0) // ignored
                       .setMaxRpcTimeout(Duration.ZERO) // ignored
-                      .setTotalTimeout(Duration.ofMillis(900000L))
+                      .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
       builder
           .diagnoseClusterOperationSettings()
@@ -539,13 +539,13 @@ private static Builder initDefaults(Builder builder) {
           .setPollingAlgorithm(
               OperationTimedPollAlgorithm.create(
                   RetrySettings.newBuilder()
-                      .setInitialRetryDelay(Duration.ofMillis(1000L))
-                      .setRetryDelayMultiplier(2.0)
-                      .setMaxRetryDelay(Duration.ofMillis(10000L))
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
                       .setInitialRpcTimeout(Duration.ZERO) // ignored
                       .setRpcTimeoutMultiplier(1.0) // ignored
                       .setMaxRpcTimeout(Duration.ZERO) // ignored
-                      .setTotalTimeout(Duration.ofMillis(30000L))
+                      .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
 
       return builder;
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceStub.java
index c8f1fde2..cc41ca85 100644
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceStub.java
+++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceStub.java
@@ -51,16 +51,6 @@
 @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
 public class GrpcAutoscalingPolicyServiceStub extends AutoscalingPolicyServiceStub {
 
-  private static final MethodDescriptor
-      createAutoscalingPolicyMethodDescriptor =
-          MethodDescriptor.newBuilder()
-              .setType(MethodDescriptor.MethodType.UNARY)
-              .setFullMethodName(
-                  "google.cloud.dataproc.v1.AutoscalingPolicyService/CreateAutoscalingPolicy")
-              .setRequestMarshaller(
-                  ProtoUtils.marshaller(CreateAutoscalingPolicyRequest.getDefaultInstance()))
-              .setResponseMarshaller(ProtoUtils.marshaller(AutoscalingPolicy.getDefaultInstance()))
-              .build();
   private static final MethodDescriptor
       updateAutoscalingPolicyMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -71,6 +61,16 @@ public class GrpcAutoscalingPolicyServiceStub extends AutoscalingPolicyServiceSt
                   ProtoUtils.marshaller(UpdateAutoscalingPolicyRequest.getDefaultInstance()))
               .setResponseMarshaller(ProtoUtils.marshaller(AutoscalingPolicy.getDefaultInstance()))
               .build();
+  private static final MethodDescriptor
+      createAutoscalingPolicyMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName(
+                  "google.cloud.dataproc.v1.AutoscalingPolicyService/CreateAutoscalingPolicy")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(CreateAutoscalingPolicyRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(AutoscalingPolicy.getDefaultInstance()))
+              .build();
   private static final MethodDescriptor
       getAutoscalingPolicyMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -107,10 +107,10 @@ public class GrpcAutoscalingPolicyServiceStub extends AutoscalingPolicyServiceSt
 
   private final BackgroundResource backgroundResources;
 
-  private final UnaryCallable
-      createAutoscalingPolicyCallable;
   private final UnaryCallable
       updateAutoscalingPolicyCallable;
+  private final UnaryCallable
+      createAutoscalingPolicyCallable;
   private final UnaryCallable
       getAutoscalingPolicyCallable;
   private final UnaryCallable
@@ -162,20 +162,6 @@ protected GrpcAutoscalingPolicyServiceStub(
       throws IOException {
     this.callableFactory = callableFactory;
 
-    GrpcCallSettings
-        createAutoscalingPolicyTransportSettings =
-            GrpcCallSettings.newBuilder()
-                .setMethodDescriptor(createAutoscalingPolicyMethodDescriptor)
-                .setParamsExtractor(
-                    new RequestParamsExtractor() {
-                      @Override
-                      public Map extract(CreateAutoscalingPolicyRequest request) {
-                        ImmutableMap.Builder params = ImmutableMap.builder();
-                        params.put("parent", String.valueOf(request.getParent()));
-                        return params.build();
-                      }
-                    })
-                .build();
     GrpcCallSettings
         updateAutoscalingPolicyTransportSettings =
             GrpcCallSettings.newBuilder()
@@ -190,6 +176,20 @@ public Map extract(UpdateAutoscalingPolicyRequest request) {
                       }
                     })
                 .build();
+    GrpcCallSettings
+        createAutoscalingPolicyTransportSettings =
+            GrpcCallSettings.newBuilder()
+                .setMethodDescriptor(createAutoscalingPolicyMethodDescriptor)
+                .setParamsExtractor(
+                    new RequestParamsExtractor() {
+                      @Override
+                      public Map extract(CreateAutoscalingPolicyRequest request) {
+                        ImmutableMap.Builder params = ImmutableMap.builder();
+                        params.put("parent", String.valueOf(request.getParent()));
+                        return params.build();
+                      }
+                    })
+                .build();
     GrpcCallSettings
         getAutoscalingPolicyTransportSettings =
             GrpcCallSettings.newBuilder()
@@ -234,16 +234,16 @@ public Map extract(DeleteAutoscalingPolicyRequest request) {
                     })
                 .build();
 
-    this.createAutoscalingPolicyCallable =
-        callableFactory.createUnaryCallable(
-            createAutoscalingPolicyTransportSettings,
-            settings.createAutoscalingPolicySettings(),
-            clientContext);
     this.updateAutoscalingPolicyCallable =
         callableFactory.createUnaryCallable(
             updateAutoscalingPolicyTransportSettings,
             settings.updateAutoscalingPolicySettings(),
             clientContext);
+    this.createAutoscalingPolicyCallable =
+        callableFactory.createUnaryCallable(
+            createAutoscalingPolicyTransportSettings,
+            settings.createAutoscalingPolicySettings(),
+            clientContext);
     this.getAutoscalingPolicyCallable =
         callableFactory.createUnaryCallable(
             getAutoscalingPolicyTransportSettings,
@@ -268,16 +268,16 @@ public Map extract(DeleteAutoscalingPolicyRequest request) {
     backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
   }
 
-  public UnaryCallable
-      createAutoscalingPolicyCallable() {
-    return createAutoscalingPolicyCallable;
-  }
-
   public UnaryCallable
       updateAutoscalingPolicyCallable() {
     return updateAutoscalingPolicyCallable;
   }
 
+  public UnaryCallable
+      createAutoscalingPolicyCallable() {
+    return createAutoscalingPolicyCallable;
+  }
+
   public UnaryCallable
       getAutoscalingPolicyCallable() {
     return getAutoscalingPolicyCallable;
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStubSettings.java
index 75e12848..db516c66 100644
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStubSettings.java
+++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStubSettings.java
@@ -500,13 +500,13 @@ private static Builder initDefaults(Builder builder) {
           .setPollingAlgorithm(
               OperationTimedPollAlgorithm.create(
                   RetrySettings.newBuilder()
-                      .setInitialRetryDelay(Duration.ofMillis(1000L))
-                      .setRetryDelayMultiplier(2.0)
-                      .setMaxRetryDelay(Duration.ofMillis(10000L))
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
                       .setInitialRpcTimeout(Duration.ZERO) // ignored
                       .setRpcTimeoutMultiplier(1.0) // ignored
                       .setMaxRpcTimeout(Duration.ZERO) // ignored
-                      .setTotalTimeout(Duration.ofMillis(43200000L))
+                      .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
       builder
           .instantiateInlineWorkflowTemplateOperationSettings()
@@ -524,13 +524,13 @@ private static Builder initDefaults(Builder builder) {
           .setPollingAlgorithm(
               OperationTimedPollAlgorithm.create(
                   RetrySettings.newBuilder()
-                      .setInitialRetryDelay(Duration.ofMillis(1000L))
-                      .setRetryDelayMultiplier(2.0)
-                      .setMaxRetryDelay(Duration.ofMillis(10000L))
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
                       .setInitialRpcTimeout(Duration.ZERO) // ignored
                       .setRpcTimeoutMultiplier(1.0) // ignored
                       .setMaxRpcTimeout(Duration.ZERO) // ignored
-                      .setTotalTimeout(Duration.ofMillis(43200000L))
+                      .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
 
       return builder;
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClient.java
index 5719aead..4c7f769c 100644
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClient.java
+++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClient.java
@@ -192,6 +192,39 @@ public final AutoscalingPolicy createAutoscalingPolicy(
     return createAutoscalingPolicy(request);
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Creates new autoscaling policy.
+   *
+   * 

Sample code: + * + *


+   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
+   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
+   * }
+   * 
+ * + * @param parent Required. The "resource name" of the region or location, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.autoscalingPolicies.create`, the resource name has the + * following format: `projects/{project_id}/regions/{region}` + *

* For `projects.locations.autoscalingPolicies.create`, the resource name has the + * following format: `projects/{project_id}/locations/{location}` + * @param policy Required. The autoscaling policy to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AutoscalingPolicy createAutoscalingPolicy( + LocationName parent, AutoscalingPolicy policy) { + CreateAutoscalingPolicyRequest request = + CreateAutoscalingPolicyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setPolicy(policy) + .build(); + return createAutoscalingPolicy(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates new autoscaling policy. @@ -353,7 +386,7 @@ public final AutoscalingPolicy updateAutoscalingPolicy(UpdateAutoscalingPolicyRe * *


    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
    *   AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(name);
    * }
    * 
@@ -384,7 +417,7 @@ public final AutoscalingPolicy getAutoscalingPolicy(AutoscalingPolicyName name) * *

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
    *   AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(name.toString());
    * }
    * 
@@ -413,7 +446,7 @@ public final AutoscalingPolicy getAutoscalingPolicy(String name) { * *

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
    *   GetAutoscalingPolicyRequest request = GetAutoscalingPolicyRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -436,7 +469,7 @@ public final AutoscalingPolicy getAutoscalingPolicy(GetAutoscalingPolicyRequest
    *
    * 

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
    *   GetAutoscalingPolicyRequest request = GetAutoscalingPolicyRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -482,6 +515,37 @@ public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(Region
     return listAutoscalingPolicies(request);
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Lists autoscaling policies in the project.
+   *
+   * 

Sample code: + * + *


+   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (AutoscalingPolicy element : autoscalingPolicyServiceClient.listAutoscalingPolicies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The "resource name" of the region or location, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.autoscalingPolicies.list`, the resource name of the region + * has the following format: `projects/{project_id}/regions/{region}` + *

* For `projects.locations.autoscalingPolicies.list`, the resource name of the + * location has the following format: `projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies(LocationName parent) { + ListAutoscalingPoliciesRequest request = + ListAutoscalingPoliciesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAutoscalingPolicies(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Lists autoscaling policies in the project. @@ -603,7 +667,7 @@ public final ListAutoscalingPoliciesPagedResponse listAutoscalingPolicies( * *


    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
    *   autoscalingPolicyServiceClient.deleteAutoscalingPolicy(name);
    * }
    * 
@@ -635,7 +699,7 @@ public final void deleteAutoscalingPolicy(AutoscalingPolicyName name) { * *

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
    *   autoscalingPolicyServiceClient.deleteAutoscalingPolicy(name.toString());
    * }
    * 
@@ -665,7 +729,7 @@ public final void deleteAutoscalingPolicy(String name) { * *

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
    *   DeleteAutoscalingPolicyRequest request = DeleteAutoscalingPolicyRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -689,7 +753,7 @@ public final void deleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest request
    *
    * 

    * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
    *   DeleteAutoscalingPolicyRequest request = DeleteAutoscalingPolicyRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerClient.java
index 2e561778..4cd016aa 100644
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerClient.java
+++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerClient.java
@@ -868,7 +868,7 @@ public final UnaryCallable listCluste
    */
   @BetaApi(
       "The surface for long-running operations is not stable yet and may change in the future.")
-  public final OperationFuture diagnoseClusterAsync(
+  public final OperationFuture diagnoseClusterAsync(
       String projectId, String region, String clusterName) {
     DiagnoseClusterRequest request =
         DiagnoseClusterRequest.newBuilder()
@@ -908,7 +908,7 @@ public final OperationFuture diagnoseClusterAsync
    */
   @BetaApi(
       "The surface for long-running operations is not stable yet and may change in the future.")
-  public final OperationFuture diagnoseClusterAsync(
+  public final OperationFuture diagnoseClusterAsync(
       DiagnoseClusterRequest request) {
     return diagnoseClusterOperationCallable().futureCall(request);
   }
@@ -933,14 +933,14 @@ public final OperationFuture diagnoseClusterAsync
    *     .setRegion(region)
    *     .setClusterName(clusterName)
    *     .build();
-   *   OperationFuture<Empty, DiagnoseClusterResults> future = clusterControllerClient.diagnoseClusterOperationCallable().futureCall(request);
+   *   OperationFuture<Empty, ClusterOperationMetadata> future = clusterControllerClient.diagnoseClusterOperationCallable().futureCall(request);
    *   // Do something
    *   future.get();
    * }
    * 
*/ @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable + public final OperationCallable diagnoseClusterOperationCallable() { return stub.diagnoseClusterOperationCallable(); } diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerSettings.java index df553934..5c8ae2a6 100644 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerSettings.java +++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerSettings.java @@ -128,7 +128,7 @@ public UnaryCallSettings diagnoseClusterSetti /** Returns the object with the settings used for calls to diagnoseCluster. */ @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings + public OperationCallSettings diagnoseClusterOperationSettings() { return ((ClusterControllerStubSettings) getStubSettings()).diagnoseClusterOperationSettings(); } @@ -289,7 +289,7 @@ public UnaryCallSettings.Builder diagnoseClus /** Returns the builder for the settings used for calls to diagnoseCluster. */ @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder + public OperationCallSettings.Builder diagnoseClusterOperationSettings() { return getStubSettingsBuilder().diagnoseClusterOperationSettings(); } diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClient.java index a371e04c..9a1f297c 100644 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClient.java +++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClient.java @@ -208,6 +208,39 @@ public final WorkflowTemplate createWorkflowTemplate( return createWorkflowTemplate(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates new workflow template. + * + *

Sample code: + * + *


+   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
+   *   WorkflowTemplate response = workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
+   * }
+   * 
+ * + * @param parent Required. The resource name of the region or location, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.workflowTemplates,create`, the resource name of the region + * has the following format: `projects/{project_id}/regions/{region}` + *

* For `projects.locations.workflowTemplates.create`, the resource name of the + * location has the following format: `projects/{project_id}/locations/{location}` + * @param template Required. The Dataproc workflow template to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final WorkflowTemplate createWorkflowTemplate( + LocationName parent, WorkflowTemplate template) { + CreateWorkflowTemplateRequest request = + CreateWorkflowTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTemplate(template) + .build(); + return createWorkflowTemplate(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates new workflow template. @@ -297,7 +330,7 @@ public final WorkflowTemplate createWorkflowTemplate(CreateWorkflowTemplateReque * *


    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   WorkflowTemplate response = workflowTemplateServiceClient.getWorkflowTemplate(name);
    * }
    * 
@@ -330,7 +363,7 @@ public final WorkflowTemplate getWorkflowTemplate(WorkflowTemplateName name) { * *

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   WorkflowTemplate response = workflowTemplateServiceClient.getWorkflowTemplate(name.toString());
    * }
    * 
@@ -361,7 +394,7 @@ public final WorkflowTemplate getWorkflowTemplate(String name) { * *

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   GetWorkflowTemplateRequest request = GetWorkflowTemplateRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -386,7 +419,7 @@ public final WorkflowTemplate getWorkflowTemplate(GetWorkflowTemplateRequest req
    *
    * 

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   GetWorkflowTemplateRequest request = GetWorkflowTemplateRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -425,7 +458,7 @@ public final WorkflowTemplate getWorkflowTemplate(GetWorkflowTemplateRequest req
    *
    * 

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name).get();
    * }
    * 
@@ -475,7 +508,7 @@ public final OperationFuture instantiateWorkflowTemplat * *

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name.toString()).get();
    * }
    * 
@@ -523,7 +556,7 @@ public final OperationFuture instantiateWorkflowTemplat * *

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   Map<String, String> parameters = new HashMap<>();
    *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name, parameters).get();
    * }
@@ -577,7 +610,7 @@ public final OperationFuture instantiateWorkflowTemplat
    *
    * 

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   Map<String, String> parameters = new HashMap<>();
    *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name.toString(), parameters).get();
    * }
@@ -631,7 +664,7 @@ public final OperationFuture instantiateWorkflowTemplat
    *
    * 

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -673,7 +706,7 @@ public final OperationFuture instantiateWorkflowTemplat
    *
    * 

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -713,7 +746,7 @@ public final OperationFuture instantiateWorkflowTemplat
    *
    * 

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -784,6 +817,62 @@ public final OperationFuture instantiateInlineWorkflowT
     return instantiateInlineWorkflowTemplateAsync(request);
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Instantiates a template and begins execution.
+   *
+   * 

This method is equivalent to executing the sequence + * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], + * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate], + * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate]. + * + *

The returned Operation can be used to track execution of workflow by polling + * [operations.get][google.longrunning.Operations.GetOperation]. The Operation will complete when + * entire workflow is finished. + * + *

The running workflow can be aborted via + * [operations.cancel][google.longrunning.Operations.CancelOperation]. This will cause any + * inflight jobs to be cancelled and workflow-owned clusters to be deleted. + * + *

The [Operation.metadata][google.longrunning.Operation.metadata] will be + * [WorkflowMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). + * Also see [Using + * WorkflowMetadata](https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata). + * + *

On successful completion, [Operation.response][google.longrunning.Operation.response] will + * be [Empty][google.protobuf.Empty]. + * + *

Sample code: + * + *


+   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
+   *   workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(parent, template).get();
+   * }
+   * 
+ * + * @param parent Required. The resource name of the region or location, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.workflowTemplates,instantiateinline`, the resource name of + * the region has the following format: `projects/{project_id}/regions/{region}` + *

* For `projects.locations.workflowTemplates.instantiateinline`, the resource name of + * the location has the following format: `projects/{project_id}/locations/{location}` + * @param template Required. The workflow template to instantiate. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture instantiateInlineWorkflowTemplateAsync( + LocationName parent, WorkflowTemplate template) { + InstantiateInlineWorkflowTemplateRequest request = + InstantiateInlineWorkflowTemplateRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTemplate(template) + .build(); + return instantiateInlineWorkflowTemplateAsync(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Instantiates a template and begins execution. @@ -1085,6 +1174,37 @@ public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(RegionName return listWorkflowTemplates(request); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists workflows that match the specified filter in the request. + * + *

Sample code: + * + *


+   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (WorkflowTemplate element : workflowTemplateServiceClient.listWorkflowTemplates(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The resource name of the region or location, as described in + * https://cloud.google.com/apis/design/resource_names. + *

* For `projects.regions.workflowTemplates,list`, the resource name of the region has + * the following format: `projects/{project_id}/regions/{region}` + *

* For `projects.locations.workflowTemplates.list`, the resource name of the location + * has the following format: `projects/{project_id}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates(LocationName parent) { + ListWorkflowTemplatesRequest request = + ListWorkflowTemplatesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listWorkflowTemplates(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Lists workflows that match the specified filter in the request. @@ -1205,7 +1325,7 @@ public final ListWorkflowTemplatesPagedResponse listWorkflowTemplates( * *


    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   workflowTemplateServiceClient.deleteWorkflowTemplate(name);
    * }
    * 
@@ -1236,7 +1356,7 @@ public final void deleteWorkflowTemplate(WorkflowTemplateName name) { * *

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   workflowTemplateServiceClient.deleteWorkflowTemplate(name.toString());
    * }
    * 
@@ -1265,7 +1385,7 @@ public final void deleteWorkflowTemplate(String name) { * *

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   DeleteWorkflowTemplateRequest request = DeleteWorkflowTemplateRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
@@ -1288,7 +1408,7 @@ public final void deleteWorkflowTemplate(DeleteWorkflowTemplateRequest request)
    *
    * 

    * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
    *   DeleteWorkflowTemplateRequest request = DeleteWorkflowTemplateRequest.newBuilder()
    *     .setName(name.toString())
    *     .build();
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/AutoscalingPolicyServiceStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/AutoscalingPolicyServiceStubSettings.java
index 152cb69f..a0a55161 100644
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/AutoscalingPolicyServiceStubSettings.java
+++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/AutoscalingPolicyServiceStubSettings.java
@@ -390,7 +390,7 @@ private static Builder initDefaults(Builder builder) {
 
       builder
           .updateAutoscalingPolicySettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStub.java
index e749d709..8df92ae0 100644
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStub.java
+++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStub.java
@@ -26,7 +26,6 @@
 import com.google.cloud.dataproc.v1beta2.CreateClusterRequest;
 import com.google.cloud.dataproc.v1beta2.DeleteClusterRequest;
 import com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest;
-import com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults;
 import com.google.cloud.dataproc.v1beta2.GetClusterRequest;
 import com.google.cloud.dataproc.v1beta2.ListClustersRequest;
 import com.google.cloud.dataproc.v1beta2.ListClustersResponse;
@@ -94,7 +93,7 @@ public UnaryCallable listClustersCall
   }
 
   @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
-  public OperationCallable
+  public OperationCallable
       diagnoseClusterOperationCallable() {
     throw new UnsupportedOperationException("Not implemented: diagnoseClusterOperationCallable()");
   }
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStubSettings.java
index 53053ae6..687a9604 100644
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStubSettings.java
+++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStubSettings.java
@@ -48,7 +48,6 @@
 import com.google.cloud.dataproc.v1beta2.CreateClusterRequest;
 import com.google.cloud.dataproc.v1beta2.DeleteClusterRequest;
 import com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest;
-import com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults;
 import com.google.cloud.dataproc.v1beta2.GetClusterRequest;
 import com.google.cloud.dataproc.v1beta2.ListClustersRequest;
 import com.google.cloud.dataproc.v1beta2.ListClustersResponse;
@@ -116,7 +115,7 @@ public class ClusterControllerStubSettings extends StubSettings
       listClustersSettings;
   private final UnaryCallSettings diagnoseClusterSettings;
-  private final OperationCallSettings
+  private final OperationCallSettings
       diagnoseClusterOperationSettings;
 
   /** Returns the object with the settings used for calls to createCluster. */
@@ -173,7 +172,7 @@ public UnaryCallSettings diagnoseClusterSetti
 
   /** Returns the object with the settings used for calls to diagnoseCluster. */
   @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
-  public OperationCallSettings
+  public OperationCallSettings
       diagnoseClusterOperationSettings() {
     return diagnoseClusterOperationSettings;
   }
@@ -335,7 +334,7 @@ public static class Builder extends StubSettings.Builder
         diagnoseClusterSettings;
     private final OperationCallSettings.Builder<
-            DiagnoseClusterRequest, Empty, DiagnoseClusterResults>
+            DiagnoseClusterRequest, Empty, ClusterOperationMetadata>
         diagnoseClusterOperationSettings;
 
     private static final ImmutableMap>
@@ -367,10 +366,10 @@ public static class Builder extends StubSettings.Builder diagnoseClus
     /** Returns the builder for the settings used for calls to diagnoseCluster. */
     @BetaApi(
         "The surface for use by generated code is not stable yet and may change in the future.")
-    public OperationCallSettings.Builder
+    public OperationCallSettings.Builder
         diagnoseClusterOperationSettings() {
       return diagnoseClusterOperationSettings;
     }
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcClusterControllerStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcClusterControllerStub.java
index 37f97553..b9e155d5 100644
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcClusterControllerStub.java
+++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcClusterControllerStub.java
@@ -30,7 +30,6 @@
 import com.google.cloud.dataproc.v1beta2.CreateClusterRequest;
 import com.google.cloud.dataproc.v1beta2.DeleteClusterRequest;
 import com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest;
-import com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults;
 import com.google.cloud.dataproc.v1beta2.GetClusterRequest;
 import com.google.cloud.dataproc.v1beta2.ListClustersRequest;
 import com.google.cloud.dataproc.v1beta2.ListClustersResponse;
@@ -124,7 +123,7 @@ public class GrpcClusterControllerStub extends ClusterControllerStub {
   private final UnaryCallable
       listClustersPagedCallable;
   private final UnaryCallable diagnoseClusterCallable;
-  private final OperationCallable
+  private final OperationCallable
       diagnoseClusterOperationCallable;
 
   private final GrpcStubCallableFactory callableFactory;
@@ -291,7 +290,7 @@ public UnaryCallable listClustersCall
   }
 
   @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
-  public OperationCallable
+  public OperationCallable
       diagnoseClusterOperationCallable() {
     return diagnoseClusterOperationCallable;
   }
diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStubSettings.java
index 63037617..96bd987d 100644
--- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStubSettings.java
+++ b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStubSettings.java
@@ -305,10 +305,10 @@ public static class Builder extends StubSettings.Builder actualRequests = mockAutoscalingPolicyService.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    CreateAutoscalingPolicyRequest actualRequest =
-        (CreateAutoscalingPolicyRequest) actualRequests.get(0);
+    UpdateAutoscalingPolicyRequest actualRequest =
+        (UpdateAutoscalingPolicyRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedParent, actualRequest.getParent());
     Assert.assertEquals(policy, actualRequest.getPolicy());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -119,15 +119,14 @@ public void createAutoscalingPolicyTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void createAutoscalingPolicyExceptionTest() throws Exception {
+  public void updateAutoscalingPolicyExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockAutoscalingPolicyService.addException(exception);
 
     try {
-      String formattedParent = RegionName.format("[PROJECT]", "[REGION]");
       AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
 
-      client.createAutoscalingPolicy(formattedParent, policy);
+      client.updateAutoscalingPolicy(policy);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -136,23 +135,27 @@ public void createAutoscalingPolicyExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void updateAutoscalingPolicyTest() {
+  public void createAutoscalingPolicyTest() {
     String id = "id3355";
-    String name = "name3373707";
+    AutoscalingPolicyName name =
+        AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
+            "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
     AutoscalingPolicy expectedResponse =
-        AutoscalingPolicy.newBuilder().setId(id).setName(name).build();
+        AutoscalingPolicy.newBuilder().setId(id).setName(name.toString()).build();
     mockAutoscalingPolicyService.addResponse(expectedResponse);
 
+    RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
     AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
 
-    AutoscalingPolicy actualResponse = client.updateAutoscalingPolicy(policy);
+    AutoscalingPolicy actualResponse = client.createAutoscalingPolicy(parent, policy);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockAutoscalingPolicyService.getRequests();
     Assert.assertEquals(1, actualRequests.size());
-    UpdateAutoscalingPolicyRequest actualRequest =
-        (UpdateAutoscalingPolicyRequest) actualRequests.get(0);
+    CreateAutoscalingPolicyRequest actualRequest =
+        (CreateAutoscalingPolicyRequest) actualRequests.get(0);
 
+    Assert.assertEquals(parent, RegionName.parse(actualRequest.getParent()));
     Assert.assertEquals(policy, actualRequest.getPolicy());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
@@ -162,14 +165,15 @@ public void updateAutoscalingPolicyTest() {
 
   @Test
   @SuppressWarnings("all")
-  public void updateAutoscalingPolicyExceptionTest() throws Exception {
+  public void createAutoscalingPolicyExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockAutoscalingPolicyService.addException(exception);
 
     try {
+      RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
       AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
 
-      client.updateAutoscalingPolicy(policy);
+      client.createAutoscalingPolicy(parent, policy);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -180,22 +184,25 @@ public void updateAutoscalingPolicyExceptionTest() throws Exception {
   @SuppressWarnings("all")
   public void getAutoscalingPolicyTest() {
     String id = "id3355";
-    String name2 = "name2-1052831874";
+    AutoscalingPolicyName name2 =
+        AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
+            "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
     AutoscalingPolicy expectedResponse =
-        AutoscalingPolicy.newBuilder().setId(id).setName(name2).build();
+        AutoscalingPolicy.newBuilder().setId(id).setName(name2.toString()).build();
     mockAutoscalingPolicyService.addResponse(expectedResponse);
 
-    String formattedName =
-        AutoscalingPolicyName.format("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+    AutoscalingPolicyName name =
+        AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
+            "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
 
-    AutoscalingPolicy actualResponse = client.getAutoscalingPolicy(formattedName);
+    AutoscalingPolicy actualResponse = client.getAutoscalingPolicy(name);
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockAutoscalingPolicyService.getRequests();
     Assert.assertEquals(1, actualRequests.size());
     GetAutoscalingPolicyRequest actualRequest = (GetAutoscalingPolicyRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedName, actualRequest.getName());
+    Assert.assertEquals(name, AutoscalingPolicyName.parse(actualRequest.getName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -209,10 +216,11 @@ public void getAutoscalingPolicyExceptionTest() throws Exception {
     mockAutoscalingPolicyService.addException(exception);
 
     try {
-      String formattedName =
-          AutoscalingPolicyName.format("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+      AutoscalingPolicyName name =
+          AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
+              "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
 
-      client.getAutoscalingPolicy(formattedName);
+      client.getAutoscalingPolicy(name);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -232,10 +240,9 @@ public void listAutoscalingPoliciesTest() {
             .build();
     mockAutoscalingPolicyService.addResponse(expectedResponse);
 
-    String formattedParent = RegionName.format("[PROJECT]", "[REGION]");
+    RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
 
-    ListAutoscalingPoliciesPagedResponse pagedListResponse =
-        client.listAutoscalingPolicies(formattedParent);
+    ListAutoscalingPoliciesPagedResponse pagedListResponse = client.listAutoscalingPolicies(parent);
 
     List resources = Lists.newArrayList(pagedListResponse.iterateAll());
     Assert.assertEquals(1, resources.size());
@@ -246,7 +253,7 @@ public void listAutoscalingPoliciesTest() {
     ListAutoscalingPoliciesRequest actualRequest =
         (ListAutoscalingPoliciesRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedParent, actualRequest.getParent());
+    Assert.assertEquals(parent, RegionName.parse(actualRequest.getParent()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -260,9 +267,9 @@ public void listAutoscalingPoliciesExceptionTest() throws Exception {
     mockAutoscalingPolicyService.addException(exception);
 
     try {
-      String formattedParent = RegionName.format("[PROJECT]", "[REGION]");
+      RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
 
-      client.listAutoscalingPolicies(formattedParent);
+      client.listAutoscalingPolicies(parent);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
@@ -275,17 +282,18 @@ public void deleteAutoscalingPolicyTest() {
     Empty expectedResponse = Empty.newBuilder().build();
     mockAutoscalingPolicyService.addResponse(expectedResponse);
 
-    String formattedName =
-        AutoscalingPolicyName.format("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+    AutoscalingPolicyName name =
+        AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
+            "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
 
-    client.deleteAutoscalingPolicy(formattedName);
+    client.deleteAutoscalingPolicy(name);
 
     List actualRequests = mockAutoscalingPolicyService.getRequests();
     Assert.assertEquals(1, actualRequests.size());
     DeleteAutoscalingPolicyRequest actualRequest =
         (DeleteAutoscalingPolicyRequest) actualRequests.get(0);
 
-    Assert.assertEquals(formattedName, actualRequest.getName());
+    Assert.assertEquals(name, AutoscalingPolicyName.parse(actualRequest.getName()));
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -299,10 +307,11 @@ public void deleteAutoscalingPolicyExceptionTest() throws Exception {
     mockAutoscalingPolicyService.addException(exception);
 
     try {
-      String formattedName =
-          AutoscalingPolicyName.format("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+      AutoscalingPolicyName name =
+          AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
+              "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
 
-      client.deleteAutoscalingPolicy(formattedName);
+      client.deleteAutoscalingPolicy(name);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClientTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClientTest.java
index b213dadd..87142384 100644
--- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClientTest.java
+++ b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClientTest.java
@@ -100,7 +100,8 @@ public void tearDown() throws Exception {
   public void createWorkflowTemplateTest() {
     String id = "id3355";
     WorkflowTemplateName name =
-        WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+        WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+            "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
     int version = 351608024;
     WorkflowTemplate expectedResponse =
         WorkflowTemplate.newBuilder()
@@ -151,7 +152,8 @@ public void createWorkflowTemplateExceptionTest() throws Exception {
   public void getWorkflowTemplateTest() {
     String id = "id3355";
     WorkflowTemplateName name2 =
-        WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+        WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+            "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
     int version = 351608024;
     WorkflowTemplate expectedResponse =
         WorkflowTemplate.newBuilder()
@@ -162,7 +164,8 @@ public void getWorkflowTemplateTest() {
     mockWorkflowTemplateService.addResponse(expectedResponse);
 
     WorkflowTemplateName name =
-        WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+        WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+            "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
 
     WorkflowTemplate actualResponse = client.getWorkflowTemplate(name);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -186,7 +189,8 @@ public void getWorkflowTemplateExceptionTest() throws Exception {
 
     try {
       WorkflowTemplateName name =
-          WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+          WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+              "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
 
       client.getWorkflowTemplate(name);
       Assert.fail("No exception raised");
@@ -208,7 +212,8 @@ public void instantiateWorkflowTemplateTest() throws Exception {
     mockWorkflowTemplateService.addResponse(resultOperation);
 
     WorkflowTemplateName name =
-        WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+        WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+            "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
 
     Empty actualResponse = client.instantiateWorkflowTemplateAsync(name).get();
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -233,7 +238,8 @@ public void instantiateWorkflowTemplateExceptionTest() throws Exception {
 
     try {
       WorkflowTemplateName name =
-          WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+          WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+              "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
 
       client.instantiateWorkflowTemplateAsync(name).get();
       Assert.fail("No exception raised");
@@ -257,7 +263,8 @@ public void instantiateWorkflowTemplateTest2() throws Exception {
     mockWorkflowTemplateService.addResponse(resultOperation);
 
     WorkflowTemplateName name =
-        WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+        WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+            "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
     Map parameters = new HashMap<>();
 
     Empty actualResponse = client.instantiateWorkflowTemplateAsync(name, parameters).get();
@@ -284,7 +291,8 @@ public void instantiateWorkflowTemplateExceptionTest2() throws Exception {
 
     try {
       WorkflowTemplateName name =
-          WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+          WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+              "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
       Map parameters = new HashMap<>();
 
       client.instantiateWorkflowTemplateAsync(name, parameters).get();
@@ -351,7 +359,8 @@ public void instantiateInlineWorkflowTemplateExceptionTest() throws Exception {
   public void updateWorkflowTemplateTest() {
     String id = "id3355";
     WorkflowTemplateName name =
-        WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+        WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+            "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
     int version = 351608024;
     WorkflowTemplate expectedResponse =
         WorkflowTemplate.newBuilder()
@@ -450,7 +459,8 @@ public void deleteWorkflowTemplateTest() {
     mockWorkflowTemplateService.addResponse(expectedResponse);
 
     WorkflowTemplateName name =
-        WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+        WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+            "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
 
     client.deleteWorkflowTemplate(name);
 
@@ -474,7 +484,8 @@ public void deleteWorkflowTemplateExceptionTest() throws Exception {
 
     try {
       WorkflowTemplateName name =
-          WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+          WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+              "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
 
       client.deleteWorkflowTemplate(name);
       Assert.fail("No exception raised");
diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClientTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClientTest.java
index 467e711c..7b0b70b8 100644
--- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClientTest.java
+++ b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClientTest.java
@@ -94,7 +94,8 @@ public void tearDown() throws Exception {
   public void createAutoscalingPolicyTest() {
     String id = "id3355";
     AutoscalingPolicyName name =
-        AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+        AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
+            "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
     AutoscalingPolicy expectedResponse =
         AutoscalingPolicy.newBuilder().setId(id).setName(name.toString()).build();
     mockAutoscalingPolicyService.addResponse(expectedResponse);
@@ -140,7 +141,8 @@ public void createAutoscalingPolicyExceptionTest() throws Exception {
   public void updateAutoscalingPolicyTest() {
     String id = "id3355";
     AutoscalingPolicyName name =
-        AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+        AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
+            "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
     AutoscalingPolicy expectedResponse =
         AutoscalingPolicy.newBuilder().setId(id).setName(name.toString()).build();
     mockAutoscalingPolicyService.addResponse(expectedResponse);
@@ -183,13 +185,15 @@ public void updateAutoscalingPolicyExceptionTest() throws Exception {
   public void getAutoscalingPolicyTest() {
     String id = "id3355";
     AutoscalingPolicyName name2 =
-        AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+        AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
+            "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
     AutoscalingPolicy expectedResponse =
         AutoscalingPolicy.newBuilder().setId(id).setName(name2.toString()).build();
     mockAutoscalingPolicyService.addResponse(expectedResponse);
 
     AutoscalingPolicyName name =
-        AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+        AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
+            "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
 
     AutoscalingPolicy actualResponse = client.getAutoscalingPolicy(name);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -213,7 +217,8 @@ public void getAutoscalingPolicyExceptionTest() throws Exception {
 
     try {
       AutoscalingPolicyName name =
-          AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+          AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
+              "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
 
       client.getAutoscalingPolicy(name);
       Assert.fail("No exception raised");
@@ -278,7 +283,8 @@ public void deleteAutoscalingPolicyTest() {
     mockAutoscalingPolicyService.addResponse(expectedResponse);
 
     AutoscalingPolicyName name =
-        AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+        AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
+            "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
 
     client.deleteAutoscalingPolicy(name);
 
@@ -302,7 +308,8 @@ public void deleteAutoscalingPolicyExceptionTest() throws Exception {
 
     try {
       AutoscalingPolicyName name =
-          AutoscalingPolicyName.of("[PROJECT]", "[REGION]", "[AUTOSCALING_POLICY]");
+          AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName(
+              "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
 
       client.deleteAutoscalingPolicy(name);
       Assert.fail("No exception raised");
diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClientTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClientTest.java
index 968c6c1b..228429a2 100644
--- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClientTest.java
+++ b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClientTest.java
@@ -100,7 +100,8 @@ public void tearDown() throws Exception {
   public void createWorkflowTemplateTest() {
     String id = "id3355";
     WorkflowTemplateName name =
-        WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+        WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+            "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
     int version = 351608024;
     WorkflowTemplate expectedResponse =
         WorkflowTemplate.newBuilder()
@@ -151,7 +152,8 @@ public void createWorkflowTemplateExceptionTest() throws Exception {
   public void getWorkflowTemplateTest() {
     String id = "id3355";
     WorkflowTemplateName name2 =
-        WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+        WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+            "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
     int version = 351608024;
     WorkflowTemplate expectedResponse =
         WorkflowTemplate.newBuilder()
@@ -162,7 +164,8 @@ public void getWorkflowTemplateTest() {
     mockWorkflowTemplateService.addResponse(expectedResponse);
 
     WorkflowTemplateName name =
-        WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+        WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+            "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
 
     WorkflowTemplate actualResponse = client.getWorkflowTemplate(name);
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -186,7 +189,8 @@ public void getWorkflowTemplateExceptionTest() throws Exception {
 
     try {
       WorkflowTemplateName name =
-          WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+          WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+              "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
 
       client.getWorkflowTemplate(name);
       Assert.fail("No exception raised");
@@ -208,7 +212,8 @@ public void instantiateWorkflowTemplateTest() throws Exception {
     mockWorkflowTemplateService.addResponse(resultOperation);
 
     WorkflowTemplateName name =
-        WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+        WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+            "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
 
     Empty actualResponse = client.instantiateWorkflowTemplateAsync(name).get();
     Assert.assertEquals(expectedResponse, actualResponse);
@@ -233,7 +238,8 @@ public void instantiateWorkflowTemplateExceptionTest() throws Exception {
 
     try {
       WorkflowTemplateName name =
-          WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+          WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+              "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
 
       client.instantiateWorkflowTemplateAsync(name).get();
       Assert.fail("No exception raised");
@@ -257,7 +263,8 @@ public void instantiateWorkflowTemplateTest2() throws Exception {
     mockWorkflowTemplateService.addResponse(resultOperation);
 
     WorkflowTemplateName name =
-        WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+        WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+            "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
     Map parameters = new HashMap<>();
 
     Empty actualResponse = client.instantiateWorkflowTemplateAsync(name, parameters).get();
@@ -284,7 +291,8 @@ public void instantiateWorkflowTemplateExceptionTest2() throws Exception {
 
     try {
       WorkflowTemplateName name =
-          WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+          WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+              "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
       Map parameters = new HashMap<>();
 
       client.instantiateWorkflowTemplateAsync(name, parameters).get();
@@ -351,7 +359,8 @@ public void instantiateInlineWorkflowTemplateExceptionTest() throws Exception {
   public void updateWorkflowTemplateTest() {
     String id = "id3355";
     WorkflowTemplateName name =
-        WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+        WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+            "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
     int version = 351608024;
     WorkflowTemplate expectedResponse =
         WorkflowTemplate.newBuilder()
@@ -450,7 +459,8 @@ public void deleteWorkflowTemplateTest() {
     mockWorkflowTemplateService.addResponse(expectedResponse);
 
     WorkflowTemplateName name =
-        WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+        WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+            "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
 
     client.deleteWorkflowTemplate(name);
 
@@ -474,7 +484,8 @@ public void deleteWorkflowTemplateExceptionTest() throws Exception {
 
     try {
       WorkflowTemplateName name =
-          WorkflowTemplateName.of("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
+          WorkflowTemplateName.ofProjectRegionWorkflowTemplateName(
+              "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
 
       client.deleteWorkflowTemplate(name);
       Assert.fail("No exception raised");
diff --git a/grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceGrpc.java b/grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceGrpc.java
index 0aeb05ba..0909a3e9 100644
--- a/grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceGrpc.java
+++ b/grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceGrpc.java
@@ -523,7 +523,8 @@ public void instantiateWorkflowTemplate(
      * 
      * Instantiates a template and begins execution.
      * This method is equivalent to executing the sequence
-     * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
+     * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate],
+     * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
      * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate].
      * The returned Operation can be used to track execution of
      * workflow by polling
@@ -738,7 +739,8 @@ public void instantiateWorkflowTemplate(
      * 
      * Instantiates a template and begins execution.
      * This method is equivalent to executing the sequence
-     * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
+     * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate],
+     * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
      * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate].
      * The returned Operation can be used to track execution of
      * workflow by polling
@@ -901,7 +903,8 @@ public com.google.longrunning.Operation instantiateWorkflowTemplate(
      * 
      * Instantiates a template and begins execution.
      * This method is equivalent to executing the sequence
-     * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
+     * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate],
+     * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
      * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate].
      * The returned Operation can be used to track execution of
      * workflow by polling
@@ -1054,7 +1057,8 @@ protected WorkflowTemplateServiceFutureStub build(
      * 
      * Instantiates a template and begins execution.
      * This method is equivalent to executing the sequence
-     * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
+     * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate],
+     * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
      * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate].
      * The returned Operation can be used to track execution of
      * workflow by polling
diff --git a/proto-google-cloud-dataproc-v1/clirr-ignored-differences.xml b/proto-google-cloud-dataproc-v1/clirr-ignored-differences.xml
index fa53d8b6..b045425c 100644
--- a/proto-google-cloud-dataproc-v1/clirr-ignored-differences.xml
+++ b/proto-google-cloud-dataproc-v1/clirr-ignored-differences.xml
@@ -16,4 +16,9 @@
     com/google/cloud/dataproc/v1/*OrBuilder
     boolean has*(*)
   
+  
+    7002
+    com/google/cloud/dataproc/v1/AutoscalingPolicyName$Builder
+    * *etRegion(*)
+  
 
diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPoliciesProto.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPoliciesProto.java
index 17ef8697..a1126b55 100644
--- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPoliciesProto.java
+++ b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPoliciesProto.java
@@ -78,11 +78,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
     java.lang.String[] descriptorData = {
       "\n3google/cloud/dataproc/v1/autoscaling_p"
           + "olicies.proto\022\030google.cloud.dataproc.v1\032"
-          + "\034google/api/annotations.proto\032\037google/ap"
-          + "i/field_behavior.proto\032\031google/api/resou"
-          + "rce.proto\032\036google/protobuf/duration.prot"
-          + "o\032\033google/protobuf/empty.proto\032\027google/a"
-          + "pi/client.proto\"\250\004\n\021AutoscalingPolicy\022\n\n"
+          + "\034google/api/annotations.proto\032\027google/ap"
+          + "i/client.proto\032\037google/api/field_behavio"
+          + "r.proto\032\031google/api/resource.proto\032\036goog"
+          + "le/protobuf/duration.proto\032\033google/proto"
+          + "buf/empty.proto\"\250\004\n\021AutoscalingPolicy\022\n\n"
           + "\002id\030\001 \001(\t\022\021\n\004name\030\002 \001(\tB\003\340A\003\022S\n\017basic_al"
           + "gorithm\030\003 \001(\01323.google.cloud.dataproc.v1"
           + ".BasicAutoscalingAlgorithmB\003\340A\002H\000\022Z\n\rwor"
@@ -128,58 +128,59 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "ListAutoscalingPoliciesResponse\022B\n\010polic"
           + "ies\030\001 \003(\0132+.google.cloud.dataproc.v1.Aut"
           + "oscalingPolicyB\003\340A\003\022\034\n\017next_page_token\030\002"
-          + " \001(\tB\003\340A\0032\375\n\n\030AutoscalingPolicyService\022\214"
+          + " \001(\tB\003\340A\0032\256\013\n\030AutoscalingPolicyService\022\234"
           + "\002\n\027CreateAutoscalingPolicy\0228.google.clou"
           + "d.dataproc.v1.CreateAutoscalingPolicyReq"
           + "uest\032+.google.cloud.dataproc.v1.Autoscal"
-          + "ingPolicy\"\211\001\202\323\344\223\002\202\001\"7/v1/{parent=project"
+          + "ingPolicy\"\231\001\202\323\344\223\002\202\001\"7/v1/{parent=project"
           + "s/*/locations/*}/autoscalingPolicies:\006po"
           + "licyZ?\"5/v1/{parent=projects/*/regions/*"
-          + "}/autoscalingPolicies:\006policy\022\232\002\n\027Update"
-          + "AutoscalingPolicy\0228.google.cloud.datapro"
-          + "c.v1.UpdateAutoscalingPolicyRequest\032+.go"
-          + "ogle.cloud.dataproc.v1.AutoscalingPolicy"
-          + "\"\227\001\202\323\344\223\002\220\001\032>/v1/{policy.name=projects/*/"
-          + "locations/*/autoscalingPolicies/*}:\006poli"
-          + "cyZF\032/v1/{policy."
+          + "name=projects/*/locations/*/autoscalingP"
+          + "olicies/*}:\006policyZF\032 fieldValuesMap;
+  private PathTemplate pathTemplate;
+  private String fixedValue;
 
-  private final String project;
-  private final String region;
-  private final String autoscalingPolicy;
+  private String project;
+  private String location;
+  private String autoscalingPolicy;
+  private String region;
 
   public String getProject() {
     return project;
   }
 
-  public String getRegion() {
-    return region;
+  public String getLocation() {
+    return location;
   }
 
   public String getAutoscalingPolicy() {
     return autoscalingPolicy;
   }
 
+  public String getRegion() {
+    return region;
+  }
+
+  private AutoscalingPolicyName(Builder builder) {
+    project = Preconditions.checkNotNull(builder.getProject());
+    location = Preconditions.checkNotNull(builder.getLocation());
+    autoscalingPolicy = Preconditions.checkNotNull(builder.getAutoscalingPolicy());
+    pathTemplate = PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE;
+  }
+
+  private AutoscalingPolicyName(ProjectRegionAutoscalingPolicyBuilder builder) {
+    project = Preconditions.checkNotNull(builder.getProject());
+    region = Preconditions.checkNotNull(builder.getRegion());
+    autoscalingPolicy = Preconditions.checkNotNull(builder.getAutoscalingPolicy());
+    pathTemplate = PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE;
+  }
+
   public static Builder newBuilder() {
     return new Builder();
   }
 
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
+  public static Builder newProjectLocationAutoscalingPolicyBuilder() {
+    return new Builder();
+  }
+
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
+  public static ProjectRegionAutoscalingPolicyBuilder newProjectRegionAutoscalingPolicyBuilder() {
+    return new ProjectRegionAutoscalingPolicyBuilder();
+  }
+
   public Builder toBuilder() {
     return new Builder(this);
   }
 
-  private AutoscalingPolicyName(Builder builder) {
-    project = Preconditions.checkNotNull(builder.getProject());
-    region = Preconditions.checkNotNull(builder.getRegion());
-    autoscalingPolicy = Preconditions.checkNotNull(builder.getAutoscalingPolicy());
+  public static AutoscalingPolicyName of(
+      String project, String location, String autoscalingPolicy) {
+    return newProjectLocationAutoscalingPolicyBuilder()
+        .setProject(project)
+        .setLocation(location)
+        .setAutoscalingPolicy(autoscalingPolicy)
+        .build();
   }
 
-  public static AutoscalingPolicyName of(String project, String region, String autoscalingPolicy) {
-    return newBuilder()
+  @BetaApi("The static create methods are not stable yet and may be changed in the future.")
+  public static AutoscalingPolicyName ofProjectLocationAutoscalingPolicyName(
+      String project, String location, String autoscalingPolicy) {
+    return newProjectLocationAutoscalingPolicyBuilder()
+        .setProject(project)
+        .setLocation(location)
+        .setAutoscalingPolicy(autoscalingPolicy)
+        .build();
+  }
+
+  @BetaApi("The static create methods are not stable yet and may be changed in the future.")
+  public static AutoscalingPolicyName ofProjectRegionAutoscalingPolicyName(
+      String project, String region, String autoscalingPolicy) {
+    return newProjectRegionAutoscalingPolicyBuilder()
         .setProject(project)
         .setRegion(region)
         .setAutoscalingPolicy(autoscalingPolicy)
         .build();
   }
 
-  public static String format(String project, String region, String autoscalingPolicy) {
+  public static String format(String project, String location, String autoscalingPolicy) {
     return newBuilder()
+        .setProject(project)
+        .setLocation(location)
+        .setAutoscalingPolicy(autoscalingPolicy)
+        .build()
+        .toString();
+  }
+
+  @BetaApi("The static format methods are not stable yet and may be changed in the future.")
+  public static String formatProjectLocationAutoscalingPolicyName(
+      String project, String location, String autoscalingPolicy) {
+    return newBuilder()
+        .setProject(project)
+        .setLocation(location)
+        .setAutoscalingPolicy(autoscalingPolicy)
+        .build()
+        .toString();
+  }
+
+  @BetaApi("The static format methods are not stable yet and may be changed in the future.")
+  public static String formatProjectRegionAutoscalingPolicyName(
+      String project, String region, String autoscalingPolicy) {
+    return newProjectRegionAutoscalingPolicyBuilder()
         .setProject(project)
         .setRegion(region)
         .setAutoscalingPolicy(autoscalingPolicy)
@@ -85,10 +162,18 @@ public static AutoscalingPolicyName parse(String formattedString) {
     if (formattedString.isEmpty()) {
       return null;
     }
-    Map matchMap =
-        PATH_TEMPLATE.validatedMatch(
-            formattedString, "AutoscalingPolicyName.parse: formattedString not in valid format");
-    return of(matchMap.get("project"), matchMap.get("region"), matchMap.get("autoscaling_policy"));
+    if (PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE.matches(formattedString)) {
+      Map matchMap =
+          PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE.match(formattedString);
+      return ofProjectLocationAutoscalingPolicyName(
+          matchMap.get("project"), matchMap.get("location"), matchMap.get("autoscaling_policy"));
+    } else if (PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE.matches(formattedString)) {
+      Map matchMap =
+          PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE.match(formattedString);
+      return ofProjectRegionAutoscalingPolicyName(
+          matchMap.get("project"), matchMap.get("region"), matchMap.get("autoscaling_policy"));
+    }
+    throw new ValidationException("JobName.parse: formattedString not in valid format");
   }
 
   public static List parseList(List formattedStrings) {
@@ -100,7 +185,7 @@ public static List parseList(List formattedString
   }
 
   public static List toStringList(List values) {
-    List list = new ArrayList(values.size());
+    List list = new ArrayList<>(values.size());
     for (AutoscalingPolicyName value : values) {
       if (value == null) {
         list.add("");
@@ -112,17 +197,28 @@ public static List toStringList(List values) {
   }
 
   public static boolean isParsableFrom(String formattedString) {
-    return PATH_TEMPLATE.matches(formattedString);
+    return PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE.matches(formattedString)
+        || PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE.matches(formattedString);
   }
 
+  @Override
   public Map getFieldValuesMap() {
     if (fieldValuesMap == null) {
       synchronized (this) {
         if (fieldValuesMap == null) {
           ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
-          fieldMapBuilder.put("project", project);
-          fieldMapBuilder.put("region", region);
-          fieldMapBuilder.put("autoscalingPolicy", autoscalingPolicy);
+          if (project != null) {
+            fieldMapBuilder.put("project", project);
+          }
+          if (location != null) {
+            fieldMapBuilder.put("location", location);
+          }
+          if (autoscalingPolicy != null) {
+            fieldMapBuilder.put("autoscaling_policy", autoscalingPolicy);
+          }
+          if (region != null) {
+            fieldMapBuilder.put("region", region);
+          }
           fieldValuesMap = fieldMapBuilder.build();
         }
       }
@@ -136,23 +232,26 @@ public String getFieldValue(String fieldName) {
 
   @Override
   public String toString() {
-    return PATH_TEMPLATE.instantiate(
-        "project", project, "region", region, "autoscaling_policy", autoscalingPolicy);
+    return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap());
   }
 
-  /** Builder for AutoscalingPolicyName. */
+  /**
+   * Builder for projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}.
+   */
   public static class Builder {
 
     private String project;
-    private String region;
+    private String location;
     private String autoscalingPolicy;
 
+    protected Builder() {}
+
     public String getProject() {
       return project;
     }
 
-    public String getRegion() {
-      return region;
+    public String getLocation() {
+      return location;
     }
 
     public String getAutoscalingPolicy() {
@@ -164,8 +263,8 @@ public Builder setProject(String project) {
       return this;
     }
 
-    public Builder setRegion(String region) {
-      this.region = region;
+    public Builder setLocation(String location) {
+      this.location = location;
       return this;
     }
 
@@ -174,11 +273,13 @@ public Builder setAutoscalingPolicy(String autoscalingPolicy) {
       return this;
     }
 
-    private Builder() {}
-
     private Builder(AutoscalingPolicyName autoscalingPolicyName) {
+      Preconditions.checkArgument(
+          autoscalingPolicyName.pathTemplate == PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE,
+          "toBuilder is only supported when AutoscalingPolicyName has the pattern of "
+              + "projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}.");
       project = autoscalingPolicyName.project;
-      region = autoscalingPolicyName.region;
+      location = autoscalingPolicyName.location;
       autoscalingPolicy = autoscalingPolicyName.autoscalingPolicy;
     }
 
@@ -187,16 +288,59 @@ public AutoscalingPolicyName build() {
     }
   }
 
+  /** Builder for projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy}. */
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
+  public static class ProjectRegionAutoscalingPolicyBuilder {
+
+    private String project;
+    private String region;
+    private String autoscalingPolicy;
+
+    private ProjectRegionAutoscalingPolicyBuilder() {}
+
+    public String getProject() {
+      return project;
+    }
+
+    public String getRegion() {
+      return region;
+    }
+
+    public String getAutoscalingPolicy() {
+      return autoscalingPolicy;
+    }
+
+    public ProjectRegionAutoscalingPolicyBuilder setProject(String project) {
+      this.project = project;
+      return this;
+    }
+
+    public ProjectRegionAutoscalingPolicyBuilder setRegion(String region) {
+      this.region = region;
+      return this;
+    }
+
+    public ProjectRegionAutoscalingPolicyBuilder setAutoscalingPolicy(String autoscalingPolicy) {
+      this.autoscalingPolicy = autoscalingPolicy;
+      return this;
+    }
+
+    public AutoscalingPolicyName build() {
+      return new AutoscalingPolicyName(this);
+    }
+  }
+
   @Override
   public boolean equals(Object o) {
     if (o == this) {
       return true;
     }
-    if (o instanceof AutoscalingPolicyName) {
+    if (o != null || getClass() == o.getClass()) {
       AutoscalingPolicyName that = (AutoscalingPolicyName) o;
-      return (this.project.equals(that.project))
-          && (this.region.equals(that.region))
-          && (this.autoscalingPolicy.equals(that.autoscalingPolicy));
+      return (Objects.equals(this.project, that.project))
+          && (Objects.equals(this.location, that.location))
+          && (Objects.equals(this.autoscalingPolicy, that.autoscalingPolicy))
+          && (Objects.equals(this.region, that.region));
     }
     return false;
   }
@@ -205,11 +349,15 @@ public boolean equals(Object o) {
   public int hashCode() {
     int h = 1;
     h *= 1000003;
-    h ^= project.hashCode();
+    h ^= Objects.hashCode(fixedValue);
+    h *= 1000003;
+    h ^= Objects.hashCode(project);
+    h *= 1000003;
+    h ^= Objects.hashCode(location);
     h *= 1000003;
-    h ^= region.hashCode();
+    h ^= Objects.hashCode(autoscalingPolicy);
     h *= 1000003;
-    h ^= autoscalingPolicy.hashCode();
+    h ^= Objects.hashCode(region);
     return h;
   }
 }
diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LocationName.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LocationName.java
new file mode 100644
index 00000000..ac38238d
--- /dev/null
+++ b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LocationName.java
@@ -0,0 +1,182 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.dataproc.v1;
+
+import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.resourcenames.ResourceName;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableMap;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/** AUTO-GENERATED DOCUMENTATION AND CLASS */
+@javax.annotation.Generated("by GAPIC protoc plugin")
+public class LocationName implements ResourceName {
+
+  private static final PathTemplate PATH_TEMPLATE =
+      PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}");
+
+  private volatile Map fieldValuesMap;
+
+  private final String project;
+  private final String location;
+
+  public String getProject() {
+    return project;
+  }
+
+  public String getLocation() {
+    return location;
+  }
+
+  public static Builder newBuilder() {
+    return new Builder();
+  }
+
+  public Builder toBuilder() {
+    return new Builder(this);
+  }
+
+  private LocationName(Builder builder) {
+    project = Preconditions.checkNotNull(builder.getProject());
+    location = Preconditions.checkNotNull(builder.getLocation());
+  }
+
+  public static LocationName of(String project, String location) {
+    return newBuilder().setProject(project).setLocation(location).build();
+  }
+
+  public static String format(String project, String location) {
+    return newBuilder().setProject(project).setLocation(location).build().toString();
+  }
+
+  public static LocationName parse(String formattedString) {
+    if (formattedString.isEmpty()) {
+      return null;
+    }
+    Map matchMap =
+        PATH_TEMPLATE.validatedMatch(
+            formattedString, "LocationName.parse: formattedString not in valid format");
+    return of(matchMap.get("project"), matchMap.get("location"));
+  }
+
+  public static List parseList(List formattedStrings) {
+    List list = new ArrayList<>(formattedStrings.size());
+    for (String formattedString : formattedStrings) {
+      list.add(parse(formattedString));
+    }
+    return list;
+  }
+
+  public static List toStringList(List values) {
+    List list = new ArrayList(values.size());
+    for (LocationName value : values) {
+      if (value == null) {
+        list.add("");
+      } else {
+        list.add(value.toString());
+      }
+    }
+    return list;
+  }
+
+  public static boolean isParsableFrom(String formattedString) {
+    return PATH_TEMPLATE.matches(formattedString);
+  }
+
+  public Map getFieldValuesMap() {
+    if (fieldValuesMap == null) {
+      synchronized (this) {
+        if (fieldValuesMap == null) {
+          ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
+          fieldMapBuilder.put("project", project);
+          fieldMapBuilder.put("location", location);
+          fieldValuesMap = fieldMapBuilder.build();
+        }
+      }
+    }
+    return fieldValuesMap;
+  }
+
+  public String getFieldValue(String fieldName) {
+    return getFieldValuesMap().get(fieldName);
+  }
+
+  @Override
+  public String toString() {
+    return PATH_TEMPLATE.instantiate("project", project, "location", location);
+  }
+
+  /** Builder for LocationName. */
+  public static class Builder {
+
+    private String project;
+    private String location;
+
+    public String getProject() {
+      return project;
+    }
+
+    public String getLocation() {
+      return location;
+    }
+
+    public Builder setProject(String project) {
+      this.project = project;
+      return this;
+    }
+
+    public Builder setLocation(String location) {
+      this.location = location;
+      return this;
+    }
+
+    private Builder() {}
+
+    private Builder(LocationName locationName) {
+      project = locationName.project;
+      location = locationName.location;
+    }
+
+    public LocationName build() {
+      return new LocationName(this);
+    }
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o == this) {
+      return true;
+    }
+    if (o instanceof LocationName) {
+      LocationName that = (LocationName) o;
+      return (this.project.equals(that.project)) && (this.location.equals(that.location));
+    }
+    return false;
+  }
+
+  @Override
+  public int hashCode() {
+    int h = 1;
+    h *= 1000003;
+    h ^= project.hashCode();
+    h *= 1000003;
+    h ^= location.hashCode();
+    return h;
+  }
+}
diff --git a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateName.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateName.java
index 7d7b8060..167a8a57 100644
--- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateName.java
+++ b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateName.java
@@ -16,27 +16,39 @@
 
 package com.google.cloud.dataproc.v1;
 
+import com.google.api.core.BetaApi;
 import com.google.api.pathtemplate.PathTemplate;
+import com.google.api.pathtemplate.ValidationException;
 import com.google.api.resourcenames.ResourceName;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableMap;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 
 /** AUTO-GENERATED DOCUMENTATION AND CLASS */
 @javax.annotation.Generated("by GAPIC protoc plugin")
 public class WorkflowTemplateName implements ResourceName {
 
-  private static final PathTemplate PATH_TEMPLATE =
+  @Deprecated
+  protected WorkflowTemplateName() {}
+
+  private static final PathTemplate PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE =
       PathTemplate.createWithoutUrlEncoding(
           "projects/{project}/regions/{region}/workflowTemplates/{workflow_template}");
+  private static final PathTemplate PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE =
+      PathTemplate.createWithoutUrlEncoding(
+          "projects/{project}/locations/{location}/workflowTemplates/{workflow_template}");
 
   private volatile Map fieldValuesMap;
+  private PathTemplate pathTemplate;
+  private String fixedValue;
 
-  private final String project;
-  private final String region;
-  private final String workflowTemplate;
+  private String project;
+  private String region;
+  private String workflowTemplate;
+  private String location;
 
   public String getProject() {
     return project;
@@ -50,28 +62,70 @@ public String getWorkflowTemplate() {
     return workflowTemplate;
   }
 
+  public String getLocation() {
+    return location;
+  }
+
+  private WorkflowTemplateName(Builder builder) {
+    project = Preconditions.checkNotNull(builder.getProject());
+    region = Preconditions.checkNotNull(builder.getRegion());
+    workflowTemplate = Preconditions.checkNotNull(builder.getWorkflowTemplate());
+    pathTemplate = PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE;
+  }
+
+  private WorkflowTemplateName(ProjectLocationWorkflowTemplateBuilder builder) {
+    project = Preconditions.checkNotNull(builder.getProject());
+    location = Preconditions.checkNotNull(builder.getLocation());
+    workflowTemplate = Preconditions.checkNotNull(builder.getWorkflowTemplate());
+    pathTemplate = PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE;
+  }
+
   public static Builder newBuilder() {
     return new Builder();
   }
 
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
+  public static Builder newProjectRegionWorkflowTemplateBuilder() {
+    return new Builder();
+  }
+
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
+  public static ProjectLocationWorkflowTemplateBuilder newProjectLocationWorkflowTemplateBuilder() {
+    return new ProjectLocationWorkflowTemplateBuilder();
+  }
+
   public Builder toBuilder() {
     return new Builder(this);
   }
 
-  private WorkflowTemplateName(Builder builder) {
-    project = Preconditions.checkNotNull(builder.getProject());
-    region = Preconditions.checkNotNull(builder.getRegion());
-    workflowTemplate = Preconditions.checkNotNull(builder.getWorkflowTemplate());
+  public static WorkflowTemplateName of(String project, String region, String workflowTemplate) {
+    return newProjectRegionWorkflowTemplateBuilder()
+        .setProject(project)
+        .setRegion(region)
+        .setWorkflowTemplate(workflowTemplate)
+        .build();
   }
 
-  public static WorkflowTemplateName of(String project, String region, String workflowTemplate) {
-    return newBuilder()
+  @BetaApi("The static create methods are not stable yet and may be changed in the future.")
+  public static WorkflowTemplateName ofProjectRegionWorkflowTemplateName(
+      String project, String region, String workflowTemplate) {
+    return newProjectRegionWorkflowTemplateBuilder()
         .setProject(project)
         .setRegion(region)
         .setWorkflowTemplate(workflowTemplate)
         .build();
   }
 
+  @BetaApi("The static create methods are not stable yet and may be changed in the future.")
+  public static WorkflowTemplateName ofProjectLocationWorkflowTemplateName(
+      String project, String location, String workflowTemplate) {
+    return newProjectLocationWorkflowTemplateBuilder()
+        .setProject(project)
+        .setLocation(location)
+        .setWorkflowTemplate(workflowTemplate)
+        .build();
+  }
+
   public static String format(String project, String region, String workflowTemplate) {
     return newBuilder()
         .setProject(project)
@@ -81,14 +135,44 @@ public static String format(String project, String region, String workflowTempla
         .toString();
   }
 
+  @BetaApi("The static format methods are not stable yet and may be changed in the future.")
+  public static String formatProjectRegionWorkflowTemplateName(
+      String project, String region, String workflowTemplate) {
+    return newBuilder()
+        .setProject(project)
+        .setRegion(region)
+        .setWorkflowTemplate(workflowTemplate)
+        .build()
+        .toString();
+  }
+
+  @BetaApi("The static format methods are not stable yet and may be changed in the future.")
+  public static String formatProjectLocationWorkflowTemplateName(
+      String project, String location, String workflowTemplate) {
+    return newProjectLocationWorkflowTemplateBuilder()
+        .setProject(project)
+        .setLocation(location)
+        .setWorkflowTemplate(workflowTemplate)
+        .build()
+        .toString();
+  }
+
   public static WorkflowTemplateName parse(String formattedString) {
     if (formattedString.isEmpty()) {
       return null;
     }
-    Map matchMap =
-        PATH_TEMPLATE.validatedMatch(
-            formattedString, "WorkflowTemplateName.parse: formattedString not in valid format");
-    return of(matchMap.get("project"), matchMap.get("region"), matchMap.get("workflow_template"));
+    if (PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.matches(formattedString)) {
+      Map matchMap =
+          PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.match(formattedString);
+      return ofProjectRegionWorkflowTemplateName(
+          matchMap.get("project"), matchMap.get("region"), matchMap.get("workflow_template"));
+    } else if (PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.matches(formattedString)) {
+      Map matchMap =
+          PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.match(formattedString);
+      return ofProjectLocationWorkflowTemplateName(
+          matchMap.get("project"), matchMap.get("location"), matchMap.get("workflow_template"));
+    }
+    throw new ValidationException("JobName.parse: formattedString not in valid format");
   }
 
   public static List parseList(List formattedStrings) {
@@ -100,7 +184,7 @@ public static List parseList(List formattedStrings
   }
 
   public static List toStringList(List values) {
-    List list = new ArrayList(values.size());
+    List list = new ArrayList<>(values.size());
     for (WorkflowTemplateName value : values) {
       if (value == null) {
         list.add("");
@@ -112,17 +196,28 @@ public static List toStringList(List values) {
   }
 
   public static boolean isParsableFrom(String formattedString) {
-    return PATH_TEMPLATE.matches(formattedString);
+    return PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.matches(formattedString)
+        || PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.matches(formattedString);
   }
 
+  @Override
   public Map getFieldValuesMap() {
     if (fieldValuesMap == null) {
       synchronized (this) {
         if (fieldValuesMap == null) {
           ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
-          fieldMapBuilder.put("project", project);
-          fieldMapBuilder.put("region", region);
-          fieldMapBuilder.put("workflowTemplate", workflowTemplate);
+          if (project != null) {
+            fieldMapBuilder.put("project", project);
+          }
+          if (region != null) {
+            fieldMapBuilder.put("region", region);
+          }
+          if (workflowTemplate != null) {
+            fieldMapBuilder.put("workflow_template", workflowTemplate);
+          }
+          if (location != null) {
+            fieldMapBuilder.put("location", location);
+          }
           fieldValuesMap = fieldMapBuilder.build();
         }
       }
@@ -136,17 +231,18 @@ public String getFieldValue(String fieldName) {
 
   @Override
   public String toString() {
-    return PATH_TEMPLATE.instantiate(
-        "project", project, "region", region, "workflow_template", workflowTemplate);
+    return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap());
   }
 
-  /** Builder for WorkflowTemplateName. */
+  /** Builder for projects/{project}/regions/{region}/workflowTemplates/{workflow_template}. */
   public static class Builder {
 
     private String project;
     private String region;
     private String workflowTemplate;
 
+    protected Builder() {}
+
     public String getProject() {
       return project;
     }
@@ -174,9 +270,11 @@ public Builder setWorkflowTemplate(String workflowTemplate) {
       return this;
     }
 
-    private Builder() {}
-
     private Builder(WorkflowTemplateName workflowTemplateName) {
+      Preconditions.checkArgument(
+          workflowTemplateName.pathTemplate == PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE,
+          "toBuilder is only supported when WorkflowTemplateName has the pattern of "
+              + "projects/{project}/regions/{region}/workflowTemplates/{workflow_template}.");
       project = workflowTemplateName.project;
       region = workflowTemplateName.region;
       workflowTemplate = workflowTemplateName.workflowTemplate;
@@ -187,16 +285,59 @@ public WorkflowTemplateName build() {
     }
   }
 
+  /** Builder for projects/{project}/locations/{location}/workflowTemplates/{workflow_template}. */
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
+  public static class ProjectLocationWorkflowTemplateBuilder {
+
+    private String project;
+    private String location;
+    private String workflowTemplate;
+
+    private ProjectLocationWorkflowTemplateBuilder() {}
+
+    public String getProject() {
+      return project;
+    }
+
+    public String getLocation() {
+      return location;
+    }
+
+    public String getWorkflowTemplate() {
+      return workflowTemplate;
+    }
+
+    public ProjectLocationWorkflowTemplateBuilder setProject(String project) {
+      this.project = project;
+      return this;
+    }
+
+    public ProjectLocationWorkflowTemplateBuilder setLocation(String location) {
+      this.location = location;
+      return this;
+    }
+
+    public ProjectLocationWorkflowTemplateBuilder setWorkflowTemplate(String workflowTemplate) {
+      this.workflowTemplate = workflowTemplate;
+      return this;
+    }
+
+    public WorkflowTemplateName build() {
+      return new WorkflowTemplateName(this);
+    }
+  }
+
   @Override
   public boolean equals(Object o) {
     if (o == this) {
       return true;
     }
-    if (o instanceof WorkflowTemplateName) {
+    if (o != null || getClass() == o.getClass()) {
       WorkflowTemplateName that = (WorkflowTemplateName) o;
-      return (this.project.equals(that.project))
-          && (this.region.equals(that.region))
-          && (this.workflowTemplate.equals(that.workflowTemplate));
+      return (Objects.equals(this.project, that.project))
+          && (Objects.equals(this.region, that.region))
+          && (Objects.equals(this.workflowTemplate, that.workflowTemplate))
+          && (Objects.equals(this.location, that.location));
     }
     return false;
   }
@@ -205,11 +346,15 @@ public boolean equals(Object o) {
   public int hashCode() {
     int h = 1;
     h *= 1000003;
-    h ^= project.hashCode();
+    h ^= Objects.hashCode(fixedValue);
+    h *= 1000003;
+    h ^= Objects.hashCode(project);
+    h *= 1000003;
+    h ^= Objects.hashCode(region);
     h *= 1000003;
-    h ^= region.hashCode();
+    h ^= Objects.hashCode(workflowTemplate);
     h *= 1000003;
-    h ^= workflowTemplate.hashCode();
+    h ^= Objects.hashCode(location);
     return h;
   }
 }
diff --git a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/autoscaling_policies.proto b/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/autoscaling_policies.proto
index 53321d89..8d680bcd 100644
--- a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/autoscaling_policies.proto
+++ b/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/autoscaling_policies.proto
@@ -17,11 +17,11 @@ syntax = "proto3";
 package google.cloud.dataproc.v1;
 
 import "google/api/annotations.proto";
+import "google/api/client.proto";
 import "google/api/field_behavior.proto";
 import "google/api/resource.proto";
 import "google/protobuf/duration.proto";
 import "google/protobuf/empty.proto";
-import "google/api/client.proto";
 
 option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1;dataproc";
 option java_multiple_files = true;
@@ -36,10 +36,12 @@ option (google.api.resource_definition) = {
 // Dataproc API.
 service AutoscalingPolicyService {
   option (google.api.default_host) = "dataproc.googleapis.com";
-  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
+  option (google.api.oauth_scopes) =
+      "https://www.googleapis.com/auth/cloud-platform";
 
   // Creates new autoscaling policy.
-  rpc CreateAutoscalingPolicy(CreateAutoscalingPolicyRequest) returns (AutoscalingPolicy) {
+  rpc CreateAutoscalingPolicy(CreateAutoscalingPolicyRequest)
+      returns (AutoscalingPolicy) {
     option (google.api.http) = {
       post: "/v1/{parent=projects/*/locations/*}/autoscalingPolicies"
       body: "policy"
@@ -48,13 +50,15 @@ service AutoscalingPolicyService {
         body: "policy"
       }
     };
+    option (google.api.method_signature) = "parent,policy";
   }
 
   // Updates (replaces) autoscaling policy.
   //
   // Disabled check for update_mask, because all updates will be full
   // replacements.
-  rpc UpdateAutoscalingPolicy(UpdateAutoscalingPolicyRequest) returns (AutoscalingPolicy) {
+  rpc UpdateAutoscalingPolicy(UpdateAutoscalingPolicyRequest)
+      returns (AutoscalingPolicy) {
     option (google.api.http) = {
       put: "/v1/{policy.name=projects/*/locations/*/autoscalingPolicies/*}"
       body: "policy"
@@ -63,37 +67,44 @@ service AutoscalingPolicyService {
         body: "policy"
       }
     };
+    option (google.api.method_signature) = "policy";
   }
 
   // Retrieves autoscaling policy.
-  rpc GetAutoscalingPolicy(GetAutoscalingPolicyRequest) returns (AutoscalingPolicy) {
+  rpc GetAutoscalingPolicy(GetAutoscalingPolicyRequest)
+      returns (AutoscalingPolicy) {
     option (google.api.http) = {
       get: "/v1/{name=projects/*/locations/*/autoscalingPolicies/*}"
       additional_bindings {
         get: "/v1/{name=projects/*/regions/*/autoscalingPolicies/*}"
       }
     };
+    option (google.api.method_signature) = "name";
   }
 
   // Lists autoscaling policies in the project.
-  rpc ListAutoscalingPolicies(ListAutoscalingPoliciesRequest) returns (ListAutoscalingPoliciesResponse) {
+  rpc ListAutoscalingPolicies(ListAutoscalingPoliciesRequest)
+      returns (ListAutoscalingPoliciesResponse) {
     option (google.api.http) = {
       get: "/v1/{parent=projects/*/locations/*}/autoscalingPolicies"
       additional_bindings {
         get: "/v1/{parent=projects/*/regions/*}/autoscalingPolicies"
       }
     };
+    option (google.api.method_signature) = "parent";
   }
 
   // Deletes an autoscaling policy. It is an error to delete an autoscaling
   // policy that is in use by one or more clusters.
-  rpc DeleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest) returns (google.protobuf.Empty) {
+  rpc DeleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest)
+      returns (google.protobuf.Empty) {
     option (google.api.http) = {
       delete: "/v1/{name=projects/*/locations/*/autoscalingPolicies/*}"
       additional_bindings {
         delete: "/v1/{name=projects/*/regions/*/autoscalingPolicies/*}"
       }
     };
+    option (google.api.method_signature) = "name";
   }
 }
 
@@ -127,26 +138,31 @@ message AutoscalingPolicy {
 
   // Autoscaling algorithm for policy.
   oneof algorithm {
-    BasicAutoscalingAlgorithm basic_algorithm = 3 [(google.api.field_behavior) = REQUIRED];
+    BasicAutoscalingAlgorithm basic_algorithm = 3
+        [(google.api.field_behavior) = REQUIRED];
   }
 
   // Required. Describes how the autoscaler will operate for primary workers.
-  InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(google.api.field_behavior) = REQUIRED];
+  InstanceGroupAutoscalingPolicyConfig worker_config = 4
+      [(google.api.field_behavior) = REQUIRED];
 
   // Optional. Describes how the autoscaler will operate for secondary workers.
-  InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(google.api.field_behavior) = OPTIONAL];
+  InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5
+      [(google.api.field_behavior) = OPTIONAL];
 }
 
 // Basic algorithm for autoscaling.
 message BasicAutoscalingAlgorithm {
   // Required. YARN autoscaling configuration.
-  BasicYarnAutoscalingConfig yarn_config = 1 [(google.api.field_behavior) = REQUIRED];
+  BasicYarnAutoscalingConfig yarn_config = 1
+      [(google.api.field_behavior) = REQUIRED];
 
   // Optional. Duration between scaling events. A scaling period starts after
   // the update operation from the previous event has completed.
   //
   // Bounds: [2m, 1d]. Default: 2m.
-  google.protobuf.Duration cooldown_period = 2 [(google.api.field_behavior) = OPTIONAL];
+  google.protobuf.Duration cooldown_period = 2
+      [(google.api.field_behavior) = OPTIONAL];
 }
 
 // Basic autoscaling configurations for YARN.
@@ -157,7 +173,8 @@ message BasicYarnAutoscalingConfig {
   // downscaling operations.
   //
   // Bounds: [0s, 1d].
-  google.protobuf.Duration graceful_decommission_timeout = 5 [(google.api.field_behavior) = REQUIRED];
+  google.protobuf.Duration graceful_decommission_timeout = 5
+      [(google.api.field_behavior) = REQUIRED];
 
   // Required. Fraction of average pending memory in the last cooldown period
   // for which to add workers. A scale-up factor of 1.0 will result in scaling
@@ -184,7 +201,8 @@ message BasicYarnAutoscalingConfig {
   // on any recommended change.
   //
   // Bounds: [0.0, 1.0]. Default: 0.0.
-  double scale_up_min_worker_fraction = 3 [(google.api.field_behavior) = OPTIONAL];
+  double scale_up_min_worker_fraction = 3
+      [(google.api.field_behavior) = OPTIONAL];
 
   // Optional. Minimum scale-down threshold as a fraction of total cluster size
   // before scaling occurs. For example, in a 20-worker cluster, a threshold of
@@ -193,7 +211,8 @@ message BasicYarnAutoscalingConfig {
   // on any recommended change.
   //
   // Bounds: [0.0, 1.0]. Default: 0.0.
-  double scale_down_min_worker_fraction = 4 [(google.api.field_behavior) = OPTIONAL];
+  double scale_down_min_worker_fraction = 4
+      [(google.api.field_behavior) = OPTIONAL];
 }
 
 // Configuration for the size bounds of an instance group, including its
@@ -336,7 +355,8 @@ message ListAutoscalingPoliciesRequest {
 // A response to a request to list autoscaling policies in a project.
 message ListAutoscalingPoliciesResponse {
   // Output only. Autoscaling policies list.
-  repeated AutoscalingPolicy policies = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+  repeated AutoscalingPolicy policies = 1
+      [(google.api.field_behavior) = OUTPUT_ONLY];
 
   // Output only. This token is included in the response if there are more
   // results to fetch.
diff --git a/proto-google-cloud-dataproc-v1beta2/clirr-ignored-differences.xml b/proto-google-cloud-dataproc-v1beta2/clirr-ignored-differences.xml
new file mode 100644
index 00000000..e1497cef
--- /dev/null
+++ b/proto-google-cloud-dataproc-v1beta2/clirr-ignored-differences.xml
@@ -0,0 +1,9 @@
+
+
+
+  
+    7002
+    com/google/cloud/dataproc/v1beta2/AutoscalingPolicyName$Builder
+    * *etRegion(*)
+  
+
diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPoliciesProto.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPoliciesProto.java
index 42d4107c..096b7f2e 100644
--- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPoliciesProto.java
+++ b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPoliciesProto.java
@@ -92,10 +92,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "orker_config\030\005 \001(\0132C.google.cloud.datapr"
           + "oc.v1beta2.InstanceGroupAutoscalingPolic"
           + "yConfigB\003\340A\001:\321\001\352A\315\001\n)dataproc.googleapis"
-          + ".com/AutoscalingPolicy\022Lprojects/{projec"
-          + "t}/regions/{region}/autoscalingPolicies/"
-          + "{autoscaling_policy}\022Pprojects/{project}"
-          + "/locations/{location}/autoscalingPolicie"
+          + ".com/AutoscalingPolicy\022Pprojects/{projec"
+          + "t}/locations/{location}/autoscalingPolic"
+          + "ies/{autoscaling_policy}\022Lprojects/{proj"
+          + "ect}/regions/{region}/autoscalingPolicie"
           + "s/{autoscaling_policy} \001B\013\n\talgorithm\"\251\001"
           + "\n\031BasicAutoscalingAlgorithm\022S\n\013yarn_conf"
           + "ig\030\001 \001(\01329.google.cloud.dataproc.v1beta2"
@@ -117,63 +117,63 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + ".v1beta2.AutoscalingPolicyB\003\340A\002\"^\n\033GetAu"
           + "toscalingPolicyRequest\022?\n\004name\030\001 \001(\tB1\340A"
           + "\002\372A+\n)dataproc.googleapis.com/Autoscalin"
-          + "gPolicy\"\225\001\n\036UpdateAutoscalingPolicyReque"
-          + "st\022s\n\006policy\030\001 \001(\01320.google.cloud.datapr"
-          + "oc.v1beta2.AutoscalingPolicyB1\340A\002\372A+\n)da"
-          + "taproc.googleapis.com/AutoscalingPolicy\""
-          + "a\n\036DeleteAutoscalingPolicyRequest\022?\n\004nam"
-          + "e\030\001 \001(\tB1\340A\002\372A+\n)dataproc.googleapis.com"
-          + "/AutoscalingPolicy\"\224\001\n\036ListAutoscalingPo"
-          + "liciesRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)d"
-          + "ataproc.googleapis.com/AutoscalingPolicy"
-          + "\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003"
-          + " \001(\tB\003\340A\001\"\210\001\n\037ListAutoscalingPoliciesRes"
-          + "ponse\022G\n\010policies\030\001 \003(\01320.google.cloud.d"
-          + "ataproc.v1beta2.AutoscalingPolicyB\003\340A\003\022\034"
-          + "\n\017next_page_token\030\002 \001(\tB\003\340A\0032\217\014\n\030Autosca"
-          + "lingPolicyService\022\260\002\n\027CreateAutoscalingP"
-          + "olicy\022=.google.cloud.dataproc.v1beta2.Cr"
-          + "eateAutoscalingPolicyRequest\0320.google.cl"
-          + "oud.dataproc.v1beta2.AutoscalingPolicy\"\243"
-          + "\001\202\323\344\223\002\214\001\".google.cloud.dataproc.v1beta2.Lis"
-          + "tAutoscalingPoliciesResponse\"\213\001\202\323\344\223\002|\022."
+          + "google.cloud.dataproc.v1beta2.ListAutosc"
+          + "alingPoliciesResponse\"\213\001\202\323\344\223\002|\022 fieldValuesMap;
+  private PathTemplate pathTemplate;
+  private String fixedValue;
 
-  private final String project;
-  private final String region;
-  private final String autoscalingPolicy;
+  private String project;
+  private String location;
+  private String autoscalingPolicy;
+  private String region;
 
   public String getProject() {
     return project;
   }
 
-  public String getRegion() {
-    return region;
+  public String getLocation() {
+    return location;
   }
 
   public String getAutoscalingPolicy() {
     return autoscalingPolicy;
   }
 
+  public String getRegion() {
+    return region;
+  }
+
+  private AutoscalingPolicyName(Builder builder) {
+    project = Preconditions.checkNotNull(builder.getProject());
+    location = Preconditions.checkNotNull(builder.getLocation());
+    autoscalingPolicy = Preconditions.checkNotNull(builder.getAutoscalingPolicy());
+    pathTemplate = PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE;
+  }
+
+  private AutoscalingPolicyName(ProjectRegionAutoscalingPolicyBuilder builder) {
+    project = Preconditions.checkNotNull(builder.getProject());
+    region = Preconditions.checkNotNull(builder.getRegion());
+    autoscalingPolicy = Preconditions.checkNotNull(builder.getAutoscalingPolicy());
+    pathTemplate = PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE;
+  }
+
   public static Builder newBuilder() {
     return new Builder();
   }
 
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
+  public static Builder newProjectLocationAutoscalingPolicyBuilder() {
+    return new Builder();
+  }
+
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
+  public static ProjectRegionAutoscalingPolicyBuilder newProjectRegionAutoscalingPolicyBuilder() {
+    return new ProjectRegionAutoscalingPolicyBuilder();
+  }
+
   public Builder toBuilder() {
     return new Builder(this);
   }
 
-  private AutoscalingPolicyName(Builder builder) {
-    project = Preconditions.checkNotNull(builder.getProject());
-    region = Preconditions.checkNotNull(builder.getRegion());
-    autoscalingPolicy = Preconditions.checkNotNull(builder.getAutoscalingPolicy());
+  public static AutoscalingPolicyName of(
+      String project, String location, String autoscalingPolicy) {
+    return newProjectLocationAutoscalingPolicyBuilder()
+        .setProject(project)
+        .setLocation(location)
+        .setAutoscalingPolicy(autoscalingPolicy)
+        .build();
   }
 
-  public static AutoscalingPolicyName of(String project, String region, String autoscalingPolicy) {
-    return newBuilder()
+  @BetaApi("The static create methods are not stable yet and may be changed in the future.")
+  public static AutoscalingPolicyName ofProjectLocationAutoscalingPolicyName(
+      String project, String location, String autoscalingPolicy) {
+    return newProjectLocationAutoscalingPolicyBuilder()
+        .setProject(project)
+        .setLocation(location)
+        .setAutoscalingPolicy(autoscalingPolicy)
+        .build();
+  }
+
+  @BetaApi("The static create methods are not stable yet and may be changed in the future.")
+  public static AutoscalingPolicyName ofProjectRegionAutoscalingPolicyName(
+      String project, String region, String autoscalingPolicy) {
+    return newProjectRegionAutoscalingPolicyBuilder()
         .setProject(project)
         .setRegion(region)
         .setAutoscalingPolicy(autoscalingPolicy)
         .build();
   }
 
-  public static String format(String project, String region, String autoscalingPolicy) {
+  public static String format(String project, String location, String autoscalingPolicy) {
     return newBuilder()
+        .setProject(project)
+        .setLocation(location)
+        .setAutoscalingPolicy(autoscalingPolicy)
+        .build()
+        .toString();
+  }
+
+  @BetaApi("The static format methods are not stable yet and may be changed in the future.")
+  public static String formatProjectLocationAutoscalingPolicyName(
+      String project, String location, String autoscalingPolicy) {
+    return newBuilder()
+        .setProject(project)
+        .setLocation(location)
+        .setAutoscalingPolicy(autoscalingPolicy)
+        .build()
+        .toString();
+  }
+
+  @BetaApi("The static format methods are not stable yet and may be changed in the future.")
+  public static String formatProjectRegionAutoscalingPolicyName(
+      String project, String region, String autoscalingPolicy) {
+    return newProjectRegionAutoscalingPolicyBuilder()
         .setProject(project)
         .setRegion(region)
         .setAutoscalingPolicy(autoscalingPolicy)
@@ -85,10 +162,18 @@ public static AutoscalingPolicyName parse(String formattedString) {
     if (formattedString.isEmpty()) {
       return null;
     }
-    Map matchMap =
-        PATH_TEMPLATE.validatedMatch(
-            formattedString, "AutoscalingPolicyName.parse: formattedString not in valid format");
-    return of(matchMap.get("project"), matchMap.get("region"), matchMap.get("autoscaling_policy"));
+    if (PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE.matches(formattedString)) {
+      Map matchMap =
+          PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE.match(formattedString);
+      return ofProjectLocationAutoscalingPolicyName(
+          matchMap.get("project"), matchMap.get("location"), matchMap.get("autoscaling_policy"));
+    } else if (PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE.matches(formattedString)) {
+      Map matchMap =
+          PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE.match(formattedString);
+      return ofProjectRegionAutoscalingPolicyName(
+          matchMap.get("project"), matchMap.get("region"), matchMap.get("autoscaling_policy"));
+    }
+    throw new ValidationException("JobName.parse: formattedString not in valid format");
   }
 
   public static List parseList(List formattedStrings) {
@@ -100,7 +185,7 @@ public static List parseList(List formattedString
   }
 
   public static List toStringList(List values) {
-    List list = new ArrayList(values.size());
+    List list = new ArrayList<>(values.size());
     for (AutoscalingPolicyName value : values) {
       if (value == null) {
         list.add("");
@@ -112,17 +197,28 @@ public static List toStringList(List values) {
   }
 
   public static boolean isParsableFrom(String formattedString) {
-    return PATH_TEMPLATE.matches(formattedString);
+    return PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE.matches(formattedString)
+        || PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE.matches(formattedString);
   }
 
+  @Override
   public Map getFieldValuesMap() {
     if (fieldValuesMap == null) {
       synchronized (this) {
         if (fieldValuesMap == null) {
           ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder();
-          fieldMapBuilder.put("project", project);
-          fieldMapBuilder.put("region", region);
-          fieldMapBuilder.put("autoscalingPolicy", autoscalingPolicy);
+          if (project != null) {
+            fieldMapBuilder.put("project", project);
+          }
+          if (location != null) {
+            fieldMapBuilder.put("location", location);
+          }
+          if (autoscalingPolicy != null) {
+            fieldMapBuilder.put("autoscaling_policy", autoscalingPolicy);
+          }
+          if (region != null) {
+            fieldMapBuilder.put("region", region);
+          }
           fieldValuesMap = fieldMapBuilder.build();
         }
       }
@@ -136,23 +232,26 @@ public String getFieldValue(String fieldName) {
 
   @Override
   public String toString() {
-    return PATH_TEMPLATE.instantiate(
-        "project", project, "region", region, "autoscaling_policy", autoscalingPolicy);
+    return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap());
   }
 
-  /** Builder for AutoscalingPolicyName. */
+  /**
+   * Builder for projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}.
+   */
   public static class Builder {
 
     private String project;
-    private String region;
+    private String location;
     private String autoscalingPolicy;
 
+    protected Builder() {}
+
     public String getProject() {
       return project;
     }
 
-    public String getRegion() {
-      return region;
+    public String getLocation() {
+      return location;
     }
 
     public String getAutoscalingPolicy() {
@@ -164,8 +263,8 @@ public Builder setProject(String project) {
       return this;
     }
 
-    public Builder setRegion(String region) {
-      this.region = region;
+    public Builder setLocation(String location) {
+      this.location = location;
       return this;
     }
 
@@ -174,11 +273,13 @@ public Builder setAutoscalingPolicy(String autoscalingPolicy) {
       return this;
     }
 
-    private Builder() {}
-
     private Builder(AutoscalingPolicyName autoscalingPolicyName) {
+      Preconditions.checkArgument(
+          autoscalingPolicyName.pathTemplate == PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE,
+          "toBuilder is only supported when AutoscalingPolicyName has the pattern of "
+              + "projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}.");
       project = autoscalingPolicyName.project;
-      region = autoscalingPolicyName.region;
+      location = autoscalingPolicyName.location;
       autoscalingPolicy = autoscalingPolicyName.autoscalingPolicy;
     }
 
@@ -187,16 +288,59 @@ public AutoscalingPolicyName build() {
     }
   }
 
+  /** Builder for projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy}. */
+  @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.")
+  public static class ProjectRegionAutoscalingPolicyBuilder {
+
+    private String project;
+    private String region;
+    private String autoscalingPolicy;
+
+    private ProjectRegionAutoscalingPolicyBuilder() {}
+
+    public String getProject() {
+      return project;
+    }
+
+    public String getRegion() {
+      return region;
+    }
+
+    public String getAutoscalingPolicy() {
+      return autoscalingPolicy;
+    }
+
+    public ProjectRegionAutoscalingPolicyBuilder setProject(String project) {
+      this.project = project;
+      return this;
+    }
+
+    public ProjectRegionAutoscalingPolicyBuilder setRegion(String region) {
+      this.region = region;
+      return this;
+    }
+
+    public ProjectRegionAutoscalingPolicyBuilder setAutoscalingPolicy(String autoscalingPolicy) {
+      this.autoscalingPolicy = autoscalingPolicy;
+      return this;
+    }
+
+    public AutoscalingPolicyName build() {
+      return new AutoscalingPolicyName(this);
+    }
+  }
+
   @Override
   public boolean equals(Object o) {
     if (o == this) {
       return true;
     }
-    if (o instanceof AutoscalingPolicyName) {
+    if (o != null || getClass() == o.getClass()) {
       AutoscalingPolicyName that = (AutoscalingPolicyName) o;
-      return (this.project.equals(that.project))
-          && (this.region.equals(that.region))
-          && (this.autoscalingPolicy.equals(that.autoscalingPolicy));
+      return (Objects.equals(this.project, that.project))
+          && (Objects.equals(this.location, that.location))
+          && (Objects.equals(this.autoscalingPolicy, that.autoscalingPolicy))
+          && (Objects.equals(this.region, that.region));
     }
     return false;
   }
@@ -205,11 +349,15 @@ public boolean equals(Object o) {
   public int hashCode() {
     int h = 1;
     h *= 1000003;
-    h ^= project.hashCode();
+    h ^= Objects.hashCode(fixedValue);
+    h *= 1000003;
+    h ^= Objects.hashCode(project);
+    h *= 1000003;
+    h ^= Objects.hashCode(location);
     h *= 1000003;
-    h ^= region.hashCode();
+    h ^= Objects.hashCode(autoscalingPolicy);
     h *= 1000003;
-    h ^= autoscalingPolicy.hashCode();
+    h ^= Objects.hashCode(region);
     return h;
   }
 }
diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequest.java
index 3052c772..521f0252 100644
--- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequest.java
+++ b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequest.java
@@ -140,7 +140,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    *   `projects/{project_id}/locations/{location}`
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -169,7 +171,9 @@ public java.lang.String getParent() { * `projects/{project_id}/locations/{location}` *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -619,7 +623,9 @@ public Builder mergeFrom( * `projects/{project_id}/locations/{location}` *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -648,7 +654,9 @@ public java.lang.String getParent() { * `projects/{project_id}/locations/{location}` *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ @@ -677,7 +685,9 @@ public com.google.protobuf.ByteString getParentBytes() { * `projects/{project_id}/locations/{location}` *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The parent to set. * @return This builder for chaining. @@ -705,7 +715,9 @@ public Builder setParent(java.lang.String value) { * `projects/{project_id}/locations/{location}` *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -729,7 +741,9 @@ public Builder clearParent() { * `projects/{project_id}/locations/{location}` *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for parent to set. * @return This builder for chaining. diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequestOrBuilder.java index 373da27b..20cfa728 100644 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequestOrBuilder.java +++ b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequestOrBuilder.java @@ -37,7 +37,9 @@ public interface ListWorkflowTemplatesRequestOrBuilder * `projects/{project_id}/locations/{location}` *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The parent. */ @@ -56,7 +58,9 @@ public interface ListWorkflowTemplatesRequestOrBuilder * `projects/{project_id}/locations/{location}` *
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * * * @return The bytes for parent. */ diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LocationName.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LocationName.java new file mode 100644 index 00000000..84ba3611 --- /dev/null +++ b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LocationName.java @@ -0,0 +1,182 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataproc.v1beta2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** AUTO-GENERATED DOCUMENTATION AND CLASS */ +@javax.annotation.Generated("by GAPIC protoc plugin") +public class LocationName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + public static LocationName of(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String project, String location) { + return newBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static LocationName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "LocationName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (LocationName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "location", location); + } + + /** Builder for LocationName. */ + public static class Builder { + + private String project; + private String location; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder() {} + + private Builder(LocationName locationName) { + project = locationName.project; + location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof LocationName) { + LocationName that = (LocationName) o; + return (this.project.equals(that.project)) && (this.location.equals(that.location)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + return h; + } +} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJob.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJob.java index 88828195..711cd541 100644 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJob.java +++ b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJob.java @@ -331,8 +331,8 @@ public JobTypeCase getJobTypeCase() { * within the template. * The step id is used as prefix for job id, as job * `goog-dataproc-workflow-step-id` label, and in - * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] field from other - * steps. + * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] + * field from other steps. * The id must contain only letters (a-z, A-Z), numbers (0-9), * underscores (_), and hyphens (-). Cannot begin or end with underscore * or hyphen. Must consist of between 3 and 50 characters. @@ -361,8 +361,8 @@ public java.lang.String getStepId() { * within the template. * The step id is used as prefix for job id, as job * `goog-dataproc-workflow-step-id` label, and in - * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] field from other - * steps. + * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] + * field from other steps. * The id must contain only letters (a-z, A-Z), numbers (0-9), * underscores (_), and hyphens (-). Cannot begin or end with underscore * or hyphen. Must consist of between 3 and 50 characters. @@ -1404,8 +1404,8 @@ public Builder clearJobType() { * within the template. * The step id is used as prefix for job id, as job * `goog-dataproc-workflow-step-id` label, and in - * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] field from other - * steps. + * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] + * field from other steps. * The id must contain only letters (a-z, A-Z), numbers (0-9), * underscores (_), and hyphens (-). Cannot begin or end with underscore * or hyphen. Must consist of between 3 and 50 characters. @@ -1434,8 +1434,8 @@ public java.lang.String getStepId() { * within the template. * The step id is used as prefix for job id, as job * `goog-dataproc-workflow-step-id` label, and in - * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] field from other - * steps. + * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] + * field from other steps. * The id must contain only letters (a-z, A-Z), numbers (0-9), * underscores (_), and hyphens (-). Cannot begin or end with underscore * or hyphen. Must consist of between 3 and 50 characters. @@ -1464,8 +1464,8 @@ public com.google.protobuf.ByteString getStepIdBytes() { * within the template. * The step id is used as prefix for job id, as job * `goog-dataproc-workflow-step-id` label, and in - * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] field from other - * steps. + * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] + * field from other steps. * The id must contain only letters (a-z, A-Z), numbers (0-9), * underscores (_), and hyphens (-). Cannot begin or end with underscore * or hyphen. Must consist of between 3 and 50 characters. @@ -1493,8 +1493,8 @@ public Builder setStepId(java.lang.String value) { * within the template. * The step id is used as prefix for job id, as job * `goog-dataproc-workflow-step-id` label, and in - * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] field from other - * steps. + * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] + * field from other steps. * The id must contain only letters (a-z, A-Z), numbers (0-9), * underscores (_), and hyphens (-). Cannot begin or end with underscore * or hyphen. Must consist of between 3 and 50 characters. @@ -1518,8 +1518,8 @@ public Builder clearStepId() { * within the template. * The step id is used as prefix for job id, as job * `goog-dataproc-workflow-step-id` label, and in - * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] field from other - * steps. + * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] + * field from other steps. * The id must contain only letters (a-z, A-Z), numbers (0-9), * underscores (_), and hyphens (-). Cannot begin or end with underscore * or hyphen. Must consist of between 3 and 50 characters. diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJobOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJobOrBuilder.java index cca1cdc5..6c1267fe 100644 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJobOrBuilder.java +++ b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJobOrBuilder.java @@ -31,8 +31,8 @@ public interface OrderedJobOrBuilder * within the template. * The step id is used as prefix for job id, as job * `goog-dataproc-workflow-step-id` label, and in - * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] field from other - * steps. + * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] + * field from other steps. * The id must contain only letters (a-z, A-Z), numbers (0-9), * underscores (_), and hyphens (-). Cannot begin or end with underscore * or hyphen. Must consist of between 3 and 50 characters. @@ -51,8 +51,8 @@ public interface OrderedJobOrBuilder * within the template. * The step id is used as prefix for job id, as job * `goog-dataproc-workflow-step-id` label, and in - * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] field from other - * steps. + * [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] + * field from other steps. * The id must contain only letters (a-z, A-Z), numbers (0-9), * underscores (_), and hyphens (-). Cannot begin or end with underscore * or hyphen. Must consist of between 3 and 50 characters. diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameter.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameter.java index 5f89a52c..92202abc 100644 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameter.java +++ b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameter.java @@ -227,10 +227,10 @@ public com.google.protobuf.ByteString getNameBytes() { * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -276,10 +276,10 @@ public com.google.protobuf.ProtocolStringList getFieldsList() { * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -325,10 +325,10 @@ public int getFieldsCount() { * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -375,10 +375,10 @@ public java.lang.String getFields(int index) { * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -1071,10 +1071,10 @@ private void ensureFieldsIsMutable() { * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -1120,10 +1120,10 @@ public com.google.protobuf.ProtocolStringList getFieldsList() { * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -1169,10 +1169,10 @@ public int getFieldsCount() { * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -1219,10 +1219,10 @@ public java.lang.String getFields(int index) { * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -1269,10 +1269,10 @@ public com.google.protobuf.ByteString getFieldsBytes(int index) { * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -1326,10 +1326,10 @@ public Builder setFields(int index, java.lang.String value) { * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -1382,10 +1382,10 @@ public Builder addFields(java.lang.String value) { * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -1435,10 +1435,10 @@ public Builder addAllFields(java.lang.Iterable values) { * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -1487,10 +1487,10 @@ public Builder clearFields() { * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameterOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameterOrBuilder.java index 93c43366..580307f3 100644 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameterOrBuilder.java +++ b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameterOrBuilder.java @@ -67,10 +67,10 @@ public interface TemplateParameterOrBuilder * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -114,10 +114,10 @@ public interface TemplateParameterOrBuilder * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -161,10 +161,10 @@ public interface TemplateParameterOrBuilder * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] @@ -209,10 +209,10 @@ public interface TemplateParameterOrBuilder * Required. Paths to all fields that the parameter replaces. * A field is allowed to appear in at most one parameter's list of field * paths. - * A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - * For example, a field path that references the zone field of a workflow - * template's cluster selector would be specified as - * `placement.clusterSelector.zone`. + * A field path is similar in syntax to a + * [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + * field path that references the zone field of a workflow template's cluster + * selector would be specified as `placement.clusterSelector.zone`. * Also, field paths can reference fields using the following syntax: * * Values in maps can be referenced by key: * * labels['key'] diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequest.java index b3e54877..392dcbd8 100644 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequest.java +++ b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequest.java @@ -130,7 +130,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the policy field is set. @@ -146,7 +146,7 @@ public boolean hasPolicy() { *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The policy. @@ -164,7 +164,7 @@ public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy getPolicy() { *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder getPolicyOrBuilder() { @@ -520,7 +520,7 @@ public Builder mergeFrom( *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the policy field is set. @@ -536,7 +536,7 @@ public boolean hasPolicy() { *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The policy. @@ -558,7 +558,7 @@ public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy getPolicy() { *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setPolicy(com.google.cloud.dataproc.v1beta2.AutoscalingPolicy value) { @@ -582,7 +582,7 @@ public Builder setPolicy(com.google.cloud.dataproc.v1beta2.AutoscalingPolicy val *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setPolicy( @@ -604,7 +604,7 @@ public Builder setPolicy( *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder mergePolicy(com.google.cloud.dataproc.v1beta2.AutoscalingPolicy value) { @@ -632,7 +632,7 @@ public Builder mergePolicy(com.google.cloud.dataproc.v1beta2.AutoscalingPolicy v *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder clearPolicy() { @@ -654,7 +654,7 @@ public Builder clearPolicy() { *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder getPolicyBuilder() { @@ -670,7 +670,7 @@ public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder getPolicyBuil *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder getPolicyOrBuilder() { @@ -690,7 +690,7 @@ public com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder getPolicyOrB *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * */ private com.google.protobuf.SingleFieldBuilderV3< diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequestOrBuilder.java index 1dbe7a27..81514211 100644 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequestOrBuilder.java +++ b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequestOrBuilder.java @@ -31,7 +31,7 @@ public interface UpdateAutoscalingPolicyRequestOrBuilder *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the policy field is set. @@ -45,7 +45,7 @@ public interface UpdateAutoscalingPolicyRequestOrBuilder *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The policy. @@ -59,7 +59,7 @@ public interface UpdateAutoscalingPolicyRequestOrBuilder *
* * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * */ com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder getPolicyOrBuilder(); diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateName.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateName.java index 9611ca16..77b3526a 100644 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateName.java +++ b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateName.java @@ -16,27 +16,39 @@ package com.google.cloud.dataproc.v1beta2; +import com.google.api.core.BetaApi; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; /** AUTO-GENERATED DOCUMENTATION AND CLASS */ @javax.annotation.Generated("by GAPIC protoc plugin") public class WorkflowTemplateName implements ResourceName { - private static final PathTemplate PATH_TEMPLATE = + @Deprecated + protected WorkflowTemplateName() {} + + private static final PathTemplate PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE = PathTemplate.createWithoutUrlEncoding( "projects/{project}/regions/{region}/workflowTemplates/{workflow_template}"); + private static final PathTemplate PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/workflowTemplates/{workflow_template}"); private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; - private final String project; - private final String region; - private final String workflowTemplate; + private String project; + private String region; + private String workflowTemplate; + private String location; public String getProject() { return project; @@ -50,28 +62,70 @@ public String getWorkflowTemplate() { return workflowTemplate; } + public String getLocation() { + return location; + } + + private WorkflowTemplateName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + region = Preconditions.checkNotNull(builder.getRegion()); + workflowTemplate = Preconditions.checkNotNull(builder.getWorkflowTemplate()); + pathTemplate = PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE; + } + + private WorkflowTemplateName(ProjectLocationWorkflowTemplateBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + workflowTemplate = Preconditions.checkNotNull(builder.getWorkflowTemplate()); + pathTemplate = PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE; + } + public static Builder newBuilder() { return new Builder(); } + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectRegionWorkflowTemplateBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static ProjectLocationWorkflowTemplateBuilder newProjectLocationWorkflowTemplateBuilder() { + return new ProjectLocationWorkflowTemplateBuilder(); + } + public Builder toBuilder() { return new Builder(this); } - private WorkflowTemplateName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - region = Preconditions.checkNotNull(builder.getRegion()); - workflowTemplate = Preconditions.checkNotNull(builder.getWorkflowTemplate()); + public static WorkflowTemplateName of(String project, String region, String workflowTemplate) { + return newProjectRegionWorkflowTemplateBuilder() + .setProject(project) + .setRegion(region) + .setWorkflowTemplate(workflowTemplate) + .build(); } - public static WorkflowTemplateName of(String project, String region, String workflowTemplate) { - return newBuilder() + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static WorkflowTemplateName ofProjectRegionWorkflowTemplateName( + String project, String region, String workflowTemplate) { + return newProjectRegionWorkflowTemplateBuilder() .setProject(project) .setRegion(region) .setWorkflowTemplate(workflowTemplate) .build(); } + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static WorkflowTemplateName ofProjectLocationWorkflowTemplateName( + String project, String location, String workflowTemplate) { + return newProjectLocationWorkflowTemplateBuilder() + .setProject(project) + .setLocation(location) + .setWorkflowTemplate(workflowTemplate) + .build(); + } + public static String format(String project, String region, String workflowTemplate) { return newBuilder() .setProject(project) @@ -81,14 +135,44 @@ public static String format(String project, String region, String workflowTempla .toString(); } + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectRegionWorkflowTemplateName( + String project, String region, String workflowTemplate) { + return newBuilder() + .setProject(project) + .setRegion(region) + .setWorkflowTemplate(workflowTemplate) + .build() + .toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectLocationWorkflowTemplateName( + String project, String location, String workflowTemplate) { + return newProjectLocationWorkflowTemplateBuilder() + .setProject(project) + .setLocation(location) + .setWorkflowTemplate(workflowTemplate) + .build() + .toString(); + } + public static WorkflowTemplateName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "WorkflowTemplateName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("region"), matchMap.get("workflow_template")); + if (PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = + PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.match(formattedString); + return ofProjectRegionWorkflowTemplateName( + matchMap.get("project"), matchMap.get("region"), matchMap.get("workflow_template")); + } else if (PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.matches(formattedString)) { + Map matchMap = + PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.match(formattedString); + return ofProjectLocationWorkflowTemplateName( + matchMap.get("project"), matchMap.get("location"), matchMap.get("workflow_template")); + } + throw new ValidationException("JobName.parse: formattedString not in valid format"); } public static List parseList(List formattedStrings) { @@ -100,7 +184,7 @@ public static List parseList(List formattedStrings } public static List toStringList(List values) { - List list = new ArrayList(values.size()); + List list = new ArrayList<>(values.size()); for (WorkflowTemplateName value : values) { if (value == null) { list.add(""); @@ -112,17 +196,28 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); + return PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.matches(formattedString) + || PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.matches(formattedString); } + @Override public Map getFieldValuesMap() { if (fieldValuesMap == null) { synchronized (this) { if (fieldValuesMap == null) { ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("region", region); - fieldMapBuilder.put("workflowTemplate", workflowTemplate); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (region != null) { + fieldMapBuilder.put("region", region); + } + if (workflowTemplate != null) { + fieldMapBuilder.put("workflow_template", workflowTemplate); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -136,17 +231,18 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PATH_TEMPLATE.instantiate( - "project", project, "region", region, "workflow_template", workflowTemplate); + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); } - /** Builder for WorkflowTemplateName. */ + /** Builder for projects/{project}/regions/{region}/workflowTemplates/{workflow_template}. */ public static class Builder { private String project; private String region; private String workflowTemplate; + protected Builder() {} + public String getProject() { return project; } @@ -174,9 +270,11 @@ public Builder setWorkflowTemplate(String workflowTemplate) { return this; } - private Builder() {} - private Builder(WorkflowTemplateName workflowTemplateName) { + Preconditions.checkArgument( + workflowTemplateName.pathTemplate == PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE, + "toBuilder is only supported when WorkflowTemplateName has the pattern of " + + "projects/{project}/regions/{region}/workflowTemplates/{workflow_template}."); project = workflowTemplateName.project; region = workflowTemplateName.region; workflowTemplate = workflowTemplateName.workflowTemplate; @@ -187,16 +285,59 @@ public WorkflowTemplateName build() { } } + /** Builder for projects/{project}/locations/{location}/workflowTemplates/{workflow_template}. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class ProjectLocationWorkflowTemplateBuilder { + + private String project; + private String location; + private String workflowTemplate; + + private ProjectLocationWorkflowTemplateBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getWorkflowTemplate() { + return workflowTemplate; + } + + public ProjectLocationWorkflowTemplateBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationWorkflowTemplateBuilder setLocation(String location) { + this.location = location; + return this; + } + + public ProjectLocationWorkflowTemplateBuilder setWorkflowTemplate(String workflowTemplate) { + this.workflowTemplate = workflowTemplate; + return this; + } + + public WorkflowTemplateName build() { + return new WorkflowTemplateName(this); + } + } + @Override public boolean equals(Object o) { if (o == this) { return true; } - if (o instanceof WorkflowTemplateName) { + if (o != null || getClass() == o.getClass()) { WorkflowTemplateName that = (WorkflowTemplateName) o; - return (this.project.equals(that.project)) - && (this.region.equals(that.region)) - && (this.workflowTemplate.equals(that.workflowTemplate)); + return (Objects.equals(this.project, that.project)) + && (Objects.equals(this.region, that.region)) + && (Objects.equals(this.workflowTemplate, that.workflowTemplate)) + && (Objects.equals(this.location, that.location)); } return false; } @@ -205,11 +346,15 @@ public boolean equals(Object o) { public int hashCode() { int h = 1; h *= 1000003; - h ^= project.hashCode(); + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(region); h *= 1000003; - h ^= region.hashCode(); + h ^= Objects.hashCode(workflowTemplate); h *= 1000003; - h ^= workflowTemplate.hashCode(); + h ^= Objects.hashCode(location); return h; } } diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatesProto.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatesProto.java index 0e987dc6..a993eec1 100644 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatesProto.java +++ b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatesProto.java @@ -265,76 +265,77 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ance_id\030\003 \001(\t\022\022\n\nrequest_id\030\004 \001(\t\"g\n\035Upd" + "ateWorkflowTemplateRequest\022F\n\010template\030\001" + " \001(\0132/.google.cloud.dataproc.v1beta2.Wor" - + "kflowTemplateB\003\340A\002\"Z\n\034ListWorkflowTempla" - + "tesRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\021\n\tpage_" - + "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\206\001\n\035ListW" - + "orkflowTemplatesResponse\022G\n\ttemplates\030\001 " - + "\003(\0132/.google.cloud.dataproc.v1beta2.Work" - + "flowTemplateB\003\340A\003\022\034\n\017next_page_token\030\002 \001" - + "(\tB\003\340A\003\"p\n\035DeleteWorkflowTemplateRequest" - + "\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(dataproc.googlea" - + "pis.com/WorkflowTemplate\022\017\n\007version\030\002 \001(" - + "\0052\351\021\n\027WorkflowTemplateService\022\260\002\n\026Create" - + "WorkflowTemplate\022<.google.cloud.dataproc" - + ".v1beta2.CreateWorkflowTemplateRequest\032/" - + ".google.cloud.dataproc.v1beta2.WorkflowT" - + "emplate\"\246\001\202\323\344\223\002\214\001\"8/v1beta2/{parent=proj" - + "ects/*/regions/*}/workflowTemplates:\010tem" - + "plateZF\":/v1beta2/{parent=projects/*/loc" - + "ations/*}/workflowTemplates:\010template\332A\020" - + "parent, template\022\211\002\n\023GetWorkflowTemplate" - + "\0229.google.cloud.dataproc.v1beta2.GetWork" - + "flowTemplateRequest\032/.google.cloud.datap" - + "roc.v1beta2.WorkflowTemplate\"\205\001\202\323\344\223\002x\0228/" - + "v1beta2/{name=projects/*/regions/*/workf" - + "lowTemplates/*}Z<\022:/v1beta2/{name=projec" - + "ts/*/locations/*/workflowTemplates/*}\332A\004" - + "name\022\345\002\n\033InstantiateWorkflowTemplate\022A.g" - + "oogle.cloud.dataproc.v1beta2.Instantiate" - + "WorkflowTemplateRequest\032\035.google.longrun" - + "ning.Operation\"\343\001\202\323\344\223\002\226\001\"D/v1beta2/{name" - + "=projects/*/regions/*/workflowTemplates/" - + "*}:instantiate:\001*ZK\"F/v1beta2/{name=proj" - + "ects/*/locations/*/workflowTemplates/*}:" - + "instantiate:\001*\332A\004name\332A\020name, parameters" - + "\312A)\n\025google.protobuf.Empty\022\020WorkflowMeta" - + "data\022\204\003\n!InstantiateInlineWorkflowTempla" - + "te\022G.google.cloud.dataproc.v1beta2.Insta" - + "ntiateInlineWorkflowTemplateRequest\032\035.go" - + "ogle.longrunning.Operation\"\366\001\202\323\344\223\002\260\001\"L/v" - + "1beta2/{parent=projects/*/locations/*}/w" - + "orkflowTemplates:instantiateInline:\010temp" - + "lateZV\"J/v1beta2/{parent=projects/*/regi" - + "ons/*}/workflowTemplates:instantiateInli" - + "ne:\010template\332A\020parent, template\312A)\n\025goog" - + "le.protobuf.Empty\022\020WorkflowMetadata\022\272\002\n\026" - + "UpdateWorkflowTemplate\022<.google.cloud.da" - + "taproc.v1beta2.UpdateWorkflowTemplateReq" + + "kflowTemplateB\003\340A\002\"\207\001\n\034ListWorkflowTempl" + + "atesRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(dat" + + "aproc.googleapis.com/WorkflowTemplate\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\206\001\n" + + "\035ListWorkflowTemplatesResponse\022G\n\ttempla" + + "tes\030\001 \003(\0132/.google.cloud.dataproc.v1beta" + + "2.WorkflowTemplateB\003\340A\003\022\034\n\017next_page_tok" + + "en\030\002 \001(\tB\003\340A\003\"p\n\035DeleteWorkflowTemplateR" + + "equest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(dataproc.g" + + "oogleapis.com/WorkflowTemplate\022\017\n\007versio" + + "n\030\002 \001(\0052\351\021\n\027WorkflowTemplateService\022\260\002\n\026" + + "CreateWorkflowTemplate\022<.google.cloud.da" + + "taproc.v1beta2.CreateWorkflowTemplateReq" + "uest\032/.google.cloud.dataproc.v1beta2.Wor" - + "kflowTemplate\"\260\001\202\323\344\223\002\236\001\032A/v1beta2/{templ" - + "ate.name=projects/*/regions/*/workflowTe" - + "mplates/*}:\010templateZO\032C/v1beta2/{templa" - + "te.name=projects/*/locations/*/workflowT" - + "emplates/*}:\010template\332A\010template\022\234\002\n\025Lis" - + "tWorkflowTemplates\022;.google.cloud.datapr" - + "oc.v1beta2.ListWorkflowTemplatesRequest\032" - + "<.google.cloud.dataproc.v1beta2.ListWork" - + "flowTemplatesResponse\"\207\001\202\323\344\223\002x\0228/v1beta2" - + "/{parent=projects/*/regions/*}/workflowT" - + "emplatesZ<\022:/v1beta2/{parent=projects/*/" - + "locations/*}/workflowTemplates\332A\006parent\022" - + "\366\001\n\026DeleteWorkflowTemplate\022<.google.clou" - + "d.dataproc.v1beta2.DeleteWorkflowTemplat" - + "eRequest\032\026.google.protobuf.Empty\"\205\001\202\323\344\223\002" - + "x*8/v1beta2/{name=projects/*/regions/*/w" - + "orkflowTemplates/*}Z<*:/v1beta2/{name=pr" - + "ojects/*/locations/*/workflowTemplates/*" - + "}\332A\004name\032K\312A\027dataproc.googleapis.com\322A.h" - + "ttps://www.googleapis.com/auth/cloud-pla" - + "tformB\204\001\n!com.google.cloud.dataproc.v1be" - + "ta2B\026WorkflowTemplatesProtoP\001ZEgoogle.go" - + "lang.org/genproto/googleapis/cloud/datap" - + "roc/v1beta2;dataprocb\006proto3" + + "kflowTemplate\"\246\001\202\323\344\223\002\214\001\"8/v1beta2/{paren" + + "t=projects/*/regions/*}/workflowTemplate" + + "s:\010templateZF\":/v1beta2/{parent=projects" + + "/*/locations/*}/workflowTemplates:\010templ" + + "ate\332A\020parent, template\022\211\002\n\023GetWorkflowTe" + + "mplate\0229.google.cloud.dataproc.v1beta2.G" + + "etWorkflowTemplateRequest\032/.google.cloud" + + ".dataproc.v1beta2.WorkflowTemplate\"\205\001\202\323\344" + + "\223\002x\0228/v1beta2/{name=projects/*/regions/*" + + "/workflowTemplates/*}Z<\022:/v1beta2/{name=" + + "projects/*/locations/*/workflowTemplates" + + "/*}\332A\004name\022\345\002\n\033InstantiateWorkflowTempla" + + "te\022A.google.cloud.dataproc.v1beta2.Insta" + + "ntiateWorkflowTemplateRequest\032\035.google.l" + + "ongrunning.Operation\"\343\001\202\323\344\223\002\226\001\"D/v1beta2" + + "/{name=projects/*/regions/*/workflowTemp" + + "lates/*}:instantiate:\001*ZK\"F/v1beta2/{nam" + + "e=projects/*/locations/*/workflowTemplat" + + "es/*}:instantiate:\001*\332A\004name\332A\020name, para" + + "meters\312A)\n\025google.protobuf.Empty\022\020Workfl" + + "owMetadata\022\204\003\n!InstantiateInlineWorkflow" + + "Template\022G.google.cloud.dataproc.v1beta2" + + ".InstantiateInlineWorkflowTemplateReques" + + "t\032\035.google.longrunning.Operation\"\366\001\202\323\344\223\002" + + "\260\001\"L/v1beta2/{parent=projects/*/location" + + "s/*}/workflowTemplates:instantiateInline" + + ":\010templateZV\"J/v1beta2/{parent=projects/" + + "*/regions/*}/workflowTemplates:instantia" + + "teInline:\010template\332A\020parent, template\312A)" + + "\n\025google.protobuf.Empty\022\020WorkflowMetadat" + + "a\022\272\002\n\026UpdateWorkflowTemplate\022<.google.cl" + + "oud.dataproc.v1beta2.UpdateWorkflowTempl" + + "ateRequest\032/.google.cloud.dataproc.v1bet" + + "a2.WorkflowTemplate\"\260\001\202\323\344\223\002\236\001\032A/v1beta2/" + + "{template.name=projects/*/regions/*/work" + + "flowTemplates/*}:\010templateZO\032C/v1beta2/{" + + "template.name=projects/*/locations/*/wor" + + "kflowTemplates/*}:\010template\332A\010template\022\234" + + "\002\n\025ListWorkflowTemplates\022;.google.cloud." + + "dataproc.v1beta2.ListWorkflowTemplatesRe" + + "quest\032<.google.cloud.dataproc.v1beta2.Li" + + "stWorkflowTemplatesResponse\"\207\001\202\323\344\223\002x\0228/v" + + "1beta2/{parent=projects/*/regions/*}/wor" + + "kflowTemplatesZ<\022:/v1beta2/{parent=proje" + + "cts/*/locations/*}/workflowTemplates\332A\006p" + + "arent\022\366\001\n\026DeleteWorkflowTemplate\022<.googl" + + "e.cloud.dataproc.v1beta2.DeleteWorkflowT" + + "emplateRequest\032\026.google.protobuf.Empty\"\205" + + "\001\202\323\344\223\002x*8/v1beta2/{name=projects/*/regio" + + "ns/*/workflowTemplates/*}Z<*:/v1beta2/{n" + + "ame=projects/*/locations/*/workflowTempl" + + "ates/*}\332A\004name\032K\312A\027dataproc.googleapis.c" + + "om\322A.https://www.googleapis.com/auth/clo" + + "ud-platformB\204\001\n!com.google.cloud.datapro" + + "c.v1beta2B\026WorkflowTemplatesProtoP\001ZEgoo" + + "gle.golang.org/genproto/googleapis/cloud" + + "/dataproc/v1beta2;dataprocb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/autoscaling_policies.proto b/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/autoscaling_policies.proto index e5d16fd9..a5a7d56e 100644 --- a/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/autoscaling_policies.proto +++ b/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/autoscaling_policies.proto @@ -27,15 +27,21 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1beta option java_multiple_files = true; option java_outer_classname = "AutoscalingPoliciesProto"; option java_package = "com.google.cloud.dataproc.v1beta2"; +option (google.api.resource_definition) = { + type: "dataproc.googleapis.com/Region" + pattern: "projects/{project}/regions/{region}" +}; // The API interface for managing autoscaling policies in the // Cloud Dataproc API. service AutoscalingPolicyService { option (google.api.default_host) = "dataproc.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Creates new autoscaling policy. - rpc CreateAutoscalingPolicy(CreateAutoscalingPolicyRequest) returns (AutoscalingPolicy) { + rpc CreateAutoscalingPolicy(CreateAutoscalingPolicyRequest) + returns (AutoscalingPolicy) { option (google.api.http) = { post: "/v1beta2/{parent=projects/*/locations/*}/autoscalingPolicies" body: "policy" @@ -51,7 +57,8 @@ service AutoscalingPolicyService { // // Disabled check for update_mask, because all updates will be full // replacements. - rpc UpdateAutoscalingPolicy(UpdateAutoscalingPolicyRequest) returns (AutoscalingPolicy) { + rpc UpdateAutoscalingPolicy(UpdateAutoscalingPolicyRequest) + returns (AutoscalingPolicy) { option (google.api.http) = { put: "/v1beta2/{policy.name=projects/*/locations/*/autoscalingPolicies/*}" body: "policy" @@ -64,7 +71,8 @@ service AutoscalingPolicyService { } // Retrieves autoscaling policy. - rpc GetAutoscalingPolicy(GetAutoscalingPolicyRequest) returns (AutoscalingPolicy) { + rpc GetAutoscalingPolicy(GetAutoscalingPolicyRequest) + returns (AutoscalingPolicy) { option (google.api.http) = { get: "/v1beta2/{name=projects/*/locations/*/autoscalingPolicies/*}" additional_bindings { @@ -75,7 +83,8 @@ service AutoscalingPolicyService { } // Lists autoscaling policies in the project. - rpc ListAutoscalingPolicies(ListAutoscalingPoliciesRequest) returns (ListAutoscalingPoliciesResponse) { + rpc ListAutoscalingPolicies(ListAutoscalingPoliciesRequest) + returns (ListAutoscalingPoliciesResponse) { option (google.api.http) = { get: "/v1beta2/{parent=projects/*/locations/*}/autoscalingPolicies" additional_bindings { @@ -87,7 +96,8 @@ service AutoscalingPolicyService { // Deletes an autoscaling policy. It is an error to delete an autoscaling // policy that is in use by one or more clusters. - rpc DeleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest) returns (google.protobuf.Empty) { + rpc DeleteAutoscalingPolicy(DeleteAutoscalingPolicyRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta2/{name=projects/*/locations/*/autoscalingPolicies/*}" additional_bindings { @@ -102,8 +112,8 @@ service AutoscalingPolicyService { message AutoscalingPolicy { option (google.api.resource) = { type: "dataproc.googleapis.com/AutoscalingPolicy" - pattern: "projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy}" pattern: "projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}" + pattern: "projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy}" history: ORIGINALLY_SINGLE_PATTERN }; @@ -132,22 +142,26 @@ message AutoscalingPolicy { } // Required. Describes how the autoscaler will operate for primary workers. - InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(google.api.field_behavior) = REQUIRED]; + InstanceGroupAutoscalingPolicyConfig worker_config = 4 + [(google.api.field_behavior) = REQUIRED]; // Optional. Describes how the autoscaler will operate for secondary workers. - InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(google.api.field_behavior) = OPTIONAL]; + InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 + [(google.api.field_behavior) = OPTIONAL]; } // Basic algorithm for autoscaling. message BasicAutoscalingAlgorithm { // Required. YARN autoscaling configuration. - BasicYarnAutoscalingConfig yarn_config = 1 [(google.api.field_behavior) = REQUIRED]; + BasicYarnAutoscalingConfig yarn_config = 1 + [(google.api.field_behavior) = REQUIRED]; // Optional. Duration between scaling events. A scaling period starts after // the update operation from the previous event has completed. // // Bounds: [2m, 1d]. Default: 2m. - google.protobuf.Duration cooldown_period = 2 [(google.api.field_behavior) = OPTIONAL]; + google.protobuf.Duration cooldown_period = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Basic autoscaling configurations for YARN. @@ -158,7 +172,8 @@ message BasicYarnAutoscalingConfig { // downscaling operations. // // Bounds: [0s, 1d]. - google.protobuf.Duration graceful_decommission_timeout = 5 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Duration graceful_decommission_timeout = 5 + [(google.api.field_behavior) = REQUIRED]; // Required. Fraction of average pending memory in the last cooldown period // for which to add workers. A scale-up factor of 1.0 will result in scaling @@ -185,7 +200,8 @@ message BasicYarnAutoscalingConfig { // on any recommended change. // // Bounds: [0.0, 1.0]. Default: 0.0. - double scale_up_min_worker_fraction = 3 [(google.api.field_behavior) = OPTIONAL]; + double scale_up_min_worker_fraction = 3 + [(google.api.field_behavior) = OPTIONAL]; // Optional. Minimum scale-down threshold as a fraction of total cluster size // before scaling occurs. For example, in a 20-worker cluster, a threshold of @@ -194,7 +210,8 @@ message BasicYarnAutoscalingConfig { // on any recommended change. // // Bounds: [0.0, 1.0]. Default: 0.0. - double scale_down_min_worker_fraction = 4 [(google.api.field_behavior) = OPTIONAL]; + double scale_down_min_worker_fraction = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Configuration for the size bounds of an instance group, including its @@ -281,12 +298,7 @@ message GetAutoscalingPolicyRequest { // A request to update an autoscaling policy. message UpdateAutoscalingPolicyRequest { // Required. The updated autoscaling policy. - AutoscalingPolicy policy = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "dataproc.googleapis.com/AutoscalingPolicy" - } - ]; + AutoscalingPolicy policy = 1 [(google.api.field_behavior) = REQUIRED]; } // A request to delete an autoscaling policy. @@ -342,7 +354,8 @@ message ListAutoscalingPoliciesRequest { // A response to a request to list autoscaling policies in a project. message ListAutoscalingPoliciesResponse { // Output only. Autoscaling policies list. - repeated AutoscalingPolicy policies = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated AutoscalingPolicy policies = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. This token is included in the response if there are more // results to fetch. diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/workflow_templates.proto b/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/workflow_templates.proto index b8497e83..a46282d9 100644 --- a/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/workflow_templates.proto +++ b/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/workflow_templates.proto @@ -35,10 +35,12 @@ option java_package = "com.google.cloud.dataproc.v1beta2"; // Dataproc API. service WorkflowTemplateService { option (google.api.default_host) = "dataproc.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Creates new workflow template. - rpc CreateWorkflowTemplate(CreateWorkflowTemplateRequest) returns (WorkflowTemplate) { + rpc CreateWorkflowTemplate(CreateWorkflowTemplateRequest) + returns (WorkflowTemplate) { option (google.api.http) = { post: "/v1beta2/{parent=projects/*/regions/*}/workflowTemplates" body: "template" @@ -54,7 +56,8 @@ service WorkflowTemplateService { // // Can retrieve previously instantiated template by specifying optional // version parameter. - rpc GetWorkflowTemplate(GetWorkflowTemplateRequest) returns (WorkflowTemplate) { + rpc GetWorkflowTemplate(GetWorkflowTemplateRequest) + returns (WorkflowTemplate) { option (google.api.http) = { get: "/v1beta2/{name=projects/*/regions/*/workflowTemplates/*}" additional_bindings { @@ -84,7 +87,8 @@ service WorkflowTemplateService { // On successful completion, // [Operation.response][google.longrunning.Operation.response] will be // [Empty][google.protobuf.Empty]. - rpc InstantiateWorkflowTemplate(InstantiateWorkflowTemplateRequest) returns (google.longrunning.Operation) { + rpc InstantiateWorkflowTemplate(InstantiateWorkflowTemplateRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta2/{name=projects/*/regions/*/workflowTemplates/*}:instantiate" body: "*" @@ -104,7 +108,8 @@ service WorkflowTemplateService { // Instantiates a template and begins execution. // // This method is equivalent to executing the sequence - // [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate], + // [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], + // [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate], // [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.DeleteWorkflowTemplate]. // // The returned Operation can be used to track execution of @@ -125,7 +130,9 @@ service WorkflowTemplateService { // On successful completion, // [Operation.response][google.longrunning.Operation.response] will be // [Empty][google.protobuf.Empty]. - rpc InstantiateInlineWorkflowTemplate(InstantiateInlineWorkflowTemplateRequest) returns (google.longrunning.Operation) { + rpc InstantiateInlineWorkflowTemplate( + InstantiateInlineWorkflowTemplateRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1beta2/{parent=projects/*/locations/*}/workflowTemplates:instantiateInline" body: "template" @@ -143,7 +150,8 @@ service WorkflowTemplateService { // Updates (replaces) workflow template. The updated template // must contain version that matches the current server version. - rpc UpdateWorkflowTemplate(UpdateWorkflowTemplateRequest) returns (WorkflowTemplate) { + rpc UpdateWorkflowTemplate(UpdateWorkflowTemplateRequest) + returns (WorkflowTemplate) { option (google.api.http) = { put: "/v1beta2/{template.name=projects/*/regions/*/workflowTemplates/*}" body: "template" @@ -156,7 +164,8 @@ service WorkflowTemplateService { } // Lists workflows that match the specified filter in the request. - rpc ListWorkflowTemplates(ListWorkflowTemplatesRequest) returns (ListWorkflowTemplatesResponse) { + rpc ListWorkflowTemplates(ListWorkflowTemplatesRequest) + returns (ListWorkflowTemplatesResponse) { option (google.api.http) = { get: "/v1beta2/{parent=projects/*/regions/*}/workflowTemplates" additional_bindings { @@ -167,7 +176,8 @@ service WorkflowTemplateService { } // Deletes a workflow template. It does not cancel in-progress workflows. - rpc DeleteWorkflowTemplate(DeleteWorkflowTemplateRequest) returns (google.protobuf.Empty) { + rpc DeleteWorkflowTemplate(DeleteWorkflowTemplateRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta2/{name=projects/*/regions/*/workflowTemplates/*}" additional_bindings { @@ -220,10 +230,12 @@ message WorkflowTemplate { int32 version = 3 [(google.api.field_behavior) = OPTIONAL]; // Output only. The time template was created. - google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time template was last updated. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. The labels to associate with this template. These labels // will be propagated to all jobs and clusters created by the workflow @@ -248,7 +260,8 @@ message WorkflowTemplate { // Optional. Template parameters whose values are substituted into the // template. Values for parameters must be provided when the template is // instantiated. - repeated TemplateParameter parameters = 9 [(google.api.field_behavior) = OPTIONAL]; + repeated TemplateParameter parameters = 9 + [(google.api.field_behavior) = OPTIONAL]; } // Specifies workflow execution target. @@ -316,8 +329,8 @@ message OrderedJob { // // The step id is used as prefix for job id, as job // `goog-dataproc-workflow-step-id` label, and in - // [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] field from other - // steps. + // [prerequisiteStepIds][google.cloud.dataproc.v1beta2.OrderedJob.prerequisite_step_ids] + // field from other steps. // // The id must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and hyphens (-). Cannot begin or end with underscore @@ -382,10 +395,10 @@ message TemplateParameter { // A field is allowed to appear in at most one parameter's list of field // paths. // - // A field path is similar in syntax to a [google.protobuf.FieldMask][google.protobuf.FieldMask]. - // For example, a field path that references the zone field of a workflow - // template's cluster selector would be specified as - // `placement.clusterSelector.zone`. + // A field path is similar in syntax to a + // [google.protobuf.FieldMask][google.protobuf.FieldMask]. For example, a + // field path that references the zone field of a workflow template's cluster + // selector would be specified as `placement.clusterSelector.zone`. // // Also, field paths can reference fields using the following syntax: // @@ -492,13 +505,15 @@ message WorkflowMetadata { int32 version = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The create cluster operation metadata. - ClusterOperation create_cluster = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + ClusterOperation create_cluster = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The workflow graph. WorkflowGraph graph = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The delete cluster operation metadata. - ClusterOperation delete_cluster = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + ClusterOperation delete_cluster = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The workflow state. State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -510,10 +525,12 @@ message WorkflowMetadata { map parameters = 8; // Output only. Workflow start time. - google.protobuf.Timestamp start_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp start_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Workflow end time. - google.protobuf.Timestamp end_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The UUID of target cluster. string cluster_uuid = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -565,7 +582,8 @@ message WorkflowNode { string step_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Node's prerequisite nodes. - repeated string prerequisite_step_ids = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated string prerequisite_step_ids = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The job id; populated after the node enters RUNNING state. string job_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -729,7 +747,12 @@ message ListWorkflowTemplatesRequest { // * For `projects.locations.workflowTemplates.list`, the // resource name of the location has the following format: // `projects/{project_id}/locations/{location}` - string parent = 1 [(google.api.field_behavior) = REQUIRED]; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dataproc.googleapis.com/WorkflowTemplate" + } + ]; // Optional. The maximum number of results to return in each response. int32 page_size = 2; @@ -742,7 +765,8 @@ message ListWorkflowTemplatesRequest { // A response to a request to list workflow templates in a project. message ListWorkflowTemplatesResponse { // Output only. WorkflowTemplates list. - repeated WorkflowTemplate templates = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated WorkflowTemplate templates = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. This token is included in the response if there are more // results to fetch. To fetch additional results, provide this value as the diff --git a/synth.metadata b/synth.metadata index c21f3f1d..81470b9c 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,27 +1,12 @@ { - "updateTime": "2020-03-26T08:50:55.182033Z", + "updateTime": "2020-03-30T22:39:21.937486Z", "sources": [ - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "fd83ab212176a1042e8d45ea90766b3bf59ac679", - "internalRef": "302913609" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "fd83ab212176a1042e8d45ea90766b3bf59ac679", - "internalRef": "302913609" - } - }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e36822bfa0acb355502dab391b8ef9c4f30208d8" + "sha": "a003d8655d3ebec2bbbd5fc3898e91e152265c67", + "log": "a003d8655d3ebec2bbbd5fc3898e91e152265c67\ndocs: remove \"install stable\" instructions (#461)\n\nThe package hasn't been released to PyPI in some time\nf5e8c88d9870d8aa4eb43fa0b39f07e02bfbe4df\nchore(python): add license headers to config files; make small tweaks to templates (#458)\n\n\n" } } ],