Class: Com::Vmware::Vcenter::Vm::Power::State

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

Overview

The ``Com::Vmware::Vcenter::Vm::Power::State`` enumerated type defines the valid power states for a virtual machine.

Constant Summary

POWERED_OFF =
State.new('POWERED_OFF')
POWERED_ON =
State.new('POWERED_ON')
SUSPENDED =
State.new('SUSPENDED')

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Attribute Details

- (Com::Vmware::Vcenter::Vm::Power::State) powered_off

The virtual machine is powered off.



881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 881

class State < 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.vcenter.vm.power.state',
                State)
        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 [State] 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
                State.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] powered_off
    #     @return [Com::Vmware::Vcenter::Vm::Power::State]
    #     The virtual machine is powered off.
    POWERED_OFF = State.new('POWERED_OFF')

    # @!attribute [rw] powered_on
    #     @return [Com::Vmware::Vcenter::Vm::Power::State]
    #     The virtual machine is powered on.
    POWERED_ON = State.new('POWERED_ON')

    # @!attribute [rw] suspended
    #     @return [Com::Vmware::Vcenter::Vm::Power::State]
    #     The virtual machine is suspended.
    SUSPENDED = State.new('SUSPENDED')

end

- (Com::Vmware::Vcenter::Vm::Power::State) powered_on

The virtual machine is powered on.



881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 881

class State < 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.vcenter.vm.power.state',
                State)
        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 [State] 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
                State.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] powered_off
    #     @return [Com::Vmware::Vcenter::Vm::Power::State]
    #     The virtual machine is powered off.
    POWERED_OFF = State.new('POWERED_OFF')

    # @!attribute [rw] powered_on
    #     @return [Com::Vmware::Vcenter::Vm::Power::State]
    #     The virtual machine is powered on.
    POWERED_ON = State.new('POWERED_ON')

    # @!attribute [rw] suspended
    #     @return [Com::Vmware::Vcenter::Vm::Power::State]
    #     The virtual machine is suspended.
    SUSPENDED = State.new('SUSPENDED')

end

- (Com::Vmware::Vcenter::Vm::Power::State) suspended

The virtual machine is suspended.



881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 881

class State < 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.vcenter.vm.power.state',
                State)
        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 [State] 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
                State.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] powered_off
    #     @return [Com::Vmware::Vcenter::Vm::Power::State]
    #     The virtual machine is powered off.
    POWERED_OFF = State.new('POWERED_OFF')

    # @!attribute [rw] powered_on
    #     @return [Com::Vmware::Vcenter::Vm::Power::State]
    #     The virtual machine is powered on.
    POWERED_ON = State.new('POWERED_ON')

    # @!attribute [rw] suspended
    #     @return [Com::Vmware::Vcenter::Vm::Power::State]
    #     The virtual machine is suspended.
    SUSPENDED = State.new('SUSPENDED')

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



887
888
889
890
891
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 887

def binding_type
    @binding_type ||= VAPI::Bindings::EnumType.new(
        'com.vmware.vcenter.vm.power.state',
        State)
end

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

  • (State)

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



898
899
900
901
902
903
904
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm.rb', line 898

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