File tree 2 files changed +23
-9
lines changed
generator/ServiceClientGeneratorLib/Generators/SourceFiles
sdk/src/Core/Amazon.Runtime/Internal
2 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -220,16 +220,25 @@ namespace <#=this.Config.Namespace#>.Model
220
220
{
221
221
propertyAttributes.Add("Max=" + member.Shape.Max);
222
222
}
223
- if (this.StructureType == StructureType.Request)
223
+
224
+ // Add PaginationRequestKey attribute to Request Pagination properties that will be used by PowerShell for Auto-Iteration
225
+ bool hasPaginatorInputToken = this.StructureType == StructureType.Request && this.Operation?.Paginators?.InputTokens.Any(x => x.PropertyName == member.PropertyName) == true;
226
+ bool hasPaginatorLimitKey = this.StructureType == StructureType.Request && this.Operation?.Paginators?.LimitKey?.PropertyName == member.PropertyName;
227
+ bool hasPaginatorOutputToken = this.StructureType == StructureType.Response && this.Operation?.Paginators?.OutputTokens.Any(x => x.PropertyName == member.PropertyName) == true;
228
+
229
+ if (hasPaginatorInputToken)
224
230
{
225
- // Add PaginationRequestKey attribute to Request Pagination properties that will be used by PowerShell for Auto-Iteration
226
- bool hasPaginatorInputToken = this.StructureType == StructureType.Request && this.Operation?.Paginators?.InputTokens.Any(x => x.PropertyName == member.PropertyName) == true;
227
- bool hasPaginatorLimitKey = this.StructureType == StructureType.Request && this.Operation?.Paginators?.LimitKey?.PropertyName == member.PropertyName;
228
- if (hasPaginatorInputToken || hasPaginatorLimitKey)
229
- {
230
- propertyAttributes.Add("PaginationRequestKey=true");
231
- }
231
+ propertyAttributes.Add("PaginationInputToken=true");
232
+ }
233
+ else if (hasPaginatorLimitKey)
234
+ {
235
+ propertyAttributes.Add("PaginationLimitKey=true");
236
+ }
237
+ else if (hasPaginatorOutputToken)
238
+ {
239
+ propertyAttributes.Add("PaginationOutputToken=true");
232
240
}
241
+
233
242
234
243
if (propertyAttributes.Count > 0)
235
244
{
Original file line number Diff line number Diff line change 2
2
3
3
namespace Amazon . Runtime . Internal
4
4
{
5
+
6
+
5
7
[ AttributeUsage ( AttributeTargets . Property , AllowMultiple = false ) ]
6
8
public sealed class AWSPropertyAttribute : Attribute
7
9
{
8
10
private long min ;
9
11
private long max ;
10
12
public bool Sensitive { get ; set ; }
11
13
public bool Required { get ; set ; }
12
- public bool PaginationRequestKey { get ; set ; }
14
+ public bool PaginationInputToken { get ; set ; }
15
+ public bool PaginationOutputToken { get ; set ; }
16
+ public bool PaginationLimitKey { get ; set ; }
17
+
13
18
14
19
public bool IsMinSet { get ; private set ; }
15
20
public long Min
You can’t perform that action at this time.
0 commit comments