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

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

Overview

Identifiers used to describe the device.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DeviceNames

Returns a new instance of DeviceNames.



255
256
257
# File 'lib/google/apis/homegraph_v1/classes.rb', line 255

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

Instance Attribute Details

#default_namesArray<String>

List of names provided by the manufacturer rather than the user, such as serial numbers, SKUs, etc. Corresponds to the JSON property defaultNames

Returns:

  • (Array<String>)


241
242
243
# File 'lib/google/apis/homegraph_v1/classes.rb', line 241

def default_names
  @default_names
end

#nameString

Primary name of the device, generally provided by the user. Names will be truncated if over the 60 Unicode code point (character) limit and no errors will be thrown. Developers are responsible for handling long names. Corresponds to the JSON property name

Returns:

  • (String)


248
249
250
# File 'lib/google/apis/homegraph_v1/classes.rb', line 248

def name
  @name
end

#nicknamesArray<String>

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

Returns:

  • (Array<String>)


253
254
255
# File 'lib/google/apis/homegraph_v1/classes.rb', line 253

def nicknames
  @nicknames
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



260
261
262
263
264
# File 'lib/google/apis/homegraph_v1/classes.rb', line 260

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