Class Key (3.6.0)

public final class Key extends 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

Implements

KeyOrBuilder

Static Fields

ANDROID_SETTINGS_FIELD_NUMBER

public static final int ANDROID_SETTINGS_FIELD_NUMBER
Field Value
TypeDescription
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

IOS_SETTINGS_FIELD_NUMBER

public static final int IOS_SETTINGS_FIELD_NUMBER
Field Value
TypeDescription
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

TESTING_OPTIONS_FIELD_NUMBER

public static final int TESTING_OPTIONS_FIELD_NUMBER
Field Value
TypeDescription
int

WAF_SETTINGS_FIELD_NUMBER

public static final int WAF_SETTINGS_FIELD_NUMBER
Field Value
TypeDescription
int

WEB_SETTINGS_FIELD_NUMBER

public static final int WEB_SETTINGS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Key getDefaultInstance()
Returns
TypeDescription
Key

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Key.Builder newBuilder()
Returns
TypeDescription
Key.Builder

newBuilder(Key prototype)

public static Key.Builder newBuilder(Key prototype)
Parameter
NameDescription
prototypeKey
Returns
TypeDescription
Key.Builder

parseDelimitedFrom(InputStream input)

public static Key parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Key
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Key parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Key
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Key parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Key
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Key parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Key
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Key parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Key
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Key parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Key
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Key parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Key
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Key parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Key
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Key parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Key
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Key parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Key
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Key parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Key
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Key parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Key
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Key> parser()
Returns
TypeDescription
Parser<Key>

Methods

containsLabels(String key)

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;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAndroidSettings()

public AndroidKeySettings getAndroidSettings()

Settings for keys that can be used by Android apps.

.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;

Returns
TypeDescription
AndroidKeySettings

The androidSettings.

getAndroidSettingsOrBuilder()

public AndroidKeySettingsOrBuilder getAndroidSettingsOrBuilder()

Settings for keys that can be used by Android apps.

.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;

Returns
TypeDescription
AndroidKeySettingsOrBuilder

getCreateTime()

public Timestamp getCreateTime()

The timestamp corresponding to the creation of this Key.

.google.protobuf.Timestamp create_time = 7;

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

The timestamp corresponding to the creation of this Key.

.google.protobuf.Timestamp create_time = 7;

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Key getDefaultInstanceForType()
Returns
TypeDescription
Key

getDisplayName()

public String getDisplayName()

Human-readable display name of this key. Modifiable by user.

string display_name = 2;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Human-readable display name of this key. Modifiable by user.

string display_name = 2;

Returns
TypeDescription
ByteString

The bytes for displayName.

getIosSettings()

public IOSKeySettings getIosSettings()

Settings for keys that can be used by iOS apps.

.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;

Returns
TypeDescription
IOSKeySettings

The iosSettings.

getIosSettingsOrBuilder()

public IOSKeySettingsOrBuilder getIosSettingsOrBuilder()

Settings for keys that can be used by iOS apps.

.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;

Returns
TypeDescription
IOSKeySettingsOrBuilder

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

See <a href="https://cloud.google.com/recaptcha-enterprise/docs/labels">; Creating and managing labels</a>.

map<string, string> labels = 6;

Returns
TypeDescription
int

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;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

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;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

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;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getName()

public String getName()

The resource name for the Key in the format "projects/{project}/keys/{key}".

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The resource name for the Key in the format "projects/{project}/keys/{key}".

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<Key> getParserForType()
Returns
TypeDescription
Parser<Key>
Overrides

getPlatformSettingsCase()

public Key.PlatformSettingsCase getPlatformSettingsCase()
Returns
TypeDescription
Key.PlatformSettingsCase

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTestingOptions()

public TestingOptions getTestingOptions()

Options for user acceptance testing.

.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;

Returns
TypeDescription
TestingOptions

The testingOptions.

getTestingOptionsOrBuilder()

public TestingOptionsOrBuilder getTestingOptionsOrBuilder()

Options for user acceptance testing.

.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;

Returns
TypeDescription
TestingOptionsOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getWafSettings()

public WafSettings getWafSettings()

Settings for WAF

.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;

Returns
TypeDescription
WafSettings

The wafSettings.

getWafSettingsOrBuilder()

public WafSettingsOrBuilder getWafSettingsOrBuilder()

Settings for WAF

.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;

Returns
TypeDescription
WafSettingsOrBuilder

getWebSettings()

public WebKeySettings getWebSettings()

Settings for keys that can be used by websites.

.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;

Returns
TypeDescription
WebKeySettings

The webSettings.

getWebSettingsOrBuilder()

public WebKeySettingsOrBuilder getWebSettingsOrBuilder()

Settings for keys that can be used by websites.

.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;

Returns
TypeDescription
WebKeySettingsOrBuilder

hasAndroidSettings()

public boolean hasAndroidSettings()

Settings for keys that can be used by Android apps.

.google.cloud.recaptchaenterprise.v1.AndroidKeySettings android_settings = 4;

Returns
TypeDescription
boolean

Whether the androidSettings field is set.

hasCreateTime()

public boolean hasCreateTime()

The timestamp corresponding to the creation of this Key.

.google.protobuf.Timestamp create_time = 7;

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasIosSettings()

public boolean hasIosSettings()

Settings for keys that can be used by iOS apps.

.google.cloud.recaptchaenterprise.v1.IOSKeySettings ios_settings = 5;

Returns
TypeDescription
boolean

Whether the iosSettings field is set.

hasTestingOptions()

public boolean hasTestingOptions()

Options for user acceptance testing.

.google.cloud.recaptchaenterprise.v1.TestingOptions testing_options = 9;

Returns
TypeDescription
boolean

Whether the testingOptions field is set.

hasWafSettings()

public boolean hasWafSettings()

Settings for WAF

.google.cloud.recaptchaenterprise.v1.WafSettings waf_settings = 10;

Returns
TypeDescription
boolean

Whether the wafSettings field is set.

hasWebSettings()

public boolean hasWebSettings()

Settings for keys that can be used by websites.

.google.cloud.recaptchaenterprise.v1.WebKeySettings web_settings = 3;

Returns
TypeDescription
boolean

Whether the webSettings field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Key.Builder newBuilderForType()
Returns
TypeDescription
Key.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Key.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Key.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Key.Builder toBuilder()
Returns
TypeDescription
Key.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException