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

namespace Google\Cloud\PolicyTroubleshooter\V1\BindingExplanation;

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

/**
 * Details about whether the binding includes the member.
 *
 * Generated from protobuf message <code>google.cloud.policytroubleshooter.v1.BindingExplanation.AnnotatedMembership</code>
 */
class AnnotatedMembership extends \Google\Protobuf\Internal\Message
{
    /**
     * Indicates whether the binding includes the member.
     *
     * Generated from protobuf field <code>.google.cloud.policytroubleshooter.v1.BindingExplanation.Membership membership = 1;</code>
     */
    private $membership = 0;
    /**
     * The relevance of the member's status to the overall determination for the
     * binding.
     *
     * Generated from protobuf field <code>.google.cloud.policytroubleshooter.v1.HeuristicRelevance relevance = 2;</code>
     */
    private $relevance = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $membership
     *           Indicates whether the binding includes the member.
     *     @type int $relevance
     *           The relevance of the member's status to the overall determination for the
     *           binding.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Policytroubleshooter\V1\Explanations::initOnce();
        parent::__construct($data);
    }

    /**
     * Indicates whether the binding includes the member.
     *
     * Generated from protobuf field <code>.google.cloud.policytroubleshooter.v1.BindingExplanation.Membership membership = 1;</code>
     * @return int
     */
    public function getMembership()
    {
        return $this->membership;
    }

    /**
     * Indicates whether the binding includes the member.
     *
     * Generated from protobuf field <code>.google.cloud.policytroubleshooter.v1.BindingExplanation.Membership membership = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setMembership($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\PolicyTroubleshooter\V1\BindingExplanation\Membership::class);
        $this->membership = $var;

        return $this;
    }

    /**
     * The relevance of the member's status to the overall determination for the
     * binding.
     *
     * Generated from protobuf field <code>.google.cloud.policytroubleshooter.v1.HeuristicRelevance relevance = 2;</code>
     * @return int
     */
    public function getRelevance()
    {
        return $this->relevance;
    }

    /**
     * The relevance of the member's status to the overall determination for the
     * binding.
     *
     * Generated from protobuf field <code>.google.cloud.policytroubleshooter.v1.HeuristicRelevance relevance = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setRelevance($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\PolicyTroubleshooter\V1\HeuristicRelevance::class);
        $this->relevance = $var;

        return $this;
    }

}


