Class ClientSettings.Builder (3.96.0)

public static final class ClientSettings.Builder extends GeneratedMessage.Builder<ClientSettings.Builder> implements ClientSettingsOrBuilder

Configuration for clients to protect with reCAPTCHA.

Protobuf type google.cloud.recaptchaenterprise.v1.ClientSettings

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllAllowedDomains(Iterable<String> values)

public ClientSettings.Builder addAllAllowedDomains(Iterable<String> values)

Optional. Domains or subdomains of websites allowed to use the policy. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com' Each policy supports a maximum of 250 domains. To use a policy on more domains, set allow_all_domains to true. When this is set, you are responsible for validating the hostname by checking the token_properties.hostname field in each assessment response against your list of allowed domains.

repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The allowedDomains to add.

Returns
Type Description
ClientSettings.Builder

This builder for chaining.

addAllowedDomains(String value)

public ClientSettings.Builder addAllowedDomains(String value)

Optional. Domains or subdomains of websites allowed to use the policy. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com' Each policy supports a maximum of 250 domains. To use a policy on more domains, set allow_all_domains to true. When this is set, you are responsible for validating the hostname by checking the token_properties.hostname field in each assessment response against your list of allowed domains.

repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The allowedDomains to add.

Returns
Type Description
ClientSettings.Builder

This builder for chaining.

addAllowedDomainsBytes(ByteString value)

public ClientSettings.Builder addAllowedDomainsBytes(ByteString value)

Optional. Domains or subdomains of websites allowed to use the policy. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com' Each policy supports a maximum of 250 domains. To use a policy on more domains, set allow_all_domains to true. When this is set, you are responsible for validating the hostname by checking the token_properties.hostname field in each assessment response against your list of allowed domains.

repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the allowedDomains to add.

Returns
Type Description
ClientSettings.Builder

This builder for chaining.

build()

public ClientSettings build()
Returns
Type Description
ClientSettings

buildPartial()

public ClientSettings buildPartial()
Returns
Type Description
ClientSettings

clear()

public ClientSettings.Builder clear()
Returns
Type Description
ClientSettings.Builder
Overrides

clearAllowAllDomains()

public ClientSettings.Builder clearAllowAllDomains()

Optional. If set to true, it means allowed_domains are not enforced.

bool allow_all_domains = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ClientSettings.Builder

This builder for chaining.

clearAllowedDomains()

public ClientSettings.Builder clearAllowedDomains()

Optional. Domains or subdomains of websites allowed to use the policy. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com' Each policy supports a maximum of 250 domains. To use a policy on more domains, set allow_all_domains to true. When this is set, you are responsible for validating the hostname by checking the token_properties.hostname field in each assessment response against your list of allowed domains.

repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ClientSettings.Builder

This builder for chaining.

clearProtectedEndpointGroup()

public ClientSettings.Builder clearProtectedEndpointGroup()

Optional. Configuration for all API endpoints to protect with reCAPTCHA. If this field is not set, reCAPTCHA will not automatically request tokens on any API endpoints.

.google.cloud.recaptchaenterprise.v1.ProtectedEndpointGroup protected_endpoint_group = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ClientSettings.Builder

getAllowAllDomains()

public boolean getAllowAllDomains()

Optional. If set to true, it means allowed_domains are not enforced.

bool allow_all_domains = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The allowAllDomains.

getAllowedDomains(int index)

public String getAllowedDomains(int index)

Optional. Domains or subdomains of websites allowed to use the policy. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com' Each policy supports a maximum of 250 domains. To use a policy on more domains, set allow_all_domains to true. When this is set, you are responsible for validating the hostname by checking the token_properties.hostname field in each assessment response against your list of allowed domains.

repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The allowedDomains at the given index.

getAllowedDomainsBytes(int index)

public ByteString getAllowedDomainsBytes(int index)

Optional. Domains or subdomains of websites allowed to use the policy. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com' Each policy supports a maximum of 250 domains. To use a policy on more domains, set allow_all_domains to true. When this is set, you are responsible for validating the hostname by checking the token_properties.hostname field in each assessment response against your list of allowed domains.

repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the allowedDomains at the given index.

getAllowedDomainsCount()

public int getAllowedDomainsCount()

Optional. Domains or subdomains of websites allowed to use the policy. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com' Each policy supports a maximum of 250 domains. To use a policy on more domains, set allow_all_domains to true. When this is set, you are responsible for validating the hostname by checking the token_properties.hostname field in each assessment response against your list of allowed domains.

repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of allowedDomains.

getAllowedDomainsList()

public ProtocolStringList getAllowedDomainsList()

