<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto

namespace Google\Cloud\RecaptchaEnterprise\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * The request message to annotate an Assessment.
 *
 * Generated from protobuf message <code>google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest</code>
 */
class AnnotateAssessmentRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the Assessment, in the format
     * "projects/{project}/assessments/{assessment}".
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $name = '';
    /**
     * 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.
     *
     * Generated from protobuf field <code>.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $annotation = 0;
    /**
     * Optional. Optional reasons for the annotation that will be assigned to the
     * Event.
     *
     * Generated from protobuf field <code>repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $reasons;
    /**
     * 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.
     *
     * Generated from protobuf field <code>bytes hashed_account_id = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $hashed_account_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The resource name of the Assessment, in the format
     *           "projects/{project}/assessments/{assessment}".
     *     @type int $annotation
     *           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.
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $reasons
     *           Optional. Optional reasons for the annotation that will be assigned to the
     *           Event.
     *     @type string $hashed_account_id
     *           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.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the Assessment, in the format
     * "projects/{project}/assessments/{assessment}".
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The resource name of the Assessment, in the format
     * "projects/{project}/assessments/{assessment}".
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getAnnotation()
    {
        return $this->annotation;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>.google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Annotation annotation = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setAnnotation($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest\Annotation::class);
        $this->annotation = $var;

        return $this;
    }

    /**
     * Optional. Optional reasons for the annotation that will be assigned to the
     * Event.
     *
     * Generated from protobuf field <code>repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getReasons()
    {
        return $this->reasons;
    }

    /**
     * Optional. Optional reasons for the annotation that will be assigned to the
     * Event.
     *
     * Generated from protobuf field <code>repeated .google.cloud.recaptchaenterprise.v1.AnnotateAssessmentRequest.Reason reasons = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setReasons($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\RecaptchaEnterprise\V1\AnnotateAssessmentRequest\Reason::class);
        $this->reasons = $arr;

        return $this;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>bytes hashed_account_id = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getHashedAccountId()
    {
        return $this->hashed_account_id;
    }

    /**
     * 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.
     *
     * Generated from protobuf field <code>bytes hashed_account_id = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setHashedAccountId($var)
    {
        GPBUtil::checkString($var, False);
        $this->hashed_account_id = $var;

        return $this;
    }

}

