Skip to content

Latest commit

 

History

History
80 lines (53 loc) · 1.44 KB

File metadata and controls

80 lines (53 loc) · 1.44 KB

IntersightClient::InventoryDeviceInfoRelationship

Class instance methods

openapi_one_of

Returns the list of classes defined in oneOf.

Example

require 'intersight_client'

IntersightClient::InventoryDeviceInfoRelationship.openapi_one_of
# =>
# [
#   :'InventoryDeviceInfo',
#   :'MoMoRef',
#   :'Null'
# ]

openapi_discriminator_name

Returns the discriminator's property name.

Example

require 'intersight_client'

IntersightClient::InventoryDeviceInfoRelationship.openapi_discriminator_name
# => :'class_id'

openapi_discriminator_name

Returns the discriminator's mapping.

Example

require 'intersight_client'

IntersightClient::InventoryDeviceInfoRelationship.openapi_discriminator_mapping
# =>
# {
#   :'inventory.DeviceInfo' => :'InventoryDeviceInfo',
#   :'mo.MoRef' => :'MoMoRef'
# }

### build

Find the appropriate object from the `openapi_one_of` list and casts the data into it.

#### Example

```ruby
require 'intersight_client'

IntersightClient::InventoryDeviceInfoRelationship.build(data)
# => #<InventoryDeviceInfo:0x00007fdd4aab02a0>

IntersightClient::InventoryDeviceInfoRelationship.build(data_that_doesnt_match)
# => nil

Parameters

Name Type Description
data Mixed data to be matched against the list of oneOf items

Return type

  • InventoryDeviceInfo
  • MoMoRef
  • Null
  • nil (if no type matches)