Class: Com::Vmware::Vcenter::Vm::Hardware::Adapter::Sata::Type

Inherits:
VAPI::Bindings::VapiEnum
  • Object
show all
Defined in:
/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware/adapter.rb

Overview

The ``Com::Vmware::Vcenter::Vm::Hardware::Adapter::Sata::Type`` enumerated type defines the valid emulation types for a virtual SATA adapter.

Constant Summary

AHCI =
Type.new('AHCI')

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Attribute Details

- (Com::Vmware::Vcenter::Vm::Hardware::Adapter::Sata::Type) ahci

AHCI host bus adapter.



395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware/adapter.rb', line 395

class Type < VAPI::Bindings::VapiEnum

    class << self
        # Holds (gets or creates) the binding type metadata for this enumeration type.
        # @scope class
        # @return [VAPI::Bindings::EnumType] the binding type
        def binding_type
            @binding_type ||= VAPI::Bindings::EnumType.new(
                'com.vmware.vcenter.vm.hardware.adapter.sata.type',
                Type)
        end

        # Converts from a string value (perhaps off the wire) to an instance
        # of this enum type.
        # @param value [String] the actual value of the enum instance
        # @return [Type] the instance found for the value, otherwise
        #         an unknown instance will be built for the value
        def from_string(value)
            begin
                const_get(value)
            rescue NameError
                Type.new('UNKNOWN', value)
            end
        end
    end

    private

    # Constructs a new instance.
    # @param value [String] the actual value of the enum instance
    # @param unknown [String] the unknown value when value is 'UKNOWN'
    def initialize(value, unknown=nil)
        super(self.class.binding_type, value, unknown)
    end

    public

    # @!attribute [rw] ahci
    #     @return [Com::Vmware::Vcenter::Vm::Hardware::Adapter::Sata::Type]
    #     AHCI host bus adapter.
    AHCI = Type.new('AHCI')

end

Class Method Details

+ (VAPI::Bindings::EnumType) binding_type

Holds (gets or creates) the binding type metadata for this enumeration type.

Returns:

  • (VAPI::Bindings::EnumType)

    the binding type



401
402
403
404
405
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware/adapter.rb', line 401

def binding_type
    @binding_type ||= VAPI::Bindings::EnumType.new(
        'com.vmware.vcenter.vm.hardware.adapter.sata.type',
        Type)
end

+ (Type) from_string(value)

Converts from a string value (perhaps off the wire) to an instance of this enum type.

Parameters:

  • value (String)

    the actual value of the enum instance

Returns:

  • (Type)

    the instance found for the value, otherwise an unknown instance will be built for the value



412
413
414
415
416
417
418
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware/adapter.rb', line 412

def from_string(value)
    begin
        const_get(value)
    rescue NameError
        Type.new('UNKNOWN', value)
    end
end