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

namespace Keyapis\Kms\V1;

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

/**
 * Ответ на запрос на получение ключей
 *
 * Generated from protobuf message <code>keyapis.kms.v1.GetKmsKeyListResponse</code>
 */
class GetKmsKeyListResponse extends \Google\Protobuf\Internal\Message
{
    protected $type;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Keyapis\Kms\V1\KeyInfo $data
     *           Ключ.
     *           В ключе должен отсутсвовать encrypted_private_key
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Kms\V1\KeyapisKmsKeyV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Ключ.
     * В ключе должен отсутсвовать encrypted_private_key
     *
     * Generated from protobuf field <code>.keyapis.kms.v1.KeyInfo data = 1;</code>
     * @return \Keyapis\Kms\V1\KeyInfo|null
     */
    public function getData()
    {
        return $this->readOneof(1);
    }

    public function hasData()
    {
        return $this->hasOneof(1);
    }

    /**
     * Ключ.
     * В ключе должен отсутсвовать encrypted_private_key
     *
     * Generated from protobuf field <code>.keyapis.kms.v1.KeyInfo data = 1;</code>
     * @param \Keyapis\Kms\V1\KeyInfo $var
     * @return $this
     */
    public function setData($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Kms\V1\KeyInfo::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getType()
    {
        return $this->whichOneof("type");
    }

}

