From 861a8a859bc4d097ca74874b77040977ff97ddc3 Mon Sep 17 00:00:00 2001 From: awstools Date: Wed, 9 Aug 2023 18:18:21 +0000 Subject: [PATCH] feat(client-chime-sdk-voice): Updating CreatePhoneNumberOrder, UpdatePhoneNumber and BatchUpdatePhoneNumbers APIs, adding phone number name --- .../commands/BatchUpdatePhoneNumberCommand.ts | 1 + .../commands/CreatePhoneNumberOrderCommand.ts | 1 + .../src/commands/GetPhoneNumberCommand.ts | 1 + .../src/commands/ListPhoneNumbersCommand.ts | 1 + .../src/commands/RestorePhoneNumberCommand.ts | 1 + .../src/commands/UpdatePhoneNumberCommand.ts | 2 + .../src/models/models_0.ts | 28 ++++ .../src/protocols/Aws_restJson1.ts | 3 + .../aws-models/chime-sdk-voice.json | 121 +++++++++++------- 9 files changed, 116 insertions(+), 43 deletions(-) diff --git a/clients/client-chime-sdk-voice/src/commands/BatchUpdatePhoneNumberCommand.ts b/clients/client-chime-sdk-voice/src/commands/BatchUpdatePhoneNumberCommand.ts index beea6f0c32be9..8d5c471e9573b 100644 --- a/clients/client-chime-sdk-voice/src/commands/BatchUpdatePhoneNumberCommand.ts +++ b/clients/client-chime-sdk-voice/src/commands/BatchUpdatePhoneNumberCommand.ts @@ -54,6 +54,7 @@ export interface BatchUpdatePhoneNumberCommandOutput extends BatchUpdatePhoneNum * PhoneNumberId: "STRING_VALUE", // required * ProductType: "VoiceConnector" || "SipMediaApplicationDialIn", * CallingName: "STRING_VALUE", + * Name: "STRING_VALUE", * }, * ], * }; diff --git a/clients/client-chime-sdk-voice/src/commands/CreatePhoneNumberOrderCommand.ts b/clients/client-chime-sdk-voice/src/commands/CreatePhoneNumberOrderCommand.ts index 9fe35beba11ee..2b5c64879f316 100644 --- a/clients/client-chime-sdk-voice/src/commands/CreatePhoneNumberOrderCommand.ts +++ b/clients/client-chime-sdk-voice/src/commands/CreatePhoneNumberOrderCommand.ts @@ -53,6 +53,7 @@ export interface CreatePhoneNumberOrderCommandOutput extends CreatePhoneNumberOr * E164PhoneNumbers: [ // E164PhoneNumberList // required * "STRING_VALUE", * ], + * Name: "STRING_VALUE", * }; * const command = new CreatePhoneNumberOrderCommand(input); * const response = await client.send(command); diff --git a/clients/client-chime-sdk-voice/src/commands/GetPhoneNumberCommand.ts b/clients/client-chime-sdk-voice/src/commands/GetPhoneNumberCommand.ts index 8c3c65a08bd61..a91fec9b6bd2a 100644 --- a/clients/client-chime-sdk-voice/src/commands/GetPhoneNumberCommand.ts +++ b/clients/client-chime-sdk-voice/src/commands/GetPhoneNumberCommand.ts @@ -83,6 +83,7 @@ export interface GetPhoneNumberCommandOutput extends GetPhoneNumberResponse, __M * // UpdatedTimestamp: new Date("TIMESTAMP"), * // DeletionTimestamp: new Date("TIMESTAMP"), * // OrderId: "STRING_VALUE", + * // Name: "STRING_VALUE", * // }, * // }; * diff --git a/clients/client-chime-sdk-voice/src/commands/ListPhoneNumbersCommand.ts b/clients/client-chime-sdk-voice/src/commands/ListPhoneNumbersCommand.ts index f0a1ff312ebc6..e3fdc343b2b6d 100644 --- a/clients/client-chime-sdk-voice/src/commands/ListPhoneNumbersCommand.ts +++ b/clients/client-chime-sdk-voice/src/commands/ListPhoneNumbersCommand.ts @@ -89,6 +89,7 @@ export interface ListPhoneNumbersCommandOutput extends ListPhoneNumbersResponse, * // UpdatedTimestamp: new Date("TIMESTAMP"), * // DeletionTimestamp: new Date("TIMESTAMP"), * // OrderId: "STRING_VALUE", + * // Name: "STRING_VALUE", * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-chime-sdk-voice/src/commands/RestorePhoneNumberCommand.ts b/clients/client-chime-sdk-voice/src/commands/RestorePhoneNumberCommand.ts index 714497816fce5..f79fd78512592 100644 --- a/clients/client-chime-sdk-voice/src/commands/RestorePhoneNumberCommand.ts +++ b/clients/client-chime-sdk-voice/src/commands/RestorePhoneNumberCommand.ts @@ -82,6 +82,7 @@ export interface RestorePhoneNumberCommandOutput extends RestorePhoneNumberRespo * // UpdatedTimestamp: new Date("TIMESTAMP"), * // DeletionTimestamp: new Date("TIMESTAMP"), * // OrderId: "STRING_VALUE", + * // Name: "STRING_VALUE", * // }, * // }; * diff --git a/clients/client-chime-sdk-voice/src/commands/UpdatePhoneNumberCommand.ts b/clients/client-chime-sdk-voice/src/commands/UpdatePhoneNumberCommand.ts index a1607af129714..75112a7e41db7 100644 --- a/clients/client-chime-sdk-voice/src/commands/UpdatePhoneNumberCommand.ts +++ b/clients/client-chime-sdk-voice/src/commands/UpdatePhoneNumberCommand.ts @@ -59,6 +59,7 @@ export interface UpdatePhoneNumberCommandOutput extends UpdatePhoneNumberRespons * PhoneNumberId: "STRING_VALUE", // required * ProductType: "VoiceConnector" || "SipMediaApplicationDialIn", * CallingName: "STRING_VALUE", + * Name: "STRING_VALUE", * }; * const command = new UpdatePhoneNumberCommand(input); * const response = await client.send(command); @@ -91,6 +92,7 @@ export interface UpdatePhoneNumberCommandOutput extends UpdatePhoneNumberRespons * // UpdatedTimestamp: new Date("TIMESTAMP"), * // DeletionTimestamp: new Date("TIMESTAMP"), * // OrderId: "STRING_VALUE", + * // Name: "STRING_VALUE", * // }, * // }; * diff --git a/clients/client-chime-sdk-voice/src/models/models_0.ts b/clients/client-chime-sdk-voice/src/models/models_0.ts index 2dcb1fa9ce88d..9da7d3c1405d5 100644 --- a/clients/client-chime-sdk-voice/src/models/models_0.ts +++ b/clients/client-chime-sdk-voice/src/models/models_0.ts @@ -459,6 +459,12 @@ export interface UpdatePhoneNumberRequestItem { *

