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

namespace Keyapis\Exchange\V1\MessagePushCall;

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

/**
 * Звонковый пуш
 *
 * Generated from protobuf message <code>keyapis.exchange.v1.MessagePushCall.PushCall</code>
 */
class PushCall extends \Google\Protobuf\Internal\Message
{
    /**
     * Пуш-токен адресата звонка
     *
     * Generated from protobuf field <code>string token = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $token = '';
    /**
     * Тип пуш-токена
     *
     * Generated from protobuf field <code>.keyapis.exchange.v1.MessagePushCall.PushCall.Type type = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $token
     *           Пуш-токен адресата звонка
     *     @type int $type
     *           Тип пуш-токена
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Exchange\V1\KeyapisExchangeMessageV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Пуш-токен адресата звонка
     *
     * Generated from protobuf field <code>string token = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getToken()
    {
        return $this->token;
    }

    /**
     * Пуш-токен адресата звонка
     *
     * Generated from protobuf field <code>string token = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->token = $var;

        return $this;
    }

    /**
     * Тип пуш-токена
     *
     * Generated from protobuf field <code>.keyapis.exchange.v1.MessagePushCall.PushCall.Type type = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Тип пуш-токена
     *
     * Generated from protobuf field <code>.keyapis.exchange.v1.MessagePushCall.PushCall.Type type = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\Exchange\V1\MessagePushCall\PushCall\Type::class);
        $this->type = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(PushCall::class, \Keyapis\Exchange\V1\MessagePushCall_PushCall::class);

