Class: Com::Vmware::Vapi::Metadata::Metamodel::ElementValue

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::ElementValue`` class describes the value of the metadata element.

Defined Under Namespace

Classes: Type

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (ElementValue) 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)



1167
1168
1169
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1167

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

Instance Attribute Details

- (Array<String>) list_value

List of strings value of the metadata element. This field is optional and it is only relevant when the value of ``type`` is :attr:`Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type.STRING_LIST` .

Returns:

  • (Array<String>)


1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1134

class ElementValue < 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.element_value',
                {
                    'type' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type'),
                    'long_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'string_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                    'list_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::StringType.instance)),
                    'structure_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                    'structure_ids' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::IdType.new)),
                },
                ElementValue,
                false,
                nil)
        end
    end

    attr_accessor :type,
                  :long_value,
                  :string_value,
                  :list_value,
                  :structure_id,
                  :structure_ids

    # 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::ElementValue::Type``   enumerated type  defines the valid types for values in metadata elements.
    # @!attribute [rw] long
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a long (64 bit signed integer).
    # @!attribute [rw] string
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a string (a variable length sequence of characters). The encoding is UTF-8.
    # @!attribute [rw] string_list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a list of strings.
    # @!attribute [rw] structure_reference
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is an identifier for a structure element.
    # @!attribute [rw] structure_reference_list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a list of identifiers for a structure element.
    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.element_value.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] long
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a long (64 bit signed integer).
        LONG = Type.new('LONG')

        # @!attribute [rw] string
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a string (a variable length sequence of characters). The encoding is UTF-8.
        STRING = Type.new('STRING')

        # @!attribute [rw] string_list
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a list of strings.
        STRING_LIST = Type.new('STRING_LIST')

        # @!attribute [rw] structure_reference
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is an identifier for a structure element.
        STRUCTURE_REFERENCE = Type.new('STRUCTURE_REFERENCE')

        # @!attribute [rw] structure_reference_list
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a list of identifiers for a structure element.
        STRUCTURE_REFERENCE_LIST = Type.new('STRUCTURE_REFERENCE_LIST')

    end


end

- (Fixnum) long_value

Long value of the metadata element. This field is optional and it is only relevant when the value of ``type`` is :attr:`Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type.LONG` .

Returns:

  • (Fixnum)


1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1134

class ElementValue < 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.element_value',
                {
                    'type' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type'),
                    'long_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'string_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                    'list_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::StringType.instance)),
                    'structure_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                    'structure_ids' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::IdType.new)),
                },
                ElementValue,
                false,
                nil)
        end
    end

    attr_accessor :type,
                  :long_value,
                  :string_value,
                  :list_value,
                  :structure_id,
                  :structure_ids

    # 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::ElementValue::Type``   enumerated type  defines the valid types for values in metadata elements.
    # @!attribute [rw] long
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a long (64 bit signed integer).
    # @!attribute [rw] string
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a string (a variable length sequence of characters). The encoding is UTF-8.
    # @!attribute [rw] string_list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a list of strings.
    # @!attribute [rw] structure_reference
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is an identifier for a structure element.
    # @!attribute [rw] structure_reference_list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a list of identifiers for a structure element.
    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.element_value.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] long
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a long (64 bit signed integer).
        LONG = Type.new('LONG')

        # @!attribute [rw] string
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a string (a variable length sequence of characters). The encoding is UTF-8.
        STRING = Type.new('STRING')

        # @!attribute [rw] string_list
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a list of strings.
        STRING_LIST = Type.new('STRING_LIST')

        # @!attribute [rw] structure_reference
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is an identifier for a structure element.
        STRUCTURE_REFERENCE = Type.new('STRUCTURE_REFERENCE')

        # @!attribute [rw] structure_reference_list
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a list of identifiers for a structure element.
        STRUCTURE_REFERENCE_LIST = Type.new('STRUCTURE_REFERENCE_LIST')

    end


end

- (String) string_value

String value of the metadata element. This field is optional and it is only relevant when the value of ``type`` is :attr:`Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type.STRING` .

Returns:

  • (String)


1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1134

class ElementValue < 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.element_value',
                {
                    'type' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type'),
                    'long_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'string_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                    'list_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::StringType.instance)),
                    'structure_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                    'structure_ids' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::IdType.new)),
                },
                ElementValue,
                false,
                nil)
        end
    end

    attr_accessor :type,
                  :long_value,
                  :string_value,
                  :list_value,
                  :structure_id,
                  :structure_ids

    # 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::ElementValue::Type``   enumerated type  defines the valid types for values in metadata elements.
    # @!attribute [rw] long
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a long (64 bit signed integer).
    # @!attribute [rw] string
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a string (a variable length sequence of characters). The encoding is UTF-8.
    # @!attribute [rw] string_list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a list of strings.
    # @!attribute [rw] structure_reference
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is an identifier for a structure element.
    # @!attribute [rw] structure_reference_list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a list of identifiers for a structure element.
    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.element_value.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] long
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a long (64 bit signed integer).
        LONG = Type.new('LONG')

        # @!attribute [rw] string
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a string (a variable length sequence of characters). The encoding is UTF-8.
        STRING = Type.new('STRING')

        # @!attribute [rw] string_list
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a list of strings.
        STRING_LIST = Type.new('STRING_LIST')

        # @!attribute [rw] structure_reference
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is an identifier for a structure element.
        STRUCTURE_REFERENCE = Type.new('STRUCTURE_REFERENCE')

        # @!attribute [rw] structure_reference_list
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a list of identifiers for a structure element.
        STRUCTURE_REFERENCE_LIST = Type.new('STRUCTURE_REFERENCE_LIST')

    end


end

- (String) structure_id

