Beta
This library is covered by the Pre-GA Offerings Terms
of the Terms of Service. Pre-GA libraries might have limited support,
and changes to pre-GA libraries might not be compatible with other pre-GA versions.
For more information, see the
launch stage descriptions .
public class CommerceTransactionStubSettings extends StubSettings<CommerceTransactionStubSettings>
Settings class to configure an instance of CommerceTransactionStub .
The default instance has everything set to sensible defaults:
The default service address (commerceproducer.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
of getService:
// 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
CommerceTransactionStubSettings . Builder commerceTransactionSettingsBuilder =
CommerceTransactionStubSettings . newBuilder ();
commerceTransactionSettingsBuilder
. getServiceSettings ()
. setRetrySettings (
commerceTransactionSettingsBuilder
. getServiceSettings ()
. 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 ());
CommerceTransactionStubSettings commerceTransactionSettings =
commerceTransactionSettingsBuilder . build ();
Please refer to the Client Side Retry
Guide for additional support in setting
retries.
Static Methods
public static ApiClientHeaderProvider . Builder defaultApiClientHeaderProviderBuilder ()
defaultCredentialsProviderBuilder()
public static GoogleCredentialsProvider . Builder defaultCredentialsProviderBuilder ()
Returns a builder for the default credentials for this service.
defaultExecutorProviderBuilder()
public static InstantiatingExecutorProvider . Builder defaultExecutorProviderBuilder ()
Returns a builder for the default ExecutorProvider for this service.
public static ApiClientHeaderProvider . Builder defaultGrpcApiClientHeaderProviderBuilder ()
defaultGrpcTransportProviderBuilder()
public static InstantiatingGrpcChannelProvider . Builder defaultGrpcTransportProviderBuilder ()
Returns a builder for the default gRPC ChannelProvider for this service.
public static ApiClientHeaderProvider . Builder defaultHttpJsonApiClientHeaderProviderBuilder ()
defaultHttpJsonTransportProviderBuilder()
public static InstantiatingHttpJsonChannelProvider . Builder defaultHttpJsonTransportProviderBuilder ()
Beta
This feature is covered by the Pre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.
Returns a builder for the default REST ChannelProvider for this service.
defaultTransportChannelProvider()
public static TransportChannelProvider defaultTransportChannelProvider ()
getDefaultEndpoint()
public static String getDefaultEndpoint ()
Obsolete
Use getEndpoint() instead
This feature is stable for usage in this major version, but may be deprecated in a future release.
Returns the default service endpoint.
Returns
Type
Description
String
getDefaultMtlsEndpoint()
public static String getDefaultMtlsEndpoint ()
Returns the default mTLS service endpoint.
Returns
Type
Description
String
getDefaultServiceScopes()
public static List<String> getDefaultServiceScopes ()
Returns the default service scopes.
newBuilder()
public static CommerceTransactionStubSettings . Builder newBuilder ()
Returns a new gRPC builder for this class.
newBuilder(@Nullable ClientContext clientContext)
public static CommerceTransactionStubSettings . Builder newBuilder ( @Nullable ClientContext clientContext )
Returns a new builder for this class.
Parameter
Name
Description
clientContext
@org.jspecify.annotations.Nullable com.google.api.gax.rpc.ClientContext
newHttpJsonBuilder()
public static CommerceTransactionStubSettings . Builder newHttpJsonBuilder ()
Returns a new REST builder for this class.
Constructors
CommerceTransactionStubSettings(CommerceTransactionStubSettings.Builder settingsBuilder)
protected CommerceTransactionStubSettings ( CommerceTransactionStubSettings . Builder settingsBuilder )
Methods
cancelPrivateOfferSettings()
public UnaryCallSettings<CancelPrivateOfferRequest , PrivateOffer > cancelPrivateOfferSettings ()
Returns the object with the settings used for calls to cancelPrivateOffer.
createPrivateOfferDocumentSettings()
public UnaryCallSettings<CreatePrivateOfferDocumentRequest , PrivateOfferDocument > createPrivateOfferDocumentSettings ()
Returns the object with the settings used for calls to createPrivateOfferDocument.
createPrivateOfferSettings()
public UnaryCallSettings<CreatePrivateOfferRequest , PrivateOffer > createPrivateOfferSettings ()
Returns the object with the settings used for calls to createPrivateOffer.
createStub()
public CommerceTransactionStub createStub ()
deletePrivateOfferDocumentSettings()
public UnaryCallSettings<DeletePrivateOfferDocumentRequest , Empty > deletePrivateOfferDocumentSettings ()
Returns the object with the settings used for calls to deletePrivateOfferDocument.
deletePrivateOfferSettings()
public UnaryCallSettings<DeletePrivateOfferRequest , Empty > deletePrivateOfferSettings ()
Returns the object with the settings used for calls to deletePrivateOffer.
protected LibraryMetadata getLibraryMetadata ()
Overrides
getLocationSettings()
public UnaryCallSettings<GetLocationRequest , Location > getLocationSettings ()
Returns the object with the settings used for calls to getLocation.
Returns
Type
Description
UnaryCallSettings <com.google.cloud.location.GetLocationRequest ,com.google.cloud.location.Location >
getPrivateOfferDocumentSettings()
public UnaryCallSettings<GetPrivateOfferDocumentRequest , PrivateOfferDocument > getPrivateOfferDocumentSettings ()
Returns the object with the settings used for calls to getPrivateOfferDocument.
getPrivateOfferSettings()
public UnaryCallSettings<GetPrivateOfferRequest , PrivateOffer > getPrivateOfferSettings ()
Returns the object with the settings used for calls to getPrivateOffer.
getServiceName()
public String getServiceName ()
Returns the default service name.
Returns
Type
Description
String
Overrides
getServiceSettings()
public UnaryCallSettings<GetServiceRequest , Service > getServiceSettings ()
Returns the object with the settings used for calls to getService.
getSkuGroupSettings()
public UnaryCallSettings<GetSkuGroupRequest , SkuGroup > getSkuGroupSettings ()
Returns the object with the settings used for calls to getSkuGroup.
getSkuSettings()
public UnaryCallSettings<GetSkuRequest , Sku > getSkuSettings ()
Returns the object with the settings used for calls to getSku.
getStandardOfferSettings()
public UnaryCallSettings<GetStandardOfferRequest , StandardOffer > getStandardOfferSettings ()
Returns the object with the settings used for calls to getStandardOffer.
listLocationsSettings()
public PagedCallSettings<ListLocationsRequest , ListLocationsResponse , CommerceTransactionClient . ListLocationsPagedResponse > listLocationsSettings ()
Returns the object with the settings used for calls to listLocations.
listPrivateOfferDocumentsSettings()
public PagedCallSettings<ListPrivateOfferDocumentsRequest , ListPrivateOfferDocumentsResponse , CommerceTransactionClient . ListPrivateOfferDocumentsPagedResponse > listPrivateOfferDocumentsSettings ()
Returns the object with the settings used for calls to listPrivateOfferDocuments.
public PagedCallSettings<ListPrivateOffersRequest , ListPrivateOffersResponse , CommerceTransactionClient . ListPrivateOffersPagedResponse > listPrivateOffersSettings ()
Returns the object with the settings used for calls to listPrivateOffers.
listServicesSettings()
public PagedCallSettings<ListServicesRequest , ListServicesResponse , CommerceTransactionClient . ListServicesPagedResponse > listServicesSettings ()
Returns the object with the settings used for calls to listServices.
listSkuGroupsSettings()
public PagedCallSettings<ListSkuGroupsRequest , ListSkuGroupsResponse , CommerceTransactionClient . ListSkuGroupsPagedResponse > listSkuGroupsSettings ()
Returns the object with the settings used for calls to listSkuGroups.
listSkusSettings()
public PagedCallSettings<ListSkusRequest , ListSkusResponse , CommerceTransactionClient . ListSkusPagedResponse > listSkusSettings ()
Returns the object with the settings used for calls to listSkus.
listStandardOffersSettings()
public PagedCallSettings<ListStandardOffersRequest , ListStandardOffersResponse , CommerceTransactionClient . ListStandardOffersPagedResponse > listStandardOffersSettings ()
Returns the object with the settings used for calls to listStandardOffers.
publishPrivateOfferSettings()
public UnaryCallSettings<PublishPrivateOfferRequest , PrivateOffer > publishPrivateOfferSettings ()
Returns the object with the settings used for calls to publishPrivateOffer.
resolveAmendmentTargetSettings()
public UnaryCallSettings<ResolveAmendmentTargetRequest , ResolveAmendmentTargetResponse > resolveAmendmentTargetSettings ()
Returns the object with the settings used for calls to resolveAmendmentTarget.
toBuilder()
public CommerceTransactionStubSettings . Builder toBuilder ()
Returns a builder containing all the values of this settings class.
Overrides
updatePrivateOfferDocumentSettings()
public UnaryCallSettings<UpdatePrivateOfferDocumentRequest , PrivateOfferDocument > updatePrivateOfferDocumentSettings ()
Returns the object with the settings used for calls to updatePrivateOfferDocument.
updatePrivateOfferSettings()
public UnaryCallSettings<UpdatePrivateOfferRequest , PrivateOffer > updatePrivateOfferSettings ()
Returns the object with the settings used for calls to updatePrivateOffer.