Optional. Domains or subdomains of websites allowed to use the policy. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com' Each policy supports a maximum of 250 domains. To use a policy on more domains, set allow_all_domains to true. When this is set, you are responsible for validating the hostname by checking the token_properties.hostname field in each assessment response against your list of allowed domains.

repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the allowedDomains.

getDefaultInstanceForType()

public ClientSettings getDefaultInstanceForType()
Returns
Type Description
ClientSettings

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getProtectedEndpointGroup()

public ProtectedEndpointGroup getProtectedEndpointGroup()

Optional. Configuration for all API endpoints to protect with reCAPTCHA. If this field is not set, reCAPTCHA will not automatically request tokens on any API endpoints.

.google.cloud.recaptchaenterprise.v1.ProtectedEndpointGroup protected_endpoint_group = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtectedEndpointGroup

The protectedEndpointGroup.

getProtectedEndpointGroupBuilder()

public ProtectedEndpointGroup.Builder getProtectedEndpointGroupBuilder()

Optional. Configuration for all API endpoints to protect with reCAPTCHA. If this field is not set, reCAPTCHA will not automatically request tokens on any API endpoints.

.google.cloud.recaptchaenterprise.v1.ProtectedEndpointGroup protected_endpoint_group = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtectedEndpointGroup.Builder

getProtectedEndpointGroupOrBuilder()

public ProtectedEndpointGroupOrBuilder getProtectedEndpointGroupOrBuilder()

Optional. Configuration for all API endpoints to protect with reCAPTCHA. If this field is not set, reCAPTCHA will not automatically request tokens on any API endpoints.

.google.cloud.recaptchaenterprise.v1.ProtectedEndpointGroup protected_endpoint_group = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtectedEndpointGroupOrBuilder

hasProtectedEndpointGroup()

public boolean hasProtectedEndpointGroup()

Optional. Configuration for all API endpoints to protect with reCAPTCHA. If this field is not set, reCAPTCHA will not automatically request tokens on any API endpoints.

.google.cloud.recaptchaenterprise.v1.ProtectedEndpointGroup protected_endpoint_group = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the protectedEndpointGroup field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ClientSettings.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ClientSettings.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ClientSettings.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ClientSettings.Builder
Overrides

mergeFrom(ClientSettings other)

public ClientSettings.Builder mergeFrom(ClientSettings other)
Parameter
Name Description
other ClientSettings
Returns
Type Description
ClientSettings.Builder

mergeProtectedEndpointGroup(ProtectedEndpointGroup value)

public ClientSettings.Builder mergeProtectedEndpointGroup(ProtectedEndpointGroup value)

Optional. Configuration for all API endpoints to protect with reCAPTCHA. If this field is not set, reCAPTCHA will not automatically request tokens on any API endpoints.

.google.cloud.recaptchaenterprise.v1.ProtectedEndpointGroup protected_endpoint_group = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ProtectedEndpointGroup
Returns
Type Description
ClientSettings.Builder

setAllowAllDomains(boolean value)

public ClientSettings.Builder setAllowAllDomains(boolean value)

Optional. If set to true, it means allowed_domains are not enforced.

bool allow_all_domains = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The allowAllDomains to set.

Returns
Type Description
ClientSettings.Builder

This builder for chaining.

setAllowedDomains(int index, String value)

public ClientSettings.Builder setAllowedDomains(int index, String value)

Optional. Domains or subdomains of websites allowed to use the policy. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com' Each policy supports a maximum of 250 domains. To use a policy on more domains, set allow_all_domains to true. When this is set, you are responsible for validating the hostname by checking the token_properties.hostname field in each assessment response against your list of allowed domains.

repeated string allowed_domains = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The allowedDomains to set.

Returns
Type Description
ClientSettings.Builder

This builder for chaining.

setProtectedEndpointGroup(ProtectedEndpointGroup value)

public ClientSettings.Builder setProtectedEndpointGroup(ProtectedEndpointGroup value)

Optional. Configuration for all API endpoints to protect with reCAPTCHA. If this field is not set, reCAPTCHA will not automatically request tokens on any API endpoints.

.google.cloud.recaptchaenterprise.v1.ProtectedEndpointGroup protected_endpoint_group = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ProtectedEndpointGroup
Returns
Type Description
ClientSettings.Builder

setProtectedEndpointGroup(ProtectedEndpointGroup.Builder builderForValue)

public ClientSettings.Builder setProtectedEndpointGroup(ProtectedEndpointGroup.Builder builderForValue)

Optional. Configuration for all API endpoints to protect with reCAPTCHA. If this field is not set, reCAPTCHA will not automatically request tokens on any API endpoints.

.google.cloud.recaptchaenterprise.v1.ProtectedEndpointGroup protected_endpoint_group = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue ProtectedEndpointGroup.Builder
Returns
Type Description
ClientSettings.Builder