Class: Google::Apis::CloudiotV1::DeviceConfig

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudiot_v1/classes.rb,
generated/google/apis/cloudiot_v1/representations.rb,
generated/google/apis/cloudiot_v1/representations.rb

Overview

The device configuration. Eventually delivered to devices.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DeviceConfig

Returns a new instance of DeviceConfig.



325
326
327
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 325

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#binary_dataString

The device configuration data. Corresponds to the JSON property binaryData NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


297
298
299
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 297

def binary_data
  @binary_data
end

#cloud_update_timeString

[Output only] The time at which this configuration version was updated in Cloud IoT Core. This timestamp is set by the server. Corresponds to the JSON property cloudUpdateTime

Returns:

  • (String)


303
304
305
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 303

def cloud_update_time
  @cloud_update_time
end

#device_ack_timeString

[Output only] The time at which Cloud IoT Core received the acknowledgment from the device, indicating that the device has received this configuration version. If this field is not present, the device has not yet acknowledged that it received this version. Note that when the config was sent to the device, many config versions may have been available in Cloud IoT Core while the device was disconnected, and on connection, only the latest version is sent to the device. Some versions may never be sent to the device, and therefore are never acknowledged. This timestamp is set by Cloud IoT Core. Corresponds to the JSON property deviceAckTime

Returns:

  • (String)


315
316
317
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 315

def device_ack_time
  @device_ack_time
end

#versionFixnum

[Output only] The version of this update. The version number is assigned by the server, and is always greater than 0 after device creation. The version must be 0 on the CreateDevice request if a config is specified; the response of CreateDevice will always have a value of 1. Corresponds to the JSON property version

Returns:

  • (Fixnum)


323
324
325
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 323

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



330
331
332
333
334
335
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 330

def update!(**args)
  @binary_data = args[:binary_data] if args.key?(:binary_data)
  @cloud_update_time = args[:cloud_update_time] if args.key?(:cloud_update_time)
  @device_ack_time = args[:device_ack_time] if args.key?(:device_ack_time)
  @version = args[:version] if args.key?(:version)
end