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

Inherits:
VAPI::Bindings::VapiStruct
  • 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::ConstantValue`` class contains the metamodel information of the constant element.

Defined Under Namespace

Classes: Category

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (ConstantValue) initialize(ruby_values = nil, struct_value = nil)

Constructs a new instance.

Parameters:

  • ruby_values (Hash) (defaults to: nil)

    a map of initial property values (optional)

  • struct_value (VAPI::Data::StructValue) (defaults to: nil)

    a raw StructValue from the wire (optional)



1008
1009
1010
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1008

def initialize(ruby_values=nil, struct_value=nil)
    super(self.class.binding_type, ruby_values, struct_value)
end

Instance Attribute Details

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

Category of the type of constant value.



981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
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
1068
1069
1070
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 981

class ConstantValue < VAPI::Bindings::VapiStruct

    class << self
        # Holds (gets or creates) the binding type metadata for this structure type.
        # @scope class
        # @return [VAPI::Bindings::StructType] the binding type
        def binding_type
            @binding_type ||= VAPI::Bindings::StructType.new(
                'com.vmware.vapi.metadata.metamodel.constant_value',
                {
                    'category' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category'),
                    'primitive_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue')),
                    'list_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue'))),
                },
                ConstantValue,
                false,
                nil)
        end
    end

    attr_accessor :category,
                  :primitive_value,
                  :list_value

    # Constructs a new instance.
    # @param ruby_values [Hash] a map of initial property values (optional)
    # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
    def initialize(ruby_values=nil, struct_value=nil)
        super(self.class.binding_type, ruby_values, struct_value)
    end


    # The  ``Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category``   enumerated type  defines  enumeration values  for the valid kinds of values.
    # @!attribute [rw] primitive
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category]
    #     Indicates the type of constant value is primitive.
    # @!attribute [rw] list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category]
    #     Indicates the type of constant value is a list.
    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


end

- (Array<Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue>) list_value

List value of the constant element. This field is optional and it is only relevant when the value of ``category`` is :attr:`Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category.LIST` .



981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
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
1068
1069
1070
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 981

class ConstantValue < VAPI::Bindings::VapiStruct

    class << self
        # Holds (gets or creates) the binding type metadata for this structure type.
        # @scope class
        # @return [VAPI::Bindings::StructType] the binding type
        def binding_type
            @binding_type ||= VAPI::Bindings::StructType.new(
                'com.vmware.vapi.metadata.metamodel.constant_value',
                {
                    'category' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category'),
                    'primitive_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue')),
                    'list_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue'))),
                },
                ConstantValue,
                false,
                nil)
        end
    end

    attr_accessor :category,
                  :primitive_value,
                  :list_value

    # Constructs a new instance.
    # @param ruby_values [Hash] a map of initial property values (optional)
    # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
    def initialize(ruby_values=nil, struct_value=nil)
        super(self.class.binding_type, ruby_values, struct_value)
    end


    # The  ``Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category``   enumerated type  defines  enumeration values  for the valid kinds of values.
    # @!attribute [rw] primitive
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category]
    #     Indicates the type of constant value is primitive.
    # @!attribute [rw] list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category]
    #     Indicates the type of constant value is a list.
    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


end

- (Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue) primitive_value

Primitive value of the constant element. This field is optional and it is only relevant when the value of ``category`` is :attr:`Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category.PRIMITIVE` .



981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
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
1068
1069
1070
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 981

class ConstantValue < VAPI::Bindings::VapiStruct

    class << self
        # Holds (gets or creates) the binding type metadata for this structure type.
        # @scope class
        # @return [VAPI::Bindings::StructType] the binding type
        def binding_type
            @binding_type ||= VAPI::Bindings::StructType.new(
                'com.vmware.vapi.metadata.metamodel.constant_value',
                {
                    'category' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category'),
                    'primitive_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue')),
                    'list_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue'))),
                },
                ConstantValue,
                false,
                nil)
        end
    end

    attr_accessor :category,
                  :primitive_value,
                  :list_value

    # Constructs a new instance.
    # @param ruby_values [Hash] a map of initial property values (optional)
    # @param struct_value [VAPI::Data::StructValue] a raw StructValue from the wire (optional)
    def initialize(ruby_values=nil, struct_value=nil)
        super(self.class.binding_type, ruby_values, struct_value)
    end


    # The  ``Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category``   enumerated type  defines  enumeration values  for the valid kinds of values.
    # @!attribute [rw] primitive
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category]
    #     Indicates the type of constant value is primitive.
    # @!attribute [rw] list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category]
    #     Indicates the type of constant value is a list.
    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


end

Class Method Details

+ (VAPI::Bindings::StructType) binding_type

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

Returns:

  • (VAPI::Bindings::StructType)

    the binding type



987
988
989
990
991
992
993
994
995
996
997
998
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 987

def binding_type
    @binding_type ||= VAPI::Bindings::StructType.new(
        'com.vmware.vapi.metadata.metamodel.constant_value',
        {
            'category' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::ConstantValue::Category'),
            'primitive_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue')),
            'list_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue'))),
        },
        ConstantValue,
        false,
        nil)
end