Class Key.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, KeyOrBuilder, Cloneable
    Enclosing class:
    Key

    public static final class Key.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Key.Builder>
    implements KeyOrBuilder
     A key used to identify and configure applications (web and/or mobile) that
     use reCAPTCHA Enterprise.
     
    Protobuf type google.cloud.recaptchaenterprise.v1.Key
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Key.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Key.Builder>
      • internalGetFieldAccessorTable

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

        public Key.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.GeneratedMessageV3.Builder<Key.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.GeneratedMessageV3.Builder<Key.Builder>
      • getDefaultInstanceForType

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

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

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

        public Key.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Key.Builder>
      • setField

        public Key.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                    Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Key.Builder>
      • clearField

        public Key.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Key.Builder>
      • clearOneof

        public Key.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Key.Builder>
      • setRepeatedField

        public Key.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                            int index,
                                            Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Key.Builder>
      • addRepeatedField

        public Key.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                            Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Key.Builder>
      • mergeFrom

        public Key.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<Key.Builder>
      • isInitialized

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

        public Key.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<Key.Builder>
        Throws:
        IOException
      • clearPlatformSettings

        public Key.Builder clearPlatformSettings()
      • getName

        public String getName()
         The resource name for the Key in the format
         "projects/{project}/keys/{key}".
         
        string name = 1;
        Specified by:
        getName in interface KeyOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The resource name for the Key in the format
         "projects/{project}/keys/{key}".
         
        string name = 1;
        Specified by:
        getNameBytes in interface KeyOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Key.Builder setName​(String value)
         The resource name for the Key in the format
         "projects/{project}/keys/{key}".
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Key.Builder clearName()
         The resource name for the Key in the format
         "projects/{project}/keys/{key}".
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Key.Builder setNameBytes​(com.google.protobuf.ByteString value)
         The resource name for the Key in the format
         "projects/{project}/keys/{key}".
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getDisplayName

        public String getDisplayName()
         Human-readable display name of this key. Modifiable by user.
         
        string display_name = 2;
        Specified by:
        getDisplayName in interface KeyOrBuilder
        Returns:
        The displayName.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         Human-readable display name of this key. Modifiable by user.
         
        string display_name = 2;
        Specified by:
        getDisplayNameBytes in interface KeyOrBuilder
        Returns:
        The bytes for displayName.
      • setDisplayName

        public Key.Builder setDisplayName​(String value)
         Human-readable display name of this key. Modifiable by user.
         
        string display_name = 2;
        Parameters:
        value - The displayName to set.
        Returns:
        This builder for chaining.
      • clearDisplayName

        public Key.Builder clearDisplayName()
         Human-readable display name of this key. Modifiable by user.
         
        string display_name = 2;
        Returns:
        This builder for chaining.
      • setDisplayNameBytes

        public Key.Builder setDisplayNameBytes​(com.google.protobuf.ByteString value)
         Human-readable display name of this key. Modifiable by user.
         
        string display_name = 2;
        Parameters:
        value - The bytes for displayName to set.
        Returns:
        This builder for chaining.
      • hasWebSettings

        public boolean hasWebSettings()
         Settings for keys that can be used by websites.
         
        .google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;
        Specified by:
        hasWebSettings in interface KeyOrBuilder
        Returns:
        Whether the webSettings field is set.
      • getWebSettings

        public WebKeySettings getWebSettings()
         Settings for keys that can be used by websites.
         
        .google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;
        Specified by:
        getWebSettings in interface KeyOrBuilder
        Returns:
        The webSettings.
      • setWebSettings

        public Key.Builder setWebSettings​(WebKeySettings value)
         Settings for keys that can be used by websites.
         
        .google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;
      • setWebSettings

        public Key.Builder setWebSettings​(WebKeySettings.Builder builderForValue)
         Settings for keys that can be used by websites.
         
        .google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;
      • mergeWebSettings

        public Key.Builder mergeWebSettings​(WebKeySettings value)
         Settings for keys that can be used by websites.
         
        .google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;
      • clearWebSettings

        public Key.Builder clearWebSettings()
         Settings for keys that can be used by websites.
         
        .google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;
      • getWebSettingsBuilder

        public WebKeySettings.Builder getWebSettingsBuilder()
         Settings for keys that can be used by websites.
         
        .google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;
      • hasAndroidSettings

        public boolean hasAndroidSettings()
         Settings for keys that can be used by Android apps.
         
        .google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;
        Specified by:
        hasAndroidSettings in interface KeyOrBuilder
        Returns:
        Whether the androidSettings field is set.
      • getAndroidSettings

        public AndroidKeySettings getAndroidSettings()
         Settings for keys that can be used by Android apps.
         
        .google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;
        Specified by:
        getAndroidSettings in interface KeyOrBuilder
        Returns:
        The androidSettings.
      • setAndroidSettings

        public Key.Builder setAndroidSettings​(AndroidKeySettings value)
         Settings for keys that can be used by Android apps.
         
        .google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;
      • setAndroidSettings

        public Key.Builder setAndroidSettings​(AndroidKeySettings.Builder builderForValue)
         Settings for keys that can be used by Android apps.
         
        .google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;
      • mergeAndroidSettings

        public Key.Builder mergeAndroidSettings​(AndroidKeySettings value)
         Settings for keys that can be used by Android apps.
         
        .google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;
      • clearAndroidSettings

        public Key.Builder clearAndroidSettings()
         Settings for keys that can be used by Android apps.
         
        .google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;
      • getAndroidSettingsBuilder

        public AndroidKeySettings.Builder getAndroidSettingsBuilder()
         Settings for keys that can be used by Android apps.
         
        .google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;
      • hasIosSettings

        public boolean hasIosSettings()
         Settings for keys that can be used by iOS apps.
         
        .google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;
        Specified by:
        hasIosSettings in interface KeyOrBuilder
        Returns:
        Whether the iosSettings field is set.
      • getIosSettings

        public IOSKeySettings getIosSettings()
         Settings for keys that can be used by iOS apps.
         
        .google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;
        Specified by:
        getIosSettings in interface KeyOrBuilder
        Returns:
        The iosSettings.
      • setIosSettings

        public Key.Builder setIosSettings​(IOSKeySettings value)
         Settings for keys that can be used by iOS apps.
         
        .google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;
      • setIosSettings

        public Key.Builder setIosSettings​(IOSKeySettings.Builder builderForValue)
         Settings for keys that can be used by iOS apps.
         
        .google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;
      • mergeIosSettings

        public Key.Builder mergeIosSettings​(IOSKeySettings value)
         Settings for keys that can be used by iOS apps.
         
        .google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;
      • clearIosSettings

        public Key.Builder clearIosSettings()
         Settings for keys that can be used by iOS apps.
         
        .google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;
      • getIosSettingsBuilder

        public IOSKeySettings.Builder getIosSettingsBuilder()
         Settings for keys that can be used by iOS apps.
         
        .google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: KeyOrBuilder
         See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
         Creating and managing labels</a>.
         
        map<string, string> labels = 6;
        Specified by:
        getLabelsCount in interface KeyOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
         Creating and managing labels</a>.
         
        map<string, string> labels = 6;
        Specified by:
        containsLabels in interface KeyOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
         Creating and managing labels</a>.
         
        map<string, string> labels = 6;
        Specified by:
        getLabelsMap in interface KeyOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
         Creating and managing labels</a>.
         
        map<string, string> labels = 6;
        Specified by:
        getLabelsOrDefault in interface KeyOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
         Creating and managing labels</a>.
         
        map<string, string> labels = 6;
        Specified by:
        getLabelsOrThrow in interface KeyOrBuilder
      • removeLabels

        public Key.Builder removeLabels​(String key)
         See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
         Creating and managing labels</a>.
         
        map<string, string> labels = 6;
      • getMutableLabels

        @Deprecated
        public Map<String,​String> getMutableLabels()
        Deprecated.
        Use alternate mutation accessors instead.
      • putLabels

        public Key.Builder putLabels​(String key,
                                     String value)
         See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
         Creating and managing labels</a>.
         
        map<string, string> labels = 6;
      • putAllLabels

        public Key.Builder putAllLabels​(Map<String,​String> values)
         See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">
         Creating and managing labels</a>.
         
        map<string, string> labels = 6;
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. The timestamp corresponding to the creation of this Key.
         
        .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCreateTime in interface KeyOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. The timestamp corresponding to the creation of this Key.
         
        .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface KeyOrBuilder
        Returns:
        The createTime.
      • setCreateTime

        public Key.Builder setCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The timestamp corresponding to the creation of this Key.
         
        .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • setCreateTime

        public Key.Builder setCreateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         Output only. The timestamp corresponding to the creation of this Key.
         
        .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • mergeCreateTime

        public Key.Builder mergeCreateTime​(com.google.protobuf.Timestamp value)
         Output only. The timestamp corresponding to the creation of this Key.
         
        .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • clearCreateTime

        public Key.Builder clearCreateTime()
         Output only. The timestamp corresponding to the creation of this Key.
         
        .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
         Output only. The timestamp corresponding to the creation of this Key.
         
        .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. The timestamp corresponding to the creation of this Key.
         
        .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface KeyOrBuilder
      • hasTestingOptions

        public boolean hasTestingOptions()
         Options for user acceptance testing.
         
        .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;
        Specified by:
        hasTestingOptions in interface KeyOrBuilder
        Returns:
        Whether the testingOptions field is set.
      • getTestingOptions

        public TestingOptions getTestingOptions()
         Options for user acceptance testing.
         
        .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;
        Specified by:
        getTestingOptions in interface KeyOrBuilder
        Returns:
        The testingOptions.
      • setTestingOptions

        public Key.Builder setTestingOptions​(TestingOptions value)
         Options for user acceptance testing.
         
        .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;
      • setTestingOptions

        public Key.Builder setTestingOptions​(TestingOptions.Builder builderForValue)
         Options for user acceptance testing.
         
        .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;
      • mergeTestingOptions

        public Key.Builder mergeTestingOptions​(TestingOptions value)
         Options for user acceptance testing.
         
        .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;
      • clearTestingOptions

        public Key.Builder clearTestingOptions()
         Options for user acceptance testing.
         
        .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;
      • getTestingOptionsBuilder

        public TestingOptions.Builder getTestingOptionsBuilder()
         Options for user acceptance testing.
         
        .google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;
      • hasWafSettings

        public boolean hasWafSettings()
         Settings for WAF
         
        .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;
        Specified by:
        hasWafSettings in interface KeyOrBuilder
        Returns:
        Whether the wafSettings field is set.
      • getWafSettings

        public WafSettings getWafSettings()
         Settings for WAF
         
        .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;
        Specified by:
        getWafSettings in interface KeyOrBuilder
        Returns:
        The wafSettings.
      • setWafSettings

        public Key.Builder setWafSettings​(WafSettings value)
         Settings for WAF
         
        .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;
      • setWafSettings

        public Key.Builder setWafSettings​(WafSettings.Builder builderForValue)
         Settings for WAF
         
        .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;
      • mergeWafSettings

        public Key.Builder mergeWafSettings​(WafSettings value)
         Settings for WAF
         
        .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;
      • clearWafSettings

        public Key.Builder clearWafSettings()
         Settings for WAF
         
        .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;
      • getWafSettingsBuilder

        public WafSettings.Builder getWafSettingsBuilder()
         Settings for WAF
         
        .google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;
      • setUnknownFields

        public final Key.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Key.Builder>
      • mergeUnknownFields

        public final Key.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Key.Builder>