Identifier of the structure element. This field is optional and it is only relevant when the value of ``type`` is :attr:`Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type.STRUCTURE_REFERENCE` .

Returns:

  • (String)


1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1134

class ElementValue < 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.element_value',
                {
                    'type' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type'),
                    'long_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'string_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                    'list_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::StringType.instance)),
                    'structure_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                    'structure_ids' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::IdType.new)),
                },
                ElementValue,
                false,
                nil)
        end
    end

    attr_accessor :type,
                  :long_value,
                  :string_value,
                  :list_value,
                  :structure_id,
                  :structure_ids

    # 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::ElementValue::Type``   enumerated type  defines the valid types for values in metadata elements.
    # @!attribute [rw] long
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a long (64 bit signed integer).
    # @!attribute [rw] string
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a string (a variable length sequence of characters). The encoding is UTF-8.
    # @!attribute [rw] string_list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a list of strings.
    # @!attribute [rw] structure_reference
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is an identifier for a structure element.
    # @!attribute [rw] structure_reference_list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a list of identifiers for a structure element.
    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.element_value.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] long
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a long (64 bit signed integer).
        LONG = Type.new('LONG')

        # @!attribute [rw] string
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a string (a variable length sequence of characters). The encoding is UTF-8.
        STRING = Type.new('STRING')

        # @!attribute [rw] string_list
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a list of strings.
        STRING_LIST = Type.new('STRING_LIST')

        # @!attribute [rw] structure_reference
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is an identifier for a structure element.
        STRUCTURE_REFERENCE = Type.new('STRUCTURE_REFERENCE')

        # @!attribute [rw] structure_reference_list
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a list of identifiers for a structure element.
        STRUCTURE_REFERENCE_LIST = Type.new('STRUCTURE_REFERENCE_LIST')

    end


end

- (Array<String>) structure_ids

List of identifiers of the structure elements. This field is optional and it is only relevant when the value of ``type`` is :attr:`Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type.STRUCTURE_REFERENCE_LIST` .

Returns:

  • (Array<String>)


1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1134

class ElementValue < 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.element_value',
                {
                    'type' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type'),
                    'long_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'string_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                    'list_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::StringType.instance)),
                    'structure_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                    'structure_ids' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::IdType.new)),
                },
                ElementValue,
                false,
                nil)
        end
    end

    attr_accessor :type,
                  :long_value,
                  :string_value,
                  :list_value,
                  :structure_id,
                  :structure_ids

    # 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::ElementValue::Type``   enumerated type  defines the valid types for values in metadata elements.
    # @!attribute [rw] long
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a long (64 bit signed integer).
    # @!attribute [rw] string
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a string (a variable length sequence of characters). The encoding is UTF-8.
    # @!attribute [rw] string_list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a list of strings.
    # @!attribute [rw] structure_reference
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is an identifier for a structure element.
    # @!attribute [rw] structure_reference_list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a list of identifiers for a structure element.
    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.element_value.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] long
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a long (64 bit signed integer).
        LONG = Type.new('LONG')

        # @!attribute [rw] string
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a string (a variable length sequence of characters). The encoding is UTF-8.
        STRING = Type.new('STRING')

        # @!attribute [rw] string_list
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a list of strings.
        STRING_LIST = Type.new('STRING_LIST')

        # @!attribute [rw] structure_reference
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is an identifier for a structure element.
        STRUCTURE_REFERENCE = Type.new('STRUCTURE_REFERENCE')

        # @!attribute [rw] structure_reference_list
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a list of identifiers for a structure element.
        STRUCTURE_REFERENCE_LIST = Type.new('STRUCTURE_REFERENCE_LIST')

    end


end

- (Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type) type

Type of the value.



1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1134

class ElementValue < 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.element_value',
                {
                    'type' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type'),
                    'long_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'string_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                    'list_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::StringType.instance)),
                    'structure_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
                    'structure_ids' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::IdType.new)),
                },
                ElementValue,
                false,
                nil)
        end
    end

    attr_accessor :type,
                  :long_value,
                  :string_value,
                  :list_value,
                  :structure_id,
                  :structure_ids

    # 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::ElementValue::Type``   enumerated type  defines the valid types for values in metadata elements.
    # @!attribute [rw] long
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a long (64 bit signed integer).
    # @!attribute [rw] string
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a string (a variable length sequence of characters). The encoding is UTF-8.
    # @!attribute [rw] string_list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a list of strings.
    # @!attribute [rw] structure_reference
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is an identifier for a structure element.
    # @!attribute [rw] structure_reference_list
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
    #     Indicates the type of the value is a list of identifiers for a structure element.
    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.element_value.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] long
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a long (64 bit signed integer).
        LONG = Type.new('LONG')

        # @!attribute [rw] string
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a string (a variable length sequence of characters). The encoding is UTF-8.
        STRING = Type.new('STRING')

        # @!attribute [rw] string_list
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a list of strings.
        STRING_LIST = Type.new('STRING_LIST')

        # @!attribute [rw] structure_reference
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is an identifier for a structure element.
        STRUCTURE_REFERENCE = Type.new('STRUCTURE_REFERENCE')

        # @!attribute [rw] structure_reference_list
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type]
        #     Indicates the type of the value is a list of identifiers for a structure element.
        STRUCTURE_REFERENCE_LIST = Type.new('STRUCTURE_REFERENCE_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



1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1140

def binding_type
    @binding_type ||= VAPI::Bindings::StructType.new(
        'com.vmware.vapi.metadata.metamodel.element_value',
        {
            'type' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::ElementValue::Type'),
            'long_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
            'string_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
            'list_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::StringType.instance)),
            'structure_id' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IdType.new),
            'structure_ids' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::ListType.new(VAPI::Bindings::IdType.new)),
        },
        ElementValue,
        false,
        nil)
end