<?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.PostUserRequest</code>
 */
class PostUserRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Пользователь
     *
     * Generated from protobuf field <code>.keyapis.user.v1.User data = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $data = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Keyapis\User\V1\User $data
     *           Пользователь
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\User\V1\KeyapisUserUserV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Пользователь
     *
     * Generated from protobuf field <code>.keyapis.user.v1.User data = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Keyapis\User\V1\User|null
     */
    public function getData()
    {
        return $this->data;
    }

    public function hasData()
    {
        return isset($this->data);
    }

    public function clearData()
    {
        unset($this->data);
    }

    /**
     * Пользователь
     *
     * Generated from protobuf field <code>.keyapis.user.v1.User data = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Keyapis\User\V1\User $var
     * @return $this
     */
    public function setData($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\User\V1\User::class);
        $this->data = $var;

        return $this;
    }

}

