class Aws::Api::ServiceNamer
* Take the shorter of the name or the endpoint prefix
* Remove AWS/Amazon prefixes and suffixes
* Start with the service full name or abbreviation if it has one
from AWS name. The basic pattern for determining a class name is:
This class is responsible for calculating class names and method names
def build_class_name(endpoint_prefix)
def build_class_name(endpoint_prefix) name = @abbreviation || @full_name name = name.sub('Amazon', '').sub('AWS', '').gsub(/\W+/, '') [name, endpoint_prefix.upcase].sort_by(&:size).first end
def initialize(endpoint_prefix, full_name, abbreviation = nil)
def initialize(endpoint_prefix, full_name, abbreviation = nil) @full_name = full_name @abbreviation = abbreviation @class_name = build_class_name(endpoint_prefix) end