Class Policy (3.96.0)

public final class Policy extends GeneratedMessage implements PolicyOrBuilder

A complete configuration set containing multiple grouped rules defining the behavior of reCAPTCHA for fraud detection and prevention.

Protobuf type google.cloud.recaptchaenterprise.v1.Policy

Implements

PolicyOrBuilder

Static Fields

CHALLENGE_RULE_GROUPS_FIELD_NUMBER

public static final int CHALLENGE_RULE_GROUPS_FIELD_NUMBER
Field Value
Type Description
int

CLIENT_SETTINGS_FIELD_NUMBER

public static final int CLIENT_SETTINGS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Policy getDefaultInstance()
Returns
Type Description
Policy

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Policy.Builder newBuilder()
Returns
Type Description
Policy.Builder

newBuilder(Policy prototype)

public static Policy.Builder newBuilder(Policy prototype)
Parameter
Name Description
prototype Policy
Returns
Type Description
Policy.Builder

parseDelimitedFrom(InputStream input)

public static Policy parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Policy
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Policy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Policy
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Policy parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Policy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Policy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Policy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Policy parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Policy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Policy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Policy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Policy parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Policy
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Policy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Policy
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Policy parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Policy
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Policy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Policy
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Policy parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Policy
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Policy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Policy
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Policy> parser()
Returns
Type Description
Parser<Policy>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getChallengeRuleGroups(int index)

public ChallengeRuleGroup getChallengeRuleGroups(int index)

Optional. Rules to configure the behavior of reCAPTCHA for showing a challenge. Rule groups are evaluated in order. Evaluation stops when the first matching rule group is found.

repeated .google.cloud.recaptchaenterprise.v1.ChallengeRuleGroup challenge_rule_groups = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ChallengeRuleGroup

getChallengeRuleGroupsCount()

public int getChallengeRuleGroupsCount()

Optional. Rules to configure the behavior of reCAPTCHA for showing a challenge. Rule groups are evaluated in order. Evaluation stops when the first matching rule group is found.

repeated .google.cloud.recaptchaenterprise.v1.ChallengeRuleGroup challenge_rule_groups = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getChallengeRuleGroupsList()

public List<ChallengeRuleGroup> getChallengeRuleGroupsList()

Optional. Rules to configure the behavior of reCAPTCHA for showing a challenge. Rule groups are evaluated in order. Evaluation stops when the first matching rule group is found.

repeated .google.cloud.recaptchaenterprise.v1.ChallengeRuleGroup challenge_rule_groups = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<ChallengeRuleGroup>

getChallengeRuleGroupsOrBuilder(int index)

public ChallengeRuleGroupOrBuilder getChallengeRuleGroupsOrBuilder(int index)

Optional. Rules to configure the behavior of reCAPTCHA for showing a challenge. Rule groups are evaluated in order. Evaluation stops when the first matching rule group is found.

repeated .google.cloud.recaptchaenterprise.v1.ChallengeRuleGroup challenge_rule_groups = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ChallengeRuleGroupOrBuilder

getChallengeRuleGroupsOrBuilderList()

public List<? extends ChallengeRuleGroupOrBuilder> getChallengeRuleGroupsOrBuilderList()

Optional. Rules to configure the behavior of reCAPTCHA for showing a challenge. Rule groups are evaluated in order. Evaluation stops when the first matching rule group is found.

repeated .google.cloud.recaptchaenterprise.v1.ChallengeRuleGroup challenge_rule_groups = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.recaptchaenterprise.v1.ChallengeRuleGroupOrBuilder>

getClientSettings()

public ClientSettings getClientSettings()

Required. Configuration for clients protected by this policy.

.google.cloud.recaptchaenterprise.v1.ClientSettings client_settings = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ClientSettings

The clientSettings.

getClientSettingsOrBuilder()

public ClientSettingsOrBuilder getClientSettingsOrBuilder()

Required. Configuration for clients protected by this policy.

.google.cloud.recaptchaenterprise.v1.ClientSettings client_settings = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ClientSettingsOrBuilder

getDefaultInstanceForType()

public Policy getDefaultInstanceForType()
Returns
Type Description
Policy

getName()

public String getName()

Identifier. Resource name for this policy. Format: "projects/{project}/keys/{key}/policy" for a policy under a key.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. Resource name for this policy. Format: "projects/{project}/keys/{key}/policy" for a policy under a key.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<Policy> getParserForType()
Returns
Type Description
Parser<Policy>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasClientSettings()

public boolean hasClientSettings()

Required. Configuration for clients protected by this policy.

.google.cloud.recaptchaenterprise.v1.ClientSettings client_settings = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the clientSettings field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Policy.Builder newBuilderForType()
Returns
Type Description
Policy.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected Policy.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Policy.Builder
Overrides

toBuilder()

public Policy.Builder toBuilder()
Returns
Type Description
Policy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException