<#
 # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License"). You may not 
 # use this file except in compliance with the License. A copy of the License 
 # is located at
 #
 #    http://aws.amazon.com/apache2.0/
 #
 # or in the "license" file accompanying this file. This file is distributed on
 # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
 # express or implied. See the License for the specific language governing 
 # permissions and limitations under the License.
 #>

<% macro method_name(op) -%>
    <<op.name>>_<<op.method_id|replace('-', 'N')>>_<<op.service_id>>
<%- endmacro %>

<% macro op_params(op) -%>
<% if op.is_internal %><< op.parameters | join(', ', attribute='name') >><% else %>ddbRequest<% endif %>
<%- endmacro %>

<% macro stub_args(op) -%>
<% if op.is_internal %><% for param in op.parameters %><<param.name>>, <% endfor %><% else %>request, <% endif %><% if op.has_key %>data.keySchema, <% endif %><% if op.has_values %>data.attrNames, data.attrListId, <% endif %>
<%- endmacro %>

<% macro stub_params(op) -%>
<% if op.is_internal %><% for param in op.parameters %><<param.name>>, <% endfor %><% else %>request, <% endif %>
<%- endmacro %>

<% macro param_name(param) -%>
<% if param.op.is_internal %><<param.name>><% elif param.name | lower == 'keys' or param.name | lower == 'values' %>request['<<param.name>>']<% else %>request.<<param.name>><% endif %>
<%- endmacro %>