Class: NutanixVmm::VmmV40EsxiConfigAdapterType

Inherits:
Object
  • Object
show all
Defined in:
lib/nutanix_vmm/models/vmm_v40_esxi_config_adapter_type.rb

Constant Summary collapse

E1000 =
"E1000".freeze
PCNET32 =
"PCNET32".freeze
VMXNET =
"VMXNET".freeze
VMXNET2 =
"VMXNET2".freeze
VMXNET3 =
"VMXNET3".freeze
E1000_E =
"E1000E".freeze
SRIOV =
"SRIOV".freeze
UNKNOWN =
"$UNKNOWN".freeze
REDACTED =
"$REDACTED".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



28
29
30
# File 'lib/nutanix_vmm/models/vmm_v40_esxi_config_adapter_type.rb', line 28

def self.all_vars
  @all_vars ||= [E1000, PCNET32, VMXNET, VMXNET2, VMXNET3, E1000_E, SRIOV, UNKNOWN, REDACTED].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



35
36
37
# File 'lib/nutanix_vmm/models/vmm_v40_esxi_config_adapter_type.rb', line 35

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



42
43
44
45
# File 'lib/nutanix_vmm/models/vmm_v40_esxi_config_adapter_type.rb', line 42

def build_from_hash(value)
  return value if VmmV40EsxiConfigAdapterType.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #VmmV40EsxiConfigAdapterType"
end