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



395
396
397
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 395

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)


366
367
368
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 366

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)


372
373
374
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 372

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)


385
386
387
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 385

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)


393
394
395
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 393

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



400
401
402
403
404
405
# File 'generated/google/apis/cloudiot_v1/classes.rb', line 400

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