Class StorageControlClient

java.lang.Object
com.google.storage.control.v2.StorageControlClient
All Implemented Interfaces:
com.google.api.gax.core.BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class StorageControlClient extends Object implements com.google.api.gax.core.BackgroundResource
Service Description: StorageControl service includes selected control plane operations.

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
   BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]");
   Folder folder = Folder.newBuilder().build();
   String folderId = "folderId294109737";
   Folder response = storageControlClient.createFolder(parent, folder, folderId);
 }
 

Note: close() needs to be called on the StorageControlClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

CreateFolder

Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createFolder(CreateFolderRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createFolder(BucketName parent, Folder folder, String folderId)

  • createFolder(String parent, Folder folder, String folderId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createFolderCallable()

DeleteFolder

Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteFolder(DeleteFolderRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteFolder(FolderName name)

  • deleteFolder(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteFolderCallable()

GetFolder

Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getFolder(GetFolderRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getFolder(FolderName name)

  • getFolder(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getFolderCallable()

ListFolders

Retrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listFolders(ListFoldersRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listFolders(BucketName parent)

  • listFolders(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listFoldersPagedCallable()

  • listFoldersCallable()

RenameFolder

Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • renameFolderAsync(RenameFolderRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • renameFolderAsync(FolderName name, String destinationFolderId)

  • renameFolderAsync(String name, String destinationFolderId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • renameFolderOperationCallable()

  • renameFolderCallable()

GetStorageLayout

Returns the storage layout configuration for a given bucket.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getStorageLayout(GetStorageLayoutRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getStorageLayout(StorageLayoutName name)

  • getStorageLayout(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getStorageLayoutCallable()

CreateManagedFolder

Creates a new managed folder.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createManagedFolder(CreateManagedFolderRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createManagedFolder(BucketName parent, ManagedFolder managedFolder, String managedFolderId)

  • createManagedFolder(String parent, ManagedFolder managedFolder, String managedFolderId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createManagedFolderCallable()

DeleteManagedFolder

Permanently deletes an empty managed folder.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteManagedFolder(DeleteManagedFolderRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteManagedFolder(ManagedFolderName name)

  • deleteManagedFolder(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteManagedFolderCallable()

GetManagedFolder

Returns metadata for the specified managed folder.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getManagedFolder(GetManagedFolderRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getManagedFolder(ManagedFolderName name)

  • getManagedFolder(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getManagedFolderCallable()

ListManagedFolders

Retrieves a list of managed folders for a given bucket.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listManagedFolders(ListManagedFoldersRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listManagedFolders(BucketName parent)

  • listManagedFolders(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listManagedFoldersPagedCallable()

  • listManagedFoldersCallable()

CreateAnywhereCache

Creates an Anywhere Cache instance.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createAnywhereCacheAsync(CreateAnywhereCacheRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createAnywhereCacheAsync(BucketName parent, AnywhereCache anywhereCache)

  • createAnywhereCacheAsync(String parent, AnywhereCache anywhereCache)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createAnywhereCacheOperationCallable()

  • createAnywhereCacheCallable()

UpdateAnywhereCache

Updates an Anywhere Cache instance. Mutable fields include `ttl` and `admission_policy`.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateAnywhereCacheAsync(UpdateAnywhereCacheRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateAnywhereCacheAsync(AnywhereCache anywhereCache, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateAnywhereCacheOperationCallable()

  • updateAnywhereCacheCallable()

DisableAnywhereCache

Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • disableAnywhereCache(DisableAnywhereCacheRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • disableAnywhereCache(AnywhereCacheName name)

  • disableAnywhereCache(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • disableAnywhereCacheCallable()

PauseAnywhereCache

Pauses an Anywhere Cache instance.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • pauseAnywhereCache(PauseAnywhereCacheRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • pauseAnywhereCache(AnywhereCacheName name)

  • pauseAnywhereCache(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • pauseAnywhereCacheCallable()

ResumeAnywhereCache

Resumes a disabled or paused Anywhere Cache instance.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • resumeAnywhereCache(ResumeAnywhereCacheRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • resumeAnywhereCache(AnywhereCacheName name)

  • resumeAnywhereCache(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • resumeAnywhereCacheCallable()

GetAnywhereCache

Gets an Anywhere Cache instance.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getAnywhereCache(GetAnywhereCacheRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getAnywhereCache(AnywhereCacheName name)

  • getAnywhereCache(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getAnywhereCacheCallable()

ListAnywhereCaches

Lists Anywhere Cache instances for a given bucket.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listAnywhereCaches(ListAnywhereCachesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listAnywhereCaches(BucketName parent)

  • listAnywhereCaches(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listAnywhereCachesPagedCallable()

  • listAnywhereCachesCallable()

GetProjectIntelligenceConfig

Returns the Project scoped singleton IntelligenceConfig resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getProjectIntelligenceConfig(GetProjectIntelligenceConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getProjectIntelligenceConfig(IntelligenceConfigName name)

  • getProjectIntelligenceConfig(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getProjectIntelligenceConfigCallable()

UpdateProjectIntelligenceConfig

Updates the Project scoped singleton IntelligenceConfig resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateProjectIntelligenceConfig(UpdateProjectIntelligenceConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateProjectIntelligenceConfig(IntelligenceConfig intelligenceConfig, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateProjectIntelligenceConfigCallable()

GetFolderIntelligenceConfig

Returns the Folder scoped singleton IntelligenceConfig resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getFolderIntelligenceConfig(GetFolderIntelligenceConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getFolderIntelligenceConfig(IntelligenceConfigName name)

  • getFolderIntelligenceConfig(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getFolderIntelligenceConfigCallable()

UpdateFolderIntelligenceConfig

Updates the Folder scoped singleton IntelligenceConfig resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateFolderIntelligenceConfig(UpdateFolderIntelligenceConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateFolderIntelligenceConfig(IntelligenceConfig intelligenceConfig, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateFolderIntelligenceConfigCallable()

GetOrganizationIntelligenceConfig

Returns the Organization scoped singleton IntelligenceConfig resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getOrganizationIntelligenceConfig(GetOrganizationIntelligenceConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getOrganizationIntelligenceConfig(IntelligenceConfigName name)

  • getOrganizationIntelligenceConfig(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getOrganizationIntelligenceConfigCallable()

UpdateOrganizationIntelligenceConfig

Updates the Organization scoped singleton IntelligenceConfig resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateOrganizationIntelligenceConfig(UpdateOrganizationIntelligenceConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateOrganizationIntelligenceConfig(IntelligenceConfig intelligenceConfig, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateOrganizationIntelligenceConfigCallable()

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 StorageControlSettings 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
 StorageControlSettings storageControlSettings =
     StorageControlSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 StorageControlClient storageControlClient = StorageControlClient.create(storageControlSettings);
 

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
 StorageControlSettings storageControlSettings =
     StorageControlSettings.newBuilder().setEndpoint(myEndpoint).build();
 StorageControlClient storageControlClient = StorageControlClient.create(storageControlSettings);
 

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
 StorageControlSettings storageControlSettings =
     StorageControlSettings.newHttpJsonBuilder().build();
 StorageControlClient storageControlClient = StorageControlClient.create(storageControlSettings);
 

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

  • Constructor Details

    • StorageControlClient

      protected StorageControlClient(StorageControlSettings settings) throws IOException
      Constructs an instance of StorageControlClient, 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
    • StorageControlClient

      protected StorageControlClient(StorageControlStub stub)
  • Method Details

    • create

      public static final StorageControlClient create() throws IOException
      Constructs an instance of StorageControlClient with default settings.
      Throws:
      IOException
    • create

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

      public static final StorageControlClient create(StorageControlStub stub)
      Constructs an instance of StorageControlClient, using the given stub for making calls. This is for advanced usage - prefer using create(StorageControlSettings).
    • getSettings

      public final StorageControlSettings getSettings()
    • getStub

      public StorageControlStub getStub()
    • 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.
    • createFolder

      public final Folder createFolder(BucketName parent, Folder folder, String folderId)
      Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]");
         Folder folder = Folder.newBuilder().build();
         String folderId = "folderId294109737";
         Folder response = storageControlClient.createFolder(parent, folder, folderId);
       }
       
      Parameters:
      parent - Required. Name of the bucket in which the folder will reside. The bucket must be a hierarchical namespace enabled bucket.
      folder - Required. Properties of the new folder being created. The bucket and name of the folder are specified in the parent and folder_id fields, respectively. Populating those fields in `folder` will result in an error.
      folderId - Required. The full name of a folder, including all its parent folders. Folders use single '/' characters as a delimiter. The folder_id must end with a slash. For example, the folder_id of "books/biographies/" would create a new "biographies/" folder under the "books/" folder.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • createFolder

      public final Folder createFolder(String parent, Folder folder, String folderId)
      Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String parent = BucketName.of("[PROJECT]", "[BUCKET]").toString();
         Folder folder = Folder.newBuilder().build();
         String folderId = "folderId294109737";
         Folder response = storageControlClient.createFolder(parent, folder, folderId);
       }
       
      Parameters:
      parent - Required. Name of the bucket in which the folder will reside. The bucket must be a hierarchical namespace enabled bucket.
      folder - Required. Properties of the new folder being created. The bucket and name of the folder are specified in the parent and folder_id fields, respectively. Populating those fields in `folder` will result in an error.
      folderId - Required. The full name of a folder, including all its parent folders. Folders use single '/' characters as a delimiter. The folder_id must end with a slash. For example, the folder_id of "books/biographies/" would create a new "biographies/" folder under the "books/" folder.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • createFolder

      public final Folder createFolder(CreateFolderRequest request)
      Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         CreateFolderRequest request =
             CreateFolderRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setFolder(Folder.newBuilder().build())
                 .setFolderId("folderId294109737")
                 .setRecursive(true)
                 .setRequestId("requestId693933066")
                 .build();
         Folder response = storageControlClient.createFolder(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
    • createFolderCallable

      public final com.google.api.gax.rpc.UnaryCallable<CreateFolderRequest,Folder> createFolderCallable()
      Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         CreateFolderRequest request =
             CreateFolderRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setFolder(Folder.newBuilder().build())
                 .setFolderId("folderId294109737")
                 .setRecursive(true)
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Folder> future = storageControlClient.createFolderCallable().futureCall(request);
         // Do something.
         Folder response = future.get();
       }
       
    • deleteFolder

      public final void deleteFolder(FolderName name)
      Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         FolderName name = FolderName.of("[PROJECT]", "[BUCKET]", "[FOLDER]");
         storageControlClient.deleteFolder(name);
       }
       
      Parameters:
      name - Required. Name of the folder. Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • deleteFolder

      public final void deleteFolder(String name)
      Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String name = FolderName.of("[PROJECT]", "[BUCKET]", "[FOLDER]").toString();
         storageControlClient.deleteFolder(name);
       }
       
      Parameters:
      name - Required. Name of the folder. Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • deleteFolder

      public final void deleteFolder(DeleteFolderRequest request)
      Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         DeleteFolderRequest request =
             DeleteFolderRequest.newBuilder()
                 .setName(FolderName.of("[PROJECT]", "[BUCKET]", "[FOLDER]").toString())
                 .setIfMetagenerationMatch(1043427781)
                 .setIfMetagenerationNotMatch(1025430873)
                 .setRequestId("requestId693933066")
                 .build();
         storageControlClient.deleteFolder(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
    • deleteFolderCallable

      public final com.google.api.gax.rpc.UnaryCallable<DeleteFolderRequest,com.google.protobuf.Empty> deleteFolderCallable()
      Permanently deletes an empty folder. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         DeleteFolderRequest request =
             DeleteFolderRequest.newBuilder()
                 .setName(FolderName.of("[PROJECT]", "[BUCKET]", "[FOLDER]").toString())
                 .setIfMetagenerationMatch(1043427781)
                 .setIfMetagenerationNotMatch(1025430873)
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Empty> future = storageControlClient.deleteFolderCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • getFolder

      public final Folder getFolder(FolderName name)
      Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         FolderName name = FolderName.of("[PROJECT]", "[BUCKET]", "[FOLDER]");
         Folder response = storageControlClient.getFolder(name);
       }
       
      Parameters:
      name - Required. Name of the folder. Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • getFolder

      public final Folder getFolder(String name)
      Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String name = FolderName.of("[PROJECT]", "[BUCKET]", "[FOLDER]").toString();
         Folder response = storageControlClient.getFolder(name);
       }
       
      Parameters:
      name - Required. Name of the folder. Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • getFolder

      public final Folder getFolder(GetFolderRequest request)
      Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         GetFolderRequest request =
             GetFolderRequest.newBuilder()
                 .setName(FolderName.of("[PROJECT]", "[BUCKET]", "[FOLDER]").toString())
                 .setIfMetagenerationMatch(1043427781)
                 .setIfMetagenerationNotMatch(1025430873)
                 .setRequestId("requestId693933066")
                 .build();
         Folder response = storageControlClient.getFolder(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
    • getFolderCallable

      public final com.google.api.gax.rpc.UnaryCallable<GetFolderRequest,Folder> getFolderCallable()
      Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         GetFolderRequest request =
             GetFolderRequest.newBuilder()
                 .setName(FolderName.of("[PROJECT]", "[BUCKET]", "[FOLDER]").toString())
                 .setIfMetagenerationMatch(1043427781)
                 .setIfMetagenerationNotMatch(1025430873)
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Folder> future = storageControlClient.getFolderCallable().futureCall(request);
         // Do something.
         Folder response = future.get();
       }
       
    • listFolders

      public final StorageControlClient.ListFoldersPagedResponse listFolders(BucketName parent)
      Retrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]");
         for (Folder element : storageControlClient.listFolders(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the bucket in which to look for folders. The bucket must be a hierarchical namespace enabled bucket.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • listFolders

      public final StorageControlClient.ListFoldersPagedResponse listFolders(String parent)
      Retrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String parent = BucketName.of("[PROJECT]", "[BUCKET]").toString();
         for (Folder element : storageControlClient.listFolders(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the bucket in which to look for folders. The bucket must be a hierarchical namespace enabled bucket.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • listFolders

      Retrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         ListFoldersRequest request =
             ListFoldersRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setPrefix("prefix-980110702")
                 .setDelimiter("delimiter-250518009")
                 .setLexicographicStart("lexicographicStart-2093413008")
                 .setLexicographicEnd("lexicographicEnd1646968169")
                 .setRequestId("requestId693933066")
                 .build();
         for (Folder element : storageControlClient.listFolders(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
    • listFoldersPagedCallable

      public final com.google.api.gax.rpc.UnaryCallable<ListFoldersRequest,StorageControlClient.ListFoldersPagedResponse> listFoldersPagedCallable()
      Retrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         ListFoldersRequest request =
             ListFoldersRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setPrefix("prefix-980110702")
                 .setDelimiter("delimiter-250518009")
                 .setLexicographicStart("lexicographicStart-2093413008")
                 .setLexicographicEnd("lexicographicEnd1646968169")
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Folder> future =
             storageControlClient.listFoldersPagedCallable().futureCall(request);
         // Do something.
         for (Folder element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listFoldersCallable

      public final com.google.api.gax.rpc.UnaryCallable<ListFoldersRequest,ListFoldersResponse> listFoldersCallable()
      Retrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         ListFoldersRequest request =
             ListFoldersRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setPrefix("prefix-980110702")
                 .setDelimiter("delimiter-250518009")
                 .setLexicographicStart("lexicographicStart-2093413008")
                 .setLexicographicEnd("lexicographicEnd1646968169")
                 .setRequestId("requestId693933066")
                 .build();
         while (true) {
           ListFoldersResponse response = storageControlClient.listFoldersCallable().call(request);
           for (Folder element : response.getFoldersList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • renameFolderAsync

      public final com.google.api.gax.longrunning.OperationFuture<Folder,RenameFolderMetadata> renameFolderAsync(FolderName name, String destinationFolderId)
      Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         FolderName name = FolderName.of("[PROJECT]", "[BUCKET]", "[FOLDER]");
         String destinationFolderId = "destinationFolderId-480084905";
         Folder response = storageControlClient.renameFolderAsync(name, destinationFolderId).get();
       }
       
      Parameters:
      name - Required. Name of the source folder being renamed. Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
      destinationFolderId - Required. The destination folder ID, e.g. `foo/bar/`.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • renameFolderAsync

      public final com.google.api.gax.longrunning.OperationFuture<Folder,RenameFolderMetadata> renameFolderAsync(String name, String destinationFolderId)
      Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String name = FolderName.of("[PROJECT]", "[BUCKET]", "[FOLDER]").toString();
         String destinationFolderId = "destinationFolderId-480084905";
         Folder response = storageControlClient.renameFolderAsync(name, destinationFolderId).get();
       }
       
      Parameters:
      name - Required. Name of the source folder being renamed. Format: `projects/{project}/buckets/{bucket}/folders/{folder}`
      destinationFolderId - Required. The destination folder ID, e.g. `foo/bar/`.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • renameFolderAsync

      public final com.google.api.gax.longrunning.OperationFuture<Folder,RenameFolderMetadata> renameFolderAsync(RenameFolderRequest request)
      Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         RenameFolderRequest request =
             RenameFolderRequest.newBuilder()
                 .setName(FolderName.of("[PROJECT]", "[BUCKET]", "[FOLDER]").toString())
                 .setDestinationFolderId("destinationFolderId-480084905")
                 .setIfMetagenerationMatch(1043427781)
                 .setIfMetagenerationNotMatch(1025430873)
                 .setRequestId("requestId693933066")
                 .build();
         Folder response = storageControlClient.renameFolderAsync(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
    • renameFolderOperationCallable

      public final com.google.api.gax.rpc.OperationCallable<RenameFolderRequest,Folder,RenameFolderMetadata> renameFolderOperationCallable()
      Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         RenameFolderRequest request =
             RenameFolderRequest.newBuilder()
                 .setName(FolderName.of("[PROJECT]", "[BUCKET]", "[FOLDER]").toString())
                 .setDestinationFolderId("destinationFolderId-480084905")
                 .setIfMetagenerationMatch(1043427781)
                 .setIfMetagenerationNotMatch(1025430873)
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Folder, RenameFolderMetadata> future =
             storageControlClient.renameFolderOperationCallable().futureCall(request);
         // Do something.
         Folder response = future.get();
       }
       
    • renameFolderCallable

      public final com.google.api.gax.rpc.UnaryCallable<RenameFolderRequest,com.google.longrunning.Operation> renameFolderCallable()
      Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         RenameFolderRequest request =
             RenameFolderRequest.newBuilder()
                 .setName(FolderName.of("[PROJECT]", "[BUCKET]", "[FOLDER]").toString())
                 .setDestinationFolderId("destinationFolderId-480084905")
                 .setIfMetagenerationMatch(1043427781)
                 .setIfMetagenerationNotMatch(1025430873)
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future = storageControlClient.renameFolderCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • getStorageLayout

      public final StorageLayout getStorageLayout(StorageLayoutName name)
      Returns the storage layout configuration for a given bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         StorageLayoutName name = StorageLayoutName.of("[PROJECT]", "[BUCKET]");
         StorageLayout response = storageControlClient.getStorageLayout(name);
       }
       
      Parameters:
      name - Required. The name of the StorageLayout resource. Format: `projects/{project}/buckets/{bucket}/storageLayout`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • getStorageLayout

      public final StorageLayout getStorageLayout(String name)
      Returns the storage layout configuration for a given bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String name = StorageLayoutName.of("[PROJECT]", "[BUCKET]").toString();
         StorageLayout response = storageControlClient.getStorageLayout(name);
       }
       
      Parameters:
      name - Required. The name of the StorageLayout resource. Format: `projects/{project}/buckets/{bucket}/storageLayout`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • getStorageLayout

      public final StorageLayout getStorageLayout(GetStorageLayoutRequest request)
      Returns the storage layout configuration for a given bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         GetStorageLayoutRequest request =
             GetStorageLayoutRequest.newBuilder()
                 .setName(StorageLayoutName.of("[PROJECT]", "[BUCKET]").toString())
                 .setPrefix("prefix-980110702")
                 .setRequestId("requestId693933066")
                 .build();
         StorageLayout response = storageControlClient.getStorageLayout(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
    • getStorageLayoutCallable

      public final com.google.api.gax.rpc.UnaryCallable<GetStorageLayoutRequest,StorageLayout> getStorageLayoutCallable()
      Returns the storage layout configuration for a given bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         GetStorageLayoutRequest request =
             GetStorageLayoutRequest.newBuilder()
                 .setName(StorageLayoutName.of("[PROJECT]", "[BUCKET]").toString())
                 .setPrefix("prefix-980110702")
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<StorageLayout> future =
             storageControlClient.getStorageLayoutCallable().futureCall(request);
         // Do something.
         StorageLayout response = future.get();
       }
       
    • createManagedFolder

      public final ManagedFolder createManagedFolder(BucketName parent, ManagedFolder managedFolder, String managedFolderId)
      Creates a new managed folder.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]");
         ManagedFolder managedFolder = ManagedFolder.newBuilder().build();
         String managedFolderId = "managedFolderId-2027084056";
         ManagedFolder response =
             storageControlClient.createManagedFolder(parent, managedFolder, managedFolderId);
       }
       
      Parameters:
      parent - Required. Name of the bucket this managed folder belongs to.
      managedFolder - Required. Properties of the managed folder being created. The bucket and managed folder names are specified in the `parent` and `managed_folder_id` fields. Populating these fields in `managed_folder` will result in an error.
      managedFolderId - Required. The name of the managed folder. It uses a single `/` as delimiter and leading and trailing `/` are allowed.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • createManagedFolder

      public final ManagedFolder createManagedFolder(String parent, ManagedFolder managedFolder, String managedFolderId)
      Creates a new managed folder.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String parent = BucketName.of("[PROJECT]", "[BUCKET]").toString();
         ManagedFolder managedFolder = ManagedFolder.newBuilder().build();
         String managedFolderId = "managedFolderId-2027084056";
         ManagedFolder response =
             storageControlClient.createManagedFolder(parent, managedFolder, managedFolderId);
       }
       
      Parameters:
      parent - Required. Name of the bucket this managed folder belongs to.
      managedFolder - Required. Properties of the managed folder being created. The bucket and managed folder names are specified in the `parent` and `managed_folder_id` fields. Populating these fields in `managed_folder` will result in an error.
      managedFolderId - Required. The name of the managed folder. It uses a single `/` as delimiter and leading and trailing `/` are allowed.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • createManagedFolder

      public final ManagedFolder createManagedFolder(CreateManagedFolderRequest request)
      Creates a new managed folder.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         CreateManagedFolderRequest request =
             CreateManagedFolderRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setManagedFolder(ManagedFolder.newBuilder().build())
                 .setManagedFolderId("managedFolderId-2027084056")
                 .setRequestId("requestId693933066")
                 .build();
         ManagedFolder response = storageControlClient.createManagedFolder(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
    • createManagedFolderCallable

      public final com.google.api.gax.rpc.UnaryCallable<CreateManagedFolderRequest,ManagedFolder> createManagedFolderCallable()
      Creates a new managed folder.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         CreateManagedFolderRequest request =
             CreateManagedFolderRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setManagedFolder(ManagedFolder.newBuilder().build())
                 .setManagedFolderId("managedFolderId-2027084056")
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<ManagedFolder> future =
             storageControlClient.createManagedFolderCallable().futureCall(request);
         // Do something.
         ManagedFolder response = future.get();
       }
       
    • deleteManagedFolder

      public final void deleteManagedFolder(ManagedFolderName name)
      Permanently deletes an empty managed folder.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         ManagedFolderName name = ManagedFolderName.of("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]");
         storageControlClient.deleteManagedFolder(name);
       }
       
      Parameters:
      name - Required. Name of the managed folder. Format: `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • deleteManagedFolder

      public final void deleteManagedFolder(String name)
      Permanently deletes an empty managed folder.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String name = ManagedFolderName.of("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]").toString();
         storageControlClient.deleteManagedFolder(name);
       }
       
      Parameters:
      name - Required. Name of the managed folder. Format: `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • deleteManagedFolder

      public final void deleteManagedFolder(DeleteManagedFolderRequest request)
      Permanently deletes an empty managed folder.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         DeleteManagedFolderRequest request =
             DeleteManagedFolderRequest.newBuilder()
                 .setName(ManagedFolderName.of("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]").toString())
                 .setIfMetagenerationMatch(1043427781)
                 .setIfMetagenerationNotMatch(1025430873)
                 .setAllowNonEmpty(true)
                 .setRequestId("requestId693933066")
                 .build();
         storageControlClient.deleteManagedFolder(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
    • deleteManagedFolderCallable

      public final com.google.api.gax.rpc.UnaryCallable<DeleteManagedFolderRequest,com.google.protobuf.Empty> deleteManagedFolderCallable()
      Permanently deletes an empty managed folder.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         DeleteManagedFolderRequest request =
             DeleteManagedFolderRequest.newBuilder()
                 .setName(ManagedFolderName.of("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]").toString())
                 .setIfMetagenerationMatch(1043427781)
                 .setIfMetagenerationNotMatch(1025430873)
                 .setAllowNonEmpty(true)
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Empty> future =
             storageControlClient.deleteManagedFolderCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • getManagedFolder

      public final ManagedFolder getManagedFolder(ManagedFolderName name)
      Returns metadata for the specified managed folder.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         ManagedFolderName name = ManagedFolderName.of("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]");
         ManagedFolder response = storageControlClient.getManagedFolder(name);
       }
       
      Parameters:
      name - Required. Name of the managed folder. Format: `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • getManagedFolder

      public final ManagedFolder getManagedFolder(String name)
      Returns metadata for the specified managed folder.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String name = ManagedFolderName.of("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]").toString();
         ManagedFolder response = storageControlClient.getManagedFolder(name);
       }
       
      Parameters:
      name - Required. Name of the managed folder. Format: `projects/{project}/buckets/{bucket}/managedFolders/{managedFolder}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • getManagedFolder

      public final ManagedFolder getManagedFolder(GetManagedFolderRequest request)
      Returns metadata for the specified managed folder.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         GetManagedFolderRequest request =
             GetManagedFolderRequest.newBuilder()
                 .setName(ManagedFolderName.of("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]").toString())
                 .setIfMetagenerationMatch(1043427781)
                 .setIfMetagenerationNotMatch(1025430873)
                 .setRequestId("requestId693933066")
                 .build();
         ManagedFolder response = storageControlClient.getManagedFolder(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
    • getManagedFolderCallable

      public final com.google.api.gax.rpc.UnaryCallable<GetManagedFolderRequest,ManagedFolder> getManagedFolderCallable()
      Returns metadata for the specified managed folder.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         GetManagedFolderRequest request =
             GetManagedFolderRequest.newBuilder()
                 .setName(ManagedFolderName.of("[PROJECT]", "[BUCKET]", "[MANAGED_FOLDER]").toString())
                 .setIfMetagenerationMatch(1043427781)
                 .setIfMetagenerationNotMatch(1025430873)
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<ManagedFolder> future =
             storageControlClient.getManagedFolderCallable().futureCall(request);
         // Do something.
         ManagedFolder response = future.get();
       }
       
    • listManagedFolders

      public final StorageControlClient.ListManagedFoldersPagedResponse listManagedFolders(BucketName parent)
      Retrieves a list of managed folders for a given bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]");
         for (ManagedFolder element : storageControlClient.listManagedFolders(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the bucket this managed folder belongs to.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • listManagedFolders

      public final StorageControlClient.ListManagedFoldersPagedResponse listManagedFolders(String parent)
      Retrieves a list of managed folders for a given bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String parent = BucketName.of("[PROJECT]", "[BUCKET]").toString();
         for (ManagedFolder element : storageControlClient.listManagedFolders(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the bucket this managed folder belongs to.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • listManagedFolders

      Retrieves a list of managed folders for a given bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         ListManagedFoldersRequest request =
             ListManagedFoldersRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setPrefix("prefix-980110702")
                 .setRequestId("requestId693933066")
                 .build();
         for (ManagedFolder element : storageControlClient.listManagedFolders(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
    • listManagedFoldersPagedCallable

      public final com.google.api.gax.rpc.UnaryCallable<ListManagedFoldersRequest,StorageControlClient.ListManagedFoldersPagedResponse> listManagedFoldersPagedCallable()
      Retrieves a list of managed folders for a given bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         ListManagedFoldersRequest request =
             ListManagedFoldersRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setPrefix("prefix-980110702")
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<ManagedFolder> future =
             storageControlClient.listManagedFoldersPagedCallable().futureCall(request);
         // Do something.
         for (ManagedFolder element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listManagedFoldersCallable

      public final com.google.api.gax.rpc.UnaryCallable<ListManagedFoldersRequest,ListManagedFoldersResponse> listManagedFoldersCallable()
      Retrieves a list of managed folders for a given bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         ListManagedFoldersRequest request =
             ListManagedFoldersRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setPrefix("prefix-980110702")
                 .setRequestId("requestId693933066")
                 .build();
         while (true) {
           ListManagedFoldersResponse response =
               storageControlClient.listManagedFoldersCallable().call(request);
           for (ManagedFolder element : response.getManagedFoldersList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • createAnywhereCacheAsync

      public final com.google.api.gax.longrunning.OperationFuture<AnywhereCache,CreateAnywhereCacheMetadata> createAnywhereCacheAsync(BucketName parent, AnywhereCache anywhereCache)
      Creates an Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]");
         AnywhereCache anywhereCache = AnywhereCache.newBuilder().build();
         AnywhereCache response =
             storageControlClient.createAnywhereCacheAsync(parent, anywhereCache).get();
       }
       
      Parameters:
      parent - Required. The bucket to which this cache belongs. Format: `projects/{project}/buckets/{bucket}`
      anywhereCache - Required. Properties of the Anywhere Cache instance being created. The parent bucket name is specified in the `parent` field. Server uses the default value of `ttl` or `admission_policy` if not specified in request.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • createAnywhereCacheAsync

      public final com.google.api.gax.longrunning.OperationFuture<AnywhereCache,CreateAnywhereCacheMetadata> createAnywhereCacheAsync(String parent, AnywhereCache anywhereCache)
      Creates an Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String parent = BucketName.of("[PROJECT]", "[BUCKET]").toString();
         AnywhereCache anywhereCache = AnywhereCache.newBuilder().build();
         AnywhereCache response =
             storageControlClient.createAnywhereCacheAsync(parent, anywhereCache).get();
       }
       
      Parameters:
      parent - Required. The bucket to which this cache belongs. Format: `projects/{project}/buckets/{bucket}`
      anywhereCache - Required. Properties of the Anywhere Cache instance being created. The parent bucket name is specified in the `parent` field. Server uses the default value of `ttl` or `admission_policy` if not specified in request.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • createAnywhereCacheAsync

      public final com.google.api.gax.longrunning.OperationFuture<AnywhereCache,CreateAnywhereCacheMetadata> createAnywhereCacheAsync(CreateAnywhereCacheRequest request)
      Creates an Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         CreateAnywhereCacheRequest request =
             CreateAnywhereCacheRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setAnywhereCache(AnywhereCache.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         AnywhereCache response = storageControlClient.createAnywhereCacheAsync(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
    • createAnywhereCacheOperationCallable

      public final com.google.api.gax.rpc.OperationCallable<CreateAnywhereCacheRequest,AnywhereCache,CreateAnywhereCacheMetadata> createAnywhereCacheOperationCallable()
      Creates an Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         CreateAnywhereCacheRequest request =
             CreateAnywhereCacheRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setAnywhereCache(AnywhereCache.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<AnywhereCache, CreateAnywhereCacheMetadata> future =
             storageControlClient.createAnywhereCacheOperationCallable().futureCall(request);
         // Do something.
         AnywhereCache response = future.get();
       }
       
    • createAnywhereCacheCallable

      public final com.google.api.gax.rpc.UnaryCallable<CreateAnywhereCacheRequest,com.google.longrunning.Operation> createAnywhereCacheCallable()
      Creates an Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         CreateAnywhereCacheRequest request =
             CreateAnywhereCacheRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setAnywhereCache(AnywhereCache.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             storageControlClient.createAnywhereCacheCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateAnywhereCacheAsync

      public final com.google.api.gax.longrunning.OperationFuture<AnywhereCache,UpdateAnywhereCacheMetadata> updateAnywhereCacheAsync(AnywhereCache anywhereCache, com.google.protobuf.FieldMask updateMask)
      Updates an Anywhere Cache instance. Mutable fields include `ttl` and `admission_policy`.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         AnywhereCache anywhereCache = AnywhereCache.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         AnywhereCache response =
             storageControlClient.updateAnywhereCacheAsync(anywhereCache, updateMask).get();
       }
       
      Parameters:
      anywhereCache - Required. The Anywhere Cache instance to be updated.
      updateMask - Required. List of fields to be updated. Mutable fields of AnywhereCache include `ttl` and `admission_policy`.

      To specify ALL fields, specify a single field with the value `*`. Note: We recommend against doing this. If a new field is introduced at a later time, an older client updating with the `*` may accidentally reset the new field's value.

      Not specifying any fields is an error.

      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • updateAnywhereCacheAsync

      public final com.google.api.gax.longrunning.OperationFuture<AnywhereCache,UpdateAnywhereCacheMetadata> updateAnywhereCacheAsync(UpdateAnywhereCacheRequest request)
      Updates an Anywhere Cache instance. Mutable fields include `ttl` and `admission_policy`.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         UpdateAnywhereCacheRequest request =
             UpdateAnywhereCacheRequest.newBuilder()
                 .setAnywhereCache(AnywhereCache.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         AnywhereCache response = storageControlClient.updateAnywhereCacheAsync(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
    • updateAnywhereCacheOperationCallable

      public final com.google.api.gax.rpc.OperationCallable<UpdateAnywhereCacheRequest,AnywhereCache,UpdateAnywhereCacheMetadata> updateAnywhereCacheOperationCallable()
      Updates an Anywhere Cache instance. Mutable fields include `ttl` and `admission_policy`.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         UpdateAnywhereCacheRequest request =
             UpdateAnywhereCacheRequest.newBuilder()
                 .setAnywhereCache(AnywhereCache.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<AnywhereCache, UpdateAnywhereCacheMetadata> future =
             storageControlClient.updateAnywhereCacheOperationCallable().futureCall(request);
         // Do something.
         AnywhereCache response = future.get();
       }
       
    • updateAnywhereCacheCallable

      public final com.google.api.gax.rpc.UnaryCallable<UpdateAnywhereCacheRequest,com.google.longrunning.Operation> updateAnywhereCacheCallable()
      Updates an Anywhere Cache instance. Mutable fields include `ttl` and `admission_policy`.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         UpdateAnywhereCacheRequest request =
             UpdateAnywhereCacheRequest.newBuilder()
                 .setAnywhereCache(AnywhereCache.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             storageControlClient.updateAnywhereCacheCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • disableAnywhereCache

      public final AnywhereCache disableAnywhereCache(AnywhereCacheName name)
      Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
         AnywhereCache response = storageControlClient.disableAnywhereCache(name);
       }
       
      Parameters:
      name - Required. The name field in the request should be: `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • disableAnywhereCache

      public final AnywhereCache disableAnywhereCache(String name)
      Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString();
         AnywhereCache response = storageControlClient.disableAnywhereCache(name);
       }
       
      Parameters:
      name - Required. The name field in the request should be: `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • disableAnywhereCache

      public final AnywhereCache disableAnywhereCache(DisableAnywhereCacheRequest request)
      Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         DisableAnywhereCacheRequest request =
             DisableAnywhereCacheRequest.newBuilder()
                 .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         AnywhereCache response = storageControlClient.disableAnywhereCache(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
    • disableAnywhereCacheCallable

      public final com.google.api.gax.rpc.UnaryCallable<DisableAnywhereCacheRequest,AnywhereCache> disableAnywhereCacheCallable()
      Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         DisableAnywhereCacheRequest request =
             DisableAnywhereCacheRequest.newBuilder()
                 .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<AnywhereCache> future =
             storageControlClient.disableAnywhereCacheCallable().futureCall(request);
         // Do something.
         AnywhereCache response = future.get();
       }
       
    • pauseAnywhereCache

      public final AnywhereCache pauseAnywhereCache(AnywhereCacheName name)
      Pauses an Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
         AnywhereCache response = storageControlClient.pauseAnywhereCache(name);
       }
       
      Parameters:
      name - Required. The name field in the request should be: `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • pauseAnywhereCache

      public final AnywhereCache pauseAnywhereCache(String name)
      Pauses an Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString();
         AnywhereCache response = storageControlClient.pauseAnywhereCache(name);
       }
       
      Parameters:
      name - Required. The name field in the request should be: `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • pauseAnywhereCache

      public final AnywhereCache pauseAnywhereCache(PauseAnywhereCacheRequest request)
      Pauses an Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         PauseAnywhereCacheRequest request =
             PauseAnywhereCacheRequest.newBuilder()
                 .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         AnywhereCache response = storageControlClient.pauseAnywhereCache(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
    • pauseAnywhereCacheCallable

      public final com.google.api.gax.rpc.UnaryCallable<PauseAnywhereCacheRequest,AnywhereCache> pauseAnywhereCacheCallable()
      Pauses an Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         PauseAnywhereCacheRequest request =
             PauseAnywhereCacheRequest.newBuilder()
                 .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<AnywhereCache> future =
             storageControlClient.pauseAnywhereCacheCallable().futureCall(request);
         // Do something.
         AnywhereCache response = future.get();
       }
       
    • resumeAnywhereCache

      public final AnywhereCache resumeAnywhereCache(AnywhereCacheName name)
      Resumes a disabled or paused Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
         AnywhereCache response = storageControlClient.resumeAnywhereCache(name);
       }
       
      Parameters:
      name - Required. The name field in the request should be: `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • resumeAnywhereCache

      public final AnywhereCache resumeAnywhereCache(String name)
      Resumes a disabled or paused Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString();
         AnywhereCache response = storageControlClient.resumeAnywhereCache(name);
       }
       
      Parameters:
      name - Required. The name field in the request should be: `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • resumeAnywhereCache

      public final AnywhereCache resumeAnywhereCache(ResumeAnywhereCacheRequest request)
      Resumes a disabled or paused Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         ResumeAnywhereCacheRequest request =
             ResumeAnywhereCacheRequest.newBuilder()
                 .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         AnywhereCache response = storageControlClient.resumeAnywhereCache(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
    • resumeAnywhereCacheCallable

      public final com.google.api.gax.rpc.UnaryCallable<ResumeAnywhereCacheRequest,AnywhereCache> resumeAnywhereCacheCallable()
      Resumes a disabled or paused Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         ResumeAnywhereCacheRequest request =
             ResumeAnywhereCacheRequest.newBuilder()
                 .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<AnywhereCache> future =
             storageControlClient.resumeAnywhereCacheCallable().futureCall(request);
         // Do something.
         AnywhereCache response = future.get();
       }
       
    • getAnywhereCache

      public final AnywhereCache getAnywhereCache(AnywhereCacheName name)
      Gets an Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
         AnywhereCache response = storageControlClient.getAnywhereCache(name);
       }
       
      Parameters:
      name - Required. The name field in the request should be: `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • getAnywhereCache

      public final AnywhereCache getAnywhereCache(String name)
      Gets an Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString();
         AnywhereCache response = storageControlClient.getAnywhereCache(name);
       }
       
      Parameters:
      name - Required. The name field in the request should be: `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • getAnywhereCache

      public final AnywhereCache getAnywhereCache(GetAnywhereCacheRequest request)
      Gets an Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         GetAnywhereCacheRequest request =
             GetAnywhereCacheRequest.newBuilder()
                 .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         AnywhereCache response = storageControlClient.getAnywhereCache(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
    • getAnywhereCacheCallable

      public final com.google.api.gax.rpc.UnaryCallable<GetAnywhereCacheRequest,AnywhereCache> getAnywhereCacheCallable()
      Gets an Anywhere Cache instance.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         GetAnywhereCacheRequest request =
             GetAnywhereCacheRequest.newBuilder()
                 .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<AnywhereCache> future =
             storageControlClient.getAnywhereCacheCallable().futureCall(request);
         // Do something.
         AnywhereCache response = future.get();
       }
       
    • listAnywhereCaches

      public final StorageControlClient.ListAnywhereCachesPagedResponse listAnywhereCaches(BucketName parent)
      Lists Anywhere Cache instances for a given bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]");
         for (AnywhereCache element : storageControlClient.listAnywhereCaches(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The bucket to which this cache belongs.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • listAnywhereCaches

      public final StorageControlClient.ListAnywhereCachesPagedResponse listAnywhereCaches(String parent)
      Lists Anywhere Cache instances for a given bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String parent = BucketName.of("[PROJECT]", "[BUCKET]").toString();
         for (AnywhereCache element : storageControlClient.listAnywhereCaches(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The bucket to which this cache belongs.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • listAnywhereCaches

      Lists Anywhere Cache instances for a given bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         ListAnywhereCachesRequest request =
             ListAnywhereCachesRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setRequestId("requestId693933066")
                 .build();
         for (AnywhereCache element : storageControlClient.listAnywhereCaches(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
    • listAnywhereCachesPagedCallable

      public final com.google.api.gax.rpc.UnaryCallable<ListAnywhereCachesRequest,StorageControlClient.ListAnywhereCachesPagedResponse> listAnywhereCachesPagedCallable()
      Lists Anywhere Cache instances for a given bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         ListAnywhereCachesRequest request =
             ListAnywhereCachesRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<AnywhereCache> future =
             storageControlClient.listAnywhereCachesPagedCallable().futureCall(request);
         // Do something.
         for (AnywhereCache element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listAnywhereCachesCallable

      public final com.google.api.gax.rpc.UnaryCallable<ListAnywhereCachesRequest,ListAnywhereCachesResponse> listAnywhereCachesCallable()
      Lists Anywhere Cache instances for a given bucket.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (StorageControlClient storageControlClient = StorageControlClient.create()) {
         ListAnywhereCachesRequest request =
             ListAnywhereCachesRequest.newBuilder()
                 .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setRequestId("requestId693933066")
                 .build();
         while (true) {
           ListAnywhereCachesResponse response =
               storageControlClient.listAnywhereCachesCallable().call(request);
           for (AnywhereCache element : response.getAnywhereCachesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getProjectIntelligenceConfig

      public final IntelligenceConfig getProjectIntelligenceConfig(IntelligenceConfigName name)
      Returns the Project scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         IntelligenceConfigName name =
             IntelligenceConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]");
         IntelligenceConfig response = storageControlClient.getProjectIntelligenceConfig(name);
       }
       
      Parameters:
      name - Required. The name of the `IntelligenceConfig` resource associated with your project.

      Format: `projects/{id}/locations/global/intelligenceConfig`

      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • getProjectIntelligenceConfig

      public final IntelligenceConfig getProjectIntelligenceConfig(String name)
      Returns the Project scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String name =
             IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]").toString();
         IntelligenceConfig response = storageControlClient.getProjectIntelligenceConfig(name);
       }
       
      Parameters:
      name - Required. The name of the `IntelligenceConfig` resource associated with your project.

      Format: `projects/{id}/locations/global/intelligenceConfig`

      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • getProjectIntelligenceConfig

      public final IntelligenceConfig getProjectIntelligenceConfig(GetProjectIntelligenceConfigRequest request)
      Returns the Project scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         GetProjectIntelligenceConfigRequest request =
             GetProjectIntelligenceConfigRequest.newBuilder()
                 .setName(
                     IntelligenceConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]")
                         .toString())
                 .build();
         IntelligenceConfig response = storageControlClient.getProjectIntelligenceConfig(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
    • getProjectIntelligenceConfigCallable

      public final com.google.api.gax.rpc.UnaryCallable<GetProjectIntelligenceConfigRequest,IntelligenceConfig> getProjectIntelligenceConfigCallable()
      Returns the Project scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         GetProjectIntelligenceConfigRequest request =
             GetProjectIntelligenceConfigRequest.newBuilder()
                 .setName(
                     IntelligenceConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]")
                         .toString())
                 .build();
         ApiFuture<IntelligenceConfig> future =
             storageControlClient.getProjectIntelligenceConfigCallable().futureCall(request);
         // Do something.
         IntelligenceConfig response = future.get();
       }
       
    • updateProjectIntelligenceConfig

      public final IntelligenceConfig updateProjectIntelligenceConfig(IntelligenceConfig intelligenceConfig, com.google.protobuf.FieldMask updateMask)
      Updates the Project scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         IntelligenceConfig intelligenceConfig = IntelligenceConfig.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         IntelligenceConfig response =
             storageControlClient.updateProjectIntelligenceConfig(intelligenceConfig, updateMask);
       }
       
      Parameters:
      intelligenceConfig - Required. The `IntelligenceConfig` resource to be updated.
      updateMask - Required. The `update_mask` that specifies the fields within the `IntelligenceConfig` resource that should be modified by this update. Only the listed fields are updated.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • updateProjectIntelligenceConfig

      public final IntelligenceConfig updateProjectIntelligenceConfig(UpdateProjectIntelligenceConfigRequest request)
      Updates the Project scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         UpdateProjectIntelligenceConfigRequest request =
             UpdateProjectIntelligenceConfigRequest.newBuilder()
                 .setIntelligenceConfig(IntelligenceConfig.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         IntelligenceConfig response = storageControlClient.updateProjectIntelligenceConfig(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
    • updateProjectIntelligenceConfigCallable

      public final com.google.api.gax.rpc.UnaryCallable<UpdateProjectIntelligenceConfigRequest,IntelligenceConfig> updateProjectIntelligenceConfigCallable()
      Updates the Project scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         UpdateProjectIntelligenceConfigRequest request =
             UpdateProjectIntelligenceConfigRequest.newBuilder()
                 .setIntelligenceConfig(IntelligenceConfig.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<IntelligenceConfig> future =
             storageControlClient.updateProjectIntelligenceConfigCallable().futureCall(request);
         // Do something.
         IntelligenceConfig response = future.get();
       }
       
    • getFolderIntelligenceConfig

      public final IntelligenceConfig getFolderIntelligenceConfig(IntelligenceConfigName name)
      Returns the Folder scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         IntelligenceConfigName name =
             IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]");
         IntelligenceConfig response = storageControlClient.getFolderIntelligenceConfig(name);
       }
       
      Parameters:
      name - Required. The name of the `IntelligenceConfig` resource associated with your folder.

      Format: `folders/{id}/locations/global/intelligenceConfig`

      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • getFolderIntelligenceConfig

      public final IntelligenceConfig getFolderIntelligenceConfig(String name)
      Returns the Folder scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String name =
             IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]").toString();
         IntelligenceConfig response = storageControlClient.getFolderIntelligenceConfig(name);
       }
       
      Parameters:
      name - Required. The name of the `IntelligenceConfig` resource associated with your folder.

      Format: `folders/{id}/locations/global/intelligenceConfig`

      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • getFolderIntelligenceConfig

      public final IntelligenceConfig getFolderIntelligenceConfig(GetFolderIntelligenceConfigRequest request)
      Returns the Folder scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         GetFolderIntelligenceConfigRequest request =
             GetFolderIntelligenceConfigRequest.newBuilder()
                 .setName(
                     IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]").toString())
                 .build();
         IntelligenceConfig response = storageControlClient.getFolderIntelligenceConfig(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
    • getFolderIntelligenceConfigCallable

      public final com.google.api.gax.rpc.UnaryCallable<GetFolderIntelligenceConfigRequest,IntelligenceConfig> getFolderIntelligenceConfigCallable()
      Returns the Folder scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         GetFolderIntelligenceConfigRequest request =
             GetFolderIntelligenceConfigRequest.newBuilder()
                 .setName(
                     IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]").toString())
                 .build();
         ApiFuture<IntelligenceConfig> future =
             storageControlClient.getFolderIntelligenceConfigCallable().futureCall(request);
         // Do something.
         IntelligenceConfig response = future.get();
       }
       
    • updateFolderIntelligenceConfig

      public final IntelligenceConfig updateFolderIntelligenceConfig(IntelligenceConfig intelligenceConfig, com.google.protobuf.FieldMask updateMask)
      Updates the Folder scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         IntelligenceConfig intelligenceConfig = IntelligenceConfig.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         IntelligenceConfig response =
             storageControlClient.updateFolderIntelligenceConfig(intelligenceConfig, updateMask);
       }
       
      Parameters:
      intelligenceConfig - Required. The `IntelligenceConfig` resource to be updated.
      updateMask - Required. The `update_mask` that specifies the fields within the `IntelligenceConfig` resource that should be modified by this update. Only the listed fields are updated.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • updateFolderIntelligenceConfig

      public final IntelligenceConfig updateFolderIntelligenceConfig(UpdateFolderIntelligenceConfigRequest request)
      Updates the Folder scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         UpdateFolderIntelligenceConfigRequest request =
             UpdateFolderIntelligenceConfigRequest.newBuilder()
                 .setIntelligenceConfig(IntelligenceConfig.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         IntelligenceConfig response = storageControlClient.updateFolderIntelligenceConfig(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
    • updateFolderIntelligenceConfigCallable

      public final com.google.api.gax.rpc.UnaryCallable<UpdateFolderIntelligenceConfigRequest,IntelligenceConfig> updateFolderIntelligenceConfigCallable()
      Updates the Folder scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         UpdateFolderIntelligenceConfigRequest request =
             UpdateFolderIntelligenceConfigRequest.newBuilder()
                 .setIntelligenceConfig(IntelligenceConfig.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<IntelligenceConfig> future =
             storageControlClient.updateFolderIntelligenceConfigCallable().futureCall(request);
         // Do something.
         IntelligenceConfig response = future.get();
       }
       
    • getOrganizationIntelligenceConfig

      public final IntelligenceConfig getOrganizationIntelligenceConfig(IntelligenceConfigName name)
      Returns the Organization scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         IntelligenceConfigName name = IntelligenceConfigName.ofOrgLocationName("[ORG]", "[LOCATION]");
         IntelligenceConfig response = storageControlClient.getOrganizationIntelligenceConfig(name);
       }
       
      Parameters:
      name - Required. The name of the `IntelligenceConfig` resource associated with your organization.

      Format: `organizations/{org_id}/locations/global/intelligenceConfig`

      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • getOrganizationIntelligenceConfig

      public final IntelligenceConfig getOrganizationIntelligenceConfig(String name)
      Returns the Organization scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         String name =
             IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]").toString();
         IntelligenceConfig response = storageControlClient.getOrganizationIntelligenceConfig(name);
       }
       
      Parameters:
      name - Required. The name of the `IntelligenceConfig` resource associated with your organization.

      Format: `organizations/{org_id}/locations/global/intelligenceConfig`

      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • getOrganizationIntelligenceConfig

      public final IntelligenceConfig getOrganizationIntelligenceConfig(GetOrganizationIntelligenceConfigRequest request)
      Returns the Organization scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         GetOrganizationIntelligenceConfigRequest request =
             GetOrganizationIntelligenceConfigRequest.newBuilder()
                 .setName(IntelligenceConfigName.ofOrgLocationName("[ORG]", "[LOCATION]").toString())
                 .build();
         IntelligenceConfig response = storageControlClient.getOrganizationIntelligenceConfig(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
    • getOrganizationIntelligenceConfigCallable

      public final com.google.api.gax.rpc.UnaryCallable<GetOrganizationIntelligenceConfigRequest,IntelligenceConfig> getOrganizationIntelligenceConfigCallable()
      Returns the Organization scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         GetOrganizationIntelligenceConfigRequest request =
             GetOrganizationIntelligenceConfigRequest.newBuilder()
                 .setName(IntelligenceConfigName.ofOrgLocationName("[ORG]", "[LOCATION]").toString())
                 .build();
         ApiFuture<IntelligenceConfig> future =
             storageControlClient.getOrganizationIntelligenceConfigCallable().futureCall(request);
         // Do something.
         IntelligenceConfig response = future.get();
       }
       
    • updateOrganizationIntelligenceConfig

      public final IntelligenceConfig updateOrganizationIntelligenceConfig(IntelligenceConfig intelligenceConfig, com.google.protobuf.FieldMask updateMask)
      Updates the Organization scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         IntelligenceConfig intelligenceConfig = IntelligenceConfig.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         IntelligenceConfig response =
             storageControlClient.updateOrganizationIntelligenceConfig(intelligenceConfig, updateMask);
       }
       
      Parameters:
      intelligenceConfig - Required. The `IntelligenceConfig` resource to be updated.
      updateMask - Required. The `update_mask` that specifies the fields within the `IntelligenceConfig` resource that should be modified by this update. Only the listed fields are updated.
      Throws:
      com.google.api.gax.rpc.ApiException - if the remote call fails
    • updateOrganizationIntelligenceConfig

      public final IntelligenceConfig updateOrganizationIntelligenceConfig(UpdateOrganizationIntelligenceConfigRequest request)
      Updates the Organization scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         UpdateOrganizationIntelligenceConfigRequest request =
             UpdateOrganizationIntelligenceConfigRequest.newBuilder()
                 .setIntelligenceConfig(IntelligenceConfig.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         IntelligenceConfig response =
             storageControlClient.updateOrganizationIntelligenceConfig(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
    • updateOrganizationIntelligenceConfigCallable

      public final com.google.api.gax.rpc.UnaryCallable<UpdateOrganizationIntelligenceConfigRequest,IntelligenceConfig> updateOrganizationIntelligenceConfigCallable()
      Updates the Organization scoped singleton IntelligenceConfig 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
         UpdateOrganizationIntelligenceConfigRequest request =
             UpdateOrganizationIntelligenceConfigRequest.newBuilder()
                 .setIntelligenceConfig(IntelligenceConfig.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<IntelligenceConfig> future =
             storageControlClient.updateOrganizationIntelligenceConfigCallable().futureCall(request);
         // Do something.
         IntelligenceConfig response = future.get();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • 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
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface com.google.api.gax.core.BackgroundResource
      Throws:
      InterruptedException