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 total timeout of deleteBucket to 30 seconds:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require 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()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 StorageStubSettings storageSettings = storageSettingsBuilder.build();
 
  • Constructor Details

  • 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

      public com.google.api.gax.rpc.UnaryCallSettings<GetBucketRequest,Bucket> getBucketSettings()
      Returns the object with the settings used for calls to getBucket.
    • createBucketSettings

      public com.google.api.gax.rpc.UnaryCallSettings<CreateBucketRequest,Bucket> createBucketSettings()
      Returns the object with the settings used for calls to createBucket.
    • listBucketsSettings

      public com.google.api.gax.rpc.PagedCallSettings<ListBucketsRequest,ListBucketsResponse,StorageClient.ListBucketsPagedResponse> listBucketsSettings()
      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

      public com.google.api.gax.rpc.UnaryCallSettings<UpdateBucketRequest,Bucket> updateBucketSettings()
      Returns the object with the settings used for calls to updateBucket.
    • deleteNotificationConfigSettings

      public com.google.api.gax.rpc.UnaryCallSettings<DeleteNotificationConfigRequest,com.google.protobuf.Empty> deleteNotificationConfigSettings()
      Returns the object with the settings used for calls to deleteNotificationConfig.
    • getNotificationConfigSettings

      public com.google.api.gax.rpc.UnaryCallSettings<GetNotificationConfigRequest,NotificationConfig> getNotificationConfigSettings()
      Returns the object with the settings used for calls to getNotificationConfig.
    • createNotificationConfigSettings

      public com.google.api.gax.rpc.UnaryCallSettings<CreateNotificationConfigRequest,NotificationConfig> createNotificationConfigSettings()
      Returns the object with the settings used for calls to createNotificationConfig.
    • listNotificationConfigsSettings

      public com.google.api.gax.rpc.PagedCallSettings<ListNotificationConfigsRequest,ListNotificationConfigsResponse,StorageClient.ListNotificationConfigsPagedResponse> listNotificationConfigsSettings()
      Returns the object with the settings used for calls to listNotificationConfigs.
    • 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

      public com.google.api.gax.rpc.UnaryCallSettings<GetObjectRequest,Object> 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

      public com.google.api.gax.rpc.UnaryCallSettings<UpdateObjectRequest,Object> 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,StorageClient.ListObjectsPagedResponse> listObjectsSettings()
      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.
    • getServiceAccountSettings

      public com.google.api.gax.rpc.UnaryCallSettings<GetServiceAccountRequest,ServiceAccount> getServiceAccountSettings()
      Returns the object with the settings used for calls to getServiceAccount.
    • createHmacKeySettings

      public com.google.api.gax.rpc.UnaryCallSettings<CreateHmacKeyRequest,CreateHmacKeyResponse> createHmacKeySettings()
      Returns the object with the settings used for calls to createHmacKey.
    • deleteHmacKeySettings

      public com.google.api.gax.rpc.UnaryCallSettings<DeleteHmacKeyRequest,com.google.protobuf.Empty> deleteHmacKeySettings()
      Returns the object with the settings used for calls to deleteHmacKey.
    • getHmacKeySettings

      public com.google.api.gax.rpc.UnaryCallSettings<GetHmacKeyRequest,HmacKeyMetadata> getHmacKeySettings()
      Returns the object with the settings used for calls to getHmacKey.
    • listHmacKeysSettings

      public com.google.api.gax.rpc.PagedCallSettings<ListHmacKeysRequest,ListHmacKeysResponse,StorageClient.ListHmacKeysPagedResponse> listHmacKeysSettings()
      Returns the object with the settings used for calls to listHmacKeys.
    • updateHmacKeySettings

      public com.google.api.gax.rpc.UnaryCallSettings<UpdateHmacKeyRequest,HmacKeyMetadata> updateHmacKeySettings()
      Returns the object with the settings used for calls to updateHmacKey.
    • createStub

      public StorageStub createStub() throws IOException
      Throws:
      IOException
    • defaultExecutorProviderBuilder

      public static com.google.api.gax.core.InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder()
      Returns a builder for the default ExecutorProvider for this service.
    • getDefaultEndpoint

      public static String getDefaultEndpoint()
      Returns the default service endpoint.
    • getDefaultMtlsEndpoint

      public static String getDefaultMtlsEndpoint()
      Returns the default mTLS service endpoint.
    • getDefaultServiceScopes

      public static List<String> 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

      @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") public static com.google.api.gax.rpc.ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder()
    • newBuilder

      public static StorageStubSettings.Builder 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

      public StorageStubSettings.Builder toBuilder()
      Returns a builder containing all the values of this settings class.
      Specified by:
      toBuilder in class com.google.api.gax.rpc.StubSettings<StorageStubSettings>