Class: IbmCloudPower::CloudConnectionSpeed

Inherits:
Object
  • Object
show all
Defined in:
lib/ibm_cloud_power/models/cloud_connection_speed.rb

Constant Summary collapse

N50 =
50.freeze
N100 =
100.freeze
N200 =
200.freeze
N500 =
500.freeze
N1000 =
1000.freeze
N2000 =
2000.freeze
N5000 =
5000.freeze
N10000 =
10000.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



30
31
32
# File 'lib/ibm_cloud_power/models/cloud_connection_speed.rb', line 30

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



37
38
39
40
41
# File 'lib/ibm_cloud_power/models/cloud_connection_speed.rb', line 37

def build_from_hash(value)
  constantValues = CloudConnectionSpeed.constants.select { |c| CloudConnectionSpeed::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #CloudConnectionSpeed" if constantValues.empty?
  value
end