Class List Method List File List

# Class: Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type

Inherits:
  VAPI::Bindings::VapiEnum
  - Object
  - VAPI::Bindings::VapiEnum
  - Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type
  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::PrimitiveValue::Type`` enumerated type defines the valid types for values in constant elements.

## Constant Summary

BOOLEAN =

      Type.new('BOOLEAN')

DOUBLE =

      Type.new('DOUBLE')

LONG =

      Type.new('LONG')

STRING =

      Type.new('STRING')

## Instance Attribute Summary (collapse)

- - (Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type) boolean

  Indicates the value is a boolean (true or false).

- - (Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type) double

  Indicates the value is a double (64 bit floating number).

- - (Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type) long

  Indicates the value is a long (64 bit signed integer).

- - (Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type) string

  Indicates the value is a string (a variable length sequence of characters).

## Class Method Summary (collapse)

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

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

- + (Type) 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::PrimitiveValue::Type`) boolean

Indicates the value is a boolean (true or false).

Returns:

- (`Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type`)

    1809
    1810
    1811
    1812
    1813
    1814
    1815
    1816
    1817
    1818
    1819
    1820
    1821
    1822
    1823
    1824
    1825
    1826
    1827
    1828
    1829
    1830
    1831
    1832
    1833
    1834
    1835
    1836
    1837
    1838
    1839
    1840
    1841
    1842
    1843
    1844
    1845
    1846
    1847
    1848
    1849
    1850
    1851
    1852
    1853
    1854
    1855
    1856
    1857
    1858
    1859
    1860
    1861
    1862
    1863
    1864
    1865
    1866
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1809

    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.primitive_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] boolean
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
        #     Indicates the value is a boolean (true or false).
        BOOLEAN = Type.new('BOOLEAN')

        # @!attribute [rw] double
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
        #     Indicates the value is a double (64 bit floating number).
        DOUBLE = Type.new('DOUBLE')

        # @!attribute [rw] long
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
        #     Indicates the value is a long (64 bit signed integer).
        LONG = Type.new('LONG')

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

    end

### - (`Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type`) double

Indicates the value is a double (64 bit floating number).

Returns:

- (`Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type`)

    1809
    1810
    1811
    1812
    1813
    1814
    1815
    1816
    1817
    1818
    1819
    1820
    1821
    1822
    1823
    1824
    1825
    1826
    1827
    1828
    1829
    1830
    1831
    1832
    1833
    1834
    1835
    1836
    1837
    1838
    1839
    1840
    1841
    1842
    1843
    1844
    1845
    1846
    1847
    1848
    1849
    1850
    1851
    1852
    1853
    1854
    1855
    1856
    1857
    1858
    1859
    1860
    1861
    1862
    1863
    1864
    1865
    1866
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1809

    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.primitive_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] boolean
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
        #     Indicates the value is a boolean (true or false).
        BOOLEAN = Type.new('BOOLEAN')

        # @!attribute [rw] double
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
        #     Indicates the value is a double (64 bit floating number).
        DOUBLE = Type.new('DOUBLE')

        # @!attribute [rw] long
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
        #     Indicates the value is a long (64 bit signed integer).
        LONG = Type.new('LONG')

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

    end

### - (`Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type`) long

Indicates the value is a long (64 bit signed integer).

Returns:

- (`Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type`)

    1809
    1810
    1811
    1812
    1813
    1814
    1815
    1816
    1817
    1818
    1819
    1820
    1821
    1822
    1823
    1824
    1825
    1826
    1827
    1828
    1829
    1830
    1831
    1832
    1833
    1834
    1835
    1836
    1837
    1838
    1839
    1840
    1841
    1842
    1843
    1844
    1845
    1846
    1847
    1848
    1849
    1850
    1851
    1852
    1853
    1854
    1855
    1856
    1857
    1858
    1859
    1860
    1861
    1862
    1863
    1864
    1865
    1866
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1809

    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.primitive_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] boolean
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
        #     Indicates the value is a boolean (true or false).
        BOOLEAN = Type.new('BOOLEAN')

        # @!attribute [rw] double
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
        #     Indicates the value is a double (64 bit floating number).
        DOUBLE = Type.new('DOUBLE')

        # @!attribute [rw] long
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
        #     Indicates the value is a long (64 bit signed integer).
        LONG = Type.new('LONG')

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

    end

### - (`Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type`) string

Indicates the value is a string (a variable length sequence of characters). The encoding is UTF8.

Returns:

- (`Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type`)

    1809
    1810
    1811
    1812
    1813
    1814
    1815
    1816
    1817
    1818
    1819
    1820
    1821
    1822
    1823
    1824
    1825
    1826
    1827
    1828
    1829
    1830
    1831
    1832
    1833
    1834
    1835
    1836
    1837
    1838
    1839
    1840
    1841
    1842
    1843
    1844
    1845
    1846
    1847
    1848
    1849
    1850
    1851
    1852
    1853
    1854
    1855
    1856
    1857
    1858
    1859
    1860
    1861
    1862
    1863
    1864
    1865
    1866
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1809

    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.primitive_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] boolean
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
        #     Indicates the value is a boolean (true or false).
        BOOLEAN = Type.new('BOOLEAN')

        # @!attribute [rw] double
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
        #     Indicates the value is a double (64 bit floating number).
        DOUBLE = Type.new('DOUBLE')

        # @!attribute [rw] long
        #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
        #     Indicates the value is a long (64 bit signed integer).
        LONG = Type.new('LONG')

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

    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

    1815
    1816
    1817
    1818
    1819
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1815

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

    1826
    1827
    1828
    1829
    1830
    1831
    1832
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1826

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