Skip to content

chore: use Array shorthand syntax #1127

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 1, 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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
30 changes: 15 additions & 15 deletions clients/client-accessanalyzer/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface AnalyzedResource {
* <p>The actions that an external principal is granted permission to use by the policy that
* generated the finding.</p>
*/
actions?: Array<string>;
actions?: string[];

/**
* <p>The time at which the resource was analyzed.</p>
Expand Down Expand Up @@ -65,7 +65,7 @@ export interface AnalyzedResource {
/**
* <p>Indicates how the access that generated the finding is granted.</p>
*/
sharedVia?: Array<string>;
sharedVia?: string[];

/**
* <p>The current status of the finding generated from the analyzed resource.</p>
Expand Down Expand Up @@ -218,7 +218,7 @@ export interface CreateAnalyzerRequest {
/**
* <p>Specifies the archive rules to add for the analyzer. Archive rules automatically archive findings that meet the criteria you define for the rule.</p>
*/
archiveRules?: Array<InlineArchiveRule>;
archiveRules?: InlineArchiveRule[];

/**
* <p>A client token.</p>
Expand Down Expand Up @@ -297,12 +297,12 @@ export interface Criterion {
/**
* <p>A "contains" operator to match for the filter used to create the rule.</p>
*/
contains?: Array<string>;
contains?: string[];

/**
* <p>An "equals" operator to match for the filter used to create the rule.</p>
*/
eq?: Array<string>;
eq?: string[];

/**
* <p>An "exists" operator to match for the filter used to create the rule. </p>
Expand All @@ -312,7 +312,7 @@ export interface Criterion {
/**
* <p>A "not equals" operator to match for the filter used to create the rule.</p>
*/
neq?: Array<string>;
neq?: string[];
}

