Class ListDevicesRequest.Builder (2.42.0)

public static final class ListDevicesRequest.Builder extends GeneratedMessageV3.Builder<ListDevicesRequest.Builder> implements ListDevicesRequestOrBuilder

Request for ListDevices.

Protobuf type google.cloud.iot.v1.ListDevicesRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllDeviceIds(Iterable<String> values)

public ListDevicesRequest.Builder addAllDeviceIds(Iterable<String> values)

A list of device string IDs. For example, ['device0', 'device12']. If empty, this field is ignored. Maximum IDs: 10,000

repeated string device_ids = 3;

Parameter
Name Description
values Iterable<String>

The deviceIds to add.

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

addAllDeviceNumIds(Iterable<? extends Long> values)

public ListDevicesRequest.Builder addAllDeviceNumIds(Iterable<? extends Long> values)

A list of device numeric IDs. If empty, this field is ignored. Maximum IDs: 10,000.

repeated uint64 device_num_ids = 2;

Parameter
Name Description
values Iterable<? extends java.lang.Long>

The deviceNumIds to add.

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

addDeviceIds(String value)

public ListDevicesRequest.Builder addDeviceIds(String value)

A list of device string IDs. For example, ['device0', 'device12']. If empty, this field is ignored. Maximum IDs: 10,000

repeated string device_ids = 3;

Parameter
Name Description
value String

The deviceIds to add.

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

addDeviceIdsBytes(ByteString value)

public ListDevicesRequest.Builder addDeviceIdsBytes(ByteString value)

A list of device string IDs. For example, ['device0', 'device12']. If empty, this field is ignored. Maximum IDs: 10,000

repeated string device_ids = 3;

Parameter
Name Description
value ByteString

The bytes of the deviceIds to add.

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

addDeviceNumIds(long value)

public ListDevicesRequest.Builder addDeviceNumIds(long value)

A list of device numeric IDs. If empty, this field is ignored. Maximum IDs: 10,000.

repeated uint64 device_num_ids = 2;

Parameter
Name Description
value long

The deviceNumIds to add.

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ListDevicesRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ListDevicesRequest.Builder
Overrides

build()

public ListDevicesRequest build()
Returns
Type Description
ListDevicesRequest

buildPartial()

public ListDevicesRequest buildPartial()
Returns
Type Description
ListDevicesRequest

clear()

public ListDevicesRequest.Builder clear()
Returns
Type Description
ListDevicesRequest.Builder
Overrides

clearDeviceIds()

public ListDevicesRequest.Builder clearDeviceIds()

A list of device string IDs. For example, ['device0', 'device12']. If empty, this field is ignored. Maximum IDs: 10,000

repeated string device_ids = 3;

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

clearDeviceNumIds()

public ListDevicesRequest.Builder clearDeviceNumIds()

A list of device numeric IDs. If empty, this field is ignored. Maximum IDs: 10,000.

repeated uint64 device_num_ids = 2;

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public ListDevicesRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ListDevicesRequest.Builder
Overrides

clearFieldMask()

public ListDevicesRequest.Builder clearFieldMask()

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 in snake_case format, for example: last_heartbeat_time.

.google.protobuf.FieldMask field_mask = 4;

Returns
Type Description
ListDevicesRequest.Builder

clearGatewayListOptions()

public ListDevicesRequest.Builder clearGatewayListOptions()

Options related to gateways.

.google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;

Returns
Type Description
ListDevicesRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public ListDevicesRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ListDevicesRequest.Builder
Overrides

clearPageSize()

public ListDevicesRequest.Builder clearPageSize()

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.

int32 page_size = 100;

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

clearPageToken()

public ListDevicesRequest.Builder clearPageToken()

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.

string page_token = 101;

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

clearParent()

public ListDevicesRequest.Builder clearParent()

Required. The device registry path. Required. For example, projects/my-project/locations/us-central1/registries/my-registry.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

clone()

public ListDevicesRequest.Builder clone()
Returns
Type Description
ListDevicesRequest.Builder
Overrides

getDefaultInstanceForType()

public ListDevicesRequest getDefaultInstanceForType()
Returns
Type Description
ListDevicesRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDeviceIds(int index)

public String getDeviceIds(int index)

