Skip to content

Commit

Permalink
chore(clients): set deserialization for non-primitive types (#3345)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Feb 22, 2022
1 parent 1e3faa1 commit 0ad6f73
Show file tree
Hide file tree
Showing 270 changed files with 9,609 additions and 4,895 deletions.
63 changes: 42 additions & 21 deletions clients/client-accessanalyzer/src/protocols/Aws_restJson1.ts
Expand Up @@ -3186,25 +3186,27 @@ const deserializeAws_restJson1AccessPreviewFindingsList = (
output: any,
context: __SerdeContext
): AccessPreviewFinding[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1AccessPreviewFinding(entry, context);
});
return retVal;
};

const deserializeAws_restJson1AccessPreviewsList = (output: any, context: __SerdeContext): AccessPreviewSummary[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1AccessPreviewSummary(entry, context);
});
return retVal;
};

const deserializeAws_restJson1AccessPreviewStatusReason = (
Expand Down Expand Up @@ -3243,14 +3245,15 @@ const deserializeAws_restJson1AclGrantee = (output: any, context: __SerdeContext
};

const deserializeAws_restJson1ActionList = (output: any, context: __SerdeContext): string[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return __expectString(entry) as any;
});
return retVal;
};

const deserializeAws_restJson1AnalyzedResource = (output: any, context: __SerdeContext): AnalyzedResource => {
Expand Down Expand Up @@ -3288,14 +3291,15 @@ const deserializeAws_restJson1AnalyzedResourcesList = (
output: any,
context: __SerdeContext
): AnalyzedResourceSummary[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1AnalyzedResourceSummary(entry, context);
});
return retVal;
};

const deserializeAws_restJson1AnalyzedResourceSummary = (
Expand All @@ -3310,14 +3314,15 @@ const deserializeAws_restJson1AnalyzedResourceSummary = (
};

const deserializeAws_restJson1AnalyzersList = (output: any, context: __SerdeContext): AnalyzerSummary[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1AnalyzerSummary(entry, context);
});
return retVal;
};

const deserializeAws_restJson1AnalyzerSummary = (output: any, context: __SerdeContext): AnalyzerSummary => {
Expand Down Expand Up @@ -3347,14 +3352,15 @@ const deserializeAws_restJson1AnalyzerSummary = (output: any, context: __SerdeCo
};

const deserializeAws_restJson1ArchiveRulesList = (output: any, context: __SerdeContext): ArchiveRuleSummary[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1ArchiveRuleSummary(entry, context);
});
return retVal;
};

const deserializeAws_restJson1ArchiveRuleSummary = (output: any, context: __SerdeContext): ArchiveRuleSummary => {
Expand Down Expand Up @@ -3523,14 +3529,15 @@ const deserializeAws_restJson1Finding = (output: any, context: __SerdeContext):
};

const deserializeAws_restJson1FindingsList = (output: any, context: __SerdeContext): FindingSummary[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1FindingSummary(entry, context);
});
return retVal;
};

const deserializeAws_restJson1FindingSource = (output: any, context: __SerdeContext): FindingSource => {
Expand All @@ -3550,14 +3557,15 @@ const deserializeAws_restJson1FindingSourceDetail = (output: any, context: __Ser
};

const deserializeAws_restJson1FindingSourceList = (output: any, context: __SerdeContext): FindingSource[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1FindingSource(entry, context);
});
return retVal;
};

const deserializeAws_restJson1FindingSummary = (output: any, context: __SerdeContext): FindingSummary => {
Expand Down Expand Up @@ -3607,14 +3615,15 @@ const deserializeAws_restJson1GeneratedPolicy = (output: any, context: __SerdeCo
};

const deserializeAws_restJson1GeneratedPolicyList = (output: any, context: __SerdeContext): GeneratedPolicy[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1GeneratedPolicy(entry, context);
});
return retVal;
};

const deserializeAws_restJson1GeneratedPolicyProperties = (
Expand Down Expand Up @@ -3712,14 +3721,15 @@ const deserializeAws_restJson1KmsGrantConfigurationsList = (
output: any,
context: __SerdeContext
): KmsGrantConfiguration[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1KmsGrantConfiguration(entry, context);
});
return retVal;
};

