public class CommerceTransactionSettings extends ClientSettings<CommerceTransactionSettings>Settings class to configure an instance of CommerceTransactionClient.
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
CommerceTransactionSettings.Builder commerceTransactionSettingsBuilder =
CommerceTransactionSettings.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());
CommerceTransactionSettings commerceTransactionSettings =
commerceTransactionSettingsBuilder.build();
Please refer to the Client Side Retry Guide for additional support in setting retries.
Static Methods
create(CommerceTransactionStubSettings stub)
public static final CommerceTransactionSettings create(CommerceTransactionStubSettings stub)| Parameter | |
|---|---|
| Name | Description |
stub |
CommerceTransactionStubSettings |
| Returns | |
|---|---|
| Type | Description |
CommerceTransactionSettings |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
defaultApiClientHeaderProviderBuilder()
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder()| Returns | |
|---|---|
| Type | Description |
Builder |
|
defaultCredentialsProviderBuilder()
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder()Returns a builder for the default credentials for this service.
| Returns | |
|---|---|
| Type | Description |
Builder |
|
defaultExecutorProviderBuilder()
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder()Returns a builder for the default ExecutorProvider for this service.
| Returns | |
|---|---|
| Type | Description |
Builder |
|
defaultGrpcTransportProviderBuilder()
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()Returns a builder for the default gRPC ChannelProvider for this service.
| Returns | |
|---|---|
| Type | Description |
Builder |
|
defaultHttpJsonTransportProviderBuilder()
public static InstantiatingHttpJsonChannelProvider.Builder defaultHttpJsonTransportProviderBuilder()Returns a builder for the default REST ChannelProvider for this service.
| Returns | |
|---|---|
| Type | Description |
Builder |
|
defaultTransportChannelProvider()
public static TransportChannelProvider defaultTransportChannelProvider()| Returns | |
|---|---|
| Type | Description |
TransportChannelProvider |
|
getDefaultEndpoint()
public static String getDefaultEndpoint()Returns the default service endpoint.
| Returns | |
|---|---|
| Type | Description |
String |
|
getDefaultServiceScopes()
public static List<String> getDefaultServiceScopes()Returns the default service scopes.
| Returns | |
|---|---|
| Type | Description |
List<String> |
|
newBuilder()
public static CommerceTransactionSettings.Builder newBuilder()Returns a new gRPC builder for this class.
| Returns | |
|---|---|
| Type | Description |
CommerceTransactionSettings.Builder |
|
newBuilder(@Nullable ClientContext clientContext)
public static CommerceTransactionSettings.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 |
| Returns | |
|---|---|
| Type | Description |
CommerceTransactionSettings.Builder |
|
newHttpJsonBuilder()
public static CommerceTransactionSettings.Builder newHttpJsonBuilder()Returns a new REST builder for this class.
| Returns | |
|---|---|
| Type | Description |
CommerceTransactionSettings.Builder |
|
Constructors
CommerceTransactionSettings(CommerceTransactionSettings.Builder settingsBuilder)
protected CommerceTransactionSettings(CommerceTransactionSettings.Builder settingsBuilder)| Parameter | |
|---|---|
| Name | Description |
settingsBuilder |
CommerceTransactionSettings.Builder |
Methods
cancelPrivateOfferSettings()
public UnaryCallSettings<CancelPrivateOfferRequest,PrivateOffer> cancelPrivateOfferSettings()Returns the object with the settings used for calls to cancelPrivateOffer.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<CancelPrivateOfferRequest,PrivateOffer> |
|
createPrivateOfferDocumentSettings()
public UnaryCallSettings<CreatePrivateOfferDocumentRequest,PrivateOfferDocument> createPrivateOfferDocumentSettings()Returns the object with the settings used for calls to createPrivateOfferDocument.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<CreatePrivateOfferDocumentRequest,PrivateOfferDocument> |
|
createPrivateOfferSettings()
public UnaryCallSettings<CreatePrivateOfferRequest,PrivateOffer> createPrivateOfferSettings()Returns the object with the settings used for calls to createPrivateOffer.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<CreatePrivateOfferRequest,PrivateOffer> |
|
deletePrivateOfferDocumentSettings()
public UnaryCallSettings<DeletePrivateOfferDocumentRequest,Empty> deletePrivateOfferDocumentSettings()Returns the object with the settings used for calls to deletePrivateOfferDocument.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<DeletePrivateOfferDocumentRequest,Empty> |
|
deletePrivateOfferSettings()
public UnaryCallSettings<DeletePrivateOfferRequest,Empty> deletePrivateOfferSettings()Returns the object with the settings used for calls to deletePrivateOffer.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<DeletePrivateOfferRequest,Empty> |
|
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.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<GetPrivateOfferDocumentRequest,PrivateOfferDocument> |
|
getPrivateOfferSettings()
public UnaryCallSettings<GetPrivateOfferRequest,PrivateOffer> getPrivateOfferSettings()Returns the object with the settings used for calls to getPrivateOffer.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<GetPrivateOfferRequest,PrivateOffer> |
|
getServiceSettings()
public UnaryCallSettings<GetServiceRequest,Service> getServiceSettings()Returns the object with the settings used for calls to getService.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<GetServiceRequest,Service> |
|
getSkuGroupSettings()
public UnaryCallSettings<GetSkuGroupRequest,SkuGroup> getSkuGroupSettings()Returns the object with the settings used for calls to getSkuGroup.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<GetSkuGroupRequest,SkuGroup> |
|
getSkuSettings()
public UnaryCallSettings<GetSkuRequest,Sku> getSkuSettings()Returns the object with the settings used for calls to getSku.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<GetSkuRequest,Sku> |
|
getStandardOfferSettings()
public UnaryCallSettings<GetStandardOfferRequest,StandardOffer> getStandardOfferSettings()Returns the object with the settings used for calls to getStandardOffer.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<GetStandardOfferRequest,StandardOffer> |
|
listLocationsSettings()
public PagedCallSettings<ListLocationsRequest,ListLocationsResponse,CommerceTransactionClient.ListLocationsPagedResponse> listLocationsSettings()Returns the object with the settings used for calls to listLocations.
| Returns | |
|---|---|
| Type | Description |
PagedCallSettings<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse,ListLocationsPagedResponse> |
|
listPrivateOfferDocumentsSettings()
public PagedCallSettings<ListPrivateOfferDocumentsRequest,ListPrivateOfferDocumentsResponse,CommerceTransactionClient.ListPrivateOfferDocumentsPagedResponse> listPrivateOfferDocumentsSettings()Returns the object with the settings used for calls to listPrivateOfferDocuments.
| Returns | |
|---|---|
| Type | Description |
PagedCallSettings<ListPrivateOfferDocumentsRequest,ListPrivateOfferDocumentsResponse,ListPrivateOfferDocumentsPagedResponse> |
|
listPrivateOffersSettings()
public PagedCallSettings<ListPrivateOffersRequest,ListPrivateOffersResponse,CommerceTransactionClient.ListPrivateOffersPagedResponse> listPrivateOffersSettings()Returns the object with the settings used for calls to listPrivateOffers.
| Returns | |
|---|---|
| Type | Description |
PagedCallSettings<ListPrivateOffersRequest,ListPrivateOffersResponse,ListPrivateOffersPagedResponse> |
|
listServicesSettings()
public PagedCallSettings<ListServicesRequest,ListServicesResponse,CommerceTransactionClient.ListServicesPagedResponse> listServicesSettings()Returns the object with the settings used for calls to listServices.
| Returns | |
|---|---|
| Type | Description |
PagedCallSettings<ListServicesRequest,ListServicesResponse,ListServicesPagedResponse> |
|
listSkuGroupsSettings()
public PagedCallSettings<ListSkuGroupsRequest,ListSkuGroupsResponse,CommerceTransactionClient.ListSkuGroupsPagedResponse> listSkuGroupsSettings()Returns the object with the settings used for calls to listSkuGroups.
| Returns | |
|---|---|
| Type | Description |
PagedCallSettings<ListSkuGroupsRequest,ListSkuGroupsResponse,ListSkuGroupsPagedResponse> |
|
listSkusSettings()
public PagedCallSettings<ListSkusRequest,ListSkusResponse,CommerceTransactionClient.ListSkusPagedResponse> listSkusSettings()Returns the object with the settings used for calls to listSkus.
| Returns | |
|---|---|
| Type | Description |
PagedCallSettings<ListSkusRequest,ListSkusResponse,ListSkusPagedResponse> |
|
listStandardOffersSettings()
public PagedCallSettings<ListStandardOffersRequest,ListStandardOffersResponse,CommerceTransactionClient.ListStandardOffersPagedResponse> listStandardOffersSettings()Returns the object with the settings used for calls to listStandardOffers.
| Returns | |
|---|---|
| Type | Description |
PagedCallSettings<ListStandardOffersRequest,ListStandardOffersResponse,ListStandardOffersPagedResponse> |
|
publishPrivateOfferSettings()
public UnaryCallSettings<PublishPrivateOfferRequest,PrivateOffer> publishPrivateOfferSettings()Returns the object with the settings used for calls to publishPrivateOffer.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<PublishPrivateOfferRequest,PrivateOffer> |
|
resolveAmendmentTargetSettings()
public UnaryCallSettings<ResolveAmendmentTargetRequest,ResolveAmendmentTargetResponse> resolveAmendmentTargetSettings()Returns the object with the settings used for calls to resolveAmendmentTarget.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<ResolveAmendmentTargetRequest,ResolveAmendmentTargetResponse> |
|
toBuilder()
public CommerceTransactionSettings.Builder toBuilder()Returns a builder containing all the values of this settings class.
| Returns | |
|---|---|
| Type | Description |
CommerceTransactionSettings.Builder |
|
updatePrivateOfferDocumentSettings()
public UnaryCallSettings<UpdatePrivateOfferDocumentRequest,PrivateOfferDocument> updatePrivateOfferDocumentSettings()Returns the object with the settings used for calls to updatePrivateOfferDocument.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<UpdatePrivateOfferDocumentRequest,PrivateOfferDocument> |
|
updatePrivateOfferSettings()
public UnaryCallSettings<UpdatePrivateOfferRequest,PrivateOffer> updatePrivateOfferSettings()Returns the object with the settings used for calls to updatePrivateOffer.
| Returns | |
|---|---|
| Type | Description |
UnaryCallSettings<UpdatePrivateOfferRequest,PrivateOffer> |
|