Class List Method List File List

# Class: Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category

Inherits:
  VAPI::Bindings::VapiEnum
  - Object
  - VAPI::Bindings::VapiEnum
  - Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category
  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::ConstantValue::Category`` enumerated type defines enumeration values for the valid kinds of values.

## Constant Summary

PRIMITIVE =

      Category.new('PRIMITIVE')

LIST =

      Category.new('LIST')

## Instance Attribute Summary (collapse)

- - (Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category) list

  Indicates the type of constant value is a list.

- - (Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category) primitive

  Indicates the type of constant value is primitive.

## Class Method Summary (collapse)

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

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

- + (Category) from_string(value)

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

## Instance Attribute Details

### - (`Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category`) list

Indicates the type of constant value is a list.

Returns:

- (`Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category`)

    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1020

    class Category < 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.constant_value.category',
                    Category)
            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 [Category] 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
                    Category.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] primitive
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category]
        #     Indicates the type of constant value is primitive.
        PRIMITIVE = Category.new('PRIMITIVE')

        # @!attribute [rw] list
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category]
        #     Indicates the type of constant value is a list.
        LIST = Category.new('LIST')

    end

### - (`Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category`) primitive

Indicates the type of constant value is primitive.

Returns:

- (`Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category`)

    1020
    1021
    1022
    1023
    1024
    1025
    1026
    1027
    1028
    1029
    1030
    1031
    1032
    1033
    1034
    1035
    1036
    1037
    1038
    1039
    1040
    1041
    1042
    1043
    1044
    1045
    1046
    1047
    1048
    1049
    1050
    1051
    1052
    1053
    1054
    1055
    1056
    1057
    1058
    1059
    1060
    1061
    1062
    1063
    1064
    1065
    1066
    1067
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1020

    class Category < 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.constant_value.category',
                    Category)
            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 [Category] 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
                    Category.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] primitive
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category]
        #     Indicates the type of constant value is primitive.
        PRIMITIVE = Category.new('PRIMITIVE')

        # @!attribute [rw] list
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category]
        #     Indicates the type of constant value is a list.
        LIST = Category.new('LIST')

    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

    1026
    1027
    1028
    1029
    1030
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1026

    def binding_type
        @binding_type ||= VAPI::Bindings::EnumType.new(
            'com.vmware.vapi.metadata.metamodel.constant_value.category',
            Category)
    end

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

- (`Category`) —

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

    1037
    1038
    1039
    1040
    1041
    1042
    1043
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1037

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