Class Key

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, KeyOrBuilder, Serializable

    public final class Key
    extends com.google.protobuf.GeneratedMessageV3
    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
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • 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
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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
      • 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.
      • 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.
      • 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.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Key parseFrom​(ByteBuffer data)
                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Key parseFrom​(ByteBuffer data,
                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Key parseFrom​(com.google.protobuf.ByteString data)
                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Key parseFrom​(com.google.protobuf.ByteString data,
                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Key parseFrom​(byte[] data)
                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Key parseFrom​(byte[] data,
                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseDelimitedFrom

        public static Key parseDelimitedFrom​(InputStream input,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws IOException
        Throws:
        IOException
      • parseFrom

        public static Key parseFrom​(com.google.protobuf.CodedInputStream input)
                             throws IOException
        Throws:
        IOException
      • parseFrom

        public static Key parseFrom​(com.google.protobuf.CodedInputStream input,
                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                             throws IOException
        Throws:
        IOException
      • newBuilderForType

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

        public static Key.Builder newBuilder​(Key prototype)
      • toBuilder

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

        protected Key.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Key getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Key> parser()
      • getParserForType

        public com.google.protobuf.Parser<Key> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

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