A list of device string IDs. For example, ['device0', 'device12']. If empty, this field is ignored. Maximum IDs: 10,000

repeated string device_ids = 3;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The deviceIds at the given index.

getDeviceIdsBytes(int index)

public ByteString getDeviceIdsBytes(int index)

A list of device string IDs. For example, ['device0', 'device12']. If empty, this field is ignored. Maximum IDs: 10,000

repeated string device_ids = 3;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the deviceIds at the given index.

getDeviceIdsCount()

public int getDeviceIdsCount()

A list of device string IDs. For example, ['device0', 'device12']. If empty, this field is ignored. Maximum IDs: 10,000

repeated string device_ids = 3;

Returns
Type Description
int

The count of deviceIds.

getDeviceIdsList()

public ProtocolStringList getDeviceIdsList()

A list of device string IDs. For example, ['device0', 'device12']. If empty, this field is ignored. Maximum IDs: 10,000

repeated string device_ids = 3;

Returns
Type Description
ProtocolStringList

A list containing the deviceIds.

getDeviceNumIds(int index)

public long getDeviceNumIds(int index)

A list of device numeric IDs. If empty, this field is ignored. Maximum IDs: 10,000.

repeated uint64 device_num_ids = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
long

The deviceNumIds at the given index.

getDeviceNumIdsCount()

public int getDeviceNumIdsCount()

A list of device numeric IDs. If empty, this field is ignored. Maximum IDs: 10,000.

repeated uint64 device_num_ids = 2;

Returns
Type Description
int

The count of deviceNumIds.

getDeviceNumIdsList()

public List<Long> getDeviceNumIdsList()

A list of device numeric IDs. If empty, this field is ignored. Maximum IDs: 10,000.

repeated uint64 device_num_ids = 2;

Returns
Type Description
List<Long>

A list containing the deviceNumIds.

getFieldMask()

public FieldMask getFieldMask()

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 in snake_case format, for example: last_heartbeat_time.

.google.protobuf.FieldMask field_mask = 4;

Returns
Type Description
FieldMask

The fieldMask.

getFieldMaskBuilder()

public FieldMask.Builder getFieldMaskBuilder()

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 in snake_case format, for example: last_heartbeat_time.

.google.protobuf.FieldMask field_mask = 4;

Returns
Type Description
Builder

getFieldMaskOrBuilder()

public FieldMaskOrBuilder getFieldMaskOrBuilder()

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 in snake_case format, for example: last_heartbeat_time.

.google.protobuf.FieldMask field_mask = 4;

Returns
Type Description
FieldMaskOrBuilder

getGatewayListOptions()

public GatewayListOptions getGatewayListOptions()

Options related to gateways.

.google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;

Returns
Type Description
GatewayListOptions

The gatewayListOptions.

getGatewayListOptionsBuilder()

public GatewayListOptions.Builder getGatewayListOptionsBuilder()

Options related to gateways.

.google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;

Returns
Type Description
GatewayListOptions.Builder

getGatewayListOptionsOrBuilder()

public GatewayListOptionsOrBuilder getGatewayListOptionsOrBuilder()

Options related to gateways.

.google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;

Returns
Type Description
GatewayListOptionsOrBuilder

getPageSize()

public int getPageSize()

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.

int32 page_size = 100;

Returns
Type Description
int

The pageSize.

getPageToken()

public String getPageToken()

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.

string page_token = 101;

Returns
Type Description
String

The pageToken.

getPageTokenBytes()

public ByteString getPageTokenBytes()

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.

string page_token = 101;

Returns
Type Description
ByteString

The bytes for pageToken.

getParent()

public String getParent()

Required. The device registry path. Required. For example, projects/my-project/locations/us-central1/registries/my-registry.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The device registry path. Required. For example, projects/my-project/locations/us-central1/registries/my-registry.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for parent.

hasFieldMask()

public boolean hasFieldMask()

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 in snake_case format, for example: last_heartbeat_time.

.google.protobuf.FieldMask field_mask = 4;

Returns
Type Description
boolean

Whether the fieldMask field is set.

hasGatewayListOptions()

public boolean hasGatewayListOptions()

Options related to gateways.

.google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;

Returns
Type Description
boolean

