<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/user/v1/keyapis_user_user_v1.proto

namespace Keyapis\User\V1;

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

/**
 * Запрос создания идентификационного кода пользователя
 *
 * Generated from protobuf message <code>keyapis.user.v1.PostUserCodeCreateRequest</code>
 */
class PostUserCodeCreateRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификационный код пользователя
     *
     * Generated from protobuf field <code>.keyapis.user.v1.UserCode user_code = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $user_code = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Keyapis\User\V1\UserCode $user_code
     *           Идентификационный код пользователя
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\User\V1\KeyapisUserUserV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификационный код пользователя
     *
     * Generated from protobuf field <code>.keyapis.user.v1.UserCode user_code = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Keyapis\User\V1\UserCode|null
     */
    public function getUserCode()
    {
        return $this->user_code;
    }

    public function hasUserCode()
    {
        return isset($this->user_code);
    }

    public function clearUserCode()
    {
        unset($this->user_code);
    }

    /**
     * Идентификационный код пользователя
     *
     * Generated from protobuf field <code>.keyapis.user.v1.UserCode user_code = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Keyapis\User\V1\UserCode $var
     * @return $this
     */
    public function setUserCode($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\User\V1\UserCode::class);
        $this->user_code = $var;

        return $this;
    }

}

