Skip to content

Commit aac17a6

Browse files
committed
chore: codegen to remove redundant calls in filterSensitiveLog for structures
1 parent f33bee5 commit aac17a6

File tree

215 files changed

+7857
-55969
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+7857
-55969
lines changed

clients/client-accessanalyzer/models/index.ts

Lines changed: 15 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,7 @@ export interface ArchiveRuleSummary {
192192

193193
export namespace ArchiveRuleSummary {
194194
export const filterSensitiveLog = (obj: ArchiveRuleSummary): any => ({
195-
...obj,
196-
...(obj.filter && {
197-
filter: Object.entries(obj.filter).reduce(
198-
(acc: any, [key, value]: [string, Criterion]) => ({
199-
...acc,
200-
[key]: Criterion.filterSensitiveLog(value)
201-
}),
202-
{}
203-
)
204-
})
195+
...obj
205196
});
206197
export const isa = (o: any): o is ArchiveRuleSummary =>
207198
__isa(o, "ArchiveRuleSummary");
@@ -267,12 +258,7 @@ export interface CreateAnalyzerRequest {
267258

268259
export namespace CreateAnalyzerRequest {
269260
export const filterSensitiveLog = (obj: CreateAnalyzerRequest): any => ({
270-
...obj,
271-
...(obj.archiveRules && {
272-
archiveRules: obj.archiveRules.map(item =>
273-
InlineArchiveRule.filterSensitiveLog(item)
274-
)
275-
})
261+
...obj
276262
});
277263
export const isa = (o: any): o is CreateAnalyzerRequest =>
278264
__isa(o, "CreateAnalyzerRequest");
@@ -325,16 +311,7 @@ export interface CreateArchiveRuleRequest {
325311

326312
export namespace CreateArchiveRuleRequest {
327313
export const filterSensitiveLog = (obj: CreateArchiveRuleRequest): any => ({
328-
...obj,
329-
...(obj.filter && {
330-
filter: Object.entries(obj.filter).reduce(
331-
(acc: any, [key, value]: [string, Criterion]) => ({
332-
...acc,
333-
[key]: Criterion.filterSensitiveLog(value)
334-
}),
335-
{}
336-
)
337-
})
314+
...obj
338315
});
339316
export const isa = (o: any): o is CreateArchiveRuleRequest =>
340317
__isa(o, "CreateArchiveRuleRequest");
@@ -622,10 +599,7 @@ export namespace GetAnalyzedResourceResponse {
622599
export const filterSensitiveLog = (
623600
obj: GetAnalyzedResourceResponse
624601
): any => ({
625-
...obj,
626-
...(obj.resource && {
627-
resource: AnalyzedResource.filterSensitiveLog(obj.resource)
628-
})
602+
...obj
629603
});
630604
export const isa = (o: any): o is GetAnalyzedResourceResponse =>
631605
__isa(o, "GetAnalyzedResourceResponse");
@@ -664,10 +638,7 @@ export interface GetAnalyzerResponse {
664638

665639
export namespace GetAnalyzerResponse {
666640
export const filterSensitiveLog = (obj: GetAnalyzerResponse): any => ({
667-
...obj,
668-
...(obj.analyzer && {
669-
analyzer: AnalyzerSummary.filterSensitiveLog(obj.analyzer)
670-
})
641+
...obj
671642
});
672643
export const isa = (o: any): o is GetAnalyzerResponse =>
673644
__isa(o, "GetAnalyzerResponse");
@@ -710,10 +681,7 @@ export interface GetArchiveRuleResponse {
710681

711682
export namespace GetArchiveRuleResponse {
712683
export const filterSensitiveLog = (obj: GetArchiveRuleResponse): any => ({
713-
...obj,
714-
...(obj.archiveRule && {
715-
archiveRule: ArchiveRuleSummary.filterSensitiveLog(obj.archiveRule)
716-
})
684+
...obj
717685
});
718686
export const isa = (o: any): o is GetArchiveRuleResponse =>
719687
__isa(o, "GetArchiveRuleResponse");
@@ -756,8 +724,7 @@ export interface GetFindingResponse {
756724

757725
export namespace GetFindingResponse {
758726
export const filterSensitiveLog = (obj: GetFindingResponse): any => ({
759-
...obj,
760-
...(obj.finding && { finding: Finding.filterSensitiveLog(obj.finding) })
727+
...obj
761728
});
762729
export const isa = (o: any): o is GetFindingResponse =>
763730
__isa(o, "GetFindingResponse");
@@ -782,16 +749,7 @@ export interface InlineArchiveRule {
782749

783750
export namespace InlineArchiveRule {
784751
export const filterSensitiveLog = (obj: InlineArchiveRule): any => ({
785-
...obj,
786-
...(obj.filter && {
787-
filter: Object.entries(obj.filter).reduce(
788-
(acc: any, [key, value]: [string, Criterion]) => ({
789-
...acc,
790-
[key]: Criterion.filterSensitiveLog(value)
791-
}),
792-
{}
793-
)
794-
})
752+
...obj
795753
});
796754
export const isa = (o: any): o is InlineArchiveRule =>
797755
__isa(o, "InlineArchiveRule");
@@ -876,12 +834,7 @@ export namespace ListAnalyzedResourcesResponse {
876834
export const filterSensitiveLog = (
877835
obj: ListAnalyzedResourcesResponse
878836
): any => ({
879-
...obj,
880-
...(obj.analyzedResources && {
881-
analyzedResources: obj.analyzedResources.map(item =>
882-
AnalyzedResourceSummary.filterSensitiveLog(item)
883-
)
884-
})
837+
...obj
885838
});
886839
export const isa = (o: any): o is ListAnalyzedResourcesResponse =>
887840
__isa(o, "ListAnalyzedResourcesResponse");
@@ -934,12 +887,7 @@ export interface ListAnalyzersResponse {
934887

935888
export namespace ListAnalyzersResponse {
936889
export const filterSensitiveLog = (obj: ListAnalyzersResponse): any => ({
937-
...obj,
938-
...(obj.analyzers && {
939-
analyzers: obj.analyzers.map(item =>
940-
AnalyzerSummary.filterSensitiveLog(item)
941-
)
942-
})
890+
...obj
943891
});
944892
export const isa = (o: any): o is ListAnalyzersResponse =>
945893
__isa(o, "ListAnalyzersResponse");
@@ -992,12 +940,7 @@ export interface ListArchiveRulesResponse {
992940

993941
export namespace ListArchiveRulesResponse {
994942
export const filterSensitiveLog = (obj: ListArchiveRulesResponse): any => ({
995-
...obj,
996-
...(obj.archiveRules && {
997-
archiveRules: obj.archiveRules.map(item =>
998-
ArchiveRuleSummary.filterSensitiveLog(item)
999-
)
1000-
})
943+
...obj
1001944
});
1002945
export const isa = (o: any): o is ListArchiveRulesResponse =>
1003946
__isa(o, "ListArchiveRulesResponse");
@@ -1036,17 +979,7 @@ export interface ListFindingsRequest {
1036979

1037980
export namespace ListFindingsRequest {
1038981
export const filterSensitiveLog = (obj: ListFindingsRequest): any => ({
1039-
...obj,
1040-
...(obj.filter && {
1041-
filter: Object.entries(obj.filter).reduce(
1042-
(acc: any, [key, value]: [string, Criterion]) => ({
1043-
...acc,
1044-
[key]: Criterion.filterSensitiveLog(value)
1045-
}),
1046-
{}
1047-
)
1048-
}),
1049-
...(obj.sort && { sort: SortCriteria.filterSensitiveLog(obj.sort) })
982+
...obj
1050983
});
1051984
export const isa = (o: any): o is ListFindingsRequest =>
1052985
__isa(o, "ListFindingsRequest");
@@ -1071,12 +1004,7 @@ export interface ListFindingsResponse {
10711004

10721005
export namespace ListFindingsResponse {
10731006
export const filterSensitiveLog = (obj: ListFindingsResponse): any => ({
1074-
...obj,
1075-
...(obj.findings && {
1076-
findings: obj.findings.map(item =>
1077-
FindingSummary.filterSensitiveLog(item)
1078-
)
1079-
})
1007+
...obj
10801008
});
10811009
export const isa = (o: any): o is ListFindingsResponse =>
10821010
__isa(o, "ListFindingsResponse");
@@ -1370,16 +1298,7 @@ export interface UpdateArchiveRuleRequest {
13701298

13711299
export namespace UpdateArchiveRuleRequest {
13721300
export const filterSensitiveLog = (obj: UpdateArchiveRuleRequest): any => ({
1373-
...obj,
1374-
...(obj.filter && {
1375-
filter: Object.entries(obj.filter).reduce(
1376-
(acc: any, [key, value]: [string, Criterion]) => ({
1377-
...acc,
1378-
[key]: Criterion.filterSensitiveLog(value)
1379-
}),
1380-
{}
1381-
)
1382-
})
1301+
...obj
13831302
});
13841303
export const isa = (o: any): o is UpdateArchiveRuleRequest =>
13851304
__isa(o, "UpdateArchiveRuleRequest");
@@ -1448,12 +1367,7 @@ export interface ValidationException
14481367

14491368
export namespace ValidationException {
14501369
export const filterSensitiveLog = (obj: ValidationException): any => ({
1451-
...obj,
1452-
...(obj.fieldList && {
1453-
fieldList: obj.fieldList.map(item =>
1454-
ValidationExceptionField.filterSensitiveLog(item)
1455-
)
1456-
})
1370+
...obj
14571371
});
14581372
export const isa = (o: any): o is ValidationException =>
14591373
__isa(o, "ValidationException");

clients/client-acm-pca/models/index.ts

Lines changed: 12 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -204,17 +204,7 @@ export interface CertificateAuthority {
204204

205205
export namespace CertificateAuthority {
206206
export const filterSensitiveLog = (obj: CertificateAuthority): any => ({
207-
...obj,
208-
...(obj.CertificateAuthorityConfiguration && {
209-
CertificateAuthorityConfiguration: CertificateAuthorityConfiguration.filterSensitiveLog(
210-
obj.CertificateAuthorityConfiguration
211-
)
212-
}),
213-
...(obj.RevocationConfiguration && {
214-
RevocationConfiguration: RevocationConfiguration.filterSensitiveLog(
215-
obj.RevocationConfiguration
216-
)
217-
})
207+
...obj
218208
});
219209
export const isa = (o: any): o is CertificateAuthority =>
220210
__isa(o, "CertificateAuthority");
@@ -252,8 +242,7 @@ export namespace CertificateAuthorityConfiguration {
252242
export const filterSensitiveLog = (
253243
obj: CertificateAuthorityConfiguration
254244
): any => ({
255-
...obj,
256-
...(obj.Subject && { Subject: ASN1Subject.filterSensitiveLog(obj.Subject) })
245+
...obj
257246
});
258247
export const isa = (o: any): o is CertificateAuthorityConfiguration =>
259248
__isa(o, "CertificateAuthorityConfiguration");
@@ -421,20 +410,7 @@ export namespace CreateCertificateAuthorityRequest {
421410
export const filterSensitiveLog = (
422411
obj: CreateCertificateAuthorityRequest
423412
): any => ({
424-
...obj,
425-
...(obj.CertificateAuthorityConfiguration && {
426-
CertificateAuthorityConfiguration: CertificateAuthorityConfiguration.filterSensitiveLog(
427-
obj.CertificateAuthorityConfiguration
428-
)
429-
}),
430-
...(obj.RevocationConfiguration && {
431-
RevocationConfiguration: RevocationConfiguration.filterSensitiveLog(
432-
obj.RevocationConfiguration
433-
)
434-
}),
435-
...(obj.Tags && {
436-
Tags: obj.Tags.map(item => Tag.filterSensitiveLog(item))
437-
})
413+
...obj
438414
});
439415
export const isa = (o: any): o is CreateCertificateAuthorityRequest =>
440416
__isa(o, "CreateCertificateAuthorityRequest");
@@ -810,12 +786,7 @@ export namespace DescribeCertificateAuthorityResponse {
810786
export const filterSensitiveLog = (
811787
obj: DescribeCertificateAuthorityResponse
812788
): any => ({
813-
...obj,
814-
...(obj.CertificateAuthority && {
815-
CertificateAuthority: CertificateAuthority.filterSensitiveLog(
816-
obj.CertificateAuthority
817-
)
818-
})
789+
...obj
819790
});
820791
export const isa = (o: any): o is DescribeCertificateAuthorityResponse =>
821792
__isa(o, "DescribeCertificateAuthorityResponse");
@@ -1232,8 +1203,7 @@ export interface IssueCertificateRequest {
12321203

12331204
export namespace IssueCertificateRequest {
12341205
export const filterSensitiveLog = (obj: IssueCertificateRequest): any => ({
1235-
...obj,
1236-
...(obj.Validity && { Validity: Validity.filterSensitiveLog(obj.Validity) })
1206+
...obj
12371207
});
12381208
export const isa = (o: any): o is IssueCertificateRequest =>
12391209
__isa(o, "IssueCertificateRequest");
@@ -1334,12 +1304,7 @@ export namespace ListCertificateAuthoritiesResponse {
13341304
export const filterSensitiveLog = (
13351305
obj: ListCertificateAuthoritiesResponse
13361306
): any => ({
1337-
...obj,
1338-
...(obj.CertificateAuthorities && {
1339-
CertificateAuthorities: obj.CertificateAuthorities.map(item =>
1340-
CertificateAuthority.filterSensitiveLog(item)
1341-
)
1342-
})
1307+
...obj
13431308
});
13441309
export const isa = (o: any): o is ListCertificateAuthoritiesResponse =>
13451310
__isa(o, "ListCertificateAuthoritiesResponse");
@@ -1397,12 +1362,7 @@ export interface ListPermissionsResponse {
13971362

13981363
export namespace ListPermissionsResponse {
13991364
export const filterSensitiveLog = (obj: ListPermissionsResponse): any => ({
1400-
...obj,
1401-
...(obj.Permissions && {
1402-
Permissions: obj.Permissions.map(item =>
1403-
Permission.filterSensitiveLog(item)
1404-
)
1405-
})
1365+
...obj
14061366
});
14071367
export const isa = (o: any): o is ListPermissionsResponse =>
14081368
__isa(o, "ListPermissionsResponse");
@@ -1459,10 +1419,7 @@ export interface ListTagsResponse {
14591419

14601420
export namespace ListTagsResponse {
14611421
export const filterSensitiveLog = (obj: ListTagsResponse): any => ({
1462-
...obj,
1463-
...(obj.Tags && {
1464-
Tags: obj.Tags.map(item => Tag.filterSensitiveLog(item))
1465-
})
1422+
...obj
14661423
});
14671424
export const isa = (o: any): o is ListTagsResponse =>
14681425
__isa(o, "ListTagsResponse");
@@ -1697,12 +1654,7 @@ export interface RevocationConfiguration {
16971654

16981655
export namespace RevocationConfiguration {
16991656
export const filterSensitiveLog = (obj: RevocationConfiguration): any => ({
1700-
...obj,
1701-
...(obj.CrlConfiguration && {
1702-
CrlConfiguration: CrlConfiguration.filterSensitiveLog(
1703-
obj.CrlConfiguration
1704-
)
1705-
})
1657+
...obj
17061658
});
17071659
export const isa = (o: any): o is RevocationConfiguration =>
17081660
__isa(o, "RevocationConfiguration");
@@ -1815,10 +1767,7 @@ export namespace TagCertificateAuthorityRequest {
18151767
export const filterSensitiveLog = (
18161768
obj: TagCertificateAuthorityRequest
18171769
): any => ({
1818-
...obj,
1819-
...(obj.Tags && {
1820-
Tags: obj.Tags.map(item => Tag.filterSensitiveLog(item))
1821-
})
1770+
...obj
18221771
});
18231772
export const isa = (o: any): o is TagCertificateAuthorityRequest =>
18241773
__isa(o, "TagCertificateAuthorityRequest");
@@ -1865,10 +1814,7 @@ export namespace UntagCertificateAuthorityRequest {
18651814
export const filterSensitiveLog = (
18661815
obj: UntagCertificateAuthorityRequest
18671816
): any => ({
1868-
...obj,
1869-
...(obj.Tags && {
1870-
Tags: obj.Tags.map(item => Tag.filterSensitiveLog(item))
1871-
})
1817+
...obj
18721818
});
18731819
export const isa = (o: any): o is UntagCertificateAuthorityRequest =>
18741820
__isa(o, "UntagCertificateAuthorityRequest");
@@ -1901,12 +1847,7 @@ export namespace UpdateCertificateAuthorityRequest {
19011847
export const filterSensitiveLog = (
19021848
obj: UpdateCertificateAuthorityRequest
19031849
): any => ({
1904-
...obj,
1905-
...(obj.RevocationConfiguration && {
1906-
RevocationConfiguration: RevocationConfiguration.filterSensitiveLog(
1907-
obj.RevocationConfiguration
1908-
)
1909-
})
1850+
...obj
19101851
});
19111852
export const isa = (o: any): o is UpdateCertificateAuthorityRequest =>
19121853
__isa(o, "UpdateCertificateAuthorityRequest");

0 commit comments

Comments
 (0)