com.google.cloud.netapp.v1.NetAppClient Maven / Gradle / Ivy
Show all versions of google-cloud-netapp Show documentation
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.cloud.netapp.v1;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.httpjson.longrunning.OperationsClient;
import com.google.api.gax.longrunning.OperationFuture;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
import com.google.api.gax.paging.AbstractPagedListResponse;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
import com.google.cloud.location.Location;
import com.google.cloud.netapp.v1.stub.NetAppStub;
import com.google.cloud.netapp.v1.stub.NetAppStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Service Description: NetApp Files Google Cloud Service
*
* 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:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* StoragePoolName name = StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]");
* StoragePool response = netAppClient.getStoragePool(name);
* }
* }
*
* Note: close() needs to be called on the NetAppClient 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
*
*
* ListStoragePools
* Returns descriptions of all storage pools owned by the caller.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listStoragePools(ListStoragePoolsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listStoragePools(LocationName parent)
*
listStoragePools(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.
*
* listStoragePoolsPagedCallable()
*
listStoragePoolsCallable()
*
*
*
*
* CreateStoragePool
* Creates a new storage pool.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createStoragePoolAsync(CreateStoragePoolRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createStoragePoolAsync(LocationName parent, StoragePool storagePool, String storagePoolId)
*
createStoragePoolAsync(String parent, StoragePool storagePool, String storagePoolId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createStoragePoolOperationCallable()
*
createStoragePoolCallable()
*
*
*
*
* GetStoragePool
* Returns the description of the specified storage pool by poolId.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getStoragePool(GetStoragePoolRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getStoragePool(StoragePoolName name)
*
getStoragePool(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.
*
* getStoragePoolCallable()
*
*
*
*
* UpdateStoragePool
* Updates the storage pool properties with the full spec
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* updateStoragePoolAsync(UpdateStoragePoolRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateStoragePoolAsync(StoragePool storagePool, 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.
*
* updateStoragePoolOperationCallable()
*
updateStoragePoolCallable()
*
*
*
*
* DeleteStoragePool
* Warning! This operation will permanently delete the storage pool.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteStoragePoolAsync(DeleteStoragePoolRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteStoragePoolAsync(StoragePoolName name)
*
deleteStoragePoolAsync(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.
*
* deleteStoragePoolOperationCallable()
*
deleteStoragePoolCallable()
*
*
*
*
* ListVolumes
* Lists Volumes in a given project.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listVolumes(ListVolumesRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listVolumes(LocationName parent)
*
listVolumes(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.
*
* listVolumesPagedCallable()
*
listVolumesCallable()
*
*
*
*
* GetVolume
* Gets details of a single Volume.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getVolume(GetVolumeRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getVolume(VolumeName name)
*
getVolume(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.
*
* getVolumeCallable()
*
*
*
*
* CreateVolume
* Creates a new Volume in a given project and location.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createVolumeAsync(CreateVolumeRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createVolumeAsync(LocationName parent, Volume volume, String volumeId)
*
createVolumeAsync(String parent, Volume volume, String volumeId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createVolumeOperationCallable()
*
createVolumeCallable()
*
*
*
*
* UpdateVolume
* Updates the parameters of a single Volume.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* updateVolumeAsync(UpdateVolumeRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateVolumeAsync(Volume volume, 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.
*
* updateVolumeOperationCallable()
*
updateVolumeCallable()
*
*
*
*
* DeleteVolume
* Deletes a single Volume.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteVolumeAsync(DeleteVolumeRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteVolumeAsync(VolumeName name)
*
deleteVolumeAsync(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.
*
* deleteVolumeOperationCallable()
*
deleteVolumeCallable()
*
*
*
*
* RevertVolume
* Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* revertVolumeAsync(RevertVolumeRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* revertVolumeOperationCallable()
*
revertVolumeCallable()
*
*
*
*
* ListSnapshots
* Returns descriptions of all snapshots for a volume.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listSnapshots(ListSnapshotsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listSnapshots(VolumeName parent)
*
listSnapshots(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.
*
* listSnapshotsPagedCallable()
*
listSnapshotsCallable()
*
*
*
*
* GetSnapshot
* Describe a snapshot for a volume.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getSnapshot(GetSnapshotRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getSnapshot(SnapshotName name)
*
getSnapshot(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.
*
* getSnapshotCallable()
*
*
*
*
* CreateSnapshot
* Create a new snapshot for a volume.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createSnapshotAsync(CreateSnapshotRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createSnapshotAsync(VolumeName parent, Snapshot snapshot, String snapshotId)
*
createSnapshotAsync(String parent, Snapshot snapshot, String snapshotId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createSnapshotOperationCallable()
*
createSnapshotCallable()
*
*
*
*
* DeleteSnapshot
* Deletes a snapshot.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteSnapshotAsync(DeleteSnapshotRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteSnapshotAsync(SnapshotName name)
*
deleteSnapshotAsync(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.
*
* deleteSnapshotOperationCallable()
*
deleteSnapshotCallable()
*
*
*
*
* UpdateSnapshot
* Updates the settings of a specific snapshot.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* updateSnapshotAsync(UpdateSnapshotRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateSnapshotAsync(Snapshot snapshot, 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.
*
* updateSnapshotOperationCallable()
*
updateSnapshotCallable()
*
*
*
*
* ListActiveDirectories
* Lists active directories.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listActiveDirectories(ListActiveDirectoriesRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listActiveDirectories(LocationName parent)
*
listActiveDirectories(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.
*
* listActiveDirectoriesPagedCallable()
*
listActiveDirectoriesCallable()
*
*
*
*
* GetActiveDirectory
* Describes a specified active directory.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getActiveDirectory(GetActiveDirectoryRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getActiveDirectory(ActiveDirectoryName name)
*
getActiveDirectory(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.
*
* getActiveDirectoryCallable()
*
*
*
*
* CreateActiveDirectory
* CreateActiveDirectory Creates the active directory specified in the request.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createActiveDirectoryAsync(CreateActiveDirectoryRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createActiveDirectoryAsync(LocationName parent, ActiveDirectory activeDirectory, String activeDirectoryId)
*
createActiveDirectoryAsync(String parent, ActiveDirectory activeDirectory, String activeDirectoryId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createActiveDirectoryOperationCallable()
*
createActiveDirectoryCallable()
*
*
*
*
* UpdateActiveDirectory
* Update the parameters of an active directories.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* updateActiveDirectoryAsync(UpdateActiveDirectoryRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateActiveDirectoryAsync(ActiveDirectory activeDirectory, 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.
*
* updateActiveDirectoryOperationCallable()
*
updateActiveDirectoryCallable()
*
*
*
*
* DeleteActiveDirectory
* Delete the active directory specified in the request.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteActiveDirectoryAsync(DeleteActiveDirectoryRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteActiveDirectoryAsync(ActiveDirectoryName name)
*
deleteActiveDirectoryAsync(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.
*
* deleteActiveDirectoryOperationCallable()
*
deleteActiveDirectoryCallable()
*
*
*
*
* ListKmsConfigs
* Returns descriptions of all KMS configs owned by the caller.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listKmsConfigs(ListKmsConfigsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listKmsConfigs(LocationName parent)
*
listKmsConfigs(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.
*
* listKmsConfigsPagedCallable()
*
listKmsConfigsCallable()
*
*
*
*
* CreateKmsConfig
* Creates a new KMS config.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createKmsConfigAsync(CreateKmsConfigRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createKmsConfigAsync(LocationName parent, KmsConfig kmsConfig, String kmsConfigId)
*
createKmsConfigAsync(String parent, KmsConfig kmsConfig, String kmsConfigId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createKmsConfigOperationCallable()
*
createKmsConfigCallable()
*
*
*
*
* GetKmsConfig
* Returns the description of the specified KMS config by kms_config_id.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getKmsConfig(GetKmsConfigRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getKmsConfig(KmsConfigName name)
*
getKmsConfig(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.
*
* getKmsConfigCallable()
*
*
*
*
* UpdateKmsConfig
* Updates the Kms config properties with the full spec
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* updateKmsConfigAsync(UpdateKmsConfigRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateKmsConfigAsync(KmsConfig kmsConfig, 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.
*
* updateKmsConfigOperationCallable()
*
updateKmsConfigCallable()
*
*
*
*
* EncryptVolumes
* Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* encryptVolumesAsync(EncryptVolumesRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* encryptVolumesOperationCallable()
*
encryptVolumesCallable()
*
*
*
*
* VerifyKmsConfig
* Verifies KMS config reachability.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* verifyKmsConfig(VerifyKmsConfigRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* verifyKmsConfigCallable()
*
*
*
*
* DeleteKmsConfig
* Warning! This operation will permanently delete the Kms config.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteKmsConfigAsync(DeleteKmsConfigRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteKmsConfigAsync(KmsConfigName name)
*
deleteKmsConfigAsync(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.
*
* deleteKmsConfigOperationCallable()
*
deleteKmsConfigCallable()
*
*
*
*
* ListReplications
* Returns descriptions of all replications for a volume.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listReplications(ListReplicationsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listReplications(VolumeName parent)
*
listReplications(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.
*
* listReplicationsPagedCallable()
*
listReplicationsCallable()
*
*
*
*
* GetReplication
* Describe a replication for a volume.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getReplication(GetReplicationRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getReplication(ReplicationName name)
*
getReplication(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.
*
* getReplicationCallable()
*
*
*
*
* CreateReplication
* Create a new replication for a volume.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createReplicationAsync(CreateReplicationRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createReplicationAsync(VolumeName parent, Replication replication, String replicationId)
*
createReplicationAsync(String parent, Replication replication, String replicationId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createReplicationOperationCallable()
*
createReplicationCallable()
*
*
*
*
* DeleteReplication
* Deletes a replication.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteReplicationAsync(DeleteReplicationRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteReplicationAsync(ReplicationName name)
*
deleteReplicationAsync(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.
*
* deleteReplicationOperationCallable()
*
deleteReplicationCallable()
*
*
*
*
* UpdateReplication
* Updates the settings of a specific replication.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* updateReplicationAsync(UpdateReplicationRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateReplicationAsync(Replication replication, 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.
*
* updateReplicationOperationCallable()
*
updateReplicationCallable()
*
*
*
*
* StopReplication
* Stop Cross Region Replication.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* stopReplicationAsync(StopReplicationRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* stopReplicationOperationCallable()
*
stopReplicationCallable()
*
*
*
*
* ResumeReplication
* Resume Cross Region Replication.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* resumeReplicationAsync(ResumeReplicationRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* resumeReplicationOperationCallable()
*
resumeReplicationCallable()
*
*
*
*
* ReverseReplicationDirection
* Reverses direction of replication. Source becomes destination and destination becomes source.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* reverseReplicationDirectionAsync(ReverseReplicationDirectionRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* reverseReplicationDirectionOperationCallable()
*
reverseReplicationDirectionCallable()
*
*
*
*
* CreateBackupVault
* Creates new backup vault
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createBackupVaultAsync(CreateBackupVaultRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createBackupVaultAsync(LocationName parent, BackupVault backupVault, String backupVaultId)
*
createBackupVaultAsync(String parent, BackupVault backupVault, String backupVaultId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createBackupVaultOperationCallable()
*
createBackupVaultCallable()
*
*
*
*
* GetBackupVault
* Returns the description of the specified backup vault
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getBackupVault(GetBackupVaultRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getBackupVault(BackupVaultName name)
*
getBackupVault(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.
*
* getBackupVaultCallable()
*
*
*
*
* ListBackupVaults
* Returns list of all available backup vaults.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listBackupVaults(ListBackupVaultsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listBackupVaults(LocationName parent)
*
listBackupVaults(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.
*
* listBackupVaultsPagedCallable()
*
listBackupVaultsCallable()
*
*
*
*
* UpdateBackupVault
* Updates the settings of a specific backup vault.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* updateBackupVaultAsync(UpdateBackupVaultRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateBackupVaultAsync(BackupVault backupVault, 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.
*
* updateBackupVaultOperationCallable()
*
updateBackupVaultCallable()
*
*
*
*
* DeleteBackupVault
* Warning! This operation will permanently delete the backup vault.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteBackupVaultAsync(DeleteBackupVaultRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteBackupVaultAsync(BackupVaultName name)
*
deleteBackupVaultAsync(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.
*
* deleteBackupVaultOperationCallable()
*
deleteBackupVaultCallable()
*
*
*
*
* CreateBackup
* Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request. If no snapshot specified, there'll be a new snapshot taken to initiate the backup creation.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createBackupAsync(CreateBackupRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createBackupAsync(BackupVaultName parent, Backup backup, String backupId)
*
createBackupAsync(String parent, Backup backup, String backupId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createBackupOperationCallable()
*
createBackupCallable()
*
*
*
*
* GetBackup
* Returns the description of the specified backup
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getBackup(GetBackupRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getBackup(BackupName name)
*
getBackup(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.
*
* getBackupCallable()
*
*
*
*
* ListBackups
* Returns descriptions of all backups for a backupVault.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listBackups(ListBackupsRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listBackups(BackupVaultName parent)
*
listBackups(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.
*
* listBackupsPagedCallable()
*
listBackupsCallable()
*
*
*
*
* DeleteBackup
* Warning! This operation will permanently delete the backup.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteBackupAsync(DeleteBackupRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteBackupAsync(BackupName name)
*
deleteBackupAsync(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.
*
* deleteBackupOperationCallable()
*
deleteBackupCallable()
*
*
*
*
* UpdateBackup
* Update backup with full spec.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* updateBackupAsync(UpdateBackupRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateBackupAsync(Backup backup, 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.
*
* updateBackupOperationCallable()
*
updateBackupCallable()
*
*
*
*
* CreateBackupPolicy
* Creates new backup policy
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* createBackupPolicyAsync(CreateBackupPolicyRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* createBackupPolicyAsync(LocationName parent, BackupPolicy backupPolicy, String backupPolicyId)
*
createBackupPolicyAsync(String parent, BackupPolicy backupPolicy, String backupPolicyId)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* createBackupPolicyOperationCallable()
*
createBackupPolicyCallable()
*
*
*
*
* GetBackupPolicy
* Returns the description of the specified backup policy by backup_policy_id.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getBackupPolicy(GetBackupPolicyRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* getBackupPolicy(BackupPolicyName name)
*
getBackupPolicy(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.
*
* getBackupPolicyCallable()
*
*
*
*
* ListBackupPolicies
* Returns list of all available backup policies.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listBackupPolicies(ListBackupPoliciesRequest request)
*
* "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
*
* listBackupPolicies(LocationName parent)
*
listBackupPolicies(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.
*
* listBackupPoliciesPagedCallable()
*
listBackupPoliciesCallable()
*
*
*
*
* UpdateBackupPolicy
* Updates settings of a specific backup policy.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* updateBackupPolicyAsync(UpdateBackupPolicyRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* updateBackupPolicyAsync(BackupPolicy backupPolicy, 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.
*
* updateBackupPolicyOperationCallable()
*
updateBackupPolicyCallable()
*
*
*
*
* DeleteBackupPolicy
* Warning! This operation will permanently delete the backup policy.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* deleteBackupPolicyAsync(DeleteBackupPolicyRequest request)
*
* Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
*
* deleteBackupPolicyAsync(BackupPolicyName name)
*
deleteBackupPolicyAsync(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.
*
* deleteBackupPolicyOperationCallable()
*
deleteBackupPolicyCallable()
*
*
*
*
* ListLocations
* Lists information about the supported locations for this service.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* listLocations(ListLocationsRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* listLocationsPagedCallable()
*
listLocationsCallable()
*
*
*
*
* GetLocation
* Gets information about a location.
*
* Request object method variants only take one parameter, a request object, which must be constructed before the call.
*
* getLocation(GetLocationRequest request)
*
* Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
*
* getLocationCallable()
*
*
*
*
*
* 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 NetAppSettings to create().
* For example:
*
*
To customize credentials:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* NetAppSettings netAppSettings =
* NetAppSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
* .build();
* NetAppClient netAppClient = NetAppClient.create(netAppSettings);
* }
*
* To customize the endpoint:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* NetAppSettings netAppSettings = NetAppSettings.newBuilder().setEndpoint(myEndpoint).build();
* NetAppClient netAppClient = NetAppClient.create(netAppSettings);
* }
*
* To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
* the wire:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* NetAppSettings netAppSettings = NetAppSettings.newHttpJsonBuilder().build();
* NetAppClient netAppClient = NetAppClient.create(netAppSettings);
* }
*
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
public class NetAppClient implements BackgroundResource {
private final NetAppSettings settings;
private final NetAppStub stub;
private final OperationsClient httpJsonOperationsClient;
private final com.google.longrunning.OperationsClient operationsClient;
/** Constructs an instance of NetAppClient with default settings. */
public static final NetAppClient create() throws IOException {
return create(NetAppSettings.newBuilder().build());
}
/**
* Constructs an instance of NetAppClient, using the given settings. The channels are created
* based on the settings passed in, or defaults for any settings that are not set.
*/
public static final NetAppClient create(NetAppSettings settings) throws IOException {
return new NetAppClient(settings);
}
/**
* Constructs an instance of NetAppClient, using the given stub for making calls. This is for
* advanced usage - prefer using create(NetAppSettings).
*/
public static final NetAppClient create(NetAppStub stub) {
return new NetAppClient(stub);
}
/**
* Constructs an instance of NetAppClient, using the given settings. This is protected so that it
* is easy to make a subclass, but otherwise, the static factory methods should be preferred.
*/
protected NetAppClient(NetAppSettings settings) throws IOException {
this.settings = settings;
this.stub = ((NetAppStubSettings) settings.getStubSettings()).createStub();
this.operationsClient =
com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
protected NetAppClient(NetAppStub stub) {
this.settings = null;
this.stub = stub;
this.operationsClient =
com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
public final NetAppSettings getSettings() {
return settings;
}
public NetAppStub getStub() {
return stub;
}
/**
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
public final com.google.longrunning.OperationsClient getOperationsClient() {
return operationsClient;
}
/**
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
@BetaApi
public final OperationsClient getHttpJsonOperationsClient() {
return httpJsonOperationsClient;
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all storage pools owned by the caller.
*
*
Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (StoragePool element : netAppClient.listStoragePools(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListStoragePoolsPagedResponse listStoragePools(LocationName parent) {
ListStoragePoolsRequest request =
ListStoragePoolsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listStoragePools(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all storage pools owned by the caller.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* for (StoragePool element : netAppClient.listStoragePools(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListStoragePoolsPagedResponse listStoragePools(String parent) {
ListStoragePoolsRequest request =
ListStoragePoolsRequest.newBuilder().setParent(parent).build();
return listStoragePools(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all storage pools owned by the caller.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListStoragePoolsRequest request =
* ListStoragePoolsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* for (StoragePool element : netAppClient.listStoragePools(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListStoragePoolsPagedResponse listStoragePools(ListStoragePoolsRequest request) {
return listStoragePoolsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all storage pools owned by the caller.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListStoragePoolsRequest request =
* ListStoragePoolsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* ApiFuture future =
* netAppClient.listStoragePoolsPagedCallable().futureCall(request);
* // Do something.
* for (StoragePool element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listStoragePoolsPagedCallable() {
return stub.listStoragePoolsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all storage pools owned by the caller.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListStoragePoolsRequest request =
* ListStoragePoolsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* while (true) {
* ListStoragePoolsResponse response = netAppClient.listStoragePoolsCallable().call(request);
* for (StoragePool element : response.getStoragePoolsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }
*/
public final UnaryCallable
listStoragePoolsCallable() {
return stub.listStoragePoolsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new storage pool.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* StoragePool storagePool = StoragePool.newBuilder().build();
* String storagePoolId = "storagePoolId1617506482";
* StoragePool response =
* netAppClient.createStoragePoolAsync(parent, storagePool, storagePoolId).get();
* }
* }
*
* @param parent Required. Value for parent.
* @param storagePool Required. The required parameters to create a new storage pool.
* @param storagePoolId Required. Id of the requesting storage pool If auto-generating Id
* server-side, remove this field and id from the method_signature of Create RPC
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createStoragePoolAsync(
LocationName parent, StoragePool storagePool, String storagePoolId) {
CreateStoragePoolRequest request =
CreateStoragePoolRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setStoragePool(storagePool)
.setStoragePoolId(storagePoolId)
.build();
return createStoragePoolAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new storage pool.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* StoragePool storagePool = StoragePool.newBuilder().build();
* String storagePoolId = "storagePoolId1617506482";
* StoragePool response =
* netAppClient.createStoragePoolAsync(parent, storagePool, storagePoolId).get();
* }
* }
*
* @param parent Required. Value for parent.
* @param storagePool Required. The required parameters to create a new storage pool.
* @param storagePoolId Required. Id of the requesting storage pool If auto-generating Id
* server-side, remove this field and id from the method_signature of Create RPC
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createStoragePoolAsync(
String parent, StoragePool storagePool, String storagePoolId) {
CreateStoragePoolRequest request =
CreateStoragePoolRequest.newBuilder()
.setParent(parent)
.setStoragePool(storagePool)
.setStoragePoolId(storagePoolId)
.build();
return createStoragePoolAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new storage pool.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateStoragePoolRequest request =
* CreateStoragePoolRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setStoragePoolId("storagePoolId1617506482")
* .setStoragePool(StoragePool.newBuilder().build())
* .build();
* StoragePool response = netAppClient.createStoragePoolAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createStoragePoolAsync(
CreateStoragePoolRequest request) {
return createStoragePoolOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new storage pool.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateStoragePoolRequest request =
* CreateStoragePoolRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setStoragePoolId("storagePoolId1617506482")
* .setStoragePool(StoragePool.newBuilder().build())
* .build();
* OperationFuture future =
* netAppClient.createStoragePoolOperationCallable().futureCall(request);
* // Do something.
* StoragePool response = future.get();
* }
* }
*/
public final OperationCallable
createStoragePoolOperationCallable() {
return stub.createStoragePoolOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new storage pool.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateStoragePoolRequest request =
* CreateStoragePoolRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setStoragePoolId("storagePoolId1617506482")
* .setStoragePool(StoragePool.newBuilder().build())
* .build();
* ApiFuture future = netAppClient.createStoragePoolCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable createStoragePoolCallable() {
return stub.createStoragePoolCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified storage pool by poolId.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* StoragePoolName name = StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]");
* StoragePool response = netAppClient.getStoragePool(name);
* }
* }
*
* @param name Required. Name of the storage pool
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final StoragePool getStoragePool(StoragePoolName name) {
GetStoragePoolRequest request =
GetStoragePoolRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getStoragePool(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified storage pool by poolId.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name = StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString();
* StoragePool response = netAppClient.getStoragePool(name);
* }
* }
*
* @param name Required. Name of the storage pool
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final StoragePool getStoragePool(String name) {
GetStoragePoolRequest request = GetStoragePoolRequest.newBuilder().setName(name).build();
return getStoragePool(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified storage pool by poolId.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetStoragePoolRequest request =
* GetStoragePoolRequest.newBuilder()
* .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString())
* .build();
* StoragePool response = netAppClient.getStoragePool(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final StoragePool getStoragePool(GetStoragePoolRequest request) {
return getStoragePoolCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified storage pool by poolId.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetStoragePoolRequest request =
* GetStoragePoolRequest.newBuilder()
* .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString())
* .build();
* ApiFuture future = netAppClient.getStoragePoolCallable().futureCall(request);
* // Do something.
* StoragePool response = future.get();
* }
* }
*/
public final UnaryCallable getStoragePoolCallable() {
return stub.getStoragePoolCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the storage pool properties with the full spec
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* StoragePool storagePool = StoragePool.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* StoragePool response = netAppClient.updateStoragePoolAsync(storagePool, updateMask).get();
* }
* }
*
* @param storagePool Required. The pool being updated
* @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
* StoragePool resource by the update. The fields specified in the update_mask are relative to
* the resource, not the full request. A field will be overwritten if it is in the mask. If
* the user does not provide a mask then all fields will be overwritten.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateStoragePoolAsync(
StoragePool storagePool, FieldMask updateMask) {
UpdateStoragePoolRequest request =
UpdateStoragePoolRequest.newBuilder()
.setStoragePool(storagePool)
.setUpdateMask(updateMask)
.build();
return updateStoragePoolAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the storage pool properties with the full spec
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateStoragePoolRequest request =
* UpdateStoragePoolRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setStoragePool(StoragePool.newBuilder().build())
* .build();
* StoragePool response = netAppClient.updateStoragePoolAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateStoragePoolAsync(
UpdateStoragePoolRequest request) {
return updateStoragePoolOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the storage pool properties with the full spec
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateStoragePoolRequest request =
* UpdateStoragePoolRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setStoragePool(StoragePool.newBuilder().build())
* .build();
* OperationFuture future =
* netAppClient.updateStoragePoolOperationCallable().futureCall(request);
* // Do something.
* StoragePool response = future.get();
* }
* }
*/
public final OperationCallable
updateStoragePoolOperationCallable() {
return stub.updateStoragePoolOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the storage pool properties with the full spec
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateStoragePoolRequest request =
* UpdateStoragePoolRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setStoragePool(StoragePool.newBuilder().build())
* .build();
* ApiFuture future = netAppClient.updateStoragePoolCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable updateStoragePoolCallable() {
return stub.updateStoragePoolCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the storage pool.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* StoragePoolName name = StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]");
* netAppClient.deleteStoragePoolAsync(name).get();
* }
* }
*
* @param name Required. Name of the storage pool
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteStoragePoolAsync(
StoragePoolName name) {
DeleteStoragePoolRequest request =
DeleteStoragePoolRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
return deleteStoragePoolAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the storage pool.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name = StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString();
* netAppClient.deleteStoragePoolAsync(name).get();
* }
* }
*
* @param name Required. Name of the storage pool
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteStoragePoolAsync(String name) {
DeleteStoragePoolRequest request = DeleteStoragePoolRequest.newBuilder().setName(name).build();
return deleteStoragePoolAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the storage pool.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteStoragePoolRequest request =
* DeleteStoragePoolRequest.newBuilder()
* .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString())
* .build();
* netAppClient.deleteStoragePoolAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteStoragePoolAsync(
DeleteStoragePoolRequest request) {
return deleteStoragePoolOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the storage pool.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteStoragePoolRequest request =
* DeleteStoragePoolRequest.newBuilder()
* .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString())
* .build();
* OperationFuture future =
* netAppClient.deleteStoragePoolOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteStoragePoolOperationCallable() {
return stub.deleteStoragePoolOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the storage pool.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteStoragePoolRequest request =
* DeleteStoragePoolRequest.newBuilder()
* .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString())
* .build();
* ApiFuture future = netAppClient.deleteStoragePoolCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable deleteStoragePoolCallable() {
return stub.deleteStoragePoolCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists Volumes in a given project.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (Volume element : netAppClient.listVolumes(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value for ListVolumesRequest
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListVolumesPagedResponse listVolumes(LocationName parent) {
ListVolumesRequest request =
ListVolumesRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listVolumes(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists Volumes in a given project.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* for (Volume element : netAppClient.listVolumes(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value for ListVolumesRequest
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListVolumesPagedResponse listVolumes(String parent) {
ListVolumesRequest request = ListVolumesRequest.newBuilder().setParent(parent).build();
return listVolumes(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists Volumes in a given project.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListVolumesRequest request =
* ListVolumesRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* for (Volume element : netAppClient.listVolumes(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListVolumesPagedResponse listVolumes(ListVolumesRequest request) {
return listVolumesPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists Volumes in a given project.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListVolumesRequest request =
* ListVolumesRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* ApiFuture future = netAppClient.listVolumesPagedCallable().futureCall(request);
* // Do something.
* for (Volume element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listVolumesPagedCallable() {
return stub.listVolumesPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists Volumes in a given project.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListVolumesRequest request =
* ListVolumesRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* while (true) {
* ListVolumesResponse response = netAppClient.listVolumesCallable().call(request);
* for (Volume element : response.getVolumesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }
*/
public final UnaryCallable listVolumesCallable() {
return stub.listVolumesCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets details of a single Volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* VolumeName name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
* Volume response = netAppClient.getVolume(name);
* }
* }
*
* @param name Required. Name of the volume
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Volume getVolume(VolumeName name) {
GetVolumeRequest request =
GetVolumeRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getVolume(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets details of a single Volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
* Volume response = netAppClient.getVolume(name);
* }
* }
*
* @param name Required. Name of the volume
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Volume getVolume(String name) {
GetVolumeRequest request = GetVolumeRequest.newBuilder().setName(name).build();
return getVolume(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets details of a single Volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetVolumeRequest request =
* GetVolumeRequest.newBuilder()
* .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .build();
* Volume response = netAppClient.getVolume(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Volume getVolume(GetVolumeRequest request) {
return getVolumeCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets details of a single Volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetVolumeRequest request =
* GetVolumeRequest.newBuilder()
* .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .build();
* ApiFuture future = netAppClient.getVolumeCallable().futureCall(request);
* // Do something.
* Volume response = future.get();
* }
* }
*/
public final UnaryCallable getVolumeCallable() {
return stub.getVolumeCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new Volume in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* Volume volume = Volume.newBuilder().build();
* String volumeId = "volumeId-1869770283";
* Volume response = netAppClient.createVolumeAsync(parent, volume, volumeId).get();
* }
* }
*
* @param parent Required. Value for parent.
* @param volume Required. The volume being created.
* @param volumeId Required. Id of the requesting volume If auto-generating Id server-side, remove
* this field and Id from the method_signature of Create RPC
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createVolumeAsync(
LocationName parent, Volume volume, String volumeId) {
CreateVolumeRequest request =
CreateVolumeRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setVolume(volume)
.setVolumeId(volumeId)
.build();
return createVolumeAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new Volume in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* Volume volume = Volume.newBuilder().build();
* String volumeId = "volumeId-1869770283";
* Volume response = netAppClient.createVolumeAsync(parent, volume, volumeId).get();
* }
* }
*
* @param parent Required. Value for parent.
* @param volume Required. The volume being created.
* @param volumeId Required. Id of the requesting volume If auto-generating Id server-side, remove
* this field and Id from the method_signature of Create RPC
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createVolumeAsync(
String parent, Volume volume, String volumeId) {
CreateVolumeRequest request =
CreateVolumeRequest.newBuilder()
.setParent(parent)
.setVolume(volume)
.setVolumeId(volumeId)
.build();
return createVolumeAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new Volume in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateVolumeRequest request =
* CreateVolumeRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setVolumeId("volumeId-1869770283")
* .setVolume(Volume.newBuilder().build())
* .build();
* Volume response = netAppClient.createVolumeAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createVolumeAsync(
CreateVolumeRequest request) {
return createVolumeOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new Volume in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateVolumeRequest request =
* CreateVolumeRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setVolumeId("volumeId-1869770283")
* .setVolume(Volume.newBuilder().build())
* .build();
* OperationFuture future =
* netAppClient.createVolumeOperationCallable().futureCall(request);
* // Do something.
* Volume response = future.get();
* }
* }
*/
public final OperationCallable
createVolumeOperationCallable() {
return stub.createVolumeOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new Volume in a given project and location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateVolumeRequest request =
* CreateVolumeRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setVolumeId("volumeId-1869770283")
* .setVolume(Volume.newBuilder().build())
* .build();
* ApiFuture future = netAppClient.createVolumeCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable createVolumeCallable() {
return stub.createVolumeCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of a single Volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* Volume volume = Volume.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* Volume response = netAppClient.updateVolumeAsync(volume, updateMask).get();
* }
* }
*
* @param volume Required. The volume being updated
* @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
* Volume resource by the update. The fields specified in the update_mask are relative to the
* resource, not the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then all fields will be overwritten.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateVolumeAsync(
Volume volume, FieldMask updateMask) {
UpdateVolumeRequest request =
UpdateVolumeRequest.newBuilder().setVolume(volume).setUpdateMask(updateMask).build();
return updateVolumeAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of a single Volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateVolumeRequest request =
* UpdateVolumeRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setVolume(Volume.newBuilder().build())
* .build();
* Volume response = netAppClient.updateVolumeAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateVolumeAsync(
UpdateVolumeRequest request) {
return updateVolumeOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of a single Volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateVolumeRequest request =
* UpdateVolumeRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setVolume(Volume.newBuilder().build())
* .build();
* OperationFuture future =
* netAppClient.updateVolumeOperationCallable().futureCall(request);
* // Do something.
* Volume response = future.get();
* }
* }
*/
public final OperationCallable
updateVolumeOperationCallable() {
return stub.updateVolumeOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the parameters of a single Volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateVolumeRequest request =
* UpdateVolumeRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setVolume(Volume.newBuilder().build())
* .build();
* ApiFuture future = netAppClient.updateVolumeCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable updateVolumeCallable() {
return stub.updateVolumeCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a single Volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* VolumeName name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
* netAppClient.deleteVolumeAsync(name).get();
* }
* }
*
* @param name Required. Name of the volume
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteVolumeAsync(VolumeName name) {
DeleteVolumeRequest request =
DeleteVolumeRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return deleteVolumeAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a single Volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
* netAppClient.deleteVolumeAsync(name).get();
* }
* }
*
* @param name Required. Name of the volume
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteVolumeAsync(String name) {
DeleteVolumeRequest request = DeleteVolumeRequest.newBuilder().setName(name).build();
return deleteVolumeAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a single Volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteVolumeRequest request =
* DeleteVolumeRequest.newBuilder()
* .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setForce(true)
* .build();
* netAppClient.deleteVolumeAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteVolumeAsync(
DeleteVolumeRequest request) {
return deleteVolumeOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a single Volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteVolumeRequest request =
* DeleteVolumeRequest.newBuilder()
* .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setForce(true)
* .build();
* OperationFuture future =
* netAppClient.deleteVolumeOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteVolumeOperationCallable() {
return stub.deleteVolumeOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a single Volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteVolumeRequest request =
* DeleteVolumeRequest.newBuilder()
* .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setForce(true)
* .build();
* ApiFuture future = netAppClient.deleteVolumeCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable deleteVolumeCallable() {
return stub.deleteVolumeCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Revert an existing volume to a specified snapshot. Warning! This operation will permanently
* revert all changes made after the snapshot was created.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* RevertVolumeRequest request =
* RevertVolumeRequest.newBuilder()
* .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setSnapshotId("snapshotId-1113817601")
* .build();
* Volume response = netAppClient.revertVolumeAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture revertVolumeAsync(
RevertVolumeRequest request) {
return revertVolumeOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Revert an existing volume to a specified snapshot. Warning! This operation will permanently
* revert all changes made after the snapshot was created.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* RevertVolumeRequest request =
* RevertVolumeRequest.newBuilder()
* .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setSnapshotId("snapshotId-1113817601")
* .build();
* OperationFuture future =
* netAppClient.revertVolumeOperationCallable().futureCall(request);
* // Do something.
* Volume response = future.get();
* }
* }
*/
public final OperationCallable
revertVolumeOperationCallable() {
return stub.revertVolumeOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Revert an existing volume to a specified snapshot. Warning! This operation will permanently
* revert all changes made after the snapshot was created.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* RevertVolumeRequest request =
* RevertVolumeRequest.newBuilder()
* .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setSnapshotId("snapshotId-1113817601")
* .build();
* ApiFuture future = netAppClient.revertVolumeCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable revertVolumeCallable() {
return stub.revertVolumeCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all snapshots for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
* for (Snapshot element : netAppClient.listSnapshots(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. The volume for which to retrieve snapshot information, in the format
* `projects/{project_id}/locations/{location}/volumes/{volume_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListSnapshotsPagedResponse listSnapshots(VolumeName parent) {
ListSnapshotsRequest request =
ListSnapshotsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listSnapshots(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all snapshots for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
* for (Snapshot element : netAppClient.listSnapshots(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. The volume for which to retrieve snapshot information, in the format
* `projects/{project_id}/locations/{location}/volumes/{volume_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListSnapshotsPagedResponse listSnapshots(String parent) {
ListSnapshotsRequest request = ListSnapshotsRequest.newBuilder().setParent(parent).build();
return listSnapshots(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all snapshots for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListSnapshotsRequest request =
* ListSnapshotsRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* for (Snapshot element : netAppClient.listSnapshots(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest request) {
return listSnapshotsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all snapshots for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListSnapshotsRequest request =
* ListSnapshotsRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* ApiFuture future = netAppClient.listSnapshotsPagedCallable().futureCall(request);
* // Do something.
* for (Snapshot element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listSnapshotsPagedCallable() {
return stub.listSnapshotsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all snapshots for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListSnapshotsRequest request =
* ListSnapshotsRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* while (true) {
* ListSnapshotsResponse response = netAppClient.listSnapshotsCallable().call(request);
* for (Snapshot element : response.getSnapshotsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }
*/
public final UnaryCallable listSnapshotsCallable() {
return stub.listSnapshotsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describe a snapshot for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* SnapshotName name = SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]");
* Snapshot response = netAppClient.getSnapshot(name);
* }
* }
*
* @param name Required. The snapshot resource name, in the format
* `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Snapshot getSnapshot(SnapshotName name) {
GetSnapshotRequest request =
GetSnapshotRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getSnapshot(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describe a snapshot for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name = SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString();
* Snapshot response = netAppClient.getSnapshot(name);
* }
* }
*
* @param name Required. The snapshot resource name, in the format
* `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Snapshot getSnapshot(String name) {
GetSnapshotRequest request = GetSnapshotRequest.newBuilder().setName(name).build();
return getSnapshot(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describe a snapshot for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetSnapshotRequest request =
* GetSnapshotRequest.newBuilder()
* .setName(
* SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString())
* .build();
* Snapshot response = netAppClient.getSnapshot(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Snapshot getSnapshot(GetSnapshotRequest request) {
return getSnapshotCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describe a snapshot for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetSnapshotRequest request =
* GetSnapshotRequest.newBuilder()
* .setName(
* SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString())
* .build();
* ApiFuture future = netAppClient.getSnapshotCallable().futureCall(request);
* // Do something.
* Snapshot response = future.get();
* }
* }
*/
public final UnaryCallable getSnapshotCallable() {
return stub.getSnapshotCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Create a new snapshot for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
* Snapshot snapshot = Snapshot.newBuilder().build();
* String snapshotId = "snapshotId-1113817601";
* Snapshot response = netAppClient.createSnapshotAsync(parent, snapshot, snapshotId).get();
* }
* }
*
* @param parent Required. The NetApp volume to create the snapshots of, in the format
* `projects/{project_id}/locations/{location}/volumes/{volume_id}`
* @param snapshot Required. A snapshot resource
* @param snapshotId Required. ID of the snapshot to create. This value must start with a
* lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot
* end with a hyphen.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createSnapshotAsync(
VolumeName parent, Snapshot snapshot, String snapshotId) {
CreateSnapshotRequest request =
CreateSnapshotRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setSnapshot(snapshot)
.setSnapshotId(snapshotId)
.build();
return createSnapshotAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Create a new snapshot for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
* Snapshot snapshot = Snapshot.newBuilder().build();
* String snapshotId = "snapshotId-1113817601";
* Snapshot response = netAppClient.createSnapshotAsync(parent, snapshot, snapshotId).get();
* }
* }
*
* @param parent Required. The NetApp volume to create the snapshots of, in the format
* `projects/{project_id}/locations/{location}/volumes/{volume_id}`
* @param snapshot Required. A snapshot resource
* @param snapshotId Required. ID of the snapshot to create. This value must start with a
* lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot
* end with a hyphen.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createSnapshotAsync(
String parent, Snapshot snapshot, String snapshotId) {
CreateSnapshotRequest request =
CreateSnapshotRequest.newBuilder()
.setParent(parent)
.setSnapshot(snapshot)
.setSnapshotId(snapshotId)
.build();
return createSnapshotAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Create a new snapshot for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateSnapshotRequest request =
* CreateSnapshotRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setSnapshot(Snapshot.newBuilder().build())
* .setSnapshotId("snapshotId-1113817601")
* .build();
* Snapshot response = netAppClient.createSnapshotAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createSnapshotAsync(
CreateSnapshotRequest request) {
return createSnapshotOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Create a new snapshot for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateSnapshotRequest request =
* CreateSnapshotRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setSnapshot(Snapshot.newBuilder().build())
* .setSnapshotId("snapshotId-1113817601")
* .build();
* OperationFuture future =
* netAppClient.createSnapshotOperationCallable().futureCall(request);
* // Do something.
* Snapshot response = future.get();
* }
* }
*/
public final OperationCallable
createSnapshotOperationCallable() {
return stub.createSnapshotOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Create a new snapshot for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateSnapshotRequest request =
* CreateSnapshotRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setSnapshot(Snapshot.newBuilder().build())
* .setSnapshotId("snapshotId-1113817601")
* .build();
* ApiFuture future = netAppClient.createSnapshotCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable createSnapshotCallable() {
return stub.createSnapshotCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a snapshot.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* SnapshotName name = SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]");
* netAppClient.deleteSnapshotAsync(name).get();
* }
* }
*
* @param name Required. The snapshot resource name, in the format
* `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteSnapshotAsync(SnapshotName name) {
DeleteSnapshotRequest request =
DeleteSnapshotRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return deleteSnapshotAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a snapshot.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name = SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString();
* netAppClient.deleteSnapshotAsync(name).get();
* }
* }
*
* @param name Required. The snapshot resource name, in the format
* `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteSnapshotAsync(String name) {
DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder().setName(name).build();
return deleteSnapshotAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a snapshot.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteSnapshotRequest request =
* DeleteSnapshotRequest.newBuilder()
* .setName(
* SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString())
* .build();
* netAppClient.deleteSnapshotAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteSnapshotAsync(
DeleteSnapshotRequest request) {
return deleteSnapshotOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a snapshot.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteSnapshotRequest request =
* DeleteSnapshotRequest.newBuilder()
* .setName(
* SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString())
* .build();
* OperationFuture future =
* netAppClient.deleteSnapshotOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteSnapshotOperationCallable() {
return stub.deleteSnapshotOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a snapshot.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteSnapshotRequest request =
* DeleteSnapshotRequest.newBuilder()
* .setName(
* SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString())
* .build();
* ApiFuture future = netAppClient.deleteSnapshotCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable deleteSnapshotCallable() {
return stub.deleteSnapshotCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the settings of a specific snapshot.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* Snapshot snapshot = Snapshot.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* Snapshot response = netAppClient.updateSnapshotAsync(snapshot, updateMask).get();
* }
* }
*
* @param snapshot Required. A snapshot resource
* @param updateMask Required. Mask of fields to update. At least one path must be supplied in
* this field.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateSnapshotAsync(
Snapshot snapshot, FieldMask updateMask) {
UpdateSnapshotRequest request =
UpdateSnapshotRequest.newBuilder().setSnapshot(snapshot).setUpdateMask(updateMask).build();
return updateSnapshotAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the settings of a specific snapshot.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateSnapshotRequest request =
* UpdateSnapshotRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setSnapshot(Snapshot.newBuilder().build())
* .build();
* Snapshot response = netAppClient.updateSnapshotAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateSnapshotAsync(
UpdateSnapshotRequest request) {
return updateSnapshotOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the settings of a specific snapshot.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateSnapshotRequest request =
* UpdateSnapshotRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setSnapshot(Snapshot.newBuilder().build())
* .build();
* OperationFuture future =
* netAppClient.updateSnapshotOperationCallable().futureCall(request);
* // Do something.
* Snapshot response = future.get();
* }
* }
*/
public final OperationCallable
updateSnapshotOperationCallable() {
return stub.updateSnapshotOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the settings of a specific snapshot.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateSnapshotRequest request =
* UpdateSnapshotRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setSnapshot(Snapshot.newBuilder().build())
* .build();
* ApiFuture future = netAppClient.updateSnapshotCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable updateSnapshotCallable() {
return stub.updateSnapshotCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists active directories.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (ActiveDirectory element : netAppClient.listActiveDirectories(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value for ListActiveDirectoriesRequest
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListActiveDirectoriesPagedResponse listActiveDirectories(LocationName parent) {
ListActiveDirectoriesRequest request =
ListActiveDirectoriesRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listActiveDirectories(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists active directories.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* for (ActiveDirectory element : netAppClient.listActiveDirectories(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value for ListActiveDirectoriesRequest
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListActiveDirectoriesPagedResponse listActiveDirectories(String parent) {
ListActiveDirectoriesRequest request =
ListActiveDirectoriesRequest.newBuilder().setParent(parent).build();
return listActiveDirectories(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists active directories.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListActiveDirectoriesRequest request =
* ListActiveDirectoriesRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* for (ActiveDirectory element : netAppClient.listActiveDirectories(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListActiveDirectoriesPagedResponse listActiveDirectories(
ListActiveDirectoriesRequest request) {
return listActiveDirectoriesPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists active directories.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListActiveDirectoriesRequest request =
* ListActiveDirectoriesRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* ApiFuture future =
* netAppClient.listActiveDirectoriesPagedCallable().futureCall(request);
* // Do something.
* for (ActiveDirectory element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listActiveDirectoriesPagedCallable() {
return stub.listActiveDirectoriesPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists active directories.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListActiveDirectoriesRequest request =
* ListActiveDirectoriesRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* while (true) {
* ListActiveDirectoriesResponse response =
* netAppClient.listActiveDirectoriesCallable().call(request);
* for (ActiveDirectory element : response.getActiveDirectoriesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }
*/
public final UnaryCallable
listActiveDirectoriesCallable() {
return stub.listActiveDirectoriesCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specified active directory.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ActiveDirectoryName name =
* ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]");
* ActiveDirectory response = netAppClient.getActiveDirectory(name);
* }
* }
*
* @param name Required. Name of the active directory.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ActiveDirectory getActiveDirectory(ActiveDirectoryName name) {
GetActiveDirectoryRequest request =
GetActiveDirectoryRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
return getActiveDirectory(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specified active directory.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name =
* ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]").toString();
* ActiveDirectory response = netAppClient.getActiveDirectory(name);
* }
* }
*
* @param name Required. Name of the active directory.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ActiveDirectory getActiveDirectory(String name) {
GetActiveDirectoryRequest request =
GetActiveDirectoryRequest.newBuilder().setName(name).build();
return getActiveDirectory(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specified active directory.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetActiveDirectoryRequest request =
* GetActiveDirectoryRequest.newBuilder()
* .setName(
* ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]")
* .toString())
* .build();
* ActiveDirectory response = netAppClient.getActiveDirectory(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ActiveDirectory getActiveDirectory(GetActiveDirectoryRequest request) {
return getActiveDirectoryCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describes a specified active directory.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetActiveDirectoryRequest request =
* GetActiveDirectoryRequest.newBuilder()
* .setName(
* ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]")
* .toString())
* .build();
* ApiFuture future =
* netAppClient.getActiveDirectoryCallable().futureCall(request);
* // Do something.
* ActiveDirectory response = future.get();
* }
* }
*/
public final UnaryCallable
getActiveDirectoryCallable() {
return stub.getActiveDirectoryCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* CreateActiveDirectory Creates the active directory specified in the request.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* ActiveDirectory activeDirectory = ActiveDirectory.newBuilder().build();
* String activeDirectoryId = "activeDirectoryId589359490";
* ActiveDirectory response =
* netAppClient.createActiveDirectoryAsync(parent, activeDirectory, activeDirectoryId).get();
* }
* }
*
* @param parent Required. Value for parent.
* @param activeDirectory Required. Fields of the to be created active directory.
* @param activeDirectoryId Required. ID of the active directory to create.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createActiveDirectoryAsync(
LocationName parent, ActiveDirectory activeDirectory, String activeDirectoryId) {
CreateActiveDirectoryRequest request =
CreateActiveDirectoryRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setActiveDirectory(activeDirectory)
.setActiveDirectoryId(activeDirectoryId)
.build();
return createActiveDirectoryAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* CreateActiveDirectory Creates the active directory specified in the request.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* ActiveDirectory activeDirectory = ActiveDirectory.newBuilder().build();
* String activeDirectoryId = "activeDirectoryId589359490";
* ActiveDirectory response =
* netAppClient.createActiveDirectoryAsync(parent, activeDirectory, activeDirectoryId).get();
* }
* }
*
* @param parent Required. Value for parent.
* @param activeDirectory Required. Fields of the to be created active directory.
* @param activeDirectoryId Required. ID of the active directory to create.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createActiveDirectoryAsync(
String parent, ActiveDirectory activeDirectory, String activeDirectoryId) {
CreateActiveDirectoryRequest request =
CreateActiveDirectoryRequest.newBuilder()
.setParent(parent)
.setActiveDirectory(activeDirectory)
.setActiveDirectoryId(activeDirectoryId)
.build();
return createActiveDirectoryAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* CreateActiveDirectory Creates the active directory specified in the request.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateActiveDirectoryRequest request =
* CreateActiveDirectoryRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setActiveDirectory(ActiveDirectory.newBuilder().build())
* .setActiveDirectoryId("activeDirectoryId589359490")
* .build();
* ActiveDirectory response = netAppClient.createActiveDirectoryAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createActiveDirectoryAsync(
CreateActiveDirectoryRequest request) {
return createActiveDirectoryOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* CreateActiveDirectory Creates the active directory specified in the request.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateActiveDirectoryRequest request =
* CreateActiveDirectoryRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setActiveDirectory(ActiveDirectory.newBuilder().build())
* .setActiveDirectoryId("activeDirectoryId589359490")
* .build();
* OperationFuture future =
* netAppClient.createActiveDirectoryOperationCallable().futureCall(request);
* // Do something.
* ActiveDirectory response = future.get();
* }
* }
*/
public final OperationCallable
createActiveDirectoryOperationCallable() {
return stub.createActiveDirectoryOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* CreateActiveDirectory Creates the active directory specified in the request.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateActiveDirectoryRequest request =
* CreateActiveDirectoryRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setActiveDirectory(ActiveDirectory.newBuilder().build())
* .setActiveDirectoryId("activeDirectoryId589359490")
* .build();
* ApiFuture future =
* netAppClient.createActiveDirectoryCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable
createActiveDirectoryCallable() {
return stub.createActiveDirectoryCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Update the parameters of an active directories.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ActiveDirectory activeDirectory = ActiveDirectory.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* ActiveDirectory response =
* netAppClient.updateActiveDirectoryAsync(activeDirectory, updateMask).get();
* }
* }
*
* @param activeDirectory Required. The volume being updated
* @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
* Active Directory resource by the update. The fields specified in the update_mask are
* relative to the resource, not the full request. A field will be overwritten if it is in the
* mask. If the user does not provide a mask then all fields will be overwritten.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateActiveDirectoryAsync(
ActiveDirectory activeDirectory, FieldMask updateMask) {
UpdateActiveDirectoryRequest request =
UpdateActiveDirectoryRequest.newBuilder()
.setActiveDirectory(activeDirectory)
.setUpdateMask(updateMask)
.build();
return updateActiveDirectoryAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Update the parameters of an active directories.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateActiveDirectoryRequest request =
* UpdateActiveDirectoryRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setActiveDirectory(ActiveDirectory.newBuilder().build())
* .build();
* ActiveDirectory response = netAppClient.updateActiveDirectoryAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateActiveDirectoryAsync(
UpdateActiveDirectoryRequest request) {
return updateActiveDirectoryOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Update the parameters of an active directories.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateActiveDirectoryRequest request =
* UpdateActiveDirectoryRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setActiveDirectory(ActiveDirectory.newBuilder().build())
* .build();
* OperationFuture future =
* netAppClient.updateActiveDirectoryOperationCallable().futureCall(request);
* // Do something.
* ActiveDirectory response = future.get();
* }
* }
*/
public final OperationCallable
updateActiveDirectoryOperationCallable() {
return stub.updateActiveDirectoryOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Update the parameters of an active directories.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateActiveDirectoryRequest request =
* UpdateActiveDirectoryRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setActiveDirectory(ActiveDirectory.newBuilder().build())
* .build();
* ApiFuture future =
* netAppClient.updateActiveDirectoryCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable
updateActiveDirectoryCallable() {
return stub.updateActiveDirectoryCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Delete the active directory specified in the request.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ActiveDirectoryName name =
* ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]");
* netAppClient.deleteActiveDirectoryAsync(name).get();
* }
* }
*
* @param name Required. Name of the active directory.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteActiveDirectoryAsync(
ActiveDirectoryName name) {
DeleteActiveDirectoryRequest request =
DeleteActiveDirectoryRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
return deleteActiveDirectoryAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Delete the active directory specified in the request.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name =
* ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]").toString();
* netAppClient.deleteActiveDirectoryAsync(name).get();
* }
* }
*
* @param name Required. Name of the active directory.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteActiveDirectoryAsync(String name) {
DeleteActiveDirectoryRequest request =
DeleteActiveDirectoryRequest.newBuilder().setName(name).build();
return deleteActiveDirectoryAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Delete the active directory specified in the request.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteActiveDirectoryRequest request =
* DeleteActiveDirectoryRequest.newBuilder()
* .setName(
* ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]")
* .toString())
* .build();
* netAppClient.deleteActiveDirectoryAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteActiveDirectoryAsync(
DeleteActiveDirectoryRequest request) {
return deleteActiveDirectoryOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Delete the active directory specified in the request.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteActiveDirectoryRequest request =
* DeleteActiveDirectoryRequest.newBuilder()
* .setName(
* ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]")
* .toString())
* .build();
* OperationFuture future =
* netAppClient.deleteActiveDirectoryOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteActiveDirectoryOperationCallable() {
return stub.deleteActiveDirectoryOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Delete the active directory specified in the request.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteActiveDirectoryRequest request =
* DeleteActiveDirectoryRequest.newBuilder()
* .setName(
* ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]")
* .toString())
* .build();
* ApiFuture future =
* netAppClient.deleteActiveDirectoryCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable
deleteActiveDirectoryCallable() {
return stub.deleteActiveDirectoryCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all KMS configs owned by the caller.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (KmsConfig element : netAppClient.listKmsConfigs(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListKmsConfigsPagedResponse listKmsConfigs(LocationName parent) {
ListKmsConfigsRequest request =
ListKmsConfigsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listKmsConfigs(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all KMS configs owned by the caller.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* for (KmsConfig element : netAppClient.listKmsConfigs(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListKmsConfigsPagedResponse listKmsConfigs(String parent) {
ListKmsConfigsRequest request = ListKmsConfigsRequest.newBuilder().setParent(parent).build();
return listKmsConfigs(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all KMS configs owned by the caller.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListKmsConfigsRequest request =
* ListKmsConfigsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* for (KmsConfig element : netAppClient.listKmsConfigs(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListKmsConfigsPagedResponse listKmsConfigs(ListKmsConfigsRequest request) {
return listKmsConfigsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all KMS configs owned by the caller.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListKmsConfigsRequest request =
* ListKmsConfigsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* ApiFuture future = netAppClient.listKmsConfigsPagedCallable().futureCall(request);
* // Do something.
* for (KmsConfig element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listKmsConfigsPagedCallable() {
return stub.listKmsConfigsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all KMS configs owned by the caller.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListKmsConfigsRequest request =
* ListKmsConfigsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* while (true) {
* ListKmsConfigsResponse response = netAppClient.listKmsConfigsCallable().call(request);
* for (KmsConfig element : response.getKmsConfigsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }
*/
public final UnaryCallable
listKmsConfigsCallable() {
return stub.listKmsConfigsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new KMS config.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* KmsConfig kmsConfig = KmsConfig.newBuilder().build();
* String kmsConfigId = "kmsConfigId-1159731602";
* KmsConfig response = netAppClient.createKmsConfigAsync(parent, kmsConfig, kmsConfigId).get();
* }
* }
*
* @param parent Required. Value for parent.
* @param kmsConfig Required. The required parameters to create a new KmsConfig.
* @param kmsConfigId Required. Id of the requesting KmsConfig If auto-generating Id server-side,
* remove this field and id from the method_signature of Create RPC
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createKmsConfigAsync(
LocationName parent, KmsConfig kmsConfig, String kmsConfigId) {
CreateKmsConfigRequest request =
CreateKmsConfigRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setKmsConfig(kmsConfig)
.setKmsConfigId(kmsConfigId)
.build();
return createKmsConfigAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new KMS config.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* KmsConfig kmsConfig = KmsConfig.newBuilder().build();
* String kmsConfigId = "kmsConfigId-1159731602";
* KmsConfig response = netAppClient.createKmsConfigAsync(parent, kmsConfig, kmsConfigId).get();
* }
* }
*
* @param parent Required. Value for parent.
* @param kmsConfig Required. The required parameters to create a new KmsConfig.
* @param kmsConfigId Required. Id of the requesting KmsConfig If auto-generating Id server-side,
* remove this field and id from the method_signature of Create RPC
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createKmsConfigAsync(
String parent, KmsConfig kmsConfig, String kmsConfigId) {
CreateKmsConfigRequest request =
CreateKmsConfigRequest.newBuilder()
.setParent(parent)
.setKmsConfig(kmsConfig)
.setKmsConfigId(kmsConfigId)
.build();
return createKmsConfigAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new KMS config.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateKmsConfigRequest request =
* CreateKmsConfigRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setKmsConfigId("kmsConfigId-1159731602")
* .setKmsConfig(KmsConfig.newBuilder().build())
* .build();
* KmsConfig response = netAppClient.createKmsConfigAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createKmsConfigAsync(
CreateKmsConfigRequest request) {
return createKmsConfigOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new KMS config.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateKmsConfigRequest request =
* CreateKmsConfigRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setKmsConfigId("kmsConfigId-1159731602")
* .setKmsConfig(KmsConfig.newBuilder().build())
* .build();
* OperationFuture future =
* netAppClient.createKmsConfigOperationCallable().futureCall(request);
* // Do something.
* KmsConfig response = future.get();
* }
* }
*/
public final OperationCallable
createKmsConfigOperationCallable() {
return stub.createKmsConfigOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a new KMS config.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateKmsConfigRequest request =
* CreateKmsConfigRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setKmsConfigId("kmsConfigId-1159731602")
* .setKmsConfig(KmsConfig.newBuilder().build())
* .build();
* ApiFuture future = netAppClient.createKmsConfigCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable createKmsConfigCallable() {
return stub.createKmsConfigCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified KMS config by kms_config_id.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* KmsConfigName name = KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]");
* KmsConfig response = netAppClient.getKmsConfig(name);
* }
* }
*
* @param name Required. Name of the KmsConfig
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final KmsConfig getKmsConfig(KmsConfigName name) {
GetKmsConfigRequest request =
GetKmsConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getKmsConfig(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified KMS config by kms_config_id.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name = KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString();
* KmsConfig response = netAppClient.getKmsConfig(name);
* }
* }
*
* @param name Required. Name of the KmsConfig
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final KmsConfig getKmsConfig(String name) {
GetKmsConfigRequest request = GetKmsConfigRequest.newBuilder().setName(name).build();
return getKmsConfig(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified KMS config by kms_config_id.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetKmsConfigRequest request =
* GetKmsConfigRequest.newBuilder()
* .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString())
* .build();
* KmsConfig response = netAppClient.getKmsConfig(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final KmsConfig getKmsConfig(GetKmsConfigRequest request) {
return getKmsConfigCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified KMS config by kms_config_id.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetKmsConfigRequest request =
* GetKmsConfigRequest.newBuilder()
* .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString())
* .build();
* ApiFuture future = netAppClient.getKmsConfigCallable().futureCall(request);
* // Do something.
* KmsConfig response = future.get();
* }
* }
*/
public final UnaryCallable getKmsConfigCallable() {
return stub.getKmsConfigCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the Kms config properties with the full spec
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* KmsConfig kmsConfig = KmsConfig.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* KmsConfig response = netAppClient.updateKmsConfigAsync(kmsConfig, updateMask).get();
* }
* }
*
* @param kmsConfig Required. The KmsConfig being updated
* @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
* KmsConfig resource by the update. The fields specified in the update_mask are relative to
* the resource, not the full request. A field will be overwritten if it is in the mask. If
* the user does not provide a mask then all fields will be overwritten.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateKmsConfigAsync(
KmsConfig kmsConfig, FieldMask updateMask) {
UpdateKmsConfigRequest request =
UpdateKmsConfigRequest.newBuilder()
.setKmsConfig(kmsConfig)
.setUpdateMask(updateMask)
.build();
return updateKmsConfigAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the Kms config properties with the full spec
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateKmsConfigRequest request =
* UpdateKmsConfigRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setKmsConfig(KmsConfig.newBuilder().build())
* .build();
* KmsConfig response = netAppClient.updateKmsConfigAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateKmsConfigAsync(
UpdateKmsConfigRequest request) {
return updateKmsConfigOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the Kms config properties with the full spec
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateKmsConfigRequest request =
* UpdateKmsConfigRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setKmsConfig(KmsConfig.newBuilder().build())
* .build();
* OperationFuture future =
* netAppClient.updateKmsConfigOperationCallable().futureCall(request);
* // Do something.
* KmsConfig response = future.get();
* }
* }
*/
public final OperationCallable
updateKmsConfigOperationCallable() {
return stub.updateKmsConfigOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the Kms config properties with the full spec
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateKmsConfigRequest request =
* UpdateKmsConfigRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setKmsConfig(KmsConfig.newBuilder().build())
* .build();
* ApiFuture future = netAppClient.updateKmsConfigCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable updateKmsConfigCallable() {
return stub.updateKmsConfigCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the
* whole region.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* EncryptVolumesRequest request =
* EncryptVolumesRequest.newBuilder()
* .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString())
* .build();
* KmsConfig response = netAppClient.encryptVolumesAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture encryptVolumesAsync(
EncryptVolumesRequest request) {
return encryptVolumesOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the
* whole region.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* EncryptVolumesRequest request =
* EncryptVolumesRequest.newBuilder()
* .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString())
* .build();
* OperationFuture future =
* netAppClient.encryptVolumesOperationCallable().futureCall(request);
* // Do something.
* KmsConfig response = future.get();
* }
* }
*/
public final OperationCallable
encryptVolumesOperationCallable() {
return stub.encryptVolumesOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the
* whole region.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* EncryptVolumesRequest request =
* EncryptVolumesRequest.newBuilder()
* .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString())
* .build();
* ApiFuture future = netAppClient.encryptVolumesCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable encryptVolumesCallable() {
return stub.encryptVolumesCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Verifies KMS config reachability.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* VerifyKmsConfigRequest request =
* VerifyKmsConfigRequest.newBuilder()
* .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString())
* .build();
* VerifyKmsConfigResponse response = netAppClient.verifyKmsConfig(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final VerifyKmsConfigResponse verifyKmsConfig(VerifyKmsConfigRequest request) {
return verifyKmsConfigCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Verifies KMS config reachability.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* VerifyKmsConfigRequest request =
* VerifyKmsConfigRequest.newBuilder()
* .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString())
* .build();
* ApiFuture future =
* netAppClient.verifyKmsConfigCallable().futureCall(request);
* // Do something.
* VerifyKmsConfigResponse response = future.get();
* }
* }
*/
public final UnaryCallable
verifyKmsConfigCallable() {
return stub.verifyKmsConfigCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the Kms config.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* KmsConfigName name = KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]");
* netAppClient.deleteKmsConfigAsync(name).get();
* }
* }
*
* @param name Required. Name of the KmsConfig.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteKmsConfigAsync(KmsConfigName name) {
DeleteKmsConfigRequest request =
DeleteKmsConfigRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return deleteKmsConfigAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the Kms config.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name = KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString();
* netAppClient.deleteKmsConfigAsync(name).get();
* }
* }
*
* @param name Required. Name of the KmsConfig.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteKmsConfigAsync(String name) {
DeleteKmsConfigRequest request = DeleteKmsConfigRequest.newBuilder().setName(name).build();
return deleteKmsConfigAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the Kms config.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteKmsConfigRequest request =
* DeleteKmsConfigRequest.newBuilder()
* .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString())
* .build();
* netAppClient.deleteKmsConfigAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteKmsConfigAsync(
DeleteKmsConfigRequest request) {
return deleteKmsConfigOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the Kms config.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteKmsConfigRequest request =
* DeleteKmsConfigRequest.newBuilder()
* .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString())
* .build();
* OperationFuture future =
* netAppClient.deleteKmsConfigOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteKmsConfigOperationCallable() {
return stub.deleteKmsConfigOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the Kms config.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteKmsConfigRequest request =
* DeleteKmsConfigRequest.newBuilder()
* .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString())
* .build();
* ApiFuture future = netAppClient.deleteKmsConfigCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable deleteKmsConfigCallable() {
return stub.deleteKmsConfigCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all replications for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
* for (Replication element : netAppClient.listReplications(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. The volume for which to retrieve replication information, in the format
* `projects/{project_id}/locations/{location}/volumes/{volume_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListReplicationsPagedResponse listReplications(VolumeName parent) {
ListReplicationsRequest request =
ListReplicationsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listReplications(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all replications for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
* for (Replication element : netAppClient.listReplications(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. The volume for which to retrieve replication information, in the format
* `projects/{project_id}/locations/{location}/volumes/{volume_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListReplicationsPagedResponse listReplications(String parent) {
ListReplicationsRequest request =
ListReplicationsRequest.newBuilder().setParent(parent).build();
return listReplications(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all replications for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListReplicationsRequest request =
* ListReplicationsRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* for (Replication element : netAppClient.listReplications(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListReplicationsPagedResponse listReplications(ListReplicationsRequest request) {
return listReplicationsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all replications for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListReplicationsRequest request =
* ListReplicationsRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* ApiFuture future =
* netAppClient.listReplicationsPagedCallable().futureCall(request);
* // Do something.
* for (Replication element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listReplicationsPagedCallable() {
return stub.listReplicationsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all replications for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListReplicationsRequest request =
* ListReplicationsRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* while (true) {
* ListReplicationsResponse response = netAppClient.listReplicationsCallable().call(request);
* for (Replication element : response.getReplicationsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }
*/
public final UnaryCallable
listReplicationsCallable() {
return stub.listReplicationsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describe a replication for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ReplicationName name =
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]");
* Replication response = netAppClient.getReplication(name);
* }
* }
*
* @param name Required. The replication resource name, in the format
* `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Replication getReplication(ReplicationName name) {
GetReplicationRequest request =
GetReplicationRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getReplication(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describe a replication for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name =
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]").toString();
* Replication response = netAppClient.getReplication(name);
* }
* }
*
* @param name Required. The replication resource name, in the format
* `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Replication getReplication(String name) {
GetReplicationRequest request = GetReplicationRequest.newBuilder().setName(name).build();
return getReplication(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describe a replication for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetReplicationRequest request =
* GetReplicationRequest.newBuilder()
* .setName(
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]")
* .toString())
* .build();
* Replication response = netAppClient.getReplication(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Replication getReplication(GetReplicationRequest request) {
return getReplicationCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Describe a replication for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetReplicationRequest request =
* GetReplicationRequest.newBuilder()
* .setName(
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]")
* .toString())
* .build();
* ApiFuture future = netAppClient.getReplicationCallable().futureCall(request);
* // Do something.
* Replication response = future.get();
* }
* }
*/
public final UnaryCallable getReplicationCallable() {
return stub.getReplicationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Create a new replication for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]");
* Replication replication = Replication.newBuilder().build();
* String replicationId = "replicationId1170820615";
* Replication response =
* netAppClient.createReplicationAsync(parent, replication, replicationId).get();
* }
* }
*
* @param parent Required. The NetApp volume to create the replications of, in the format
* `projects/{project_id}/locations/{location}/volumes/{volume_id}`
* @param replication Required. A replication resource
* @param replicationId Required. ID of the replication to create. This value must start with a
* lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot
* end with a hyphen.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createReplicationAsync(
VolumeName parent, Replication replication, String replicationId) {
CreateReplicationRequest request =
CreateReplicationRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setReplication(replication)
.setReplicationId(replicationId)
.build();
return createReplicationAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Create a new replication for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString();
* Replication replication = Replication.newBuilder().build();
* String replicationId = "replicationId1170820615";
* Replication response =
* netAppClient.createReplicationAsync(parent, replication, replicationId).get();
* }
* }
*
* @param parent Required. The NetApp volume to create the replications of, in the format
* `projects/{project_id}/locations/{location}/volumes/{volume_id}`
* @param replication Required. A replication resource
* @param replicationId Required. ID of the replication to create. This value must start with a
* lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot
* end with a hyphen.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createReplicationAsync(
String parent, Replication replication, String replicationId) {
CreateReplicationRequest request =
CreateReplicationRequest.newBuilder()
.setParent(parent)
.setReplication(replication)
.setReplicationId(replicationId)
.build();
return createReplicationAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Create a new replication for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateReplicationRequest request =
* CreateReplicationRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setReplication(Replication.newBuilder().build())
* .setReplicationId("replicationId1170820615")
* .build();
* Replication response = netAppClient.createReplicationAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createReplicationAsync(
CreateReplicationRequest request) {
return createReplicationOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Create a new replication for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateReplicationRequest request =
* CreateReplicationRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setReplication(Replication.newBuilder().build())
* .setReplicationId("replicationId1170820615")
* .build();
* OperationFuture future =
* netAppClient.createReplicationOperationCallable().futureCall(request);
* // Do something.
* Replication response = future.get();
* }
* }
*/
public final OperationCallable
createReplicationOperationCallable() {
return stub.createReplicationOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Create a new replication for a volume.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateReplicationRequest request =
* CreateReplicationRequest.newBuilder()
* .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString())
* .setReplication(Replication.newBuilder().build())
* .setReplicationId("replicationId1170820615")
* .build();
* ApiFuture future = netAppClient.createReplicationCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable createReplicationCallable() {
return stub.createReplicationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ReplicationName name =
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]");
* netAppClient.deleteReplicationAsync(name).get();
* }
* }
*
* @param name Required. The replication resource name, in the format
* `projects/*/locations/*/volumes/*/replications/{replication_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteReplicationAsync(
ReplicationName name) {
DeleteReplicationRequest request =
DeleteReplicationRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
return deleteReplicationAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name =
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]").toString();
* netAppClient.deleteReplicationAsync(name).get();
* }
* }
*
* @param name Required. The replication resource name, in the format
* `projects/*/locations/*/volumes/*/replications/{replication_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteReplicationAsync(String name) {
DeleteReplicationRequest request = DeleteReplicationRequest.newBuilder().setName(name).build();
return deleteReplicationAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteReplicationRequest request =
* DeleteReplicationRequest.newBuilder()
* .setName(
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]")
* .toString())
* .build();
* netAppClient.deleteReplicationAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteReplicationAsync(
DeleteReplicationRequest request) {
return deleteReplicationOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteReplicationRequest request =
* DeleteReplicationRequest.newBuilder()
* .setName(
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]")
* .toString())
* .build();
* OperationFuture future =
* netAppClient.deleteReplicationOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteReplicationOperationCallable() {
return stub.deleteReplicationOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteReplicationRequest request =
* DeleteReplicationRequest.newBuilder()
* .setName(
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]")
* .toString())
* .build();
* ApiFuture future = netAppClient.deleteReplicationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable deleteReplicationCallable() {
return stub.deleteReplicationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the settings of a specific replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* Replication replication = Replication.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* Replication response = netAppClient.updateReplicationAsync(replication, updateMask).get();
* }
* }
*
* @param replication Required. A replication resource
* @param updateMask Required. Mask of fields to update. At least one path must be supplied in
* this field.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateReplicationAsync(
Replication replication, FieldMask updateMask) {
UpdateReplicationRequest request =
UpdateReplicationRequest.newBuilder()
.setReplication(replication)
.setUpdateMask(updateMask)
.build();
return updateReplicationAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the settings of a specific replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateReplicationRequest request =
* UpdateReplicationRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setReplication(Replication.newBuilder().build())
* .build();
* Replication response = netAppClient.updateReplicationAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateReplicationAsync(
UpdateReplicationRequest request) {
return updateReplicationOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the settings of a specific replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateReplicationRequest request =
* UpdateReplicationRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setReplication(Replication.newBuilder().build())
* .build();
* OperationFuture future =
* netAppClient.updateReplicationOperationCallable().futureCall(request);
* // Do something.
* Replication response = future.get();
* }
* }
*/
public final OperationCallable
updateReplicationOperationCallable() {
return stub.updateReplicationOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the settings of a specific replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateReplicationRequest request =
* UpdateReplicationRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setReplication(Replication.newBuilder().build())
* .build();
* ApiFuture future = netAppClient.updateReplicationCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable updateReplicationCallable() {
return stub.updateReplicationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Stop Cross Region Replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* StopReplicationRequest request =
* StopReplicationRequest.newBuilder()
* .setName(
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]")
* .toString())
* .setForce(true)
* .build();
* Replication response = netAppClient.stopReplicationAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture stopReplicationAsync(
StopReplicationRequest request) {
return stopReplicationOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Stop Cross Region Replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* StopReplicationRequest request =
* StopReplicationRequest.newBuilder()
* .setName(
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]")
* .toString())
* .setForce(true)
* .build();
* OperationFuture future =
* netAppClient.stopReplicationOperationCallable().futureCall(request);
* // Do something.
* Replication response = future.get();
* }
* }
*/
public final OperationCallable
stopReplicationOperationCallable() {
return stub.stopReplicationOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Stop Cross Region Replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* StopReplicationRequest request =
* StopReplicationRequest.newBuilder()
* .setName(
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]")
* .toString())
* .setForce(true)
* .build();
* ApiFuture future = netAppClient.stopReplicationCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable stopReplicationCallable() {
return stub.stopReplicationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Resume Cross Region Replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ResumeReplicationRequest request =
* ResumeReplicationRequest.newBuilder()
* .setName(
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]")
* .toString())
* .build();
* Replication response = netAppClient.resumeReplicationAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture resumeReplicationAsync(
ResumeReplicationRequest request) {
return resumeReplicationOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Resume Cross Region Replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ResumeReplicationRequest request =
* ResumeReplicationRequest.newBuilder()
* .setName(
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]")
* .toString())
* .build();
* OperationFuture future =
* netAppClient.resumeReplicationOperationCallable().futureCall(request);
* // Do something.
* Replication response = future.get();
* }
* }
*/
public final OperationCallable
resumeReplicationOperationCallable() {
return stub.resumeReplicationOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Resume Cross Region Replication.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ResumeReplicationRequest request =
* ResumeReplicationRequest.newBuilder()
* .setName(
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]")
* .toString())
* .build();
* ApiFuture future = netAppClient.resumeReplicationCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable resumeReplicationCallable() {
return stub.resumeReplicationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Reverses direction of replication. Source becomes destination and destination becomes source.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ReverseReplicationDirectionRequest request =
* ReverseReplicationDirectionRequest.newBuilder()
* .setName(
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]")
* .toString())
* .build();
* Replication response = netAppClient.reverseReplicationDirectionAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture reverseReplicationDirectionAsync(
ReverseReplicationDirectionRequest request) {
return reverseReplicationDirectionOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Reverses direction of replication. Source becomes destination and destination becomes source.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ReverseReplicationDirectionRequest request =
* ReverseReplicationDirectionRequest.newBuilder()
* .setName(
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]")
* .toString())
* .build();
* OperationFuture future =
* netAppClient.reverseReplicationDirectionOperationCallable().futureCall(request);
* // Do something.
* Replication response = future.get();
* }
* }
*/
public final OperationCallable
reverseReplicationDirectionOperationCallable() {
return stub.reverseReplicationDirectionOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Reverses direction of replication. Source becomes destination and destination becomes source.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ReverseReplicationDirectionRequest request =
* ReverseReplicationDirectionRequest.newBuilder()
* .setName(
* ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]")
* .toString())
* .build();
* ApiFuture future =
* netAppClient.reverseReplicationDirectionCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable
reverseReplicationDirectionCallable() {
return stub.reverseReplicationDirectionCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates new backup vault
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* BackupVault backupVault = BackupVault.newBuilder().build();
* String backupVaultId = "backupVaultId-1897432373";
* BackupVault response =
* netAppClient.createBackupVaultAsync(parent, backupVault, backupVaultId).get();
* }
* }
*
* @param parent Required. The location to create the backup vaults, in the format
* `projects/{project_id}/locations/{location}`
* @param backupVault Required. A backupVault resource
* @param backupVaultId Required. The ID to use for the backupVault. The ID must be unique within
* the specified location. The max supported length is 63 characters. This value must start
* with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and
* cannot end with a hyphen. Values that do not match this pattern will trigger an
* INVALID_ARGUMENT error.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createBackupVaultAsync(
LocationName parent, BackupVault backupVault, String backupVaultId) {
CreateBackupVaultRequest request =
CreateBackupVaultRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setBackupVault(backupVault)
.setBackupVaultId(backupVaultId)
.build();
return createBackupVaultAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates new backup vault
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* BackupVault backupVault = BackupVault.newBuilder().build();
* String backupVaultId = "backupVaultId-1897432373";
* BackupVault response =
* netAppClient.createBackupVaultAsync(parent, backupVault, backupVaultId).get();
* }
* }
*
* @param parent Required. The location to create the backup vaults, in the format
* `projects/{project_id}/locations/{location}`
* @param backupVault Required. A backupVault resource
* @param backupVaultId Required. The ID to use for the backupVault. The ID must be unique within
* the specified location. The max supported length is 63 characters. This value must start
* with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and
* cannot end with a hyphen. Values that do not match this pattern will trigger an
* INVALID_ARGUMENT error.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createBackupVaultAsync(
String parent, BackupVault backupVault, String backupVaultId) {
CreateBackupVaultRequest request =
CreateBackupVaultRequest.newBuilder()
.setParent(parent)
.setBackupVault(backupVault)
.setBackupVaultId(backupVaultId)
.build();
return createBackupVaultAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates new backup vault
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateBackupVaultRequest request =
* CreateBackupVaultRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setBackupVaultId("backupVaultId-1897432373")
* .setBackupVault(BackupVault.newBuilder().build())
* .build();
* BackupVault response = netAppClient.createBackupVaultAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createBackupVaultAsync(
CreateBackupVaultRequest request) {
return createBackupVaultOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates new backup vault
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateBackupVaultRequest request =
* CreateBackupVaultRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setBackupVaultId("backupVaultId-1897432373")
* .setBackupVault(BackupVault.newBuilder().build())
* .build();
* OperationFuture future =
* netAppClient.createBackupVaultOperationCallable().futureCall(request);
* // Do something.
* BackupVault response = future.get();
* }
* }
*/
public final OperationCallable
createBackupVaultOperationCallable() {
return stub.createBackupVaultOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates new backup vault
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateBackupVaultRequest request =
* CreateBackupVaultRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setBackupVaultId("backupVaultId-1897432373")
* .setBackupVault(BackupVault.newBuilder().build())
* .build();
* ApiFuture future = netAppClient.createBackupVaultCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable createBackupVaultCallable() {
return stub.createBackupVaultCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified backup vault
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]");
* BackupVault response = netAppClient.getBackupVault(name);
* }
* }
*
* @param name Required. The backupVault resource name, in the format
* `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final BackupVault getBackupVault(BackupVaultName name) {
GetBackupVaultRequest request =
GetBackupVaultRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getBackupVault(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified backup vault
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString();
* BackupVault response = netAppClient.getBackupVault(name);
* }
* }
*
* @param name Required. The backupVault resource name, in the format
* `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final BackupVault getBackupVault(String name) {
GetBackupVaultRequest request = GetBackupVaultRequest.newBuilder().setName(name).build();
return getBackupVault(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified backup vault
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetBackupVaultRequest request =
* GetBackupVaultRequest.newBuilder()
* .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
* .build();
* BackupVault response = netAppClient.getBackupVault(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final BackupVault getBackupVault(GetBackupVaultRequest request) {
return getBackupVaultCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified backup vault
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetBackupVaultRequest request =
* GetBackupVaultRequest.newBuilder()
* .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
* .build();
* ApiFuture future = netAppClient.getBackupVaultCallable().futureCall(request);
* // Do something.
* BackupVault response = future.get();
* }
* }
*/
public final UnaryCallable getBackupVaultCallable() {
return stub.getBackupVaultCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns list of all available backup vaults.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (BackupVault element : netAppClient.listBackupVaults(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. The location for which to retrieve backupVault information, in the
* format `projects/{project_id}/locations/{location}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListBackupVaultsPagedResponse listBackupVaults(LocationName parent) {
ListBackupVaultsRequest request =
ListBackupVaultsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listBackupVaults(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns list of all available backup vaults.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* for (BackupVault element : netAppClient.listBackupVaults(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. The location for which to retrieve backupVault information, in the
* format `projects/{project_id}/locations/{location}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListBackupVaultsPagedResponse listBackupVaults(String parent) {
ListBackupVaultsRequest request =
ListBackupVaultsRequest.newBuilder().setParent(parent).build();
return listBackupVaults(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns list of all available backup vaults.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListBackupVaultsRequest request =
* ListBackupVaultsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* for (BackupVault element : netAppClient.listBackupVaults(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListBackupVaultsPagedResponse listBackupVaults(ListBackupVaultsRequest request) {
return listBackupVaultsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns list of all available backup vaults.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListBackupVaultsRequest request =
* ListBackupVaultsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* ApiFuture future =
* netAppClient.listBackupVaultsPagedCallable().futureCall(request);
* // Do something.
* for (BackupVault element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listBackupVaultsPagedCallable() {
return stub.listBackupVaultsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns list of all available backup vaults.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListBackupVaultsRequest request =
* ListBackupVaultsRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* while (true) {
* ListBackupVaultsResponse response = netAppClient.listBackupVaultsCallable().call(request);
* for (BackupVault element : response.getBackupVaultsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }
*/
public final UnaryCallable
listBackupVaultsCallable() {
return stub.listBackupVaultsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the settings of a specific backup vault.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* BackupVault backupVault = BackupVault.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* BackupVault response = netAppClient.updateBackupVaultAsync(backupVault, updateMask).get();
* }
* }
*
* @param backupVault Required. The backupVault being updated
* @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
* Backup resource to be updated. The fields specified in the update_mask are relative to the
* resource, not the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then all fields will be overwritten.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateBackupVaultAsync(
BackupVault backupVault, FieldMask updateMask) {
UpdateBackupVaultRequest request =
UpdateBackupVaultRequest.newBuilder()
.setBackupVault(backupVault)
.setUpdateMask(updateMask)
.build();
return updateBackupVaultAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the settings of a specific backup vault.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateBackupVaultRequest request =
* UpdateBackupVaultRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setBackupVault(BackupVault.newBuilder().build())
* .build();
* BackupVault response = netAppClient.updateBackupVaultAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateBackupVaultAsync(
UpdateBackupVaultRequest request) {
return updateBackupVaultOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the settings of a specific backup vault.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateBackupVaultRequest request =
* UpdateBackupVaultRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setBackupVault(BackupVault.newBuilder().build())
* .build();
* OperationFuture future =
* netAppClient.updateBackupVaultOperationCallable().futureCall(request);
* // Do something.
* BackupVault response = future.get();
* }
* }
*/
public final OperationCallable
updateBackupVaultOperationCallable() {
return stub.updateBackupVaultOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates the settings of a specific backup vault.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateBackupVaultRequest request =
* UpdateBackupVaultRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setBackupVault(BackupVault.newBuilder().build())
* .build();
* ApiFuture future = netAppClient.updateBackupVaultCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable updateBackupVaultCallable() {
return stub.updateBackupVaultCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup vault.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]");
* netAppClient.deleteBackupVaultAsync(name).get();
* }
* }
*
* @param name Required. The backupVault resource name, in the format
* `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteBackupVaultAsync(
BackupVaultName name) {
DeleteBackupVaultRequest request =
DeleteBackupVaultRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
return deleteBackupVaultAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup vault.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString();
* netAppClient.deleteBackupVaultAsync(name).get();
* }
* }
*
* @param name Required. The backupVault resource name, in the format
* `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteBackupVaultAsync(String name) {
DeleteBackupVaultRequest request = DeleteBackupVaultRequest.newBuilder().setName(name).build();
return deleteBackupVaultAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup vault.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteBackupVaultRequest request =
* DeleteBackupVaultRequest.newBuilder()
* .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
* .build();
* netAppClient.deleteBackupVaultAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteBackupVaultAsync(
DeleteBackupVaultRequest request) {
return deleteBackupVaultOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup vault.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteBackupVaultRequest request =
* DeleteBackupVaultRequest.newBuilder()
* .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
* .build();
* OperationFuture future =
* netAppClient.deleteBackupVaultOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteBackupVaultOperationCallable() {
return stub.deleteBackupVaultOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup vault.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteBackupVaultRequest request =
* DeleteBackupVaultRequest.newBuilder()
* .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
* .build();
* ApiFuture future = netAppClient.deleteBackupVaultCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable deleteBackupVaultCallable() {
return stub.deleteBackupVaultCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a backup from the volume specified in the request The backup can be created from the
* given snapshot if specified in the request. If no snapshot specified, there'll be a new
* snapshot taken to initiate the backup creation.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]");
* Backup backup = Backup.newBuilder().build();
* String backupId = "backupId2121930365";
* Backup response = netAppClient.createBackupAsync(parent, backup, backupId).get();
* }
* }
*
* @param parent Required. The NetApp backupVault to create the backups of, in the format
* `projects/*/locations/*/backupVaults/{backup_vault_id}`
* @param backup Required. A backup resource
* @param backupId Required. The ID to use for the backup. The ID must be unique within the
* specified backupVault. This value must start with a lowercase letter followed by up to 62
* lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not
* match this pattern will trigger an INVALID_ARGUMENT error.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createBackupAsync(
BackupVaultName parent, Backup backup, String backupId) {
CreateBackupRequest request =
CreateBackupRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setBackup(backup)
.setBackupId(backupId)
.build();
return createBackupAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a backup from the volume specified in the request The backup can be created from the
* given snapshot if specified in the request. If no snapshot specified, there'll be a new
* snapshot taken to initiate the backup creation.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString();
* Backup backup = Backup.newBuilder().build();
* String backupId = "backupId2121930365";
* Backup response = netAppClient.createBackupAsync(parent, backup, backupId).get();
* }
* }
*
* @param parent Required. The NetApp backupVault to create the backups of, in the format
* `projects/*/locations/*/backupVaults/{backup_vault_id}`
* @param backup Required. A backup resource
* @param backupId Required. The ID to use for the backup. The ID must be unique within the
* specified backupVault. This value must start with a lowercase letter followed by up to 62
* lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not
* match this pattern will trigger an INVALID_ARGUMENT error.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createBackupAsync(
String parent, Backup backup, String backupId) {
CreateBackupRequest request =
CreateBackupRequest.newBuilder()
.setParent(parent)
.setBackup(backup)
.setBackupId(backupId)
.build();
return createBackupAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a backup from the volume specified in the request The backup can be created from the
* given snapshot if specified in the request. If no snapshot specified, there'll be a new
* snapshot taken to initiate the backup creation.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateBackupRequest request =
* CreateBackupRequest.newBuilder()
* .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
* .setBackupId("backupId2121930365")
* .setBackup(Backup.newBuilder().build())
* .build();
* Backup response = netAppClient.createBackupAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createBackupAsync(
CreateBackupRequest request) {
return createBackupOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a backup from the volume specified in the request The backup can be created from the
* given snapshot if specified in the request. If no snapshot specified, there'll be a new
* snapshot taken to initiate the backup creation.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateBackupRequest request =
* CreateBackupRequest.newBuilder()
* .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
* .setBackupId("backupId2121930365")
* .setBackup(Backup.newBuilder().build())
* .build();
* OperationFuture future =
* netAppClient.createBackupOperationCallable().futureCall(request);
* // Do something.
* Backup response = future.get();
* }
* }
*/
public final OperationCallable
createBackupOperationCallable() {
return stub.createBackupOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates a backup from the volume specified in the request The backup can be created from the
* given snapshot if specified in the request. If no snapshot specified, there'll be a new
* snapshot taken to initiate the backup creation.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateBackupRequest request =
* CreateBackupRequest.newBuilder()
* .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
* .setBackupId("backupId2121930365")
* .setBackup(Backup.newBuilder().build())
* .build();
* ApiFuture future = netAppClient.createBackupCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable createBackupCallable() {
return stub.createBackupCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified backup
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]");
* Backup response = netAppClient.getBackup(name);
* }
* }
*
* @param name Required. The backup resource name, in the format
* `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Backup getBackup(BackupName name) {
GetBackupRequest request =
GetBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getBackup(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified backup
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name =
* BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString();
* Backup response = netAppClient.getBackup(name);
* }
* }
*
* @param name Required. The backup resource name, in the format
* `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Backup getBackup(String name) {
GetBackupRequest request = GetBackupRequest.newBuilder().setName(name).build();
return getBackup(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified backup
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetBackupRequest request =
* GetBackupRequest.newBuilder()
* .setName(
* BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString())
* .build();
* Backup response = netAppClient.getBackup(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Backup getBackup(GetBackupRequest request) {
return getBackupCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified backup
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetBackupRequest request =
* GetBackupRequest.newBuilder()
* .setName(
* BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString())
* .build();
* ApiFuture future = netAppClient.getBackupCallable().futureCall(request);
* // Do something.
* Backup response = future.get();
* }
* }
*/
public final UnaryCallable getBackupCallable() {
return stub.getBackupCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all backups for a backupVault.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]");
* for (Backup element : netAppClient.listBackups(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. The backupVault for which to retrieve backup information, in the format
* `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. To retrieve
* backup information for all locations, use "-" for the `{location}` value. To retrieve
* backup information for all backupVaults, use "-" for the `{backup_vault_id}` value. To
* retrieve backup information for a volume, use "-" for the `{backup_vault_id}` value and
* specify volume full name with the filter.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListBackupsPagedResponse listBackups(BackupVaultName parent) {
ListBackupsRequest request =
ListBackupsRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listBackups(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all backups for a backupVault.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString();
* for (Backup element : netAppClient.listBackups(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. The backupVault for which to retrieve backup information, in the format
* `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. To retrieve
* backup information for all locations, use "-" for the `{location}` value. To retrieve
* backup information for all backupVaults, use "-" for the `{backup_vault_id}` value. To
* retrieve backup information for a volume, use "-" for the `{backup_vault_id}` value and
* specify volume full name with the filter.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListBackupsPagedResponse listBackups(String parent) {
ListBackupsRequest request = ListBackupsRequest.newBuilder().setParent(parent).build();
return listBackups(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all backups for a backupVault.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListBackupsRequest request =
* ListBackupsRequest.newBuilder()
* .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* for (Backup element : netAppClient.listBackups(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListBackupsPagedResponse listBackups(ListBackupsRequest request) {
return listBackupsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all backups for a backupVault.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListBackupsRequest request =
* ListBackupsRequest.newBuilder()
* .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* ApiFuture future = netAppClient.listBackupsPagedCallable().futureCall(request);
* // Do something.
* for (Backup element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listBackupsPagedCallable() {
return stub.listBackupsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns descriptions of all backups for a backupVault.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListBackupsRequest request =
* ListBackupsRequest.newBuilder()
* .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setOrderBy("orderBy-1207110587")
* .setFilter("filter-1274492040")
* .build();
* while (true) {
* ListBackupsResponse response = netAppClient.listBackupsCallable().call(request);
* for (Backup element : response.getBackupsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }
*/
public final UnaryCallable listBackupsCallable() {
return stub.listBackupsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]");
* netAppClient.deleteBackupAsync(name).get();
* }
* }
*
* @param name Required. The backup resource name, in the format
* `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteBackupAsync(BackupName name) {
DeleteBackupRequest request =
DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return deleteBackupAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name =
* BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString();
* netAppClient.deleteBackupAsync(name).get();
* }
* }
*
* @param name Required. The backup resource name, in the format
* `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteBackupAsync(String name) {
DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build();
return deleteBackupAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteBackupRequest request =
* DeleteBackupRequest.newBuilder()
* .setName(
* BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString())
* .build();
* netAppClient.deleteBackupAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteBackupAsync(
DeleteBackupRequest request) {
return deleteBackupOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteBackupRequest request =
* DeleteBackupRequest.newBuilder()
* .setName(
* BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString())
* .build();
* OperationFuture future =
* netAppClient.deleteBackupOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteBackupOperationCallable() {
return stub.deleteBackupOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteBackupRequest request =
* DeleteBackupRequest.newBuilder()
* .setName(
* BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString())
* .build();
* ApiFuture future = netAppClient.deleteBackupCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable deleteBackupCallable() {
return stub.deleteBackupCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Update backup with full spec.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* Backup backup = Backup.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* Backup response = netAppClient.updateBackupAsync(backup, updateMask).get();
* }
* }
*
* @param backup Required. The backup being updated
* @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
* Backup resource to be updated. The fields specified in the update_mask are relative to the
* resource, not the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then all fields will be overwritten.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateBackupAsync(
Backup backup, FieldMask updateMask) {
UpdateBackupRequest request =
UpdateBackupRequest.newBuilder().setBackup(backup).setUpdateMask(updateMask).build();
return updateBackupAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Update backup with full spec.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateBackupRequest request =
* UpdateBackupRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setBackup(Backup.newBuilder().build())
* .build();
* Backup response = netAppClient.updateBackupAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateBackupAsync(
UpdateBackupRequest request) {
return updateBackupOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Update backup with full spec.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateBackupRequest request =
* UpdateBackupRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setBackup(Backup.newBuilder().build())
* .build();
* OperationFuture future =
* netAppClient.updateBackupOperationCallable().futureCall(request);
* // Do something.
* Backup response = future.get();
* }
* }
*/
public final OperationCallable
updateBackupOperationCallable() {
return stub.updateBackupOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Update backup with full spec.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateBackupRequest request =
* UpdateBackupRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setBackup(Backup.newBuilder().build())
* .build();
* ApiFuture future = netAppClient.updateBackupCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable updateBackupCallable() {
return stub.updateBackupCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates new backup policy
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* BackupPolicy backupPolicy = BackupPolicy.newBuilder().build();
* String backupPolicyId = "backupPolicyId-1278533169";
* BackupPolicy response =
* netAppClient.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get();
* }
* }
*
* @param parent Required. The location to create the backup policies of, in the format
* `projects/{project_id}/locations/{location}`
* @param backupPolicy Required. A backupPolicy resource
* @param backupPolicyId Required. The ID to use for the backup policy. The ID must be unique
* within the specified location. This value must start with a lowercase letter followed by up
* to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createBackupPolicyAsync(
LocationName parent, BackupPolicy backupPolicy, String backupPolicyId) {
CreateBackupPolicyRequest request =
CreateBackupPolicyRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setBackupPolicy(backupPolicy)
.setBackupPolicyId(backupPolicyId)
.build();
return createBackupPolicyAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates new backup policy
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* BackupPolicy backupPolicy = BackupPolicy.newBuilder().build();
* String backupPolicyId = "backupPolicyId-1278533169";
* BackupPolicy response =
* netAppClient.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get();
* }
* }
*
* @param parent Required. The location to create the backup policies of, in the format
* `projects/{project_id}/locations/{location}`
* @param backupPolicy Required. A backupPolicy resource
* @param backupPolicyId Required. The ID to use for the backup policy. The ID must be unique
* within the specified location. This value must start with a lowercase letter followed by up
* to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createBackupPolicyAsync(
String parent, BackupPolicy backupPolicy, String backupPolicyId) {
CreateBackupPolicyRequest request =
CreateBackupPolicyRequest.newBuilder()
.setParent(parent)
.setBackupPolicy(backupPolicy)
.setBackupPolicyId(backupPolicyId)
.build();
return createBackupPolicyAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates new backup policy
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateBackupPolicyRequest request =
* CreateBackupPolicyRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setBackupPolicy(BackupPolicy.newBuilder().build())
* .setBackupPolicyId("backupPolicyId-1278533169")
* .build();
* BackupPolicy response = netAppClient.createBackupPolicyAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture createBackupPolicyAsync(
CreateBackupPolicyRequest request) {
return createBackupPolicyOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates new backup policy
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateBackupPolicyRequest request =
* CreateBackupPolicyRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setBackupPolicy(BackupPolicy.newBuilder().build())
* .setBackupPolicyId("backupPolicyId-1278533169")
* .build();
* OperationFuture future =
* netAppClient.createBackupPolicyOperationCallable().futureCall(request);
* // Do something.
* BackupPolicy response = future.get();
* }
* }
*/
public final OperationCallable
createBackupPolicyOperationCallable() {
return stub.createBackupPolicyOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Creates new backup policy
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* CreateBackupPolicyRequest request =
* CreateBackupPolicyRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setBackupPolicy(BackupPolicy.newBuilder().build())
* .setBackupPolicyId("backupPolicyId-1278533169")
* .build();
* ApiFuture future = netAppClient.createBackupPolicyCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable createBackupPolicyCallable() {
return stub.createBackupPolicyCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified backup policy by backup_policy_id.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]");
* BackupPolicy response = netAppClient.getBackupPolicy(name);
* }
* }
*
* @param name Required. The backupPolicy resource name, in the format
* `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final BackupPolicy getBackupPolicy(BackupPolicyName name) {
GetBackupPolicyRequest request =
GetBackupPolicyRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return getBackupPolicy(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified backup policy by backup_policy_id.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString();
* BackupPolicy response = netAppClient.getBackupPolicy(name);
* }
* }
*
* @param name Required. The backupPolicy resource name, in the format
* `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final BackupPolicy getBackupPolicy(String name) {
GetBackupPolicyRequest request = GetBackupPolicyRequest.newBuilder().setName(name).build();
return getBackupPolicy(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified backup policy by backup_policy_id.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetBackupPolicyRequest request =
* GetBackupPolicyRequest.newBuilder()
* .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString())
* .build();
* BackupPolicy response = netAppClient.getBackupPolicy(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final BackupPolicy getBackupPolicy(GetBackupPolicyRequest request) {
return getBackupPolicyCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns the description of the specified backup policy by backup_policy_id.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetBackupPolicyRequest request =
* GetBackupPolicyRequest.newBuilder()
* .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString())
* .build();
* ApiFuture future = netAppClient.getBackupPolicyCallable().futureCall(request);
* // Do something.
* BackupPolicy response = future.get();
* }
* }
*/
public final UnaryCallable getBackupPolicyCallable() {
return stub.getBackupPolicyCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns list of all available backup policies.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
* for (BackupPolicy element : netAppClient.listBackupPolicies(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value for ListBackupPoliciesRequest
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListBackupPoliciesPagedResponse listBackupPolicies(LocationName parent) {
ListBackupPoliciesRequest request =
ListBackupPoliciesRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.build();
return listBackupPolicies(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns list of all available backup policies.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
* for (BackupPolicy element : netAppClient.listBackupPolicies(parent).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param parent Required. Parent value for ListBackupPoliciesRequest
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListBackupPoliciesPagedResponse listBackupPolicies(String parent) {
ListBackupPoliciesRequest request =
ListBackupPoliciesRequest.newBuilder().setParent(parent).build();
return listBackupPolicies(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns list of all available backup policies.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListBackupPoliciesRequest request =
* ListBackupPoliciesRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* for (BackupPolicy element : netAppClient.listBackupPolicies(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListBackupPoliciesPagedResponse listBackupPolicies(
ListBackupPoliciesRequest request) {
return listBackupPoliciesPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns list of all available backup policies.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListBackupPoliciesRequest request =
* ListBackupPoliciesRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* ApiFuture future =
* netAppClient.listBackupPoliciesPagedCallable().futureCall(request);
* // Do something.
* for (BackupPolicy element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listBackupPoliciesPagedCallable() {
return stub.listBackupPoliciesPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns list of all available backup policies.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListBackupPoliciesRequest request =
* ListBackupPoliciesRequest.newBuilder()
* .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* while (true) {
* ListBackupPoliciesResponse response =
* netAppClient.listBackupPoliciesCallable().call(request);
* for (BackupPolicy element : response.getBackupPoliciesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }
*/
public final UnaryCallable
listBackupPoliciesCallable() {
return stub.listBackupPoliciesCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates settings of a specific backup policy.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* BackupPolicy backupPolicy = BackupPolicy.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* BackupPolicy response = netAppClient.updateBackupPolicyAsync(backupPolicy, updateMask).get();
* }
* }
*
* @param backupPolicy Required. The backup policy being updated
* @param updateMask Required. Field mask is used to specify the fields to be overwritten in the
* Backup Policy resource by the update. The fields specified in the update_mask are relative
* to the resource, not the full request. A field will be overwritten if it is in the mask. If
* the user does not provide a mask then all fields will be overwritten.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateBackupPolicyAsync(
BackupPolicy backupPolicy, FieldMask updateMask) {
UpdateBackupPolicyRequest request =
UpdateBackupPolicyRequest.newBuilder()
.setBackupPolicy(backupPolicy)
.setUpdateMask(updateMask)
.build();
return updateBackupPolicyAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates settings of a specific backup policy.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateBackupPolicyRequest request =
* UpdateBackupPolicyRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setBackupPolicy(BackupPolicy.newBuilder().build())
* .build();
* BackupPolicy response = netAppClient.updateBackupPolicyAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture updateBackupPolicyAsync(
UpdateBackupPolicyRequest request) {
return updateBackupPolicyOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates settings of a specific backup policy.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateBackupPolicyRequest request =
* UpdateBackupPolicyRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setBackupPolicy(BackupPolicy.newBuilder().build())
* .build();
* OperationFuture future =
* netAppClient.updateBackupPolicyOperationCallable().futureCall(request);
* // Do something.
* BackupPolicy response = future.get();
* }
* }
*/
public final OperationCallable
updateBackupPolicyOperationCallable() {
return stub.updateBackupPolicyOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates settings of a specific backup policy.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* UpdateBackupPolicyRequest request =
* UpdateBackupPolicyRequest.newBuilder()
* .setUpdateMask(FieldMask.newBuilder().build())
* .setBackupPolicy(BackupPolicy.newBuilder().build())
* .build();
* ApiFuture future = netAppClient.updateBackupPolicyCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }
*/
public final UnaryCallable updateBackupPolicyCallable() {
return stub.updateBackupPolicyCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup policy.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]");
* netAppClient.deleteBackupPolicyAsync(name).get();
* }
* }
*
* @param name Required. The backup policy resource name, in the format
* `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteBackupPolicyAsync(
BackupPolicyName name) {
DeleteBackupPolicyRequest request =
DeleteBackupPolicyRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
return deleteBackupPolicyAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup policy.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* String name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString();
* netAppClient.deleteBackupPolicyAsync(name).get();
* }
* }
*
* @param name Required. The backup policy resource name, in the format
* `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteBackupPolicyAsync(String name) {
DeleteBackupPolicyRequest request =
DeleteBackupPolicyRequest.newBuilder().setName(name).build();
return deleteBackupPolicyAsync(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup policy.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteBackupPolicyRequest request =
* DeleteBackupPolicyRequest.newBuilder()
* .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString())
* .build();
* netAppClient.deleteBackupPolicyAsync(request).get();
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteBackupPolicyAsync(
DeleteBackupPolicyRequest request) {
return deleteBackupPolicyOperationCallable().futureCall(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup policy.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteBackupPolicyRequest request =
* DeleteBackupPolicyRequest.newBuilder()
* .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString())
* .build();
* OperationFuture future =
* netAppClient.deleteBackupPolicyOperationCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final OperationCallable
deleteBackupPolicyOperationCallable() {
return stub.deleteBackupPolicyOperationCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Warning! This operation will permanently delete the backup policy.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* DeleteBackupPolicyRequest request =
* DeleteBackupPolicyRequest.newBuilder()
* .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString())
* .build();
* ApiFuture future = netAppClient.deleteBackupPolicyCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }
*/
public final UnaryCallable deleteBackupPolicyCallable() {
return stub.deleteBackupPolicyCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about the supported locations for this service.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListLocationsRequest request =
* ListLocationsRequest.newBuilder()
* .setName("name3373707")
* .setFilter("filter-1274492040")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* for (Location element : netAppClient.listLocations(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
return listLocationsPagedCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about the supported locations for this service.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListLocationsRequest request =
* ListLocationsRequest.newBuilder()
* .setName("name3373707")
* .setFilter("filter-1274492040")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* ApiFuture future = netAppClient.listLocationsPagedCallable().futureCall(request);
* // Do something.
* for (Location element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }
*/
public final UnaryCallable
listLocationsPagedCallable() {
return stub.listLocationsPagedCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about the supported locations for this service.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* ListLocationsRequest request =
* ListLocationsRequest.newBuilder()
* .setName("name3373707")
* .setFilter("filter-1274492040")
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .build();
* while (true) {
* ListLocationsResponse response = netAppClient.listLocationsCallable().call(request);
* for (Location element : response.getLocationsList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }
*/
public final UnaryCallable listLocationsCallable() {
return stub.listLocationsCallable();
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets information about a location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
* Location response = netAppClient.getLocation(request);
* }
* }
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Location getLocation(GetLocationRequest request) {
return getLocationCallable().call(request);
}
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Gets information about a location.
*
* Sample code:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (NetAppClient netAppClient = NetAppClient.create()) {
* GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
* ApiFuture future = netAppClient.getLocationCallable().futureCall(request);
* // Do something.
* Location response = future.get();
* }
* }
*/
public final UnaryCallable getLocationCallable() {
return stub.getLocationCallable();
}
@Override
public final void close() {
stub.close();
}
@Override
public void shutdown() {
stub.shutdown();
}
@Override
public boolean isShutdown() {
return stub.isShutdown();
}
@Override
public boolean isTerminated() {
return stub.isTerminated();
}
@Override
public void shutdownNow() {
stub.shutdownNow();
}
@Override
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
return stub.awaitTermination(duration, unit);
}
public static class ListStoragePoolsPagedResponse
extends AbstractPagedListResponse<
ListStoragePoolsRequest,
ListStoragePoolsResponse,
StoragePool,
ListStoragePoolsPage,
ListStoragePoolsFixedSizeCollection> {
public static ApiFuture createAsync(
PageContext context,
ApiFuture futureResponse) {
ApiFuture futurePage =
ListStoragePoolsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
input -> new ListStoragePoolsPagedResponse(input),
MoreExecutors.directExecutor());
}
private ListStoragePoolsPagedResponse(ListStoragePoolsPage page) {
super(page, ListStoragePoolsFixedSizeCollection.createEmptyCollection());
}
}
public static class ListStoragePoolsPage
extends AbstractPage<
ListStoragePoolsRequest, ListStoragePoolsResponse, StoragePool, ListStoragePoolsPage> {
private ListStoragePoolsPage(
PageContext context,
ListStoragePoolsResponse response) {
super(context, response);
}
private static ListStoragePoolsPage createEmptyPage() {
return new ListStoragePoolsPage(null, null);
}
@Override
protected ListStoragePoolsPage createPage(
PageContext context,
ListStoragePoolsResponse response) {
return new ListStoragePoolsPage(context, response);
}
@Override
public ApiFuture createPageAsync(
PageContext context,
ApiFuture futureResponse) {
return super.createPageAsync(context, futureResponse);
}
}
public static class ListStoragePoolsFixedSizeCollection
extends AbstractFixedSizeCollection<
ListStoragePoolsRequest,
ListStoragePoolsResponse,
StoragePool,
ListStoragePoolsPage,
ListStoragePoolsFixedSizeCollection> {
private ListStoragePoolsFixedSizeCollection(
List pages, int collectionSize) {
super(pages, collectionSize);
}
private static ListStoragePoolsFixedSizeCollection createEmptyCollection() {
return new ListStoragePoolsFixedSizeCollection(null, 0);
}
@Override
protected ListStoragePoolsFixedSizeCollection createCollection(
List pages, int collectionSize) {
return new ListStoragePoolsFixedSizeCollection(pages, collectionSize);
}
}
public static class ListVolumesPagedResponse
extends AbstractPagedListResponse<
ListVolumesRequest,
ListVolumesResponse,
Volume,
ListVolumesPage,
ListVolumesFixedSizeCollection> {
public static ApiFuture createAsync(
PageContext context,
ApiFuture futureResponse) {
ApiFuture futurePage =
ListVolumesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage, input -> new ListVolumesPagedResponse(input), MoreExecutors.directExecutor());
}
private ListVolumesPagedResponse(ListVolumesPage page) {
super(page, ListVolumesFixedSizeCollection.createEmptyCollection());
}
}
public static class ListVolumesPage
extends AbstractPage {
private ListVolumesPage(
PageContext context,
ListVolumesResponse response) {
super(context, response);
}
private static ListVolumesPage createEmptyPage() {
return new ListVolumesPage(null, null);
}
@Override
protected ListVolumesPage createPage(
PageContext context,
ListVolumesResponse response) {
return new ListVolumesPage(context, response);
}
@Override
public ApiFuture createPageAsync(
PageContext context,
ApiFuture futureResponse) {
return super.createPageAsync(context, futureResponse);
}
}
public static class ListVolumesFixedSizeCollection
extends AbstractFixedSizeCollection<
ListVolumesRequest,
ListVolumesResponse,
Volume,
ListVolumesPage,
ListVolumesFixedSizeCollection> {
private ListVolumesFixedSizeCollection(List pages, int collectionSize) {
super(pages, collectionSize);
}
private static ListVolumesFixedSizeCollection createEmptyCollection() {
return new ListVolumesFixedSizeCollection(null, 0);
}
@Override
protected ListVolumesFixedSizeCollection createCollection(
List pages, int collectionSize) {
return new ListVolumesFixedSizeCollection(pages, collectionSize);
}
}
public static class ListSnapshotsPagedResponse
extends AbstractPagedListResponse<
ListSnapshotsRequest,
ListSnapshotsResponse,
Snapshot,
ListSnapshotsPage,
ListSnapshotsFixedSizeCollection> {
public static ApiFuture createAsync(
PageContext context,
ApiFuture futureResponse) {
ApiFuture futurePage =
ListSnapshotsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
input -> new ListSnapshotsPagedResponse(input),
MoreExecutors.directExecutor());
}
private ListSnapshotsPagedResponse(ListSnapshotsPage page) {
super(page, ListSnapshotsFixedSizeCollection.createEmptyCollection());
}
}
public static class ListSnapshotsPage
extends AbstractPage<
ListSnapshotsRequest, ListSnapshotsResponse, Snapshot, ListSnapshotsPage> {
private ListSnapshotsPage(
PageContext context,
ListSnapshotsResponse response) {
super(context, response);
}
private static ListSnapshotsPage createEmptyPage() {
return new ListSnapshotsPage(null, null);
}
@Override
protected ListSnapshotsPage createPage(
PageContext context,
ListSnapshotsResponse response) {
return new ListSnapshotsPage(context, response);
}
@Override
public ApiFuture createPageAsync(
PageContext context,
ApiFuture futureResponse) {
return super.createPageAsync(context, futureResponse);
}
}
public static class ListSnapshotsFixedSizeCollection
extends AbstractFixedSizeCollection<
ListSnapshotsRequest,
ListSnapshotsResponse,
Snapshot,
ListSnapshotsPage,
ListSnapshotsFixedSizeCollection> {
private ListSnapshotsFixedSizeCollection(List pages, int collectionSize) {
super(pages, collectionSize);
}
private static ListSnapshotsFixedSizeCollection createEmptyCollection() {
return new ListSnapshotsFixedSizeCollection(null, 0);
}
@Override
protected ListSnapshotsFixedSizeCollection createCollection(
List pages, int collectionSize) {
return new ListSnapshotsFixedSizeCollection(pages, collectionSize);
}
}
public static class ListActiveDirectoriesPagedResponse
extends AbstractPagedListResponse<
ListActiveDirectoriesRequest,
ListActiveDirectoriesResponse,
ActiveDirectory,
ListActiveDirectoriesPage,
ListActiveDirectoriesFixedSizeCollection> {
public static ApiFuture createAsync(
PageContext
context,
ApiFuture futureResponse) {
ApiFuture futurePage =
ListActiveDirectoriesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
input -> new ListActiveDirectoriesPagedResponse(input),
MoreExecutors.directExecutor());
}
private ListActiveDirectoriesPagedResponse(ListActiveDirectoriesPage page) {
super(page, ListActiveDirectoriesFixedSizeCollection.createEmptyCollection());
}
}
public static class ListActiveDirectoriesPage
extends AbstractPage<
ListActiveDirectoriesRequest,
ListActiveDirectoriesResponse,
ActiveDirectory,
ListActiveDirectoriesPage> {
private ListActiveDirectoriesPage(
PageContext
context,
ListActiveDirectoriesResponse response) {
super(context, response);
}
private static ListActiveDirectoriesPage createEmptyPage() {
return new ListActiveDirectoriesPage(null, null);
}
@Override
protected ListActiveDirectoriesPage createPage(
PageContext
context,
ListActiveDirectoriesResponse response) {
return new ListActiveDirectoriesPage(context, response);
}
@Override
public ApiFuture createPageAsync(
PageContext
context,
ApiFuture futureResponse) {
return super.createPageAsync(context, futureResponse);
}
}
public static class ListActiveDirectoriesFixedSizeCollection
extends AbstractFixedSizeCollection<
ListActiveDirectoriesRequest,
ListActiveDirectoriesResponse,
ActiveDirectory,
ListActiveDirectoriesPage,
ListActiveDirectoriesFixedSizeCollection> {
private ListActiveDirectoriesFixedSizeCollection(
List pages, int collectionSize) {
super(pages, collectionSize);
}
private static ListActiveDirectoriesFixedSizeCollection createEmptyCollection() {
return new ListActiveDirectoriesFixedSizeCollection(null, 0);
}
@Override
protected ListActiveDirectoriesFixedSizeCollection createCollection(
List pages, int collectionSize) {
return new ListActiveDirectoriesFixedSizeCollection(pages, collectionSize);
}
}
public static class ListKmsConfigsPagedResponse
extends AbstractPagedListResponse<
ListKmsConfigsRequest,
ListKmsConfigsResponse,
KmsConfig,
ListKmsConfigsPage,
ListKmsConfigsFixedSizeCollection> {
public static ApiFuture createAsync(
PageContext context,
ApiFuture futureResponse) {
ApiFuture futurePage =
ListKmsConfigsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
input -> new ListKmsConfigsPagedResponse(input),
MoreExecutors.directExecutor());
}
private ListKmsConfigsPagedResponse(ListKmsConfigsPage page) {
super(page, ListKmsConfigsFixedSizeCollection.createEmptyCollection());
}
}
public static class ListKmsConfigsPage
extends AbstractPage<
ListKmsConfigsRequest, ListKmsConfigsResponse, KmsConfig, ListKmsConfigsPage> {
private ListKmsConfigsPage(
PageContext context,
ListKmsConfigsResponse response) {
super(context, response);
}
private static ListKmsConfigsPage createEmptyPage() {
return new ListKmsConfigsPage(null, null);
}
@Override
protected ListKmsConfigsPage createPage(
PageContext context,
ListKmsConfigsResponse response) {
return new ListKmsConfigsPage(context, response);
}
@Override
public ApiFuture createPageAsync(
PageContext context,
ApiFuture futureResponse) {
return super.createPageAsync(context, futureResponse);
}
}
public static class ListKmsConfigsFixedSizeCollection
extends AbstractFixedSizeCollection<
ListKmsConfigsRequest,
ListKmsConfigsResponse,
KmsConfig,
ListKmsConfigsPage,
ListKmsConfigsFixedSizeCollection> {
private ListKmsConfigsFixedSizeCollection(List pages, int collectionSize) {
super(pages, collectionSize);
}
private static ListKmsConfigsFixedSizeCollection createEmptyCollection() {
return new ListKmsConfigsFixedSizeCollection(null, 0);
}
@Override
protected ListKmsConfigsFixedSizeCollection createCollection(
List pages, int collectionSize) {
return new ListKmsConfigsFixedSizeCollection(pages, collectionSize);
}
}
public static class ListReplicationsPagedResponse
extends AbstractPagedListResponse<
ListReplicationsRequest,
ListReplicationsResponse,
Replication,
ListReplicationsPage,
ListReplicationsFixedSizeCollection> {
public static ApiFuture createAsync(
PageContext context,
ApiFuture futureResponse) {
ApiFuture futurePage =
ListReplicationsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
input -> new ListReplicationsPagedResponse(input),
MoreExecutors.directExecutor());
}
private ListReplicationsPagedResponse(ListReplicationsPage page) {
super(page, ListReplicationsFixedSizeCollection.createEmptyCollection());
}
}
public static class ListReplicationsPage
extends AbstractPage<
ListReplicationsRequest, ListReplicationsResponse, Replication, ListReplicationsPage> {
private ListReplicationsPage(
PageContext context,
ListReplicationsResponse response) {
super(context, response);
}
private static ListReplicationsPage createEmptyPage() {
return new ListReplicationsPage(null, null);
}
@Override
protected ListReplicationsPage createPage(
PageContext context,
ListReplicationsResponse response) {
return new ListReplicationsPage(context, response);
}
@Override
public ApiFuture createPageAsync(
PageContext context,
ApiFuture futureResponse) {
return super.createPageAsync(context, futureResponse);
}
}
public static class ListReplicationsFixedSizeCollection
extends AbstractFixedSizeCollection<
ListReplicationsRequest,
ListReplicationsResponse,
Replication,
ListReplicationsPage,
ListReplicationsFixedSizeCollection> {
private ListReplicationsFixedSizeCollection(
List pages, int collectionSize) {
super(pages, collectionSize);
}
private static ListReplicationsFixedSizeCollection createEmptyCollection() {
return new ListReplicationsFixedSizeCollection(null, 0);
}
@Override
protected ListReplicationsFixedSizeCollection createCollection(
List pages, int collectionSize) {
return new ListReplicationsFixedSizeCollection(pages, collectionSize);
}
}
public static class ListBackupVaultsPagedResponse
extends AbstractPagedListResponse<
ListBackupVaultsRequest,
ListBackupVaultsResponse,
BackupVault,
ListBackupVaultsPage,
ListBackupVaultsFixedSizeCollection> {
public static ApiFuture createAsync(
PageContext context,
ApiFuture futureResponse) {
ApiFuture futurePage =
ListBackupVaultsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
input -> new ListBackupVaultsPagedResponse(input),
MoreExecutors.directExecutor());
}
private ListBackupVaultsPagedResponse(ListBackupVaultsPage page) {
super(page, ListBackupVaultsFixedSizeCollection.createEmptyCollection());
}
}
public static class ListBackupVaultsPage
extends AbstractPage<
ListBackupVaultsRequest, ListBackupVaultsResponse, BackupVault, ListBackupVaultsPage> {
private ListBackupVaultsPage(
PageContext context,
ListBackupVaultsResponse response) {
super(context, response);
}
private static ListBackupVaultsPage createEmptyPage() {
return new ListBackupVaultsPage(null, null);
}
@Override
protected ListBackupVaultsPage createPage(
PageContext context,
ListBackupVaultsResponse response) {
return new ListBackupVaultsPage(context, response);
}
@Override
public ApiFuture createPageAsync(
PageContext context,
ApiFuture futureResponse) {
return super.createPageAsync(context, futureResponse);
}
}
public static class ListBackupVaultsFixedSizeCollection
extends AbstractFixedSizeCollection<
ListBackupVaultsRequest,
ListBackupVaultsResponse,
BackupVault,
ListBackupVaultsPage,
ListBackupVaultsFixedSizeCollection> {
private ListBackupVaultsFixedSizeCollection(
List pages, int collectionSize) {
super(pages, collectionSize);
}
private static ListBackupVaultsFixedSizeCollection createEmptyCollection() {
return new ListBackupVaultsFixedSizeCollection(null, 0);
}
@Override
protected ListBackupVaultsFixedSizeCollection createCollection(
List pages, int collectionSize) {
return new ListBackupVaultsFixedSizeCollection(pages, collectionSize);
}
}
public static class ListBackupsPagedResponse
extends AbstractPagedListResponse<
ListBackupsRequest,
ListBackupsResponse,
Backup,
ListBackupsPage,
ListBackupsFixedSizeCollection> {
public static ApiFuture createAsync(
PageContext