Skip to content

Commit 22d1b2a

Browse files
awsmobilesdkraphkim
authored andcommitted
[aws-android-sdk-connect] Update models to latest (#1318)
1 parent 2ed6a21 commit 22d1b2a

22 files changed

+2088
-38
lines changed

aws-android-sdk-connect/src/main/java/com/amazonaws/services/connect/AmazonConnect.java

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,43 @@ ListUserHierarchyGroupsResult listUserHierarchyGroups(
574574
ListUsersResult listUsers(ListUsersRequest listUsersRequest) throws AmazonClientException,
575575
AmazonServiceException;
576576

577+
/**
578+
* <p>
579+
* Initiates a contact flow to start a new chat for the customer. Response
580+
* of this API provides a token required to obtain credentials from the <a
581+
* href=
582+
* "https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html"
583+
* >CreateParticipantConnection</a> API in the Amazon Connect Participant
584+
* Service.
585+
* </p>
586+
* <p>
587+
* When a new chat contact is successfully created, clients need to
588+
* subscribe to the participant’s connection for the created chat within 5
589+
* minutes. This is achieved by invoking <a href=
590+
* "https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html"
591+
* >CreateParticipantConnection</a> with WEBSOCKET and
592+
* CONNECTION_CREDENTIALS.
593+
* </p>
594+
*
595+
* @param startChatContactRequest
596+
* @return startChatContactResult The response from the StartChatContact
597+
* service method, as returned by Amazon Connect.
598+
* @throws InvalidRequestException
599+
* @throws InvalidParameterException
600+
* @throws ResourceNotFoundException
601+
* @throws InternalServiceException
602+
* @throws LimitExceededException
603+
* @throws AmazonClientException If any internal errors are encountered
604+
* inside the client while attempting to make the request or
605+
* handle the response. For example if a network connection is
606+
* not available.
607+
* @throws AmazonServiceException If an error response is returned by Amazon
608+
* Connect indicating either a problem with the data in the
609+
* request, or a server side issue.
610+
*/
611+
StartChatContactResult startChatContact(StartChatContactRequest startChatContactRequest)
612+
throws AmazonClientException, AmazonServiceException;
613+
577614
/**
578615
* <p>
579616
* Initiates a contact flow to place an outbound call to a customer.

aws-android-sdk-connect/src/main/java/com/amazonaws/services/connect/AmazonConnectAsync.java

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,87 @@ Future<ListUsersResult> listUsersAsync(ListUsersRequest listUsersRequest,
10921092
AsyncHandler<ListUsersRequest, ListUsersResult> asyncHandler)
10931093
throws AmazonServiceException, AmazonClientException;
10941094

1095+
/**
1096+
* <p>
1097+
* Initiates a contact flow to start a new chat for the customer. Response
1098+
* of this API provides a token required to obtain credentials from the <a
1099+
* href=
1100+
* "https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html"
1101+
* >CreateParticipantConnection</a> API in the Amazon Connect Participant
1102+
* Service.
1103+
* </p>
1104+
* <p>
1105+
* When a new chat contact is successfully created, clients need to
1106+
* subscribe to the participant’s connection for the created chat within 5
1107+
* minutes. This is achieved by invoking <a href=
1108+
* "https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html"
1109+
* >CreateParticipantConnection</a> with WEBSOCKET and
1110+
* CONNECTION_CREDENTIALS.
1111+
* </p>
1112+
*
1113+
* @param startChatContactRequest
1114+
* @return A Java Future object containing the response from the
1115+
* StartChatContact service method, as returned by Amazon Connect.
1116+
* @throws InvalidRequestException
1117+
* @throws InvalidParameterException
1118+
* @throws ResourceNotFoundException
1119+
* @throws InternalServiceException
1120+
* @throws LimitExceededException
1121+
* @throws AmazonClientException If any internal errors are encountered
1122+
* inside the client while attempting to make the request or
1123+
* handle the response. For example if a network connection is
1124+
* not available.
1125+
* @throws AmazonServiceException If an error response is returned by Amazon
1126+
* Connect indicating either a problem with the data in the
1127+
* request, or a server side issue.
1128+
*/
1129+
Future<StartChatContactResult> startChatContactAsync(
1130+
StartChatContactRequest startChatContactRequest) throws AmazonServiceException,
1131+
AmazonClientException;
1132+
1133+
/**
1134+
* <p>
1135+
* Initiates a contact flow to start a new chat for the customer. Response
1136+
* of this API provides a token required to obtain credentials from the <a
1137+
* href=
1138+
* "https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html"
1139+
* >CreateParticipantConnection</a> API in the Amazon Connect Participant
1140+
* Service.
1141+
* </p>
1142+
* <p>
1143+
* When a new chat contact is successfully created, clients need to
1144+
* subscribe to the participant’s connection for the created chat within 5
1145+
* minutes. This is achieved by invoking <a href=
1146+
* "https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html"
1147+
* >CreateParticipantConnection</a> with WEBSOCKET and
1148+
* CONNECTION_CREDENTIALS.
1149+
* </p>
1150+
*
1151+
* @param startChatContactRequest
1152+
* @param asyncHandler Asynchronous callback handler for events in the
1153+
* life-cycle of the request. Users could provide the
1154+
* implementation of the four callback methods in this interface
1155+
* to process the operation result or handle the exception.
1156+
* @return A Java Future object containing the response from the
1157+
* StartChatContact service method, as returned by Amazon Connect.
1158+
* @throws InvalidRequestException
1159+
* @throws InvalidParameterException
1160+
* @throws ResourceNotFoundException
1161+
* @throws InternalServiceException
1162+
* @throws LimitExceededException
1163+
* @throws AmazonClientException If any internal errors are encountered
1164+
* inside the client while attempting to make the request or
1165+
* handle the response. For example if a network connection is
1166+
* not available.
1167+
* @throws AmazonServiceException If an error response is returned by Amazon
1168+
* Connect indicating either a problem with the data in the
1169+
* request, or a server side issue.
1170+
*/
1171+
Future<StartChatContactResult> startChatContactAsync(
1172+
StartChatContactRequest startChatContactRequest,
1173+
AsyncHandler<StartChatContactRequest, StartChatContactResult> asyncHandler)
1174+
throws AmazonServiceException, AmazonClientException;
1175+
10951176
/**
10961177
* <p>
10971178
* Initiates a contact flow to place an outbound call to a customer.

aws-android-sdk-connect/src/main/java/com/amazonaws/services/connect/AmazonConnectAsyncClient.java

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,6 +1611,103 @@ public ListUsersResult call() throws Exception {
16111611
});
16121612
}
16131613

1614+
/**
1615+
* <p>
1616+
* Initiates a contact flow to start a new chat for the customer. Response
1617+
* of this API provides a token required to obtain credentials from the <a
1618+
* href=
1619+
* "https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html"
1620+
* >CreateParticipantConnection</a> API in the Amazon Connect Participant
1621+
* Service.
1622+
* </p>
1623+
* <p>
1624+
* When a new chat contact is successfully created, clients need to
1625+
* subscribe to the participant’s connection for the created chat within 5
1626+
* minutes. This is achieved by invoking <a href=
1627+
* "https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html"
1628+
* >CreateParticipantConnection</a> with WEBSOCKET and
1629+
* CONNECTION_CREDENTIALS.
1630+
* </p>
1631+
*
1632+
* @param startChatContactRequest
1633+
* @return A Java Future object containing the response from the
1634+
* StartChatContact service method, as returned by Amazon Connect.
1635+
* @throws InvalidRequestException
1636+
* @throws InvalidParameterException
1637+
* @throws ResourceNotFoundException
1638+
* @throws InternalServiceException
1639+
* @throws LimitExceededException
1640+
* @throws AmazonClientException If any internal errors are encountered
1641+
* inside the client while attempting to make the request or
1642+
* handle the response. For example if a network connection is
1643+
* not available.
1644+
* @throws AmazonServiceException If an error response is returned by Amazon
1645+
* Connect indicating either a problem with the data in the
1646+
* request, or a server side issue.
1647+
*/
1648+
public Future<StartChatContactResult> startChatContactAsync(
1649+
final StartChatContactRequest startChatContactRequest) throws AmazonServiceException,
1650+
AmazonClientException {
1651+
return executorService.submit(new Callable<StartChatContactResult>() {
1652+
public StartChatContactResult call() throws Exception {
1653+
return startChatContact(startChatContactRequest);
1654+
}
1655+
});
1656+
}
1657+
1658+
/**
1659+
* <p>
1660+
* Initiates a contact flow to start a new chat for the customer. Response
1661+
* of this API provides a token required to obtain credentials from the <a
1662+
* href=
1663+
* "https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html"
1664+
* >CreateParticipantConnection</a> API in the Amazon Connect Participant
1665+
* Service.
1666+
* </p>
1667+
* <p>
1668+
* When a new chat contact is successfully created, clients need to
1669+
* subscribe to the participant’s connection for the created chat within 5
1670+
* minutes. This is achieved by invoking <a href=
1671+
* "https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html"
1672+
* >CreateParticipantConnection</a> with WEBSOCKET and
1673+
* CONNECTION_CREDENTIALS.
1674+
* </p>
1675+
*
1676+
* @param startChatContactRequest
1677+
* @return A Java Future object containing the response from the
1678+
* StartChatContact service method, as returned by Amazon Connect.
1679+
* @throws InvalidRequestException
1680+
* @throws InvalidParameterException
1681+
* @throws ResourceNotFoundException
1682+
* @throws InternalServiceException
1683+
* @throws LimitExceededException
1684+
* @throws AmazonClientException If any internal errors are encountered
1685+
* inside the client while attempting to make the request or
1686+
* handle the response. For example if a network connection is
1687+
* not available.
1688+
* @throws AmazonServiceException If an error response is returned by Amazon
1689+
* Connect indicating either a problem with the data in the
1690+
* request, or a server side issue.
1691+
*/
1692+
public Future<StartChatContactResult> startChatContactAsync(
1693+
final StartChatContactRequest startChatContactRequest,
1694+
final AsyncHandler<StartChatContactRequest, StartChatContactResult> asyncHandler)
1695+
throws AmazonServiceException, AmazonClientException {
1696+
return executorService.submit(new Callable<StartChatContactResult>() {
1697+
public StartChatContactResult call() throws Exception {
1698+
StartChatContactResult result = null;
1699+
try {
1700+
result = startChatContact(startChatContactRequest);
1701+
} catch (Exception ex) {
1702+
asyncHandler.onError(ex);
1703+
throw ex;
1704+
}
1705+
asyncHandler.onSuccess(startChatContactRequest, result);
1706+
return result;
1707+
}
1708+
});
1709+
}
1710+
16141711
/**
16151712
* <p>
16161713
* Initiates a contact flow to place an outbound call to a customer.

aws-android-sdk-connect/src/main/java/com/amazonaws/services/connect/AmazonConnectClient.java

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,6 +1316,69 @@ public ListUsersResult listUsers(ListUsersRequest listUsersRequest)
13161316
}
13171317
}
13181318

1319+
/**
1320+
* <p>
1321+
* Initiates a contact flow to start a new chat for the customer. Response
1322+
* of this API provides a token required to obtain credentials from the <a
1323+
* href=
1324+
* "https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html"
1325+
* >CreateParticipantConnection</a> API in the Amazon Connect Participant
1326+
* Service.
1327+
* </p>
1328+
* <p>
1329+
* When a new chat contact is successfully created, clients need to
1330+
* subscribe to the participant’s connection for the created chat within 5
1331+
* minutes. This is achieved by invoking <a href=
1332+
* "https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_CreateParticipantConnection.html"
1333+
* >CreateParticipantConnection</a> with WEBSOCKET and
1334+
* CONNECTION_CREDENTIALS.
1335+
* </p>
1336+
*
1337+
* @param startChatContactRequest
1338+
* @return startChatContactResult The response from the StartChatContact
1339+
* service method, as returned by Amazon Connect.
1340+
* @throws InvalidRequestException
1341+
* @throws InvalidParameterException
1342+
* @throws ResourceNotFoundException
1343+
* @throws InternalServiceException
1344+
* @throws LimitExceededException
1345+
* @throws AmazonClientException If any internal errors are encountered
1346+
* inside the client while attempting to make the request or
1347+
* handle the response. For example if a network connection is
1348+
* not available.
1349+
* @throws AmazonServiceException If an error response is returned by Amazon
1350+
* Connect indicating either a problem with the data in the
1351+
* request, or a server side issue.
1352+
*/
1353+
public StartChatContactResult startChatContact(StartChatContactRequest startChatContactRequest)
1354+
throws AmazonServiceException, AmazonClientException {
1355+
ExecutionContext executionContext = createExecutionContext(startChatContactRequest);
1356+
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
1357+
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1358+
Request<StartChatContactRequest> request = null;
1359+
Response<StartChatContactResult> response = null;
1360+
try {
1361+
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1362+
try {
1363+
request = new StartChatContactRequestMarshaller().marshall(startChatContactRequest);
1364+
// Binds the request metrics to the current request.
1365+
request.setAWSRequestMetrics(awsRequestMetrics);
1366+
} finally {
1367+
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1368+
}
1369+
Unmarshaller<StartChatContactResult, JsonUnmarshallerContext> unmarshaller = new StartChatContactResultJsonUnmarshaller();
1370+
JsonResponseHandler<StartChatContactResult> responseHandler = new JsonResponseHandler<StartChatContactResult>(
1371+
unmarshaller);
1372+
1373+
response = invoke(request, responseHandler, executionContext);
1374+
1375+
return response.getAwsResponse();
1376+
} finally {
1377+
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
1378+
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
1379+
}
1380+
}
1381+
13191382
/**
13201383
* <p>
13211384
* Initiates a contact flow to place an outbound call to a customer.

aws-android-sdk-connect/src/main/java/com/amazonaws/services/connect/model/Channel.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
*/
2424
public enum Channel {
2525

26-
VOICE("VOICE");
26+
VOICE("VOICE"),
27+
CHAT("CHAT");
2728

2829
private String value;
2930

@@ -40,6 +41,7 @@ public String toString() {
4041
static {
4142
enumMap = new HashMap<String, Channel>();
4243
enumMap.put("VOICE", VOICE);
44+
enumMap.put("CHAT", CHAT);
4345
}
4446

4547
/**

0 commit comments

Comments
 (0)