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

namespace Deviceapis\Device\V1\GetSipAccountStatusListResponse;

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

/**
 * Статус аккаунтов Sip
 *
 * Generated from protobuf message <code>deviceapis.device.v1.GetSipAccountStatusListResponse.SipStatus</code>
 */
class SipStatus extends \Google\Protobuf\Internal\Message
{
    /**
     * ID Sip-аккаунта
     *
     * Generated from protobuf field <code>string sip_account_id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     */
    protected $sip_account_id = '';
    /**
     * Статус регистрации Sip
     *
     * Generated from protobuf field <code>.deviceapis.device.v1.GetSipAccountStatusListResponse.SipStatus.StateType state_type = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     */
    protected $state_type = 0;
    /**
     * Дата последней попытки регистрации UnixTime
     *
     * Generated from protobuf field <code>int32 last_attempt_register_at = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     */
    protected $last_attempt_register_at = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $sip_account_id
     *           ID Sip-аккаунта
     *     @type int $state_type
     *           Статус регистрации Sip
     *     @type int $last_attempt_register_at
     *           Дата последней попытки регистрации UnixTime
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Deviceapis\Device\V1\DeviceapisDeviceSipV1::initOnce();
        parent::__construct($data);
    }

    /**
     * ID Sip-аккаунта
     *
     * Generated from protobuf field <code>string sip_account_id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     * @return string
     */
    public function getSipAccountId()
    {
        return $this->sip_account_id;
    }

    /**
     * ID Sip-аккаунта
     *
     * Generated from protobuf field <code>string sip_account_id = 1 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     * @param string $var
     * @return $this
     */
    public function setSipAccountId($var)
    {
        GPBUtil::checkString($var, True);
        $this->sip_account_id = $var;

        return $this;
    }

    /**
     * Статус регистрации Sip
     *
     * Generated from protobuf field <code>.deviceapis.device.v1.GetSipAccountStatusListResponse.SipStatus.StateType state_type = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     * @return int
     */
    public function getStateType()
    {
        return $this->state_type;
    }

    /**
     * Статус регистрации Sip
     *
     * Generated from protobuf field <code>.deviceapis.device.v1.GetSipAccountStatusListResponse.SipStatus.StateType state_type = 2 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     * @param int $var
     * @return $this
     */
    public function setStateType($var)
    {
        GPBUtil::checkEnum($var, \Deviceapis\Device\V1\GetSipAccountStatusListResponse\SipStatus\StateType::class);
        $this->state_type = $var;

        return $this;
    }

    /**
     * Дата последней попытки регистрации UnixTime
     *
     * Generated from protobuf field <code>int32 last_attempt_register_at = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     * @return int
     */
    public function getLastAttemptRegisterAt()
    {
        return $this->last_attempt_register_at;
    }

    /**
     * Дата последней попытки регистрации UnixTime
     *
     * Generated from protobuf field <code>int32 last_attempt_register_at = 3 [(.grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {</code>
     * @param int $var
     * @return $this
     */
    public function setLastAttemptRegisterAt($var)
    {
        GPBUtil::checkInt32($var);
        $this->last_attempt_register_at = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SipStatus::class, \Deviceapis\Device\V1\GetSipAccountStatusListResponse_SipStatus::class);

