Class: Com::Vmware::Vapi::Metadata::Metamodel::StructureInfo::Type

Inherits:
VAPI::Bindings::VapiEnum
  • Object
show all
Defined in:
/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb

Overview

The ``Com::Vmware::Vapi::Metadata::Metamodel::StructureInfo::Type`` enumerated type defines the kind of this structure element. In the interface definition language, structure element and error element have similar characteristics. The difference is that only error elements can be used to describe the errors of an operation element.

Constant Summary

STRUCTURE =
Type.new('STRUCTURE')
ERROR =
Type.new('ERROR')

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Attribute Details

- (Com::Vmware::Vapi::Metadata::Metamodel::StructureInfo::Type) error

If the type is an error element.



2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 2010

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.vapi.metadata.metamodel.structure_info.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] structure
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::StructureInfo::Type]
    #     If the type is a structure element.
    STRUCTURE = Type.new('STRUCTURE')

    # @!attribute [rw] error
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::StructureInfo::Type]
    #     If the type is an error element.
    ERROR = Type.new('ERROR')

end

- (Com::Vmware::Vapi::Metadata::Metamodel::StructureInfo::Type) structure

If the type is a structure element.



2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 2010

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.vapi.metadata.metamodel.structure_info.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] structure
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::StructureInfo::Type]
    #     If the type is a structure element.
    STRUCTURE = Type.new('STRUCTURE')

    # @!attribute [rw] error
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::StructureInfo::Type]
    #     If the type is an error element.
    ERROR = Type.new('ERROR')

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



2016
2017
2018
2019
2020
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 2016

def binding_type
    @binding_type ||= VAPI::Bindings::EnumType.new(
        'com.vmware.vapi.metadata.metamodel.structure_info.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



2027
2028
2029
2030
2031
2032
2033
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 2027

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