Class NetworkServicesStubSettings (0.14.0)

public class NetworkServicesStubSettings extends StubSettings<NetworkServicesStubSettings>

Settings class to configure an instance of NetworkServicesStub.

The default instance has everything set to sensible defaults:

  • The default service address (networkservices.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 getEndpointPolicy:


 // 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
 NetworkServicesStubSettings.Builder networkServicesSettingsBuilder =
     NetworkServicesStubSettings.newBuilder();
 networkServicesSettingsBuilder
     .getEndpointPolicySettings()
     .setRetrySettings(
         networkServicesSettingsBuilder
             .getEndpointPolicySettings()
             .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());
 NetworkServicesStubSettings networkServicesSettings = networkServicesSettingsBuilder.build();
 

Please refer to the Client Side Retry Guide for additional support in setting retries.

To configure the RetrySettings of a Long Running Operation method, create an OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to configure the RetrySettings for createEndpointPolicy:


 // 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
 NetworkServicesStubSettings.Builder networkServicesSettingsBuilder =
     NetworkServicesStubSettings.newBuilder();
 TimedRetryAlgorithm timedRetryAlgorithm =
     OperationalTimedPollAlgorithm.create(
         RetrySettings.newBuilder()
             .setInitialRetryDelayDuration(Duration.ofMillis(500))
             .setRetryDelayMultiplier(1.5)
             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
             .setTotalTimeoutDuration(Duration.ofHours(24))
             .build());
 networkServicesSettingsBuilder
     .createClusterOperationSettings()
     .setPollingAlgorithm(timedRetryAlgorithm)
     .build();
 

Inheritance

java.lang.Object > StubSettings > NetworkServicesStubSettings

Static Methods

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

defaultGrpcApiClientHeaderProviderBuilder()

public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder()
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

defaultHttpJsonApiClientHeaderProviderBuilder()

public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder()
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

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.

Returns
Type Description
List<String>

newBuilder()

public static NetworkServicesStubSettings.Builder newBuilder()

Returns a new gRPC builder for this class.

Returns
Type Description
NetworkServicesStubSettings.Builder

newBuilder(ClientContext clientContext)

public static NetworkServicesStubSettings.Builder newBuilder(ClientContext clientContext)

Returns a new builder for this class.

Parameter
Name Description
clientContext ClientContext
Returns
Type Description
NetworkServicesStubSettings.Builder

newHttpJsonBuilder()

public static NetworkServicesStubSettings.Builder newHttpJsonBuilder()

Returns a new REST builder for this class.

Returns
Type Description
NetworkServicesStubSettings.Builder

Constructors

NetworkServicesStubSettings(NetworkServicesStubSettings.Builder settingsBuilder)

protected NetworkServicesStubSettings(NetworkServicesStubSettings.Builder settingsBuilder)
Parameter
Name Description
settingsBuilder NetworkServicesStubSettings.Builder

Methods

createEndpointPolicyOperationSettings()

public OperationCallSettings<CreateEndpointPolicyRequest,EndpointPolicy,OperationMetadata> createEndpointPolicyOperationSettings()

Returns the object with the settings used for calls to createEndpointPolicy.

createEndpointPolicySettings()

public UnaryCallSettings<CreateEndpointPolicyRequest,Operation> createEndpointPolicySettings()

Returns the object with the settings used for calls to createEndpointPolicy.

createGatewayOperationSettings()

public OperationCallSettings<CreateGatewayRequest,Gateway,OperationMetadata> createGatewayOperationSettings()

Returns the object with the settings used for calls to createGateway.

createGatewaySettings()

public UnaryCallSettings<CreateGatewayRequest,Operation> createGatewaySettings()

Returns the object with the settings used for calls to createGateway.

createGrpcRouteOperationSettings()

public OperationCallSettings<CreateGrpcRouteRequest,GrpcRoute,OperationMetadata> createGrpcRouteOperationSettings()

Returns the object with the settings used for calls to createGrpcRoute.

createGrpcRouteSettings()

public UnaryCallSettings<CreateGrpcRouteRequest,Operation> createGrpcRouteSettings()

Returns the object with the settings used for calls to createGrpcRoute.

createHttpRouteOperationSettings()

public OperationCallSettings<CreateHttpRouteRequest,HttpRoute,OperationMetadata> createHttpRouteOperationSettings()

Returns the object with the settings used for calls to createHttpRoute.

createHttpRouteSettings()

public UnaryCallSettings<CreateHttpRouteRequest,Operation> createHttpRouteSettings()

Returns the object with the settings used for calls to createHttpRoute.

createMeshOperationSettings()

public OperationCallSettings<CreateMeshRequest,Mesh,OperationMetadata> createMeshOperationSettings()

Returns the object with the settings used for calls to createMesh.

createMeshSettings()

public UnaryCallSettings<CreateMeshRequest,Operation> createMeshSettings()

Returns the object with the settings used for calls to createMesh.

Returns
Type Description
UnaryCallSettings<CreateMeshRequest,Operation>

createServiceBindingOperationSettings()

public OperationCallSettings<CreateServiceBindingRequest,ServiceBinding,OperationMetadata> createServiceBindingOperationSettings()

Returns the object with the settings used for calls to createServiceBinding.

createServiceBindingSettings()

public UnaryCallSettings<CreateServiceBindingRequest,Operation> createServiceBindingSettings()

Returns the object with the settings used for calls to createServiceBinding.

createStub()

public NetworkServicesStub createStub()
Returns
Type Description
NetworkServicesStub
Exceptions
Type Description
IOException

createTcpRouteOperationSettings()

public OperationCallSettings<CreateTcpRouteRequest,TcpRoute,OperationMetadata> createTcpRouteOperationSettings()

Returns the object with the settings used for calls to createTcpRoute.

createTcpRouteSettings()

public UnaryCallSettings<CreateTcpRouteRequest,Operation> createTcpRouteSettings()

Returns the object with the settings used for calls to createTcpRoute.

createTlsRouteOperationSettings()

public OperationCallSettings<CreateTlsRouteRequest,TlsRoute,OperationMetadata> createTlsRouteOperationSettings()

Returns the object with the settings used for calls to createTlsRoute.

createTlsRouteSettings()

public UnaryCallSettings<CreateTlsRouteRequest,Operation> createTlsRouteSettings()

Returns the object with the settings used for calls to createTlsRoute.

deleteEndpointPolicyOperationSettings()

public OperationCallSettings<DeleteEndpointPolicyRequest,Empty,OperationMetadata> deleteEndpointPolicyOperationSettings()

Returns the object with the settings used for calls to deleteEndpointPolicy.

deleteEndpointPolicySettings()

public UnaryCallSettings<DeleteEndpointPolicyRequest,Operation> deleteEndpointPolicySettings()

Returns the object with the settings used for calls to deleteEndpointPolicy.

deleteGatewayOperationSettings()

public OperationCallSettings<DeleteGatewayRequest,Empty,OperationMetadata> deleteGatewayOperationSettings()

Returns the object with the settings used for calls to deleteGateway.

deleteGatewaySettings()

public UnaryCallSettings<DeleteGatewayRequest,Operation> deleteGatewaySettings()

Returns the object with the settings used for calls to deleteGateway.

deleteGrpcRouteOperationSettings()

public OperationCallSettings<DeleteGrpcRouteRequest,Empty,OperationMetadata> deleteGrpcRouteOperationSettings()

Returns the object with the settings used for calls to deleteGrpcRoute.

deleteGrpcRouteSettings()

public UnaryCallSettings<DeleteGrpcRouteRequest,Operation> deleteGrpcRouteSettings()

Returns the object with the settings used for calls to deleteGrpcRoute.

deleteHttpRouteOperationSettings()

public OperationCallSettings<DeleteHttpRouteRequest,Empty,OperationMetadata> deleteHttpRouteOperationSettings()

Returns the object with the settings used for calls to deleteHttpRoute.

deleteHttpRouteSettings()

public UnaryCallSettings<DeleteHttpRouteRequest,Operation> deleteHttpRouteSettings()

Returns the object with the settings used for calls to deleteHttpRoute.

deleteMeshOperationSettings()

public OperationCallSettings<DeleteMeshRequest,Empty,OperationMetadata> deleteMeshOperationSettings()

Returns the object with the settings used for calls to deleteMesh.

deleteMeshSettings()

public UnaryCallSettings<DeleteMeshRequest,Operation> deleteMeshSettings()

Returns the object with the settings used for calls to deleteMesh.

Returns
Type Description
UnaryCallSettings<DeleteMeshRequest,Operation>

deleteServiceBindingOperationSettings()

public OperationCallSettings<DeleteServiceBindingRequest,Empty,OperationMetadata> deleteServiceBindingOperationSettings()

Returns the object with the settings used for calls to deleteServiceBinding.

deleteServiceBindingSettings()

public UnaryCallSettings<DeleteServiceBindingRequest,Operation> deleteServiceBindingSettings()

Returns the object with the settings used for calls to deleteServiceBinding.

deleteTcpRouteOperationSettings()

public OperationCallSettings<DeleteTcpRouteRequest,Empty,OperationMetadata> deleteTcpRouteOperationSettings()

Returns the object with the settings used for calls to deleteTcpRoute.

deleteTcpRouteSettings()

public UnaryCallSettings<DeleteTcpRouteRequest,Operation> deleteTcpRouteSettings()

Returns the object with the settings used for calls to deleteTcpRoute.

deleteTlsRouteOperationSettings()

public OperationCallSettings<DeleteTlsRouteRequest,Empty,OperationMetadata> deleteTlsRouteOperationSettings()

Returns the object with the settings used for calls to deleteTlsRoute.

deleteTlsRouteSettings()

public UnaryCallSettings<DeleteTlsRouteRequest,Operation> deleteTlsRouteSettings()

Returns the object with the settings used for calls to deleteTlsRoute.

getEndpointPolicySettings()

public UnaryCallSettings<GetEndpointPolicyRequest,EndpointPolicy> getEndpointPolicySettings()

Returns the object with the settings used for calls to getEndpointPolicy.

getGatewaySettings()

public UnaryCallSettings<GetGatewayRequest,Gateway> getGatewaySettings()

Returns the object with the settings used for calls to getGateway.

Returns
Type Description
UnaryCallSettings<GetGatewayRequest,Gateway>

getGrpcRouteSettings()

public UnaryCallSettings<GetGrpcRouteRequest,GrpcRoute> getGrpcRouteSettings()

Returns the object with the settings used for calls to getGrpcRoute.

Returns
Type Description
UnaryCallSettings<GetGrpcRouteRequest,GrpcRoute>

getHttpRouteSettings()

public UnaryCallSettings<GetHttpRouteRequest,HttpRoute> getHttpRouteSettings()

Returns the object with the settings used for calls to getHttpRoute.

Returns
Type Description
UnaryCallSettings<GetHttpRouteRequest,HttpRoute>

getIamPolicySettings()

public UnaryCallSettings<GetIamPolicyRequest,Policy> getIamPolicySettings()

Returns the object with the settings used for calls to getIamPolicy.

Returns
Type Description
UnaryCallSettings<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

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>

getMeshSettings()

public UnaryCallSettings<GetMeshRequest,Mesh> getMeshSettings()

Returns the object with the settings used for calls to getMesh.

Returns
Type Description
UnaryCallSettings<GetMeshRequest,Mesh>

getServiceBindingSettings()

public UnaryCallSettings<GetServiceBindingRequest,ServiceBinding> getServiceBindingSettings()

Returns the object with the settings used for calls to getServiceBinding.

getServiceName()

public String getServiceName()

Returns the default service name.

Returns
Type Description
String
Overrides

getTcpRouteSettings()

public UnaryCallSettings<GetTcpRouteRequest,TcpRoute> getTcpRouteSettings()

Returns the object with the settings used for calls to getTcpRoute.

Returns
Type Description
UnaryCallSettings<GetTcpRouteRequest,TcpRoute>

getTlsRouteSettings()

public UnaryCallSettings<GetTlsRouteRequest,TlsRoute> getTlsRouteSettings()

Returns the object with the settings used for calls to getTlsRoute.

Returns
Type Description
UnaryCallSettings<GetTlsRouteRequest,TlsRoute>

listEndpointPoliciesSettings()

public PagedCallSettings<ListEndpointPoliciesRequest,ListEndpointPoliciesResponse,NetworkServicesClient.ListEndpointPoliciesPagedResponse> listEndpointPoliciesSettings()

Returns the object with the settings used for calls to listEndpointPolicies.

listGatewaysSettings()

public PagedCallSettings<ListGatewaysRequest,ListGatewaysResponse,NetworkServicesClient.ListGatewaysPagedResponse> listGatewaysSettings()

Returns the object with the settings used for calls to listGateways.

listGrpcRoutesSettings()

public PagedCallSettings<ListGrpcRoutesRequest,ListGrpcRoutesResponse,NetworkServicesClient.ListGrpcRoutesPagedResponse> listGrpcRoutesSettings()

Returns the object with the settings used for calls to listGrpcRoutes.

listHttpRoutesSettings()

public PagedCallSettings<ListHttpRoutesRequest,ListHttpRoutesResponse,NetworkServicesClient.ListHttpRoutesPagedResponse> listHttpRoutesSettings()

Returns the object with the settings used for calls to listHttpRoutes.

listLocationsSettings()

public PagedCallSettings<ListLocationsRequest,ListLocationsResponse,NetworkServicesClient.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>

listMeshesSettings()

public PagedCallSettings<ListMeshesRequest,ListMeshesResponse,NetworkServicesClient.ListMeshesPagedResponse> listMeshesSettings()

Returns the object with the settings used for calls to listMeshes.

listServiceBindingsSettings()

public PagedCallSettings<ListServiceBindingsRequest,ListServiceBindingsResponse,NetworkServicesClient.ListServiceBindingsPagedResponse> listServiceBindingsSettings()

Returns the object with the settings used for calls to listServiceBindings.

listTcpRoutesSettings()

public PagedCallSettings<ListTcpRoutesRequest,ListTcpRoutesResponse,NetworkServicesClient.ListTcpRoutesPagedResponse> listTcpRoutesSettings()

Returns the object with the settings used for calls to listTcpRoutes.

listTlsRoutesSettings()

public PagedCallSettings<ListTlsRoutesRequest,ListTlsRoutesResponse,NetworkServicesClient.ListTlsRoutesPagedResponse> listTlsRoutesSettings()

Returns the object with the settings used for calls to listTlsRoutes.

setIamPolicySettings()

public UnaryCallSettings<SetIamPolicyRequest,Policy> setIamPolicySettings()

Returns the object with the settings used for calls to setIamPolicy.

Returns
Type Description
UnaryCallSettings<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

testIamPermissionsSettings()

public UnaryCallSettings<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsSettings()

Returns the object with the settings used for calls to testIamPermissions.

Returns
Type Description
UnaryCallSettings<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>

toBuilder()

public NetworkServicesStubSettings.Builder toBuilder()

Returns a builder containing all the values of this settings class.

Returns
Type Description
NetworkServicesStubSettings.Builder
Overrides

updateEndpointPolicyOperationSettings()

public OperationCallSettings<UpdateEndpointPolicyRequest,EndpointPolicy,OperationMetadata> updateEndpointPolicyOperationSettings()

Returns the object with the settings used for calls to updateEndpointPolicy.

updateEndpointPolicySettings()

public UnaryCallSettings<UpdateEndpointPolicyRequest,Operation> updateEndpointPolicySettings()

Returns the object with the settings used for calls to updateEndpointPolicy.

updateGatewayOperationSettings()

public OperationCallSettings<UpdateGatewayRequest,Gateway,OperationMetadata> updateGatewayOperationSettings()

Returns the object with the settings used for calls to updateGateway.

updateGatewaySettings()

public UnaryCallSettings<UpdateGatewayRequest,Operation> updateGatewaySettings()

Returns the object with the settings used for calls to updateGateway.

updateGrpcRouteOperationSettings()

public OperationCallSettings<UpdateGrpcRouteRequest,GrpcRoute,OperationMetadata> updateGrpcRouteOperationSettings()

Returns the object with the settings used for calls to updateGrpcRoute.

updateGrpcRouteSettings()

public UnaryCallSettings<UpdateGrpcRouteRequest,Operation> updateGrpcRouteSettings()

Returns the object with the settings used for calls to updateGrpcRoute.

updateHttpRouteOperationSettings()

public OperationCallSettings<UpdateHttpRouteRequest,HttpRoute,OperationMetadata> updateHttpRouteOperationSettings()

Returns the object with the settings used for calls to updateHttpRoute.

updateHttpRouteSettings()

public UnaryCallSettings<UpdateHttpRouteRequest,Operation> updateHttpRouteSettings()

Returns the object with the settings used for calls to updateHttpRoute.

updateMeshOperationSettings()

public OperationCallSettings<UpdateMeshRequest,Mesh,OperationMetadata> updateMeshOperationSettings()

Returns the object with the settings used for calls to updateMesh.

updateMeshSettings()

public UnaryCallSettings<UpdateMeshRequest,Operation> updateMeshSettings()

Returns the object with the settings used for calls to updateMesh.

Returns
Type Description
UnaryCallSettings<UpdateMeshRequest,Operation>

updateTcpRouteOperationSettings()

public OperationCallSettings<UpdateTcpRouteRequest,TcpRoute,OperationMetadata> updateTcpRouteOperationSettings()

Returns the object with the settings used for calls to updateTcpRoute.

updateTcpRouteSettings()

public UnaryCallSettings<UpdateTcpRouteRequest,Operation> updateTcpRouteSettings()

Returns the object with the settings used for calls to updateTcpRoute.

updateTlsRouteOperationSettings()

public OperationCallSettings<UpdateTlsRouteRequest,TlsRoute,OperationMetadata> updateTlsRouteOperationSettings()

Returns the object with the settings used for calls to updateTlsRoute.

updateTlsRouteSettings()

public UnaryCallSettings<UpdateTlsRouteRequest,Operation> updateTlsRouteSettings()

Returns the object with the settings used for calls to updateTlsRoute.