<?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;

/**
 * Метаданные клиента
 *
 * Generated from protobuf message <code>keyapis.omnichat.v1.ClientMetadata</code>
 */
class ClientMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Версия приложения.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_version = 1;</code>
     */
    protected $app_version = null;
    /**
     * Версия операционной системы.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue os_version = 2;</code>
     */
    protected $os_version = null;
    /**
     * Модель устройства.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue device_model = 3;</code>
     */
    protected $device_model = null;
    /**
     * Название приложения.
     * Для разных приложений мы можем использовать разные tenantId и channel_id, сопоставление хранится в конфиге сервиса
     *
     * Generated from protobuf field <code>string app_name = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $app_name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\StringValue $app_version
     *           Версия приложения.
     *           # Диапазон: 1..128
     *     @type \Google\Protobuf\StringValue $os_version
     *           Версия операционной системы.
     *           # Диапазон: 1..128
     *     @type \Google\Protobuf\StringValue $device_model
     *           Модель устройства.
     *           # Диапазон: 1..128
     *     @type string $app_name
     *           Название приложения.
     *           Для разных приложений мы можем использовать разные tenantId и channel_id, сопоставление хранится в конфиге сервиса
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Omnichat\V1\KeyapisOmnichatCredentialsV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Версия приложения.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_version = 1;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getAppVersion()
    {
        return $this->app_version;
    }

    public function hasAppVersion()
    {
        return isset($this->app_version);
    }

    public function clearAppVersion()
    {
        unset($this->app_version);
    }

    /**
     * Returns the unboxed value from <code>getAppVersion()</code>

     * Версия приложения.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_version = 1;</code>
     * @return string|null
     */
    public function getAppVersionUnwrapped()
    {
        return $this->readWrapperValue("app_version");
    }

    /**
     * Версия приложения.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_version = 1;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setAppVersion($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->app_version = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object.

     * Версия приложения.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue app_version = 1;</code>
     * @param string|null $var
     * @return $this
     */
    public function setAppVersionUnwrapped($var)
    {
        $this->writeWrapperValue("app_version", $var);
        return $this;}

    /**
     * Версия операционной системы.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue os_version = 2;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getOsVersion()
    {
        return $this->os_version;
    }

    public function hasOsVersion()
    {
        return isset($this->os_version);
    }

    public function clearOsVersion()
    {
        unset($this->os_version);
    }

    /**
     * Returns the unboxed value from <code>getOsVersion()</code>

     * Версия операционной системы.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue os_version = 2;</code>
     * @return string|null
     */
    public function getOsVersionUnwrapped()
    {
        return $this->readWrapperValue("os_version");
    }

    /**
     * Версия операционной системы.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue os_version = 2;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setOsVersion($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->os_version = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object.

     * Версия операционной системы.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue os_version = 2;</code>
     * @param string|null $var
     * @return $this
     */
    public function setOsVersionUnwrapped($var)
    {
        $this->writeWrapperValue("os_version", $var);
        return $this;}

    /**
     * Модель устройства.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue device_model = 3;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getDeviceModel()
    {
        return $this->device_model;
    }

    public function hasDeviceModel()
    {
        return isset($this->device_model);
    }

    public function clearDeviceModel()
    {
        unset($this->device_model);
    }

    /**
     * Returns the unboxed value from <code>getDeviceModel()</code>

     * Модель устройства.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue device_model = 3;</code>
     * @return string|null
     */
    public function getDeviceModelUnwrapped()
    {
        return $this->readWrapperValue("device_model");
    }

    /**
     * Модель устройства.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue device_model = 3;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setDeviceModel($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->device_model = $var;

        return $this;
    }

    /**
     * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object.

     * Модель устройства.
     * # Диапазон: 1..128
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue device_model = 3;</code>
     * @param string|null $var
     * @return $this
     */
    public function setDeviceModelUnwrapped($var)
    {
        $this->writeWrapperValue("device_model", $var);
        return $this;}

    /**
     * Название приложения.
     * Для разных приложений мы можем использовать разные tenantId и channel_id, сопоставление хранится в конфиге сервиса
     *
     * Generated from protobuf field <code>string app_name = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getAppName()
    {
        return $this->app_name;
    }

    /**
     * Название приложения.
     * Для разных приложений мы можем использовать разные tenantId и channel_id, сопоставление хранится в конфиге сервиса
     *
     * Generated from protobuf field <code>string app_name = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setAppName($var)
    {
        GPBUtil::checkString($var, True);
        $this->app_name = $var;

        return $this;
    }

}

