Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AddressesClient addressesClient = AddressesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * RegionSetLabelsRequest regionSetLabelsRequestResource =
+ * RegionSetLabelsRequest.newBuilder().build();
+ * Operation response =
+ * addressesClient
+ * .setLabelsAsync(project, region, resource, regionSetLabelsRequestResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param regionSetLabelsRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AddressesClient addressesClient = AddressesClient.create()) {
+ * SetLabelsAddressRequest request =
+ * SetLabelsAddressRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * Operation response = addressesClient.setLabelsAsync(request).get();
+ * }
+ * }
+ *
+ * @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
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AddressesClient addressesClient = AddressesClient.create()) {
+ * SetLabelsAddressRequest request =
+ * SetLabelsAddressRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * OperationFuture future =
+ * addressesClient.setLabelsOperationCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AddressesClient addressesClient = AddressesClient.create()) {
+ * SetLabelsAddressRequest request =
+ * SetLabelsAddressRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture future = addressesClient.setLabelsCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
+ * String project = "project-309310695";
+ * String resource = "resource-341064690";
+ * Policy response = backendServicesClient.getIamPolicy(project, resource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param resource Name or id of the resource for this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(String project, String resource) {
+ GetIamPolicyBackendServiceRequest request =
+ GetIamPolicyBackendServiceRequest.newBuilder()
+ .setProject(project)
+ .setResource(resource)
+ .build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
+ * exists.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
+ * GetIamPolicyBackendServiceRequest request =
+ * GetIamPolicyBackendServiceRequest.newBuilder()
+ * .setOptionsRequestedPolicyVersion(-574521795)
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .build();
+ * Policy response = backendServicesClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyBackendServiceRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
+ * exists.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
+ * GetIamPolicyBackendServiceRequest request =
+ * GetIamPolicyBackendServiceRequest.newBuilder()
+ * .setOptionsRequestedPolicyVersion(-574521795)
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture future = backendServicesClient.getIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
+ * String project = "project-309310695";
+ * String resource = "resource-341064690";
+ * GlobalSetPolicyRequest globalSetPolicyRequestResource =
+ * GlobalSetPolicyRequest.newBuilder().build();
+ * Policy response =
+ * backendServicesClient.setIamPolicy(project, resource, globalSetPolicyRequestResource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param globalSetPolicyRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(
+ String project, String resource, GlobalSetPolicyRequest globalSetPolicyRequestResource) {
+ SetIamPolicyBackendServiceRequest request =
+ SetIamPolicyBackendServiceRequest.newBuilder()
+ .setProject(project)
+ .setResource(resource)
+ .setGlobalSetPolicyRequestResource(globalSetPolicyRequestResource)
+ .build();
+ return setIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
+ * SetIamPolicyBackendServiceRequest request =
+ * SetIamPolicyBackendServiceRequest.newBuilder()
+ * .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .build();
+ * Policy response = backendServicesClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyBackendServiceRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
+ * SetIamPolicyBackendServiceRequest request =
+ * SetIamPolicyBackendServiceRequest.newBuilder()
+ * .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture future = backendServicesClient.setIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) {
+ * String project = "project-309310695";
+ * String resource = "resource-341064690";
+ * GlobalSetLabelsRequest globalSetLabelsRequestResource =
+ * GlobalSetLabelsRequest.newBuilder().build();
+ * Operation response =
+ * globalAddressesClient
+ * .setLabelsAsync(project, resource, globalSetLabelsRequestResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param globalSetLabelsRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) {
+ * SetLabelsGlobalAddressRequest request =
+ * SetLabelsGlobalAddressRequest.newBuilder()
+ * .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .build();
+ * Operation response = globalAddressesClient.setLabelsAsync(request).get();
+ * }
+ * }
+ *
+ * @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
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) {
+ * SetLabelsGlobalAddressRequest request =
+ * SetLabelsGlobalAddressRequest.newBuilder()
+ * .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .build();
+ * OperationFuture future =
+ * globalAddressesClient.setLabelsOperationCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (GlobalAddressesClient globalAddressesClient = GlobalAddressesClient.create()) {
+ * SetLabelsGlobalAddressRequest request =
+ * SetLabelsGlobalAddressRequest.newBuilder()
+ * .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture future = globalAddressesClient.setLabelsCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InterconnectAttachmentsClient interconnectAttachmentsClient =
+ * InterconnectAttachmentsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * RegionSetLabelsRequest regionSetLabelsRequestResource =
+ * RegionSetLabelsRequest.newBuilder().build();
+ * Operation response =
+ * interconnectAttachmentsClient
+ * .setLabelsAsync(project, region, resource, regionSetLabelsRequestResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param regionSetLabelsRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InterconnectAttachmentsClient interconnectAttachmentsClient =
+ * InterconnectAttachmentsClient.create()) {
+ * SetLabelsInterconnectAttachmentRequest request =
+ * SetLabelsInterconnectAttachmentRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * Operation response = interconnectAttachmentsClient.setLabelsAsync(request).get();
+ * }
+ * }
+ *
+ * @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
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InterconnectAttachmentsClient interconnectAttachmentsClient =
+ * InterconnectAttachmentsClient.create()) {
+ * SetLabelsInterconnectAttachmentRequest request =
+ * SetLabelsInterconnectAttachmentRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * OperationFuture future =
+ * interconnectAttachmentsClient.setLabelsOperationCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InterconnectAttachmentsClient interconnectAttachmentsClient =
+ * InterconnectAttachmentsClient.create()) {
+ * SetLabelsInterconnectAttachmentRequest request =
+ * SetLabelsInterconnectAttachmentRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture future =
+ * interconnectAttachmentsClient.setLabelsCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
+ * String project = "project-309310695";
+ * String resource = "resource-341064690";
+ * GlobalSetLabelsRequest globalSetLabelsRequestResource =
+ * GlobalSetLabelsRequest.newBuilder().build();
+ * Operation response =
+ * interconnectsClient
+ * .setLabelsAsync(project, resource, globalSetLabelsRequestResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param globalSetLabelsRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
+ * SetLabelsInterconnectRequest request =
+ * SetLabelsInterconnectRequest.newBuilder()
+ * .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .build();
+ * Operation response = interconnectsClient.setLabelsAsync(request).get();
+ * }
+ * }
+ *
+ * @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
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
+ * SetLabelsInterconnectRequest request =
+ * SetLabelsInterconnectRequest.newBuilder()
+ * .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .build();
+ * OperationFuture future =
+ * interconnectsClient.setLabelsOperationCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
+ * SetLabelsInterconnectRequest request =
+ * SetLabelsInterconnectRequest.newBuilder()
+ * .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture future = interconnectsClient.setLabelsCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendServicesClient regionBackendServicesClient =
+ * RegionBackendServicesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * Policy response = regionBackendServicesClient.getIamPolicy(project, region, resource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(String project, String region, String resource) {
+ GetIamPolicyRegionBackendServiceRequest request =
+ GetIamPolicyRegionBackendServiceRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setResource(resource)
+ .build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
+ * exists.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendServicesClient regionBackendServicesClient =
+ * RegionBackendServicesClient.create()) {
+ * GetIamPolicyRegionBackendServiceRequest request =
+ * GetIamPolicyRegionBackendServiceRequest.newBuilder()
+ * .setOptionsRequestedPolicyVersion(-574521795)
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResource("resource-341064690")
+ * .build();
+ * Policy response = regionBackendServicesClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRegionBackendServiceRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
+ * exists.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendServicesClient regionBackendServicesClient =
+ * RegionBackendServicesClient.create()) {
+ * GetIamPolicyRegionBackendServiceRequest request =
+ * GetIamPolicyRegionBackendServiceRequest.newBuilder()
+ * .setOptionsRequestedPolicyVersion(-574521795)
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture future =
+ * regionBackendServicesClient.getIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendServicesClient regionBackendServicesClient =
+ * RegionBackendServicesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * RegionSetPolicyRequest regionSetPolicyRequestResource =
+ * RegionSetPolicyRequest.newBuilder().build();
+ * Policy response =
+ * regionBackendServicesClient.setIamPolicy(
+ * project, region, resource, regionSetPolicyRequestResource);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The name of the region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param regionSetPolicyRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy setIamPolicy(
+ String project,
+ String region,
+ String resource,
+ RegionSetPolicyRequest regionSetPolicyRequestResource) {
+ SetIamPolicyRegionBackendServiceRequest request =
+ SetIamPolicyRegionBackendServiceRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setResource(resource)
+ .setRegionSetPolicyRequestResource(regionSetPolicyRequestResource)
+ .build();
+ return setIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendServicesClient regionBackendServicesClient =
+ * RegionBackendServicesClient.create()) {
+ * SetIamPolicyRegionBackendServiceRequest request =
+ * SetIamPolicyRegionBackendServiceRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build())
+ * .setResource("resource-341064690")
+ * .build();
+ * Policy response = regionBackendServicesClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRegionBackendServiceRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionBackendServicesClient regionBackendServicesClient =
+ * RegionBackendServicesClient.create()) {
+ * SetIamPolicyRegionBackendServiceRequest request =
+ * SetIamPolicyRegionBackendServiceRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build())
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture future =
+ * regionBackendServicesClient.setIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThis class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String sslPolicy = "sslPolicy618174046";
+ * SslPolicy response = regionSslPoliciesClient.get(project, region, sslPolicy);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the RegionSslPoliciesClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of RegionSslPoliciesSettings to + * create(). For example: + * + *
To customize credentials: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionSslPoliciesSettings regionSslPoliciesSettings =
+ * RegionSslPoliciesSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * RegionSslPoliciesClient regionSslPoliciesClient =
+ * RegionSslPoliciesClient.create(regionSslPoliciesSettings);
+ * }
+ *
+ * To customize the endpoint: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionSslPoliciesSettings regionSslPoliciesSettings =
+ * RegionSslPoliciesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * RegionSslPoliciesClient regionSslPoliciesClient =
+ * RegionSslPoliciesClient.create(regionSslPoliciesSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class RegionSslPoliciesClient implements BackgroundResource { + private final RegionSslPoliciesSettings settings; + private final RegionSslPoliciesStub stub; + + /** Constructs an instance of RegionSslPoliciesClient with default settings. */ + public static final RegionSslPoliciesClient create() throws IOException { + return create(RegionSslPoliciesSettings.newBuilder().build()); + } + + /** + * Constructs an instance of RegionSslPoliciesClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final RegionSslPoliciesClient create(RegionSslPoliciesSettings settings) + throws IOException { + return new RegionSslPoliciesClient(settings); + } + + /** + * Constructs an instance of RegionSslPoliciesClient, using the given stub for making calls. This + * is for advanced usage - prefer using create(RegionSslPoliciesSettings). + */ + public static final RegionSslPoliciesClient create(RegionSslPoliciesStub stub) { + return new RegionSslPoliciesClient(stub); + } + + /** + * Constructs an instance of RegionSslPoliciesClient, using the given settings. This is protected + * so that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected RegionSslPoliciesClient(RegionSslPoliciesSettings settings) throws IOException { + this.settings = settings; + this.stub = ((RegionSslPoliciesStubSettings) settings.getStubSettings()).createStub(); + } + + protected RegionSslPoliciesClient(RegionSslPoliciesStub stub) { + this.settings = null; + this.stub = stub; + } + + public final RegionSslPoliciesSettings getSettings() { + return settings; + } + + public RegionSslPoliciesStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in + * use by any TargetHttpsProxy or TargetSslProxy resources. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String sslPolicy = "sslPolicy618174046";
+ * Operation response = regionSslPoliciesClient.deleteAsync(project, region, sslPolicy).get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request.
+ * @param sslPolicy Name of the SSL policy to delete. The name must be 1-63 characters long, and
+ * comply with RFC1035.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * DeleteRegionSslPolicyRequest request =
+ * DeleteRegionSslPolicyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSslPolicy("sslPolicy618174046")
+ * .build();
+ * Operation response = regionSslPoliciesClient.deleteAsync(request).get();
+ * }
+ * }
+ *
+ * @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
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * DeleteRegionSslPolicyRequest request =
+ * DeleteRegionSslPolicyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSslPolicy("sslPolicy618174046")
+ * .build();
+ * OperationFuture future =
+ * regionSslPoliciesClient.deleteOperationCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * DeleteRegionSslPolicyRequest request =
+ * DeleteRegionSslPolicyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSslPolicy("sslPolicy618174046")
+ * .build();
+ * ApiFuture future = regionSslPoliciesClient.deleteCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String sslPolicy = "sslPolicy618174046";
+ * SslPolicy response = regionSslPoliciesClient.get(project, region, sslPolicy);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request.
+ * @param sslPolicy Name of the SSL policy to update. The name must be 1-63 characters long, and
+ * comply with RFC1035.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SslPolicy get(String project, String region, String sslPolicy) {
+ GetRegionSslPolicyRequest request =
+ GetRegionSslPolicyRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setSslPolicy(sslPolicy)
+ .build();
+ return get(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all of the ordered rules present in a single specified policy.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * GetRegionSslPolicyRequest request =
+ * GetRegionSslPolicyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setSslPolicy("sslPolicy618174046")
+ * .build();
+ * SslPolicy response = regionSslPoliciesClient.get(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 SslPolicy get(GetRegionSslPolicyRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all of the ordered rules present in a single specified policy.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * GetRegionSslPolicyRequest request =
+ * GetRegionSslPolicyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setSslPolicy("sslPolicy618174046")
+ * .build();
+ * ApiFuture future = regionSslPoliciesClient.getCallable().futureCall(request);
+ * // Do something.
+ * SslPolicy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * SslPolicy sslPolicyResource = SslPolicy.newBuilder().build();
+ * Operation response =
+ * regionSslPoliciesClient.insertAsync(project, region, sslPolicyResource).get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request.
+ * @param sslPolicyResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * InsertRegionSslPolicyRequest request =
+ * InsertRegionSslPolicyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSslPolicyResource(SslPolicy.newBuilder().build())
+ * .build();
+ * Operation response = regionSslPoliciesClient.insertAsync(request).get();
+ * }
+ * }
+ *
+ * @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
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * InsertRegionSslPolicyRequest request =
+ * InsertRegionSslPolicyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSslPolicyResource(SslPolicy.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * regionSslPoliciesClient.insertOperationCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * InsertRegionSslPolicyRequest request =
+ * InsertRegionSslPolicyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSslPolicyResource(SslPolicy.newBuilder().build())
+ * .build();
+ * ApiFuture future = regionSslPoliciesClient.insertCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * for (SslPolicy element : regionSslPoliciesClient.list(project, region).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPagedResponse list(String project, String region) {
+ ListRegionSslPoliciesRequest request =
+ ListRegionSslPoliciesRequest.newBuilder().setProject(project).setRegion(region).build();
+ return list(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the SSL policies that have been configured for the specified project and region.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * ListRegionSslPoliciesRequest request =
+ * ListRegionSslPoliciesRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * for (SslPolicy element : regionSslPoliciesClient.list(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @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 ListPagedResponse list(ListRegionSslPoliciesRequest request) {
+ return listPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all the SSL policies that have been configured for the specified project and region.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * ListRegionSslPoliciesRequest request =
+ * ListRegionSslPoliciesRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * ApiFuture future = regionSslPoliciesClient.listPagedCallable().futureCall(request);
+ * // Do something.
+ * for (SslPolicy element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * ListRegionSslPoliciesRequest request =
+ * ListRegionSslPoliciesRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * while (true) {
+ * SslPoliciesList response = regionSslPoliciesClient.listCallable().call(request);
+ * for (SslPolicy element : response.getItemsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * SslPoliciesListAvailableFeaturesResponse response =
+ * regionSslPoliciesClient.listAvailableFeatures(project, region);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SslPoliciesListAvailableFeaturesResponse listAvailableFeatures(
+ String project, String region) {
+ ListAvailableFeaturesRegionSslPoliciesRequest request =
+ ListAvailableFeaturesRegionSslPoliciesRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .build();
+ return listAvailableFeatures(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all features that can be specified in the SSL policy when using custom profile.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * ListAvailableFeaturesRegionSslPoliciesRequest request =
+ * ListAvailableFeaturesRegionSslPoliciesRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * SslPoliciesListAvailableFeaturesResponse response =
+ * regionSslPoliciesClient.listAvailableFeatures(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 SslPoliciesListAvailableFeaturesResponse listAvailableFeatures(
+ ListAvailableFeaturesRegionSslPoliciesRequest request) {
+ return listAvailableFeaturesCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all features that can be specified in the SSL policy when using custom profile.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * ListAvailableFeaturesRegionSslPoliciesRequest request =
+ * ListAvailableFeaturesRegionSslPoliciesRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * ApiFuture future =
+ * regionSslPoliciesClient.listAvailableFeaturesCallable().futureCall(request);
+ * // Do something.
+ * SslPoliciesListAvailableFeaturesResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable<
+ ListAvailableFeaturesRegionSslPoliciesRequest, SslPoliciesListAvailableFeaturesResponse>
+ listAvailableFeaturesCallable() {
+ return stub.listAvailableFeaturesCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Patches the specified SSL policy with the data included in the request.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String sslPolicy = "sslPolicy618174046";
+ * SslPolicy sslPolicyResource = SslPolicy.newBuilder().build();
+ * Operation response =
+ * regionSslPoliciesClient.patchAsync(project, region, sslPolicy, sslPolicyResource).get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request.
+ * @param sslPolicy Name of the SSL policy to update. The name must be 1-63 characters long, and
+ * comply with RFC1035.
+ * @param sslPolicyResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * PatchRegionSslPolicyRequest request =
+ * PatchRegionSslPolicyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSslPolicy("sslPolicy618174046")
+ * .setSslPolicyResource(SslPolicy.newBuilder().build())
+ * .build();
+ * Operation response = regionSslPoliciesClient.patchAsync(request).get();
+ * }
+ * }
+ *
+ * @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
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * PatchRegionSslPolicyRequest request =
+ * PatchRegionSslPolicyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSslPolicy("sslPolicy618174046")
+ * .setSslPolicyResource(SslPolicy.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * regionSslPoliciesClient.patchOperationCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * PatchRegionSslPolicyRequest request =
+ * PatchRegionSslPolicyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setSslPolicy("sslPolicy618174046")
+ * .setSslPolicyResource(SslPolicy.newBuilder().build())
+ * .build();
+ * ApiFuture future = regionSslPoliciesClient.patchCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
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 get to 30 seconds: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionSslPoliciesSettings.Builder regionSslPoliciesSettingsBuilder =
+ * RegionSslPoliciesSettings.newBuilder();
+ * regionSslPoliciesSettingsBuilder
+ * .getSettings()
+ * .setRetrySettings(
+ * regionSslPoliciesSettingsBuilder.getSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * RegionSslPoliciesSettings regionSslPoliciesSettings = regionSslPoliciesSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class RegionSslPoliciesSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
+ * calls that map to API methods. Sample code to get started:
+ *
+ * Note: close() needs to be called on the RegionTargetTcpProxiesClient object to clean up
+ * resources such as threads. In the example above, try-with-resources is used, which automatically
+ * calls close().
+ *
+ * The surface of this class includes several types of Java methods for each of the API's
+ * methods:
+ *
+ * See the individual methods for example code.
+ *
+ * Many parameters require resource names to be formatted in a particular way. To assist with
+ * these names, this class includes a format method for each type of name, and additionally a parse
+ * method to extract the individual identifiers contained within names that are returned.
+ *
+ * This class can be customized by passing in a custom instance of RegionTargetTcpProxiesSettings
+ * to create(). For example:
+ *
+ * To customize credentials:
+ *
+ * To customize the endpoint:
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets.
+ */
+@Generated("by gapic-generator-java")
+public class RegionTargetTcpProxiesClient implements BackgroundResource {
+ private final RegionTargetTcpProxiesSettings settings;
+ private final RegionTargetTcpProxiesStub stub;
+
+ /** Constructs an instance of RegionTargetTcpProxiesClient with default settings. */
+ public static final RegionTargetTcpProxiesClient create() throws IOException {
+ return create(RegionTargetTcpProxiesSettings.newBuilder().build());
+ }
+
+ /**
+ * Constructs an instance of RegionTargetTcpProxiesClient, using the given settings. The channels
+ * are created based on the settings passed in, or defaults for any settings that are not set.
+ */
+ public static final RegionTargetTcpProxiesClient create(RegionTargetTcpProxiesSettings settings)
+ throws IOException {
+ return new RegionTargetTcpProxiesClient(settings);
+ }
+
+ /**
+ * Constructs an instance of RegionTargetTcpProxiesClient, using the given stub for making calls.
+ * This is for advanced usage - prefer using create(RegionTargetTcpProxiesSettings).
+ */
+ public static final RegionTargetTcpProxiesClient create(RegionTargetTcpProxiesStub stub) {
+ return new RegionTargetTcpProxiesClient(stub);
+ }
+
+ /**
+ * Constructs an instance of RegionTargetTcpProxiesClient, using the given settings. This is
+ * protected so that it is easy to make a subclass, but otherwise, the static factory methods
+ * should be preferred.
+ */
+ protected RegionTargetTcpProxiesClient(RegionTargetTcpProxiesSettings settings)
+ throws IOException {
+ this.settings = settings;
+ this.stub = ((RegionTargetTcpProxiesStubSettings) settings.getStubSettings()).createStub();
+ }
+
+ protected RegionTargetTcpProxiesClient(RegionTargetTcpProxiesStub stub) {
+ this.settings = null;
+ this.stub = stub;
+ }
+
+ public final RegionTargetTcpProxiesSettings getSettings() {
+ return settings;
+ }
+
+ public RegionTargetTcpProxiesStub getStub() {
+ return stub;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes the specified TargetTcpProxy resource.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * 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 get to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * ======================= RegionSslPoliciesClient =======================
+ *
+ * Service Description: The RegionSslPolicies API.
+ *
+ * Sample for RegionSslPoliciesClient:
+ *
+ * ======================= RegionTargetHttpProxiesClient =======================
*
* Service Description: The RegionTargetHttpProxies API.
@@ -1238,6 +1258,27 @@
* }
* }
*
+ * ======================= RegionTargetTcpProxiesClient =======================
+ *
+ * Service Description: The RegionTargetTcpProxies API.
+ *
+ * Sample for RegionTargetTcpProxiesClient:
+ *
+ * ======================= RegionUrlMapsClient =======================
*
* Service Description: The RegionUrlMaps API.
diff --git a/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AddressesStub.java b/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AddressesStub.java
index 7d0673ff9..e3ff8f65c 100644
--- a/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AddressesStub.java
+++ b/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/stub/AddressesStub.java
@@ -31,6 +31,7 @@
import com.google.cloud.compute.v1.InsertAddressRequest;
import com.google.cloud.compute.v1.ListAddressesRequest;
import com.google.cloud.compute.v1.Operation;
+import com.google.cloud.compute.v1.SetLabelsAddressRequest;
import javax.annotation.Generated;
// AUTO-GENERATED DOCUMENTATION AND CLASS.
@@ -80,6 +81,15 @@ public UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String targetTcpProxy = "targetTcpProxy-337144898";
+ * TargetTcpProxy response = regionTargetTcpProxiesClient.get(project, region, targetTcpProxy);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionTargetTcpProxiesSettings regionTargetTcpProxiesSettings =
+ * RegionTargetTcpProxiesSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create(regionTargetTcpProxiesSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionTargetTcpProxiesSettings regionTargetTcpProxiesSettings =
+ * RegionTargetTcpProxiesSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create(regionTargetTcpProxiesSettings);
+ * }
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String targetTcpProxy = "targetTcpProxy-337144898";
+ * Operation response =
+ * regionTargetTcpProxiesClient.deleteAsync(project, region, targetTcpProxy).get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request.
+ * @param targetTcpProxy Name of the TargetTcpProxy resource to delete.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * DeleteRegionTargetTcpProxyRequest request =
+ * DeleteRegionTargetTcpProxyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setTargetTcpProxy("targetTcpProxy-337144898")
+ * .build();
+ * Operation response = regionTargetTcpProxiesClient.deleteAsync(request).get();
+ * }
+ * }
+ *
+ * @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
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * DeleteRegionTargetTcpProxyRequest request =
+ * DeleteRegionTargetTcpProxyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setTargetTcpProxy("targetTcpProxy-337144898")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * DeleteRegionTargetTcpProxyRequest request =
+ * DeleteRegionTargetTcpProxyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setTargetTcpProxy("targetTcpProxy-337144898")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String targetTcpProxy = "targetTcpProxy-337144898";
+ * TargetTcpProxy response = regionTargetTcpProxiesClient.get(project, region, targetTcpProxy);
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request.
+ * @param targetTcpProxy Name of the TargetTcpProxy resource to return.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final TargetTcpProxy get(String project, String region, String targetTcpProxy) {
+ GetRegionTargetTcpProxyRequest request =
+ GetRegionTargetTcpProxyRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .setTargetTcpProxy(targetTcpProxy)
+ .build();
+ return get(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the specified TargetTcpProxy resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * GetRegionTargetTcpProxyRequest request =
+ * GetRegionTargetTcpProxyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setTargetTcpProxy("targetTcpProxy-337144898")
+ * .build();
+ * TargetTcpProxy response = regionTargetTcpProxiesClient.get(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 TargetTcpProxy get(GetRegionTargetTcpProxyRequest request) {
+ return getCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the specified TargetTcpProxy resource.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * GetRegionTargetTcpProxyRequest request =
+ * GetRegionTargetTcpProxyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setTargetTcpProxy("targetTcpProxy-337144898")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * TargetTcpProxy targetTcpProxyResource = TargetTcpProxy.newBuilder().build();
+ * Operation response =
+ * regionTargetTcpProxiesClient.insertAsync(project, region, targetTcpProxyResource).get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request.
+ * @param targetTcpProxyResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * InsertRegionTargetTcpProxyRequest request =
+ * InsertRegionTargetTcpProxyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setTargetTcpProxyResource(TargetTcpProxy.newBuilder().build())
+ * .build();
+ * Operation response = regionTargetTcpProxiesClient.insertAsync(request).get();
+ * }
+ * }
+ *
+ * @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
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * InsertRegionTargetTcpProxyRequest request =
+ * InsertRegionTargetTcpProxyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setTargetTcpProxyResource(TargetTcpProxy.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * InsertRegionTargetTcpProxyRequest request =
+ * InsertRegionTargetTcpProxyRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRequestId("requestId693933066")
+ * .setTargetTcpProxyResource(TargetTcpProxy.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * for (TargetTcpProxy element :
+ * regionTargetTcpProxiesClient.list(project, region).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region Name of the region scoping this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPagedResponse list(String project, String region) {
+ ListRegionTargetTcpProxiesRequest request =
+ ListRegionTargetTcpProxiesRequest.newBuilder()
+ .setProject(project)
+ .setRegion(region)
+ .build();
+ return list(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a list of TargetTcpProxy resources available to the specified project in a given
+ * region.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * ListRegionTargetTcpProxiesRequest request =
+ * ListRegionTargetTcpProxiesRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * for (TargetTcpProxy element : regionTargetTcpProxiesClient.list(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @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 ListPagedResponse list(ListRegionTargetTcpProxiesRequest request) {
+ return listPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a list of TargetTcpProxy resources available to the specified project in a given
+ * region.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * ListRegionTargetTcpProxiesRequest request =
+ * ListRegionTargetTcpProxiesRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * ListRegionTargetTcpProxiesRequest request =
+ * ListRegionTargetTcpProxiesRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * while (true) {
+ * TargetTcpProxyList response = regionTargetTcpProxiesClient.listCallable().call(request);
+ * for (TargetTcpProxy element : response.getItemsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RegionTargetTcpProxiesSettings.Builder regionTargetTcpProxiesSettingsBuilder =
+ * RegionTargetTcpProxiesSettings.newBuilder();
+ * regionTargetTcpProxiesSettingsBuilder
+ * .getSettings()
+ * .setRetrySettings(
+ * regionTargetTcpProxiesSettingsBuilder.getSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * RegionTargetTcpProxiesSettings regionTargetTcpProxiesSettings =
+ * regionTargetTcpProxiesSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class RegionTargetTcpProxiesSettings extends ClientSettings{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) {
+ * String project = "project-309310695";
+ * String resource = "resource-341064690";
+ * GlobalSetLabelsRequest globalSetLabelsRequestResource =
+ * GlobalSetLabelsRequest.newBuilder().build();
+ * Operation response =
+ * securityPoliciesClient
+ * .setLabelsAsync(project, resource, globalSetLabelsRequestResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param globalSetLabelsRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) {
+ * SetLabelsSecurityPolicyRequest request =
+ * SetLabelsSecurityPolicyRequest.newBuilder()
+ * .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .build();
+ * Operation response = securityPoliciesClient.setLabelsAsync(request).get();
+ * }
+ * }
+ *
+ * @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
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) {
+ * SetLabelsSecurityPolicyRequest request =
+ * SetLabelsSecurityPolicyRequest.newBuilder()
+ * .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SecurityPoliciesClient securityPoliciesClient = SecurityPoliciesClient.create()) {
+ * SetLabelsSecurityPolicyRequest request =
+ * SetLabelsSecurityPolicyRequest.newBuilder()
+ * .setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build())
+ * .setProject("project-309310695")
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) {
+ * String project = "project-309310695";
+ * for (Map.Entry
+ *
+ * @param project Name of the project scoping this request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AggregatedListPagedResponse aggregatedList(String project) {
+ AggregatedListSslPoliciesRequest request =
+ AggregatedListSslPoliciesRequest.newBuilder().setProject(project).build();
+ return aggregatedList(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the list of all SslPolicy resources, regional and global, available to the specified
+ * project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) {
+ * AggregatedListSslPoliciesRequest request =
+ * AggregatedListSslPoliciesRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setIncludeAllScopes(true)
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * for (Map.Entry
+ *
+ * @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 AggregatedListPagedResponse aggregatedList(
+ AggregatedListSslPoliciesRequest request) {
+ return aggregatedListPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves the list of all SslPolicy resources, regional and global, available to the specified
+ * project.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) {
+ * AggregatedListSslPoliciesRequest request =
+ * AggregatedListSslPoliciesRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setIncludeAllScopes(true)
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (SslPoliciesClient sslPoliciesClient = SslPoliciesClient.create()) {
+ * AggregatedListSslPoliciesRequest request =
+ * AggregatedListSslPoliciesRequest.newBuilder()
+ * .setFilter("filter-1274492040")
+ * .setIncludeAllScopes(true)
+ * .setMaxResults(1128457243)
+ * .setOrderBy("orderBy-1207110587")
+ * .setPageToken("pageToken873572522")
+ * .setProject("project-309310695")
+ * .setReturnPartialSuccess(true)
+ * .build();
+ * while (true) {
+ * SslPoliciesAggregatedList response =
+ * sslPoliciesClient.aggregatedListCallable().call(request);
+ * for (Map.Entry
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * RegionSetLabelsRequest regionSetLabelsRequestResource =
+ * RegionSetLabelsRequest.newBuilder().build();
+ * Operation response =
+ * targetVpnGatewaysClient
+ * .setLabelsAsync(project, region, resource, regionSetLabelsRequestResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param regionSetLabelsRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) {
+ * SetLabelsTargetVpnGatewayRequest request =
+ * SetLabelsTargetVpnGatewayRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * Operation response = targetVpnGatewaysClient.setLabelsAsync(request).get();
+ * }
+ * }
+ *
+ * @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
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) {
+ * SetLabelsTargetVpnGatewayRequest request =
+ * SetLabelsTargetVpnGatewayRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (TargetVpnGatewaysClient targetVpnGatewaysClient = TargetVpnGatewaysClient.create()) {
+ * SetLabelsTargetVpnGatewayRequest request =
+ * SetLabelsTargetVpnGatewayRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String resource = "resource-341064690";
+ * RegionSetLabelsRequest regionSetLabelsRequestResource =
+ * RegionSetLabelsRequest.newBuilder().build();
+ * Operation response =
+ * vpnTunnelsClient
+ * .setLabelsAsync(project, region, resource, regionSetLabelsRequestResource)
+ * .get();
+ * }
+ * }
+ *
+ * @param project Project ID for this request.
+ * @param region The region for this request.
+ * @param resource Name or id of the resource for this request.
+ * @param regionSetLabelsRequestResource The body resource for this request
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) {
+ * SetLabelsVpnTunnelRequest request =
+ * SetLabelsVpnTunnelRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * Operation response = vpnTunnelsClient.setLabelsAsync(request).get();
+ * }
+ * }
+ *
+ * @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
+ */
+ @BetaApi(
+ "The surface for long-running operations is not stable yet and may change in the future.")
+ public final OperationFuture{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) {
+ * SetLabelsVpnTunnelRequest request =
+ * SetLabelsVpnTunnelRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (VpnTunnelsClient vpnTunnelsClient = VpnTunnelsClient.create()) {
+ * SetLabelsVpnTunnelRequest request =
+ * SetLabelsVpnTunnelRequest.newBuilder()
+ * .setProject("project-309310695")
+ * .setRegion("region-934795532")
+ * .setRegionSetLabelsRequestResource(RegionSetLabelsRequest.newBuilder().build())
+ * .setRequestId("requestId693933066")
+ * .setResource("resource-341064690")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionSslPoliciesClient regionSslPoliciesClient = RegionSslPoliciesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String sslPolicy = "sslPolicy618174046";
+ * SslPolicy response = regionSslPoliciesClient.get(project, region, sslPolicy);
+ * }
+ * }
+ *
* {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RegionTargetTcpProxiesClient regionTargetTcpProxiesClient =
+ * RegionTargetTcpProxiesClient.create()) {
+ * String project = "project-309310695";
+ * String region = "region-934795532";
+ * String targetTcpProxy = "targetTcpProxy-337144898";
+ * TargetTcpProxy response = regionTargetTcpProxiesClient.get(project, region, targetTcpProxy);
+ * }
+ * }
+ *
*