<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/access_control/v1/keyapis_access_control_entrance_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.EntranceFilter</code>
 */
class EntranceFilter extends \Google\Protobuf\Internal\Message
{
    /**
     * По идентификаторам квартирограмм
     *
     * Generated from protobuf field <code>repeated int32 flatgramm_ids = 1;</code>
     */
    private $flatgramm_ids;
    /**
     * По ОРПОН
     *
     * Generated from protobuf field <code>repeated int64 orpons = 2;</code>
     */
    private $orpons;
    /**
     * По идентификаторам компаний
     *
     * Generated from protobuf field <code>repeated int32 company_ids = 3;</code>
     */
    private $company_ids;
    /**
     * Тип связи компании с подъездами
     *
     * Generated from protobuf field <code>.keyapis.access_control.v1.EntranceFilter.CompanyRelationType company_relation_type = 4;</code>
     */
    protected $company_relation_type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $flatgramm_ids
     *           По идентификаторам квартирограмм
     *     @type array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $orpons
     *           По ОРПОН
     *     @type array<int>|\Google\Protobuf\Internal\RepeatedField $company_ids
     *           По идентификаторам компаний
     *     @type int $company_relation_type
     *           Тип связи компании с подъездами
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\AccessControl\V1\KeyapisAccessControlEntranceV1::initOnce();
        parent::__construct($data);
    }

    /**
     * По идентификаторам квартирограмм
     *
     * Generated from protobuf field <code>repeated int32 flatgramm_ids = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFlatgrammIds()
    {
        return $this->flatgramm_ids;
    }

    /**
     * По идентификаторам квартирограмм
     *
     * Generated from protobuf field <code>repeated int32 flatgramm_ids = 1;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFlatgrammIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->flatgramm_ids = $arr;

        return $this;
    }

    /**
     * По ОРПОН
     *
     * Generated from protobuf field <code>repeated int64 orpons = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getOrpons()
    {
        return $this->orpons;
    }

    /**
     * По ОРПОН
     *
     * Generated from protobuf field <code>repeated int64 orpons = 2;</code>
     * @param array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setOrpons($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64);
        $this->orpons = $arr;

        return $this;
    }

    /**
     * По идентификаторам компаний
     *
     * Generated from protobuf field <code>repeated int32 company_ids = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCompanyIds()
    {
        return $this->company_ids;
    }

    /**
     * По идентификаторам компаний
     *
     * Generated from protobuf field <code>repeated int32 company_ids = 3;</code>
     * @param array<int>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCompanyIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
        $this->company_ids = $arr;

        return $this;
    }

    /**
     * Тип связи компании с подъездами
     *
     * Generated from protobuf field <code>.keyapis.access_control.v1.EntranceFilter.CompanyRelationType company_relation_type = 4;</code>
     * @return int
     */
    public function getCompanyRelationType()
    {
        return $this->company_relation_type;
    }

    /**
     * Тип связи компании с подъездами
     *
     * Generated from protobuf field <code>.keyapis.access_control.v1.EntranceFilter.CompanyRelationType company_relation_type = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setCompanyRelationType($var)
    {
        GPBUtil::checkEnum($var, \Keyapis\AccessControl\V1\EntranceFilter\CompanyRelationType::class);
        $this->company_relation_type = $var;

        return $this;
    }

}

