Skip to content

chore: codegen to check sensitive trait in shape members #1213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 15 additions & 101 deletions clients/client-accessanalyzer/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,7 @@ export interface ArchiveRuleSummary {

export namespace ArchiveRuleSummary {
export const filterSensitiveLog = (obj: ArchiveRuleSummary): any => ({
...obj,
...(obj.filter && {
filter: Object.entries(obj.filter).reduce(
(acc: any, [key, value]: [string, Criterion]) => ({
...acc,
[key]: Criterion.filterSensitiveLog(value)
}),
{}
)
})
...obj
});
export const isa = (o: any): o is ArchiveRuleSummary =>
__isa(o, "ArchiveRuleSummary");
Expand Down Expand Up @@ -267,12 +258,7 @@ export interface CreateAnalyzerRequest {

export namespace CreateAnalyzerRequest {
export const filterSensitiveLog = (obj: CreateAnalyzerRequest): any => ({
...obj,
...(obj.archiveRules && {
archiveRules: obj.archiveRules.map(item =>
InlineArchiveRule.filterSensitiveLog(item)
)
})
...obj
});
export const isa = (o: any): o is CreateAnalyzerRequest =>
__isa(o, "CreateAnalyzerRequest");
Expand Down Expand Up @@ -325,16 +311,7 @@ export interface CreateArchiveRuleRequest {

export namespace CreateArchiveRuleRequest {
export const filterSensitiveLog = (obj: CreateArchiveRuleRequest): any => ({
...obj,
...(obj.filter && {
filter: Object.entries(obj.filter).reduce(
(acc: any, [key, value]: [string, Criterion]) => ({
...acc,
[key]: Criterion.filterSensitiveLog(value)
}),
{}
)
})
...obj
});
export const isa = (o: any): o is CreateArchiveRuleRequest =>
__isa(o, "CreateArchiveRuleRequest");
Expand Down Expand Up @@ -622,10 +599,7 @@ export namespace GetAnalyzedResourceResponse {
export const filterSensitiveLog = (
obj: GetAnalyzedResourceResponse
): any => ({
...obj,
...(obj.resource && {
resource: AnalyzedResource.filterSensitiveLog(obj.resource)
})
...obj
});
export const isa = (o: any): o is GetAnalyzedResourceResponse =>
__isa(o, "GetAnalyzedResourceResponse");
Expand Down Expand Up @@ -664,10 +638,7 @@ export interface GetAnalyzerResponse {

export namespace GetAnalyzerResponse {
export const filterSensitiveLog = (obj: GetAnalyzerResponse): any => ({
...obj,
...(obj.analyzer && {
analyzer: AnalyzerSummary.filterSensitiveLog(obj.analyzer)
})
...obj
});
export const isa = (o: any): o is GetAnalyzerResponse =>
__isa(o, "GetAnalyzerResponse");
Expand Down Expand Up @@ -710,10 +681,7 @@ export interface GetArchiveRuleResponse {

export namespace GetArchiveRuleResponse {
export const filterSensitiveLog = (obj: GetArchiveRuleResponse): any => ({
...obj,
...(obj.archiveRule && {
archiveRule: ArchiveRuleSummary.filterSensitiveLog(obj.archiveRule)
})
...obj
});
export const isa = (o: any): o is GetArchiveRuleResponse =>
__isa(o, "GetArchiveRuleResponse");
Expand Down Expand Up @@ -756,8 +724,7 @@ export interface GetFindingResponse {

export namespace GetFindingResponse {
export const filterSensitiveLog = (obj: GetFindingResponse): any => ({
...obj,
...(obj.finding && { finding: Finding.filterSensitiveLog(obj.finding) })
...obj
});
export const isa = (o: any): o is GetFindingResponse =>
__isa(o, "GetFindingResponse");
Expand All @@ -782,16 +749,7 @@ export interface InlineArchiveRule {

export namespace InlineArchiveRule {
export const filterSensitiveLog = (obj: InlineArchiveRule): any => ({
...obj,
...(obj.filter && {
filter: Object.entries(obj.filter).reduce(
(acc: any, [key, value]: [string, Criterion]) => ({
...acc,
[key]: Criterion.filterSensitiveLog(value)
}),
{}
)
})
...obj
});
export const isa = (o: any): o is InlineArchiveRule =>
__isa(o, "InlineArchiveRule");
Expand Down Expand Up @@ -876,12 +834,7 @@ export namespace ListAnalyzedResourcesResponse {
export const filterSensitiveLog = (
obj: ListAnalyzedResourcesResponse
): any => ({
...obj,
...(obj.analyzedResources && {
analyzedResources: obj.analyzedResources.map(item =>
AnalyzedResourceSummary.filterSensitiveLog(item)
)
})
...obj
});
export const isa = (o: any): o is ListAnalyzedResourcesResponse =>
__isa(o, "ListAnalyzedResourcesResponse");
Expand Down Expand Up @@ -934,12 +887,7 @@ export interface ListAnalyzersResponse {

export namespace ListAnalyzersResponse {
export const filterSensitiveLog = (obj: ListAnalyzersResponse): any => ({
...obj,
...(obj.analyzers && {
analyzers: obj.analyzers.map(item =>
AnalyzerSummary.filterSensitiveLog(item)
)
})
...obj
});
export const isa = (o: any): o is ListAnalyzersResponse =>
__isa(o, "ListAnalyzersResponse");
Expand Down Expand Up @@ -992,12 +940,7 @@ export interface ListArchiveRulesResponse {

export namespace ListArchiveRulesResponse {
export const filterSensitiveLog = (obj: ListArchiveRulesResponse): any => ({
...obj,
...(obj.archiveRules && {
archiveRules: obj.archiveRules.map(item =>
ArchiveRuleSummary.filterSensitiveLog(item)
)
})
...obj
});
export const isa = (o: any): o is ListArchiveRulesResponse =>
__isa(o, "ListArchiveRulesResponse");
Expand Down Expand Up @@ -1036,17 +979,7 @@ export interface ListFindingsRequest {

export namespace ListFindingsRequest {
export const filterSensitiveLog = (obj: ListFindingsRequest): any => ({
...obj,
...(obj.filter && {
filter: Object.entries(obj.filter).reduce(
(acc: any, [key, value]: [string, Criterion]) => ({
...acc,
[key]: Criterion.filterSensitiveLog(value)
}),
{}
)
}),
...(obj.sort && { sort: SortCriteria.filterSensitiveLog(obj.sort) })
...obj
});
export const isa = (o: any): o is ListFindingsRequest =>
__isa(o, "ListFindingsRequest");
Expand All @@ -1071,12 +1004,7 @@ export interface ListFindingsResponse {

export namespace ListFindingsResponse {
export const filterSensitiveLog = (obj: ListFindingsResponse): any => ({
...obj,
...(obj.findings && {
findings: obj.findings.map(item =>
FindingSummary.filterSensitiveLog(item)
)
})
...obj
});
export const isa = (o: any): o is ListFindingsResponse =>
__isa(o, "ListFindingsResponse");
Expand Down Expand Up @@ -1370,16 +1298,7 @@ export interface UpdateArchiveRuleRequest {

export namespace UpdateArchiveRuleRequest {
export const filterSensitiveLog = (obj: UpdateArchiveRuleRequest): any => ({
...obj,
...(obj.filter && {
filter: Object.entries(obj.filter).reduce(
(acc: any, [key, value]: [string, Criterion]) => ({
...acc,
[key]: Criterion.filterSensitiveLog(value)
}),
{}
)
})
...obj
});
export const isa = (o: any): o is UpdateArchiveRuleRequest =>
__isa(o, "UpdateArchiveRuleRequest");
Expand Down Expand Up @@ -1448,12 +1367,7 @@ export interface ValidationException

export namespace ValidationException {
export const filterSensitiveLog = (obj: ValidationException): any => ({
...obj,
...(obj.fieldList && {
fieldList: obj.fieldList.map(item =>
ValidationExceptionField.filterSensitiveLog(item)
)
})
...obj
});
export const isa = (o: any): o is ValidationException =>
__isa(o, "ValidationException");
Expand Down
83 changes: 12 additions & 71 deletions clients/client-acm-pca/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,17 +204,7 @@ export interface CertificateAuthority {

export namespace CertificateAuthority {
export const filterSensitiveLog = (obj: CertificateAuthority): any => ({
...obj,
...(obj.CertificateAuthorityConfiguration && {
CertificateAuthorityConfiguration: CertificateAuthorityConfiguration.filterSensitiveLog(
obj.CertificateAuthorityConfiguration
)
}),
...(obj.RevocationConfiguration && {
RevocationConfiguration: RevocationConfiguration.filterSensitiveLog(
obj.RevocationConfiguration
)
})
...obj
});
export const isa = (o: any): o is CertificateAuthority =>
__isa(o, "CertificateAuthority");
Expand Down Expand Up @@ -252,8 +242,7 @@ export namespace CertificateAuthorityConfiguration {
export const filterSensitiveLog = (
obj: CertificateAuthorityConfiguration
): any => ({
...obj,
...(obj.Subject && { Subject: ASN1Subject.filterSensitiveLog(obj.Subject) })
...obj
});
export const isa = (o: any): o is CertificateAuthorityConfiguration =>
__isa(o, "CertificateAuthorityConfiguration");
Expand Down Expand Up @@ -421,20 +410,7 @@ export namespace CreateCertificateAuthorityRequest {
export const filterSensitiveLog = (
obj: CreateCertificateAuthorityRequest
): any => ({
...obj,
...(obj.CertificateAuthorityConfiguration && {
CertificateAuthorityConfiguration: CertificateAuthorityConfiguration.filterSensitiveLog(
obj.CertificateAuthorityConfiguration
)
}),
...(obj.RevocationConfiguration && {
RevocationConfiguration: RevocationConfiguration.filterSensitiveLog(
obj.RevocationConfiguration
)
}),
...(obj.Tags && {
Tags: obj.Tags.map(item => Tag.filterSensitiveLog(item))
})
...obj
});
export const isa = (o: any): o is CreateCertificateAuthorityRequest =>
__isa(o, "CreateCertificateAuthorityRequest");
Expand Down Expand Up @@ -810,12 +786,7 @@ export namespace DescribeCertificateAuthorityResponse {
export const filterSensitiveLog = (
obj: DescribeCertificateAuthorityResponse
): any => ({
...obj,
...(obj.CertificateAuthority && {
CertificateAuthority: CertificateAuthority.filterSensitiveLog(
obj.CertificateAuthority
)
})
...obj
});
export const isa = (o: any): o is DescribeCertificateAuthorityResponse =>
__isa(o, "DescribeCertificateAuthorityResponse");
Expand Down Expand Up @@ -1232,8 +1203,7 @@ export interface IssueCertificateRequest {

export namespace IssueCertificateRequest {
export const filterSensitiveLog = (obj: IssueCertificateRequest): any => ({
...obj,
...(obj.Validity && { Validity: Validity.filterSensitiveLog(obj.Validity) })
...obj
});
export const isa = (o: any): o is IssueCertificateRequest =>
__isa(o, "IssueCertificateRequest");
Expand Down Expand Up @@ -1334,12 +1304,7 @@ export namespace ListCertificateAuthoritiesResponse {
export const filterSensitiveLog = (
obj: ListCertificateAuthoritiesResponse
): any => ({
...obj,
...(obj.CertificateAuthorities && {
CertificateAuthorities: obj.CertificateAuthorities.map(item =>
CertificateAuthority.filterSensitiveLog(item)
)
})
...obj
});
export const isa = (o: any): o is ListCertificateAuthoritiesResponse =>
__isa(o, "ListCertificateAuthoritiesResponse");
Expand Down Expand Up @@ -1397,12 +1362,7 @@ export interface ListPermissionsResponse {

export namespace ListPermissionsResponse {
export const filterSensitiveLog = (obj: ListPermissionsResponse): any => ({
...obj,
...(obj.Permissions && {
Permissions: obj.Permissions.map(item =>
Permission.filterSensitiveLog(item)
)
})
...obj
});
export const isa = (o: any): o is ListPermissionsResponse =>
__isa(o, "ListPermissionsResponse");
Expand Down Expand Up @@ -1459,10 +1419,7 @@ export interface ListTagsResponse {

export namespace ListTagsResponse {
export const filterSensitiveLog = (obj: ListTagsResponse): any => ({
...obj,
...(obj.Tags && {
Tags: obj.Tags.map(item => Tag.filterSensitiveLog(item))
})
...obj
});
export const isa = (o: any): o is ListTagsResponse =>
__isa(o, "ListTagsResponse");
Expand Down Expand Up @@ -1697,12 +1654,7 @@ export interface RevocationConfiguration {

export namespace RevocationConfiguration {
export const filterSensitiveLog = (obj: RevocationConfiguration): any => ({
...obj,
...(obj.CrlConfiguration && {
CrlConfiguration: CrlConfiguration.filterSensitiveLog(
obj.CrlConfiguration
)
})
...obj
});
export const isa = (o: any): o is RevocationConfiguration =>
__isa(o, "RevocationConfiguration");
Expand Down Expand Up @@ -1815,10 +1767,7 @@ export namespace TagCertificateAuthorityRequest {
export const filterSensitiveLog = (
obj: TagCertificateAuthorityRequest
): any => ({
...obj,
...(obj.Tags && {
Tags: obj.Tags.map(item => Tag.filterSensitiveLog(item))
})
...obj
});
export const isa = (o: any): o is TagCertificateAuthorityRequest =>
__isa(o, "TagCertificateAuthorityRequest");
Expand Down Expand Up @@ -1865,10 +1814,7 @@ export namespace UntagCertificateAuthorityRequest {
export const filterSensitiveLog = (
obj: UntagCertificateAuthorityRequest
): any => ({
...obj,
...(obj.Tags && {
Tags: obj.Tags.map(item => Tag.filterSensitiveLog(item))
})
...obj
});
export const isa = (o: any): o is UntagCertificateAuthorityRequest =>
__isa(o, "UntagCertificateAuthorityRequest");
Expand Down Expand Up @@ -1901,12 +1847,7 @@ export namespace UpdateCertificateAuthorityRequest {
export const filterSensitiveLog = (
obj: UpdateCertificateAuthorityRequest
): any => ({
...obj,
...(obj.RevocationConfiguration && {
RevocationConfiguration: RevocationConfiguration.filterSensitiveLog(
obj.RevocationConfiguration
)
})
...obj
});
export const isa = (o: any): o is UpdateCertificateAuthorityRequest =>
__isa(o, "UpdateCertificateAuthorityRequest");
Expand Down
Loading