use of com.google.storage.v2.StorageSettings in project gapic-generator-java by googleapis.
the class SyncDeleteBucket method syncDeleteBucket.
public static void syncDeleteBucket() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
StorageSettings.Builder storageSettingsBuilder = StorageSettings.newBuilder();
storageSettingsBuilder.deleteBucketSettings().setRetrySettings(storageSettingsBuilder.deleteBucketSettings().getRetrySettings().toBuilder().setTotalTimeout(Duration.ofSeconds(30)).build());
StorageSettings storageSettings = storageSettingsBuilder.build();
}
use of com.google.storage.v2.StorageSettings in project gapic-generator-java by googleapis.
the class SyncCreateSetCredentialsProvider method syncCreateSetCredentialsProvider.
public static void syncCreateSetCredentialsProvider() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
StorageSettings storageSettings = StorageSettings.newBuilder().setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)).build();
StorageClient storageClient = StorageClient.create(storageSettings);
}
use of com.google.storage.v2.StorageSettings in project gapic-generator-java by googleapis.
the class SyncCreateSetEndpoint method syncCreateSetEndpoint.
public static void syncCreateSetEndpoint() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
StorageSettings storageSettings = StorageSettings.newBuilder().setEndpoint(myEndpoint).build();
StorageClient storageClient = StorageClient.create(storageSettings);
}
use of com.google.storage.v2.StorageSettings in project gapic-generator-java by googleapis.
the class SyncDeleteBucket method syncDeleteBucket.
public static void syncDeleteBucket() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
StorageStubSettings.Builder storageSettingsBuilder = StorageStubSettings.newBuilder();
storageSettingsBuilder.deleteBucketSettings().setRetrySettings(storageSettingsBuilder.deleteBucketSettings().getRetrySettings().toBuilder().setTotalTimeout(Duration.ofSeconds(30)).build());
StorageStubSettings storageSettings = storageSettingsBuilder.build();
}
Aggregations