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

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ DeviceConfig

Returns a new instance of DeviceConfig



341
342
343
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 341

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)


312
313
314
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 312

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)


318
319
320
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 318

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)


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

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)


339
340
341
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 339

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



346
347
348
349
350
351
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 346

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