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

namespace Keyapis\Multiapp\V1;

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

/**
 * Партнер.
 * # Описание модели
 *
 * Generated from protobuf message <code>keyapis.multiapp.v1.Partner</code>
 */
class Partner extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор.
     * Если не передан создаётся сервером.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1;</code>
     */
    protected $id = '';
    /**
     * Наименование.
     * # Диапазон: 2..256
     *
     * Generated from protobuf field <code>string name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $name = '';
    /**
     * API ключ.
     * # Тип: Guid?
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key = 3 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     */
    protected $api_key = null;
    /**
     * Публичный ключ
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue public_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $public_key = null;
    /**
     * Дата создания партнера.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $created_at = null;
    /**
     * Дата обновления партнера.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 6;</code>
     */
    protected $changed_at = null;
    /**
     * Дата удаления партнера.
     * # Тип: DateTime?
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp deleted_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $deleted_at = null;
    /**
     * Хэш от API ключа
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key_hash = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $api_key_hash = null;
    /**
     * API ключ маскированный
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key_masked = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $api_key_masked = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Идентификатор.
     *           Если не передан создаётся сервером.
     *           # Тип: Guid
     *     @type string $name
     *           Наименование.
     *           # Диапазон: 2..256
     *     @type \Google\Protobuf\StringValue $api_key
     *           API ключ.
     *           # Тип: Guid?
     *     @type \Google\Protobuf\StringValue $public_key
     *           Публичный ключ
     *     @type \Google\Protobuf\Timestamp $created_at
     *           Дата создания партнера.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $changed_at
     *           Дата обновления партнера.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $deleted_at
     *           Дата удаления партнера.
     *           # Тип: DateTime?
     *     @type \Google\Protobuf\StringValue $api_key_hash
     *           Хэш от API ключа
     *     @type \Google\Protobuf\StringValue $api_key_masked
     *           API ключ маскированный
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Multiapp\V1\KeyapisMultiappPartnerV1::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;
    }

    /**
     * Наименование.
     * # Диапазон: 2..256
     *
     * Generated from protobuf field <code>string name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Наименование.
     * # Диапазон: 2..256
     *
     * Generated from protobuf field <code>string name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * API ключ.
     * # Тип: Guid?
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key = 3 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getApiKey()
    {
        return $this->api_key;
    }

    public function hasApiKey()
    {
        return isset($this->api_key);
    }

    public function clearApiKey()
    {
        unset($this->api_key);
    }

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

     * API ключ.
     * # Тип: Guid?
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key = 3 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @return string|null
     */
    public function getApiKeyUnwrapped()
    {
        return $this->readWrapperValue("api_key");
    }

    /**
     * API ключ.
     * # Тип: Guid?
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key = 3 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setApiKey($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->api_key = $var;

        return $this;
    }

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

     * API ключ.
     * # Тип: Guid?
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key = 3 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @param string|null $var
     * @return $this
     */
    public function setApiKeyUnwrapped($var)
    {
        $this->writeWrapperValue("api_key", $var);
        return $this;}

    /**
     * Публичный ключ
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue public_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getPublicKey()
    {
        return $this->public_key;
    }

    public function hasPublicKey()
    {
        return isset($this->public_key);
    }

    public function clearPublicKey()
    {
        unset($this->public_key);
    }

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

     * Публичный ключ
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue public_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string|null
     */
    public function getPublicKeyUnwrapped()
    {
        return $this->readWrapperValue("public_key");
    }

    /**
     * Публичный ключ
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue public_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setPublicKey($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->public_key = $var;

        return $this;
    }

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

     * Публичный ключ
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue public_key = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string|null $var
     * @return $this
     */
    public function setPublicKeyUnwrapped($var)
    {
        $this->writeWrapperValue("public_key", $var);
        return $this;}

    /**
     * Дата создания партнера.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 5 [(.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 = 5 [(.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 = 6;</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 = 6;</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 = 7 [(.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 = 7 [(.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;
    }

    /**
     * Хэш от API ключа
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key_hash = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getApiKeyHash()
    {
        return $this->api_key_hash;
    }

    public function hasApiKeyHash()
    {
        return isset($this->api_key_hash);
    }

    public function clearApiKeyHash()
    {
        unset($this->api_key_hash);
    }

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

     * Хэш от API ключа
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key_hash = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string|null
     */
    public function getApiKeyHashUnwrapped()
    {
        return $this->readWrapperValue("api_key_hash");
    }

    /**
     * Хэш от API ключа
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key_hash = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setApiKeyHash($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->api_key_hash = $var;

        return $this;
    }

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

     * Хэш от API ключа
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key_hash = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string|null $var
     * @return $this
     */
    public function setApiKeyHashUnwrapped($var)
    {
        $this->writeWrapperValue("api_key_hash", $var);
        return $this;}

    /**
     * API ключ маскированный
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key_masked = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getApiKeyMasked()
    {
        return $this->api_key_masked;
    }

    public function hasApiKeyMasked()
    {
        return isset($this->api_key_masked);
    }

    public function clearApiKeyMasked()
    {
        unset($this->api_key_masked);
    }

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

     * API ключ маскированный
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key_masked = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string|null
     */
    public function getApiKeyMaskedUnwrapped()
    {
        return $this->readWrapperValue("api_key_masked");
    }

    /**
     * API ключ маскированный
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key_masked = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setApiKeyMasked($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->api_key_masked = $var;

        return $this;
    }

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

     * API ключ маскированный
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue api_key_masked = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string|null $var
     * @return $this
     */
    public function setApiKeyMaskedUnwrapped($var)
    {
        $this->writeWrapperValue("api_key_masked", $var);
        return $this;}

}

