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

namespace Google\Ads\DataManager\V1;

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

/**
 * User id data holding the user id.
 *
 * Generated from protobuf message <code>google.ads.datamanager.v1.UserIdData</code>
 */
class UserIdData extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. A unique identifier for a user, as defined by the
     * advertiser.
     *
     * Generated from protobuf field <code>string user_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $user_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $user_id
     *           Required. A unique identifier for a user, as defined by the
     *           advertiser.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\Datamanager\V1\Audience::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. A unique identifier for a user, as defined by the
     * advertiser.
     *
     * Generated from protobuf field <code>string user_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getUserId()
    {
        return $this->user_id;
    }

    /**
     * Required. A unique identifier for a user, as defined by the
     * advertiser.
     *
     * Generated from protobuf field <code>string user_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setUserId($var)
    {
        GPBUtil::checkString($var, True);
        $this->user_id = $var;

        return $this;
    }

}

