Class: Fastly::AwsRegion

Inherits:
Object
  • Object
show all
Defined in:
lib/fastly/models/aws_region.rb

Constant Summary collapse

US_EAST_1 =
"us-east-1".freeze
US_EAST_2 =
"us-east-2".freeze
US_WEST_1 =
"us-west-1".freeze
US_WEST_2 =
"us-west-2".freeze
AF_SOUTH_1 =
"af-south-1".freeze
AP_EAST_1 =
"ap-east-1".freeze
AP_SOUTH_1 =
"ap-south-1".freeze
AP_NORTHEAST_3 =
"ap-northeast-3".freeze
AP_NORTHEAST_2 =
"ap-northeast-2".freeze
AP_SOUTHEAST_1 =
"ap-southeast-1".freeze
AP_SOUTHEAST_2 =
"ap-southeast-2".freeze
AP_NORTHEAST_1 =
"ap-northeast-1".freeze
CA_CENTRAL_1 =
"ca-central-1".freeze
CN_NORTH_1 =
"cn-north-1".freeze
CN_NORTHWEST_1 =
"cn-northwest-1".freeze
EU_CENTRAL_1 =
"eu-central-1".freeze
EU_WEST_1 =
"eu-west-1".freeze
EU_WEST_2 =
"eu-west-2".freeze
EU_SOUTH_1 =
"eu-south-1".freeze
EU_WEST_3 =
"eu-west-3".freeze
EU_NORTH_1 =
"eu-north-1".freeze
ME_SOUTH_1 =
"me-south-1".freeze
SA_EAST_1 =
"sa-east-1".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



43
44
45
# File 'lib/fastly/models/aws_region.rb', line 43

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



50
51
52
53
54
# File 'lib/fastly/models/aws_region.rb', line 50

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