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

namespace Google\Cloud\GkeHub\V1;

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

/**
 * MembershipFeatureState contains Feature status information for a single
 * Membership.
 *
 * Generated from protobuf message <code>google.cloud.gkehub.v1.MembershipFeatureState</code>
 */
class MembershipFeatureState extends \Google\Protobuf\Internal\Message
{
    /**
     * The high-level state of this Feature for a single membership.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1.FeatureState state = 1;</code>
     */
    private $state = null;
    protected $feature_state;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState $configmanagement
     *           Config Management-specific state.
     *     @type \Google\Cloud\GkeHub\V1\FeatureState $state
     *           The high-level state of this Feature for a single membership.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Gkehub\V1\Feature::initOnce();
        parent::__construct($data);
    }

    /**
     * Config Management-specific state.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.configmanagement.v1.MembershipState configmanagement = 106;</code>
     * @return \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState|null
     */
    public function getConfigmanagement()
    {
        return $this->readOneof(106);
    }

    public function hasConfigmanagement()
    {
        return $this->hasOneof(106);
    }

    /**
     * Config Management-specific state.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.configmanagement.v1.MembershipState configmanagement = 106;</code>
     * @param \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState $var
     * @return $this
     */
    public function setConfigmanagement($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\ConfigManagement\V1\MembershipState::class);
        $this->writeOneof(106, $var);

        return $this;
    }

    /**
     * The high-level state of this Feature for a single membership.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1.FeatureState state = 1;</code>
     * @return \Google\Cloud\GkeHub\V1\FeatureState|null
     */
    public function getState()
    {
        return $this->state;
    }

    public function hasState()
    {
        return isset($this->state);
    }

    public function clearState()
    {
        unset($this->state);
    }

    /**
     * The high-level state of this Feature for a single membership.
     *
     * Generated from protobuf field <code>.google.cloud.gkehub.v1.FeatureState state = 1;</code>
     * @param \Google\Cloud\GkeHub\V1\FeatureState $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\GkeHub\V1\FeatureState::class);
        $this->state = $var;

        return $this;
    }

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

}

