Class DeviceRegistry (2.34.0)

public final class DeviceRegistry extends GeneratedMessageV3 implements DeviceRegistryOrBuilder

A container for a group of devices.

Protobuf type google.cloud.iot.v1.DeviceRegistry

Static Fields

CREDENTIALS_FIELD_NUMBER

public static final int CREDENTIALS_FIELD_NUMBER
Field Value
TypeDescription
int

EVENT_NOTIFICATION_CONFIGS_FIELD_NUMBER

public static final int EVENT_NOTIFICATION_CONFIGS_FIELD_NUMBER
Field Value
TypeDescription
int

HTTP_CONFIG_FIELD_NUMBER

public static final int HTTP_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
TypeDescription
int

LOG_LEVEL_FIELD_NUMBER

public static final int LOG_LEVEL_FIELD_NUMBER
Field Value
TypeDescription
int

MQTT_CONFIG_FIELD_NUMBER

public static final int MQTT_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_NOTIFICATION_CONFIG_FIELD_NUMBER

public static final int STATE_NOTIFICATION_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static DeviceRegistry getDefaultInstance()
Returns
TypeDescription
DeviceRegistry

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static DeviceRegistry.Builder newBuilder()
Returns
TypeDescription
DeviceRegistry.Builder

newBuilder(DeviceRegistry prototype)

public static DeviceRegistry.Builder newBuilder(DeviceRegistry prototype)
Parameter
NameDescription
prototypeDeviceRegistry
Returns
TypeDescription
DeviceRegistry.Builder

parseDelimitedFrom(InputStream input)

public static DeviceRegistry parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DeviceRegistry
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceRegistry parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DeviceRegistry
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static DeviceRegistry parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
DeviceRegistry
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DeviceRegistry parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DeviceRegistry
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DeviceRegistry parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
DeviceRegistry
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DeviceRegistry parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DeviceRegistry
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DeviceRegistry parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
DeviceRegistry
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceRegistry parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DeviceRegistry
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static DeviceRegistry parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
DeviceRegistry
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceRegistry parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DeviceRegistry
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static DeviceRegistry parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
DeviceRegistry
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DeviceRegistry parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DeviceRegistry
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<DeviceRegistry> parser()
Returns
TypeDescription
Parser<DeviceRegistry>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getCredentials(int index)

public RegistryCredential getCredentials(int index)

The credentials used to verify the device credentials. No more than 10 credentials can be bound to a single registry at a time. The verification process occurs at the time of device creation or update. If this field is empty, no verification is performed. Otherwise, the credentials of a newly created device or added credentials of an updated device should be signed with one of these registry credentials.

Note, however, that existing devices will never be affected by modifications to this list of credentials: after a device has been successfully created in a registry, it should be able to connect even if its registry credentials are revoked, deleted, or modified.

repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
RegistryCredential

getCredentialsCount()

public int getCredentialsCount()

The credentials used to verify the device credentials. No more than 10 credentials can be bound to a single registry at a time. The verification process occurs at the time of device creation or update. If this field is empty, no verification is performed. Otherwise, the credentials of a newly created device or added credentials of an updated device should be signed with one of these registry credentials.

Note, however, that existing devices will never be affected by modifications to this list of credentials: after a device has been successfully created in a registry, it should be able to connect even if its registry credentials are revoked, deleted, or modified.

repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;

Returns
TypeDescription
int

getCredentialsList()

public List<RegistryCredential> getCredentialsList()

The credentials used to verify the device credentials. No more than 10 credentials can be bound to a single registry at a time. The verification process occurs at the time of device creation or update. If this field is empty, no verification is performed. Otherwise, the credentials of a newly created device or added credentials of an updated device should be signed with one of these registry credentials.

Note, however, that existing devices will never be affected by modifications to this list of credentials: after a device has been successfully created in a registry, it should be able to connect even if its registry credentials are revoked, deleted, or modified.

repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;

Returns
TypeDescription
List<RegistryCredential>

getCredentialsOrBuilder(int index)

public RegistryCredentialOrBuilder getCredentialsOrBuilder(int index)

The credentials used to verify the device credentials. No more than 10 credentials can be bound to a single registry at a time. The verification process occurs at the time of device creation or update. If this field is empty, no verification is performed. Otherwise, the credentials of a newly created device or added credentials of an updated device should be signed with one of these registry credentials.

