<?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.UpdateSIPInboundTrunkRequest</code>
 */
class UpdateSIPInboundTrunkRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string sip_trunk_id = 1;</code>
     */
    protected $sip_trunk_id = '';
    protected $action;

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

    /**
     * Generated from protobuf field <code>string sip_trunk_id = 1;</code>
     * @return string
     */
    public function getSipTrunkId()
    {
        return $this->sip_trunk_id;
    }

    /**
     * Generated from protobuf field <code>string sip_trunk_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setSipTrunkId($var)
    {
        GPBUtil::checkString($var, True);
        $this->sip_trunk_id = $var;

        return $this;
    }

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

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

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

        return $this;
    }

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

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

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

        return $this;
    }

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

}

