Class AnnotateAssessmentRequest.Builder (3.37.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.v1beta1.AnnotateAssessmentRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
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.v1beta1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<? extends com.google.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Reason>

The reasons to add.

Returns
TypeDescription
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.v1beta1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valuesIterable<Integer>

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

Returns
TypeDescription
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.v1beta1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueAnnotateAssessmentRequest.Reason

The reasons to add.

Returns
TypeDescription
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.v1beta1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
AnnotateAssessmentRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AnnotateAssessmentRequest build()
Returns
TypeDescription
AnnotateAssessmentRequest

buildPartial()

public AnnotateAssessmentRequest buildPartial()
Returns
TypeDescription
AnnotateAssessmentRequest

clear()

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

clearAnnotation()

public AnnotateAssessmentRequest.Builder clearAnnotation()

Optional. The annotation that will be 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.v1beta1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
AnnotateAssessmentRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearHashedAccountId()

public AnnotateAssessmentRequest.Builder clearHashedAccountId()

Optional. Unique stable hashed user identifier to apply to the assessment. This is an alternative to setting the hashed_account_id in CreateAssessment, for example, when the account identifier is not yet known in the initial request. It is recommended that the identifier is hashed using hmac-sha256 with stable secret.

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

Returns
TypeDescription
AnnotateAssessmentRequest.Builder

This builder for chaining.

clearName()

public AnnotateAssessmentRequest.Builder clearName()

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

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

Returns
TypeDescription
AnnotateAssessmentRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReasons()

public AnnotateAssessmentRequest.Builder clearReasons()

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

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

Returns
TypeDescription
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.v1beta1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
AnnotateAssessmentRequest.Builder

clone()

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

getAnnotation()

public AnnotateAssessmentRequest.Annotation getAnnotation()

Optional. The annotation that will be 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.v1beta1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
AnnotateAssessmentRequest.Annotation

The annotation.

getAnnotationValue()

public int getAnnotationValue()

Optional. The annotation that will be 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.v1beta1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The enum numeric value on the wire for annotation.

getDefaultInstanceForType()

public AnnotateAssessmentRequest getDefaultInstanceForType()
Returns
TypeDescription
AnnotateAssessmentRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getHashedAccountId()

public ByteString getHashedAccountId()

Optional. Unique stable hashed user identifier to apply to the assessment. This is an alternative to setting the hashed_account_id in CreateAssessment, for example, when the account identifier is not yet known in the initial request. It is recommended that the identifier is hashed using hmac-sha256 with stable secret.

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

Returns
TypeDescription
ByteString

The hashedAccountId.

getName()

public String getName()

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

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

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

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

Returns
TypeDescription
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.v1beta1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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.v1beta1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.v1beta1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.v1beta1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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.v1beta1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.v1beta1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.v1beta1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.v1beta1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
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.v1beta1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the transactionEvent field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(AnnotateAssessmentRequest other)

public AnnotateAssessmentRequest.Builder mergeFrom(AnnotateAssessmentRequest other)
Parameter
NameDescription
otherAnnotateAssessmentRequest
Returns
TypeDescription
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.v1beta1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueTransactionEvent
Returns
TypeDescription
AnnotateAssessmentRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAnnotation(AnnotateAssessmentRequest.Annotation value)

public AnnotateAssessmentRequest.Builder setAnnotation(AnnotateAssessmentRequest.Annotation value)

Optional. The annotation that will be 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.v1beta1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueAnnotateAssessmentRequest.Annotation

The annotation to set.

Returns
TypeDescription
AnnotateAssessmentRequest.Builder

This builder for chaining.

setAnnotationValue(int value)

public AnnotateAssessmentRequest.Builder setAnnotationValue(int value)

Optional. The annotation that will be 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.v1beta1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
AnnotateAssessmentRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setHashedAccountId(ByteString value)

public AnnotateAssessmentRequest.Builder setHashedAccountId(ByteString value)

Optional. Unique stable hashed user identifier to apply to the assessment. This is an alternative to setting the hashed_account_id in CreateAssessment, for example, when the account identifier is not yet known in the initial request. It is recommended that the identifier is hashed using hmac-sha256 with stable secret.

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

Parameter
NameDescription
valueByteString

The hashedAccountId to set.

Returns
TypeDescription
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_number}/assessments/{assessment_id}.

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

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
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_number}/assessments/{assessment_id}.

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

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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.v1beta1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint

The index to set the value at.

valueAnnotateAssessmentRequest.Reason

The reasons to set.

Returns
TypeDescription
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.v1beta1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
NameDescription
indexint

The index to set the value at.

valueint

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

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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.v1beta1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueTransactionEvent
Returns
TypeDescription
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.v1beta1.TransactionEvent transaction_event = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueTransactionEvent.Builder
Returns
TypeDescription
AnnotateAssessmentRequest.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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