Note, however, that existing devices will never be affected by modifications to this list of credentials: after a device has been successfully created in a registry, it should be able to connect even if its registry credentials are revoked, deleted, or modified.

repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
RegistryCredentialOrBuilder

getCredentialsOrBuilderList()

public List<? extends RegistryCredentialOrBuilder> getCredentialsOrBuilderList()

The credentials used to verify the device credentials. No more than 10 credentials can be bound to a single registry at a time. The verification process occurs at the time of device creation or update. If this field is empty, no verification is performed. Otherwise, the credentials of a newly created device or added credentials of an updated device should be signed with one of these registry credentials.

Note, however, that existing devices will never be affected by modifications to this list of credentials: after a device has been successfully created in a registry, it should be able to connect even if its registry credentials are revoked, deleted, or modified.

repeated .google.cloud.iot.v1.RegistryCredential credentials = 8;

Returns
TypeDescription
List<? extends com.google.cloud.iot.v1.RegistryCredentialOrBuilder>

getDefaultInstanceForType()

public DeviceRegistry getDefaultInstanceForType()
Returns
TypeDescription
DeviceRegistry

getEventNotificationConfigs(int index)

public EventNotificationConfig getEventNotificationConfigs(int index)

The configuration for notification of telemetry events received from the device. All telemetry events that were successfully published by the device and acknowledged by Cloud IoT Core are guaranteed to be delivered to Cloud Pub/Sub. If multiple configurations match a message, only the first matching configuration is used. If you try to publish a device telemetry event using MQTT without specifying a Cloud Pub/Sub topic for the device's registry, the connection closes automatically. If you try to do so using an HTTP connection, an error is returned. Up to 10 configurations may be provided.

repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10;

Parameter
NameDescription
indexint
Returns
TypeDescription
EventNotificationConfig

getEventNotificationConfigsCount()

public int getEventNotificationConfigsCount()

The configuration for notification of telemetry events received from the device. All telemetry events that were successfully published by the device and acknowledged by Cloud IoT Core are guaranteed to be delivered to Cloud Pub/Sub. If multiple configurations match a message, only the first matching configuration is used. If you try to publish a device telemetry event using MQTT without specifying a Cloud Pub/Sub topic for the device's registry, the connection closes automatically. If you try to do so using an HTTP connection, an error is returned. Up to 10 configurations may be provided.

repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10;

Returns
TypeDescription
int

getEventNotificationConfigsList()

public List<EventNotificationConfig> getEventNotificationConfigsList()

The configuration for notification of telemetry events received from the device. All telemetry events that were successfully published by the device and acknowledged by Cloud IoT Core are guaranteed to be delivered to Cloud Pub/Sub. If multiple configurations match a message, only the first matching configuration is used. If you try to publish a device telemetry event using MQTT without specifying a Cloud Pub/Sub topic for the device's registry, the connection closes automatically. If you try to do so using an HTTP connection, an error is returned. Up to 10 configurations may be provided.

repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10;

Returns
TypeDescription
List<EventNotificationConfig>

getEventNotificationConfigsOrBuilder(int index)

public EventNotificationConfigOrBuilder getEventNotificationConfigsOrBuilder(int index)

The configuration for notification of telemetry events received from the device. All telemetry events that were successfully published by the device and acknowledged by Cloud IoT Core are guaranteed to be delivered to Cloud Pub/Sub. If multiple configurations match a message, only the first matching configuration is used. If you try to publish a device telemetry event using MQTT without specifying a Cloud Pub/Sub topic for the device's registry, the connection closes automatically. If you try to do so using an HTTP connection, an error is returned. Up to 10 configurations may be provided.

repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10;

Parameter
NameDescription
indexint
Returns
TypeDescription
EventNotificationConfigOrBuilder

getEventNotificationConfigsOrBuilderList()

public List<? extends EventNotificationConfigOrBuilder> getEventNotificationConfigsOrBuilderList()

The configuration for notification of telemetry events received from the device. All telemetry events that were successfully published by the device and acknowledged by Cloud IoT Core are guaranteed to be delivered to Cloud Pub/Sub. If multiple configurations match a message, only the first matching configuration is used. If you try to publish a device telemetry event using MQTT without specifying a Cloud Pub/Sub topic for the device's registry, the connection closes automatically. If you try to do so using an HTTP connection, an error is returned. Up to 10 configurations may be provided.

repeated .google.cloud.iot.v1.EventNotificationConfig event_notification_configs = 10;

