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

namespace Keyapis\Omnichat\V1;

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

/**
 * Реквезиты для авторизации в omnichat
 *
 * Generated from protobuf message <code>keyapis.omnichat.v1.Credentials</code>
 */
class Credentials extends \Google\Protobuf\Internal\Message
{
    /**
     * Закодированные в base64 клиентские данные.
     * Состав: appVersion, os, deviceModel, tenantId, login, phone, email, group_id, address, лицевые счета
     *
     * Generated from protobuf field <code>string payload = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $payload = '';
    /**
     * HMAC-подпись от payload (клиентских данных)
     *
     * Generated from protobuf field <code>string hash = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $hash = '';
    /**
     * Идентификатор канала в omnichat.
     * Определяется исходя из типа приложения
     *
     * Generated from protobuf field <code>int32 channel_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $channel_id = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $payload
     *           Закодированные в base64 клиентские данные.
     *           Состав: appVersion, os, deviceModel, tenantId, login, phone, email, group_id, address, лицевые счета
     *     @type string $hash
     *           HMAC-подпись от payload (клиентских данных)
     *     @type int $channel_id
     *           Идентификатор канала в omnichat.
     *           Определяется исходя из типа приложения
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Omnichat\V1\KeyapisOmnichatCredentialsV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Закодированные в base64 клиентские данные.
     * Состав: appVersion, os, deviceModel, tenantId, login, phone, email, group_id, address, лицевые счета
     *
     * Generated from protobuf field <code>string payload = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getPayload()
    {
        return $this->payload;
    }

    /**
     * Закодированные в base64 клиентские данные.
     * Состав: appVersion, os, deviceModel, tenantId, login, phone, email, group_id, address, лицевые счета
     *
     * Generated from protobuf field <code>string payload = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setPayload($var)
    {
        GPBUtil::checkString($var, True);
        $this->payload = $var;

        return $this;
    }

    /**
     * HMAC-подпись от payload (клиентских данных)
     *
     * Generated from protobuf field <code>string hash = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getHash()
    {
        return $this->hash;
    }

    /**
     * HMAC-подпись от payload (клиентских данных)
     *
     * Generated from protobuf field <code>string hash = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setHash($var)
    {
        GPBUtil::checkString($var, True);
        $this->hash = $var;

        return $this;
    }

    /**
     * Идентификатор канала в omnichat.
     * Определяется исходя из типа приложения
     *
     * Generated from protobuf field <code>int32 channel_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getChannelId()
    {
        return $this->channel_id;
    }

    /**
     * Идентификатор канала в omnichat.
     * Определяется исходя из типа приложения
     *
     * Generated from protobuf field <code>int32 channel_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setChannelId($var)
    {
        GPBUtil::checkInt32($var);
        $this->channel_id = $var;

        return $this;
    }

}

