Skip to content

Commit

Permalink
feat(client-connect): Minor trait updates for User APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Jan 5, 2024
1 parent 3c4e6d7 commit 3509e69
Show file tree
Hide file tree
Showing 13 changed files with 175 additions and 26 deletions.
4 changes: 2 additions & 2 deletions clients/client-connect/src/commands/CreateUserCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { CreateUserRequest, CreateUserResponse } from "../models/models_0";
import { CreateUserRequest, CreateUserRequestFilterSensitiveLog, CreateUserResponse } from "../models/models_0";
import { de_CreateUserCommand, se_CreateUserCommand } from "../protocols/Aws_restJson1";

/**
Expand Down Expand Up @@ -128,7 +128,7 @@ export class CreateUserCommand extends $Command
})
.s("AmazonConnectService", "CreateUser", {})
.n("ConnectClient", "CreateUserCommand")
.f(void 0, void 0)
.f(CreateUserRequestFilterSensitiveLog, void 0)
.ser(se_CreateUserCommand)
.de(de_CreateUserCommand)
.build() {}
8 changes: 6 additions & 2 deletions clients/client-connect/src/commands/DescribeContactCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeContactRequest, DescribeContactResponse } from "../models/models_0";
import {
DescribeContactRequest,
DescribeContactResponse,
DescribeContactResponseFilterSensitiveLog,
} from "../models/models_0";
import { de_DescribeContactCommand, se_DescribeContactCommand } from "../protocols/Aws_restJson1";

/**
Expand Down Expand Up @@ -133,7 +137,7 @@ export class DescribeContactCommand extends $Command
})
.s("AmazonConnectService", "DescribeContact", {})
.n("ConnectClient", "DescribeContactCommand")
.f(void 0, void 0)
.f(void 0, DescribeContactResponseFilterSensitiveLog)
.ser(se_DescribeContactCommand)
.de(de_DescribeContactCommand)
.build() {}
4 changes: 2 additions & 2 deletions clients/client-connect/src/commands/DescribeUserCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeUserRequest, DescribeUserResponse } from "../models/models_1";
import { DescribeUserRequest, DescribeUserResponse, DescribeUserResponseFilterSensitiveLog } from "../models/models_1";
import { de_DescribeUserCommand, se_DescribeUserCommand } from "../protocols/Aws_restJson1";

/**
Expand Down Expand Up @@ -120,7 +120,7 @@ export class DescribeUserCommand extends $Command
})
.s("AmazonConnectService", "DescribeUser", {})
.n("ConnectClient", "DescribeUserCommand")
.f(void 0, void 0)
.f(void 0, DescribeUserResponseFilterSensitiveLog)
.ser(se_DescribeUserCommand)
.de(de_DescribeUserCommand)
.build() {}
4 changes: 2 additions & 2 deletions clients/client-connect/src/commands/SearchUsersCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { SearchUsersRequest, SearchUsersResponse } from "../models/models_2";
import { SearchUsersRequest, SearchUsersResponse, SearchUsersResponseFilterSensitiveLog } from "../models/models_2";
import { de_SearchUsersCommand, se_SearchUsersCommand } from "../protocols/Aws_restJson1";

/**
Expand Down Expand Up @@ -175,7 +175,7 @@ export class SearchUsersCommand extends $Command
})
.s("AmazonConnectService", "SearchUsers", {})
.n("ConnectClient", "SearchUsersCommand")
.f(void 0, void 0)
.f(void 0, SearchUsersResponseFilterSensitiveLog)
.ser(se_SearchUsersCommand)
.de(de_SearchUsersCommand)
.build() {}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { StartOutboundVoiceContactRequest, StartOutboundVoiceContactResponse } from "../models/models_2";
import {
StartOutboundVoiceContactRequest,
StartOutboundVoiceContactRequestFilterSensitiveLog,
StartOutboundVoiceContactResponse,
} from "../models/models_2";
import { de_StartOutboundVoiceContactCommand, se_StartOutboundVoiceContactCommand } from "../protocols/Aws_restJson1";

/**
Expand Down Expand Up @@ -136,7 +140,7 @@ export class StartOutboundVoiceContactCommand extends $Command
})
.s("AmazonConnectService", "StartOutboundVoiceContact", {})
.n("ConnectClient", "StartOutboundVoiceContactCommand")
.f(void 0, void 0)
.f(StartOutboundVoiceContactRequestFilterSensitiveLog, void 0)
.ser(se_StartOutboundVoiceContactCommand)
.de(de_StartOutboundVoiceContactCommand)
.build() {}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { StartTaskContactRequest, StartTaskContactResponse } from "../models/models_2";
import {
StartTaskContactRequest,
StartTaskContactRequestFilterSensitiveLog,
StartTaskContactResponse,
} from "../models/models_2";
import { de_StartTaskContactCommand, se_StartTaskContactCommand } from "../protocols/Aws_restJson1";

/**
Expand Down Expand Up @@ -161,7 +165,7 @@ export class StartTaskContactCommand extends $Command
})
.s("AmazonConnectService", "StartTaskContact", {})
.n("ConnectClient", "StartTaskContactCommand")
.f(void 0, void 0)
.f(StartTaskContactRequestFilterSensitiveLog, void 0)
.ser(se_StartTaskContactCommand)
.de(de_StartTaskContactCommand)
.build() {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } fr
import { commonParams } from "../endpoint/EndpointParameters";
import {
StartWebRTCContactRequest,
StartWebRTCContactRequestFilterSensitiveLog,
StartWebRTCContactResponse,
StartWebRTCContactResponseFilterSensitiveLog,
} from "../models/models_2";
Expand Down Expand Up @@ -143,7 +144,7 @@ export class StartWebRTCContactCommand extends $Command
})
.s("AmazonConnectService", "StartWebRTCContact", {})
.n("ConnectClient", "StartWebRTCContactCommand")
.f(void 0, StartWebRTCContactResponseFilterSensitiveLog)
.f(StartWebRTCContactRequestFilterSensitiveLog, StartWebRTCContactResponseFilterSensitiveLog)
.ser(se_StartWebRTCContactCommand)
.de(de_StartWebRTCContactCommand)
.build() {}
8 changes: 6 additions & 2 deletions clients/client-connect/src/commands/UpdateContactCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { UpdateContactRequest, UpdateContactResponse } from "../models/models_2";
import {
UpdateContactRequest,
UpdateContactRequestFilterSensitiveLog,
UpdateContactResponse,
} from "../models/models_2";
import { de_UpdateContactCommand, se_UpdateContactCommand } from "../protocols/Aws_restJson1";

/**
Expand Down Expand Up @@ -103,7 +107,7 @@ export class UpdateContactCommand extends $Command
})
.s("AmazonConnectService", "UpdateContact", {})
.n("ConnectClient", "UpdateContactCommand")
.f(void 0, void 0)
.f(UpdateContactRequestFilterSensitiveLog, void 0)
.ser(se_UpdateContactCommand)
.de(de_UpdateContactCommand)
.build() {}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { ConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { UpdateUserIdentityInfoRequest } from "../models/models_2";
import { UpdateUserIdentityInfoRequest, UpdateUserIdentityInfoRequestFilterSensitiveLog } from "../models/models_2";
import { de_UpdateUserIdentityInfoCommand, se_UpdateUserIdentityInfoCommand } from "../protocols/Aws_restJson1";

/**
Expand Down Expand Up @@ -105,7 +105,7 @@ export class UpdateUserIdentityInfoCommand extends $Command
})
.s("AmazonConnectService", "UpdateUserIdentityInfo", {})
.n("ConnectClient", "UpdateUserIdentityInfoCommand")
.f(void 0, void 0)
.f(UpdateUserIdentityInfoRequestFilterSensitiveLog, void 0)
.ser(se_UpdateUserIdentityInfoCommand)
.de(de_UpdateUserIdentityInfoCommand)
.build() {}
37 changes: 37 additions & 0 deletions clients/client-connect/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7366,6 +7366,26 @@ export const CreateInstanceRequestFilterSensitiveLog = (obj: CreateInstanceReque
...(obj.InstanceAlias && { InstanceAlias: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const UserIdentityInfoFilterSensitiveLog = (obj: UserIdentityInfo): any => ({
...obj,
...(obj.FirstName && { FirstName: SENSITIVE_STRING }),
...(obj.LastName && { LastName: SENSITIVE_STRING }),
...(obj.Email && { Email: SENSITIVE_STRING }),
...(obj.SecondaryEmail && { SecondaryEmail: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const CreateUserRequestFilterSensitiveLog = (obj: CreateUserRequest): any => ({
...obj,
...(obj.Password && { Password: SENSITIVE_STRING }),
...(obj.IdentityInfo && { IdentityInfo: UserIdentityInfoFilterSensitiveLog(obj.IdentityInfo) }),
});

/**
* @internal
*/
Expand Down Expand Up @@ -7417,6 +7437,23 @@ export const CreateViewVersionResponseFilterSensitiveLog = (obj: CreateViewVersi
...(obj.View && { View: ViewFilterSensitiveLog(obj.View) }),
});

