<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/iot/v1/device_manager.proto

namespace Google\Cloud\Iot\V1;

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

/**
 * Request for `ListDevices`.
 *
 * Generated from protobuf message <code>google.cloud.iot.v1.ListDevicesRequest</code>
 */
class ListDevicesRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The device registry path. Required. For example,
     * `projects/my-project/locations/us-central1/registries/my-registry`.
     *
     * Generated from protobuf field <code>string parent = 1;</code>
     */
    private $parent = '';
    /**
     * A list of device numerical ids. If empty, it will ignore this field. This
     * field cannot hold more than 10,000 entries.
     *
     * Generated from protobuf field <code>repeated uint64 device_num_ids = 2;</code>
     */
    private $device_num_ids;
    /**
     * A list of device string identifiers. If empty, it will ignore this field.
     * For example, `['device0', 'device12']`. This field cannot hold more than
     * 10,000 entries.
     *
     * Generated from protobuf field <code>repeated string device_ids = 3;</code>
     */
    private $device_ids;
    /**
     * The fields of the `Device` resource to be returned in the response. The
     * fields `id`, and `num_id` are always returned by default, along with any
     * other fields specified.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask field_mask = 4;</code>
     */
    private $field_mask = null;
    /**
     * The maximum number of devices to return in the response. If this value
     * is zero, the service will select a default size. A call may return fewer
     * objects than requested, but if there is a non-empty `page_token`, it
     * indicates that more entries are available.
     *
     * Generated from protobuf field <code>int32 page_size = 100;</code>
     */
    private $page_size = 0;
    /**
     * The value returned by the last `ListDevicesResponse`; indicates
     * that this is a continuation of a prior `ListDevices` call, and
     * that the system should return the next page of data.
     *
     * Generated from protobuf field <code>string page_token = 101;</code>
     */
    private $page_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           The device registry path. Required. For example,
     *           `projects/my-project/locations/us-central1/registries/my-registry`.
     *     @type int[]|string[]|\Google\Protobuf\Internal\RepeatedField $device_num_ids
     *           A list of device numerical ids. If empty, it will ignore this field. This
     *           field cannot hold more than 10,000 entries.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $device_ids
     *           A list of device string identifiers. If empty, it will ignore this field.
     *           For example, `['device0', 'device12']`. This field cannot hold more than
     *           10,000 entries.
     *     @type \Google\Protobuf\FieldMask $field_mask
     *           The fields of the `Device` resource to be returned in the response. The
     *           fields `id`, and `num_id` are always returned by default, along with any
     *           other fields specified.
     *     @type int $page_size
     *           The maximum number of devices to return in the response. If this value
     *           is zero, the service will select a default size. A call may return fewer
     *           objects than requested, but if there is a non-empty `page_token`, it
     *           indicates that more entries are available.
     *     @type string $page_token
     *           The value returned by the last `ListDevicesResponse`; indicates
     *           that this is a continuation of a prior `ListDevices` call, and
     *           that the system should return the next page of data.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce();
        parent::__construct($data);
    }

    /**
     * The device registry path. Required. For example,
     * `projects/my-project/locations/us-central1/registries/my-registry`.
     *
     * Generated from protobuf field <code>string parent = 1;</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * The device registry path. Required. For example,
     * `projects/my-project/locations/us-central1/registries/my-registry`.
     *
     * Generated from protobuf field <code>string parent = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * A list of device numerical ids. If empty, it will ignore this field. This
     * field cannot hold more than 10,000 entries.
     *
     * Generated from protobuf field <code>repeated uint64 device_num_ids = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDeviceNumIds()
    {
        return $this->device_num_ids;
    }

    /**
     * A list of device numerical ids. If empty, it will ignore this field. This
     * field cannot hold more than 10,000 entries.
     *
     * Generated from protobuf field <code>repeated uint64 device_num_ids = 2;</code>
     * @param int[]|string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDeviceNumIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT64);
        $this->device_num_ids = $arr;

        return $this;
    }

    /**
     * A list of device string identifiers. If empty, it will ignore this field.
     * For example, `['device0', 'device12']`. This field cannot hold more than
     * 10,000 entries.
     *
     * Generated from protobuf field <code>repeated string device_ids = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getDeviceIds()
    {
        return $this->device_ids;
    }

    /**
     * A list of device string identifiers. If empty, it will ignore this field.
     * For example, `['device0', 'device12']`. This field cannot hold more than
     * 10,000 entries.
     *
     * Generated from protobuf field <code>repeated string device_ids = 3;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setDeviceIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->device_ids = $arr;

        return $this;
    }

    /**
     * The fields of the `Device` resource to be returned in the response. The
     * fields `id`, and `num_id` are always returned by default, along with any
     * other fields specified.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask field_mask = 4;</code>
     * @return \Google\Protobuf\FieldMask
     */
    public function getFieldMask()
    {
        return $this->field_mask;
    }

    /**
     * The fields of the `Device` resource to be returned in the response. The
     * fields `id`, and `num_id` are always returned by default, along with any
     * other fields specified.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask field_mask = 4;</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setFieldMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->field_mask = $var;

        return $this;
    }

    /**
     * The maximum number of devices to return in the response. If this value
     * is zero, the service will select a default size. A call may return fewer
     * objects than requested, but if there is a non-empty `page_token`, it
     * indicates that more entries are available.
     *
     * Generated from protobuf field <code>int32 page_size = 100;</code>
     * @return int
     */
    public function getPageSize()
    {
        return $this->page_size;
    }

    /**
     * The maximum number of devices to return in the response. If this value
     * is zero, the service will select a default size. A call may return fewer
     * objects than requested, but if there is a non-empty `page_token`, it
     * indicates that more entries are available.
     *
     * Generated from protobuf field <code>int32 page_size = 100;</code>
     * @param int $var
     * @return $this
     */
    public function setPageSize($var)
    {
        GPBUtil::checkInt32($var);
        $this->page_size = $var;

        return $this;
    }

    /**
     * The value returned by the last `ListDevicesResponse`; indicates
     * that this is a continuation of a prior `ListDevices` call, and
     * that the system should return the next page of data.
     *
     * Generated from protobuf field <code>string page_token = 101;</code>
     * @return string
     */
    public function getPageToken()
    {
        return $this->page_token;
    }

    /**
     * The value returned by the last `ListDevicesResponse`; indicates
     * that this is a continuation of a prior `ListDevices` call, and
     * that the system should return the next page of data.
     *
     * Generated from protobuf field <code>string page_token = 101;</code>
     * @param string $var
     * @return $this
     */
    public function setPageToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->page_token = $var;

        return $this;
    }

}

