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

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Represents a phone number for telephony integration. It allows for connecting
 * a particular conversation over telephony.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.ConversationPhoneNumber</code>
 */
class ConversationPhoneNumber extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Desired country code for the phone number.
     *
     * Generated from protobuf field <code>int32 country_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $country_code = 0;
    /**
     * Output only. The phone number to connect to this conversation.
     *
     * Generated from protobuf field <code>string phone_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $phone_number = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $country_code
     *           Output only. Desired country code for the phone number.
     *     @type string $phone_number
     *           Output only. The phone number to connect to this conversation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Desired country code for the phone number.
     *
     * Generated from protobuf field <code>int32 country_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getCountryCode()
    {
        return $this->country_code;
    }

    /**
     * Output only. Desired country code for the phone number.
     *
     * Generated from protobuf field <code>int32 country_code = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setCountryCode($var)
    {
        GPBUtil::checkInt32($var);
        $this->country_code = $var;

        return $this;
    }

    /**
     * Output only. The phone number to connect to this conversation.
     *
     * Generated from protobuf field <code>string phone_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getPhoneNumber()
    {
        return $this->phone_number;
    }

    /**
     * Output only. The phone number to connect to this conversation.
     *
     * Generated from protobuf field <code>string phone_number = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setPhoneNumber($var)
    {
        GPBUtil::checkString($var, True);
        $this->phone_number = $var;

        return $this;
    }

}

