Class WebKeySettings.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<WebKeySettings.Builder>
com.google.recaptchaenterprise.v1.WebKeySettings.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, WebKeySettingsOrBuilder, Cloneable
Enclosing class:
WebKeySettings

public static final class WebKeySettings.Builder extends com.google.protobuf.GeneratedMessage.Builder<WebKeySettings.Builder> implements WebKeySettingsOrBuilder
 Settings specific to keys that can be used by websites.
 
Protobuf type google.cloud.recaptchaenterprise.v1.WebKeySettings
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<WebKeySettings.Builder>
    • clear

      public WebKeySettings.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<WebKeySettings.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<WebKeySettings.Builder>
    • getDefaultInstanceForType

      public WebKeySettings getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public WebKeySettings build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public WebKeySettings buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public WebKeySettings.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<WebKeySettings.Builder>
    • mergeFrom

      public WebKeySettings.Builder mergeFrom(WebKeySettings other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<WebKeySettings.Builder>
    • mergeFrom

      public WebKeySettings.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<WebKeySettings.Builder>
      Throws:
      IOException
    • 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];
      Specified by:
      getAllowAllDomains in interface WebKeySettingsOrBuilder
      Returns:
      The allowAllDomains.
    • setAllowAllDomains

      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];
      Parameters:
      value - The allowAllDomains to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • getAllowedDomainsList

      public com.google.protobuf.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'
       Each key supports a maximum of 250 domains. To use a key 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];
      Specified by:
      getAllowedDomainsList in interface WebKeySettingsOrBuilder
      Returns:
      A list containing the allowedDomains.
    • 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'
       Each key supports a maximum of 250 domains. To use a key 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];
      Specified by:
      getAllowedDomainsCount in interface WebKeySettingsOrBuilder
      Returns:
      The count of allowedDomains.
    • getAllowedDomains

      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'
       Each key supports a maximum of 250 domains. To use a key 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];
      Specified by:
      getAllowedDomains in interface WebKeySettingsOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The allowedDomains at the given index.
    • getAllowedDomainsBytes

      public com.google.protobuf.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'
       Each key supports a maximum of 250 domains. To use a key 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];
      Specified by:
      getAllowedDomainsBytes in interface WebKeySettingsOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the allowedDomains at the given index.
    • setAllowedDomains

      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'
       Each key supports a maximum of 250 domains. To use a key 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:
      index - The index to set the value at.
      value - The allowedDomains to set.
      Returns:
      This builder for chaining.
    • addAllowedDomains

      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'
       Each key supports a maximum of 250 domains. To use a key 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:
      value - The allowedDomains to add.
      Returns:
      This builder for chaining.
    • addAllAllowedDomains

      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'
       Each key supports a maximum of 250 domains. To use a key 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:
      values - The allowedDomains to add.
      Returns:
      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'
       Each key supports a maximum of 250 domains. To use a key 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:
      This builder for chaining.
    • addAllowedDomainsBytes

      public WebKeySettings.Builder addAllowedDomainsBytes(com.google.protobuf.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'
       Each key supports a maximum of 250 domains. To use a key 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:
      value - The bytes of the allowedDomains to add.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getAllowAmpTraffic in interface WebKeySettingsOrBuilder
      Returns:
      The allowAmpTraffic.
    • setAllowAmpTraffic

      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];
      Parameters:
      value - The allowAmpTraffic to set.
      Returns:
      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:
      This builder for chaining.
    • 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];
      Specified by:
      getIntegrationTypeValue in interface WebKeySettingsOrBuilder
      Returns:
      The enum numeric value on the wire for integrationType.
    • setIntegrationTypeValue

      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];
      Parameters:
      value - The enum numeric value on the wire for integrationType to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getIntegrationType in interface WebKeySettingsOrBuilder
      Returns:
      The integrationType.
    • setIntegrationType

      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];
      Parameters:
      value - The integrationType to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • getChallengeSecurityPreferenceValue

      public int getChallengeSecurityPreferenceValue()
       Optional. Settings for the frequency and difficulty at which this key
       triggers captcha challenges. This should only be specified for
       `IntegrationType` CHECKBOX, INVISIBLE or POLICY_BASED_CHALLENGE.
       
      .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getChallengeSecurityPreferenceValue in interface WebKeySettingsOrBuilder
      Returns:
      The enum numeric value on the wire for challengeSecurityPreference.
    • setChallengeSecurityPreferenceValue

      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
       `IntegrationType` CHECKBOX, INVISIBLE or POLICY_BASED_CHALLENGE.
       
      .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for challengeSecurityPreference to set.
      Returns:
      This builder for chaining.
    • 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
       `IntegrationType` CHECKBOX, INVISIBLE or POLICY_BASED_CHALLENGE.
       
      .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getChallengeSecurityPreference in interface WebKeySettingsOrBuilder
      Returns:
      The challengeSecurityPreference.
    • setChallengeSecurityPreference

      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
       `IntegrationType` CHECKBOX, INVISIBLE or POLICY_BASED_CHALLENGE.
       
      .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The challengeSecurityPreference to set.
      Returns:
      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
       `IntegrationType` CHECKBOX, INVISIBLE or POLICY_BASED_CHALLENGE.
       
      .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSecurityPreference challenge_security_preference = 5 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • hasChallengeSettings

      public boolean hasChallengeSettings()
       Optional. Challenge settings.
       
      .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings challenge_settings = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasChallengeSettings in interface WebKeySettingsOrBuilder
      Returns:
      Whether the challengeSettings field is set.
    • getChallengeSettings

      public WebKeySettings.ChallengeSettings getChallengeSettings()
       Optional. Challenge settings.
       
      .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings challenge_settings = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getChallengeSettings in interface WebKeySettingsOrBuilder
      Returns:
      The challengeSettings.
    • setChallengeSettings

      public WebKeySettings.Builder setChallengeSettings(WebKeySettings.ChallengeSettings value)
       Optional. Challenge settings.
       
      .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings challenge_settings = 6 [(.google.api.field_behavior) = OPTIONAL];
    • setChallengeSettings

      public WebKeySettings.Builder setChallengeSettings(WebKeySettings.ChallengeSettings.Builder builderForValue)
       Optional. Challenge settings.
       
      .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings challenge_settings = 6 [(.google.api.field_behavior) = OPTIONAL];
    • mergeChallengeSettings

      public WebKeySettings.Builder mergeChallengeSettings(WebKeySettings.ChallengeSettings value)
       Optional. Challenge settings.
       
      .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings challenge_settings = 6 [(.google.api.field_behavior) = OPTIONAL];
    • clearChallengeSettings

      public WebKeySettings.Builder clearChallengeSettings()
       Optional. Challenge settings.
       
      .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings challenge_settings = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getChallengeSettingsBuilder

      public WebKeySettings.ChallengeSettings.Builder getChallengeSettingsBuilder()
       Optional. Challenge settings.
       
      .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings challenge_settings = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getChallengeSettingsOrBuilder

      public WebKeySettings.ChallengeSettingsOrBuilder getChallengeSettingsOrBuilder()
       Optional. Challenge settings.
       
      .google.cloud.recaptchaenterprise.v1.WebKeySettings.ChallengeSettings challenge_settings = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getChallengeSettingsOrBuilder in interface WebKeySettingsOrBuilder