public static final class Policy.Builder extends GeneratedMessage.Builder<Policy.Builder> implements PolicyOrBuilderA complete configuration set containing multiple grouped rules defining the behavior of reCAPTCHA for fraud detection and prevention.
Protobuf type google.cloud.recaptchaenterprise.v1.Policy
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > Policy.BuilderImplements
PolicyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllChallengeRuleGroups(Iterable<? extends ChallengeRuleGroup> values)
public Policy.Builder addAllChallengeRuleGroups(Iterable<? extends ChallengeRuleGroup> values)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 |
values |
Iterable<? extends com.google.recaptchaenterprise.v1.ChallengeRuleGroup> |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
addChallengeRuleGroups(ChallengeRuleGroup value)
public Policy.Builder addChallengeRuleGroups(ChallengeRuleGroup value)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 |
value |
ChallengeRuleGroup |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
addChallengeRuleGroups(ChallengeRuleGroup.Builder builderForValue)
public Policy.Builder addChallengeRuleGroups(ChallengeRuleGroup.Builder builderForValue)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 |
builderForValue |
ChallengeRuleGroup.Builder |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
addChallengeRuleGroups(int index, ChallengeRuleGroup value)
public Policy.Builder addChallengeRuleGroups(int index, ChallengeRuleGroup value)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];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
ChallengeRuleGroup |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
addChallengeRuleGroups(int index, ChallengeRuleGroup.Builder builderForValue)
public Policy.Builder addChallengeRuleGroups(int index, ChallengeRuleGroup.Builder builderForValue)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];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
ChallengeRuleGroup.Builder |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
addChallengeRuleGroupsBuilder()
public ChallengeRuleGroup.Builder addChallengeRuleGroupsBuilder()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 |
ChallengeRuleGroup.Builder |
|
addChallengeRuleGroupsBuilder(int index)
public ChallengeRuleGroup.Builder addChallengeRuleGroupsBuilder(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.Builder |
|
build()
public Policy build()| Returns | |
|---|---|
| Type | Description |
Policy |
|
buildPartial()
public Policy buildPartial()| Returns | |
|---|---|
| Type | Description |
Policy |
|
clear()
public Policy.Builder clear()| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
clearChallengeRuleGroups()
public Policy.Builder clearChallengeRuleGroups()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 |
Policy.Builder |
|
clearClientSettings()
public Policy.Builder clearClientSettings()Required. Configuration for clients protected by this policy.
.google.cloud.recaptchaenterprise.v1.ClientSettings client_settings = 4 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
clearName()
public Policy.Builder clearName()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 |
Policy.Builder |
This builder for chaining. |
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 |
|
getChallengeRuleGroupsBuilder(int index)
public ChallengeRuleGroup.Builder getChallengeRuleGroupsBuilder(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.Builder |
|
getChallengeRuleGroupsBuilderList()
public List<ChallengeRuleGroup.Builder> getChallengeRuleGroupsBuilderList()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<Builder> |
|
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. |
getClientSettingsBuilder()
public ClientSettings.Builder getClientSettingsBuilder()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.Builder |
|
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 |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
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. |
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. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeClientSettings(ClientSettings value)
public Policy.Builder mergeClientSettings(ClientSettings value)Required. Configuration for clients protected by this policy.
.google.cloud.recaptchaenterprise.v1.ClientSettings client_settings = 4 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ClientSettings |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Policy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Policy.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
mergeFrom(Policy other)
public Policy.Builder mergeFrom(Policy other)| Parameter | |
|---|---|
| Name | Description |
other |
Policy |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
removeChallengeRuleGroups(int index)
public Policy.Builder removeChallengeRuleGroups(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 |
Policy.Builder |
|
setChallengeRuleGroups(int index, ChallengeRuleGroup value)
public Policy.Builder setChallengeRuleGroups(int index, ChallengeRuleGroup value)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];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
ChallengeRuleGroup |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
setChallengeRuleGroups(int index, ChallengeRuleGroup.Builder builderForValue)
public Policy.Builder setChallengeRuleGroups(int index, ChallengeRuleGroup.Builder builderForValue)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];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
ChallengeRuleGroup.Builder |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
setClientSettings(ClientSettings value)
public Policy.Builder setClientSettings(ClientSettings value)Required. Configuration for clients protected by this policy.
.google.cloud.recaptchaenterprise.v1.ClientSettings client_settings = 4 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ClientSettings |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
setClientSettings(ClientSettings.Builder builderForValue)
public Policy.Builder setClientSettings(ClientSettings.Builder builderForValue)Required. Configuration for clients protected by this policy.
.google.cloud.recaptchaenterprise.v1.ClientSettings client_settings = 4 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
ClientSettings.Builder |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
|
setName(String value)
public Policy.Builder setName(String value)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];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe name to set. |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
This builder for chaining. |
setNameBytes(ByteString value)
public Policy.Builder setNameBytes(ByteString value)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];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for name to set. |
| Returns | |
|---|---|
| Type | Description |
Policy.Builder |
This builder for chaining. |