Class AnnotateAssessmentRequest.Builder (3.51.0)

public static final class AnnotateAssessmentRequest.Builder extends GeneratedMessageV3.Builder<AnnotateAssessmentRequest.Builder> implements AnnotateAssessmentRequestOrBuilder

The request message to annotate an Assessment.

Protobuf type google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest

Static Methods

getDescriptor()

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

Methods

addAllReasons(Iterable<? extends AnnotateAssessmentRequest.Reason> values)

public AnnotateAssessmentRequest.Builder addAllReasons(Iterable<? extends AnnotateAssessmentRequest.Reason> values)

Optional. Reasons for the annotation that are assigned to the event.

repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason>

The reasons to add.

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

addAllReasonsValue(Iterable<Integer> values)

public AnnotateAssessmentRequest.Builder addAllReasonsValue(Iterable<Integer> values)

Optional. Reasons for the annotation that are assigned to the event.

repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<Integer>

The enum numeric values on the wire for reasons to add.

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

addReasons(AnnotateAssessmentRequest.Reason value)

public AnnotateAssessmentRequest.Builder addReasons(AnnotateAssessmentRequest.Reason value)

Optional. Reasons for the annotation that are assigned to the event.

repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value AnnotateAssessmentRequest.Reason

The reasons to add.

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

addReasonsValue(int value)

public AnnotateAssessmentRequest.Builder addReasonsValue(int value)

Optional. Reasons for the annotation that are assigned to the event.

repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for reasons to add.

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AnnotateAssessmentRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AnnotateAssessmentRequest.Builder
Overrides

build()

public AnnotateAssessmentRequest build()
Returns
Type Description
AnnotateAssessmentRequest

buildPartial()

public AnnotateAssessmentRequest buildPartial()
Returns
Type Description
AnnotateAssessmentRequest

clear()

public AnnotateAssessmentRequest.Builder clear()
Returns
Type Description
AnnotateAssessmentRequest.Builder
Overrides

clearAccountId()

public AnnotateAssessmentRequest.Builder clearAccountId()

Optional. A stable account identifier to apply to the assessment. This is an alternative to setting account_id in CreateAssessment, for example when a stable account identifier is not yet known in the initial request.

string account_id = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

clearAnnotation()

public AnnotateAssessmentRequest.Builder clearAnnotation()

Optional. The annotation that is assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent.

.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public AnnotateAssessmentRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AnnotateAssessmentRequest.Builder
Overrides

clearHashedAccountId()

public AnnotateAssessmentRequest.Builder clearHashedAccountId()

Optional. A stable hashed account identifier to apply to the assessment. This is an alternative to setting hashed_account_id in CreateAssessment, for example when a stable account identifier is not yet known in the initial request.

bytes hashed_account_id = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

clearName()

public AnnotateAssessmentRequest.Builder clearName()

Required. The resource name of the Assessment, in the format projects/{project}/assessments/{assessment}.

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public AnnotateAssessmentRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AnnotateAssessmentRequest.Builder
Overrides

clearReasons()

public AnnotateAssessmentRequest.Builder clearReasons()

Optional. Reasons for the annotation that are assigned to the event.

repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

clearTransactionEvent()

public AnnotateAssessmentRequest.Builder clearTransactionEvent()

Optional. If the assessment is part of a payment transaction, provide details on payment lifecycle events that occur in the transaction.

.google.cloud.recaptchaenterprise.v1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AnnotateAssessmentRequest.Builder

clone()

public AnnotateAssessmentRequest.Builder clone()
Returns
Type Description
AnnotateAssessmentRequest.Builder
Overrides

getAccountId()

public String getAccountId()

Optional. A stable account identifier to apply to the assessment. This is an alternative to setting account_id in CreateAssessment, for example when a stable account identifier is not yet known in the initial request.

string account_id = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The accountId.

getAccountIdBytes()

public ByteString getAccountIdBytes()

Optional. A stable account identifier to apply to the assessment. This is an alternative to setting account_id in CreateAssessment, for example when a stable account identifier is not yet known in the initial request.

string account_id = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for accountId.

getAnnotation()

public AnnotateAssessmentRequest.Annotation getAnnotation()

Optional. The annotation that is assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent.

.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AnnotateAssessmentRequest.Annotation

The annotation.

getAnnotationValue()

public int getAnnotationValue()

Optional. The annotation that is assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent.

.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for annotation.

getDefaultInstanceForType()

public AnnotateAssessmentRequest getDefaultInstanceForType()
Returns
Type Description
AnnotateAssessmentRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getHashedAccountId()

public ByteString getHashedAccountId()

Optional. A stable hashed account identifier to apply to the assessment. This is an alternative to setting hashed_account_id in CreateAssessment, for example when a stable account identifier is not yet known in the initial request.

bytes hashed_account_id = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The hashedAccountId.

getName()

public String getName()

Required. The resource name of the Assessment, in the format projects/{project}/assessments/{assessment}.

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The resource name of the Assessment, in the format projects/{project}/assessments/{assessment}.

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for name.

getReasons(int index)

public AnnotateAssessmentRequest.Reason getReasons(int index)

Optional. Reasons for the annotation that are assigned to the event.

repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
AnnotateAssessmentRequest.Reason

The reasons at the given index.

getReasonsCount()

public int getReasonsCount()

Optional. Reasons for the annotation that are assigned to the event.

repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of reasons.

getReasonsList()

public List<AnnotateAssessmentRequest.Reason> getReasonsList()

Optional. Reasons for the annotation that are assigned to the event.

repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Reason>

A list containing the reasons.

getReasonsValue(int index)

public int getReasonsValue(int index)

Optional. Reasons for the annotation that are assigned to the event.

repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of reasons at the given index.

