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

namespace Google\Cloud\Kms\V1;

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

/**
 * Response message for [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys].
 *
 * Generated from protobuf message <code>google.cloud.kms.v1.ListCryptoKeysResponse</code>
 */
class ListCryptoKeysResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey].
     *
     * Generated from protobuf field <code>repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1;</code>
     */
    private $crypto_keys;
    /**
     * A token to retrieve next page of results. Pass this value in
     * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] to retrieve the next page of results.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     */
    private $next_page_token = '';
    /**
     * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that matched the query.
     *
     * Generated from protobuf field <code>int32 total_size = 3;</code>
     */
    private $total_size = 0;

    public function __construct() {
        \GPBMetadata\Google\Cloud\Kms\V1\Service::initOnce();
        parent::__construct();
    }

    /**
     * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey].
     *
     * Generated from protobuf field <code>repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCryptoKeys()
    {
        return $this->crypto_keys;
    }

    /**
     * The list of [CryptoKeys][google.cloud.kms.v1.CryptoKey].
     *
     * Generated from protobuf field <code>repeated .google.cloud.kms.v1.CryptoKey crypto_keys = 1;</code>
     * @param \Google\Cloud\Kms\V1\CryptoKey[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCryptoKeys($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\CryptoKey::class);
        $this->crypto_keys = $arr;

        return $this;
    }

    /**
     * A token to retrieve next page of results. Pass this value in
     * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] to retrieve the next page of results.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * A token to retrieve next page of results. Pass this value in
     * [ListCryptoKeysRequest.page_token][google.cloud.kms.v1.ListCryptoKeysRequest.page_token] to retrieve the next page of results.
     *
     * Generated from protobuf field <code>string next_page_token = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setNextPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->next_page_token = $var;

        return $this;
    }

    /**
     * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that matched the query.
     *
     * Generated from protobuf field <code>int32 total_size = 3;</code>
     * @return int
     */
    public function getTotalSize()
    {
        return $this->total_size;
    }

    /**
     * The total number of [CryptoKeys][google.cloud.kms.v1.CryptoKey] that matched the query.
     *
     * Generated from protobuf field <code>int32 total_size = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setTotalSize($var)
    {
        GPBUtil::checkInt32($var);
        $this->total_size = $var;

        return $this;
    }

}

