Class DeviceRegistry (2.47.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
Type Description
int

EVENT_NOTIFICATION_CONFIGS_FIELD_NUMBER

public static final int EVENT_NOTIFICATION_CONFIGS_FIELD_NUMBER
Field Value
Type Description
int

HTTP_CONFIG_FIELD_NUMBER

public static final int HTTP_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
Type Description
int

LOG_LEVEL_FIELD_NUMBER

public static final int LOG_LEVEL_FIELD_NUMBER
Field Value
Type Description
int

MQTT_CONFIG_FIELD_NUMBER

public static final int MQTT_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

STATE_NOTIFICATION_CONFIG_FIELD_NUMBER

public static final int STATE_NOTIFICATION_CONFIG_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static DeviceRegistry getDefaultInstance()
Returns
Type Description
DeviceRegistry

getDescriptor()

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

newBuilder()

public static DeviceRegistry.Builder newBuilder()
Returns
Type Description
DeviceRegistry.Builder

newBuilder(DeviceRegistry prototype)

public static DeviceRegistry.Builder newBuilder(DeviceRegistry prototype)
Parameter
Name Description
prototype DeviceRegistry
Returns
Type Description
DeviceRegistry.Builder

parseDelimitedFrom(InputStream input)

public static DeviceRegistry parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DeviceRegistry
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceRegistry parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceRegistry
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static DeviceRegistry parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
DeviceRegistry
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static DeviceRegistry parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceRegistry
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static DeviceRegistry parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
DeviceRegistry
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static DeviceRegistry parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceRegistry
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static DeviceRegistry parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
DeviceRegistry
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceRegistry parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceRegistry
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static DeviceRegistry parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
DeviceRegistry
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static DeviceRegistry parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceRegistry
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static DeviceRegistry parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
DeviceRegistry
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static DeviceRegistry parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DeviceRegistry
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<DeviceRegistry> parser()
Returns
Type Description
Parser<DeviceRegistry>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
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
Name Description
index int
Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
index int
Returns
Type Description
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
Type Description
List<? extends com.google.cloud.iot.v1.RegistryCredentialOrBuilder>

getDefaultInstanceForType()

public DeviceRegistry getDefaultInstanceForType()
Returns
Type Description
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
Name Description
index int
Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
index int
Returns
Type Description
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
Type Description
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
Type Description
HttpConfig

The httpConfig.

getHttpConfigOrBuilder()

public HttpConfigOrBuilder getHttpConfigOrBuilder()

The DeviceService (HTTP) configuration for this device registry.

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

Returns
Type Description
HttpConfigOrBuilder

getId()

public String getId()

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

string id = 1;

Returns
Type Description
String

The id.

getIdBytes()

public ByteString getIdBytes()

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

string id = 1;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
MqttConfig

The mqttConfig.

getMqttConfigOrBuilder()

public MqttConfigOrBuilder getMqttConfigOrBuilder()

The MQTT configuration for this device registry.

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

Returns
Type Description
MqttConfigOrBuilder

getName()

public String getName()

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

string name = 2;

Returns
Type Description
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
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<DeviceRegistry> getParserForType()
Returns
Type Description
Parser<DeviceRegistry>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
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
Type Description
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
Type Description
StateNotificationConfigOrBuilder

hasHttpConfig()

public boolean hasHttpConfig()

The DeviceService (HTTP) configuration for this device registry.

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

Returns
Type Description
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
Type Description
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
Type Description
boolean

Whether the stateNotificationConfig field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public DeviceRegistry.Builder newBuilderForType()
Returns
Type Description
DeviceRegistry.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected DeviceRegistry.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
DeviceRegistry.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public DeviceRegistry.Builder toBuilder()
Returns
Type Description
DeviceRegistry.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException