-
Notifications
You must be signed in to change notification settings - Fork 865
/
Copy pathServicePaginatorFactoryInterface.tt
40 lines (38 loc) · 1.32 KB
/
ServicePaginatorFactoryInterface.tt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<#@ template language="C#" inherits="BaseGenerator" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections.Generic" #>
<#
AddLicenseHeader();
#>
using Amazon.Runtime.Internal;
#pragma warning disable CS0612,CS0618
namespace <#=this.Config.Namespace#>.Model
{
/// <summary>
/// Paginators for the <#=this.Config.ServiceNameRoot#> service
///</summary>
public interface I<#=this.Config.ServiceNameRoot#>PaginatorFactory
{
<#
foreach(var operation in this.Config.ServiceModel.Operations)
{
if (operation.Paginators != null && !operation.UnsupportedPaginatorConfig)
{
#>
/// <summary>
/// Paginator for <#=operation.Name#> operation
///</summary>
[AWSPaginator(
InputToken = new[] { <#= string.Join(",", operation.Paginators.InputTokens.Select(x => "\"" + x.PropertyName + "\"")) #> },
<#= operation.Paginators.LimitKey != null ? $"LimitKey = \"{operation.Paginators.LimitKey.PropertyName}\"," : "" #>
OutputToken = new[] { <#= string.Join(",", operation.Paginators.OutputTokens.Select(x => "\"" + x.PropertyName + "\"")) #> }
)]
I<#=operation.Name#>Paginator <#=operation.Name#>(<#=operation.Name#>Request request);
<#
}
}
#>
}
}