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

namespace Keyapis\Preset\V1;

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

/**
 * Запрос на получение списка пресетов
 *
 * Generated from protobuf message <code>keyapis.preset.v1.GetPresetListRequest</code>
 */
class GetPresetListRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Фильтр
     *
     * Generated from protobuf field <code>.keyapis.preset.v1.PresetFilter filter = 1;</code>
     */
    protected $filter = null;
    protected $pagination;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Keyapis\Preset\V1\PresetFilter $filter
     *           Фильтр
     *     @type \Keyapis\Preset\V1\PresetPaging $paging
     *           Стандартный постраничный вывод
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Keyapis\Preset\V1\KeyapisPresetPresetV1::initOnce();
        parent::__construct($data);
    }

    /**
     * Фильтр
     *
     * Generated from protobuf field <code>.keyapis.preset.v1.PresetFilter filter = 1;</code>
     * @return \Keyapis\Preset\V1\PresetFilter|null
     */
    public function getFilter()
    {
        return $this->filter;
    }

    public function hasFilter()
    {
        return isset($this->filter);
    }

    public function clearFilter()
    {
        unset($this->filter);
    }

    /**
     * Фильтр
     *
     * Generated from protobuf field <code>.keyapis.preset.v1.PresetFilter filter = 1;</code>
     * @param \Keyapis\Preset\V1\PresetFilter $var
     * @return $this
     */
    public function setFilter($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Preset\V1\PresetFilter::class);
        $this->filter = $var;

        return $this;
    }

    /**
     * Стандартный постраничный вывод
     *
     * Generated from protobuf field <code>.keyapis.preset.v1.PresetPaging paging = 2;</code>
     * @return \Keyapis\Preset\V1\PresetPaging|null
     */
    public function getPaging()
    {
        return $this->readOneof(2);
    }

    public function hasPaging()
    {
        return $this->hasOneof(2);
    }

    /**
     * Стандартный постраничный вывод
     *
     * Generated from protobuf field <code>.keyapis.preset.v1.PresetPaging paging = 2;</code>
     * @param \Keyapis\Preset\V1\PresetPaging $var
     * @return $this
     */
    public function setPaging($var)
    {
        GPBUtil::checkMessage($var, \Keyapis\Preset\V1\PresetPaging::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getPagination()
    {
        return $this->whichOneof("pagination");
    }

}

