public class PoliciesSettings extends ClientSettings<PoliciesSettings>
Settings class to configure an instance of PoliciesClient.
The default instance has everything set to sensible defaults:
- The default service address (iam.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 getPolicy to 30 seconds:
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
PoliciesSettings.Builder policiesSettingsBuilder = PoliciesSettings.newBuilder();
policiesSettingsBuilder
.getPolicySettings()
.setRetrySettings(
policiesSettingsBuilder
.getPolicySettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
PoliciesSettings policiesSettings = policiesSettingsBuilder.build();
Static Methods
create(PoliciesStubSettings stub)
public static final PoliciesSettings create(PoliciesStubSettings stub)
Name | Description |
stub | PoliciesStubSettings |
Type | Description |
PoliciesSettings |
Type | Description |
IOException |
defaultApiClientHeaderProviderBuilder()
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder()
Type | Description |
Builder |
defaultCredentialsProviderBuilder()
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder()
Returns a builder for the default credentials for this service.
Type | Description |
Builder |
defaultExecutorProviderBuilder()
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder()
Returns a builder for the default ExecutorProvider for this service.
Type | Description |
Builder |
defaultGrpcTransportProviderBuilder()
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()
Returns a builder for the default ChannelProvider for this service.
Type | Description |
Builder |
defaultTransportChannelProvider()
public static TransportChannelProvider defaultTransportChannelProvider()
Type | Description |
TransportChannelProvider |
getDefaultEndpoint()
public static String getDefaultEndpoint()
Returns the default service endpoint.
Type | Description |
String |
getDefaultServiceScopes()
public static List<String> getDefaultServiceScopes()
Returns the default service scopes.
Type | Description |
List<String> |
newBuilder()
public static PoliciesSettings.Builder newBuilder()
Returns a new builder for this class.
Type | Description |
PoliciesSettings.Builder |
newBuilder(ClientContext clientContext)
public static PoliciesSettings.Builder newBuilder(ClientContext clientContext)
Returns a new builder for this class.
Name | Description |
clientContext | ClientContext |
Type | Description |
PoliciesSettings.Builder |
Constructors
PoliciesSettings(PoliciesSettings.Builder settingsBuilder)
protected PoliciesSettings(PoliciesSettings.Builder settingsBuilder)
Name | Description |
settingsBuilder | PoliciesSettings.Builder |
Methods
createPolicyOperationSettings()
public OperationCallSettings<CreatePolicyRequest,Policy,PolicyOperationMetadata> createPolicyOperationSettings()
Returns the object with the settings used for calls to createPolicy.
Type | Description |
OperationCallSettings<CreatePolicyRequest,Policy,PolicyOperationMetadata> |
createPolicySettings()
public UnaryCallSettings<CreatePolicyRequest,Operation> createPolicySettings()
Returns the object with the settings used for calls to createPolicy.
Type | Description |
UnaryCallSettings<CreatePolicyRequest,Operation> |
deletePolicyOperationSettings()
public OperationCallSettings<DeletePolicyRequest,Policy,PolicyOperationMetadata> deletePolicyOperationSettings()
Returns the object with the settings used for calls to deletePolicy.
Type | Description |
OperationCallSettings<DeletePolicyRequest,Policy,PolicyOperationMetadata> |
deletePolicySettings()
public UnaryCallSettings<DeletePolicyRequest,Operation> deletePolicySettings()
Returns the object with the settings used for calls to deletePolicy.
Type | Description |
UnaryCallSettings<DeletePolicyRequest,Operation> |
getPolicySettings()
public UnaryCallSettings<GetPolicyRequest,Policy> getPolicySettings()
Returns the object with the settings used for calls to getPolicy.
Type | Description |
UnaryCallSettings<GetPolicyRequest,Policy> |
listPoliciesSettings()
public PagedCallSettings<ListPoliciesRequest,ListPoliciesResponse,PoliciesClient.ListPoliciesPagedResponse> listPoliciesSettings()
Returns the object with the settings used for calls to listPolicies.
Type | Description |
PagedCallSettings<ListPoliciesRequest,ListPoliciesResponse,ListPoliciesPagedResponse> |
toBuilder()
public PoliciesSettings.Builder toBuilder()
Returns a builder containing all the values of this settings class.
Type | Description |
PoliciesSettings.Builder |
updatePolicyOperationSettings()
public OperationCallSettings<UpdatePolicyRequest,Policy,PolicyOperationMetadata> updatePolicyOperationSettings()
Returns the object with the settings used for calls to updatePolicy.
Type | Description |
OperationCallSettings<UpdatePolicyRequest,Policy,PolicyOperationMetadata> |
updatePolicySettings()
public UnaryCallSettings<UpdatePolicyRequest,Operation> updatePolicySettings()
Returns the object with the settings used for calls to updatePolicy.
Type | Description |
UnaryCallSettings<UpdatePolicyRequest,Operation> |