export namespace Criterion {
Expand Down Expand Up @@ -375,7 +375,7 @@ export interface Finding {
* <p>The action in the analyzed policy statement that an external principal has permission to
* use.</p>
*/
action?: Array<string>;
action?: string[];

/**
* <p>The time at which the resource was analyzed.</p>
Expand Down Expand Up @@ -451,7 +451,7 @@ export interface FindingSummary {
* <p>The action in the analyzed policy statement that an external principal has permission to
* use.</p>
*/
action?: Array<string>;
action?: string[];

/**
* <p>The time at which the resource-based policy that generated the finding was
Expand Down Expand Up @@ -742,7 +742,7 @@ export interface ListAnalyzedResourcesResponse {
/**
* <p>A list of resources that were analyzed.</p>
*/
analyzedResources: Array<AnalyzedResourceSummary> | undefined;
analyzedResources: AnalyzedResourceSummary[] | undefined;

/**
* <p>A token used for pagination of results returned.</p>
Expand Down Expand Up @@ -789,7 +789,7 @@ export interface ListAnalyzersResponse {
/**
* <p>The analyzers retrieved.</p>
*/
analyzers: Array<AnalyzerSummary> | undefined;
analyzers: AnalyzerSummary[] | undefined;

/**
* <p>A token used for pagination of results returned.</p>
Expand Down Expand Up @@ -836,7 +836,7 @@ export interface ListArchiveRulesResponse {
/**
* <p>A list of archive rules created for the specified analyzer.</p>
*/
archiveRules: Array<ArchiveRuleSummary> | undefined;
archiveRules: ArchiveRuleSummary[] | undefined;

/**
* <p>A token used for pagination of results returned.</p>
Expand Down Expand Up @@ -894,7 +894,7 @@ export interface ListFindingsResponse {
* <p>A list of findings retrieved from the analyzer that match the filter criteria specified,
* if any.</p>
*/
findings: Array<FindingSummary> | undefined;
findings: FindingSummary[] | undefined;

/**
* <p>A token used for pagination of results returned.</p>
Expand Down Expand Up @@ -1109,7 +1109,7 @@ export interface UntagResourceRequest {
/**
* <p>The key for the tag to add.</p>
*/
tagKeys: Array<string> | undefined;
tagKeys: string[] | undefined;
}

export namespace UntagResourceRequest {
Expand Down Expand Up @@ -1179,7 +1179,7 @@ export interface UpdateFindingsRequest {
/**
* <p>The IDs of the findings to update.</p>
*/
ids?: Array<string>;
ids?: string[];

/**
* <p>The ARN of the resource identified in the finding.</p>
Expand Down Expand Up @@ -1210,7 +1210,7 @@ export interface ValidationException
/**
* <p>A list of fields that didn't validate.</p>
*/
fieldList?: Array<ValidationExceptionField>;
fieldList?: ValidationExceptionField[];

message: string | undefined;
/**
Expand Down
22 changes: 11 additions & 11 deletions clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2930,7 +2930,7 @@ const serializeAws_restJson1_1FilterCriteriaMap = (
};

const serializeAws_restJson1_1FindingIdList = (
input: Array<string>,
input: string[],
context: __SerdeContext
): any => {
const contents = [];
Expand Down Expand Up @@ -2958,7 +2958,7 @@ const serializeAws_restJson1_1InlineArchiveRule = (
};

const serializeAws_restJson1_1InlineArchiveRulesList = (
input: Array<InlineArchiveRule>,
input: InlineArchiveRule[],
context: __SerdeContext
): any => {
const contents = [];
Expand Down Expand Up @@ -2994,7 +2994,7 @@ const serializeAws_restJson1_1TagsMap = (
};

const serializeAws_restJson1_1ValueList = (
input: Array<string>,
input: string[],
context: __SerdeContext
): any => {
const contents = [];
Expand All @@ -3007,7 +3007,7 @@ const serializeAws_restJson1_1ValueList = (
const deserializeAws_restJson1_1ActionList = (
output: any,
context: __SerdeContext
): Array<string> => {
): string[] => {
return (output || []).map((entry: any) => entry);
};

Expand Down Expand Up @@ -3088,7 +3088,7 @@ const deserializeAws_restJson1_1AnalyzedResourceSummary = (
const deserializeAws_restJson1_1AnalyzedResourcesList = (
output: any,
context: __SerdeContext
): Array<AnalyzedResourceSummary> => {
): AnalyzedResourceSummary[] => {
return (output || []).map((entry: any) =>
deserializeAws_restJson1_1AnalyzedResourceSummary(entry, context)
);
Expand Down Expand Up @@ -3141,7 +3141,7 @@ const deserializeAws_restJson1_1AnalyzerSummary = (
const deserializeAws_restJson1_1AnalyzersList = (
output: any,
context: __SerdeContext
): Array<AnalyzerSummary> => {
): AnalyzerSummary[] => {
return (output || []).map((entry: any) =>
deserializeAws_restJson1_1AnalyzerSummary(entry, context)
);
Expand Down Expand Up @@ -3179,7 +3179,7 @@ const deserializeAws_restJson1_1ArchiveRuleSummary = (
const deserializeAws_restJson1_1ArchiveRulesList = (
output: any,
context: __SerdeContext
): Array<ArchiveRuleSummary> => {
): ArchiveRuleSummary[] => {
return (output || []).map((entry: any) =>
deserializeAws_restJson1_1ArchiveRuleSummary(entry, context)
);
Expand Down Expand Up @@ -3373,7 +3373,7 @@ const deserializeAws_restJson1_1FindingSummary = (
const deserializeAws_restJson1_1FindingsList = (
output: any,
context: __SerdeContext
): Array<FindingSummary> => {
): FindingSummary[] => {
return (output || []).map((entry: any) =>
deserializeAws_restJson1_1FindingSummary(entry, context)
);
Expand All @@ -3393,7 +3393,7 @@ const deserializeAws_restJson1_1PrincipalMap = (
const deserializeAws_restJson1_1SharedViaList = (
output: any,
context: __SerdeContext
): Array<string> => {
): string[] => {
return (output || []).map((entry: any) => entry);
};

Expand Down Expand Up @@ -3429,7 +3429,7 @@ const deserializeAws_restJson1_1ValidationExceptionField = (
const deserializeAws_restJson1_1ValidationExceptionFieldList = (
output: any,
context: __SerdeContext
): Array<ValidationExceptionField> => {
): ValidationExceptionField[] => {
return (output || []).map((entry: any) =>
deserializeAws_restJson1_1ValidationExceptionField(entry, context)
);
Expand All @@ -3438,7 +3438,7 @@ const deserializeAws_restJson1_1ValidationExceptionFieldList = (
const deserializeAws_restJson1_1ValueList = (
output: any,
context: __SerdeContext
): Array<string> => {
): string[] => {
return (output || []).map((entry: any) => entry);
};

Expand Down
16 changes: 8 additions & 8 deletions clients/client-acm-pca/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ export interface CreateCertificateAuthorityRequest {
* 50 tags with a private CA. For information using tags with </p>
* <p>IAM to manage permissions, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p>
*/
Tags?: Array<Tag>;
Tags?: Tag[];
}

export namespace CreateCertificateAuthorityRequest {
Expand Down Expand Up @@ -404,7 +404,7 @@ export interface CreatePermissionRequest {
* <code>IssueCertificate</code>, <code>GetCertificate</code>, and
* <code>ListPermissions</code>.</p>
*/
Actions: Array<ActionType | string> | undefined;
Actions: (ActionType | string)[] | undefined;

/**
* <p>The Amazon Resource Name (ARN) of the CA that grants the permissions. You can find the ARN
Expand Down Expand Up @@ -1149,7 +1149,7 @@ export interface ListCertificateAuthoritiesResponse {
/**
* <p>Summary information about each certificate authority you have created.</p>
*/
CertificateAuthorities?: Array<CertificateAuthority>;
CertificateAuthorities?: CertificateAuthority[];

/**
* <p>When the list is truncated, this value is present and should be used for the
Expand Down Expand Up @@ -1207,7 +1207,7 @@ export interface ListPermissionsResponse {
* <p>Summary information about each permission assigned by the specified private CA,
* including the action enabled, the policy provided, and the time of creation.</p>
*/
Permissions?: Array<Permission>;
Permissions?: Permission[];
}

export namespace ListPermissionsResponse {
Expand Down Expand Up @@ -1258,7 +1258,7 @@ export interface ListTagsResponse {
/**
* <p>The tags associated with your private CA.</p>
*/
Tags?: Array<Tag>;
Tags?: Tag[];
}

export namespace ListTagsResponse {
Expand Down Expand Up @@ -1310,7 +1310,7 @@ export interface Permission {
/**
* <p>The private CA actions that can be performed by the designated AWS service.</p>
*/
Actions?: Array<ActionType | string>;
Actions?: (ActionType | string)[];

/**
* <p>The Amazon Resource Number (ARN) of the private CA from which the permission was
Expand Down Expand Up @@ -1557,7 +1557,7 @@ export interface TagCertificateAuthorityRequest {
/**
* <p>List of tags to be associated with the CA.</p>
*/
Tags: Array<Tag> | undefined;
Tags: Tag[] | undefined;
}

export namespace TagCertificateAuthorityRequest {
Expand Down Expand Up @@ -1596,7 +1596,7 @@ export interface UntagCertificateAuthorityRequest {
/**
* <p>List of tags to be removed from the CA.</p>
*/
Tags: Array<Tag> | undefined;
Tags: Tag[] | undefined;
}

export namespace UntagCertificateAuthorityRequest {
Expand Down
12 changes: 6 additions & 6 deletions clients/client-acm-pca/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2846,7 +2846,7 @@ const serializeAws_json1_1ASN1Subject = (
};

const serializeAws_json1_1ActionList = (
input: Array<ActionType | string>,
input: (ActionType | string)[],
context: __SerdeContext
): any => {
const contents = [];
Expand Down Expand Up @@ -3226,7 +3226,7 @@ const serializeAws_json1_1TagCertificateAuthorityRequest = (
};

const serializeAws_json1_1TagList = (
input: Array<Tag>,
input: Tag[],
context: __SerdeContext
): any => {
const contents = [];
Expand Down Expand Up @@ -3364,14 +3364,14 @@ const deserializeAws_json1_1ASN1Subject = (
const deserializeAws_json1_1ActionList = (
output: any,
context: __SerdeContext
): Array<ActionType | string> => {
): (ActionType | string)[] => {
return (output || []).map((entry: any) => entry);
};

const deserializeAws_json1_1CertificateAuthorities = (
output: any,
context: __SerdeContext
): Array<CertificateAuthority> => {
): CertificateAuthority[] => {
return (output || []).map((entry: any) =>
deserializeAws_json1_1CertificateAuthority(entry, context)
);
Expand Down Expand Up @@ -3953,7 +3953,7 @@ const deserializeAws_json1_1PermissionAlreadyExistsException = (
const deserializeAws_json1_1PermissionList = (
output: any,
context: __SerdeContext
): Array<Permission> => {
): Permission[] => {
return (output || []).map((entry: any) =>
deserializeAws_json1_1Permission(entry, context)
);
Expand Down Expand Up @@ -4056,7 +4056,7 @@ const deserializeAws_json1_1Tag = (
const deserializeAws_json1_1TagList = (
output: any,
context: __SerdeContext
): Array<Tag> => {
): Tag[] => {
return (output || []).map((entry: any) =>
deserializeAws_json1_1Tag(entry, context)
);
Expand Down
Loading