Class SendCommandToDeviceRequest.Builder (2.18.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SendCommandToDeviceRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
SendCommandToDeviceRequest.Builder
Overrides

build()

public SendCommandToDeviceRequest build()
Returns
TypeDescription
SendCommandToDeviceRequest

buildPartial()

public SendCommandToDeviceRequest buildPartial()
Returns
TypeDescription
SendCommandToDeviceRequest

clear()

public SendCommandToDeviceRequest.Builder clear()
Returns
TypeDescription
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
TypeDescription
SendCommandToDeviceRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public SendCommandToDeviceRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
SendCommandToDeviceRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public SendCommandToDeviceRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
SendCommandToDeviceRequest.Builder

This builder for chaining.

clone()

public SendCommandToDeviceRequest.Builder clone()
Returns
TypeDescription
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
TypeDescription
ByteString

The binaryData.

getDefaultInstanceForType()

public SendCommandToDeviceRequest getDefaultInstanceForType()
Returns
TypeDescription
SendCommandToDeviceRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for subfolder.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SendCommandToDeviceRequest other)

public SendCommandToDeviceRequest.Builder mergeFrom(SendCommandToDeviceRequest other)
Parameter
NameDescription
otherSendCommandToDeviceRequest
Returns
TypeDescription
SendCommandToDeviceRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SendCommandToDeviceRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
SendCommandToDeviceRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public SendCommandToDeviceRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
SendCommandToDeviceRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SendCommandToDeviceRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueByteString

The binaryData to set.

Returns
TypeDescription
SendCommandToDeviceRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public SendCommandToDeviceRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The name to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The subfolder to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for subfolder to set.

Returns
TypeDescription
SendCommandToDeviceRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final SendCommandToDeviceRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
SendCommandToDeviceRequest.Builder
Overrides