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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.UpdateSIPDispatchRuleRequest</code>
 */
class UpdateSIPDispatchRuleRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string sip_dispatch_rule_id = 1 [(.logger.name) = "sipDispatchRuleID"];</code>
     */
    protected $sip_dispatch_rule_id = '';
    protected $action;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $sip_dispatch_rule_id
     *     @type \Livekit\SIPDispatchRuleInfo $replace
     *     @type \Livekit\SIPDispatchRuleUpdate $update
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitSip::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string sip_dispatch_rule_id = 1 [(.logger.name) = "sipDispatchRuleID"];</code>
     * @return string
     */
    public function getSipDispatchRuleId()
    {
        return $this->sip_dispatch_rule_id;
    }

    /**
     * Generated from protobuf field <code>string sip_dispatch_rule_id = 1 [(.logger.name) = "sipDispatchRuleID"];</code>
     * @param string $var
     * @return $this
     */
    public function setSipDispatchRuleId($var)
    {
        GPBUtil::checkString($var, True);
        $this->sip_dispatch_rule_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.SIPDispatchRuleInfo replace = 2;</code>
     * @return \Livekit\SIPDispatchRuleInfo|null
     */
    public function getReplace()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Generated from protobuf field <code>.livekit.SIPDispatchRuleInfo replace = 2;</code>
     * @param \Livekit\SIPDispatchRuleInfo $var
     * @return $this
     */
    public function setReplace($var)
    {
        GPBUtil::checkMessage($var, \Livekit\SIPDispatchRuleInfo::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.SIPDispatchRuleUpdate update = 3;</code>
     * @return \Livekit\SIPDispatchRuleUpdate|null
     */
    public function getUpdate()
    {
        return $this->readOneof(3);
    }

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

    /**
     * Generated from protobuf field <code>.livekit.SIPDispatchRuleUpdate update = 3;</code>
     * @param \Livekit\SIPDispatchRuleUpdate $var
     * @return $this
     */
    public function setUpdate($var)
    {
        GPBUtil::checkMessage($var, \Livekit\SIPDispatchRuleUpdate::class);
        $this->writeOneof(3, $var);

        return $this;
    }

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

}

