<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/gkehub/v1beta1/membership.proto

namespace Google\Cloud\GkeHub\V1beta1;

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

/**
 * State of the Membership resource.
 *
 * Generated from protobuf message <code>google.cloud.gkehub.v1beta1.MembershipState</code>
 */
class MembershipState extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The current state of the Membership resource.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1beta1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $code = 0;
    /**
     * This field is never set by the Hub Service.
     *
     * Generated from protobuf field <code>string description = 2 [deprecated = true];</code>
     * @deprecated
     */
    protected $description = '';
    /**
     * This field is never set by the Hub Service.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [deprecated = true];</code>
     * @deprecated
     */
    protected $update_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $code
     *           Output only. The current state of the Membership resource.
     *     @type string $description
     *           This field is never set by the Hub Service.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           This field is never set by the Hub Service.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkehub\V1Beta1\Membership::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The current state of the Membership resource.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1beta1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * Output only. The current state of the Membership resource.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1beta1.MembershipState.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setCode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\GkeHub\V1beta1\MembershipState\Code::class);
        $this->code = $var;

        return $this;
    }

    /**
     * This field is never set by the Hub Service.
     *
     * Generated from protobuf field <code>string description = 2 [deprecated = true];</code>
     * @return string
     * @deprecated
     */
    public function getDescription()
    {
        @trigger_error('description is deprecated.', E_USER_DEPRECATED);
        return $this->description;
    }

    /**
     * This field is never set by the Hub Service.
     *
     * Generated from protobuf field <code>string description = 2 [deprecated = true];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setDescription($var)
    {
        @trigger_error('description is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * This field is never set by the Hub Service.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [deprecated = true];</code>
     * @return \Google\Protobuf\Timestamp|null
     * @deprecated
     */
    public function getUpdateTime()
    {
        @trigger_error('update_time is deprecated.', E_USER_DEPRECATED);
        return $this->update_time;
    }

    public function hasUpdateTime()
    {
        @trigger_error('update_time is deprecated.', E_USER_DEPRECATED);
        return isset($this->update_time);
    }

    public function clearUpdateTime()
    {
        @trigger_error('update_time is deprecated.', E_USER_DEPRECATED);
        unset($this->update_time);
    }

    /**
     * This field is never set by the Hub Service.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 3 [deprecated = true];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     * @deprecated
     */
    public function setUpdateTime($var)
    {
        @trigger_error('update_time is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

}