/**
* @internal
*/
export const ContactFilterSensitiveLog = (obj: Contact): any => ({
...obj,
...(obj.Name && { Name: SENSITIVE_STRING }),
...(obj.Description && { Description: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const DescribeContactResponseFilterSensitiveLog = (obj: DescribeContactResponse): any => ({
...obj,
...(obj.Contact && { Contact: ContactFilterSensitiveLog(obj.Contact) }),
});

/**
* @internal
*/
Expand Down
19 changes: 18 additions & 1 deletion clients/client-connect/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import {
TaskTemplateStatus,
UseCaseType,
UserIdentityInfo,
UserIdentityInfoFilterSensitiveLog,
UserPhoneConfig,
UserProficiency,
View,
Expand Down Expand Up @@ -9111,6 +9112,22 @@ export interface Sort {
Order: SortOrder | undefined;
}

/**
* @internal
*/
export const UserFilterSensitiveLog = (obj: User): any => ({
...obj,
...(obj.IdentityInfo && { IdentityInfo: UserIdentityInfoFilterSensitiveLog(obj.IdentityInfo) }),
});

/**
* @internal
*/
export const DescribeUserResponseFilterSensitiveLog = (obj: DescribeUserResponse): any => ({
...obj,
...(obj.User && { User: UserFilterSensitiveLog(obj.User) }),
});

/**
* @internal
*/
Expand All @@ -9133,7 +9150,7 @@ export const CredentialsFilterSensitiveLog = (obj: Credentials): any => ({
*/
export const GetFederationTokenResponseFilterSensitiveLog = (obj: GetFederationTokenResponse): any => ({
...obj,
...(obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }),
...(obj.Credentials && { Credentials: SENSITIVE_STRING }),
});

/**
Expand Down
69 changes: 69 additions & 0 deletions clients/client-connect/src/models/models_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
TaskTemplateField,
TaskTemplateStatus,
UserIdentityInfo,
UserIdentityInfoFilterSensitiveLog,
UserPhoneConfig,
UserProficiency,
View,
Expand Down Expand Up @@ -5400,6 +5401,57 @@ export const SearchContactsRequestFilterSensitiveLog = (obj: SearchContactsReque
...(obj.SearchCriteria && { SearchCriteria: SearchCriteriaFilterSensitiveLog(obj.SearchCriteria) }),
});

/**
* @internal
*/
export const UserIdentityInfoLiteFilterSensitiveLog = (obj: UserIdentityInfoLite): any => ({
...obj,
...(obj.FirstName && { FirstName: SENSITIVE_STRING }),
...(obj.LastName && { LastName: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const UserSearchSummaryFilterSensitiveLog = (obj: UserSearchSummary): any => ({
...obj,
...(obj.IdentityInfo && { IdentityInfo: UserIdentityInfoLiteFilterSensitiveLog(obj.IdentityInfo) }),
});

/**
* @internal
*/
export const SearchUsersResponseFilterSensitiveLog = (obj: SearchUsersResponse): any => ({
...obj,
...(obj.Users && { Users: obj.Users.map((item) => UserSearchSummaryFilterSensitiveLog(item)) }),
});

/**
* @internal
*/
export const StartOutboundVoiceContactRequestFilterSensitiveLog = (obj: StartOutboundVoiceContactRequest): any => ({
...obj,
...(obj.Name && { Name: SENSITIVE_STRING }),
...(obj.Description && { Description: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const StartTaskContactRequestFilterSensitiveLog = (obj: StartTaskContactRequest): any => ({
...obj,
...(obj.Name && { Name: SENSITIVE_STRING }),
...(obj.Description && { Description: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const StartWebRTCContactRequestFilterSensitiveLog = (obj: StartWebRTCContactRequest): any => ({
...obj,
...(obj.Description && { Description: SENSITIVE_STRING }),
});

/**
* @internal
*/
Expand All @@ -5424,6 +5476,23 @@ export const StartWebRTCContactResponseFilterSensitiveLog = (obj: StartWebRTCCon
...(obj.ConnectionData && { ConnectionData: ConnectionDataFilterSensitiveLog(obj.ConnectionData) }),
});

/**
* @internal
*/
export const UpdateContactRequestFilterSensitiveLog = (obj: UpdateContactRequest): any => ({
...obj,
...(obj.Name && { Name: SENSITIVE_STRING }),
...(obj.Description && { Description: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const UpdateUserIdentityInfoRequestFilterSensitiveLog = (obj: UpdateUserIdentityInfoRequest): any => ({
...obj,
...(obj.IdentityInfo && { IdentityInfo: UserIdentityInfoFilterSensitiveLog(obj.IdentityInfo) }),
});

/**
* @internal
*/
Expand Down
Loading

0 comments on commit 3509e69

Please sign in to comment.