The outbound calling name to update.

*/ CallingName?: string; + + /** + * @public + *

The name of the phone number.

+ */ + Name?: string; } /** @@ -614,6 +620,12 @@ export interface CreatePhoneNumberOrderRequest { *

List of phone numbers, in E.164 format.

*/ E164PhoneNumbers: string[] | undefined; + + /** + * @public + *

Specifies the name assigned to one or more phone numbers.

+ */ + Name?: string; } /** @@ -2237,6 +2249,12 @@ export interface PhoneNumber { *

The phone number's order ID.

*/ OrderId?: string; + + /** + * @public + *

The name of the phone number.

+ */ + Name?: string; } /** @@ -4313,6 +4331,12 @@ export interface UpdatePhoneNumberRequest { *

The outbound calling name associated with the phone number.

*/ CallingName?: string; + + /** + * @public + *

Specifies the name assigned to one or more phone numbers.

+ */ + Name?: string; } /** @@ -4782,6 +4806,7 @@ export const UpdatePhoneNumberRequestItemFilterSensitiveLog = (obj: UpdatePhoneN ...obj, ...(obj.PhoneNumberId && { PhoneNumberId: SENSITIVE_STRING }), ...(obj.CallingName && { CallingName: SENSITIVE_STRING }), + ...(obj.Name && { Name: SENSITIVE_STRING }), }); /** @@ -4826,6 +4851,7 @@ export const CandidateAddressFilterSensitiveLog = (obj: CandidateAddress): any = export const CreatePhoneNumberOrderRequestFilterSensitiveLog = (obj: CreatePhoneNumberOrderRequest): any => ({ ...obj, ...(obj.E164PhoneNumbers && { E164PhoneNumbers: SENSITIVE_STRING }), + ...(obj.Name && { Name: SENSITIVE_STRING }), }); /** @@ -5089,6 +5115,7 @@ export const PhoneNumberFilterSensitiveLog = (obj: PhoneNumber): any => ({ ...(obj.PhoneNumberId && { PhoneNumberId: SENSITIVE_STRING }), ...(obj.E164PhoneNumber && { E164PhoneNumber: SENSITIVE_STRING }), ...(obj.CallingName && { CallingName: SENSITIVE_STRING }), + ...(obj.Name && { Name: SENSITIVE_STRING }), }); /** @@ -5539,6 +5566,7 @@ export const UpdatePhoneNumberRequestFilterSensitiveLog = (obj: UpdatePhoneNumbe ...obj, ...(obj.PhoneNumberId && { PhoneNumberId: SENSITIVE_STRING }), ...(obj.CallingName && { CallingName: SENSITIVE_STRING }), + ...(obj.Name && { Name: SENSITIVE_STRING }), }); /** diff --git a/clients/client-chime-sdk-voice/src/protocols/Aws_restJson1.ts b/clients/client-chime-sdk-voice/src/protocols/Aws_restJson1.ts index 4406a295467a5..9a6498e98b25e 100644 --- a/clients/client-chime-sdk-voice/src/protocols/Aws_restJson1.ts +++ b/clients/client-chime-sdk-voice/src/protocols/Aws_restJson1.ts @@ -546,6 +546,7 @@ export const se_CreatePhoneNumberOrderCommand = async ( body = JSON.stringify( take(input, { E164PhoneNumbers: (_) => _json(_), + Name: [], ProductType: [], }) ); @@ -3176,6 +3177,7 @@ export const se_UpdatePhoneNumberCommand = async ( body = JSON.stringify( take(input, { CallingName: [], + Name: [], ProductType: [], }) ); @@ -10072,6 +10074,7 @@ const de_PhoneNumber = (output: any, context: __SerdeContext): PhoneNumber => { CreatedTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), DeletionTimestamp: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), E164PhoneNumber: __expectString, + Name: __expectString, OrderId: __expectString, PhoneNumberId: __expectString, ProductType: __expectString, diff --git a/codegen/sdk-codegen/aws-models/chime-sdk-voice.json b/codegen/sdk-codegen/aws-models/chime-sdk-voice.json index ca174185d46a6..1276f62d248df 100644 --- a/codegen/sdk-codegen/aws-models/chime-sdk-voice.json +++ b/codegen/sdk-codegen/aws-models/chime-sdk-voice.json @@ -1333,9 +1333,9 @@ } }, "params": { - "Region": "us-gov-east-1", "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "Region": "us-gov-east-1" } }, { @@ -1346,9 +1346,9 @@ } }, "params": { - "Region": "us-gov-east-1", "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "Region": "us-gov-east-1" } }, { @@ -1359,9 +1359,9 @@ } }, "params": { - "Region": "us-gov-east-1", "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "Region": "us-gov-east-1" } }, { @@ -1372,9 +1372,9 @@ } }, "params": { - "Region": "us-gov-east-1", "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "Region": "us-gov-east-1" } }, { @@ -1385,9 +1385,9 @@ } }, "params": { - "Region": "cn-north-1", "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "Region": "cn-north-1" } }, { @@ -1398,9 +1398,9 @@ } }, "params": { - "Region": "cn-north-1", "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "Region": "cn-north-1" } }, { @@ -1411,9 +1411,9 @@ } }, "params": { - "Region": "cn-north-1", "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "Region": "cn-north-1" } }, { @@ -1424,9 +1424,9 @@ } }, "params": { - "Region": "cn-north-1", "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "Region": "cn-north-1" } }, { @@ -1435,9 +1435,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "Region": "us-iso-east-1", "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "Region": "us-iso-east-1" } }, { @@ -1448,9 +1448,9 @@ } }, "params": { - "Region": "us-iso-east-1", "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "Region": "us-iso-east-1" } }, { @@ -1459,9 +1459,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "Region": "us-iso-east-1", "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "Region": "us-iso-east-1" } }, { @@ -1472,9 +1472,9 @@ } }, "params": { - "Region": "us-iso-east-1", "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "Region": "us-iso-east-1" } }, { @@ -1485,9 +1485,9 @@ } }, "params": { - "Region": "us-east-1", "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "Region": "us-east-1" } }, { @@ -1498,9 +1498,9 @@ } }, "params": { - "Region": "us-east-1", "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "Region": "us-east-1" } }, { @@ -1511,9 +1511,9 @@ } }, "params": { - "Region": "us-east-1", "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "Region": "us-east-1" } }, { @@ -1524,9 +1524,9 @@ } }, "params": { - "Region": "us-east-1", "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "Region": "us-east-1" } }, { @@ -1535,9 +1535,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "Region": "us-isob-east-1", "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "Region": "us-isob-east-1" } }, { @@ -1548,9 +1548,9 @@ } }, "params": { - "Region": "us-isob-east-1", "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "Region": "us-isob-east-1" } }, { @@ -1559,9 +1559,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "Region": "us-isob-east-1", "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "Region": "us-isob-east-1" } }, { @@ -1572,9 +1572,9 @@ } }, "params": { - "Region": "us-isob-east-1", "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "Region": "us-isob-east-1" } }, { @@ -1585,9 +1585,9 @@ } }, "params": { - "Region": "us-east-1", "UseDualStack": false, "UseFIPS": false, + "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -1597,9 +1597,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "Region": "us-east-1", "UseDualStack": false, "UseFIPS": true, + "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -1609,9 +1609,9 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "Region": "us-east-1", "UseDualStack": true, "UseFIPS": false, + "Region": "us-east-1", "Endpoint": "https://example.com" } } @@ -1737,6 +1737,12 @@ "smithy.api#documentation": "

List of phone numbers, in E.164 format.

", "smithy.api#required": {} } + }, + "Name": { + "target": "com.amazonaws.chimesdkvoice#PhoneNumberName", + "traits": { + "smithy.api#documentation": "

Specifies the name assigned to one or more phone numbers.

" + } } }, "traits": { @@ -6858,6 +6864,12 @@ "traits": { "smithy.api#documentation": "

The phone number's order ID.

" } + }, + "Name": { + "target": "com.amazonaws.chimesdkvoice#PhoneNumberName", + "traits": { + "smithy.api#documentation": "

The name of the phone number.

" + } } }, "traits": { @@ -7036,6 +7048,17 @@ } } }, + "com.amazonaws.chimesdkvoice#PhoneNumberName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^$|^[a-zA-Z0-9\\,\\.\\_\\-]+(\\s+[a-zA-Z0-9\\,\\.\\_\\-]+)*$", + "smithy.api#sensitive": {} + } + }, "com.amazonaws.chimesdkvoice#PhoneNumberOrder": { "type": "structure", "members": { @@ -9740,6 +9763,12 @@ "traits": { "smithy.api#documentation": "

The outbound calling name associated with the phone number.

" } + }, + "Name": { + "target": "com.amazonaws.chimesdkvoice#PhoneNumberName", + "traits": { + "smithy.api#documentation": "

Specifies the name assigned to one or more phone numbers.

" + } } }, "traits": { @@ -9767,6 +9796,12 @@ "traits": { "smithy.api#documentation": "

The outbound calling name to update.

" } + }, + "Name": { + "target": "com.amazonaws.chimesdkvoice#PhoneNumberName", + "traits": { + "smithy.api#documentation": "

The name of the phone number.

" + } } }, "traits": {