Search in sources :

Example 1 with 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.
    StorageSettings.Builder storageSettingsBuilder = StorageSettings.newBuilder();
    storageSettingsBuilder.deleteBucketSettings().setRetrySettings(storageSettingsBuilder.deleteBucketSettings().getRetrySettings().toBuilder().setTotalTimeout(Duration.ofSeconds(30)).build());
    StorageSettings storageSettings = storageSettingsBuilder.build();
}
Also used : StorageSettings(com.google.storage.v2.StorageSettings)

Example 2 with StorageSettings

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);
}
Also used : StorageSettings(com.google.storage.v2.StorageSettings) StorageClient(com.google.storage.v2.StorageClient)

Example 3 with 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);
}
Also used : StorageSettings(com.google.storage.v2.StorageSettings) StorageClient(com.google.storage.v2.StorageClient)

Example 4 with 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();
}
Also used : StorageStubSettings(com.google.storage.v2.stub.StorageStubSettings)

Aggregations

StorageSettings (com.google.storage.v2.StorageSettings)3 StorageClient (com.google.storage.v2.StorageClient)2 StorageStubSettings (com.google.storage.v2.stub.StorageStubSettings)1