const deserializeAws_restJson1KmsGrantConstraints = (output: any, context: __SerdeContext): KmsGrantConstraints => {
Expand All @@ -3739,14 +3749,15 @@ const deserializeAws_restJson1KmsGrantOperationsList = (
output: any,
context: __SerdeContext
): (KmsGrantOperation | string)[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return __expectString(entry) as any;
});
return retVal;
};

const deserializeAws_restJson1KmsKeyConfiguration = (output: any, context: __SerdeContext): KmsKeyConfiguration => {
Expand Down Expand Up @@ -3788,14 +3799,15 @@ const deserializeAws_restJson1Location = (output: any, context: __SerdeContext):
};

const deserializeAws_restJson1LocationList = (output: any, context: __SerdeContext): Location[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1Location(entry, context);
});
return retVal;
};

const deserializeAws_restJson1NetworkOriginConfiguration = (
Expand Down Expand Up @@ -3834,14 +3846,15 @@ const deserializeAws_restJson1PathElement = (output: any, context: __SerdeContex
};

const deserializeAws_restJson1PathElementList = (output: any, context: __SerdeContext): PathElement[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1PathElement(__expectUnion(entry), context);
});
return retVal;
};

const deserializeAws_restJson1PolicyGeneration = (output: any, context: __SerdeContext): PolicyGeneration => {
Expand All @@ -3861,14 +3874,15 @@ const deserializeAws_restJson1PolicyGeneration = (output: any, context: __SerdeC
};

const deserializeAws_restJson1PolicyGenerationList = (output: any, context: __SerdeContext): PolicyGeneration[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1PolicyGeneration(entry, context);
});
return retVal;
};

const deserializeAws_restJson1Position = (output: any, context: __SerdeContext): Position => {
Expand All @@ -3892,14 +3906,15 @@ const deserializeAws_restJson1PrincipalMap = (output: any, context: __SerdeConte
};

const deserializeAws_restJson1RegionList = (output: any, context: __SerdeContext): string[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return __expectString(entry) as any;
});
return retVal;
};

const deserializeAws_restJson1S3AccessPointConfiguration = (
Expand Down Expand Up @@ -3954,14 +3969,15 @@ const deserializeAws_restJson1S3BucketAclGrantConfigurationsList = (
output: any,
context: __SerdeContext
): S3BucketAclGrantConfiguration[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1S3BucketAclGrantConfiguration(entry, context);
});
return retVal;
};

const deserializeAws_restJson1S3BucketConfiguration = (output: any, context: __SerdeContext): S3BucketConfiguration => {
Expand Down Expand Up @@ -4003,14 +4019,15 @@ const deserializeAws_restJson1SecretsManagerSecretConfiguration = (
};

const deserializeAws_restJson1SharedViaList = (output: any, context: __SerdeContext): string[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return __expectString(entry) as any;
});
return retVal;
};

const deserializeAws_restJson1Span = (output: any, context: __SerdeContext): Span => {
Expand Down Expand Up @@ -4069,14 +4086,15 @@ const deserializeAws_restJson1TrailProperties = (output: any, context: __SerdeCo
};

const deserializeAws_restJson1TrailPropertiesList = (output: any, context: __SerdeContext): TrailProperties[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1TrailProperties(entry, context);
});
return retVal;
};

const deserializeAws_restJson1ValidatePolicyFinding = (output: any, context: __SerdeContext): ValidatePolicyFinding => {
Expand All @@ -4096,14 +4114,15 @@ const deserializeAws_restJson1ValidatePolicyFindingList = (
output: any,
context: __SerdeContext
): ValidatePolicyFinding[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1ValidatePolicyFinding(entry, context);
});
return retVal;
};

const deserializeAws_restJson1ValidationExceptionField = (
Expand All @@ -4120,25 +4139,27 @@ const deserializeAws_restJson1ValidationExceptionFieldList = (
output: any,
context: __SerdeContext
): ValidationExceptionField[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return deserializeAws_restJson1ValidationExceptionField(entry, context);
});
return retVal;
};

const deserializeAws_restJson1ValueList = (output: any, context: __SerdeContext): string[] => {
return (output || [])
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
if (entry === null) {
return null as any;
}
return __expectString(entry) as any;
});
return retVal;
};

const deserializeAws_restJson1VpcConfiguration = (output: any, context: __SerdeContext): VpcConfiguration => {
Expand Down

0 comments on commit 0ad6f73

Please sign in to comment.