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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.CreatePrivateLinkRequest</code>
 */
class CreatePrivateLinkRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string name = 1;</code>
     */
    protected $name = '';
    /**
     * Generated from protobuf field <code>string region = 3;</code>
     */
    protected $region = '';
    /**
     * Generated from protobuf field <code>uint32 port = 4;</code>
     */
    protected $port = 0;
    /**
     * Generated from protobuf field <code>string endpoint = 5;</code>
     */
    protected $endpoint = '';
    /**
     * Generated from protobuf field <code>optional string cloud_region = 6;</code>
     */
    protected $cloud_region = null;
    protected $config;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *     @type string $region
     *     @type int $port
     *     @type string $endpoint
     *     @type string $cloud_region
     *     @type \Livekit\CreatePrivateLinkRequest\AWSCreateConfig $aws
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitCloudAgent::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string region = 3;</code>
     * @return string
     */
    public function getRegion()
    {
        return $this->region;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 port = 4;</code>
     * @return int
     */
    public function getPort()
    {
        return $this->port;
    }

    /**
     * Generated from protobuf field <code>uint32 port = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setPort($var)
    {
        GPBUtil::checkUint32($var);
        $this->port = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string endpoint = 5;</code>
     * @return string
     */
    public function getEndpoint()
    {
        return $this->endpoint;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string cloud_region = 6;</code>
     * @return string
     */
    public function getCloudRegion()
    {
        return isset($this->cloud_region) ? $this->cloud_region : '';
    }

    public function hasCloudRegion()
    {
        return isset($this->cloud_region);
    }

    public function clearCloudRegion()
    {
        unset($this->cloud_region);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.CreatePrivateLinkRequest.AWSCreateConfig aws = 2 [deprecated = true];</code>
     * @return \Livekit\CreatePrivateLinkRequest\AWSCreateConfig|null
     * @deprecated
     */
    public function getAws()
    {
        if ($this->hasOneof(2)) {
            @trigger_error('aws is deprecated.', E_USER_DEPRECATED);
        }
        return $this->readOneof(2);
    }

    public function hasAws()
    {
        if ($this->hasOneof(2)) {
            @trigger_error('aws is deprecated.', E_USER_DEPRECATED);
        }
        return $this->hasOneof(2);
    }

    /**
     * Generated from protobuf field <code>.livekit.CreatePrivateLinkRequest.AWSCreateConfig aws = 2 [deprecated = true];</code>
     * @param \Livekit\CreatePrivateLinkRequest\AWSCreateConfig $var
     * @return $this
     * @deprecated
     */
    public function setAws($var)
    {
        @trigger_error('aws is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkMessage($var, \Livekit\CreatePrivateLinkRequest\AWSCreateConfig::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

