<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/device/v1/keyapis_device_trunk_config.proto

namespace Keyapis\Device\V1;

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

/**
 * Trunk-конфигурация.
 * # Описание модели
 *
 * Generated from protobuf message <code>keyapis.device.v1.TrunkConfig</code>
 */
class TrunkConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1;</code>
     */
    protected $id = '';
    /**
     * ОРПОН Города
     *
     * Generated from protobuf field <code>int64 city_orpon_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $city_orpon_id = 0;
    /**
     * Тип Trunk-аккаунта
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.SipTrunk.SipType device_sip_trunk_sip_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $device_sip_trunk_sip_type = 0;
    /**
     * IP-адрес.
     * # Диапазон: 7..15
     *
     * Generated from protobuf field <code>string ip_address = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $ip_address = '';
    /**
     * Порт.
     * # Диапазон: 0..65535
     *
     * Generated from protobuf field <code>int32 port = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $port = 0;
    /**
     * Дата создания.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $created_at = null;
    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении.
     * Является версией объекта.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 7;</code>
     */
    protected $changed_at = null;
    /**
     * Дата удаления.
     * # Тип: DateTime?
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp deleted_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $deleted_at = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Идентификатор.
     *           # Тип: Guid
     *     @type int|string $city_orpon_id
     *           ОРПОН Города
     *     @type int $device_sip_trunk_sip_type
     *           Тип Trunk-аккаунта
     *     @type string $ip_address
     *           IP-адрес.
     *           # Диапазон: 7..15
     *     @type int $port
     *           Порт.
     *           # Диапазон: 0..65535
     *     @type \Google\Protobuf\Timestamp $created_at
     *           Дата создания.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $changed_at
     *           Дата последнего изменения.
     *           Заполняется и обновляется сервером.
     *           Заполняется при создании и изменении.
     *           Является версией объекта.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $deleted_at
     *           Дата удаления.
     *           # Тип: DateTime?
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Device\V1\KeyapisDeviceTrunkConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Идентификатор.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * ОРПОН Города
     *
     * Generated from protobuf field <code>int64 city_orpon_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int|string
     */
    public function getCityOrponId()
    {
        return $this->city_orpon_id;
    }

    /**
     * ОРПОН Города
     *
     * Generated from protobuf field <code>int64 city_orpon_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int|string $var
     * @return $this
     */
    public function setCityOrponId($var)
    {
        GPBUtil::checkInt64($var);
        $this->city_orpon_id = $var;

        return $this;
    }

    /**
     * Тип Trunk-аккаунта
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.SipTrunk.SipType device_sip_trunk_sip_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getDeviceSipTrunkSipType()
    {
        return $this->device_sip_trunk_sip_type;
    }

    /**
     * Тип Trunk-аккаунта
     *
     * Generated from protobuf field <code>.keyapis.device.v1.Device.SipTrunk.SipType device_sip_trunk_sip_type = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setDeviceSipTrunkSipType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Device\V1\Device\SipTrunk\SipType::class);
        $this->device_sip_trunk_sip_type = $var;

        return $this;
    }

    /**
     * IP-адрес.
     * # Диапазон: 7..15
     *
     * Generated from protobuf field <code>string ip_address = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getIpAddress()
    {
        return $this->ip_address;
    }

    /**
     * IP-адрес.
     * # Диапазон: 7..15
     *
     * Generated from protobuf field <code>string ip_address = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setIpAddress($var)
    {
        GPBUtil::checkString($var, True);
        $this->ip_address = $var;

        return $this;
    }

    /**
     * Порт.
     * # Диапазон: 0..65535
     *
     * Generated from protobuf field <code>int32 port = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getPort()
    {
        return $this->port;
    }

    /**
     * Порт.
     * # Диапазон: 0..65535
     *
     * Generated from protobuf field <code>int32 port = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setPort($var)
    {
        GPBUtil::checkInt32($var);
        $this->port = $var;

        return $this;
    }

    /**
     * Дата создания.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreatedAt()
    {
        return $this->created_at;
    }

    public function hasCreatedAt()
    {
        return isset($this->created_at);
    }

    public function clearCreatedAt()
    {
        unset($this->created_at);
    }

    /**
     * Дата создания.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreatedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->created_at = $var;

        return $this;
    }

    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении.
     * Является версией объекта.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 7;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getChangedAt()
    {
        return $this->changed_at;
    }

    public function hasChangedAt()
    {
        return isset($this->changed_at);
    }

    public function clearChangedAt()
    {
        unset($this->changed_at);
    }

    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении.
     * Является версией объекта.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 7;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setChangedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->changed_at = $var;

        return $this;
    }

    /**
     * Дата удаления.
     * # Тип: DateTime?
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp deleted_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getDeletedAt()
    {
        return $this->deleted_at;
    }

    public function hasDeletedAt()
    {
        return isset($this->deleted_at);
    }

    public function clearDeletedAt()
    {
        unset($this->deleted_at);
    }

    /**
     * Дата удаления.
     * # Тип: DateTime?
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp deleted_at = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setDeletedAt($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->deleted_at = $var;

        return $this;
    }

}

