Class Key.Builder (3.5.0)

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

Implements

KeyOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Key.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Key.Builder
Overrides

build()

public Key build()
Returns
TypeDescription
Key

buildPartial()

public Key buildPartial()
Returns
TypeDescription
Key

clear()

public Key.Builder clear()
Returns
TypeDescription
Key.Builder
Overrides

clearAndroidSettings()

public Key.Builder clearAndroidSettings()

Settings for keys that can be used by Android apps.

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

Returns
TypeDescription
Key.Builder

clearCreateTime()

public Key.Builder clearCreateTime()

The timestamp corresponding to the creation of this Key.

.google.protobuf.Timestamp create_time = 7;

Returns
TypeDescription
Key.Builder

clearDisplayName()

public Key.Builder clearDisplayName()

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

string display_name = 2;

Returns
TypeDescription
Key.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Key.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Key.Builder
Overrides

clearIosSettings()

public Key.Builder clearIosSettings()

Settings for keys that can be used by iOS apps.

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

Returns
TypeDescription
Key.Builder

clearLabels()

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

clearName()

public Key.Builder clearName()

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

string name = 1;

Returns
TypeDescription
Key.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Key.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Key.Builder
Overrides

clearPlatformSettings()

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

clearTestingOptions()

public Key.Builder clearTestingOptions()

Options for user acceptance testing.

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

Returns
TypeDescription
Key.Builder

clearWafSettings()

public Key.Builder clearWafSettings()

Settings for WAF

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

Returns
TypeDescription
Key.Builder

clearWebSettings()

public Key.Builder clearWebSettings()

Settings for keys that can be used by websites.

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

Returns
TypeDescription
Key.Builder

clone()

public Key.Builder clone()
Returns
TypeDescription
Key.Builder
Overrides

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

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.

getAndroidSettingsBuilder()

public AndroidKeySettings.Builder getAndroidSettingsBuilder()

Settings for keys that can be used by Android apps.

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

Returns
TypeDescription
AndroidKeySettings.Builder

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.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

The timestamp corresponding to the creation of this Key.

.google.protobuf.Timestamp create_time = 7;

Returns
TypeDescription
Builder

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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.

getIosSettingsBuilder()

public IOSKeySettings.Builder getIosSettingsBuilder()

Settings for keys that can be used by iOS apps.

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

Returns
TypeDescription
IOSKeySettings.Builder

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

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,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.

getPlatformSettingsCase()

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

getTestingOptions()

public TestingOptions getTestingOptions()

Options for user acceptance testing.

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

Returns
TypeDescription
TestingOptions

The testingOptions.

getTestingOptionsBuilder()

public TestingOptions.Builder getTestingOptionsBuilder()

Options for user acceptance testing.

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

Returns
TypeDescription
TestingOptions.Builder

getTestingOptionsOrBuilder()

public TestingOptionsOrBuilder getTestingOptionsOrBuilder()

Options for user acceptance testing.

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

Returns
TypeDescription
TestingOptionsOrBuilder

getWafSettings()

public WafSettings getWafSettings()

Settings for WAF

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

Returns
TypeDescription
WafSettings

The wafSettings.

getWafSettingsBuilder()

public WafSettings.Builder getWafSettingsBuilder()

Settings for WAF

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

Returns
TypeDescription
WafSettings.Builder

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.

getWebSettingsBuilder()

public WebKeySettings.Builder getWebSettingsBuilder()

Settings for keys that can be used by websites.

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

Returns
TypeDescription
WebKeySettings.Builder

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

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

