Class CloudDeployClient

  • All Implemented Interfaces:
    com.google.api.gax.core.BackgroundResource, AutoCloseable

    @Generated("by gapic-generator-java")
    public class CloudDeployClient
    extends Object
    implements com.google.api.gax.core.BackgroundResource
    Service Description: CloudDeploy service creates and manages Continuous Delivery operations on Google Cloud Platform via Skaffold (https://skaffold.dev).

    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:

    
     // 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
       DeliveryPipelineName name =
           DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
       DeliveryPipeline response = cloudDeployClient.getDeliveryPipeline(name);
     }
     

    Note: close() needs to be called on the CloudDeployClient 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:

    1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
    2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
    3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

    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 CloudDeploySettings to create(). For example:

    To customize credentials:

    
     // 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
     CloudDeploySettings cloudDeploySettings =
         CloudDeploySettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     CloudDeployClient cloudDeployClient = CloudDeployClient.create(cloudDeploySettings);
     

    To customize the endpoint:

    
     // 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
     CloudDeploySettings cloudDeploySettings =
         CloudDeploySettings.newBuilder().setEndpoint(myEndpoint).build();
     CloudDeployClient cloudDeployClient = CloudDeployClient.create(cloudDeploySettings);
     

    To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:

    
     // 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
     CloudDeploySettings cloudDeploySettings = CloudDeploySettings.newHttpJsonBuilder().build();
     CloudDeployClient cloudDeployClient = CloudDeployClient.create(cloudDeploySettings);
     

    Please refer to the GitHub repository's samples for more quickstart code snippets.

    • Constructor Detail

      • CloudDeployClient

        protected CloudDeployClient​(CloudDeploySettings settings)
                             throws IOException
        Constructs an instance of CloudDeployClient, 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.
        Throws:
        IOException
    • Method Detail

      • create

        public static final CloudDeployClient create​(CloudDeploySettings settings)
                                              throws IOException
        Constructs an instance of CloudDeployClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
        Throws:
        IOException
      • create

        public static final CloudDeployClient create​(CloudDeployStub stub)
        Constructs an instance of CloudDeployClient, using the given stub for making calls. This is for advanced usage - prefer using create(CloudDeploySettings).
      • getOperationsClient

        public final com.google.longrunning.OperationsClient getOperationsClient()
        Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
      • getHttpJsonOperationsClient

        @BetaApi
        public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
        Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
      • listDeliveryPipelines

        public final CloudDeployClient.ListDeliveryPipelinesPagedResponse listDeliveryPipelines​(LocationName parent)
        Lists DeliveryPipelines in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
           for (DeliveryPipeline element :
               cloudDeployClient.listDeliveryPipelines(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The parent, which owns this collection of pipelines. Format must be projects/{project_id}/locations/{location_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listDeliveryPipelines

        public final CloudDeployClient.ListDeliveryPipelinesPagedResponse listDeliveryPipelines​(String parent)
        Lists DeliveryPipelines in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
           for (DeliveryPipeline element :
               cloudDeployClient.listDeliveryPipelines(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The parent, which owns this collection of pipelines. Format must be projects/{project_id}/locations/{location_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listDeliveryPipelines

        public final CloudDeployClient.ListDeliveryPipelinesPagedResponse listDeliveryPipelines​(ListDeliveryPipelinesRequest request)
        Lists DeliveryPipelines in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListDeliveryPipelinesRequest request =
               ListDeliveryPipelinesRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           for (DeliveryPipeline element :
               cloudDeployClient.listDeliveryPipelines(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        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
      • listDeliveryPipelinesPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListDeliveryPipelinesRequest,​CloudDeployClient.ListDeliveryPipelinesPagedResponse> listDeliveryPipelinesPagedCallable()
        Lists DeliveryPipelines in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListDeliveryPipelinesRequest request =
               ListDeliveryPipelinesRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           ApiFuture<DeliveryPipeline> future =
               cloudDeployClient.listDeliveryPipelinesPagedCallable().futureCall(request);
           // Do something.
           for (DeliveryPipeline element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listDeliveryPipelinesCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListDeliveryPipelinesRequest,​ListDeliveryPipelinesResponse> listDeliveryPipelinesCallable()
        Lists DeliveryPipelines in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListDeliveryPipelinesRequest request =
               ListDeliveryPipelinesRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           while (true) {
             ListDeliveryPipelinesResponse response =
                 cloudDeployClient.listDeliveryPipelinesCallable().call(request);
             for (DeliveryPipeline element : response.getDeliveryPipelinesList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getDeliveryPipeline

        public final DeliveryPipeline getDeliveryPipeline​(DeliveryPipelineName name)
        Gets details of a single DeliveryPipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           DeliveryPipelineName name =
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
           DeliveryPipeline response = cloudDeployClient.getDeliveryPipeline(name);
         }
         
        Parameters:
        name - Required. Name of the `DeliveryPipeline`. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getDeliveryPipeline

        public final DeliveryPipeline getDeliveryPipeline​(String name)
        Gets details of a single DeliveryPipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String name =
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
           DeliveryPipeline response = cloudDeployClient.getDeliveryPipeline(name);
         }
         
        Parameters:
        name - Required. Name of the `DeliveryPipeline`. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getDeliveryPipeline

        public final DeliveryPipeline getDeliveryPipeline​(GetDeliveryPipelineRequest request)
        Gets details of a single DeliveryPipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetDeliveryPipelineRequest request =
               GetDeliveryPipelineRequest.newBuilder()
                   .setName(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .build();
           DeliveryPipeline response = cloudDeployClient.getDeliveryPipeline(request);
         }
         
        Parameters:
        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
      • getDeliveryPipelineCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetDeliveryPipelineRequest,​DeliveryPipeline> getDeliveryPipelineCallable()
        Gets details of a single DeliveryPipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetDeliveryPipelineRequest request =
               GetDeliveryPipelineRequest.newBuilder()
                   .setName(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .build();
           ApiFuture<DeliveryPipeline> future =
               cloudDeployClient.getDeliveryPipelineCallable().futureCall(request);
           // Do something.
           DeliveryPipeline response = future.get();
         }
         
      • createDeliveryPipelineAsync

        public final com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,​OperationMetadata> createDeliveryPipelineAsync​(LocationName parent,
                                                                                                                                          DeliveryPipeline deliveryPipeline,
                                                                                                                                          String deliveryPipelineId)
        Creates a new DeliveryPipeline in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
           DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build();
           String deliveryPipelineId = "deliveryPipelineId-632411535";
           DeliveryPipeline response =
               cloudDeployClient
                   .createDeliveryPipelineAsync(parent, deliveryPipeline, deliveryPipelineId)
                   .get();
         }
         
        Parameters:
        parent - Required. The parent collection in which the `DeliveryPipeline` should be created. Format should be projects/{project_id}/locations/{location_name}.
        deliveryPipeline - Required. The `DeliveryPipeline` to create.
        deliveryPipelineId - Required. ID of the `DeliveryPipeline`.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createDeliveryPipelineAsync

        public final com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,​OperationMetadata> createDeliveryPipelineAsync​(String parent,
                                                                                                                                          DeliveryPipeline deliveryPipeline,
                                                                                                                                          String deliveryPipelineId)
        Creates a new DeliveryPipeline in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
           DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build();
           String deliveryPipelineId = "deliveryPipelineId-632411535";
           DeliveryPipeline response =
               cloudDeployClient
                   .createDeliveryPipelineAsync(parent, deliveryPipeline, deliveryPipelineId)
                   .get();
         }
         
        Parameters:
        parent - Required. The parent collection in which the `DeliveryPipeline` should be created. Format should be projects/{project_id}/locations/{location_name}.
        deliveryPipeline - Required. The `DeliveryPipeline` to create.
        deliveryPipelineId - Required. ID of the `DeliveryPipeline`.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createDeliveryPipelineAsync

        public final com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,​OperationMetadata> createDeliveryPipelineAsync​(CreateDeliveryPipelineRequest request)
        Creates a new DeliveryPipeline in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           CreateDeliveryPipelineRequest request =
               CreateDeliveryPipelineRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setDeliveryPipelineId("deliveryPipelineId-632411535")
                   .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setValidateOnly(true)
                   .build();
           DeliveryPipeline response = cloudDeployClient.createDeliveryPipelineAsync(request).get();
         }
         
        Parameters:
        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
      • createDeliveryPipelineOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<CreateDeliveryPipelineRequest,​DeliveryPipeline,​OperationMetadata> createDeliveryPipelineOperationCallable()
        Creates a new DeliveryPipeline in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           CreateDeliveryPipelineRequest request =
               CreateDeliveryPipelineRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setDeliveryPipelineId("deliveryPipelineId-632411535")
                   .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setValidateOnly(true)
                   .build();
           OperationFuture<DeliveryPipeline, OperationMetadata> future =
               cloudDeployClient.createDeliveryPipelineOperationCallable().futureCall(request);
           // Do something.
           DeliveryPipeline response = future.get();
         }
         
      • createDeliveryPipelineCallable

        public final com.google.api.gax.rpc.UnaryCallable<CreateDeliveryPipelineRequest,​com.google.longrunning.Operation> createDeliveryPipelineCallable()
        Creates a new DeliveryPipeline in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           CreateDeliveryPipelineRequest request =
               CreateDeliveryPipelineRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setDeliveryPipelineId("deliveryPipelineId-632411535")
                   .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setValidateOnly(true)
                   .build();
           ApiFuture<Operation> future =
               cloudDeployClient.createDeliveryPipelineCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • updateDeliveryPipelineAsync

        public final com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,​OperationMetadata> updateDeliveryPipelineAsync​(DeliveryPipeline deliveryPipeline,
                                                                                                                                          com.google.protobuf.FieldMask updateMask)
        Updates the parameters of a single DeliveryPipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           DeliveryPipeline deliveryPipeline = DeliveryPipeline.newBuilder().build();
           FieldMask updateMask = FieldMask.newBuilder().build();
           DeliveryPipeline response =
               cloudDeployClient.updateDeliveryPipelineAsync(deliveryPipeline, updateMask).get();
         }
         
        Parameters:
        deliveryPipeline - Required. The `DeliveryPipeline` to update.
        updateMask - Required. Field mask is used to specify the fields to be overwritten in the `DeliveryPipeline` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateDeliveryPipelineAsync

        public final com.google.api.gax.longrunning.OperationFuture<DeliveryPipeline,​OperationMetadata> updateDeliveryPipelineAsync​(UpdateDeliveryPipelineRequest request)
        Updates the parameters of a single DeliveryPipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           UpdateDeliveryPipelineRequest request =
               UpdateDeliveryPipelineRequest.newBuilder()
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setAllowMissing(true)
                   .setValidateOnly(true)
                   .build();
           DeliveryPipeline response = cloudDeployClient.updateDeliveryPipelineAsync(request).get();
         }
         
        Parameters:
        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
      • updateDeliveryPipelineOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<UpdateDeliveryPipelineRequest,​DeliveryPipeline,​OperationMetadata> updateDeliveryPipelineOperationCallable()
        Updates the parameters of a single DeliveryPipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           UpdateDeliveryPipelineRequest request =
               UpdateDeliveryPipelineRequest.newBuilder()
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setAllowMissing(true)
                   .setValidateOnly(true)
                   .build();
           OperationFuture<DeliveryPipeline, OperationMetadata> future =
               cloudDeployClient.updateDeliveryPipelineOperationCallable().futureCall(request);
           // Do something.
           DeliveryPipeline response = future.get();
         }
         
      • updateDeliveryPipelineCallable

        public final com.google.api.gax.rpc.UnaryCallable<UpdateDeliveryPipelineRequest,​com.google.longrunning.Operation> updateDeliveryPipelineCallable()
        Updates the parameters of a single DeliveryPipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           UpdateDeliveryPipelineRequest request =
               UpdateDeliveryPipelineRequest.newBuilder()
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .setDeliveryPipeline(DeliveryPipeline.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setAllowMissing(true)
                   .setValidateOnly(true)
                   .build();
           ApiFuture<Operation> future =
               cloudDeployClient.updateDeliveryPipelineCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • deleteDeliveryPipelineAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteDeliveryPipelineAsync​(DeliveryPipelineName name)
        Deletes a single DeliveryPipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           DeliveryPipelineName name =
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
           cloudDeployClient.deleteDeliveryPipelineAsync(name).get();
         }
         
        Parameters:
        name - Required. The name of the `DeliveryPipeline` to delete. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteDeliveryPipelineAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteDeliveryPipelineAsync​(String name)
        Deletes a single DeliveryPipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String name =
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
           cloudDeployClient.deleteDeliveryPipelineAsync(name).get();
         }
         
        Parameters:
        name - Required. The name of the `DeliveryPipeline` to delete. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteDeliveryPipelineAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteDeliveryPipelineAsync​(DeleteDeliveryPipelineRequest request)
        Deletes a single DeliveryPipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           DeleteDeliveryPipelineRequest request =
               DeleteDeliveryPipelineRequest.newBuilder()
                   .setName(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .setRequestId("requestId693933066")
                   .setAllowMissing(true)
                   .setValidateOnly(true)
                   .setForce(true)
                   .setEtag("etag3123477")
                   .build();
           cloudDeployClient.deleteDeliveryPipelineAsync(request).get();
         }
         
        Parameters:
        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
      • deleteDeliveryPipelineOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<DeleteDeliveryPipelineRequest,​com.google.protobuf.Empty,​OperationMetadata> deleteDeliveryPipelineOperationCallable()
        Deletes a single DeliveryPipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           DeleteDeliveryPipelineRequest request =
               DeleteDeliveryPipelineRequest.newBuilder()
                   .setName(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .setRequestId("requestId693933066")
                   .setAllowMissing(true)
                   .setValidateOnly(true)
                   .setForce(true)
                   .setEtag("etag3123477")
                   .build();
           OperationFuture<Empty, OperationMetadata> future =
               cloudDeployClient.deleteDeliveryPipelineOperationCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • deleteDeliveryPipelineCallable

        public final com.google.api.gax.rpc.UnaryCallable<DeleteDeliveryPipelineRequest,​com.google.longrunning.Operation> deleteDeliveryPipelineCallable()
        Deletes a single DeliveryPipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           DeleteDeliveryPipelineRequest request =
               DeleteDeliveryPipelineRequest.newBuilder()
                   .setName(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .setRequestId("requestId693933066")
                   .setAllowMissing(true)
                   .setValidateOnly(true)
                   .setForce(true)
                   .setEtag("etag3123477")
                   .build();
           ApiFuture<Operation> future =
               cloudDeployClient.deleteDeliveryPipelineCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • listTargets

        public final CloudDeployClient.ListTargetsPagedResponse listTargets​(LocationName parent)
        Lists Targets in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
           for (Target element : cloudDeployClient.listTargets(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The parent, which owns this collection of targets. Format must be projects/{project_id}/locations/{location_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listTargets

        public final CloudDeployClient.ListTargetsPagedResponse listTargets​(String parent)
        Lists Targets in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
           for (Target element : cloudDeployClient.listTargets(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The parent, which owns this collection of targets. Format must be projects/{project_id}/locations/{location_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listTargets

        public final CloudDeployClient.ListTargetsPagedResponse listTargets​(ListTargetsRequest request)
        Lists Targets in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListTargetsRequest request =
               ListTargetsRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           for (Target element : cloudDeployClient.listTargets(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        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
      • listTargetsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListTargetsRequest,​CloudDeployClient.ListTargetsPagedResponse> listTargetsPagedCallable()
        Lists Targets in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListTargetsRequest request =
               ListTargetsRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           ApiFuture<Target> future = cloudDeployClient.listTargetsPagedCallable().futureCall(request);
           // Do something.
           for (Target element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listTargetsCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListTargetsRequest,​ListTargetsResponse> listTargetsCallable()
        Lists Targets in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListTargetsRequest request =
               ListTargetsRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           while (true) {
             ListTargetsResponse response = cloudDeployClient.listTargetsCallable().call(request);
             for (Target element : response.getTargetsList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getTarget

        public final Target getTarget​(TargetName name)
        Gets details of a single Target.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           TargetName name = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]");
           Target response = cloudDeployClient.getTarget(name);
         }
         
        Parameters:
        name - Required. Name of the `Target`. Format must be projects/{project_id}/locations/{location_name}/targets/{target_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getTarget

        public final Target getTarget​(String name)
        Gets details of a single Target.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String name = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString();
           Target response = cloudDeployClient.getTarget(name);
         }
         
        Parameters:
        name - Required. Name of the `Target`. Format must be projects/{project_id}/locations/{location_name}/targets/{target_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getTarget

        public final Target getTarget​(GetTargetRequest request)
        Gets details of a single Target.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetTargetRequest request =
               GetTargetRequest.newBuilder()
                   .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
                   .build();
           Target response = cloudDeployClient.getTarget(request);
         }
         
        Parameters:
        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
      • getTargetCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetTargetRequest,​Target> getTargetCallable()
        Gets details of a single Target.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetTargetRequest request =
               GetTargetRequest.newBuilder()
                   .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
                   .build();
           ApiFuture<Target> future = cloudDeployClient.getTargetCallable().futureCall(request);
           // Do something.
           Target response = future.get();
         }
         
      • createTargetAsync

        public final com.google.api.gax.longrunning.OperationFuture<Target,​OperationMetadata> createTargetAsync​(LocationName parent,
                                                                                                                      Target target,
                                                                                                                      String targetId)
        Creates a new Target in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
           Target target = Target.newBuilder().build();
           String targetId = "targetId-441951604";
           Target response = cloudDeployClient.createTargetAsync(parent, target, targetId).get();
         }
         
        Parameters:
        parent - Required. The parent collection in which the `Target` should be created. Format should be projects/{project_id}/locations/{location_name}.
        target - Required. The `Target` to create.
        targetId - Required. ID of the `Target`.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createTargetAsync

        public final com.google.api.gax.longrunning.OperationFuture<Target,​OperationMetadata> createTargetAsync​(String parent,
                                                                                                                      Target target,
                                                                                                                      String targetId)
        Creates a new Target in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
           Target target = Target.newBuilder().build();
           String targetId = "targetId-441951604";
           Target response = cloudDeployClient.createTargetAsync(parent, target, targetId).get();
         }
         
        Parameters:
        parent - Required. The parent collection in which the `Target` should be created. Format should be projects/{project_id}/locations/{location_name}.
        target - Required. The `Target` to create.
        targetId - Required. ID of the `Target`.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createTargetAsync

        public final com.google.api.gax.longrunning.OperationFuture<Target,​OperationMetadata> createTargetAsync​(CreateTargetRequest request)
        Creates a new Target in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           CreateTargetRequest request =
               CreateTargetRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setTargetId("targetId-441951604")
                   .setTarget(Target.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setValidateOnly(true)
                   .build();
           Target response = cloudDeployClient.createTargetAsync(request).get();
         }
         
        Parameters:
        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
      • createTargetOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<CreateTargetRequest,​Target,​OperationMetadata> createTargetOperationCallable()
        Creates a new Target in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           CreateTargetRequest request =
               CreateTargetRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setTargetId("targetId-441951604")
                   .setTarget(Target.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setValidateOnly(true)
                   .build();
           OperationFuture<Target, OperationMetadata> future =
               cloudDeployClient.createTargetOperationCallable().futureCall(request);
           // Do something.
           Target response = future.get();
         }
         
      • createTargetCallable

        public final com.google.api.gax.rpc.UnaryCallable<CreateTargetRequest,​com.google.longrunning.Operation> createTargetCallable()
        Creates a new Target in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           CreateTargetRequest request =
               CreateTargetRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setTargetId("targetId-441951604")
                   .setTarget(Target.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setValidateOnly(true)
                   .build();
           ApiFuture<Operation> future = cloudDeployClient.createTargetCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • updateTargetAsync

        public final com.google.api.gax.longrunning.OperationFuture<Target,​OperationMetadata> updateTargetAsync​(Target target,
                                                                                                                      com.google.protobuf.FieldMask updateMask)
        Updates the parameters of a single Target.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           Target target = Target.newBuilder().build();
           FieldMask updateMask = FieldMask.newBuilder().build();
           Target response = cloudDeployClient.updateTargetAsync(target, updateMask).get();
         }
         
        Parameters:
        target - Required. The `Target` to update.
        updateMask - Required. Field mask is used to specify the fields to be overwritten in the Target resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateTargetAsync

        public final com.google.api.gax.longrunning.OperationFuture<Target,​OperationMetadata> updateTargetAsync​(UpdateTargetRequest request)
        Updates the parameters of a single Target.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           UpdateTargetRequest request =
               UpdateTargetRequest.newBuilder()
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .setTarget(Target.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setAllowMissing(true)
                   .setValidateOnly(true)
                   .build();
           Target response = cloudDeployClient.updateTargetAsync(request).get();
         }
         
        Parameters:
        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
      • updateTargetOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<UpdateTargetRequest,​Target,​OperationMetadata> updateTargetOperationCallable()
        Updates the parameters of a single Target.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           UpdateTargetRequest request =
               UpdateTargetRequest.newBuilder()
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .setTarget(Target.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setAllowMissing(true)
                   .setValidateOnly(true)
                   .build();
           OperationFuture<Target, OperationMetadata> future =
               cloudDeployClient.updateTargetOperationCallable().futureCall(request);
           // Do something.
           Target response = future.get();
         }
         
      • updateTargetCallable

        public final com.google.api.gax.rpc.UnaryCallable<UpdateTargetRequest,​com.google.longrunning.Operation> updateTargetCallable()
        Updates the parameters of a single Target.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           UpdateTargetRequest request =
               UpdateTargetRequest.newBuilder()
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .setTarget(Target.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setAllowMissing(true)
                   .setValidateOnly(true)
                   .build();
           ApiFuture<Operation> future = cloudDeployClient.updateTargetCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • deleteTargetAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteTargetAsync​(TargetName name)
        Deletes a single Target.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           TargetName name = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]");
           cloudDeployClient.deleteTargetAsync(name).get();
         }
         
        Parameters:
        name - Required. The name of the `Target` to delete. Format should be projects/{project_id}/locations/{location_name}/targets/{target_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteTargetAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteTargetAsync​(String name)
        Deletes a single Target.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String name = TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString();
           cloudDeployClient.deleteTargetAsync(name).get();
         }
         
        Parameters:
        name - Required. The name of the `Target` to delete. Format should be projects/{project_id}/locations/{location_name}/targets/{target_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteTargetAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteTargetAsync​(DeleteTargetRequest request)
        Deletes a single Target.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           DeleteTargetRequest request =
               DeleteTargetRequest.newBuilder()
                   .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
                   .setRequestId("requestId693933066")
                   .setAllowMissing(true)
                   .setValidateOnly(true)
                   .setEtag("etag3123477")
                   .build();
           cloudDeployClient.deleteTargetAsync(request).get();
         }
         
        Parameters:
        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
      • deleteTargetOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<DeleteTargetRequest,​com.google.protobuf.Empty,​OperationMetadata> deleteTargetOperationCallable()
        Deletes a single Target.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           DeleteTargetRequest request =
               DeleteTargetRequest.newBuilder()
                   .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
                   .setRequestId("requestId693933066")
                   .setAllowMissing(true)
                   .setValidateOnly(true)
                   .setEtag("etag3123477")
                   .build();
           OperationFuture<Empty, OperationMetadata> future =
               cloudDeployClient.deleteTargetOperationCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • deleteTargetCallable

        public final com.google.api.gax.rpc.UnaryCallable<DeleteTargetRequest,​com.google.longrunning.Operation> deleteTargetCallable()
        Deletes a single Target.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           DeleteTargetRequest request =
               DeleteTargetRequest.newBuilder()
                   .setName(TargetName.of("[PROJECT]", "[LOCATION]", "[TARGET]").toString())
                   .setRequestId("requestId693933066")
                   .setAllowMissing(true)
                   .setValidateOnly(true)
                   .setEtag("etag3123477")
                   .build();
           ApiFuture<Operation> future = cloudDeployClient.deleteTargetCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • listReleases

        public final CloudDeployClient.ListReleasesPagedResponse listReleases​(DeliveryPipelineName parent)
        Lists Releases in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           DeliveryPipelineName parent =
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
           for (Release element : cloudDeployClient.listReleases(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The `DeliveryPipeline` which owns this collection of `Release` objects.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listReleases

        public final CloudDeployClient.ListReleasesPagedResponse listReleases​(String parent)
        Lists Releases in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String parent =
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
           for (Release element : cloudDeployClient.listReleases(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The `DeliveryPipeline` which owns this collection of `Release` objects.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listReleases

        public final CloudDeployClient.ListReleasesPagedResponse listReleases​(ListReleasesRequest request)
        Lists Releases in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListReleasesRequest request =
               ListReleasesRequest.newBuilder()
                   .setParent(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           for (Release element : cloudDeployClient.listReleases(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        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
      • listReleasesPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListReleasesRequest,​CloudDeployClient.ListReleasesPagedResponse> listReleasesPagedCallable()
        Lists Releases in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListReleasesRequest request =
               ListReleasesRequest.newBuilder()
                   .setParent(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           ApiFuture<Release> future = cloudDeployClient.listReleasesPagedCallable().futureCall(request);
           // Do something.
           for (Release element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listReleasesCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListReleasesRequest,​ListReleasesResponse> listReleasesCallable()
        Lists Releases in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListReleasesRequest request =
               ListReleasesRequest.newBuilder()
                   .setParent(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           while (true) {
             ListReleasesResponse response = cloudDeployClient.listReleasesCallable().call(request);
             for (Release element : response.getReleasesList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getRelease

        public final Release getRelease​(ReleaseName name)
        Gets details of a single Release.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ReleaseName name =
               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]");
           Release response = cloudDeployClient.getRelease(name);
         }
         
        Parameters:
        name - Required. Name of the `Release`. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getRelease

        public final Release getRelease​(String name)
        Gets details of a single Release.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String name =
               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]").toString();
           Release response = cloudDeployClient.getRelease(name);
         }
         
        Parameters:
        name - Required. Name of the `Release`. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getRelease

        public final Release getRelease​(GetReleaseRequest request)
        Gets details of a single Release.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetReleaseRequest request =
               GetReleaseRequest.newBuilder()
                   .setName(
                       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                           .toString())
                   .build();
           Release response = cloudDeployClient.getRelease(request);
         }
         
        Parameters:
        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
      • getReleaseCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetReleaseRequest,​Release> getReleaseCallable()
        Gets details of a single Release.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetReleaseRequest request =
               GetReleaseRequest.newBuilder()
                   .setName(
                       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                           .toString())
                   .build();
           ApiFuture<Release> future = cloudDeployClient.getReleaseCallable().futureCall(request);
           // Do something.
           Release response = future.get();
         }
         
      • createReleaseAsync

        public final com.google.api.gax.longrunning.OperationFuture<Release,​OperationMetadata> createReleaseAsync​(DeliveryPipelineName parent,
                                                                                                                        Release release,
                                                                                                                        String releaseId)
        Creates a new Release in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           DeliveryPipelineName parent =
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]");
           Release release = Release.newBuilder().build();
           String releaseId = "releaseId89607042";
           Release response = cloudDeployClient.createReleaseAsync(parent, release, releaseId).get();
         }
         
        Parameters:
        parent - Required. The parent collection in which the `Release` should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
        release - Required. The `Release` to create.
        releaseId - Required. ID of the `Release`.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createReleaseAsync

        public final com.google.api.gax.longrunning.OperationFuture<Release,​OperationMetadata> createReleaseAsync​(String parent,
                                                                                                                        Release release,
                                                                                                                        String releaseId)
        Creates a new Release in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String parent =
               DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]").toString();
           Release release = Release.newBuilder().build();
           String releaseId = "releaseId89607042";
           Release response = cloudDeployClient.createReleaseAsync(parent, release, releaseId).get();
         }
         
        Parameters:
        parent - Required. The parent collection in which the `Release` should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
        release - Required. The `Release` to create.
        releaseId - Required. ID of the `Release`.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createReleaseAsync

        public final com.google.api.gax.longrunning.OperationFuture<Release,​OperationMetadata> createReleaseAsync​(CreateReleaseRequest request)
        Creates a new Release in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           CreateReleaseRequest request =
               CreateReleaseRequest.newBuilder()
                   .setParent(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .setReleaseId("releaseId89607042")
                   .setRelease(Release.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setValidateOnly(true)
                   .build();
           Release response = cloudDeployClient.createReleaseAsync(request).get();
         }
         
        Parameters:
        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
      • createReleaseOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<CreateReleaseRequest,​Release,​OperationMetadata> createReleaseOperationCallable()
        Creates a new Release in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           CreateReleaseRequest request =
               CreateReleaseRequest.newBuilder()
                   .setParent(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .setReleaseId("releaseId89607042")
                   .setRelease(Release.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setValidateOnly(true)
                   .build();
           OperationFuture<Release, OperationMetadata> future =
               cloudDeployClient.createReleaseOperationCallable().futureCall(request);
           // Do something.
           Release response = future.get();
         }
         
      • createReleaseCallable

        public final com.google.api.gax.rpc.UnaryCallable<CreateReleaseRequest,​com.google.longrunning.Operation> createReleaseCallable()
        Creates a new Release in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           CreateReleaseRequest request =
               CreateReleaseRequest.newBuilder()
                   .setParent(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .setReleaseId("releaseId89607042")
                   .setRelease(Release.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setValidateOnly(true)
                   .build();
           ApiFuture<Operation> future = cloudDeployClient.createReleaseCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • abandonRelease

        public final AbandonReleaseResponse abandonRelease​(ReleaseName name)
        Abandons a Release in the Delivery Pipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ReleaseName name =
               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]");
           AbandonReleaseResponse response = cloudDeployClient.abandonRelease(name);
         }
         
        Parameters:
        name - Required. Name of the Release. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • abandonRelease

        public final AbandonReleaseResponse abandonRelease​(String name)
        Abandons a Release in the Delivery Pipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String name =
               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]").toString();
           AbandonReleaseResponse response = cloudDeployClient.abandonRelease(name);
         }
         
        Parameters:
        name - Required. Name of the Release. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • abandonRelease

        public final AbandonReleaseResponse abandonRelease​(AbandonReleaseRequest request)
        Abandons a Release in the Delivery Pipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           AbandonReleaseRequest request =
               AbandonReleaseRequest.newBuilder()
                   .setName(
                       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                           .toString())
                   .build();
           AbandonReleaseResponse response = cloudDeployClient.abandonRelease(request);
         }
         
        Parameters:
        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
      • abandonReleaseCallable

        public final com.google.api.gax.rpc.UnaryCallable<AbandonReleaseRequest,​AbandonReleaseResponse> abandonReleaseCallable()
        Abandons a Release in the Delivery Pipeline.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           AbandonReleaseRequest request =
               AbandonReleaseRequest.newBuilder()
                   .setName(
                       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                           .toString())
                   .build();
           ApiFuture<AbandonReleaseResponse> future =
               cloudDeployClient.abandonReleaseCallable().futureCall(request);
           // Do something.
           AbandonReleaseResponse response = future.get();
         }
         
      • approveRollout

        public final ApproveRolloutResponse approveRollout​(RolloutName name)
        Approves a Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           RolloutName name =
               RolloutName.of(
                   "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
           ApproveRolloutResponse response = cloudDeployClient.approveRollout(name);
         }
         
        Parameters:
        name - Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • approveRollout

        public final ApproveRolloutResponse approveRollout​(String name)
        Approves a Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String name =
               RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
                   .toString();
           ApproveRolloutResponse response = cloudDeployClient.approveRollout(name);
         }
         
        Parameters:
        name - Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • approveRollout

        public final ApproveRolloutResponse approveRollout​(ApproveRolloutRequest request)
        Approves a Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ApproveRolloutRequest request =
               ApproveRolloutRequest.newBuilder()
                   .setName(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .setApproved(true)
                   .build();
           ApproveRolloutResponse response = cloudDeployClient.approveRollout(request);
         }
         
        Parameters:
        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
      • approveRolloutCallable

        public final com.google.api.gax.rpc.UnaryCallable<ApproveRolloutRequest,​ApproveRolloutResponse> approveRolloutCallable()
        Approves a Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ApproveRolloutRequest request =
               ApproveRolloutRequest.newBuilder()
                   .setName(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .setApproved(true)
                   .build();
           ApiFuture<ApproveRolloutResponse> future =
               cloudDeployClient.approveRolloutCallable().futureCall(request);
           // Do something.
           ApproveRolloutResponse response = future.get();
         }
         
      • advanceRollout

        public final AdvanceRolloutResponse advanceRollout​(RolloutName name,
                                                           String phaseId)
        Advances a Rollout in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           RolloutName name =
               RolloutName.of(
                   "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
           String phaseId = "phaseId-608264202";
           AdvanceRolloutResponse response = cloudDeployClient.advanceRollout(name, phaseId);
         }
         
        Parameters:
        name - Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}.
        phaseId - Required. The phase ID to advance the `Rollout` to.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • advanceRollout

        public final AdvanceRolloutResponse advanceRollout​(String name,
                                                           String phaseId)
        Advances a Rollout in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String name =
               RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
                   .toString();
           String phaseId = "phaseId-608264202";
           AdvanceRolloutResponse response = cloudDeployClient.advanceRollout(name, phaseId);
         }
         
        Parameters:
        name - Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}.
        phaseId - Required. The phase ID to advance the `Rollout` to.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • advanceRollout

        public final AdvanceRolloutResponse advanceRollout​(AdvanceRolloutRequest request)
        Advances a Rollout in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           AdvanceRolloutRequest request =
               AdvanceRolloutRequest.newBuilder()
                   .setName(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .setPhaseId("phaseId-608264202")
                   .build();
           AdvanceRolloutResponse response = cloudDeployClient.advanceRollout(request);
         }
         
        Parameters:
        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
      • advanceRolloutCallable

        public final com.google.api.gax.rpc.UnaryCallable<AdvanceRolloutRequest,​AdvanceRolloutResponse> advanceRolloutCallable()
        Advances a Rollout in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           AdvanceRolloutRequest request =
               AdvanceRolloutRequest.newBuilder()
                   .setName(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .setPhaseId("phaseId-608264202")
                   .build();
           ApiFuture<AdvanceRolloutResponse> future =
               cloudDeployClient.advanceRolloutCallable().futureCall(request);
           // Do something.
           AdvanceRolloutResponse response = future.get();
         }
         
      • cancelRollout

        public final CancelRolloutResponse cancelRollout​(RolloutName name)
        Cancels a Rollout in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           RolloutName name =
               RolloutName.of(
                   "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
           CancelRolloutResponse response = cloudDeployClient.cancelRollout(name);
         }
         
        Parameters:
        name - Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • cancelRollout

        public final CancelRolloutResponse cancelRollout​(String name)
        Cancels a Rollout in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String name =
               RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
                   .toString();
           CancelRolloutResponse response = cloudDeployClient.cancelRollout(name);
         }
         
        Parameters:
        name - Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • cancelRollout

        public final CancelRolloutResponse cancelRollout​(CancelRolloutRequest request)
        Cancels a Rollout in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           CancelRolloutRequest request =
               CancelRolloutRequest.newBuilder()
                   .setName(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .build();
           CancelRolloutResponse response = cloudDeployClient.cancelRollout(request);
         }
         
        Parameters:
        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
      • cancelRolloutCallable

        public final com.google.api.gax.rpc.UnaryCallable<CancelRolloutRequest,​CancelRolloutResponse> cancelRolloutCallable()
        Cancels a Rollout in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           CancelRolloutRequest request =
               CancelRolloutRequest.newBuilder()
                   .setName(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .build();
           ApiFuture<CancelRolloutResponse> future =
               cloudDeployClient.cancelRolloutCallable().futureCall(request);
           // Do something.
           CancelRolloutResponse response = future.get();
         }
         
      • listRollouts

        public final CloudDeployClient.ListRolloutsPagedResponse listRollouts​(ReleaseName parent)
        Lists Rollouts in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ReleaseName parent =
               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]");
           for (Rollout element : cloudDeployClient.listRollouts(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The `Release` which owns this collection of `Rollout` objects.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listRollouts

        public final CloudDeployClient.ListRolloutsPagedResponse listRollouts​(String parent)
        Lists Rollouts in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String parent =
               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]").toString();
           for (Rollout element : cloudDeployClient.listRollouts(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The `Release` which owns this collection of `Rollout` objects.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listRollouts

        public final CloudDeployClient.ListRolloutsPagedResponse listRollouts​(ListRolloutsRequest request)
        Lists Rollouts in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListRolloutsRequest request =
               ListRolloutsRequest.newBuilder()
                   .setParent(
                       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                           .toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           for (Rollout element : cloudDeployClient.listRollouts(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        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
      • listRolloutsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListRolloutsRequest,​CloudDeployClient.ListRolloutsPagedResponse> listRolloutsPagedCallable()
        Lists Rollouts in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListRolloutsRequest request =
               ListRolloutsRequest.newBuilder()
                   .setParent(
                       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                           .toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           ApiFuture<Rollout> future = cloudDeployClient.listRolloutsPagedCallable().futureCall(request);
           // Do something.
           for (Rollout element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listRolloutsCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListRolloutsRequest,​ListRolloutsResponse> listRolloutsCallable()
        Lists Rollouts in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListRolloutsRequest request =
               ListRolloutsRequest.newBuilder()
                   .setParent(
                       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                           .toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           while (true) {
             ListRolloutsResponse response = cloudDeployClient.listRolloutsCallable().call(request);
             for (Rollout element : response.getRolloutsList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getRollout

        public final Rollout getRollout​(RolloutName name)
        Gets details of a single Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           RolloutName name =
               RolloutName.of(
                   "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
           Rollout response = cloudDeployClient.getRollout(name);
         }
         
        Parameters:
        name - Required. Name of the `Rollout`. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getRollout

        public final Rollout getRollout​(String name)
        Gets details of a single Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String name =
               RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
                   .toString();
           Rollout response = cloudDeployClient.getRollout(name);
         }
         
        Parameters:
        name - Required. Name of the `Rollout`. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getRollout

        public final Rollout getRollout​(GetRolloutRequest request)
        Gets details of a single Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetRolloutRequest request =
               GetRolloutRequest.newBuilder()
                   .setName(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .build();
           Rollout response = cloudDeployClient.getRollout(request);
         }
         
        Parameters:
        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
      • getRolloutCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetRolloutRequest,​Rollout> getRolloutCallable()
        Gets details of a single Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetRolloutRequest request =
               GetRolloutRequest.newBuilder()
                   .setName(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .build();
           ApiFuture<Rollout> future = cloudDeployClient.getRolloutCallable().futureCall(request);
           // Do something.
           Rollout response = future.get();
         }
         
      • createRolloutAsync

        public final com.google.api.gax.longrunning.OperationFuture<Rollout,​OperationMetadata> createRolloutAsync​(ReleaseName parent,
                                                                                                                        Rollout rollout,
                                                                                                                        String rolloutId)
        Creates a new Rollout in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ReleaseName parent =
               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]");
           Rollout rollout = Rollout.newBuilder().build();
           String rolloutId = "rolloutId551248556";
           Rollout response = cloudDeployClient.createRolloutAsync(parent, rollout, rolloutId).get();
         }
         
        Parameters:
        parent - Required. The parent collection in which the `Rollout` should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
        rollout - Required. The `Rollout` to create.
        rolloutId - Required. ID of the `Rollout`.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createRolloutAsync

        public final com.google.api.gax.longrunning.OperationFuture<Rollout,​OperationMetadata> createRolloutAsync​(String parent,
                                                                                                                        Rollout rollout,
                                                                                                                        String rolloutId)
        Creates a new Rollout in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String parent =
               ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]").toString();
           Rollout rollout = Rollout.newBuilder().build();
           String rolloutId = "rolloutId551248556";
           Rollout response = cloudDeployClient.createRolloutAsync(parent, rollout, rolloutId).get();
         }
         
        Parameters:
        parent - Required. The parent collection in which the `Rollout` should be created. Format should be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
        rollout - Required. The `Rollout` to create.
        rolloutId - Required. ID of the `Rollout`.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createRolloutAsync

        public final com.google.api.gax.longrunning.OperationFuture<Rollout,​OperationMetadata> createRolloutAsync​(CreateRolloutRequest request)
        Creates a new Rollout in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           CreateRolloutRequest request =
               CreateRolloutRequest.newBuilder()
                   .setParent(
                       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                           .toString())
                   .setRolloutId("rolloutId551248556")
                   .setRollout(Rollout.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setValidateOnly(true)
                   .setStartingPhaseId("startingPhaseId-326529130")
                   .build();
           Rollout response = cloudDeployClient.createRolloutAsync(request).get();
         }
         
        Parameters:
        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
      • createRolloutOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<CreateRolloutRequest,​Rollout,​OperationMetadata> createRolloutOperationCallable()
        Creates a new Rollout in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           CreateRolloutRequest request =
               CreateRolloutRequest.newBuilder()
                   .setParent(
                       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                           .toString())
                   .setRolloutId("rolloutId551248556")
                   .setRollout(Rollout.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setValidateOnly(true)
                   .setStartingPhaseId("startingPhaseId-326529130")
                   .build();
           OperationFuture<Rollout, OperationMetadata> future =
               cloudDeployClient.createRolloutOperationCallable().futureCall(request);
           // Do something.
           Rollout response = future.get();
         }
         
      • createRolloutCallable

        public final com.google.api.gax.rpc.UnaryCallable<CreateRolloutRequest,​com.google.longrunning.Operation> createRolloutCallable()
        Creates a new Rollout in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           CreateRolloutRequest request =
               CreateRolloutRequest.newBuilder()
                   .setParent(
                       ReleaseName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]")
                           .toString())
                   .setRolloutId("rolloutId551248556")
                   .setRollout(Rollout.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .setValidateOnly(true)
                   .setStartingPhaseId("startingPhaseId-326529130")
                   .build();
           ApiFuture<Operation> future = cloudDeployClient.createRolloutCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • ignoreJob

        public final IgnoreJobResponse ignoreJob​(RolloutName rollout,
                                                 String phaseId,
                                                 String jobId)
        Ignores the specified Job in a Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           RolloutName rollout =
               RolloutName.of(
                   "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
           String phaseId = "phaseId-608264202";
           String jobId = "jobId101296568";
           IgnoreJobResponse response = cloudDeployClient.ignoreJob(rollout, phaseId, jobId);
         }
         
        Parameters:
        rollout - Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}.
        phaseId - Required. The phase ID the Job to ignore belongs to.
        jobId - Required. The job ID for the Job to ignore.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • ignoreJob

        public final IgnoreJobResponse ignoreJob​(String rollout,
                                                 String phaseId,
                                                 String jobId)
        Ignores the specified Job in a Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String rollout =
               RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
                   .toString();
           String phaseId = "phaseId-608264202";
           String jobId = "jobId101296568";
           IgnoreJobResponse response = cloudDeployClient.ignoreJob(rollout, phaseId, jobId);
         }
         
        Parameters:
        rollout - Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}.
        phaseId - Required. The phase ID the Job to ignore belongs to.
        jobId - Required. The job ID for the Job to ignore.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • ignoreJob

        public final IgnoreJobResponse ignoreJob​(IgnoreJobRequest request)
        Ignores the specified Job in a Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           IgnoreJobRequest request =
               IgnoreJobRequest.newBuilder()
                   .setRollout(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .setPhaseId("phaseId-608264202")
                   .setJobId("jobId101296568")
                   .build();
           IgnoreJobResponse response = cloudDeployClient.ignoreJob(request);
         }
         
        Parameters:
        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
      • ignoreJobCallable

        public final com.google.api.gax.rpc.UnaryCallable<IgnoreJobRequest,​IgnoreJobResponse> ignoreJobCallable()
        Ignores the specified Job in a Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           IgnoreJobRequest request =
               IgnoreJobRequest.newBuilder()
                   .setRollout(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .setPhaseId("phaseId-608264202")
                   .setJobId("jobId101296568")
                   .build();
           ApiFuture<IgnoreJobResponse> future =
               cloudDeployClient.ignoreJobCallable().futureCall(request);
           // Do something.
           IgnoreJobResponse response = future.get();
         }
         
      • retryJob

        public final RetryJobResponse retryJob​(RolloutName rollout,
                                               String phaseId,
                                               String jobId)
        Retries the specified Job in a Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           RolloutName rollout =
               RolloutName.of(
                   "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
           String phaseId = "phaseId-608264202";
           String jobId = "jobId101296568";
           RetryJobResponse response = cloudDeployClient.retryJob(rollout, phaseId, jobId);
         }
         
        Parameters:
        rollout - Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}.
        phaseId - Required. The phase ID the Job to retry belongs to.
        jobId - Required. The job ID for the Job to retry.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • retryJob

        public final RetryJobResponse retryJob​(String rollout,
                                               String phaseId,
                                               String jobId)
        Retries the specified Job in a Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String rollout =
               RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
                   .toString();
           String phaseId = "phaseId-608264202";
           String jobId = "jobId101296568";
           RetryJobResponse response = cloudDeployClient.retryJob(rollout, phaseId, jobId);
         }
         
        Parameters:
        rollout - Required. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}.
        phaseId - Required. The phase ID the Job to retry belongs to.
        jobId - Required. The job ID for the Job to retry.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • retryJob

        public final RetryJobResponse retryJob​(RetryJobRequest request)
        Retries the specified Job in a Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           RetryJobRequest request =
               RetryJobRequest.newBuilder()
                   .setRollout(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .setPhaseId("phaseId-608264202")
                   .setJobId("jobId101296568")
                   .build();
           RetryJobResponse response = cloudDeployClient.retryJob(request);
         }
         
        Parameters:
        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
      • retryJobCallable

        public final com.google.api.gax.rpc.UnaryCallable<RetryJobRequest,​RetryJobResponse> retryJobCallable()
        Retries the specified Job in a Rollout.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           RetryJobRequest request =
               RetryJobRequest.newBuilder()
                   .setRollout(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .setPhaseId("phaseId-608264202")
                   .setJobId("jobId101296568")
                   .build();
           ApiFuture<RetryJobResponse> future = cloudDeployClient.retryJobCallable().futureCall(request);
           // Do something.
           RetryJobResponse response = future.get();
         }
         
      • listJobRuns

        public final CloudDeployClient.ListJobRunsPagedResponse listJobRuns​(RolloutName parent)
        Lists JobRuns in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           RolloutName parent =
               RolloutName.of(
                   "[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]");
           for (JobRun element : cloudDeployClient.listJobRuns(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The `Rollout` which owns this collection of `JobRun` objects.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listJobRuns

        public final CloudDeployClient.ListJobRunsPagedResponse listJobRuns​(String parent)
        Lists JobRuns in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String parent =
               RolloutName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]", "[RELEASE]", "[ROLLOUT]")
                   .toString();
           for (JobRun element : cloudDeployClient.listJobRuns(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The `Rollout` which owns this collection of `JobRun` objects.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listJobRuns

        public final CloudDeployClient.ListJobRunsPagedResponse listJobRuns​(ListJobRunsRequest request)
        Lists JobRuns in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListJobRunsRequest request =
               ListJobRunsRequest.newBuilder()
                   .setParent(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           for (JobRun element : cloudDeployClient.listJobRuns(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        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
      • listJobRunsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListJobRunsRequest,​CloudDeployClient.ListJobRunsPagedResponse> listJobRunsPagedCallable()
        Lists JobRuns in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListJobRunsRequest request =
               ListJobRunsRequest.newBuilder()
                   .setParent(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           ApiFuture<JobRun> future = cloudDeployClient.listJobRunsPagedCallable().futureCall(request);
           // Do something.
           for (JobRun element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listJobRunsCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListJobRunsRequest,​ListJobRunsResponse> listJobRunsCallable()
        Lists JobRuns in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListJobRunsRequest request =
               ListJobRunsRequest.newBuilder()
                   .setParent(
                       RolloutName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]")
                           .toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setFilter("filter-1274492040")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           while (true) {
             ListJobRunsResponse response = cloudDeployClient.listJobRunsCallable().call(request);
             for (JobRun element : response.getJobRunsList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getJobRun

        public final JobRun getJobRun​(JobRunName name)
        Gets details of a single JobRun.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           JobRunName name =
               JobRunName.of(
                   "[PROJECT]",
                   "[LOCATION]",
                   "[DELIVERY_PIPELINE]",
                   "[RELEASE]",
                   "[ROLLOUT]",
                   "[JOB_RUN]");
           JobRun response = cloudDeployClient.getJobRun(name);
         }
         
        Parameters:
        name - Required. Name of the `JobRun`. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getJobRun

        public final JobRun getJobRun​(String name)
        Gets details of a single JobRun.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String name =
               JobRunName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[DELIVERY_PIPELINE]",
                       "[RELEASE]",
                       "[ROLLOUT]",
                       "[JOB_RUN]")
                   .toString();
           JobRun response = cloudDeployClient.getJobRun(name);
         }
         
        Parameters:
        name - Required. Name of the `JobRun`. Format must be projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getJobRun

        public final JobRun getJobRun​(GetJobRunRequest request)
        Gets details of a single JobRun.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetJobRunRequest request =
               GetJobRunRequest.newBuilder()
                   .setName(
                       JobRunName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]",
                               "[JOB_RUN]")
                           .toString())
                   .build();
           JobRun response = cloudDeployClient.getJobRun(request);
         }
         
        Parameters:
        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
      • getJobRunCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetJobRunRequest,​JobRun> getJobRunCallable()
        Gets details of a single JobRun.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetJobRunRequest request =
               GetJobRunRequest.newBuilder()
                   .setName(
                       JobRunName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]",
                               "[JOB_RUN]")
                           .toString())
                   .build();
           ApiFuture<JobRun> future = cloudDeployClient.getJobRunCallable().futureCall(request);
           // Do something.
           JobRun response = future.get();
         }
         
      • terminateJobRun

        public final TerminateJobRunResponse terminateJobRun​(JobRunName name)
        Terminates a Job Run in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           JobRunName name =
               JobRunName.of(
                   "[PROJECT]",
                   "[LOCATION]",
                   "[DELIVERY_PIPELINE]",
                   "[RELEASE]",
                   "[ROLLOUT]",
                   "[JOB_RUN]");
           TerminateJobRunResponse response = cloudDeployClient.terminateJobRun(name);
         }
         
        Parameters:
        name - Required. Name of the `JobRun`. Format must be projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • terminateJobRun

        public final TerminateJobRunResponse terminateJobRun​(String name)
        Terminates a Job Run in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String name =
               JobRunName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[DELIVERY_PIPELINE]",
                       "[RELEASE]",
                       "[ROLLOUT]",
                       "[JOB_RUN]")
                   .toString();
           TerminateJobRunResponse response = cloudDeployClient.terminateJobRun(name);
         }
         
        Parameters:
        name - Required. Name of the `JobRun`. Format must be projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/ releases/{release}/rollouts/{rollout}/jobRuns/{jobRun}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • terminateJobRun

        public final TerminateJobRunResponse terminateJobRun​(TerminateJobRunRequest request)
        Terminates a Job Run in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           TerminateJobRunRequest request =
               TerminateJobRunRequest.newBuilder()
                   .setName(
                       JobRunName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]",
                               "[JOB_RUN]")
                           .toString())
                   .build();
           TerminateJobRunResponse response = cloudDeployClient.terminateJobRun(request);
         }
         
        Parameters:
        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
      • terminateJobRunCallable

        public final com.google.api.gax.rpc.UnaryCallable<TerminateJobRunRequest,​TerminateJobRunResponse> terminateJobRunCallable()
        Terminates a Job Run in a given project and location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           TerminateJobRunRequest request =
               TerminateJobRunRequest.newBuilder()
                   .setName(
                       JobRunName.of(
                               "[PROJECT]",
                               "[LOCATION]",
                               "[DELIVERY_PIPELINE]",
                               "[RELEASE]",
                               "[ROLLOUT]",
                               "[JOB_RUN]")
                           .toString())
                   .build();
           ApiFuture<TerminateJobRunResponse> future =
               cloudDeployClient.terminateJobRunCallable().futureCall(request);
           // Do something.
           TerminateJobRunResponse response = future.get();
         }
         
      • getConfig

        public final Config getConfig​(ConfigName name)
        Gets the configuration for a location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ConfigName name = ConfigName.of("[PROJECT]", "[LOCATION]");
           Config response = cloudDeployClient.getConfig(name);
         }
         
        Parameters:
        name - Required. Name of requested configuration.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getConfig

        public final Config getConfig​(String name)
        Gets the configuration for a location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           String name = ConfigName.of("[PROJECT]", "[LOCATION]").toString();
           Config response = cloudDeployClient.getConfig(name);
         }
         
        Parameters:
        name - Required. Name of requested configuration.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getConfig

        public final Config getConfig​(GetConfigRequest request)
        Gets the configuration for a location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetConfigRequest request =
               GetConfigRequest.newBuilder()
                   .setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString())
                   .build();
           Config response = cloudDeployClient.getConfig(request);
         }
         
        Parameters:
        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
      • getConfigCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetConfigRequest,​Config> getConfigCallable()
        Gets the configuration for a location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetConfigRequest request =
               GetConfigRequest.newBuilder()
                   .setName(ConfigName.of("[PROJECT]", "[LOCATION]").toString())
                   .build();
           ApiFuture<Config> future = cloudDeployClient.getConfigCallable().futureCall(request);
           // Do something.
           Config response = future.get();
         }
         
      • listLocations

        public final CloudDeployClient.ListLocationsPagedResponse listLocations​(com.google.cloud.location.ListLocationsRequest request)
        Lists information about the supported locations for this service.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (Location element : cloudDeployClient.listLocations(request).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        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
      • listLocationsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,​CloudDeployClient.ListLocationsPagedResponse> listLocationsPagedCallable()
        Lists information about the supported locations for this service.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<Location> future =
               cloudDeployClient.listLocationsPagedCallable().futureCall(request);
           // Do something.
           for (Location element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listLocationsCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,​com.google.cloud.location.ListLocationsResponse> listLocationsCallable()
        Lists information about the supported locations for this service.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             ListLocationsResponse response = cloudDeployClient.listLocationsCallable().call(request);
             for (Location element : response.getLocationsList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getLocation

        public final com.google.cloud.location.Location getLocation​(com.google.cloud.location.GetLocationRequest request)
        Gets information about a location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
           Location response = cloudDeployClient.getLocation(request);
         }
         
        Parameters:
        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
      • getLocationCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,​com.google.cloud.location.Location> getLocationCallable()
        Gets information about a location.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
           ApiFuture<Location> future = cloudDeployClient.getLocationCallable().futureCall(request);
           // Do something.
           Location response = future.get();
         }
         
      • setIamPolicy

        public final com.google.iam.v1.Policy setIamPolicy​(com.google.iam.v1.SetIamPolicyRequest request)
        Sets the access control policy on the specified resource. Replacesany existing policy.

        Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           SetIamPolicyRequest request =
               SetIamPolicyRequest.newBuilder()
                   .setResource(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .setPolicy(Policy.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .build();
           Policy response = cloudDeployClient.setIamPolicy(request);
         }
         
        Parameters:
        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
      • setIamPolicyCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,​com.google.iam.v1.Policy> setIamPolicyCallable()
        Sets the access control policy on the specified resource. Replacesany existing policy.

        Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           SetIamPolicyRequest request =
               SetIamPolicyRequest.newBuilder()
                   .setResource(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .setPolicy(Policy.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .build();
           ApiFuture<Policy> future = cloudDeployClient.setIamPolicyCallable().futureCall(request);
           // Do something.
           Policy response = future.get();
         }
         
      • getIamPolicy

        public final com.google.iam.v1.Policy getIamPolicy​(com.google.iam.v1.GetIamPolicyRequest request)
        Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetIamPolicyRequest request =
               GetIamPolicyRequest.newBuilder()
                   .setResource(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .setOptions(GetPolicyOptions.newBuilder().build())
                   .build();
           Policy response = cloudDeployClient.getIamPolicy(request);
         }
         
        Parameters:
        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
      • getIamPolicyCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,​com.google.iam.v1.Policy> getIamPolicyCallable()
        Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           GetIamPolicyRequest request =
               GetIamPolicyRequest.newBuilder()
                   .setResource(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .setOptions(GetPolicyOptions.newBuilder().build())
                   .build();
           ApiFuture<Policy> future = cloudDeployClient.getIamPolicyCallable().futureCall(request);
           // Do something.
           Policy response = future.get();
         }
         
      • testIamPermissions

        public final com.google.iam.v1.TestIamPermissionsResponse testIamPermissions​(com.google.iam.v1.TestIamPermissionsRequest request)
        Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

        Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           TestIamPermissionsRequest request =
               TestIamPermissionsRequest.newBuilder()
                   .setResource(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .addAllPermissions(new ArrayList<String>())
                   .build();
           TestIamPermissionsResponse response = cloudDeployClient.testIamPermissions(request);
         }
         
        Parameters:
        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
      • testIamPermissionsCallable

        public final com.google.api.gax.rpc.UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,​com.google.iam.v1.TestIamPermissionsResponse> testIamPermissionsCallable()
        Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

        Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

        Sample 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 (CloudDeployClient cloudDeployClient = CloudDeployClient.create()) {
           TestIamPermissionsRequest request =
               TestIamPermissionsRequest.newBuilder()
                   .setResource(
                       DeliveryPipelineName.of("[PROJECT]", "[LOCATION]", "[DELIVERY_PIPELINE]")
                           .toString())
                   .addAllPermissions(new ArrayList<String>())
                   .build();
           ApiFuture<TestIamPermissionsResponse> future =
               cloudDeployClient.testIamPermissionsCallable().futureCall(request);
           // Do something.
           TestIamPermissionsResponse response = future.get();
         }
         
      • shutdown

        public void shutdown()
        Specified by:
        shutdown in interface com.google.api.gax.core.BackgroundResource
      • isShutdown

        public boolean isShutdown()
        Specified by:
        isShutdown in interface com.google.api.gax.core.BackgroundResource
      • isTerminated

        public boolean isTerminated()
        Specified by:
        isTerminated in interface com.google.api.gax.core.BackgroundResource
      • shutdownNow

        public void shutdownNow()
        Specified by:
        shutdownNow in interface com.google.api.gax.core.BackgroundResource