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

namespace Keyapis\EncryptionProfile\V1;

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

/**
 * Профиль шифрования.
 * # Описание модели
 *
 * Generated from protobuf message <code>keyapis.encryption_profile.v1.EncryptionProfile</code>
 */
class EncryptionProfile extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор.
     * # Тип: Guid
     *
     * Generated from protobuf field <code>string id = 1;</code>
     */
    protected $id = '';
    /**
     * Наименование.
     * # Диапазон: 3..64
     *
     * Generated from protobuf field <code>string name = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $name = '';
    /**
     * Описание.
     * # Диапазон: 3..1000
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 3;</code>
     */
    protected $description = null;
    /**
     * Тип профиля шифрования
     *
     * Generated from protobuf field <code>.keyapis.encryption_profile.v1.EncryptionProfile.Type type = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $type = 0;
    /**
     * Номер сектора.
     * # Диапазон: 0..15
     *
     * Generated from protobuf field <code>int32 sector_number = 5;</code>
     */
    protected $sector_number = 0;
    /**
     * Номер блока.
     * # Диапазон: 0..3
     *
     * Generated from protobuf field <code>int32 block_number = 6;</code>
     */
    protected $block_number = 0;
    /**
     * Индекс первого символа для секрета.
     * # Диапазон: 0..31
     *
     * Generated from protobuf field <code>int32 start_index = 7;</code>
     */
    protected $start_index = 0;
    /**
     * Индекс последнего символа для секрета.
     * # Диапазон: 0..31
     *
     * Generated from protobuf field <code>int32 end_index = 8;</code>
     */
    protected $end_index = 0;
    /**
     * Пароль A профиля.
     * # Диапазон: 16..32
     *
     * Generated from protobuf field <code>string secret_a = 9 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     */
    protected $secret_a = '';
    /**
     * Зашифрованный пароль B профиля
     *
     * Generated from protobuf field <code>string encrypted_secret_a = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $encrypted_secret_a = '';
    /**
     * Пароль B профиля.
     * # Диапазон: 16..32
     *
     * Generated from protobuf field <code>string secret_b = 11 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     */
    protected $secret_b = '';
    /**
     * Зашифрованный пароль B профиля
     *
     * Generated from protobuf field <code>string encrypted_secret_b = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $encrypted_secret_b = '';
    /**
     * Дата создания.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $created_at = null;
    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении.
     * Является версией объекта.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 14;</code>
     */
    protected $changed_at = null;
    /**
     * Дата удаления.
     * # Тип: DateTime?
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp deleted_at = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $deleted_at = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Идентификатор.
     *           # Тип: Guid
     *     @type string $name
     *           Наименование.
     *           # Диапазон: 3..64
     *     @type \Google\Protobuf\StringValue $description
     *           Описание.
     *           # Диапазон: 3..1000
     *     @type int $type
     *           Тип профиля шифрования
     *     @type int $sector_number
     *           Номер сектора.
     *           # Диапазон: 0..15
     *     @type int $block_number
     *           Номер блока.
     *           # Диапазон: 0..3
     *     @type int $start_index
     *           Индекс первого символа для секрета.
     *           # Диапазон: 0..31
     *     @type int $end_index
     *           Индекс последнего символа для секрета.
     *           # Диапазон: 0..31
     *     @type string $secret_a
     *           Пароль A профиля.
     *           # Диапазон: 16..32
     *     @type string $encrypted_secret_a
     *           Зашифрованный пароль B профиля
     *     @type string $secret_b
     *           Пароль B профиля.
     *           # Диапазон: 16..32
     *     @type string $encrypted_secret_b
     *           Зашифрованный пароль B профиля
     *     @type \Google\Protobuf\Timestamp $created_at
     *           Дата создания.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $changed_at
     *           Дата последнего изменения.
     *           Заполняется и обновляется сервером.
     *           Заполняется при создании и изменении.
     *           Является версией объекта.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $deleted_at
     *           Дата удаления.
     *           # Тип: DateTime?
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\EncryptionProfile\V1\KeyapisEncryptionProfileEncryptionProfileV1::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;
    }

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

    /**
     * Наименование.
     * # Диапазон: 3..64
     *
     * 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;
    }

    /**
     * Описание.
     * # Диапазон: 3..1000
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 3;</code>
     * @return \Google\Protobuf\StringValue|null
     */
    public function getDescription()
    {
        return $this->description;
    }

    public function hasDescription()
    {
        return isset($this->description);
    }

    public function clearDescription()
    {
        unset($this->description);
    }

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

     * Описание.
     * # Диапазон: 3..1000
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 3;</code>
     * @return string|null
     */
    public function getDescriptionUnwrapped()
    {
        return $this->readWrapperValue("description");
    }

    /**
     * Описание.
     * # Диапазон: 3..1000
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 3;</code>
     * @param \Google\Protobuf\StringValue $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class);
        $this->description = $var;

        return $this;
    }

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

     * Описание.
     * # Диапазон: 3..1000
     *
     * Generated from protobuf field <code>.google.protobuf.StringValue description = 3;</code>
     * @param string|null $var
     * @return $this
     */
    public function setDescriptionUnwrapped($var)
    {
        $this->writeWrapperValue("description", $var);
        return $this;}

    /**
     * Тип профиля шифрования
     *
     * Generated from protobuf field <code>.keyapis.encryption_profile.v1.EncryptionProfile.Type type = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Тип профиля шифрования
     *
     * Generated from protobuf field <code>.keyapis.encryption_profile.v1.EncryptionProfile.Type type = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\EncryptionProfile\V1\EncryptionProfile\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Номер сектора.
     * # Диапазон: 0..15
     *
     * Generated from protobuf field <code>int32 sector_number = 5;</code>
     * @return int
     */
    public function getSectorNumber()
    {
        return $this->sector_number;
    }

    /**
     * Номер сектора.
     * # Диапазон: 0..15
     *
     * Generated from protobuf field <code>int32 sector_number = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setSectorNumber($var)
    {
        GPBUtil::checkInt32($var);
        $this->sector_number = $var;

        return $this;
    }

    /**
     * Номер блока.
     * # Диапазон: 0..3
     *
     * Generated from protobuf field <code>int32 block_number = 6;</code>
     * @return int
     */
    public function getBlockNumber()
    {
        return $this->block_number;
    }

    /**
     * Номер блока.
     * # Диапазон: 0..3
     *
     * Generated from protobuf field <code>int32 block_number = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setBlockNumber($var)
    {
        GPBUtil::checkInt32($var);
        $this->block_number = $var;

        return $this;
    }

    /**
     * Индекс первого символа для секрета.
     * # Диапазон: 0..31
     *
     * Generated from protobuf field <code>int32 start_index = 7;</code>
     * @return int
     */
    public function getStartIndex()
    {
        return $this->start_index;
    }

    /**
     * Индекс первого символа для секрета.
     * # Диапазон: 0..31
     *
     * Generated from protobuf field <code>int32 start_index = 7;</code>
     * @param int $var
     * @return $this
     */
    public function setStartIndex($var)
    {
        GPBUtil::checkInt32($var);
        $this->start_index = $var;

        return $this;
    }

    /**
     * Индекс последнего символа для секрета.
     * # Диапазон: 0..31
     *
     * Generated from protobuf field <code>int32 end_index = 8;</code>
     * @return int
     */
    public function getEndIndex()
    {
        return $this->end_index;
    }

    /**
     * Индекс последнего символа для секрета.
     * # Диапазон: 0..31
     *
     * Generated from protobuf field <code>int32 end_index = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setEndIndex($var)
    {
        GPBUtil::checkInt32($var);
        $this->end_index = $var;

        return $this;
    }

    /**
     * Пароль A профиля.
     * # Диапазон: 16..32
     *
     * Generated from protobuf field <code>string secret_a = 9 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @return string
     */
    public function getSecretA()
    {
        return $this->secret_a;
    }

    /**
     * Пароль A профиля.
     * # Диапазон: 16..32
     *
     * Generated from protobuf field <code>string secret_a = 9 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setSecretA($var)
    {
        GPBUtil::checkString($var, True);
        $this->secret_a = $var;

        return $this;
    }

    /**
     * Зашифрованный пароль B профиля
     *
     * Generated from protobuf field <code>string encrypted_secret_a = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getEncryptedSecretA()
    {
        return $this->encrypted_secret_a;
    }

    /**
     * Зашифрованный пароль B профиля
     *
     * Generated from protobuf field <code>string encrypted_secret_a = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setEncryptedSecretA($var)
    {
        GPBUtil::checkString($var, True);
        $this->encrypted_secret_a = $var;

        return $this;
    }

    /**
     * Пароль B профиля.
     * # Диапазон: 16..32
     *
     * Generated from protobuf field <code>string secret_b = 11 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @return string
     */
    public function getSecretB()
    {
        return $this->secret_b;
    }

    /**
     * Пароль B профиля.
     * # Диапазон: 16..32
     *
     * Generated from protobuf field <code>string secret_b = 11 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setSecretB($var)
    {
        GPBUtil::checkString($var, True);
        $this->secret_b = $var;

        return $this;
    }

    /**
     * Зашифрованный пароль B профиля
     *
     * Generated from protobuf field <code>string encrypted_secret_b = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getEncryptedSecretB()
    {
        return $this->encrypted_secret_b;
    }

    /**
     * Зашифрованный пароль B профиля
     *
     * Generated from protobuf field <code>string encrypted_secret_b = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setEncryptedSecretB($var)
    {
        GPBUtil::checkString($var, True);
        $this->encrypted_secret_b = $var;

        return $this;
    }

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

}