internalGetMutableMapField(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeAndroidSettings(AndroidKeySettings value)

public Key.Builder mergeAndroidSettings(AndroidKeySettings value)

Settings for keys that can be used by Android apps.

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

Parameter
NameDescription
valueAndroidKeySettings
Returns
TypeDescription
Key.Builder

mergeCreateTime(Timestamp value)

public Key.Builder mergeCreateTime(Timestamp value)

The timestamp corresponding to the creation of this Key.

.google.protobuf.Timestamp create_time = 7;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Key.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Key.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Key.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Key.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Key.Builder
Overrides

mergeFrom(Key other)

public Key.Builder mergeFrom(Key other)
Parameter
NameDescription
otherKey
Returns
TypeDescription
Key.Builder

mergeIosSettings(IOSKeySettings value)

public Key.Builder mergeIosSettings(IOSKeySettings value)

Settings for keys that can be used by iOS apps.

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

Parameter
NameDescription
valueIOSKeySettings
Returns
TypeDescription
Key.Builder

mergeTestingOptions(TestingOptions value)

public Key.Builder mergeTestingOptions(TestingOptions value)

Options for user acceptance testing.

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

Parameter
NameDescription
valueTestingOptions
Returns
TypeDescription
Key.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Key.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Key.Builder
Overrides

mergeWafSettings(WafSettings value)

public Key.Builder mergeWafSettings(WafSettings value)

Settings for WAF

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

Parameter
NameDescription
valueWafSettings
Returns
TypeDescription
Key.Builder

mergeWebSettings(WebKeySettings value)

public Key.Builder mergeWebSettings(WebKeySettings value)

Settings for keys that can be used by websites.

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

Parameter
NameDescription
valueWebKeySettings
Returns
TypeDescription
Key.Builder

putAllLabels(Map<String,String> values)

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;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
Key.Builder

putLabels(String key, String value)

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;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
Key.Builder

removeLabels(String key)

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;

Parameter
NameDescription
keyString
Returns
TypeDescription
Key.Builder

setAndroidSettings(AndroidKeySettings value)

public Key.Builder setAndroidSettings(AndroidKeySettings value)

Settings for keys that can be used by Android apps.

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

Parameter
NameDescription
valueAndroidKeySettings
Returns
TypeDescription
Key.Builder

setAndroidSettings(AndroidKeySettings.Builder builderForValue)

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;

Parameter
NameDescription
builderForValueAndroidKeySettings.Builder
Returns
TypeDescription
Key.Builder

setCreateTime(Timestamp value)

public Key.Builder setCreateTime(Timestamp value)

The timestamp corresponding to the creation of this Key.

.google.protobuf.Timestamp create_time = 7;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Key.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Key.Builder setCreateTime(Timestamp.Builder builderForValue)

The timestamp corresponding to the creation of this Key.

.google.protobuf.Timestamp create_time = 7;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Key.Builder

setDisplayName(String value)

public Key.Builder setDisplayName(String value)

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

string display_name = 2;

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
Key.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Key.Builder setDisplayNameBytes(ByteString value)

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

string display_name = 2;

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
Key.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Key.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Key.Builder
Overrides

setIosSettings(IOSKeySettings value)

public Key.Builder setIosSettings(IOSKeySettings value)

Settings for keys that can be used by iOS apps.

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

Parameter
NameDescription
valueIOSKeySettings
Returns
TypeDescription
Key.Builder

setIosSettings(IOSKeySettings.Builder builderForValue)

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;

Parameter
NameDescription
builderForValueIOSKeySettings.Builder
Returns
TypeDescription
Key.Builder

setName(String value)

public Key.Builder setName(String value)

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

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Key.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Key.Builder setNameBytes(ByteString value)

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

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Key.Builder

This builder for chaining.

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

public Key.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Key.Builder
Overrides

setTestingOptions(TestingOptions value)

public Key.Builder setTestingOptions(TestingOptions value)

Options for user acceptance testing.

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

Parameter
NameDescription
valueTestingOptions
Returns
TypeDescription
Key.Builder

setTestingOptions(TestingOptions.Builder builderForValue)

public Key.Builder setTestingOptions(TestingOptions.Builder builderForValue)

Options for user acceptance testing.

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

Parameter
NameDescription
builderForValueTestingOptions.Builder
Returns
TypeDescription
Key.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Key.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Key.Builder
Overrides

setWafSettings(WafSettings value)

public Key.Builder setWafSettings(WafSettings value)

Settings for WAF

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

Parameter
NameDescription
valueWafSettings
Returns
TypeDescription
Key.Builder

setWafSettings(WafSettings.Builder builderForValue)

public Key.Builder setWafSettings(WafSettings.Builder builderForValue)

Settings for WAF

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

Parameter
NameDescription
builderForValueWafSettings.Builder
Returns
TypeDescription
Key.Builder

setWebSettings(WebKeySettings value)

public Key.Builder setWebSettings(WebKeySettings value)

Settings for keys that can be used by websites.

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

Parameter
NameDescription
valueWebKeySettings
Returns
TypeDescription
Key.Builder

setWebSettings(WebKeySettings.Builder builderForValue)

public Key.Builder setWebSettings(WebKeySettings.Builder builderForValue)

Settings for keys that can be used by websites.

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

Parameter
NameDescription
builderForValueWebKeySettings.Builder
Returns
TypeDescription
Key.Builder