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

namespace Keyapis\Jwks\V1\KeyInfo;

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

/**
 * Публичный ключ
 *
 * Generated from protobuf message <code>keyapis.jwks.v1.KeyInfo.PublicKey</code>
 */
class PublicKey extends \Google\Protobuf\Internal\Message
{
    /**
     * Вид использования.
     * # Диапазон: 2..32
     *
     * Generated from protobuf field <code>string use = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $use = '';
    /**
     * Тип ключа.
     * # Диапазон: 2..32
     *
     * Generated from protobuf field <code>string kty = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $kty = '';
    /**
     * Идентификатор.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string kid = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $kid = '';
    /**
     * Алгоритм шифрования.
     * # Диапазон: 2..32
     *
     * Generated from protobuf field <code>string alg = 4;</code>
     */
    protected $alg = '';
    /**
     * Параметр Modulus
     *
     * Generated from protobuf field <code>string n = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $n = '';
    /**
     * Параметр Exponent
     *
     * Generated from protobuf field <code>string e = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $e = '';
    /**
     * Цепочка сертификатов X.509.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>repeated string x5c = 7;</code>
     */
    private $x5c;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $use
     *           Вид использования.
     *           # Диапазон: 2..32
     *     @type string $kty
     *           Тип ключа.
     *           # Диапазон: 2..32
     *     @type string $kid
     *           Идентификатор.
     *           # Тип: Guid
     *     @type string $alg
     *           Алгоритм шифрования.
     *           # Диапазон: 2..32
     *     @type string $n
     *           Параметр Modulus
     *     @type string $e
     *           Параметр Exponent
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $x5c
     *           Цепочка сертификатов X.509.
     *           # Диапазон: 0..100
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Jwks\V1\KeyapisJwksKeyV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Вид использования.
     * # Диапазон: 2..32
     *
     * Generated from protobuf field <code>string use = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getUse()
    {
        return $this->use;
    }

    /**
     * Вид использования.
     * # Диапазон: 2..32
     *
     * Generated from protobuf field <code>string use = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setUse($var)
    {
        GPBUtil::checkString($var, True);
        $this->use = $var;

        return $this;
    }

    /**
     * Тип ключа.
     * # Диапазон: 2..32
     *
     * Generated from protobuf field <code>string kty = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getKty()
    {
        return $this->kty;
    }

    /**
     * Тип ключа.
     * # Диапазон: 2..32
     *
     * Generated from protobuf field <code>string kty = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setKty($var)
    {
        GPBUtil::checkString($var, True);
        $this->kty = $var;

        return $this;
    }

    /**
     * Идентификатор.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string kid = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getKid()
    {
        return $this->kid;
    }

    /**
     * Идентификатор.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string kid = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setKid($var)
    {
        GPBUtil::checkString($var, True);
        $this->kid = $var;

        return $this;
    }

    /**
     * Алгоритм шифрования.
     * # Диапазон: 2..32
     *
     * Generated from protobuf field <code>string alg = 4;</code>
     * @return string
     */
    public function getAlg()
    {
        return $this->alg;
    }

    /**
     * Алгоритм шифрования.
     * # Диапазон: 2..32
     *
     * Generated from protobuf field <code>string alg = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setAlg($var)
    {
        GPBUtil::checkString($var, True);
        $this->alg = $var;

        return $this;
    }

    /**
     * Параметр Modulus
     *
     * Generated from protobuf field <code>string n = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getN()
    {
        return $this->n;
    }

    /**
     * Параметр Modulus
     *
     * Generated from protobuf field <code>string n = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setN($var)
    {
        GPBUtil::checkString($var, True);
        $this->n = $var;

        return $this;
    }

    /**
     * Параметр Exponent
     *
     * Generated from protobuf field <code>string e = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getE()
    {
        return $this->e;
    }

    /**
     * Параметр Exponent
     *
     * Generated from protobuf field <code>string e = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setE($var)
    {
        GPBUtil::checkString($var, True);
        $this->e = $var;

        return $this;
    }

    /**
     * Цепочка сертификатов X.509.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>repeated string x5c = 7;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getX5C()
    {
        return $this->x5c;
    }

    /**
     * Цепочка сертификатов X.509.
     * # Диапазон: 0..100
     *
     * Generated from protobuf field <code>repeated string x5c = 7;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setX5C($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->x5c = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PublicKey::class, \Keyapis\Jwks\V1\KeyInfo_PublicKey::class);

