Class: Aws::Api::Customizer Private
- Inherits:
-
Object
- Object
- Aws::Api::Customizer
- Defined in:
- lib/aws-sdk-core/api/customizer.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #api ⇒ Seahorse::Model::Api readonly private
- #client_class ⇒ Class<Seahorse::Client::Base> readonly private
Instance Method Summary collapse
- #add_plugin(plugin) ⇒ Object private
- #add_shape(shape_name, definition) ⇒ Object private
- #apply(&customizations) ⇒ Object private
- #each_operation(&block) ⇒ Object private
-
#initialize(client_class) ⇒ Customizer
constructor
private
A new instance of Customizer.
- #metadata(key, value) ⇒ Object private
- #remove_plugin(plugin) ⇒ Object private
- #reshape(shape_name, modifications) ⇒ Object private
- #reshape_members(member_regex, modifications) ⇒ Object private
Constructor Details
#initialize(client_class) ⇒ Customizer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Customizer.
6 7 8 9 |
# File 'lib/aws-sdk-core/api/customizer.rb', line 6 def initialize(client_class) @client_class = client_class @api = client_class.api end |
Instance Attribute Details
#api ⇒ Seahorse::Model::Api (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 |
# File 'lib/aws-sdk-core/api/customizer.rb', line 15 def api @api end |
#client_class ⇒ Class<Seahorse::Client::Base> (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/aws-sdk-core/api/customizer.rb', line 12 def client_class @client_class end |
Instance Method Details
#add_plugin(plugin) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
23 24 25 |
# File 'lib/aws-sdk-core/api/customizer.rb', line 23 def add_plugin(plugin) @client_class.add_plugin(plugin) end |
#add_shape(shape_name, definition) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/aws-sdk-core/api/customizer.rb', line 36 def add_shape(shape_name, definition) @client_class.api.definition['shapes'][shape_name] = definition end |
#apply(&customizations) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'lib/aws-sdk-core/api/customizer.rb', line 18 def apply(&customizations) instance_eval(&customizations) end |
#each_operation(&block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
61 62 63 |
# File 'lib/aws-sdk-core/api/customizer.rb', line 61 def each_operation(&block) @client_class.api.definition['operations'].each(&block) end |
#metadata(key, value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/aws-sdk-core/api/customizer.rb', line 32 def (key, value) @client_class.api.definition['metadata'][key] = value end |
#remove_plugin(plugin) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 |
# File 'lib/aws-sdk-core/api/customizer.rb', line 28 def remove_plugin(plugin) @client_class.remove_plugin(plugin) end |
#reshape(shape_name, modifications) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
40 41 42 43 44 |
# File 'lib/aws-sdk-core/api/customizer.rb', line 40 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 |
#reshape_members(member_regex, modifications) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/aws-sdk-core/api/customizer.rb', line 46 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 |