Returns
TypeDescription
List<? extends com.google.cloud.iot.v1.EventNotificationConfigOrBuilder>

getHttpConfig()

public HttpConfig getHttpConfig()

The DeviceService (HTTP) configuration for this device registry.

.google.cloud.iot.v1.HttpConfig http_config = 9;

Returns
TypeDescription
HttpConfig

The httpConfig.

getHttpConfigOrBuilder()

public HttpConfigOrBuilder getHttpConfigOrBuilder()

The DeviceService (HTTP) configuration for this device registry.

.google.cloud.iot.v1.HttpConfig http_config = 9;

Returns
TypeDescription
HttpConfigOrBuilder

getId()

public String getId()

The identifier of this device registry. For example, myRegistry.

string id = 1;

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

The identifier of this device registry. For example, myRegistry.

string id = 1;

Returns
TypeDescription
ByteString

The bytes for id.

getLogLevel()

public LogLevel getLogLevel()

Beta Feature

The default logging verbosity for activity from devices in this registry. The verbosity level can be overridden by Device.log_level.

.google.cloud.iot.v1.LogLevel log_level = 11;

Returns
TypeDescription
LogLevel

The logLevel.

getLogLevelValue()

public int getLogLevelValue()

Beta Feature

The default logging verbosity for activity from devices in this registry. The verbosity level can be overridden by Device.log_level.

.google.cloud.iot.v1.LogLevel log_level = 11;

Returns
TypeDescription
int

The enum numeric value on the wire for logLevel.

getMqttConfig()

public MqttConfig getMqttConfig()

The MQTT configuration for this device registry.

.google.cloud.iot.v1.MqttConfig mqtt_config = 4;

Returns
TypeDescription
MqttConfig

The mqttConfig.

getMqttConfigOrBuilder()

public MqttConfigOrBuilder getMqttConfigOrBuilder()

The MQTT configuration for this device registry.

.google.cloud.iot.v1.MqttConfig mqtt_config = 4;

Returns
TypeDescription
MqttConfigOrBuilder

getName()

public String getName()

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

string name = 2;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

string name = 2;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<DeviceRegistry> getParserForType()
Returns
TypeDescription
Parser<DeviceRegistry>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getStateNotificationConfig()

public StateNotificationConfig getStateNotificationConfig()

The configuration for notification of new states received from the device. State updates are guaranteed to be stored in the state history, but notifications to Cloud Pub/Sub are not guaranteed. For example, if permissions are misconfigured or the specified topic doesn't exist, no notification will be published but the state will still be stored in Cloud IoT Core.

.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;

Returns
TypeDescription
StateNotificationConfig

The stateNotificationConfig.

getStateNotificationConfigOrBuilder()

public StateNotificationConfigOrBuilder getStateNotificationConfigOrBuilder()

The configuration for notification of new states received from the device. State updates are guaranteed to be stored in the state history, but notifications to Cloud Pub/Sub are not guaranteed. For example, if permissions are misconfigured or the specified topic doesn't exist, no notification will be published but the state will still be stored in Cloud IoT Core.

.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;

Returns
TypeDescription
StateNotificationConfigOrBuilder

hasHttpConfig()

public boolean hasHttpConfig()

The DeviceService (HTTP) configuration for this device registry.

.google.cloud.iot.v1.HttpConfig http_config = 9;

Returns
TypeDescription
boolean

Whether the httpConfig field is set.

hasMqttConfig()

public boolean hasMqttConfig()

The MQTT configuration for this device registry.

.google.cloud.iot.v1.MqttConfig mqtt_config = 4;

Returns
TypeDescription
boolean

Whether the mqttConfig field is set.

hasStateNotificationConfig()

public boolean hasStateNotificationConfig()

The configuration for notification of new states received from the device. State updates are guaranteed to be stored in the state history, but notifications to Cloud Pub/Sub are not guaranteed. For example, if permissions are misconfigured or the specified topic doesn't exist, no notification will be published but the state will still be stored in Cloud IoT Core.

.google.cloud.iot.v1.StateNotificationConfig state_notification_config = 7;

Returns
TypeDescription
boolean

Whether the stateNotificationConfig field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public DeviceRegistry.Builder newBuilderForType()
Returns
TypeDescription
DeviceRegistry.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DeviceRegistry.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
DeviceRegistry.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public DeviceRegistry.Builder toBuilder()
Returns
TypeDescription
DeviceRegistry.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException