Module: IntersightClient::CloudAwsSubnetRelationship

Defined in:
lib/intersight_client/models/cloud_aws_subnet_relationship.rb

Overview

A relationship to the ‘cloud.AwsSubnet’ resource, or the expanded ‘cloud.AwsSubnet’ resource, or the ‘null’ value.

Class Method Summary collapse

Class Method Details

.build(data) ⇒ Object

Builds the object

Parameters:

  • Data (Mixed)

    to be matched against the list of oneOf items

Returns:

  • (Object)

    Returns the model or the data itself



45
46
47
48
49
50
51
52
53
# File 'lib/intersight_client/models/cloud_aws_subnet_relationship.rb', line 45

def build(data)
  discriminator_value = data[openapi_discriminator_name]
  return nil unless discriminator_value

  klass = openapi_discriminator_mapping[discriminator_value.to_sym]
  return nil unless klass

  IntersightClient.const_get(klass).build_from_hash(data)
end

.openapi_discriminator_mappingObject

Discriminator’s mapping (OpenAPI v3)



35
36
37
38
39
40
# File 'lib/intersight_client/models/cloud_aws_subnet_relationship.rb', line 35

def openapi_discriminator_mapping
  {
    :'cloud.AwsSubnet' => :'CloudAwsSubnet',
    :'mo.MoRef' => :'MoMoRef'
  }
end

.openapi_discriminator_nameObject

Discriminator’s property name (OpenAPI v3)



30
31
32
# File 'lib/intersight_client/models/cloud_aws_subnet_relationship.rb', line 30

def openapi_discriminator_name
  :'ClassId'
end

.openapi_one_ofObject

List of class defined in oneOf (OpenAPI v3)



21
22
23
24
25
26
27
# File 'lib/intersight_client/models/cloud_aws_subnet_relationship.rb', line 21

def openapi_one_of
  [
    :'CloudAwsSubnet',
    :'MoMoRef',
    :'Null'
  ]
end