Class DeviceRegistry

  • All Implemented Interfaces:
    DeviceRegistryOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class DeviceRegistry
    extends com.google.protobuf.GeneratedMessageV3
    implements DeviceRegistryOrBuilder
     A container for a group of devices.
     
    Protobuf type google.cloud.iot.v1.DeviceRegistry
    See Also:
    Serialized Form
    • Field Detail

      • EVENT_NOTIFICATION_CONFIGS_FIELD_NUMBER

        public static final int EVENT_NOTIFICATION_CONFIGS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • STATE_NOTIFICATION_CONFIG_FIELD_NUMBER

        public static final int STATE_NOTIFICATION_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
      • MQTT_CONFIG_FIELD_NUMBER

        public static final int MQTT_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
      • HTTP_CONFIG_FIELD_NUMBER

        public static final int HTTP_CONFIG_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CREDENTIALS_FIELD_NUMBER

        public static final int CREDENTIALS_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getId

        public String getId()
         The identifier of this device registry. For example, `myRegistry`.
         
        string id = 1;
        Specified by:
        getId in interface DeviceRegistryOrBuilder
        Returns:
        The id.
      • getIdBytes

        public com.google.protobuf.ByteString getIdBytes()
         The identifier of this device registry. For example, `myRegistry`.
         
        string id = 1;
        Specified by:
        getIdBytes in interface DeviceRegistryOrBuilder
        Returns:
        The bytes for id.
      • getName

        public String getName()
         The resource path name. For example,
         `projects/example-project/locations/us-central1/registries/my-registry`.
         
        string name = 2;
        Specified by:
        getName in interface DeviceRegistryOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The resource path name. For example,
         `projects/example-project/locations/us-central1/registries/my-registry`.
         
        string name = 2;
        Specified by:
        getNameBytes in interface DeviceRegistryOrBuilder
        Returns:
        The bytes for name.
      • 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;
        Specified by:
        getEventNotificationConfigsList in interface DeviceRegistryOrBuilder
      • 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;
        Specified by:
        getEventNotificationConfigsOrBuilderList in interface DeviceRegistryOrBuilder
      • 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;
        Specified by:
        getEventNotificationConfigsCount in interface DeviceRegistryOrBuilder
      • getEventNotificationConfigs

        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;
        Specified by:
        getEventNotificationConfigs in interface DeviceRegistryOrBuilder
      • getEventNotificationConfigsOrBuilder

        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;
        Specified by:
        getEventNotificationConfigsOrBuilder in interface DeviceRegistryOrBuilder
      • 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;
        Specified by:
        hasStateNotificationConfig in interface DeviceRegistryOrBuilder
        Returns:
        Whether the stateNotificationConfig field is set.
      • 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;
        Specified by:
        getStateNotificationConfig in interface DeviceRegistryOrBuilder
        Returns:
        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;
        Specified by:
        getStateNotificationConfigOrBuilder in interface DeviceRegistryOrBuilder
      • hasMqttConfig

        public boolean hasMqttConfig()
         The MQTT configuration for this device registry.
         
        .google.cloud.iot.v1.MqttConfig mqtt_config = 4;
        Specified by:
        hasMqttConfig in interface DeviceRegistryOrBuilder
        Returns:
        Whether the mqttConfig field is set.
      • getMqttConfig

        public MqttConfig getMqttConfig()
         The MQTT configuration for this device registry.
         
        .google.cloud.iot.v1.MqttConfig mqtt_config = 4;
        Specified by:
        getMqttConfig in interface DeviceRegistryOrBuilder
        Returns:
        The mqttConfig.
      • hasHttpConfig

        public boolean hasHttpConfig()
         The DeviceService (HTTP) configuration for this device registry.
         
        .google.cloud.iot.v1.HttpConfig http_config = 9;
        Specified by:
        hasHttpConfig in interface DeviceRegistryOrBuilder
        Returns:
        Whether the httpConfig field is set.
      • getHttpConfig

        public HttpConfig getHttpConfig()
         The DeviceService (HTTP) configuration for this device registry.
         
        .google.cloud.iot.v1.HttpConfig http_config = 9;
        Specified by:
        getHttpConfig in interface DeviceRegistryOrBuilder
        Returns:
        The httpConfig.
      • 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;
        Specified by:
        getLogLevelValue in interface DeviceRegistryOrBuilder
        Returns:
        The enum numeric value on the wire for logLevel.
      • 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;
        Specified by:
        getLogLevel in interface DeviceRegistryOrBuilder
        Returns:
        The logLevel.
      • 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;
        Specified by:
        getCredentialsList in interface DeviceRegistryOrBuilder
      • 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;
        Specified by:
        getCredentialsOrBuilderList in interface DeviceRegistryOrBuilder
      • 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;
        Specified by:
        getCredentialsCount in interface DeviceRegistryOrBuilder
      • getCredentials

        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;
        Specified by:
        getCredentials in interface DeviceRegistryOrBuilder
      • getCredentialsOrBuilder

        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;
        Specified by:
        getCredentialsOrBuilder in interface DeviceRegistryOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static DeviceRegistry parseFrom​(ByteBuffer data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DeviceRegistry parseFrom​(ByteBuffer data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DeviceRegistry parseFrom​(com.google.protobuf.ByteString data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DeviceRegistry parseFrom​(com.google.protobuf.ByteString data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DeviceRegistry parseFrom​(byte[] data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DeviceRegistry parseFrom​(byte[] data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DeviceRegistry parseFrom​(com.google.protobuf.CodedInputStream input,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws IOException
        Throws:
        IOException
      • newBuilderForType

        public DeviceRegistry.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public DeviceRegistry.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected DeviceRegistry.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static DeviceRegistry getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<DeviceRegistry> parser()
      • getParserForType

        public com.google.protobuf.Parser<DeviceRegistry> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public DeviceRegistry getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder