Class SendCommandToDeviceRequest.Builder (2.42.0)

public static final class SendCommandToDeviceRequest.Builder extends GeneratedMessageV3.Builder<SendCommandToDeviceRequest.Builder> implements SendCommandToDeviceRequestOrBuilder

Request for SendCommandToDevice.

Protobuf type google.cloud.iot.v1.SendCommandToDeviceRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SendCommandToDeviceRequest build()
Returns
Type Description
SendCommandToDeviceRequest

buildPartial()

public SendCommandToDeviceRequest buildPartial()
Returns
Type Description
SendCommandToDeviceRequest

clear()

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

clearBinaryData()

public SendCommandToDeviceRequest.Builder clearBinaryData()

Required. The command data to send to the device.

bytes binary_data = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SendCommandToDeviceRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public SendCommandToDeviceRequest.Builder clearName()

Required. The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/{num_id}.

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

Returns
Type Description
SendCommandToDeviceRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSubfolder()

public SendCommandToDeviceRequest.Builder clearSubfolder()

Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters.

string subfolder = 3;

Returns
Type Description
SendCommandToDeviceRequest.Builder

This builder for chaining.

clone()

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

getBinaryData()

public ByteString getBinaryData()

Required. The command data to send to the device.

bytes binary_data = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The binaryData.

getDefaultInstanceForType()

public SendCommandToDeviceRequest getDefaultInstanceForType()
Returns
Type Description
SendCommandToDeviceRequest

getDescriptorForType()

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

getName()

public String getName()

Required. The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/{num_id}.

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/{num_id}.

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

Returns
Type Description
ByteString

The bytes for name.

getSubfolder()

public String getSubfolder()

Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters.

string subfolder = 3;

Returns
Type Description
String

The subfolder.

getSubfolderBytes()

public ByteString getSubfolderBytes()

Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters.

string subfolder = 3;

Returns
Type Description
ByteString

The bytes for subfolder.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SendCommandToDeviceRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setBinaryData(ByteString value)

public SendCommandToDeviceRequest.Builder setBinaryData(ByteString value)

Required. The command data to send to the device.

bytes binary_data = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The binaryData to set.

Returns
Type Description
SendCommandToDeviceRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public SendCommandToDeviceRequest.Builder setName(String value)

Required. The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/{num_id}.

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
SendCommandToDeviceRequest.Builder

This builder for chaining.

setNameBytes(ByteString value)

public SendCommandToDeviceRequest.Builder setNameBytes(ByteString value)

Required. The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/{num_id}.

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
SendCommandToDeviceRequest.Builder

This builder for chaining.

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

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

setSubfolder(String value)

public SendCommandToDeviceRequest.Builder setSubfolder(String value)

Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters.

string subfolder = 3;

Parameter
Name Description
value String

The subfolder to set.

Returns
Type Description
SendCommandToDeviceRequest.Builder

This builder for chaining.

setSubfolderBytes(ByteString value)

public SendCommandToDeviceRequest.Builder setSubfolderBytes(ByteString value)

Optional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters.

string subfolder = 3;

Parameter
Name Description
value ByteString

The bytes for subfolder to set.

Returns
Type Description
SendCommandToDeviceRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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