Package com.google.storage.v2.stub
Class StorageStubSettings
java.lang.Object
com.google.api.gax.rpc.StubSettings<StorageStubSettings>
com.google.storage.v2.stub.StorageStubSettings
@Generated("by gapic-generator-java")
public class StorageStubSettings
extends com.google.api.gax.rpc.StubSettings<StorageStubSettings>
Settings class to configure an instance of
StorageStub.
The default instance has everything set to sensible defaults:
- The default service address (storage.googleapis.com) and default port (443) are used.
- Credentials are acquired automatically through Application Default Credentials.
- Retries are configured for idempotent methods but not for non-idempotent methods.
The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.
For example, to set the [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) of deleteBucket:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
StorageStubSettings.Builder storageSettingsBuilder = StorageStubSettings.newBuilder();
storageSettingsBuilder
.deleteBucketSettings()
.setRetrySettings(
storageSettingsBuilder
.deleteBucketSettings()
.getRetrySettings()
.toBuilder()
.setInitialRetryDelayDuration(Duration.ofSeconds(1))
.setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
.setMaxAttempts(5)
.setMaxRetryDelayDuration(Duration.ofSeconds(30))
.setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
.setRetryDelayMultiplier(1.3)
.setRpcTimeoutMultiplier(1.5)
.setTotalTimeoutDuration(Duration.ofSeconds(300))
.build());
StorageStubSettings storageSettings = storageSettingsBuilder.build();
Please refer to the [Client Side Retry
Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
additional support in setting retries.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for StorageStubSettings. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStorageStubSettings(StorageStubSettings.Builder settingsBuilder) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.api.gax.rpc.StreamingCallSettings<BidiWriteObjectRequest,BidiWriteObjectResponse> Returns the object with the settings used for calls to bidiWriteObject.com.google.api.gax.rpc.UnaryCallSettings<CancelResumableWriteRequest,CancelResumableWriteResponse> Returns the object with the settings used for calls to cancelResumableWrite.com.google.api.gax.rpc.UnaryCallSettings<ComposeObjectRequest,Object> Returns the object with the settings used for calls to composeObject.com.google.api.gax.rpc.UnaryCallSettings<CreateBucketRequest,Bucket> Returns the object with the settings used for calls to createBucket.static com.google.api.gax.rpc.ApiClientHeaderProvider.Builderstatic com.google.api.gax.core.GoogleCredentialsProvider.BuilderReturns a builder for the default credentials for this service.static com.google.api.gax.core.InstantiatingExecutorProvider.BuilderReturns a builder for the default ExecutorProvider for this service.static com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.BuilderReturns a builder for the default ChannelProvider for this service.static com.google.api.gax.rpc.TransportChannelProvidercom.google.api.gax.rpc.UnaryCallSettings<DeleteBucketRequest,com.google.protobuf.Empty> Returns the object with the settings used for calls to deleteBucket.com.google.api.gax.rpc.UnaryCallSettings<DeleteObjectRequest,com.google.protobuf.Empty> Returns the object with the settings used for calls to deleteObject.com.google.api.gax.rpc.UnaryCallSettings<GetBucketRequest,Bucket> Returns the object with the settings used for calls to getBucket.static StringReturns the default service endpoint.static StringReturns the default mTLS service endpoint.Returns the default service scopes.com.google.api.gax.rpc.UnaryCallSettings<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> Returns the object with the settings used for calls to getIamPolicy.com.google.api.gax.rpc.UnaryCallSettings<GetObjectRequest,Object> Returns the object with the settings used for calls to getObject.Returns the default service name.com.google.api.gax.rpc.PagedCallSettings<ListBucketsRequest,ListBucketsResponse, StorageClient.ListBucketsPagedResponse> Returns the object with the settings used for calls to listBuckets.com.google.api.gax.rpc.PagedCallSettings<ListObjectsRequest,ListObjectsResponse, StorageClient.ListObjectsPagedResponse> Returns the object with the settings used for calls to listObjects.com.google.api.gax.rpc.UnaryCallSettings<LockBucketRetentionPolicyRequest,Bucket> Returns the object with the settings used for calls to lockBucketRetentionPolicy.com.google.api.gax.rpc.UnaryCallSettings<MoveObjectRequest,Object> Returns the object with the settings used for calls to moveObject.static StorageStubSettings.BuilderReturns a new builder for this class.static StorageStubSettings.BuildernewBuilder(com.google.api.gax.rpc.ClientContext clientContext) Returns a new builder for this class.com.google.api.gax.rpc.UnaryCallSettings<QueryWriteStatusRequest,QueryWriteStatusResponse> Returns the object with the settings used for calls to queryWriteStatus.com.google.api.gax.rpc.ServerStreamingCallSettings<ReadObjectRequest,ReadObjectResponse> Returns the object with the settings used for calls to readObject.com.google.api.gax.rpc.UnaryCallSettings<RestoreObjectRequest,Object> Returns the object with the settings used for calls to restoreObject.com.google.api.gax.rpc.UnaryCallSettings<RewriteObjectRequest,RewriteResponse> Returns the object with the settings used for calls to rewriteObject.com.google.api.gax.rpc.UnaryCallSettings<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> Returns the object with the settings used for calls to setIamPolicy.com.google.api.gax.rpc.UnaryCallSettings<StartResumableWriteRequest,StartResumableWriteResponse> Returns the object with the settings used for calls to startResumableWrite.com.google.api.gax.rpc.UnaryCallSettings<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> Returns the object with the settings used for calls to testIamPermissions.Returns a builder containing all the values of this settings class.com.google.api.gax.rpc.UnaryCallSettings<UpdateBucketRequest,Bucket> Returns the object with the settings used for calls to updateBucket.com.google.api.gax.rpc.UnaryCallSettings<UpdateObjectRequest,Object> Returns the object with the settings used for calls to updateObject.com.google.api.gax.rpc.StreamingCallSettings<WriteObjectRequest,WriteObjectResponse> Returns the object with the settings used for calls to writeObject.Methods inherited from class com.google.api.gax.rpc.StubSettings
getApiKey, getBackgroundExecutorProvider, getClock, getCredentialsProvider, getEndpoint, getExecutorProvider, getGdchApiAudience, getHeaderProvider, getInternalHeaderProvider, getMtlsEndpoint, getQuotaProjectId, getStreamWatchdogCheckInterval, getStreamWatchdogCheckIntervalDuration, getStreamWatchdogProvider, getTracerFactory, getTransportChannelProvider, getUniverseDomain, toString
-
Constructor Details
-
StorageStubSettings
- Throws:
IOException
-
-
Method Details
-
deleteBucketSettings
public com.google.api.gax.rpc.UnaryCallSettings<DeleteBucketRequest,com.google.protobuf.Empty> deleteBucketSettings()Returns the object with the settings used for calls to deleteBucket. -
getBucketSettings
Returns the object with the settings used for calls to getBucket. -
createBucketSettings
Returns the object with the settings used for calls to createBucket. -
listBucketsSettings
public com.google.api.gax.rpc.PagedCallSettings<ListBucketsRequest,ListBucketsResponse, listBucketsSettings()StorageClient.ListBucketsPagedResponse> Returns the object with the settings used for calls to listBuckets. -
lockBucketRetentionPolicySettings
public com.google.api.gax.rpc.UnaryCallSettings<LockBucketRetentionPolicyRequest,Bucket> lockBucketRetentionPolicySettings()Returns the object with the settings used for calls to lockBucketRetentionPolicy. -
getIamPolicySettings
public com.google.api.gax.rpc.UnaryCallSettings<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> getIamPolicySettings()Returns the object with the settings used for calls to getIamPolicy. -
setIamPolicySettings
public com.google.api.gax.rpc.UnaryCallSettings<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> setIamPolicySettings()Returns the object with the settings used for calls to setIamPolicy. -
testIamPermissionsSettings
public com.google.api.gax.rpc.UnaryCallSettings<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> testIamPermissionsSettings()Returns the object with the settings used for calls to testIamPermissions. -
updateBucketSettings
Returns the object with the settings used for calls to updateBucket. -
composeObjectSettings
public com.google.api.gax.rpc.UnaryCallSettings<ComposeObjectRequest,Object> composeObjectSettings()Returns the object with the settings used for calls to composeObject. -
deleteObjectSettings
public com.google.api.gax.rpc.UnaryCallSettings<DeleteObjectRequest,com.google.protobuf.Empty> deleteObjectSettings()Returns the object with the settings used for calls to deleteObject. -
restoreObjectSettings
public com.google.api.gax.rpc.UnaryCallSettings<RestoreObjectRequest,Object> restoreObjectSettings()Returns the object with the settings used for calls to restoreObject. -
cancelResumableWriteSettings
public com.google.api.gax.rpc.UnaryCallSettings<CancelResumableWriteRequest,CancelResumableWriteResponse> cancelResumableWriteSettings()Returns the object with the settings used for calls to cancelResumableWrite. -
getObjectSettings
Returns the object with the settings used for calls to getObject. -
readObjectSettings
public com.google.api.gax.rpc.ServerStreamingCallSettings<ReadObjectRequest,ReadObjectResponse> readObjectSettings()Returns the object with the settings used for calls to readObject. -
updateObjectSettings
Returns the object with the settings used for calls to updateObject. -
writeObjectSettings
public com.google.api.gax.rpc.StreamingCallSettings<WriteObjectRequest,WriteObjectResponse> writeObjectSettings()Returns the object with the settings used for calls to writeObject. -
bidiWriteObjectSettings
public com.google.api.gax.rpc.StreamingCallSettings<BidiWriteObjectRequest,BidiWriteObjectResponse> bidiWriteObjectSettings()Returns the object with the settings used for calls to bidiWriteObject. -
listObjectsSettings
public com.google.api.gax.rpc.PagedCallSettings<ListObjectsRequest,ListObjectsResponse, listObjectsSettings()StorageClient.ListObjectsPagedResponse> Returns the object with the settings used for calls to listObjects. -
rewriteObjectSettings
public com.google.api.gax.rpc.UnaryCallSettings<RewriteObjectRequest,RewriteResponse> rewriteObjectSettings()Returns the object with the settings used for calls to rewriteObject. -
startResumableWriteSettings
public com.google.api.gax.rpc.UnaryCallSettings<StartResumableWriteRequest,StartResumableWriteResponse> startResumableWriteSettings()Returns the object with the settings used for calls to startResumableWrite. -
queryWriteStatusSettings
public com.google.api.gax.rpc.UnaryCallSettings<QueryWriteStatusRequest,QueryWriteStatusResponse> queryWriteStatusSettings()Returns the object with the settings used for calls to queryWriteStatus. -
moveObjectSettings
Returns the object with the settings used for calls to moveObject. -
createStub
- Throws:
IOException
-
getServiceName
Returns the default service name.- Overrides:
getServiceNamein classcom.google.api.gax.rpc.StubSettings<StorageStubSettings>
-
defaultExecutorProviderBuilder
public static com.google.api.gax.core.InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder()Returns a builder for the default ExecutorProvider for this service. -
getDefaultEndpoint
Returns the default service endpoint. -
getDefaultMtlsEndpoint
Returns the default mTLS service endpoint. -
getDefaultServiceScopes
Returns the default service scopes. -
defaultCredentialsProviderBuilder
public static com.google.api.gax.core.GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder()Returns a builder for the default credentials for this service. -
defaultGrpcTransportProviderBuilder
public static com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()Returns a builder for the default ChannelProvider for this service. -
defaultTransportChannelProvider
public static com.google.api.gax.rpc.TransportChannelProvider defaultTransportChannelProvider() -
defaultApiClientHeaderProviderBuilder
public static com.google.api.gax.rpc.ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() -
newBuilder
Returns a new builder for this class. -
newBuilder
public static StorageStubSettings.Builder newBuilder(com.google.api.gax.rpc.ClientContext clientContext) Returns a new builder for this class. -
toBuilder
Returns a builder containing all the values of this settings class.- Specified by:
toBuilderin classcom.google.api.gax.rpc.StubSettings<StorageStubSettings>
-