getReasonsValueList()

public List<Integer> getReasonsValueList()

Optional. Reasons for the annotation that are assigned to the event.

repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for reasons.

getTransactionEvent()

public TransactionEvent getTransactionEvent()

Optional. If the assessment is part of a payment transaction, provide details on payment lifecycle events that occur in the transaction.

.google.cloud.recaptchaenterprise.v1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TransactionEvent

The transactionEvent.

getTransactionEventBuilder()

public TransactionEvent.Builder getTransactionEventBuilder()

Optional. If the assessment is part of a payment transaction, provide details on payment lifecycle events that occur in the transaction.

.google.cloud.recaptchaenterprise.v1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TransactionEvent.Builder

getTransactionEventOrBuilder()

public TransactionEventOrBuilder getTransactionEventOrBuilder()

Optional. If the assessment is part of a payment transaction, provide details on payment lifecycle events that occur in the transaction.

.google.cloud.recaptchaenterprise.v1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TransactionEventOrBuilder

hasTransactionEvent()

public boolean hasTransactionEvent()

Optional. If the assessment is part of a payment transaction, provide details on payment lifecycle events that occur in the transaction.

.google.cloud.recaptchaenterprise.v1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the transactionEvent field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AnnotateAssessmentRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AnnotateAssessmentRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public AnnotateAssessmentRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AnnotateAssessmentRequest.Builder
Overrides

mergeFrom(AnnotateAssessmentRequest other)

public AnnotateAssessmentRequest.Builder mergeFrom(AnnotateAssessmentRequest other)
Parameter
Name Description
other AnnotateAssessmentRequest
Returns
Type Description
AnnotateAssessmentRequest.Builder

mergeTransactionEvent(TransactionEvent value)

public AnnotateAssessmentRequest.Builder mergeTransactionEvent(TransactionEvent value)

Optional. If the assessment is part of a payment transaction, provide details on payment lifecycle events that occur in the transaction.

.google.cloud.recaptchaenterprise.v1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value TransactionEvent
Returns
Type Description
AnnotateAssessmentRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AnnotateAssessmentRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AnnotateAssessmentRequest.Builder
Overrides

setAccountId(String value)

public AnnotateAssessmentRequest.Builder setAccountId(String value)

Optional. A stable account identifier to apply to the assessment. This is an alternative to setting account_id in CreateAssessment, for example when a stable account identifier is not yet known in the initial request.

string account_id = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The accountId to set.

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

setAccountIdBytes(ByteString value)

public AnnotateAssessmentRequest.Builder setAccountIdBytes(ByteString value)

Optional. A stable account identifier to apply to the assessment. This is an alternative to setting account_id in CreateAssessment, for example when a stable account identifier is not yet known in the initial request.

string account_id = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for accountId to set.

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

setAnnotation(AnnotateAssessmentRequest.Annotation value)

public AnnotateAssessmentRequest.Builder setAnnotation(AnnotateAssessmentRequest.Annotation value)

Optional. The annotation that is assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent.

.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value AnnotateAssessmentRequest.Annotation

The annotation to set.

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

setAnnotationValue(int value)

public AnnotateAssessmentRequest.Builder setAnnotationValue(int value)

Optional. The annotation that is assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent.

.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for annotation to set.

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public AnnotateAssessmentRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AnnotateAssessmentRequest.Builder
Overrides

setHashedAccountId(ByteString value)

public AnnotateAssessmentRequest.Builder setHashedAccountId(ByteString value)

Optional. A stable hashed account identifier to apply to the assessment. This is an alternative to setting hashed_account_id in CreateAssessment, for example when a stable account identifier is not yet known in the initial request.

bytes hashed_account_id = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The hashedAccountId to set.

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

setName(String value)

public AnnotateAssessmentRequest.Builder setName(String value)

Required. The resource name of the Assessment, in the format projects/{project}/assessments/{assessment}.

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The name to set.

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

setNameBytes(ByteString value)

public AnnotateAssessmentRequest.Builder setNameBytes(ByteString value)

Required. The resource name of the Assessment, in the format projects/{project}/assessments/{assessment}.

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

setReasons(int index, AnnotateAssessmentRequest.Reason value)

public AnnotateAssessmentRequest.Builder setReasons(int index, AnnotateAssessmentRequest.Reason value)

Optional. Reasons for the annotation that are assigned to the event.

repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value AnnotateAssessmentRequest.Reason

The reasons to set.

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

setReasonsValue(int index, int value)

public AnnotateAssessmentRequest.Builder setReasonsValue(int index, int value)

Optional. Reasons for the annotation that are assigned to the event.

repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value int

The enum numeric value on the wire for reasons to set.

Returns
Type Description
AnnotateAssessmentRequest.Builder

This builder for chaining.

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

public AnnotateAssessmentRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AnnotateAssessmentRequest.Builder
Overrides

setTransactionEvent(TransactionEvent value)

public AnnotateAssessmentRequest.Builder setTransactionEvent(TransactionEvent value)

Optional. If the assessment is part of a payment transaction, provide details on payment lifecycle events that occur in the transaction.

.google.cloud.recaptchaenterprise.v1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value TransactionEvent
Returns
Type Description
AnnotateAssessmentRequest.Builder

setTransactionEvent(TransactionEvent.Builder builderForValue)

public AnnotateAssessmentRequest.Builder setTransactionEvent(TransactionEvent.Builder builderForValue)

Optional. If the assessment is part of a payment transaction, provide details on payment lifecycle events that occur in the transaction.

.google.cloud.recaptchaenterprise.v1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue TransactionEvent.Builder
Returns
Type Description
AnnotateAssessmentRequest.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final AnnotateAssessmentRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AnnotateAssessmentRequest.Builder
Overrides