<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: couchbase/admin/collection/v1/collection.proto

namespace Couchbase\Protostellar\Generated\Admin\Collection\V1\ListCollectionsResponse;

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

/**
 * Generated from protobuf message <code>couchbase.admin.collection.v1.ListCollectionsResponse.Collection</code>
 */
class Collection extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Generated from protobuf field <code>optional uint32 max_expiry_secs = 2;</code>
     */
    protected $max_expiry_secs = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *     @type int $max_expiry_secs
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Couchbase\Admin\Collection\V1\Collection::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 max_expiry_secs = 2;</code>
     * @return int
     */
    public function getMaxExpirySecs()
    {
        return isset($this->max_expiry_secs) ? $this->max_expiry_secs : 0;
    }

    public function hasMaxExpirySecs()
    {
        return isset($this->max_expiry_secs);
    }

    public function clearMaxExpirySecs()
    {
        unset($this->max_expiry_secs);
    }

    /**
     * Generated from protobuf field <code>optional uint32 max_expiry_secs = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setMaxExpirySecs($var)
    {
        GPBUtil::checkUint32($var);
        $this->max_expiry_secs = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Collection::class, \Couchbase\Protostellar\Generated\Admin\Collection\V1\ListCollectionsResponse_Collection::class);

