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

namespace Keyapis\Kms\V1;

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

/**
 * Запрос на создание nested JWT токена
 *
 * Generated from protobuf message <code>keyapis.kms.v1.PostKmsJwtCreateJweRequest</code>
 */
class PostKmsJwtCreateJweRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Claims (данные включаемые в тело токена)
     *
     * Generated from protobuf field <code>.keyapis.kms.v1.PostKmsJwtCreateJweRequest.PayloadData data = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $data = null;
    /**
     * Публичный ключ для шифрования
     *
     * Generated from protobuf field <code>string public_key = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $public_key = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Keyapis\Kms\V1\PostKmsJwtCreateJweRequest\PayloadData $data
     *           Claims (данные включаемые в тело токена)
     *     @type string $public_key
     *           Публичный ключ для шифрования
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Kms\V1\KeyapisKmsJwtV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Claims (данные включаемые в тело токена)
     *
     * Generated from protobuf field <code>.keyapis.kms.v1.PostKmsJwtCreateJweRequest.PayloadData data = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Keyapis\Kms\V1\PostKmsJwtCreateJweRequest\PayloadData|null
     */
    public function getData()
    {
        return $this->data;
    }

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

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

    /**
     * Claims (данные включаемые в тело токена)
     *
     * Generated from protobuf field <code>.keyapis.kms.v1.PostKmsJwtCreateJweRequest.PayloadData data = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Keyapis\Kms\V1\PostKmsJwtCreateJweRequest\PayloadData $var
     * @return $this
     */
    public function setData($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Kms\V1\PostKmsJwtCreateJweRequest\PayloadData::class);
        $this->data = $var;

        return $this;
    }

    /**
     * Публичный ключ для шифрования
     *
     * Generated from protobuf field <code>string public_key = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getPublicKey()
    {
        return $this->public_key;
    }

    /**
     * Публичный ключ для шифрования
     *
     * Generated from protobuf field <code>string public_key = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setPublicKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->public_key = $var;

        return $this;
    }

}

