<?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;

/**
 * A membership in a group of related accounts.
 *
 * Generated from protobuf message <code>google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMembership</code>
 */
class RelatedAccountGroupMembership extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name for this membership in the format
     * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $name = '';
    /**
     * The unique stable hashed user identifier of the member. The identifier
     * corresponds to a `hashed_account_id` provided in a previous
     * `CreateAssessment` or `AnnotateAssessment` call.
     *
     * Generated from protobuf field <code>bytes hashed_account_id = 2;</code>
     */
    private $hashed_account_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The resource name for this membership in the format
     *           `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`.
     *     @type string $hashed_account_id
     *           The unique stable hashed user identifier of the member. The identifier
     *           corresponds to a `hashed_account_id` provided in a previous
     *           `CreateAssessment` or `AnnotateAssessment` call.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name for this membership in the format
     * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`.
     *
     * 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 for this membership in the format
     * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`.
     *
     * 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;
    }

    /**
     * The unique stable hashed user identifier of the member. The identifier
     * corresponds to a `hashed_account_id` provided in a previous
     * `CreateAssessment` or `AnnotateAssessment` call.
     *
     * Generated from protobuf field <code>bytes hashed_account_id = 2;</code>
     * @return string
     */
    public function getHashedAccountId()
    {
        return $this->hashed_account_id;
    }

    /**
     * The unique stable hashed user identifier of the member. The identifier
     * corresponds to a `hashed_account_id` provided in a previous
     * `CreateAssessment` or `AnnotateAssessment` call.
     *
     * Generated from protobuf field <code>bytes hashed_account_id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setHashedAccountId($var)
    {
        GPBUtil::checkString($var, False);
        $this->hashed_account_id = $var;

        return $this;
    }

}

