class Aws::Api::Customizer

def add_plugin(plugin)

Parameters:
  • plugin (String, Class) --
def add_plugin(plugin)
  @client_class.add_plugin(plugin)
end

def add_shape(shape_name, definition)

def add_shape(shape_name, definition)
  @client_class.api.definition['shapes'][shape_name] = definition
end

def apply(&customizations)

Other tags:
    Api: - private
def apply(&customizations)
  instance_eval(&customizations)
end

def deep_merge(first_hash, other_hash)

def deep_merge(first_hash, other_hash)
  first_hash.merge(other_hash) do |key, old, new|
    Hash === old && Hash === new ? deep_merge(old, new) : new
  end
end

def each_operation(&block)

def each_operation(&block)
  @client_class.api.definition['operations'].each(&block)
end

def initialize(client_class)

Other tags:
    Api: - private
def initialize(client_class)
  @client_class = client_class
  @api = client_class.api
end

def metadata(key, value)

def metadata(key, value)
  @client_class.api.definition['metadata'][key] = value
end

def remove_plugin(plugin)

Parameters:
  • plugin (String, Class) --
def remove_plugin(plugin)
  @client_class.remove_plugin(plugin)
end

def reshape(shape_name, modifications)

def reshape(shape_name, modifications)
  shape = @client_class.api.definition['shapes'][shape_name]
  shape = deep_merge(shape, modifications)
  @client_class.api.definition['shapes'][shape_name] = shape
end

def reshape_members(member_regex, modifications)

def reshape_members(member_regex, modifications)
  if member_regex.is_a?(String)
    member_regex = /^#{member_regex}$/
  end
  @client_class.api.definition['shapes'].each do |shape_name, shape|
    if shape['members']
      shape['members'].each do |member_name, member_ref|
        if member_name.match(member_regex)
          shape['members'][member_name] = deep_merge(member_ref, modifications)
        end
      end
    end
  end
end