Class: Com::Vmware::Appliance::Networking::Interfaces::InterfaceStatus

Inherits:
VAPI::Bindings::VapiEnum
  • Object
show all
Defined in:
/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking.rb

Overview

``Com::Vmware::Appliance::Networking::Interfaces::InterfaceStatus`` enumerated type Defines interface status

Constant Summary

DOWN =
InterfaceStatus.new('DOWN')
UP =
InterfaceStatus.new('UP')

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Attribute Details

- (Com::Vmware::Appliance::Networking::Interfaces::InterfaceStatus) down

The interface is down.



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking.rb', line 145

class InterfaceStatus < 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.appliance.networking.interfaces.interface_status',
                InterfaceStatus)
        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 [InterfaceStatus] 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
                InterfaceStatus.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] down
    #     @return [Com::Vmware::Appliance::Networking::Interfaces::InterfaceStatus]
    #     The interface is down.
    DOWN = InterfaceStatus.new('DOWN')

    # @!attribute [rw] up
    #     @return [Com::Vmware::Appliance::Networking::Interfaces::InterfaceStatus]
    #     The interface is up.
    UP = InterfaceStatus.new('UP')

end

- (Com::Vmware::Appliance::Networking::Interfaces::InterfaceStatus) up

The interface is up.



145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking.rb', line 145

class InterfaceStatus < 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.appliance.networking.interfaces.interface_status',
                InterfaceStatus)
        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 [InterfaceStatus] 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
                InterfaceStatus.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] down
    #     @return [Com::Vmware::Appliance::Networking::Interfaces::InterfaceStatus]
    #     The interface is down.
    DOWN = InterfaceStatus.new('DOWN')

    # @!attribute [rw] up
    #     @return [Com::Vmware::Appliance::Networking::Interfaces::InterfaceStatus]
    #     The interface is up.
    UP = InterfaceStatus.new('UP')

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



151
152
153
154
155
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking.rb', line 151

def binding_type
    @binding_type ||= VAPI::Bindings::EnumType.new(
        'com.vmware.appliance.networking.interfaces.interface_status',
        InterfaceStatus)
end

+ (InterfaceStatus) 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:

  • (InterfaceStatus)

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



162
163
164
165
166
167
168
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking.rb', line 162

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