Class List Method List File List

# Class: Com::Vmware::Vcenter::Vm::Hardware::Disk::BackingType

Inherits:
  VAPI::Bindings::VapiEnum
  - Object
  - VAPI::Bindings::VapiEnum
  - Com::Vmware::Vcenter::Vm::Hardware::Disk::BackingType
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb

## Overview

The ``Com::Vmware::Vcenter::Vm::Hardware::Disk::BackingType`` enumerated type defines the valid backing types for a virtual disk.

## Constant Summary

VMDK_FILE =

      BackingType.new('VMDK_FILE')

## Instance Attribute Summary (collapse)

- - (Com::Vmware::Vcenter::Vm::Hardware::Disk::BackingType) vmdk_file

  Virtual disk is backed by a VMDK file.

## Class Method Summary (collapse)

- + (VAPI::Bindings::EnumType) binding_type

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

- + (BackingType) from_string(value)

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

## Instance Attribute Details

### - (`Com::Vmware::Vcenter::Vm::Hardware::Disk::BackingType`) vmdk_file

Virtual disk is backed by a VMDK file.

Returns:

- (`Com::Vmware::Vcenter::Vm::Hardware::Disk::BackingType`)

    2272
    2273
    2274
    2275
    2276
    2277
    2278
    2279
    2280
    2281
    2282
    2283
    2284
    2285
    2286
    2287
    2288
    2289
    2290
    2291
    2292
    2293
    2294
    2295
    2296
    2297
    2298
    2299
    2300
    2301
    2302
    2303
    2304
    2305
    2306
    2307
    2308
    2309
    2310
    2311
    2312
    2313
    2314
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 2272

    class BackingType < 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.disk.backing_type',
                    BackingType)
            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 [BackingType] 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
                    BackingType.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] vmdk_file
        #     @return [Com::Vmware::Vcenter::Vm::Hardware::Disk::BackingType]
        #     Virtual disk is backed by a VMDK file.
        VMDK_FILE = BackingType.new('VMDK_FILE')

    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

    2278
    2279
    2280
    2281
    2282
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 2278

    def binding_type
        @binding_type ||= VAPI::Bindings::EnumType.new(
            'com.vmware.vcenter.vm.hardware.disk.backing_type',
            BackingType)
    end

### + (`BackingType`) 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:

- (`BackingType`) —

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

    2289
    2290
    2291
    2292
    2293
    2294
    2295
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 2289

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