Class Device.Builder

  • All Implemented Interfaces:
    DeviceOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Device

    public static final class Device.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>
    implements DeviceOrBuilder
     The device resource.
     
    Protobuf type google.cloud.iot.v1.Device
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>
      • clear

        public Device.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>
      • getDefaultInstanceForType

        public Device getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Device build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Device buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Device.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>
      • setField

        public Device.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                       Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>
      • clearField

        public Device.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>
      • clearOneof

        public Device.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>
      • setRepeatedField

        public Device.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               int index,
                                               Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>
      • addRepeatedField

        public Device.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>
      • mergeFrom

        public Device.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Device.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>
      • mergeFrom

        public Device.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Device.Builder>
        Throws:
        IOException
      • getId

        public String getId()
         The user-defined device identifier. The device ID must be unique
         within a device registry.
         
        string id = 1;
        Specified by:
        getId in interface DeviceOrBuilder
        Returns:
        The id.
      • getIdBytes

        public com.google.protobuf.ByteString getIdBytes()
         The user-defined device identifier. The device ID must be unique
         within a device registry.
         
        string id = 1;
        Specified by:
        getIdBytes in interface DeviceOrBuilder
        Returns:
        The bytes for id.
      • setId

        public Device.Builder setId​(String value)
         The user-defined device identifier. The device ID must be unique
         within a device registry.
         
        string id = 1;
        Parameters:
        value - The id to set.
        Returns:
        This builder for chaining.
      • clearId

        public Device.Builder clearId()
         The user-defined device identifier. The device ID must be unique
         within a device registry.
         
        string id = 1;
        Returns:
        This builder for chaining.
      • setIdBytes

        public Device.Builder setIdBytes​(com.google.protobuf.ByteString value)
         The user-defined device identifier. The device ID must be unique
         within a device registry.
         
        string id = 1;
        Parameters:
        value - The bytes for id to set.
        Returns:
        This builder for chaining.
      • getName

        public String getName()
         The resource path name. For example,
         `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
         `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.
         When `name` is populated as a response from the service, it always ends
         in the device numeric ID.
         
        string name = 2;
        Specified by:
        getName in interface DeviceOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The resource path name. For example,
         `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
         `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.
         When `name` is populated as a response from the service, it always ends
         in the device numeric ID.
         
        string name = 2;
        Specified by:
        getNameBytes in interface DeviceOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Device.Builder setName​(String value)
         The resource path name. For example,
         `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
         `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.
         When `name` is populated as a response from the service, it always ends
         in the device numeric ID.
         
        string name = 2;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Device.Builder clearName()
         The resource path name. For example,
         `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
         `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.
         When `name` is populated as a response from the service, it always ends
         in the device numeric ID.
         
        string name = 2;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Device.Builder setNameBytes​(com.google.protobuf.ByteString value)
         The resource path name. For example,
         `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or
         `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.
         When `name` is populated as a response from the service, it always ends
         in the device numeric ID.
         
        string name = 2;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getNumId

        public long getNumId()
         [Output only] A server-defined unique numeric ID for the device. This is a
         more compact way to identify devices, and it is globally unique.
         
        uint64 num_id = 3;
        Specified by:
        getNumId in interface DeviceOrBuilder
        Returns:
        The numId.
      • setNumId

        public Device.Builder setNumId​(long value)
         [Output only] A server-defined unique numeric ID for the device. This is a
         more compact way to identify devices, and it is globally unique.
         
        uint64 num_id = 3;
        Parameters:
        value - The numId to set.
        Returns:
        This builder for chaining.
      • clearNumId

        public Device.Builder clearNumId()
         [Output only] A server-defined unique numeric ID for the device. This is a
         more compact way to identify devices, and it is globally unique.
         
        uint64 num_id = 3;
        Returns:
        This builder for chaining.
      • getCredentialsList

        public List<DeviceCredential> getCredentialsList()
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
        Specified by:
        getCredentialsList in interface DeviceOrBuilder
      • getCredentialsCount

        public int getCredentialsCount()
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
        Specified by:
        getCredentialsCount in interface DeviceOrBuilder
      • getCredentials

        public DeviceCredential getCredentials​(int index)
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
        Specified by:
        getCredentials in interface DeviceOrBuilder
      • setCredentials

        public Device.Builder setCredentials​(int index,
                                             DeviceCredential value)
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
      • setCredentials

        public Device.Builder setCredentials​(int index,
                                             DeviceCredential.Builder builderForValue)
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
      • addCredentials

        public Device.Builder addCredentials​(DeviceCredential value)
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
      • addCredentials

        public Device.Builder addCredentials​(int index,
                                             DeviceCredential value)
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
      • addCredentials

        public Device.Builder addCredentials​(DeviceCredential.Builder builderForValue)
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
      • addCredentials

        public Device.Builder addCredentials​(int index,
                                             DeviceCredential.Builder builderForValue)
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
      • addAllCredentials

        public Device.Builder addAllCredentials​(Iterable<? extends DeviceCredential> values)
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
      • clearCredentials

        public Device.Builder clearCredentials()
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
      • removeCredentials

        public Device.Builder removeCredentials​(int index)
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
      • getCredentialsBuilder

        public DeviceCredential.Builder getCredentialsBuilder​(int index)
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
      • getCredentialsOrBuilder

        public DeviceCredentialOrBuilder getCredentialsOrBuilder​(int index)
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
        Specified by:
        getCredentialsOrBuilder in interface DeviceOrBuilder
      • getCredentialsOrBuilderList

        public List<? extends DeviceCredentialOrBuilder> getCredentialsOrBuilderList()
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
        Specified by:
        getCredentialsOrBuilderList in interface DeviceOrBuilder
      • addCredentialsBuilder

        public DeviceCredential.Builder addCredentialsBuilder()
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
      • addCredentialsBuilder

        public DeviceCredential.Builder addCredentialsBuilder​(int index)
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
      • getCredentialsBuilderList

        public List<DeviceCredential.Builder> getCredentialsBuilderList()
         The credentials used to authenticate this device. To allow credential
         rotation without interruption, multiple device credentials can be bound to
         this device. No more than 3 credentials can be bound to a single device at
         a time. When new credentials are added to a device, they are verified
         against the registry credentials. For details, see the description of the
         `DeviceRegistry.credentials` field.
         
        repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
      • hasLastHeartbeatTime

        public boolean hasLastHeartbeatTime()
         [Output only] The last time an MQTT `PINGREQ` was received. This field
         applies only to devices connecting through MQTT. MQTT clients usually only
         send `PINGREQ` messages if the connection is idle, and no other messages
         have been sent. Timestamps are periodically collected and written to
         storage; they may be stale by a few minutes.
         
        .google.protobuf.Timestamp last_heartbeat_time = 7;
        Specified by:
        hasLastHeartbeatTime in interface DeviceOrBuilder
        Returns:
        Whether the lastHeartbeatTime field is set.
      • getLastHeartbeatTime

        public com.google.protobuf.Timestamp getLastHeartbeatTime()
         [Output only] The last time an MQTT `PINGREQ` was received. This field
         applies only to devices connecting through MQTT. MQTT clients usually only
         send `PINGREQ` messages if the connection is idle, and no other messages
         have been sent. Timestamps are periodically collected and written to
         storage; they may be stale by a few minutes.
         
        .google.protobuf.Timestamp last_heartbeat_time = 7;
        Specified by:
        getLastHeartbeatTime in interface DeviceOrBuilder
        Returns:
        The lastHeartbeatTime.
      • setLastHeartbeatTime

        public Device.Builder setLastHeartbeatTime​(com.google.protobuf.Timestamp value)
         [Output only] The last time an MQTT `PINGREQ` was received. This field
         applies only to devices connecting through MQTT. MQTT clients usually only
         send `PINGREQ` messages if the connection is idle, and no other messages
         have been sent. Timestamps are periodically collected and written to
         storage; they may be stale by a few minutes.
         
        .google.protobuf.Timestamp last_heartbeat_time = 7;
      • setLastHeartbeatTime

        public Device.Builder setLastHeartbeatTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         [Output only] The last time an MQTT `PINGREQ` was received. This field
         applies only to devices connecting through MQTT. MQTT clients usually only
         send `PINGREQ` messages if the connection is idle, and no other messages
         have been sent. Timestamps are periodically collected and written to
         storage; they may be stale by a few minutes.
         
        .google.protobuf.Timestamp last_heartbeat_time = 7;
      • mergeLastHeartbeatTime

        public Device.Builder mergeLastHeartbeatTime​(com.google.protobuf.Timestamp value)
         [Output only] The last time an MQTT `PINGREQ` was received. This field
         applies only to devices connecting through MQTT. MQTT clients usually only
         send `PINGREQ` messages if the connection is idle, and no other messages
         have been sent. Timestamps are periodically collected and written to
         storage; they may be stale by a few minutes.
         
        .google.protobuf.Timestamp last_heartbeat_time = 7;
      • clearLastHeartbeatTime

        public Device.Builder clearLastHeartbeatTime()
         [Output only] The last time an MQTT `PINGREQ` was received. This field
         applies only to devices connecting through MQTT. MQTT clients usually only
         send `PINGREQ` messages if the connection is idle, and no other messages
         have been sent. Timestamps are periodically collected and written to
         storage; they may be stale by a few minutes.
         
        .google.protobuf.Timestamp last_heartbeat_time = 7;
      • getLastHeartbeatTimeBuilder

        public com.google.protobuf.Timestamp.Builder getLastHeartbeatTimeBuilder()
         [Output only] The last time an MQTT `PINGREQ` was received. This field
         applies only to devices connecting through MQTT. MQTT clients usually only
         send `PINGREQ` messages if the connection is idle, and no other messages
         have been sent. Timestamps are periodically collected and written to
         storage; they may be stale by a few minutes.
         
        .google.protobuf.Timestamp last_heartbeat_time = 7;
      • getLastHeartbeatTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getLastHeartbeatTimeOrBuilder()
         [Output only] The last time an MQTT `PINGREQ` was received. This field
         applies only to devices connecting through MQTT. MQTT clients usually only
         send `PINGREQ` messages if the connection is idle, and no other messages
         have been sent. Timestamps are periodically collected and written to
         storage; they may be stale by a few minutes.
         
        .google.protobuf.Timestamp last_heartbeat_time = 7;
        Specified by:
        getLastHeartbeatTimeOrBuilder in interface DeviceOrBuilder
      • hasLastEventTime

        public boolean hasLastEventTime()
         [Output only] The last time a telemetry event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_event_time = 8;
        Specified by:
        hasLastEventTime in interface DeviceOrBuilder
        Returns:
        Whether the lastEventTime field is set.
      • getLastEventTime

        public com.google.protobuf.Timestamp getLastEventTime()
         [Output only] The last time a telemetry event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_event_time = 8;
        Specified by:
        getLastEventTime in interface DeviceOrBuilder
        Returns:
        The lastEventTime.
      • setLastEventTime

        public Device.Builder setLastEventTime​(com.google.protobuf.Timestamp value)
         [Output only] The last time a telemetry event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_event_time = 8;
      • setLastEventTime

        public Device.Builder setLastEventTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         [Output only] The last time a telemetry event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_event_time = 8;
      • mergeLastEventTime

        public Device.Builder mergeLastEventTime​(com.google.protobuf.Timestamp value)
         [Output only] The last time a telemetry event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_event_time = 8;
      • clearLastEventTime

        public Device.Builder clearLastEventTime()
         [Output only] The last time a telemetry event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_event_time = 8;
      • getLastEventTimeBuilder

        public com.google.protobuf.Timestamp.Builder getLastEventTimeBuilder()
         [Output only] The last time a telemetry event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_event_time = 8;
      • getLastEventTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getLastEventTimeOrBuilder()
         [Output only] The last time a telemetry event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_event_time = 8;
        Specified by:
        getLastEventTimeOrBuilder in interface DeviceOrBuilder
      • hasLastStateTime

        public boolean hasLastStateTime()
         [Output only] The last time a state event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_state_time = 20;
        Specified by:
        hasLastStateTime in interface DeviceOrBuilder
        Returns:
        Whether the lastStateTime field is set.
      • getLastStateTime

        public com.google.protobuf.Timestamp getLastStateTime()
         [Output only] The last time a state event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_state_time = 20;
        Specified by:
        getLastStateTime in interface DeviceOrBuilder
        Returns:
        The lastStateTime.
      • setLastStateTime

        public Device.Builder setLastStateTime​(com.google.protobuf.Timestamp value)
         [Output only] The last time a state event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_state_time = 20;
      • setLastStateTime

        public Device.Builder setLastStateTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         [Output only] The last time a state event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_state_time = 20;
      • mergeLastStateTime

        public Device.Builder mergeLastStateTime​(com.google.protobuf.Timestamp value)
         [Output only] The last time a state event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_state_time = 20;
      • clearLastStateTime

        public Device.Builder clearLastStateTime()
         [Output only] The last time a state event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_state_time = 20;
      • getLastStateTimeBuilder

        public com.google.protobuf.Timestamp.Builder getLastStateTimeBuilder()
         [Output only] The last time a state event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_state_time = 20;
      • getLastStateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getLastStateTimeOrBuilder()
         [Output only] The last time a state event was received. Timestamps are
         periodically collected and written to storage; they may be stale by a few
         minutes.
         
        .google.protobuf.Timestamp last_state_time = 20;
        Specified by:
        getLastStateTimeOrBuilder in interface DeviceOrBuilder
      • hasLastConfigAckTime

        public boolean hasLastConfigAckTime()
         [Output only] The last time a cloud-to-device config version acknowledgment
         was received from the device. This field is only for configurations
         sent through MQTT.
         
        .google.protobuf.Timestamp last_config_ack_time = 14;
        Specified by:
        hasLastConfigAckTime in interface DeviceOrBuilder
        Returns:
        Whether the lastConfigAckTime field is set.
      • getLastConfigAckTime

        public com.google.protobuf.Timestamp getLastConfigAckTime()
         [Output only] The last time a cloud-to-device config version acknowledgment
         was received from the device. This field is only for configurations
         sent through MQTT.
         
        .google.protobuf.Timestamp last_config_ack_time = 14;
        Specified by:
        getLastConfigAckTime in interface DeviceOrBuilder
        Returns:
        The lastConfigAckTime.
      • setLastConfigAckTime

        public Device.Builder setLastConfigAckTime​(com.google.protobuf.Timestamp value)
         [Output only] The last time a cloud-to-device config version acknowledgment
         was received from the device. This field is only for configurations
         sent through MQTT.
         
        .google.protobuf.Timestamp last_config_ack_time = 14;
      • setLastConfigAckTime

        public Device.Builder setLastConfigAckTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         [Output only] The last time a cloud-to-device config version acknowledgment
         was received from the device. This field is only for configurations
         sent through MQTT.
         
        .google.protobuf.Timestamp last_config_ack_time = 14;
      • mergeLastConfigAckTime

        public Device.Builder mergeLastConfigAckTime​(com.google.protobuf.Timestamp value)
         [Output only] The last time a cloud-to-device config version acknowledgment
         was received from the device. This field is only for configurations
         sent through MQTT.
         
        .google.protobuf.Timestamp last_config_ack_time = 14;
      • clearLastConfigAckTime

        public Device.Builder clearLastConfigAckTime()
         [Output only] The last time a cloud-to-device config version acknowledgment
         was received from the device. This field is only for configurations
         sent through MQTT.
         
        .google.protobuf.Timestamp last_config_ack_time = 14;
      • getLastConfigAckTimeBuilder

        public com.google.protobuf.Timestamp.Builder getLastConfigAckTimeBuilder()
         [Output only] The last time a cloud-to-device config version acknowledgment
         was received from the device. This field is only for configurations
         sent through MQTT.
         
        .google.protobuf.Timestamp last_config_ack_time = 14;
      • getLastConfigAckTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getLastConfigAckTimeOrBuilder()
         [Output only] The last time a cloud-to-device config version acknowledgment
         was received from the device. This field is only for configurations
         sent through MQTT.
         
        .google.protobuf.Timestamp last_config_ack_time = 14;
        Specified by:
        getLastConfigAckTimeOrBuilder in interface DeviceOrBuilder
      • hasLastConfigSendTime

        public boolean hasLastConfigSendTime()
         [Output only] The last time a cloud-to-device config version was sent to
         the device.
         
        .google.protobuf.Timestamp last_config_send_time = 18;
        Specified by:
        hasLastConfigSendTime in interface DeviceOrBuilder
        Returns:
        Whether the lastConfigSendTime field is set.
      • getLastConfigSendTime

        public com.google.protobuf.Timestamp getLastConfigSendTime()
         [Output only] The last time a cloud-to-device config version was sent to
         the device.
         
        .google.protobuf.Timestamp last_config_send_time = 18;
        Specified by:
        getLastConfigSendTime in interface DeviceOrBuilder
        Returns:
        The lastConfigSendTime.
      • setLastConfigSendTime

        public Device.Builder setLastConfigSendTime​(com.google.protobuf.Timestamp value)
         [Output only] The last time a cloud-to-device config version was sent to
         the device.
         
        .google.protobuf.Timestamp last_config_send_time = 18;
      • setLastConfigSendTime

        public Device.Builder setLastConfigSendTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         [Output only] The last time a cloud-to-device config version was sent to
         the device.
         
        .google.protobuf.Timestamp last_config_send_time = 18;
      • mergeLastConfigSendTime

        public Device.Builder mergeLastConfigSendTime​(com.google.protobuf.Timestamp value)
         [Output only] The last time a cloud-to-device config version was sent to
         the device.
         
        .google.protobuf.Timestamp last_config_send_time = 18;
      • clearLastConfigSendTime

        public Device.Builder clearLastConfigSendTime()
         [Output only] The last time a cloud-to-device config version was sent to
         the device.
         
        .google.protobuf.Timestamp last_config_send_time = 18;
      • getLastConfigSendTimeBuilder

        public com.google.protobuf.Timestamp.Builder getLastConfigSendTimeBuilder()
         [Output only] The last time a cloud-to-device config version was sent to
         the device.
         
        .google.protobuf.Timestamp last_config_send_time = 18;
      • getLastConfigSendTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getLastConfigSendTimeOrBuilder()
         [Output only] The last time a cloud-to-device config version was sent to
         the device.
         
        .google.protobuf.Timestamp last_config_send_time = 18;
        Specified by:
        getLastConfigSendTimeOrBuilder in interface DeviceOrBuilder
      • getBlocked

        public boolean getBlocked()
         If a device is blocked, connections or requests from this device will fail.
         Can be used to temporarily prevent the device from connecting if, for
         example, the sensor is generating bad data and needs maintenance.
         
        bool blocked = 19;
        Specified by:
        getBlocked in interface DeviceOrBuilder
        Returns:
        The blocked.
      • setBlocked

        public Device.Builder setBlocked​(boolean value)
         If a device is blocked, connections or requests from this device will fail.
         Can be used to temporarily prevent the device from connecting if, for
         example, the sensor is generating bad data and needs maintenance.
         
        bool blocked = 19;
        Parameters:
        value - The blocked to set.
        Returns:
        This builder for chaining.
      • clearBlocked

        public Device.Builder clearBlocked()
         If a device is blocked, connections or requests from this device will fail.
         Can be used to temporarily prevent the device from connecting if, for
         example, the sensor is generating bad data and needs maintenance.
         
        bool blocked = 19;
        Returns:
        This builder for chaining.
      • hasLastErrorTime

        public boolean hasLastErrorTime()
         [Output only] The time the most recent error occurred, such as a failure to
         publish to Cloud Pub/Sub. This field is the timestamp of
         'last_error_status'.
         
        .google.protobuf.Timestamp last_error_time = 10;
        Specified by:
        hasLastErrorTime in interface DeviceOrBuilder
        Returns:
        Whether the lastErrorTime field is set.
      • getLastErrorTime

        public com.google.protobuf.Timestamp getLastErrorTime()
         [Output only] The time the most recent error occurred, such as a failure to
         publish to Cloud Pub/Sub. This field is the timestamp of
         'last_error_status'.
         
        .google.protobuf.Timestamp last_error_time = 10;
        Specified by:
        getLastErrorTime in interface DeviceOrBuilder
        Returns:
        The lastErrorTime.
      • setLastErrorTime

        public Device.Builder setLastErrorTime​(com.google.protobuf.Timestamp value)
         [Output only] The time the most recent error occurred, such as a failure to
         publish to Cloud Pub/Sub. This field is the timestamp of
         'last_error_status'.
         
        .google.protobuf.Timestamp last_error_time = 10;
      • setLastErrorTime

        public Device.Builder setLastErrorTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         [Output only] The time the most recent error occurred, such as a failure to
         publish to Cloud Pub/Sub. This field is the timestamp of
         'last_error_status'.
         
        .google.protobuf.Timestamp last_error_time = 10;
      • mergeLastErrorTime

        public Device.Builder mergeLastErrorTime​(com.google.protobuf.Timestamp value)
         [Output only] The time the most recent error occurred, such as a failure to
         publish to Cloud Pub/Sub. This field is the timestamp of
         'last_error_status'.
         
        .google.protobuf.Timestamp last_error_time = 10;
      • clearLastErrorTime

        public Device.Builder clearLastErrorTime()
         [Output only] The time the most recent error occurred, such as a failure to
         publish to Cloud Pub/Sub. This field is the timestamp of
         'last_error_status'.
         
        .google.protobuf.Timestamp last_error_time = 10;
      • getLastErrorTimeBuilder

        public com.google.protobuf.Timestamp.Builder getLastErrorTimeBuilder()
         [Output only] The time the most recent error occurred, such as a failure to
         publish to Cloud Pub/Sub. This field is the timestamp of
         'last_error_status'.
         
        .google.protobuf.Timestamp last_error_time = 10;
      • getLastErrorTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getLastErrorTimeOrBuilder()
         [Output only] The time the most recent error occurred, such as a failure to
         publish to Cloud Pub/Sub. This field is the timestamp of
         'last_error_status'.
         
        .google.protobuf.Timestamp last_error_time = 10;
        Specified by:
        getLastErrorTimeOrBuilder in interface DeviceOrBuilder
      • hasLastErrorStatus

        public boolean hasLastErrorStatus()
         [Output only] The error message of the most recent error, such as a failure
         to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this
         field. If no errors have occurred, this field has an empty message
         and the status code 0 == OK. Otherwise, this field is expected to have a
         status code other than OK.
         
        .google.rpc.Status last_error_status = 11;
        Specified by:
        hasLastErrorStatus in interface DeviceOrBuilder
        Returns:
        Whether the lastErrorStatus field is set.
      • getLastErrorStatus

        public com.google.rpc.Status getLastErrorStatus()
         [Output only] The error message of the most recent error, such as a failure
         to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this
         field. If no errors have occurred, this field has an empty message
         and the status code 0 == OK. Otherwise, this field is expected to have a
         status code other than OK.
         
        .google.rpc.Status last_error_status = 11;
        Specified by:
        getLastErrorStatus in interface DeviceOrBuilder
        Returns:
        The lastErrorStatus.
      • setLastErrorStatus

        public Device.Builder setLastErrorStatus​(com.google.rpc.Status value)
         [Output only] The error message of the most recent error, such as a failure
         to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this
         field. If no errors have occurred, this field has an empty message
         and the status code 0 == OK. Otherwise, this field is expected to have a
         status code other than OK.
         
        .google.rpc.Status last_error_status = 11;
      • setLastErrorStatus

        public Device.Builder setLastErrorStatus​(com.google.rpc.Status.Builder builderForValue)
         [Output only] The error message of the most recent error, such as a failure
         to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this
         field. If no errors have occurred, this field has an empty message
         and the status code 0 == OK. Otherwise, this field is expected to have a
         status code other than OK.
         
        .google.rpc.Status last_error_status = 11;
      • mergeLastErrorStatus

        public Device.Builder mergeLastErrorStatus​(com.google.rpc.Status value)
         [Output only] The error message of the most recent error, such as a failure
         to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this
         field. If no errors have occurred, this field has an empty message
         and the status code 0 == OK. Otherwise, this field is expected to have a
         status code other than OK.
         
        .google.rpc.Status last_error_status = 11;
      • clearLastErrorStatus

        public Device.Builder clearLastErrorStatus()
         [Output only] The error message of the most recent error, such as a failure
         to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this
         field. If no errors have occurred, this field has an empty message
         and the status code 0 == OK. Otherwise, this field is expected to have a
         status code other than OK.
         
        .google.rpc.Status last_error_status = 11;
      • getLastErrorStatusBuilder

        public com.google.rpc.Status.Builder getLastErrorStatusBuilder()
         [Output only] The error message of the most recent error, such as a failure
         to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this
         field. If no errors have occurred, this field has an empty message
         and the status code 0 == OK. Otherwise, this field is expected to have a
         status code other than OK.
         
        .google.rpc.Status last_error_status = 11;
      • getLastErrorStatusOrBuilder

        public com.google.rpc.StatusOrBuilder getLastErrorStatusOrBuilder()
         [Output only] The error message of the most recent error, such as a failure
         to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this
         field. If no errors have occurred, this field has an empty message
         and the status code 0 == OK. Otherwise, this field is expected to have a
         status code other than OK.
         
        .google.rpc.Status last_error_status = 11;
        Specified by:
        getLastErrorStatusOrBuilder in interface DeviceOrBuilder
      • hasConfig

        public boolean hasConfig()
         The most recent device configuration, which is eventually sent from
         Cloud IoT Core to the device. If not present on creation, the
         configuration will be initialized with an empty payload and version value
         of `1`. To update this field after creation, use the
         `DeviceManager.ModifyCloudToDeviceConfig` method.
         
        .google.cloud.iot.v1.DeviceConfig config = 13;
        Specified by:
        hasConfig in interface DeviceOrBuilder
        Returns:
        Whether the config field is set.
      • getConfig

        public DeviceConfig getConfig()
         The most recent device configuration, which is eventually sent from
         Cloud IoT Core to the device. If not present on creation, the
         configuration will be initialized with an empty payload and version value
         of `1`. To update this field after creation, use the
         `DeviceManager.ModifyCloudToDeviceConfig` method.
         
        .google.cloud.iot.v1.DeviceConfig config = 13;
        Specified by:
        getConfig in interface DeviceOrBuilder
        Returns:
        The config.
      • setConfig

        public Device.Builder setConfig​(DeviceConfig value)
         The most recent device configuration, which is eventually sent from
         Cloud IoT Core to the device. If not present on creation, the
         configuration will be initialized with an empty payload and version value
         of `1`. To update this field after creation, use the
         `DeviceManager.ModifyCloudToDeviceConfig` method.
         
        .google.cloud.iot.v1.DeviceConfig config = 13;
      • setConfig

        public Device.Builder setConfig​(DeviceConfig.Builder builderForValue)
         The most recent device configuration, which is eventually sent from
         Cloud IoT Core to the device. If not present on creation, the
         configuration will be initialized with an empty payload and version value
         of `1`. To update this field after creation, use the
         `DeviceManager.ModifyCloudToDeviceConfig` method.
         
        .google.cloud.iot.v1.DeviceConfig config = 13;
      • mergeConfig

        public Device.Builder mergeConfig​(DeviceConfig value)
         The most recent device configuration, which is eventually sent from
         Cloud IoT Core to the device. If not present on creation, the
         configuration will be initialized with an empty payload and version value
         of `1`. To update this field after creation, use the
         `DeviceManager.ModifyCloudToDeviceConfig` method.
         
        .google.cloud.iot.v1.DeviceConfig config = 13;
      • clearConfig

        public Device.Builder clearConfig()
         The most recent device configuration, which is eventually sent from
         Cloud IoT Core to the device. If not present on creation, the
         configuration will be initialized with an empty payload and version value
         of `1`. To update this field after creation, use the
         `DeviceManager.ModifyCloudToDeviceConfig` method.
         
        .google.cloud.iot.v1.DeviceConfig config = 13;
      • getConfigBuilder

        public DeviceConfig.Builder getConfigBuilder()
         The most recent device configuration, which is eventually sent from
         Cloud IoT Core to the device. If not present on creation, the
         configuration will be initialized with an empty payload and version value
         of `1`. To update this field after creation, use the
         `DeviceManager.ModifyCloudToDeviceConfig` method.
         
        .google.cloud.iot.v1.DeviceConfig config = 13;
      • getConfigOrBuilder

        public DeviceConfigOrBuilder getConfigOrBuilder()
         The most recent device configuration, which is eventually sent from
         Cloud IoT Core to the device. If not present on creation, the
         configuration will be initialized with an empty payload and version value
         of `1`. To update this field after creation, use the
         `DeviceManager.ModifyCloudToDeviceConfig` method.
         
        .google.cloud.iot.v1.DeviceConfig config = 13;
        Specified by:
        getConfigOrBuilder in interface DeviceOrBuilder
      • hasState

        public boolean hasState()
         [Output only] The state most recently received from the device. If no state
         has been reported, this field is not present.
         
        .google.cloud.iot.v1.DeviceState state = 16;
        Specified by:
        hasState in interface DeviceOrBuilder
        Returns:
        Whether the state field is set.
      • getState

        public DeviceState getState()
         [Output only] The state most recently received from the device. If no state
         has been reported, this field is not present.
         
        .google.cloud.iot.v1.DeviceState state = 16;
        Specified by:
        getState in interface DeviceOrBuilder
        Returns:
        The state.
      • setState

        public Device.Builder setState​(DeviceState value)
         [Output only] The state most recently received from the device. If no state
         has been reported, this field is not present.
         
        .google.cloud.iot.v1.DeviceState state = 16;
      • setState

        public Device.Builder setState​(DeviceState.Builder builderForValue)
         [Output only] The state most recently received from the device. If no state
         has been reported, this field is not present.
         
        .google.cloud.iot.v1.DeviceState state = 16;
      • mergeState

        public Device.Builder mergeState​(DeviceState value)
         [Output only] The state most recently received from the device. If no state
         has been reported, this field is not present.
         
        .google.cloud.iot.v1.DeviceState state = 16;
      • clearState

        public Device.Builder clearState()
         [Output only] The state most recently received from the device. If no state
         has been reported, this field is not present.
         
        .google.cloud.iot.v1.DeviceState state = 16;
      • getStateBuilder

        public DeviceState.Builder getStateBuilder()
         [Output only] The state most recently received from the device. If no state
         has been reported, this field is not present.
         
        .google.cloud.iot.v1.DeviceState state = 16;
      • getStateOrBuilder

        public DeviceStateOrBuilder getStateOrBuilder()
         [Output only] The state most recently received from the device. If no state
         has been reported, this field is not present.
         
        .google.cloud.iot.v1.DeviceState state = 16;
        Specified by:
        getStateOrBuilder in interface DeviceOrBuilder
      • getLogLevelValue

        public int getLogLevelValue()
         **Beta Feature**
        
         The logging verbosity for device activity. If unspecified,
         DeviceRegistry.log_level will be used.
         
        .google.cloud.iot.v1.LogLevel log_level = 21;
        Specified by:
        getLogLevelValue in interface DeviceOrBuilder
        Returns:
        The enum numeric value on the wire for logLevel.
      • setLogLevelValue

        public Device.Builder setLogLevelValue​(int value)
         **Beta Feature**
        
         The logging verbosity for device activity. If unspecified,
         DeviceRegistry.log_level will be used.
         
        .google.cloud.iot.v1.LogLevel log_level = 21;
        Parameters:
        value - The enum numeric value on the wire for logLevel to set.
        Returns:
        This builder for chaining.
      • getLogLevel

        public LogLevel getLogLevel()
         **Beta Feature**
        
         The logging verbosity for device activity. If unspecified,
         DeviceRegistry.log_level will be used.
         
        .google.cloud.iot.v1.LogLevel log_level = 21;
        Specified by:
        getLogLevel in interface DeviceOrBuilder
        Returns:
        The logLevel.
      • setLogLevel

        public Device.Builder setLogLevel​(LogLevel value)
         **Beta Feature**
        
         The logging verbosity for device activity. If unspecified,
         DeviceRegistry.log_level will be used.
         
        .google.cloud.iot.v1.LogLevel log_level = 21;
        Parameters:
        value - The logLevel to set.
        Returns:
        This builder for chaining.
      • clearLogLevel

        public Device.Builder clearLogLevel()
         **Beta Feature**
        
         The logging verbosity for device activity. If unspecified,
         DeviceRegistry.log_level will be used.
         
        .google.cloud.iot.v1.LogLevel log_level = 21;
        Returns:
        This builder for chaining.
      • getMetadataCount

        public int getMetadataCount()
        Description copied from interface: DeviceOrBuilder
         The metadata key-value pairs assigned to the device. This metadata is not
         interpreted or indexed by Cloud IoT Core. It can be used to add contextual
         information for the device.
        
         Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and
         be less than 128 bytes in length.
        
         Values are free-form strings. Each value must be less than or equal to 32
         KB in size.
        
         The total size of all keys and values must be less than 256 KB, and the
         maximum number of key-value pairs is 500.
         
        map<string, string> metadata = 17;
        Specified by:
        getMetadataCount in interface DeviceOrBuilder
      • containsMetadata

        public boolean containsMetadata​(String key)
         The metadata key-value pairs assigned to the device. This metadata is not
         interpreted or indexed by Cloud IoT Core. It can be used to add contextual
         information for the device.
        
         Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and
         be less than 128 bytes in length.
        
         Values are free-form strings. Each value must be less than or equal to 32
         KB in size.
        
         The total size of all keys and values must be less than 256 KB, and the
         maximum number of key-value pairs is 500.
         
        map<string, string> metadata = 17;
        Specified by:
        containsMetadata in interface DeviceOrBuilder
      • getMetadataMap

        public Map<String,​String> getMetadataMap()
         The metadata key-value pairs assigned to the device. This metadata is not
         interpreted or indexed by Cloud IoT Core. It can be used to add contextual
         information for the device.
        
         Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and
         be less than 128 bytes in length.
        
         Values are free-form strings. Each value must be less than or equal to 32
         KB in size.
        
         The total size of all keys and values must be less than 256 KB, and the
         maximum number of key-value pairs is 500.
         
        map<string, string> metadata = 17;
        Specified by:
        getMetadataMap in interface DeviceOrBuilder
      • getMetadataOrDefault

        public String getMetadataOrDefault​(String key,
                                           String defaultValue)
         The metadata key-value pairs assigned to the device. This metadata is not
         interpreted or indexed by Cloud IoT Core. It can be used to add contextual
         information for the device.
        
         Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and
         be less than 128 bytes in length.
        
         Values are free-form strings. Each value must be less than or equal to 32
         KB in size.
        
         The total size of all keys and values must be less than 256 KB, and the
         maximum number of key-value pairs is 500.
         
        map<string, string> metadata = 17;
        Specified by:
        getMetadataOrDefault in interface DeviceOrBuilder
      • getMetadataOrThrow

        public String getMetadataOrThrow​(String key)
         The metadata key-value pairs assigned to the device. This metadata is not
         interpreted or indexed by Cloud IoT Core. It can be used to add contextual
         information for the device.
        
         Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and
         be less than 128 bytes in length.
        
         Values are free-form strings. Each value must be less than or equal to 32
         KB in size.
        
         The total size of all keys and values must be less than 256 KB, and the
         maximum number of key-value pairs is 500.
         
        map<string, string> metadata = 17;
        Specified by:
        getMetadataOrThrow in interface DeviceOrBuilder
      • removeMetadata

        public Device.Builder removeMetadata​(String key)
         The metadata key-value pairs assigned to the device. This metadata is not
         interpreted or indexed by Cloud IoT Core. It can be used to add contextual
         information for the device.
        
         Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and
         be less than 128 bytes in length.
        
         Values are free-form strings. Each value must be less than or equal to 32
         KB in size.
        
         The total size of all keys and values must be less than 256 KB, and the
         maximum number of key-value pairs is 500.
         
        map<string, string> metadata = 17;
      • getMutableMetadata

        @Deprecated
        public Map<String,​String> getMutableMetadata()
        Deprecated.
        Use alternate mutation accessors instead.
      • putMetadata

        public Device.Builder putMetadata​(String key,
                                          String value)
         The metadata key-value pairs assigned to the device. This metadata is not
         interpreted or indexed by Cloud IoT Core. It can be used to add contextual
         information for the device.
        
         Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and
         be less than 128 bytes in length.
        
         Values are free-form strings. Each value must be less than or equal to 32
         KB in size.
        
         The total size of all keys and values must be less than 256 KB, and the
         maximum number of key-value pairs is 500.
         
        map<string, string> metadata = 17;
      • putAllMetadata

        public Device.Builder putAllMetadata​(Map<String,​String> values)
         The metadata key-value pairs assigned to the device. This metadata is not
         interpreted or indexed by Cloud IoT Core. It can be used to add contextual
         information for the device.
        
         Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and
         be less than 128 bytes in length.
        
         Values are free-form strings. Each value must be less than or equal to 32
         KB in size.
        
         The total size of all keys and values must be less than 256 KB, and the
         maximum number of key-value pairs is 500.
         
        map<string, string> metadata = 17;
      • hasGatewayConfig

        public boolean hasGatewayConfig()
         Gateway-related configuration and state.
         
        .google.cloud.iot.v1.GatewayConfig gateway_config = 24;
        Specified by:
        hasGatewayConfig in interface DeviceOrBuilder
        Returns:
        Whether the gatewayConfig field is set.
      • getGatewayConfig

        public GatewayConfig getGatewayConfig()
         Gateway-related configuration and state.
         
        .google.cloud.iot.v1.GatewayConfig gateway_config = 24;
        Specified by:
        getGatewayConfig in interface DeviceOrBuilder
        Returns:
        The gatewayConfig.
      • setGatewayConfig

        public Device.Builder setGatewayConfig​(GatewayConfig value)
         Gateway-related configuration and state.
         
        .google.cloud.iot.v1.GatewayConfig gateway_config = 24;
      • setGatewayConfig

        public Device.Builder setGatewayConfig​(GatewayConfig.Builder builderForValue)
         Gateway-related configuration and state.
         
        .google.cloud.iot.v1.GatewayConfig gateway_config = 24;
      • mergeGatewayConfig

        public Device.Builder mergeGatewayConfig​(GatewayConfig value)
         Gateway-related configuration and state.
         
        .google.cloud.iot.v1.GatewayConfig gateway_config = 24;
      • clearGatewayConfig

        public Device.Builder clearGatewayConfig()
         Gateway-related configuration and state.
         
        .google.cloud.iot.v1.GatewayConfig gateway_config = 24;
      • getGatewayConfigBuilder

        public GatewayConfig.Builder getGatewayConfigBuilder()
         Gateway-related configuration and state.
         
        .google.cloud.iot.v1.GatewayConfig gateway_config = 24;
      • setUnknownFields

        public final Device.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>
      • mergeUnknownFields

        public final Device.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Device.Builder>