Class: Google::Apis::CloudiotV1beta1::DeviceConfig

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

Overview

The device configuration and its metadata. 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



367
368
369
# File 'generated/google/apis/cloudiot_v1beta1/classes.rb', line 367

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

Instance Attribute Details

#cloud_update_timeString

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

Returns:

  • (String)


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

def cloud_update_time
  @cloud_update_time
end

#dataGoogle::Apis::CloudiotV1beta1::DeviceConfigData

The data for a device configuration. Only binary data is currently supported. Corresponds to the JSON property data



344
345
346
# File 'generated/google/apis/cloudiot_v1beta1/classes.rb', line 344

def data
  @data
end

#device_ack_timeString

[Output only] The time when the Cloud IoT Core server 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 sending the config to the device, there may have been many config versions on the Cloud IoT Core service while the device was disconnected; and on connection, only the latest version is sent to the device. Some of the versions may never be sent to the device, and therefore are never acknowledged. This timestamp is set by the Cloud IoT Core service. Corresponds to the JSON property deviceAckTime

Returns:

  • (String)


357
358
359
# File 'generated/google/apis/cloudiot_v1beta1/classes.rb', line 357

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 zero after device creation. The version must be zero on the CreateDevice request if a config is specified; the response of CreateDevice will always have a value of one. Corresponds to the JSON property version

Returns:

  • (Fixnum)


365
366
367
# File 'generated/google/apis/cloudiot_v1beta1/classes.rb', line 365

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



372
373
374
375
376
377
# File 'generated/google/apis/cloudiot_v1beta1/classes.rb', line 372

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