<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: proApi.proto

namespace Rv\Data\ProLink\TowerMessage;

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

/**
 * Generated from protobuf message <code>rv.data.ProLink.TowerMessage.TowerAddMemberResponse</code>
 */
class TowerAddMemberResponse extends \Google\Protobuf\Internal\Message
{
    protected $Response;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Rv\Data\ProLink\GroupDefinition $group_definition
     *     @type \Rv\Data\ProLink\TowerMessage\TowerAddMemberResponse\Accept $accept
     *     @type int $decline_reason
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\ProApi::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.rv.data.ProLink.GroupDefinition group_definition = 1;</code>
     * @return \Rv\Data\ProLink\GroupDefinition|null
     */
    public function getGroupDefinition()
    {
        return $this->readOneof(1);
    }

    public function hasGroupDefinition()
    {
        return $this->hasOneof(1);
    }

    /**
     * Generated from protobuf field <code>.rv.data.ProLink.GroupDefinition group_definition = 1;</code>
     * @param \Rv\Data\ProLink\GroupDefinition $var
     * @return $this
     */
    public function setGroupDefinition($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\ProLink\GroupDefinition::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.ProLink.TowerMessage.TowerAddMemberResponse.Accept accept = 2;</code>
     * @return \Rv\Data\ProLink\TowerMessage\TowerAddMemberResponse\Accept|null
     */
    public function getAccept()
    {
        return $this->readOneof(2);
    }

    public function hasAccept()
    {
        return $this->hasOneof(2);
    }

    /**
     * Generated from protobuf field <code>.rv.data.ProLink.TowerMessage.TowerAddMemberResponse.Accept accept = 2;</code>
     * @param \Rv\Data\ProLink\TowerMessage\TowerAddMemberResponse\Accept $var
     * @return $this
     */
    public function setAccept($var)
    {
        GPBUtil::checkMessage($var, \Rv\Data\ProLink\TowerMessage\TowerAddMemberResponse\Accept::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.rv.data.ProLink.TowerMessage.TowerAddMemberResponse.DeclineReason decline_reason = 3;</code>
     * @return int
     */
    public function getDeclineReason()
    {
        return $this->readOneof(3);
    }

    public function hasDeclineReason()
    {
        return $this->hasOneof(3);
    }

    /**
     * Generated from protobuf field <code>.rv.data.ProLink.TowerMessage.TowerAddMemberResponse.DeclineReason decline_reason = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setDeclineReason($var)
    {
        GPBUtil::checkEnum($var, \Rv\Data\ProLink\TowerMessage\TowerAddMemberResponse\DeclineReason::class);
        $this->writeOneof(3, $var);

        return $this;
    }

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

}

