public class ApiHubStubSettings extends StubSettings<ApiHubStubSettings>
Settings class to configure an instance of ApiHubStub .
The default instance has everything set to sensible defaults:
The default service address (apihub.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 createApi 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
ApiHubStubSettings.Builder apiHubSettingsBuilder = ApiHubStubSettings.newBuilder();
apiHubSettingsBuilder
.createApiSettings()
.setRetrySettings(
apiHubSettingsBuilder
.createApiSettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
ApiHubStubSettings apiHubSettings = apiHubSettingsBuilder.build();
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 ApiHubStubSettings.Builder newBuilder()
Returns a new gRPC builder for this class.
newBuilder(ClientContext clientContext)
public static ApiHubStubSettings.Builder newBuilder(ClientContext clientContext)
Returns a new builder for this class.
newHttpJsonBuilder()
public static ApiHubStubSettings.Builder newHttpJsonBuilder()
Returns a new REST builder for this class.
Constructors
ApiHubStubSettings(ApiHubStubSettings.Builder settingsBuilder)
protected ApiHubStubSettings(ApiHubStubSettings.Builder settingsBuilder)
Methods
createApiSettings()
public UnaryCallSettings<CreateApiRequest,Api> createApiSettings()
Returns the object with the settings used for calls to createApi.
createAttributeSettings()
public UnaryCallSettings<CreateAttributeRequest,Attribute> createAttributeSettings()
Returns the object with the settings used for calls to createAttribute.
createDeploymentSettings()
public UnaryCallSettings<CreateDeploymentRequest,Deployment> createDeploymentSettings()
Returns the object with the settings used for calls to createDeployment.
createExternalApiSettings()
public UnaryCallSettings<CreateExternalApiRequest,ExternalApi> createExternalApiSettings()
Returns the object with the settings used for calls to createExternalApi.
createSpecSettings()
public UnaryCallSettings<CreateSpecRequest,Spec> createSpecSettings()
Returns the object with the settings used for calls to createSpec.
createStub()
public ApiHubStub createStub()
createVersionSettings()
public UnaryCallSettings<CreateVersionRequest,Version> createVersionSettings()
Returns the object with the settings used for calls to createVersion.
deleteApiSettings()
public UnaryCallSettings<DeleteApiRequest,Empty> deleteApiSettings()
Returns the object with the settings used for calls to deleteApi.
deleteAttributeSettings()
public UnaryCallSettings<DeleteAttributeRequest,Empty> deleteAttributeSettings()
Returns the object with the settings used for calls to deleteAttribute.
deleteDeploymentSettings()
public UnaryCallSettings<DeleteDeploymentRequest,Empty> deleteDeploymentSettings()
Returns the object with the settings used for calls to deleteDeployment.
deleteExternalApiSettings()
public UnaryCallSettings<DeleteExternalApiRequest,Empty> deleteExternalApiSettings()
Returns the object with the settings used for calls to deleteExternalApi.
deleteSpecSettings()
public UnaryCallSettings<DeleteSpecRequest,Empty> deleteSpecSettings()
Returns the object with the settings used for calls to deleteSpec.
deleteVersionSettings()
public UnaryCallSettings<DeleteVersionRequest,Empty> deleteVersionSettings()
Returns the object with the settings used for calls to deleteVersion.
getApiOperationSettings()
public UnaryCallSettings<GetApiOperationRequest,ApiOperation> getApiOperationSettings()
Returns the object with the settings used for calls to getApi.
getApiSettings()
public UnaryCallSettings<GetApiRequest,Api> getApiSettings()
Returns the object with the settings used for calls to getApi.
getAttributeSettings()
public UnaryCallSettings<GetAttributeRequest,Attribute> getAttributeSettings()
Returns the object with the settings used for calls to getAttribute.
getDefinitionSettings()
public UnaryCallSettings<GetDefinitionRequest,Definition> getDefinitionSettings()
Returns the object with the settings used for calls to getDefinition.
getDeploymentSettings()
public UnaryCallSettings<GetDeploymentRequest,Deployment> getDeploymentSettings()
Returns the object with the settings used for calls to getDeployment.
getExternalApiSettings()
public UnaryCallSettings<GetExternalApiRequest,ExternalApi> getExternalApiSettings()
Returns the object with the settings used for calls to getExternalApi.
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 >
getServiceName()
public String getServiceName()
Returns the default service name.
Returns
Type
Description
String
Overrides
getSpecContentsSettings()
public UnaryCallSettings<GetSpecContentsRequest,SpecContents> getSpecContentsSettings()
Returns the object with the settings used for calls to getSpecContents.
getSpecSettings()
public UnaryCallSettings<GetSpecRequest,Spec> getSpecSettings()
Returns the object with the settings used for calls to getSpec.
getVersionSettings()
public UnaryCallSettings<GetVersionRequest,Version> getVersionSettings()
Returns the object with the settings used for calls to getVersion.
listApiOperationsSettings()
public PagedCallSettings<ListApiOperationsRequest,ListApiOperationsResponse,ApiHubClient.ListApiOperationsPagedResponse> listApiOperationsSettings()
Returns the object with the settings used for calls to listApiOperations.
listApisSettings()
public PagedCallSettings<ListApisRequest,ListApisResponse,ApiHubClient.ListApisPagedResponse> listApisSettings()
Returns the object with the settings used for calls to listApis.
listAttributesSettings()
public PagedCallSettings<ListAttributesRequest,ListAttributesResponse,ApiHubClient.ListAttributesPagedResponse> listAttributesSettings()
Returns the object with the settings used for calls to listAttributes.
listDeploymentsSettings()
public PagedCallSettings<ListDeploymentsRequest,ListDeploymentsResponse,ApiHubClient.ListDeploymentsPagedResponse> listDeploymentsSettings()
Returns the object with the settings used for calls to listDeployments.
listExternalApisSettings()
public PagedCallSettings<ListExternalApisRequest,ListExternalApisResponse,ApiHubClient.ListExternalApisPagedResponse> listExternalApisSettings()
Returns the object with the settings used for calls to listExternalApis.
listLocationsSettings()
public PagedCallSettings<ListLocationsRequest,ListLocationsResponse,ApiHubClient.ListLocationsPagedResponse> listLocationsSettings()
Returns the object with the settings used for calls to listLocations.
listSpecsSettings()
public PagedCallSettings<ListSpecsRequest,ListSpecsResponse,ApiHubClient.ListSpecsPagedResponse> listSpecsSettings()
Returns the object with the settings used for calls to listSpecs.
listVersionsSettings()
public PagedCallSettings<ListVersionsRequest,ListVersionsResponse,ApiHubClient.ListVersionsPagedResponse> listVersionsSettings()
Returns the object with the settings used for calls to listVersions.
searchResourcesSettings()
public PagedCallSettings<SearchResourcesRequest,SearchResourcesResponse,ApiHubClient.SearchResourcesPagedResponse> searchResourcesSettings()
Returns the object with the settings used for calls to searchResources.
toBuilder()
public ApiHubStubSettings.Builder toBuilder()
Returns a builder containing all the values of this settings class.
Overrides
updateApiSettings()
public UnaryCallSettings<UpdateApiRequest,Api> updateApiSettings()
Returns the object with the settings used for calls to updateApi.
updateAttributeSettings()
public UnaryCallSettings<UpdateAttributeRequest,Attribute> updateAttributeSettings()
Returns the object with the settings used for calls to updateAttribute.
updateDeploymentSettings()
public UnaryCallSettings<UpdateDeploymentRequest,Deployment> updateDeploymentSettings()
Returns the object with the settings used for calls to updateDeployment.
updateExternalApiSettings()
public UnaryCallSettings<UpdateExternalApiRequest,ExternalApi> updateExternalApiSettings()
Returns the object with the settings used for calls to updateExternalApi.
updateSpecSettings()
public UnaryCallSettings<UpdateSpecRequest,Spec> updateSpecSettings()
Returns the object with the settings used for calls to updateSpec.
updateVersionSettings()
public UnaryCallSettings<UpdateVersionRequest,Version> updateVersionSettings()
Returns the object with the settings used for calls to updateVersion.