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

namespace Google\Cloud\Dialogflow\V2\Conversation;

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

/**
 * The information about phone calls connected via phone gateway to the
 * conversation.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo</code>
 */
class TelephonyConnectionInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The number dialed to connect this call in E.164 format.
     *
     * Generated from protobuf field <code>string dialed_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $dialed_number = '';
    /**
     * Optional. SDP of the call. It's initially the SDP answer to the incoming
     * call, but maybe later updated for the purpose of making the link active,
     * etc.
     *
     * Generated from protobuf field <code>string sdp = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $sdp = '';
    /**
     * Output only. The SIP headers from the initial SIP INVITE.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo.SipHeader sip_headers = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $sip_headers;
    /**
     * Output only. The mime content from the initial SIP INVITE.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo.MimeContent extra_mime_contents = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $extra_mime_contents;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $dialed_number
     *           Output only. The number dialed to connect this call in E.164 format.
     *     @type string $sdp
     *           Optional. SDP of the call. It's initially the SDP answer to the incoming
     *           call, but maybe later updated for the purpose of making the link active,
     *           etc.
     *     @type \Google\Cloud\Dialogflow\V2\Conversation\TelephonyConnectionInfo\SipHeader[] $sip_headers
     *           Output only. The SIP headers from the initial SIP INVITE.
     *     @type \Google\Cloud\Dialogflow\V2\Conversation\TelephonyConnectionInfo\MimeContent[] $extra_mime_contents
     *           Output only. The mime content from the initial SIP INVITE.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The number dialed to connect this call in E.164 format.
     *
     * Generated from protobuf field <code>string dialed_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getDialedNumber()
    {
        return $this->dialed_number;
    }

    /**
     * Output only. The number dialed to connect this call in E.164 format.
     *
     * Generated from protobuf field <code>string dialed_number = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setDialedNumber($var)
    {
        GPBUtil::checkString($var, True);
        $this->dialed_number = $var;

        return $this;
    }

    /**
     * Optional. SDP of the call. It's initially the SDP answer to the incoming
     * call, but maybe later updated for the purpose of making the link active,
     * etc.
     *
     * Generated from protobuf field <code>string sdp = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getSdp()
    {
        return $this->sdp;
    }

    /**
     * Optional. SDP of the call. It's initially the SDP answer to the incoming
     * call, but maybe later updated for the purpose of making the link active,
     * etc.
     *
     * Generated from protobuf field <code>string sdp = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setSdp($var)
    {
        GPBUtil::checkString($var, True);
        $this->sdp = $var;

        return $this;
    }

    /**
     * Output only. The SIP headers from the initial SIP INVITE.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo.SipHeader sip_headers = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return RepeatedField<\Google\Cloud\Dialogflow\V2\Conversation\TelephonyConnectionInfo\SipHeader>
     */
    public function getSipHeaders()
    {
        return $this->sip_headers;
    }

    /**
     * Output only. The SIP headers from the initial SIP INVITE.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo.SipHeader sip_headers = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dialogflow\V2\Conversation\TelephonyConnectionInfo\SipHeader[] $var
     * @return $this
     */
    public function setSipHeaders($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Conversation\TelephonyConnectionInfo\SipHeader::class);
        $this->sip_headers = $arr;

        return $this;
    }

    /**
     * Output only. The mime content from the initial SIP INVITE.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo.MimeContent extra_mime_contents = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return RepeatedField<\Google\Cloud\Dialogflow\V2\Conversation\TelephonyConnectionInfo\MimeContent>
     */
    public function getExtraMimeContents()
    {
        return $this->extra_mime_contents;
    }

    /**
     * Output only. The mime content from the initial SIP INVITE.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Conversation.TelephonyConnectionInfo.MimeContent extra_mime_contents = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Cloud\Dialogflow\V2\Conversation\TelephonyConnectionInfo\MimeContent[] $var
     * @return $this
     */
    public function setExtraMimeContents($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Conversation\TelephonyConnectionInfo\MimeContent::class);
        $this->extra_mime_contents = $arr;

        return $this;
    }

}

