<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/v2/sip_trunk.proto

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * SipTrunk is the resource that represents a SIP trunk to connect to Google
 * Telephony platform SIP trunking service.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.SipTrunk</code>
 */
class SipTrunk extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. The unique identifier of the SIP trunk.
     * Format: `projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk
     * ID>`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Required. The expected hostnames in the peer certificate from partner that
     * is used for TLS authentication.
     *
     * Generated from protobuf field <code>repeated string expected_hostname = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $expected_hostname;
    /**
     * Output only. Connections of the SIP trunk.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Connection connections = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $connections;
    /**
     * Optional. Human readable alias for this trunk.
     *
     * Generated from protobuf field <code>string display_name = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $display_name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. The unique identifier of the SIP trunk.
     *           Format: `projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk
     *           ID>`.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $expected_hostname
     *           Required. The expected hostnames in the peer certificate from partner that
     *           is used for TLS authentication.
     *     @type array<\Google\Cloud\Dialogflow\V2\Connection>|\Google\Protobuf\Internal\RepeatedField $connections
     *           Output only. Connections of the SIP trunk.
     *     @type string $display_name
     *           Optional. Human readable alias for this trunk.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\SipTrunk::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. The unique identifier of the SIP trunk.
     * Format: `projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk
     * ID>`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. The unique identifier of the SIP trunk.
     * Format: `projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk
     * ID>`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Required. The expected hostnames in the peer certificate from partner that
     * is used for TLS authentication.
     *
     * Generated from protobuf field <code>repeated string expected_hostname = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getExpectedHostname()
    {
        return $this->expected_hostname;
    }

    /**
     * Required. The expected hostnames in the peer certificate from partner that
     * is used for TLS authentication.
     *
     * Generated from protobuf field <code>repeated string expected_hostname = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setExpectedHostname($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->expected_hostname = $arr;

        return $this;
    }

    /**
     * Output only. Connections of the SIP trunk.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Connection connections = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getConnections()
    {
        return $this->connections;
    }

    /**
     * Output only. Connections of the SIP trunk.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Connection connections = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<\Google\Cloud\Dialogflow\V2\Connection>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setConnections($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Connection::class);
        $this->connections = $arr;

        return $this;
    }

    /**
     * Optional. Human readable alias for this trunk.
     *
     * Generated from protobuf field <code>string display_name = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Optional. Human readable alias for this trunk.
     *
     * Generated from protobuf field <code>string display_name = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

}

