Class WebKeySettings.Builder (3.52.0)

public static final class WebKeySettings.Builder extends GeneratedMessageV3.Builder<WebKeySettings.Builder> implements WebKeySettingsOrBuilder

Settings specific to keys that can be used by websites.

Protobuf type google.cloud.recaptchaenterprise.v1.WebKeySettings

Static Methods

getDescriptor()

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

Methods

addAllAllowedDomains(Iterable<String> values)

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

Optional. Domains or subdomains of websites allowed to use the key. 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'

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

Parameter
Name Description
values Iterable<String>

The allowedDomains to add.

Returns
Type Description
WebKeySettings.Builder

This builder for chaining.

addAllowedDomains(String value)

public WebKeySettings.Builder addAllowedDomains(String value)

Optional. Domains or subdomains of websites allowed to use the key. 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'

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

Parameter
Name Description
value String

The allowedDomains to add.

Returns
Type Description
WebKeySettings.Builder

This builder for chaining.

addAllowedDomainsBytes(ByteString value)

public WebKeySettings.Builder addAllowedDomainsBytes(ByteString value)

Optional. Domains or subdomains of websites allowed to use the key. 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'

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
WebKeySettings.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public WebKeySettings.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
WebKeySettings.Builder
Overrides

build()

public WebKeySettings build()
Returns
Type Description
WebKeySettings

buildPartial()

public WebKeySettings buildPartial()
Returns
Type Description
WebKeySettings

clear()

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

clearAllowAllDomains()

public WebKeySettings.Builder clearAllowAllDomains()

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

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

Returns
Type Description
WebKeySettings.Builder

This builder for chaining.

clearAllowAmpTraffic()

public WebKeySettings.Builder clearAllowAmpTraffic()

Optional. If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type.

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

Returns
Type Description
WebKeySettings.Builder

This builder for chaining.

clearAllowedDomains()

public WebKeySettings.Builder clearAllowedDomains()

Optional. Domains or subdomains of websites allowed to use the key. 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'

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

Returns
Type Description
WebKeySettings.Builder

This builder for chaining.

clearChallengeSecurityPreference()

public WebKeySettings.Builder clearChallengeSecurityPreference()

Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE and SCORE_AND_CHALLENGE.

.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
WebKeySettings.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public WebKeySettings.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
WebKeySettings.Builder
Overrides

clearIntegrationType()

public WebKeySettings.Builder clearIntegrationType()

Required. Describes how this key is integrated with the website.

.google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
WebKeySettings.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public WebKeySettings.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
WebKeySettings.Builder
Overrides

clone()

public WebKeySettings.Builder clone()
Returns
Type Description
WebKeySettings.Builder
Overrides

getAllowAllDomains()

public boolean getAllowAllDomains()

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

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

Returns
Type Description
boolean

The allowAllDomains.

getAllowAmpTraffic()

public boolean getAllowAmpTraffic()

Optional. If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type.

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

Returns
Type Description
boolean

The allowAmpTraffic.

getAllowedDomains(int index)

public String getAllowedDomains(int index)

Optional. Domains or subdomains of websites allowed to use the key. 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'

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 key. 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'

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 key. 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'

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 key. 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'

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

Returns
Type Description
ProtocolStringList

A list containing the allowedDomains.

getChallengeSecurityPreference()

public WebKeySettings.ChallengeSecurityPreference getChallengeSecurityPreference()

Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE and SCORE_AND_CHALLENGE.

.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
WebKeySettings.ChallengeSecurityPreference

The challengeSecurityPreference.

getChallengeSecurityPreferenceValue()

public int getChallengeSecurityPreferenceValue()

Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE and SCORE_AND_CHALLENGE.

.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for challengeSecurityPreference.

getDefaultInstanceForType()

public WebKeySettings getDefaultInstanceForType()
Returns
Type Description
WebKeySettings

getDescriptorForType()

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

getIntegrationType()

public WebKeySettings.IntegrationType getIntegrationType()

Required. Describes how this key is integrated with the website.

.google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
WebKeySettings.IntegrationType

The integrationType.

getIntegrationTypeValue()

public int getIntegrationTypeValue()

Required. Describes how this key is integrated with the website.

.google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for integrationType.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(WebKeySettings other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final WebKeySettings.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
WebKeySettings.Builder
Overrides

setAllowAllDomains(boolean value)

public WebKeySettings.Builder setAllowAllDomains(boolean value)

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

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

Parameter
Name Description
value boolean

The allowAllDomains to set.

Returns
Type Description
WebKeySettings.Builder

This builder for chaining.

setAllowAmpTraffic(boolean value)

public WebKeySettings.Builder setAllowAmpTraffic(boolean value)

Optional. If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type.

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

Parameter
Name Description
value boolean

The allowAmpTraffic to set.

Returns
Type Description
WebKeySettings.Builder

This builder for chaining.

setAllowedDomains(int index, String value)

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

Optional. Domains or subdomains of websites allowed to use the key. 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'

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
WebKeySettings.Builder

This builder for chaining.

setChallengeSecurityPreference(WebKeySettings.ChallengeSecurityPreference value)

public WebKeySettings.Builder setChallengeSecurityPreference(WebKeySettings.ChallengeSecurityPreference value)

Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE and SCORE_AND_CHALLENGE.

.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value WebKeySettings.ChallengeSecurityPreference

The challengeSecurityPreference to set.

Returns
Type Description
WebKeySettings.Builder

This builder for chaining.

setChallengeSecurityPreferenceValue(int value)

public WebKeySettings.Builder setChallengeSecurityPreferenceValue(int value)

Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE and SCORE_AND_CHALLENGE.

.google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for challengeSecurityPreference to set.

Returns
Type Description
WebKeySettings.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public WebKeySettings.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
WebKeySettings.Builder
Overrides

setIntegrationType(WebKeySettings.IntegrationType value)

public WebKeySettings.Builder setIntegrationType(WebKeySettings.IntegrationType value)

Required. Describes how this key is integrated with the website.

.google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value WebKeySettings.IntegrationType

The integrationType to set.

Returns
Type Description
WebKeySettings.Builder

This builder for chaining.

setIntegrationTypeValue(int value)

public WebKeySettings.Builder setIntegrationTypeValue(int value)

Required. Describes how this key is integrated with the website.

.google.cloud.recaptchaenterprise.v1.WebKeySettings.IntegrationType integration_type = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for integrationType to set.

Returns
Type Description
WebKeySettings.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public WebKeySettings.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
WebKeySettings.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final WebKeySettings.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
WebKeySettings.Builder
Overrides