Class: Com::Vmware::Content::Library::Item::File::ChecksumAlgorithm

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

Overview

The ``Com::Vmware::Content::Library::Item::File::ChecksumAlgorithm`` enumerated type defines the valid checksum algorithms.

Constant Summary

SH_A1 =
ChecksumAlgorithm.new('SH_A1')
M_D5 =
ChecksumAlgorithm.new('M_D5')

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Attribute Details

- (Com::Vmware::Content::Library::Item::File::ChecksumAlgorithm) m_d5

Checksum algorithm: MD5



476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 476

class ChecksumAlgorithm < 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.content.library.item.file.checksum_algorithm',
                ChecksumAlgorithm)
        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 [ChecksumAlgorithm] 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
                ChecksumAlgorithm.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] sh_a1
    #     @return [Com::Vmware::Content::Library::Item::File::ChecksumAlgorithm]
    #     Checksum algorithm: SHA-1
    SH_A1 = ChecksumAlgorithm.new('SH_A1')

    # @!attribute [rw] m_d5
    #     @return [Com::Vmware::Content::Library::Item::File::ChecksumAlgorithm]
    #     Checksum algorithm: MD5
    M_D5 = ChecksumAlgorithm.new('M_D5')

end

- (Com::Vmware::Content::Library::Item::File::ChecksumAlgorithm) sh_a1

Checksum algorithm: SHA-1



476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 476

class ChecksumAlgorithm < 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.content.library.item.file.checksum_algorithm',
                ChecksumAlgorithm)
        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 [ChecksumAlgorithm] 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
                ChecksumAlgorithm.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] sh_a1
    #     @return [Com::Vmware::Content::Library::Item::File::ChecksumAlgorithm]
    #     Checksum algorithm: SHA-1
    SH_A1 = ChecksumAlgorithm.new('SH_A1')

    # @!attribute [rw] m_d5
    #     @return [Com::Vmware::Content::Library::Item::File::ChecksumAlgorithm]
    #     Checksum algorithm: MD5
    M_D5 = ChecksumAlgorithm.new('M_D5')

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



482
483
484
485
486
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 482

def binding_type
    @binding_type ||= VAPI::Bindings::EnumType.new(
        'com.vmware.content.library.item.file.checksum_algorithm',
        ChecksumAlgorithm)
end

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

  • (ChecksumAlgorithm)

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



493
494
495
496
497
498
499
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/content/library/item.rb', line 493

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