Class ArtifactRegistryClient

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

    @Generated("by gapic-generator-java")
    public class ArtifactRegistryClient
    extends Object
    implements com.google.api.gax.core.BackgroundResource
    Service Description: The Artifact Registry API service.

    Artifact Registry is an artifact management system for storing artifacts from different package management systems.

    The resources managed by this API are:

    • Repositories, which group packages and their data.
    • Packages, which group versions and their tags.
    • Versions, which are specific forms of a package.
    • Tags, which represent alternative names for versions.
    • Files, which contain content and are optionally associated with a Package or Version.

    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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
       DockerImageName name =
           DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]");
       DockerImage response = artifactRegistryClient.getDockerImage(name);
     }
     

    Note: close() needs to be called on the ArtifactRegistryClient 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 ArtifactRegistrySettings 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
     ArtifactRegistrySettings artifactRegistrySettings =
         ArtifactRegistrySettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     ArtifactRegistryClient artifactRegistryClient =
         ArtifactRegistryClient.create(artifactRegistrySettings);
     

    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
     ArtifactRegistrySettings artifactRegistrySettings =
         ArtifactRegistrySettings.newBuilder().setEndpoint(myEndpoint).build();
     ArtifactRegistryClient artifactRegistryClient =
         ArtifactRegistryClient.create(artifactRegistrySettings);
     

    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
     ArtifactRegistrySettings artifactRegistrySettings =
         ArtifactRegistrySettings.newHttpJsonBuilder().build();
     ArtifactRegistryClient artifactRegistryClient =
         ArtifactRegistryClient.create(artifactRegistrySettings);
     

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

    • Constructor Detail

      • ArtifactRegistryClient

        protected ArtifactRegistryClient​(ArtifactRegistrySettings settings)
                                  throws IOException
        Constructs an instance of ArtifactRegistryClient, 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 ArtifactRegistryClient create​(ArtifactRegistryStub stub)
        Constructs an instance of ArtifactRegistryClient, using the given stub for making calls. This is for advanced usage - prefer using create(ArtifactRegistrySettings).
      • 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.
      • listDockerImages

        public final ArtifactRegistryClient.ListDockerImagesPagedResponse listDockerImages​(String parent)
        Lists docker images.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String parent = "parent-995424086";
           for (DockerImage element : artifactRegistryClient.listDockerImages(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the parent resource whose docker images will be listed.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listDockerImages

        public final ArtifactRegistryClient.ListDockerImagesPagedResponse listDockerImages​(ListDockerImagesRequest request)
        Lists docker images.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListDockerImagesRequest request =
               ListDockerImagesRequest.newBuilder()
                   .setParent("parent-995424086")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           for (DockerImage element : artifactRegistryClient.listDockerImages(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
      • listDockerImagesPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListDockerImagesRequest,​ArtifactRegistryClient.ListDockerImagesPagedResponse> listDockerImagesPagedCallable()
        Lists docker images.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListDockerImagesRequest request =
               ListDockerImagesRequest.newBuilder()
                   .setParent("parent-995424086")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           ApiFuture<DockerImage> future =
               artifactRegistryClient.listDockerImagesPagedCallable().futureCall(request);
           // Do something.
           for (DockerImage element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listDockerImagesCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListDockerImagesRequest,​ListDockerImagesResponse> listDockerImagesCallable()
        Lists docker images.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListDockerImagesRequest request =
               ListDockerImagesRequest.newBuilder()
                   .setParent("parent-995424086")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           while (true) {
             ListDockerImagesResponse response =
                 artifactRegistryClient.listDockerImagesCallable().call(request);
             for (DockerImage element : response.getDockerImagesList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getDockerImage

        public final DockerImage getDockerImage​(DockerImageName name)
        Gets a docker image.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           DockerImageName name =
               DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]");
           DockerImage response = artifactRegistryClient.getDockerImage(name);
         }
         
        Parameters:
        name - Required. The name of the docker images.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getDockerImage

        public final DockerImage getDockerImage​(String name)
        Gets a docker image.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name =
               DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]")
                   .toString();
           DockerImage response = artifactRegistryClient.getDockerImage(name);
         }
         
        Parameters:
        name - Required. The name of the docker images.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getDockerImage

        public final DockerImage getDockerImage​(GetDockerImageRequest request)
        Gets a docker image.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetDockerImageRequest request =
               GetDockerImageRequest.newBuilder()
                   .setName(
                       DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]")
                           .toString())
                   .build();
           DockerImage response = artifactRegistryClient.getDockerImage(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
      • getDockerImageCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetDockerImageRequest,​DockerImage> getDockerImageCallable()
        Gets a docker image.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetDockerImageRequest request =
               GetDockerImageRequest.newBuilder()
                   .setName(
                       DockerImageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[DOCKER_IMAGE]")
                           .toString())
                   .build();
           ApiFuture<DockerImage> future =
               artifactRegistryClient.getDockerImageCallable().futureCall(request);
           // Do something.
           DockerImage response = future.get();
         }
         
      • listMavenArtifacts

        public final ArtifactRegistryClient.ListMavenArtifactsPagedResponse listMavenArtifacts​(RepositoryName parent)
        Lists maven artifacts.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
           for (MavenArtifact element : artifactRegistryClient.listMavenArtifacts(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the parent resource whose maven artifacts will be listed.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listMavenArtifacts

        public final ArtifactRegistryClient.ListMavenArtifactsPagedResponse listMavenArtifacts​(String parent)
        Lists maven artifacts.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
           for (MavenArtifact element : artifactRegistryClient.listMavenArtifacts(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the parent resource whose maven artifacts will be listed.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listMavenArtifacts

        public final ArtifactRegistryClient.ListMavenArtifactsPagedResponse listMavenArtifacts​(ListMavenArtifactsRequest request)
        Lists maven artifacts.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListMavenArtifactsRequest request =
               ListMavenArtifactsRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (MavenArtifact element :
               artifactRegistryClient.listMavenArtifacts(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
      • listMavenArtifactsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListMavenArtifactsRequest,​ArtifactRegistryClient.ListMavenArtifactsPagedResponse> listMavenArtifactsPagedCallable()
        Lists maven artifacts.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListMavenArtifactsRequest request =
               ListMavenArtifactsRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<MavenArtifact> future =
               artifactRegistryClient.listMavenArtifactsPagedCallable().futureCall(request);
           // Do something.
           for (MavenArtifact element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listMavenArtifactsCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListMavenArtifactsRequest,​ListMavenArtifactsResponse> listMavenArtifactsCallable()
        Lists maven artifacts.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListMavenArtifactsRequest request =
               ListMavenArtifactsRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             ListMavenArtifactsResponse response =
                 artifactRegistryClient.listMavenArtifactsCallable().call(request);
             for (MavenArtifact element : response.getMavenArtifactsList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getMavenArtifact

        public final MavenArtifact getMavenArtifact​(MavenArtifactName name)
        Gets a maven artifact.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           MavenArtifactName name =
               MavenArtifactName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]");
           MavenArtifact response = artifactRegistryClient.getMavenArtifact(name);
         }
         
        Parameters:
        name - Required. The name of the maven artifact.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getMavenArtifact

        public final MavenArtifact getMavenArtifact​(String name)
        Gets a maven artifact.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name =
               MavenArtifactName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]")
                   .toString();
           MavenArtifact response = artifactRegistryClient.getMavenArtifact(name);
         }
         
        Parameters:
        name - Required. The name of the maven artifact.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getMavenArtifact

        public final MavenArtifact getMavenArtifact​(GetMavenArtifactRequest request)
        Gets a maven artifact.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetMavenArtifactRequest request =
               GetMavenArtifactRequest.newBuilder()
                   .setName(
                       MavenArtifactName.of(
                               "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]")
                           .toString())
                   .build();
           MavenArtifact response = artifactRegistryClient.getMavenArtifact(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
      • getMavenArtifactCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetMavenArtifactRequest,​MavenArtifact> getMavenArtifactCallable()
        Gets a maven artifact.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetMavenArtifactRequest request =
               GetMavenArtifactRequest.newBuilder()
                   .setName(
                       MavenArtifactName.of(
                               "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[MAVEN_ARTIFACT]")
                           .toString())
                   .build();
           ApiFuture<MavenArtifact> future =
               artifactRegistryClient.getMavenArtifactCallable().futureCall(request);
           // Do something.
           MavenArtifact response = future.get();
         }
         
      • listNpmPackages

        public final ArtifactRegistryClient.ListNpmPackagesPagedResponse listNpmPackages​(RepositoryName parent)
        Lists npm packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
           for (NpmPackage element : artifactRegistryClient.listNpmPackages(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the parent resource whose npm packages will be listed.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listNpmPackages

        public final ArtifactRegistryClient.ListNpmPackagesPagedResponse listNpmPackages​(String parent)
        Lists npm packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
           for (NpmPackage element : artifactRegistryClient.listNpmPackages(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the parent resource whose npm packages will be listed.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listNpmPackages

        public final ArtifactRegistryClient.ListNpmPackagesPagedResponse listNpmPackages​(ListNpmPackagesRequest request)
        Lists npm packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListNpmPackagesRequest request =
               ListNpmPackagesRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (NpmPackage element : artifactRegistryClient.listNpmPackages(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
      • listNpmPackagesPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListNpmPackagesRequest,​ArtifactRegistryClient.ListNpmPackagesPagedResponse> listNpmPackagesPagedCallable()
        Lists npm packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListNpmPackagesRequest request =
               ListNpmPackagesRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<NpmPackage> future =
               artifactRegistryClient.listNpmPackagesPagedCallable().futureCall(request);
           // Do something.
           for (NpmPackage element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listNpmPackagesCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListNpmPackagesRequest,​ListNpmPackagesResponse> listNpmPackagesCallable()
        Lists npm packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListNpmPackagesRequest request =
               ListNpmPackagesRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             ListNpmPackagesResponse response =
                 artifactRegistryClient.listNpmPackagesCallable().call(request);
             for (NpmPackage element : response.getNpmPackagesList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getNpmPackage

        public final NpmPackage getNpmPackage​(NpmPackageName name)
        Gets a npm package.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           NpmPackageName name =
               NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]");
           NpmPackage response = artifactRegistryClient.getNpmPackage(name);
         }
         
        Parameters:
        name - Required. The name of the npm package.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getNpmPackage

        public final NpmPackage getNpmPackage​(String name)
        Gets a npm package.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name =
               NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]").toString();
           NpmPackage response = artifactRegistryClient.getNpmPackage(name);
         }
         
        Parameters:
        name - Required. The name of the npm package.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getNpmPackage

        public final NpmPackage getNpmPackage​(GetNpmPackageRequest request)
        Gets a npm package.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetNpmPackageRequest request =
               GetNpmPackageRequest.newBuilder()
                   .setName(
                       NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]")
                           .toString())
                   .build();
           NpmPackage response = artifactRegistryClient.getNpmPackage(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
      • getNpmPackageCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetNpmPackageRequest,​NpmPackage> getNpmPackageCallable()
        Gets a npm package.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetNpmPackageRequest request =
               GetNpmPackageRequest.newBuilder()
                   .setName(
                       NpmPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[NPM_PACKAGE]")
                           .toString())
                   .build();
           ApiFuture<NpmPackage> future =
               artifactRegistryClient.getNpmPackageCallable().futureCall(request);
           // Do something.
           NpmPackage response = future.get();
         }
         
      • listPythonPackages

        public final ArtifactRegistryClient.ListPythonPackagesPagedResponse listPythonPackages​(RepositoryName parent)
        Lists python packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
           for (PythonPackage element : artifactRegistryClient.listPythonPackages(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the parent resource whose python packages will be listed.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listPythonPackages

        public final ArtifactRegistryClient.ListPythonPackagesPagedResponse listPythonPackages​(String parent)
        Lists python packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
           for (PythonPackage element : artifactRegistryClient.listPythonPackages(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the parent resource whose python packages will be listed.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listPythonPackages

        public final ArtifactRegistryClient.ListPythonPackagesPagedResponse listPythonPackages​(ListPythonPackagesRequest request)
        Lists python packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListPythonPackagesRequest request =
               ListPythonPackagesRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (PythonPackage element :
               artifactRegistryClient.listPythonPackages(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
      • listPythonPackagesPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListPythonPackagesRequest,​ArtifactRegistryClient.ListPythonPackagesPagedResponse> listPythonPackagesPagedCallable()
        Lists python packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListPythonPackagesRequest request =
               ListPythonPackagesRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<PythonPackage> future =
               artifactRegistryClient.listPythonPackagesPagedCallable().futureCall(request);
           // Do something.
           for (PythonPackage element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listPythonPackagesCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListPythonPackagesRequest,​ListPythonPackagesResponse> listPythonPackagesCallable()
        Lists python packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListPythonPackagesRequest request =
               ListPythonPackagesRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             ListPythonPackagesResponse response =
                 artifactRegistryClient.listPythonPackagesCallable().call(request);
             for (PythonPackage element : response.getPythonPackagesList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getPythonPackage

        public final PythonPackage getPythonPackage​(PythonPackageName name)
        Gets a python package.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           PythonPackageName name =
               PythonPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]");
           PythonPackage response = artifactRegistryClient.getPythonPackage(name);
         }
         
        Parameters:
        name - Required. The name of the python package.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getPythonPackage

        public final PythonPackage getPythonPackage​(String name)
        Gets a python package.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name =
               PythonPackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]")
                   .toString();
           PythonPackage response = artifactRegistryClient.getPythonPackage(name);
         }
         
        Parameters:
        name - Required. The name of the python package.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getPythonPackage

        public final PythonPackage getPythonPackage​(GetPythonPackageRequest request)
        Gets a python package.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetPythonPackageRequest request =
               GetPythonPackageRequest.newBuilder()
                   .setName(
                       PythonPackageName.of(
                               "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]")
                           .toString())
                   .build();
           PythonPackage response = artifactRegistryClient.getPythonPackage(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
      • getPythonPackageCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetPythonPackageRequest,​PythonPackage> getPythonPackageCallable()
        Gets a python package.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetPythonPackageRequest request =
               GetPythonPackageRequest.newBuilder()
                   .setName(
                       PythonPackageName.of(
                               "[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PYTHON_PACKAGE]")
                           .toString())
                   .build();
           ApiFuture<PythonPackage> future =
               artifactRegistryClient.getPythonPackageCallable().futureCall(request);
           // Do something.
           PythonPackage response = future.get();
         }
         
      • importAptArtifactsAsync

        public final com.google.api.gax.longrunning.OperationFuture<ImportAptArtifactsResponse,​ImportAptArtifactsMetadata> importAptArtifactsAsync​(ImportAptArtifactsRequest request)
        Imports Apt artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ImportAptArtifactsRequest request =
               ImportAptArtifactsRequest.newBuilder().setParent("parent-995424086").build();
           ImportAptArtifactsResponse response =
               artifactRegistryClient.importAptArtifactsAsync(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
      • importAptArtifactsOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<ImportAptArtifactsRequest,​ImportAptArtifactsResponse,​ImportAptArtifactsMetadata> importAptArtifactsOperationCallable()
        Imports Apt artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ImportAptArtifactsRequest request =
               ImportAptArtifactsRequest.newBuilder().setParent("parent-995424086").build();
           OperationFuture<ImportAptArtifactsResponse, ImportAptArtifactsMetadata> future =
               artifactRegistryClient.importAptArtifactsOperationCallable().futureCall(request);
           // Do something.
           ImportAptArtifactsResponse response = future.get();
         }
         
      • importAptArtifactsCallable

        public final com.google.api.gax.rpc.UnaryCallable<ImportAptArtifactsRequest,​com.google.longrunning.Operation> importAptArtifactsCallable()
        Imports Apt artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ImportAptArtifactsRequest request =
               ImportAptArtifactsRequest.newBuilder().setParent("parent-995424086").build();
           ApiFuture<Operation> future =
               artifactRegistryClient.importAptArtifactsCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • importYumArtifactsAsync

        public final com.google.api.gax.longrunning.OperationFuture<ImportYumArtifactsResponse,​ImportYumArtifactsMetadata> importYumArtifactsAsync​(ImportYumArtifactsRequest request)
        Imports Yum (RPM) artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ImportYumArtifactsRequest request =
               ImportYumArtifactsRequest.newBuilder().setParent("parent-995424086").build();
           ImportYumArtifactsResponse response =
               artifactRegistryClient.importYumArtifactsAsync(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
      • importYumArtifactsOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<ImportYumArtifactsRequest,​ImportYumArtifactsResponse,​ImportYumArtifactsMetadata> importYumArtifactsOperationCallable()
        Imports Yum (RPM) artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ImportYumArtifactsRequest request =
               ImportYumArtifactsRequest.newBuilder().setParent("parent-995424086").build();
           OperationFuture<ImportYumArtifactsResponse, ImportYumArtifactsMetadata> future =
               artifactRegistryClient.importYumArtifactsOperationCallable().futureCall(request);
           // Do something.
           ImportYumArtifactsResponse response = future.get();
         }
         
      • importYumArtifactsCallable

        public final com.google.api.gax.rpc.UnaryCallable<ImportYumArtifactsRequest,​com.google.longrunning.Operation> importYumArtifactsCallable()
        Imports Yum (RPM) artifacts. The returned Operation will complete once the resources are imported. Package, Version, and File resources are created based on the imported artifacts. Imported artifacts that conflict with existing resources are ignored.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ImportYumArtifactsRequest request =
               ImportYumArtifactsRequest.newBuilder().setParent("parent-995424086").build();
           ApiFuture<Operation> future =
               artifactRegistryClient.importYumArtifactsCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • listRepositories

        public final ArtifactRegistryClient.ListRepositoriesPagedResponse listRepositories​(LocationName parent)
        Lists repositories.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
           for (Repository element : artifactRegistryClient.listRepositories(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the parent resource whose repositories will be listed.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listRepositories

        public final ArtifactRegistryClient.ListRepositoriesPagedResponse listRepositories​(String parent)
        Lists repositories.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
           for (Repository element : artifactRegistryClient.listRepositories(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the parent resource whose repositories will be listed.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listRepositories

        public final ArtifactRegistryClient.ListRepositoriesPagedResponse listRepositories​(ListRepositoriesRequest request)
        Lists repositories.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListRepositoriesRequest request =
               ListRepositoriesRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (Repository element : artifactRegistryClient.listRepositories(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
      • listRepositoriesPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListRepositoriesRequest,​ArtifactRegistryClient.ListRepositoriesPagedResponse> listRepositoriesPagedCallable()
        Lists repositories.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListRepositoriesRequest request =
               ListRepositoriesRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<Repository> future =
               artifactRegistryClient.listRepositoriesPagedCallable().futureCall(request);
           // Do something.
           for (Repository element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listRepositoriesCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListRepositoriesRequest,​ListRepositoriesResponse> listRepositoriesCallable()
        Lists repositories.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListRepositoriesRequest request =
               ListRepositoriesRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             ListRepositoriesResponse response =
                 artifactRegistryClient.listRepositoriesCallable().call(request);
             for (Repository element : response.getRepositoriesList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getRepository

        public final Repository getRepository​(RepositoryName name)
        Gets a repository.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           RepositoryName name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
           Repository response = artifactRegistryClient.getRepository(name);
         }
         
        Parameters:
        name - Required. The name of the repository to retrieve.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getRepository

        public final Repository getRepository​(String name)
        Gets a repository.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
           Repository response = artifactRegistryClient.getRepository(name);
         }
         
        Parameters:
        name - Required. The name of the repository to retrieve.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getRepository

        public final Repository getRepository​(GetRepositoryRequest request)
        Gets a repository.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetRepositoryRequest request =
               GetRepositoryRequest.newBuilder()
                   .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .build();
           Repository response = artifactRegistryClient.getRepository(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
      • getRepositoryCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetRepositoryRequest,​Repository> getRepositoryCallable()
        Gets a repository.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetRepositoryRequest request =
               GetRepositoryRequest.newBuilder()
                   .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .build();
           ApiFuture<Repository> future =
               artifactRegistryClient.getRepositoryCallable().futureCall(request);
           // Do something.
           Repository response = future.get();
         }
         
      • createRepositoryAsync

        public final com.google.api.gax.longrunning.OperationFuture<Repository,​OperationMetadata> createRepositoryAsync​(LocationName parent,
                                                                                                                              Repository repository,
                                                                                                                              String repositoryId)
        Creates a repository. The returned Operation will finish once the repository has been created. Its response will be the created Repository.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
           Repository repository = Repository.newBuilder().build();
           String repositoryId = "repositoryId2113747461";
           Repository response =
               artifactRegistryClient.createRepositoryAsync(parent, repository, repositoryId).get();
         }
         
        Parameters:
        parent - Required. The name of the parent resource where the repository will be created.
        repository - The repository to be created.
        repositoryId - The repository id to use for this repository.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createRepositoryAsync

        public final com.google.api.gax.longrunning.OperationFuture<Repository,​OperationMetadata> createRepositoryAsync​(String parent,
                                                                                                                              Repository repository,
                                                                                                                              String repositoryId)
        Creates a repository. The returned Operation will finish once the repository has been created. Its response will be the created Repository.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
           Repository repository = Repository.newBuilder().build();
           String repositoryId = "repositoryId2113747461";
           Repository response =
               artifactRegistryClient.createRepositoryAsync(parent, repository, repositoryId).get();
         }
         
        Parameters:
        parent - Required. The name of the parent resource where the repository will be created.
        repository - The repository to be created.
        repositoryId - The repository id to use for this repository.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createRepositoryAsync

        public final com.google.api.gax.longrunning.OperationFuture<Repository,​OperationMetadata> createRepositoryAsync​(CreateRepositoryRequest request)
        Creates a repository. The returned Operation will finish once the repository has been created. Its response will be the created Repository.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           CreateRepositoryRequest request =
               CreateRepositoryRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setRepositoryId("repositoryId2113747461")
                   .setRepository(Repository.newBuilder().build())
                   .build();
           Repository response = artifactRegistryClient.createRepositoryAsync(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
      • createRepositoryOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<CreateRepositoryRequest,​Repository,​OperationMetadata> createRepositoryOperationCallable()
        Creates a repository. The returned Operation will finish once the repository has been created. Its response will be the created Repository.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           CreateRepositoryRequest request =
               CreateRepositoryRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setRepositoryId("repositoryId2113747461")
                   .setRepository(Repository.newBuilder().build())
                   .build();
           OperationFuture<Repository, OperationMetadata> future =
               artifactRegistryClient.createRepositoryOperationCallable().futureCall(request);
           // Do something.
           Repository response = future.get();
         }
         
      • createRepositoryCallable

        public final com.google.api.gax.rpc.UnaryCallable<CreateRepositoryRequest,​com.google.longrunning.Operation> createRepositoryCallable()
        Creates a repository. The returned Operation will finish once the repository has been created. Its response will be the created Repository.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           CreateRepositoryRequest request =
               CreateRepositoryRequest.newBuilder()
                   .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                   .setRepositoryId("repositoryId2113747461")
                   .setRepository(Repository.newBuilder().build())
                   .build();
           ApiFuture<Operation> future =
               artifactRegistryClient.createRepositoryCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • updateRepository

        public final Repository updateRepository​(Repository repository,
                                                 com.google.protobuf.FieldMask updateMask)
        Updates a repository.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           Repository repository = Repository.newBuilder().build();
           FieldMask updateMask = FieldMask.newBuilder().build();
           Repository response = artifactRegistryClient.updateRepository(repository, updateMask);
         }
         
        Parameters:
        repository - The repository that replaces the resource on the server.
        updateMask - The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateRepository

        public final Repository updateRepository​(UpdateRepositoryRequest request)
        Updates a repository.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           UpdateRepositoryRequest request =
               UpdateRepositoryRequest.newBuilder()
                   .setRepository(Repository.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .build();
           Repository response = artifactRegistryClient.updateRepository(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
      • updateRepositoryCallable

        public final com.google.api.gax.rpc.UnaryCallable<UpdateRepositoryRequest,​Repository> updateRepositoryCallable()
        Updates a repository.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           UpdateRepositoryRequest request =
               UpdateRepositoryRequest.newBuilder()
                   .setRepository(Repository.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .build();
           ApiFuture<Repository> future =
               artifactRegistryClient.updateRepositoryCallable().futureCall(request);
           // Do something.
           Repository response = future.get();
         }
         
      • deleteRepositoryAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteRepositoryAsync​(RepositoryName name)
        Deletes a repository and all of its contents. The returned Operation will finish once the repository has been deleted. It will not have any Operation metadata and will return a google.protobuf.Empty response.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           RepositoryName name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
           artifactRegistryClient.deleteRepositoryAsync(name).get();
         }
         
        Parameters:
        name - Required. The name of the repository to delete.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteRepositoryAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteRepositoryAsync​(String name)
        Deletes a repository and all of its contents. The returned Operation will finish once the repository has been deleted. It will not have any Operation metadata and will return a google.protobuf.Empty response.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
           artifactRegistryClient.deleteRepositoryAsync(name).get();
         }
         
        Parameters:
        name - Required. The name of the repository to delete.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteRepositoryAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteRepositoryAsync​(DeleteRepositoryRequest request)
        Deletes a repository and all of its contents. The returned Operation will finish once the repository has been deleted. It will not have any Operation metadata and will return a google.protobuf.Empty response.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           DeleteRepositoryRequest request =
               DeleteRepositoryRequest.newBuilder()
                   .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .build();
           artifactRegistryClient.deleteRepositoryAsync(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
      • deleteRepositoryOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<DeleteRepositoryRequest,​com.google.protobuf.Empty,​OperationMetadata> deleteRepositoryOperationCallable()
        Deletes a repository and all of its contents. The returned Operation will finish once the repository has been deleted. It will not have any Operation metadata and will return a google.protobuf.Empty response.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           DeleteRepositoryRequest request =
               DeleteRepositoryRequest.newBuilder()
                   .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .build();
           OperationFuture<Empty, OperationMetadata> future =
               artifactRegistryClient.deleteRepositoryOperationCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • deleteRepositoryCallable

        public final com.google.api.gax.rpc.UnaryCallable<DeleteRepositoryRequest,​com.google.longrunning.Operation> deleteRepositoryCallable()
        Deletes a repository and all of its contents. The returned Operation will finish once the repository has been deleted. It will not have any Operation metadata and will return a google.protobuf.Empty response.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           DeleteRepositoryRequest request =
               DeleteRepositoryRequest.newBuilder()
                   .setName(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .build();
           ApiFuture<Operation> future =
               artifactRegistryClient.deleteRepositoryCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • listPackages

        public final ArtifactRegistryClient.ListPackagesPagedResponse listPackages​(RepositoryName parent)
        Lists packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
           for (Package element : artifactRegistryClient.listPackages(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the parent resource whose packages will be listed.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listPackages

        public final ArtifactRegistryClient.ListPackagesPagedResponse listPackages​(String parent)
        Lists packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
           for (Package element : artifactRegistryClient.listPackages(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the parent resource whose packages will be listed.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listPackages

        public final ArtifactRegistryClient.ListPackagesPagedResponse listPackages​(ListPackagesRequest request)
        Lists packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListPackagesRequest request =
               ListPackagesRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (Package element : artifactRegistryClient.listPackages(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
      • listPackagesPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListPackagesRequest,​ArtifactRegistryClient.ListPackagesPagedResponse> listPackagesPagedCallable()
        Lists packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListPackagesRequest request =
               ListPackagesRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<Package> future =
               artifactRegistryClient.listPackagesPagedCallable().futureCall(request);
           // Do something.
           for (Package element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listPackagesCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListPackagesRequest,​ListPackagesResponse> listPackagesCallable()
        Lists packages.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListPackagesRequest request =
               ListPackagesRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             ListPackagesResponse response = artifactRegistryClient.listPackagesCallable().call(request);
             for (Package element : response.getPackagesList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getPackage

        public final Package getPackage​(PackageName name)
        Gets a package.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           PackageName name = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]");
           Package response = artifactRegistryClient.getPackage(name);
         }
         
        Parameters:
        name - Required. The name of the package to retrieve.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getPackage

        public final Package getPackage​(String name)
        Gets a package.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name =
               PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString();
           Package response = artifactRegistryClient.getPackage(name);
         }
         
        Parameters:
        name - Required. The name of the package to retrieve.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getPackage

        public final Package getPackage​(GetPackageRequest request)
        Gets a package.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetPackageRequest request =
               GetPackageRequest.newBuilder()
                   .setName(
                       PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString())
                   .build();
           Package response = artifactRegistryClient.getPackage(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
      • getPackageCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetPackageRequest,​Package> getPackageCallable()
        Gets a package.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetPackageRequest request =
               GetPackageRequest.newBuilder()
                   .setName(
                       PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString())
                   .build();
           ApiFuture<Package> future = artifactRegistryClient.getPackageCallable().futureCall(request);
           // Do something.
           Package response = future.get();
         }
         
      • deletePackageAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deletePackageAsync​(PackageName name)
        Deletes a package and all of its versions and tags. The returned operation will complete once the package has been deleted.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           PackageName name = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]");
           artifactRegistryClient.deletePackageAsync(name).get();
         }
         
        Parameters:
        name - Required. The name of the package to delete.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deletePackageAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deletePackageAsync​(String name)
        Deletes a package and all of its versions and tags. The returned operation will complete once the package has been deleted.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name =
               PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString();
           artifactRegistryClient.deletePackageAsync(name).get();
         }
         
        Parameters:
        name - Required. The name of the package to delete.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deletePackageAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deletePackageAsync​(DeletePackageRequest request)
        Deletes a package and all of its versions and tags. The returned operation will complete once the package has been deleted.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           DeletePackageRequest request =
               DeletePackageRequest.newBuilder()
                   .setName(
                       PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString())
                   .build();
           artifactRegistryClient.deletePackageAsync(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
      • deletePackageOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<DeletePackageRequest,​com.google.protobuf.Empty,​OperationMetadata> deletePackageOperationCallable()
        Deletes a package and all of its versions and tags. The returned operation will complete once the package has been deleted.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           DeletePackageRequest request =
               DeletePackageRequest.newBuilder()
                   .setName(
                       PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString())
                   .build();
           OperationFuture<Empty, OperationMetadata> future =
               artifactRegistryClient.deletePackageOperationCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • deletePackageCallable

        public final com.google.api.gax.rpc.UnaryCallable<DeletePackageRequest,​com.google.longrunning.Operation> deletePackageCallable()
        Deletes a package and all of its versions and tags. The returned operation will complete once the package has been deleted.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           DeletePackageRequest request =
               DeletePackageRequest.newBuilder()
                   .setName(
                       PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString())
                   .build();
           ApiFuture<Operation> future =
               artifactRegistryClient.deletePackageCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • listVersions

        public final ArtifactRegistryClient.ListVersionsPagedResponse listVersions​(String parent)
        Lists versions.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String parent = "parent-995424086";
           for (Version element : artifactRegistryClient.listVersions(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - The name of the parent resource whose versions will be listed.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listVersions

        public final ArtifactRegistryClient.ListVersionsPagedResponse listVersions​(ListVersionsRequest request)
        Lists versions.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListVersionsRequest request =
               ListVersionsRequest.newBuilder()
                   .setParent("parent-995424086")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setView(VersionView.forNumber(0))
                   .setOrderBy("orderBy-1207110587")
                   .build();
           for (Version element : artifactRegistryClient.listVersions(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
      • listVersionsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListVersionsRequest,​ArtifactRegistryClient.ListVersionsPagedResponse> listVersionsPagedCallable()
        Lists versions.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListVersionsRequest request =
               ListVersionsRequest.newBuilder()
                   .setParent("parent-995424086")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setView(VersionView.forNumber(0))
                   .setOrderBy("orderBy-1207110587")
                   .build();
           ApiFuture<Version> future =
               artifactRegistryClient.listVersionsPagedCallable().futureCall(request);
           // Do something.
           for (Version element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listVersionsCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListVersionsRequest,​ListVersionsResponse> listVersionsCallable()
        Lists versions.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListVersionsRequest request =
               ListVersionsRequest.newBuilder()
                   .setParent("parent-995424086")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setView(VersionView.forNumber(0))
                   .setOrderBy("orderBy-1207110587")
                   .build();
           while (true) {
             ListVersionsResponse response = artifactRegistryClient.listVersionsCallable().call(request);
             for (Version element : response.getVersionsList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getVersion

        public final Version getVersion​(String name)
        Gets a version

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name = "name3373707";
           Version response = artifactRegistryClient.getVersion(name);
         }
         
        Parameters:
        name - The name of the version to retrieve.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getVersion

        public final Version getVersion​(GetVersionRequest request)
        Gets a version

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetVersionRequest request =
               GetVersionRequest.newBuilder()
                   .setName("name3373707")
                   .setView(VersionView.forNumber(0))
                   .build();
           Version response = artifactRegistryClient.getVersion(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
      • getVersionCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetVersionRequest,​Version> getVersionCallable()
        Gets a version

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetVersionRequest request =
               GetVersionRequest.newBuilder()
                   .setName("name3373707")
                   .setView(VersionView.forNumber(0))
                   .build();
           ApiFuture<Version> future = artifactRegistryClient.getVersionCallable().futureCall(request);
           // Do something.
           Version response = future.get();
         }
         
      • deleteVersionAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteVersionAsync​(String name)
        Deletes a version and all of its content. The returned operation will complete once the version has been deleted.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name = "name3373707";
           artifactRegistryClient.deleteVersionAsync(name).get();
         }
         
        Parameters:
        name - The name of the version to delete.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteVersionAsync

        public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,​OperationMetadata> deleteVersionAsync​(DeleteVersionRequest request)
        Deletes a version and all of its content. The returned operation will complete once the version has been deleted.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           DeleteVersionRequest request =
               DeleteVersionRequest.newBuilder().setName("name3373707").setForce(true).build();
           artifactRegistryClient.deleteVersionAsync(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
      • deleteVersionOperationCallable

        public final com.google.api.gax.rpc.OperationCallable<DeleteVersionRequest,​com.google.protobuf.Empty,​OperationMetadata> deleteVersionOperationCallable()
        Deletes a version and all of its content. The returned operation will complete once the version has been deleted.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           DeleteVersionRequest request =
               DeleteVersionRequest.newBuilder().setName("name3373707").setForce(true).build();
           OperationFuture<Empty, OperationMetadata> future =
               artifactRegistryClient.deleteVersionOperationCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • deleteVersionCallable

        public final com.google.api.gax.rpc.UnaryCallable<DeleteVersionRequest,​com.google.longrunning.Operation> deleteVersionCallable()
        Deletes a version and all of its content. The returned operation will complete once the version has been deleted.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           DeleteVersionRequest request =
               DeleteVersionRequest.newBuilder().setName("name3373707").setForce(true).build();
           ApiFuture<Operation> future =
               artifactRegistryClient.deleteVersionCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • listFiles

        public final ArtifactRegistryClient.ListFilesPagedResponse listFiles​(RepositoryName parent)
        Lists files.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           RepositoryName parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]");
           for (File element : artifactRegistryClient.listFiles(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the repository whose files will be listed. For example: "projects/p1/locations/us-central1/repositories/repo1
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listFiles

        public final ArtifactRegistryClient.ListFilesPagedResponse listFiles​(String parent)
        Lists files.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String parent = RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString();
           for (File element : artifactRegistryClient.listFiles(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - Required. The name of the repository whose files will be listed. For example: "projects/p1/locations/us-central1/repositories/repo1
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listFiles

        public final ArtifactRegistryClient.ListFilesPagedResponse listFiles​(ListFilesRequest request)
        Lists files.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListFilesRequest request =
               ListFilesRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           for (File element : artifactRegistryClient.listFiles(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
      • listFilesPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListFilesRequest,​ArtifactRegistryClient.ListFilesPagedResponse> listFilesPagedCallable()
        Lists files.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListFilesRequest request =
               ListFilesRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           ApiFuture<File> future = artifactRegistryClient.listFilesPagedCallable().futureCall(request);
           // Do something.
           for (File element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listFilesCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListFilesRequest,​ListFilesResponse> listFilesCallable()
        Lists files.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListFilesRequest request =
               ListFilesRequest.newBuilder()
                   .setParent(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .setOrderBy("orderBy-1207110587")
                   .build();
           while (true) {
             ListFilesResponse response = artifactRegistryClient.listFilesCallable().call(request);
             for (File element : response.getFilesList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getFile

        public final File getFile​(FileName name)
        Gets a file.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           FileName name = FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]");
           File response = artifactRegistryClient.getFile(name);
         }
         
        Parameters:
        name - Required. The name of the file to retrieve.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getFile

        public final File getFile​(String name)
        Gets a file.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name = FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]").toString();
           File response = artifactRegistryClient.getFile(name);
         }
         
        Parameters:
        name - Required. The name of the file to retrieve.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getFile

        public final File getFile​(GetFileRequest request)
        Gets a file.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetFileRequest request =
               GetFileRequest.newBuilder()
                   .setName(FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]").toString())
                   .build();
           File response = artifactRegistryClient.getFile(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
      • getFileCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetFileRequest,​File> getFileCallable()
        Gets a file.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetFileRequest request =
               GetFileRequest.newBuilder()
                   .setName(FileName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[FILE]").toString())
                   .build();
           ApiFuture<File> future = artifactRegistryClient.getFileCallable().futureCall(request);
           // Do something.
           File response = future.get();
         }
         
      • listTags

        public final ArtifactRegistryClient.ListTagsPagedResponse listTags​(String parent)
        Lists tags.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String parent = "parent-995424086";
           for (Tag element : artifactRegistryClient.listTags(parent).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        parent - The name of the parent resource whose tags will be listed.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listTags

        public final ArtifactRegistryClient.ListTagsPagedResponse listTags​(ListTagsRequest request)
        Lists tags.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListTagsRequest request =
               ListTagsRequest.newBuilder()
                   .setParent("parent-995424086")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (Tag element : artifactRegistryClient.listTags(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
      • listTagsPagedCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListTagsRequest,​ArtifactRegistryClient.ListTagsPagedResponse> listTagsPagedCallable()
        Lists tags.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListTagsRequest request =
               ListTagsRequest.newBuilder()
                   .setParent("parent-995424086")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<Tag> future = artifactRegistryClient.listTagsPagedCallable().futureCall(request);
           // Do something.
           for (Tag element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listTagsCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListTagsRequest,​ListTagsResponse> listTagsCallable()
        Lists tags.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListTagsRequest request =
               ListTagsRequest.newBuilder()
                   .setParent("parent-995424086")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             ListTagsResponse response = artifactRegistryClient.listTagsCallable().call(request);
             for (Tag element : response.getTagsList()) {
               // doThingsWith(element);
             }
             String nextPageToken = response.getNextPageToken();
             if (!Strings.isNullOrEmpty(nextPageToken)) {
               request = request.toBuilder().setPageToken(nextPageToken).build();
             } else {
               break;
             }
           }
         }
         
      • getTag

        public final Tag getTag​(String name)
        Gets a tag.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name = "name3373707";
           Tag response = artifactRegistryClient.getTag(name);
         }
         
        Parameters:
        name - The name of the tag to retrieve.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getTag

        public final Tag getTag​(GetTagRequest request)
        Gets a tag.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetTagRequest request = GetTagRequest.newBuilder().setName("name3373707").build();
           Tag response = artifactRegistryClient.getTag(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
      • getTagCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetTagRequest,​Tag> getTagCallable()
        Gets a tag.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetTagRequest request = GetTagRequest.newBuilder().setName("name3373707").build();
           ApiFuture<Tag> future = artifactRegistryClient.getTagCallable().futureCall(request);
           // Do something.
           Tag response = future.get();
         }
         
      • createTag

        public final Tag createTag​(String parent,
                                   Tag tag,
                                   String tagId)
        Creates a tag.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String parent = "parent-995424086";
           Tag tag = Tag.newBuilder().build();
           String tagId = "tagId110119509";
           Tag response = artifactRegistryClient.createTag(parent, tag, tagId);
         }
         
        Parameters:
        parent - The name of the parent resource where the tag will be created.
        tag - The tag to be created.
        tagId - The tag id to use for this repository.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createTag

        public final Tag createTag​(CreateTagRequest request)
        Creates a tag.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           CreateTagRequest request =
               CreateTagRequest.newBuilder()
                   .setParent("parent-995424086")
                   .setTagId("tagId110119509")
                   .setTag(Tag.newBuilder().build())
                   .build();
           Tag response = artifactRegistryClient.createTag(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
      • createTagCallable

        public final com.google.api.gax.rpc.UnaryCallable<CreateTagRequest,​Tag> createTagCallable()
        Creates a tag.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           CreateTagRequest request =
               CreateTagRequest.newBuilder()
                   .setParent("parent-995424086")
                   .setTagId("tagId110119509")
                   .setTag(Tag.newBuilder().build())
                   .build();
           ApiFuture<Tag> future = artifactRegistryClient.createTagCallable().futureCall(request);
           // Do something.
           Tag response = future.get();
         }
         
      • updateTag

        public final Tag updateTag​(Tag tag,
                                   com.google.protobuf.FieldMask updateMask)
        Updates a tag.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           Tag tag = Tag.newBuilder().build();
           FieldMask updateMask = FieldMask.newBuilder().build();
           Tag response = artifactRegistryClient.updateTag(tag, updateMask);
         }
         
        Parameters:
        tag - The tag that replaces the resource on the server.
        updateMask - The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateTag

        public final Tag updateTag​(UpdateTagRequest request)
        Updates a tag.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           UpdateTagRequest request =
               UpdateTagRequest.newBuilder()
                   .setTag(Tag.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .build();
           Tag response = artifactRegistryClient.updateTag(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
      • updateTagCallable

        public final com.google.api.gax.rpc.UnaryCallable<UpdateTagRequest,​Tag> updateTagCallable()
        Updates a tag.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           UpdateTagRequest request =
               UpdateTagRequest.newBuilder()
                   .setTag(Tag.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .build();
           ApiFuture<Tag> future = artifactRegistryClient.updateTagCallable().futureCall(request);
           // Do something.
           Tag response = future.get();
         }
         
      • deleteTag

        public final void deleteTag​(String name)
        Deletes a tag.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name = "name3373707";
           artifactRegistryClient.deleteTag(name);
         }
         
        Parameters:
        name - The name of the tag to delete.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteTag

        public final void deleteTag​(DeleteTagRequest request)
        Deletes a tag.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           DeleteTagRequest request = DeleteTagRequest.newBuilder().setName("name3373707").build();
           artifactRegistryClient.deleteTag(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
      • deleteTagCallable

        public final com.google.api.gax.rpc.UnaryCallable<DeleteTagRequest,​com.google.protobuf.Empty> deleteTagCallable()
        Deletes a tag.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           DeleteTagRequest request = DeleteTagRequest.newBuilder().setName("name3373707").build();
           ApiFuture<Empty> future = artifactRegistryClient.deleteTagCallable().futureCall(request);
           // Do something.
           future.get();
         }
         
      • setIamPolicy

        public final com.google.iam.v1.Policy setIamPolicy​(com.google.iam.v1.SetIamPolicyRequest request)
        Updates the IAM policy for a given resource.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           SetIamPolicyRequest request =
               SetIamPolicyRequest.newBuilder()
                   .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setPolicy(Policy.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .build();
           Policy response = artifactRegistryClient.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()
        Updates the IAM policy for a given resource.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           SetIamPolicyRequest request =
               SetIamPolicyRequest.newBuilder()
                   .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setPolicy(Policy.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .build();
           ApiFuture<Policy> future = artifactRegistryClient.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 IAM policy for a given resource.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetIamPolicyRequest request =
               GetIamPolicyRequest.newBuilder()
                   .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .setOptions(GetPolicyOptions.newBuilder().build())
                   .build();
           Policy response = artifactRegistryClient.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 IAM policy for a given resource.

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

        public final com.google.iam.v1.TestIamPermissionsResponse testIamPermissions​(com.google.iam.v1.TestIamPermissionsRequest request)
        Tests if the caller has a list of permissions on a resource.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           TestIamPermissionsRequest request =
               TestIamPermissionsRequest.newBuilder()
                   .setResource(RepositoryName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]").toString())
                   .addAllPermissions(new ArrayList<String>())
                   .build();
           TestIamPermissionsResponse response = artifactRegistryClient.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()
        Tests if the caller has a list of permissions on a resource.

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

        public final ProjectSettings getProjectSettings​(ProjectSettingsName name)
        Retrieves the Settings for the Project.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ProjectSettingsName name = ProjectSettingsName.of("[PROJECT]");
           ProjectSettings response = artifactRegistryClient.getProjectSettings(name);
         }
         
        Parameters:
        name - Required. The name of the projectSettings resource.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getProjectSettings

        public final ProjectSettings getProjectSettings​(String name)
        Retrieves the Settings for the Project.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name = ProjectSettingsName.of("[PROJECT]").toString();
           ProjectSettings response = artifactRegistryClient.getProjectSettings(name);
         }
         
        Parameters:
        name - Required. The name of the projectSettings resource.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getProjectSettings

        public final ProjectSettings getProjectSettings​(GetProjectSettingsRequest request)
        Retrieves the Settings for the Project.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetProjectSettingsRequest request =
               GetProjectSettingsRequest.newBuilder()
                   .setName(ProjectSettingsName.of("[PROJECT]").toString())
                   .build();
           ProjectSettings response = artifactRegistryClient.getProjectSettings(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
      • getProjectSettingsCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetProjectSettingsRequest,​ProjectSettings> getProjectSettingsCallable()
        Retrieves the Settings for the Project.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetProjectSettingsRequest request =
               GetProjectSettingsRequest.newBuilder()
                   .setName(ProjectSettingsName.of("[PROJECT]").toString())
                   .build();
           ApiFuture<ProjectSettings> future =
               artifactRegistryClient.getProjectSettingsCallable().futureCall(request);
           // Do something.
           ProjectSettings response = future.get();
         }
         
      • updateProjectSettings

        public final ProjectSettings updateProjectSettings​(ProjectSettings projectSettings,
                                                           com.google.protobuf.FieldMask updateMask)
        Updates the Settings for the Project.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ProjectSettings projectSettings = ProjectSettings.newBuilder().build();
           FieldMask updateMask = FieldMask.newBuilder().build();
           ProjectSettings response =
               artifactRegistryClient.updateProjectSettings(projectSettings, updateMask);
         }
         
        Parameters:
        projectSettings - The project settings.
        updateMask - Field mask to support partial updates.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateProjectSettings

        public final ProjectSettings updateProjectSettings​(UpdateProjectSettingsRequest request)
        Updates the Settings for the Project.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           UpdateProjectSettingsRequest request =
               UpdateProjectSettingsRequest.newBuilder()
                   .setProjectSettings(ProjectSettings.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .build();
           ProjectSettings response = artifactRegistryClient.updateProjectSettings(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
      • updateProjectSettingsCallable

        public final com.google.api.gax.rpc.UnaryCallable<UpdateProjectSettingsRequest,​ProjectSettings> updateProjectSettingsCallable()
        Updates the Settings for the Project.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           UpdateProjectSettingsRequest request =
               UpdateProjectSettingsRequest.newBuilder()
                   .setProjectSettings(ProjectSettings.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .build();
           ApiFuture<ProjectSettings> future =
               artifactRegistryClient.updateProjectSettingsCallable().futureCall(request);
           // Do something.
           ProjectSettings response = future.get();
         }
         
      • getVPCSCConfig

        public final VPCSCConfig getVPCSCConfig​(VpcscConfigName name)
        Retrieves the VPCSC Config for the Project.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           VpcscConfigName name = VpcscConfigName.of("[PROJECT]", "[LOCATION]");
           VPCSCConfig response = artifactRegistryClient.getVPCSCConfig(name);
         }
         
        Parameters:
        name - Required. The name of the VPCSCConfig resource.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getVPCSCConfig

        public final VPCSCConfig getVPCSCConfig​(String name)
        Retrieves the VPCSC Config for the Project.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           String name = VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString();
           VPCSCConfig response = artifactRegistryClient.getVPCSCConfig(name);
         }
         
        Parameters:
        name - Required. The name of the VPCSCConfig resource.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getVPCSCConfig

        public final VPCSCConfig getVPCSCConfig​(GetVPCSCConfigRequest request)
        Retrieves the VPCSC Config for the Project.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetVPCSCConfigRequest request =
               GetVPCSCConfigRequest.newBuilder()
                   .setName(VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString())
                   .build();
           VPCSCConfig response = artifactRegistryClient.getVPCSCConfig(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
      • getVPCSCConfigCallable

        public final com.google.api.gax.rpc.UnaryCallable<GetVPCSCConfigRequest,​VPCSCConfig> getVPCSCConfigCallable()
        Retrieves the VPCSC Config for the Project.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetVPCSCConfigRequest request =
               GetVPCSCConfigRequest.newBuilder()
                   .setName(VpcscConfigName.of("[PROJECT]", "[LOCATION]").toString())
                   .build();
           ApiFuture<VPCSCConfig> future =
               artifactRegistryClient.getVPCSCConfigCallable().futureCall(request);
           // Do something.
           VPCSCConfig response = future.get();
         }
         
      • updateVPCSCConfig

        public final VPCSCConfig updateVPCSCConfig​(VPCSCConfig vpcscConfig,
                                                   com.google.protobuf.FieldMask updateMask)
        Updates the VPCSC Config for the Project.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           VPCSCConfig vpcscConfig = VPCSCConfig.newBuilder().build();
           FieldMask updateMask = FieldMask.newBuilder().build();
           VPCSCConfig response = artifactRegistryClient.updateVPCSCConfig(vpcscConfig, updateMask);
         }
         
        Parameters:
        vpcscConfig - The project config.
        updateMask - Field mask to support partial updates.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateVPCSCConfig

        public final VPCSCConfig updateVPCSCConfig​(UpdateVPCSCConfigRequest request)
        Updates the VPCSC Config for the Project.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           UpdateVPCSCConfigRequest request =
               UpdateVPCSCConfigRequest.newBuilder()
                   .setVpcscConfig(VPCSCConfig.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .build();
           VPCSCConfig response = artifactRegistryClient.updateVPCSCConfig(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
      • updateVPCSCConfigCallable

        public final com.google.api.gax.rpc.UnaryCallable<UpdateVPCSCConfigRequest,​VPCSCConfig> updateVPCSCConfigCallable()
        Updates the VPCSC Config for the Project.

        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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           UpdateVPCSCConfigRequest request =
               UpdateVPCSCConfigRequest.newBuilder()
                   .setVpcscConfig(VPCSCConfig.newBuilder().build())
                   .setUpdateMask(FieldMask.newBuilder().build())
                   .build();
           ApiFuture<VPCSCConfig> future =
               artifactRegistryClient.updateVPCSCConfigCallable().futureCall(request);
           // Do something.
           VPCSCConfig response = future.get();
         }
         
      • listLocations

        public final ArtifactRegistryClient.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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           for (Location element : artifactRegistryClient.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,​ArtifactRegistryClient.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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           ApiFuture<Location> future =
               artifactRegistryClient.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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           ListLocationsRequest request =
               ListLocationsRequest.newBuilder()
                   .setName("name3373707")
                   .setFilter("filter-1274492040")
                   .setPageSize(883849137)
                   .setPageToken("pageToken873572522")
                   .build();
           while (true) {
             ListLocationsResponse response =
                 artifactRegistryClient.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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
           Location response = artifactRegistryClient.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 (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
           GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
           ApiFuture<Location> future = artifactRegistryClient.getLocationCallable().futureCall(request);
           // Do something.
           Location 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