Whether the gatewayListOptions field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFieldMask(FieldMask value)

public ListDevicesRequest.Builder mergeFieldMask(FieldMask value)

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 in snake_case format, for example: last_heartbeat_time.

.google.protobuf.FieldMask field_mask = 4;

Parameter
Name Description
value FieldMask
Returns
Type Description
ListDevicesRequest.Builder

mergeFrom(ListDevicesRequest other)

public ListDevicesRequest.Builder mergeFrom(ListDevicesRequest other)
Parameter
Name Description
other ListDevicesRequest
Returns
Type Description
ListDevicesRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ListDevicesRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ListDevicesRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ListDevicesRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ListDevicesRequest.Builder
Overrides

mergeGatewayListOptions(GatewayListOptions value)

public ListDevicesRequest.Builder mergeGatewayListOptions(GatewayListOptions value)

Options related to gateways.

.google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;

Parameter
Name Description
value GatewayListOptions
Returns
Type Description
ListDevicesRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ListDevicesRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ListDevicesRequest.Builder
Overrides

setDeviceIds(int index, String value)

public ListDevicesRequest.Builder setDeviceIds(int index, String value)

A list of device string IDs. For example, ['device0', 'device12']. If empty, this field is ignored. Maximum IDs: 10,000

repeated string device_ids = 3;

Parameters
Name Description
index int

The index to set the value at.

value String

The deviceIds to set.

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

setDeviceNumIds(int index, long value)

public ListDevicesRequest.Builder setDeviceNumIds(int index, long value)

A list of device numeric IDs. If empty, this field is ignored. Maximum IDs: 10,000.

repeated uint64 device_num_ids = 2;

Parameters
Name Description
index int

The index to set the value at.

value long

The deviceNumIds to set.

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public ListDevicesRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ListDevicesRequest.Builder
Overrides

setFieldMask(FieldMask value)

public ListDevicesRequest.Builder setFieldMask(FieldMask value)

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 in snake_case format, for example: last_heartbeat_time.

.google.protobuf.FieldMask field_mask = 4;

Parameter
Name Description
value FieldMask
Returns
Type Description
ListDevicesRequest.Builder

setFieldMask(FieldMask.Builder builderForValue)

public ListDevicesRequest.Builder setFieldMask(FieldMask.Builder builderForValue)

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 in snake_case format, for example: last_heartbeat_time.

.google.protobuf.FieldMask field_mask = 4;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
ListDevicesRequest.Builder

setGatewayListOptions(GatewayListOptions value)

public ListDevicesRequest.Builder setGatewayListOptions(GatewayListOptions value)

Options related to gateways.

.google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;

Parameter
Name Description
value GatewayListOptions
Returns
Type Description
ListDevicesRequest.Builder

setGatewayListOptions(GatewayListOptions.Builder builderForValue)

public ListDevicesRequest.Builder setGatewayListOptions(GatewayListOptions.Builder builderForValue)

Options related to gateways.

.google.cloud.iot.v1.GatewayListOptions gateway_list_options = 6;

Parameter
Name Description
builderForValue GatewayListOptions.Builder
Returns
Type Description
ListDevicesRequest.Builder

setPageSize(int value)

public ListDevicesRequest.Builder setPageSize(int value)

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.

int32 page_size = 100;

Parameter
Name Description
value int

The pageSize to set.

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

setPageToken(String value)

public ListDevicesRequest.Builder setPageToken(String value)

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.

string page_token = 101;

Parameter
Name Description
value String

The pageToken to set.

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

setPageTokenBytes(ByteString value)

public ListDevicesRequest.Builder setPageTokenBytes(ByteString value)

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.

string page_token = 101;

Parameter
Name Description
value ByteString

The bytes for pageToken to set.

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

setParent(String value)

public ListDevicesRequest.Builder setParent(String value)

Required. The device registry path. Required. For example, projects/my-project/locations/us-central1/registries/my-registry.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public ListDevicesRequest.Builder setParentBytes(ByteString value)

Required. The device registry path. Required. For example, projects/my-project/locations/us-central1/registries/my-registry.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
ListDevicesRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ListDevicesRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ListDevicesRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ListDevicesRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ListDevicesRequest.Builder
Overrides