<?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
{
    /**
     * Required. The device registry path. Required. For example,
     * `projects/my-project/locations/us-central1/registries/my-registry`.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * A list of device numeric IDs. If empty, this field is ignored. Maximum
     * IDs: 10,000.
     *
     * Generated from protobuf field <code>repeated uint64 device_num_ids = 2;</code>
     */
    private $device_num_ids;
    /**
     * A list of device string IDs. For example, `['device0', 'device12']`.
     * If empty, this field is ignored. Maximum IDs: 10,000
     *
     * 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, along with any
     * other fields specified.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask field_mask = 4;</code>
     */
    private $field_mask = null;
    /**
     * Options related to gateways.
     *
     * Generated from protobuf field <code>.google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;</code>
     */
    private $gateway_list_options = 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. A non-empty `next_page_token` in the response
     * indicates that more data is 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
     * 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
     *           Required. 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 numeric IDs. If empty, this field is ignored. Maximum
     *           IDs: 10,000.
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $device_ids
     *           A list of device string IDs. For example, `['device0', 'device12']`.
     *           If empty, this field is ignored. Maximum IDs: 10,000
     *     @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, along with any
     *           other fields specified.
     *     @type \Google\Cloud\Iot\V1\GatewayListOptions $gateway_list_options
     *           Options related to gateways.
     *     @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. A non-empty `next_page_token` in the response
     *           indicates that more data is available.
     *     @type string $page_token
     *           The value returned by the last `ListDevicesResponse`; indicates
     *           that this is a continuation of a prior `ListDevices` call and
     *           the system should return the next page of data.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Iot\V1\DeviceManager::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * A list of device numeric IDs. If empty, this field is ignored. Maximum
     * IDs: 10,000.
     *
     * 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 numeric IDs. If empty, this field is ignored. Maximum
     * IDs: 10,000.
     *
     * 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 IDs. For example, `['device0', 'device12']`.
     * If empty, this field is ignored. Maximum IDs: 10,000
     *
     * 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 IDs. For example, `['device0', 'device12']`.
     * If empty, this field is ignored. Maximum IDs: 10,000
     *
     * 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, 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, 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;
    }

    /**
     * Options related to gateways.
     *
     * Generated from protobuf field <code>.google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;</code>
     * @return \Google\Cloud\Iot\V1\GatewayListOptions
     */
    public function getGatewayListOptions()
    {
        return $this->gateway_list_options;
    }

    /**
     * Options related to gateways.
     *
     * Generated from protobuf field <code>.google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;</code>
     * @param \Google\Cloud\Iot\V1\GatewayListOptions $var
     * @return $this
     */
    public function setGatewayListOptions($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\GatewayListOptions::class);
        $this->gateway_list_options = $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. A non-empty `next_page_token` in the response
     * indicates that more data is 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. A non-empty `next_page_token` in the response
     * indicates that more data is 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
     * 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
     * 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;
    }

}

