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

namespace Keyapis\AccessControl\V1;

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

/**
 * Облегченная квартирограмма
 *
 * Generated from protobuf message <code>keyapis.access_control.v1.Flatgramm</code>
 */
class Flatgramm extends \Google\Protobuf\Internal\Message
{
    /**
     * Идентификатор
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     */
    protected $id = 0;
    /**
     * Наименование
     *
     * Generated from protobuf field <code>string title = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $title = '';
    /**
     * Идентификатор компании - владельца
     *
     * Generated from protobuf field <code>int32 company_id = 3;</code>
     */
    protected $company_id = 0;
    /**
     * Дата и время создания.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $created_at = null;
    /**
     * Дата последнего изменения.
     * Заполняется и обновляется сервером.
     * Заполняется при создании и изменении.
     * Является версией объекта.
     * # Тип: DateTime
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp changed_at = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $changed_at = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $id
     *           Идентификатор
     *     @type string $title
     *           Наименование
     *     @type int $company_id
     *           Идентификатор компании - владельца
     *     @type \Google\Protobuf\Timestamp $created_at
     *           Дата и время создания.
     *           # Тип: DateTime
     *     @type \Google\Protobuf\Timestamp $changed_at
     *           Дата последнего изменения.
     *           Заполняется и обновляется сервером.
     *           Заполняется при создании и изменении.
     *           Является версией объекта.
     *           # Тип: DateTime
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\AccessControl\V1\KeyapisAccessControlFlatgrammV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Идентификатор
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Идентификатор
     *
     * Generated from protobuf field <code>int32 id = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkInt32($var);
        $this->id = $var;

        return $this;
    }

    /**
     * Наименование
     *
     * Generated from protobuf field <code>string title = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

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

        return $this;
    }

    /**
     * Идентификатор компании - владельца
     *
     * Generated from protobuf field <code>int32 company_id = 3;</code>
     * @return int
     */
    public function getCompanyId()
    {
        return $this->company_id;
    }

    /**
     * Идентификатор компании - владельца
     *
     * Generated from protobuf field <code>int32 company_id = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setCompanyId($var)
    {
        GPBUtil::checkInt32($var);
        $this->company_id = $var;

        return $this;
    }

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

}

