Class: Com::Vmware::Appliance::Networking::Dns::Servers::DNSServerMode

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

Overview

``Com::Vmware::Appliance::Networking::Dns::Servers::DNSServerMode`` enumerated type Describes DNS Server source (DHCP,static)

Constant Summary

DHCP =
DNSServerMode.new('DHCP')
IS_STATIC =
DNSServerMode.new('IS_STATIC')

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Attribute Details

- (Com::Vmware::Appliance::Networking::Dns::Servers::DNSServerMode) dhcp

DNS address is automatically assigned by a DHCP server.



675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking/dns.rb', line 675

class DNSServerMode < 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.dns.servers.DNS_server_mode',
                DNSServerMode)
        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 [DNSServerMode] 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
                DNSServerMode.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] dhcp
    #     @return [Com::Vmware::Appliance::Networking::Dns::Servers::DNSServerMode]
    #     DNS address is automatically assigned by a DHCP server.
    DHCP = DNSServerMode.new('DHCP')

    # @!attribute [rw] is_static
    #     @return [Com::Vmware::Appliance::Networking::Dns::Servers::DNSServerMode]
    #     DNS address is static.
    IS_STATIC = DNSServerMode.new('IS_STATIC')

end

- (Com::Vmware::Appliance::Networking::Dns::Servers::DNSServerMode) is_static

DNS address is static.



675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking/dns.rb', line 675

class DNSServerMode < 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.dns.servers.DNS_server_mode',
                DNSServerMode)
        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 [DNSServerMode] 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
                DNSServerMode.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] dhcp
    #     @return [Com::Vmware::Appliance::Networking::Dns::Servers::DNSServerMode]
    #     DNS address is automatically assigned by a DHCP server.
    DHCP = DNSServerMode.new('DHCP')

    # @!attribute [rw] is_static
    #     @return [Com::Vmware::Appliance::Networking::Dns::Servers::DNSServerMode]
    #     DNS address is static.
    IS_STATIC = DNSServerMode.new('IS_STATIC')

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



681
682
683
684
685
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking/dns.rb', line 681

def binding_type
    @binding_type ||= VAPI::Bindings::EnumType.new(
        'com.vmware.appliance.networking.dns.servers.DNS_server_mode',
        DNSServerMode)
end

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

  • (DNSServerMode)

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



692
693
694
695
696
697
698
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/networking/dns.rb', line 692

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