<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: deviceapis/device/v1/deviceapis_device_user_v1.proto

namespace Deviceapis\Device\V1;

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

/**
 * Запрос замены пароля пользователя
 *
 * Generated from protobuf message <code>deviceapis.device.v1.PostUserPasswordReplaceRequest</code>
 */
class PostUserPasswordReplaceRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Имя пользователя
     *
     * Generated from protobuf field <code>string username = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     */
    protected $username = '';
    /**
     * Поле на замену
     *
     * Generated from protobuf field <code>.deviceapis.device.v1.PostUserPasswordReplaceRequest.ReplaceTo data = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $data = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $username
     *           Имя пользователя
     *     @type \Deviceapis\Device\V1\PostUserPasswordReplaceRequest\ReplaceTo $data
     *           Поле на замену
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Deviceapis\Device\V1\DeviceapisDeviceUserV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Имя пользователя
     *
     * Generated from protobuf field <code>string username = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     * @return string
     */
    public function getUsername()
    {
        return $this->username;
    }

    /**
     * Имя пользователя
     *
     * Generated from protobuf field <code>string username = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     * @param string $var
     * @return $this
     */
    public function setUsername($var)
    {
        GPBUtil::checkString($var, True);
        $this->username = $var;

        return $this;
    }

    /**
     * Поле на замену
     *
     * Generated from protobuf field <code>.deviceapis.device.v1.PostUserPasswordReplaceRequest.ReplaceTo data = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Deviceapis\Device\V1\PostUserPasswordReplaceRequest\ReplaceTo|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>.deviceapis.device.v1.PostUserPasswordReplaceRequest.ReplaceTo data = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Deviceapis\Device\V1\PostUserPasswordReplaceRequest\ReplaceTo $var
     * @return $this
     */
    public function setData($var)
    {
        GPBUtil::checkMessage($var, \Deviceapis\Device\V1\PostUserPasswordReplaceRequest\ReplaceTo::class);
        $this->data = $var;

        return $this;
    }

}

