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

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::PrimitiveValue`` class contains value of the constant element.

Defined Under Namespace

Classes: Type

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

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



1791
1792
1793
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1791

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

Instance Attribute Details

- (Boolean) boolean_value

Boolean value of the constant. This field is optional and it is only relevant when the value of ``type`` is :attr:`Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type.BOOLEAN` .

Returns:

  • (Boolean)


1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
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
1867
1868
1869
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1760

class PrimitiveValue < 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.primitive_value',
                {
                    'type' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type'),
                    'boolean_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
                    'double_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DoubleType.instance),
                    'long_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'string_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                },
                PrimitiveValue,
                false,
                nil)
        end
    end

    attr_accessor :type,
                  :boolean_value,
                  :double_value,
                  :long_value,
                  :string_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::PrimitiveValue::Type``   enumerated type  defines the valid types for values in constant elements.
    # @!attribute [rw] boolean
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a boolean (true or false).
    # @!attribute [rw] double
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a double (64 bit floating number).
    # @!attribute [rw] long
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a long (64 bit signed integer).
    # @!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.
    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


end

- (Float) double_value

Double value of the constant. This field is optional and it is only relevant when the value of ``type`` is :attr:`Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type.DOUBLE` .

Returns:

  • (Float)


1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
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
1867
1868
1869
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1760

class PrimitiveValue < 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.primitive_value',
                {
                    'type' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type'),
                    'boolean_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
                    'double_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DoubleType.instance),
                    'long_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'string_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                },
                PrimitiveValue,
                false,
                nil)
        end
    end

    attr_accessor :type,
                  :boolean_value,
                  :double_value,
                  :long_value,
                  :string_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::PrimitiveValue::Type``   enumerated type  defines the valid types for values in constant elements.
    # @!attribute [rw] boolean
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a boolean (true or false).
    # @!attribute [rw] double
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a double (64 bit floating number).
    # @!attribute [rw] long
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a long (64 bit signed integer).
    # @!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.
    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


end

- (Fixnum) long_value

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

Returns:

  • (Fixnum)


1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
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
1867
1868
1869
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1760

class PrimitiveValue < 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.primitive_value',
                {
                    'type' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type'),
                    'boolean_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
                    'double_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DoubleType.instance),
                    'long_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'string_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                },
                PrimitiveValue,
                false,
                nil)
        end
    end

    attr_accessor :type,
                  :boolean_value,
                  :double_value,
                  :long_value,
                  :string_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::PrimitiveValue::Type``   enumerated type  defines the valid types for values in constant elements.
    # @!attribute [rw] boolean
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a boolean (true or false).
    # @!attribute [rw] double
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a double (64 bit floating number).
    # @!attribute [rw] long
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a long (64 bit signed integer).
    # @!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.
    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


end

- (String) string_value

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

Returns:

  • (String)


1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
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
1867
1868
1869
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1760

class PrimitiveValue < 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.primitive_value',
                {
                    'type' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type'),
                    'boolean_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
                    'double_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DoubleType.instance),
                    'long_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'string_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                },
                PrimitiveValue,
                false,
                nil)
        end
    end

    attr_accessor :type,
                  :boolean_value,
                  :double_value,
                  :long_value,
                  :string_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::PrimitiveValue::Type``   enumerated type  defines the valid types for values in constant elements.
    # @!attribute [rw] boolean
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a boolean (true or false).
    # @!attribute [rw] double
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a double (64 bit floating number).
    # @!attribute [rw] long
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a long (64 bit signed integer).
    # @!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.
    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


end

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

Type of the constant value.



1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
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
1867
1868
1869
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1760

class PrimitiveValue < 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.primitive_value',
                {
                    'type' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type'),
                    'boolean_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
                    'double_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DoubleType.instance),
                    'long_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
                    'string_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
                },
                PrimitiveValue,
                false,
                nil)
        end
    end

    attr_accessor :type,
                  :boolean_value,
                  :double_value,
                  :long_value,
                  :string_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::PrimitiveValue::Type``   enumerated type  defines the valid types for values in constant elements.
    # @!attribute [rw] boolean
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a boolean (true or false).
    # @!attribute [rw] double
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a double (64 bit floating number).
    # @!attribute [rw] long
    #     @return [Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type]
    #     Indicates the value is a long (64 bit signed integer).
    # @!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.
    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


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



1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vapi/metadata/metamodel.rb', line 1766

def binding_type
    @binding_type ||= VAPI::Bindings::StructType.new(
        'com.vmware.vapi.metadata.metamodel.primitive_value',
        {
            'type' => VAPI::Bindings::ReferenceType.new('Com::Vmware::Vapi::Metadata::Metamodel::PrimitiveValue::Type'),
            'boolean_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::BooleanType.instance),
            'double_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::DoubleType.instance),
            'long_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::IntegerType.instance),
            'string_value' => VAPI::Bindings::OptionalType.new(VAPI::Bindings::StringType.instance),
        },
        PrimitiveValue,
        false,
        nil)
end