Class: Google::Apis::HomegraphV1::DeviceNames

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

Overview

Different names for the device.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ DeviceNames

Returns a new instance of DeviceNames.



228
229
230
# File 'generated/google/apis/homegraph_v1/classes.rb', line 228

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

Instance Attribute Details

#default_namesArray<String>

List of names provided by the partner rather than the user, often manufacturer names, SKUs, etc. Corresponds to the JSON property defaultNames

Returns:

  • (Array<String>)


216
217
218
# File 'generated/google/apis/homegraph_v1/classes.rb', line 216

def default_names
  @default_names
end

#nameString

Primary name of the device, generally provided by the user. Corresponds to the JSON property name

Returns:

  • (String)


221
222
223
# File 'generated/google/apis/homegraph_v1/classes.rb', line 221

def name
  @name
end

#nicknamesArray<String>

Additional names provided by the user for the device. Corresponds to the JSON property nicknames

Returns:

  • (Array<String>)


226
227
228
# File 'generated/google/apis/homegraph_v1/classes.rb', line 226

def nicknames
  @nicknames
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



233
234
235
236
237
# File 'generated/google/apis/homegraph_v1/classes.rb', line 233

def update!(**args)
  @default_names = args[:default_names] if args.key?(:default_names)
  @name = args[:name] if args.key?(:name)
  @nicknames = args[:nicknames] if args.key?(:nicknames)
end