Skip to content

Commit 6ee1aa7

Browse files
authored
feat(aws-android-sdk-connectparticipant): update models to latest (#3397)
1 parent 3539aef commit 6ee1aa7

19 files changed

+1806
-25
lines changed

aws-android-sdk-connectparticipant/src/main/java/com/amazonaws/services/connectparticipant/AmazonConnectParticipant.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,30 @@ CreateParticipantConnectionResult createParticipantConnection(
217217
CreateParticipantConnectionRequest createParticipantConnectionRequest)
218218
throws AmazonClientException, AmazonServiceException;
219219

220+
/**
221+
* <p>
222+
* Retrieves the view for the specified view token.
223+
* </p>
224+
*
225+
* @param describeViewRequest
226+
* @return describeViewResult The response from the DescribeView service
227+
* method, as returned by Amazon Connect Participant.
228+
* @throws AccessDeniedException
229+
* @throws InternalServerException
230+
* @throws ThrottlingException
231+
* @throws ResourceNotFoundException
232+
* @throws ValidationException
233+
* @throws AmazonClientException If any internal errors are encountered
234+
* inside the client while attempting to make the request or
235+
* handle the response. For example if a network connection is
236+
* not available.
237+
* @throws AmazonServiceException If an error response is returned by Amazon
238+
* Connect Participant indicating either a problem with the data
239+
* in the request, or a server side issue.
240+
*/
241+
DescribeViewResult describeView(DescribeViewRequest describeViewRequest)
242+
throws AmazonClientException, AmazonServiceException;
243+
220244
/**
221245
* <p>
222246
* Disconnects a participant.

aws-android-sdk-connectparticipant/src/main/java/com/amazonaws/services/connectparticipant/AmazonConnectParticipantAsync.java

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,61 @@ Future<CreateParticipantConnectionResult> createParticipantConnectionAsync(
285285
AsyncHandler<CreateParticipantConnectionRequest, CreateParticipantConnectionResult> asyncHandler)
286286
throws AmazonServiceException, AmazonClientException;
287287

288+
/**
289+
* <p>
290+
* Retrieves the view for the specified view token.
291+
* </p>
292+
*
293+
* @param describeViewRequest
294+
* @return A Java Future object containing the response from the
295+
* DescribeView service method, as returned by Amazon Connect
296+
* Participant.
297+
* @throws AccessDeniedException
298+
* @throws InternalServerException
299+
* @throws ThrottlingException
300+
* @throws ResourceNotFoundException
301+
* @throws ValidationException
302+
* @throws AmazonClientException If any internal errors are encountered
303+
* inside the client while attempting to make the request or
304+
* handle the response. For example if a network connection is
305+
* not available.
306+
* @throws AmazonServiceException If an error response is returned by Amazon
307+
* Connect Participant indicating either a problem with the data
308+
* in the request, or a server side issue.
309+
*/
310+
Future<DescribeViewResult> describeViewAsync(DescribeViewRequest describeViewRequest)
311+
throws AmazonServiceException, AmazonClientException;
312+
313+
/**
314+
* <p>
315+
* Retrieves the view for the specified view token.
316+
* </p>
317+
*
318+
* @param describeViewRequest
319+
* @param asyncHandler Asynchronous callback handler for events in the
320+
* life-cycle of the request. Users could provide the
321+
* implementation of the four callback methods in this interface
322+
* to process the operation result or handle the exception.
323+
* @return A Java Future object containing the response from the
324+
* DescribeView service method, as returned by Amazon Connect
325+
* Participant.
326+
* @throws AccessDeniedException
327+
* @throws InternalServerException
328+
* @throws ThrottlingException
329+
* @throws ResourceNotFoundException
330+
* @throws ValidationException
331+
* @throws AmazonClientException If any internal errors are encountered
332+
* inside the client while attempting to make the request or
333+
* handle the response. For example if a network connection is
334+
* not available.
335+
* @throws AmazonServiceException If an error response is returned by Amazon
336+
* Connect Participant indicating either a problem with the data
337+
* in the request, or a server side issue.
338+
*/
339+
Future<DescribeViewResult> describeViewAsync(DescribeViewRequest describeViewRequest,
340+
AsyncHandler<DescribeViewRequest, DescribeViewResult> asyncHandler)
341+
throws AmazonServiceException, AmazonClientException;
342+
288343
/**
289344
* <p>
290345
* Disconnects a participant.

aws-android-sdk-connectparticipant/src/main/java/com/amazonaws/services/connectparticipant/AmazonConnectParticipantAsyncClient.java

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,79 @@ public CreateParticipantConnectionResult call() throws Exception {
421421
});
422422
}
423423

424+
/**
425+
* <p>
426+
* Retrieves the view for the specified view token.
427+
* </p>
428+
*
429+
* @param describeViewRequest
430+
* @return A Java Future object containing the response from the
431+
* DescribeView service method, as returned by Amazon Connect
432+
* Participant.
433+
* @throws AccessDeniedException
434+
* @throws InternalServerException
435+
* @throws ThrottlingException
436+
* @throws ResourceNotFoundException
437+
* @throws ValidationException
438+
* @throws AmazonClientException If any internal errors are encountered
439+
* inside the client while attempting to make the request or
440+
* handle the response. For example if a network connection is
441+
* not available.
442+
* @throws AmazonServiceException If an error response is returned by Amazon
443+
* Connect Participant indicating either a problem with the data
444+
* in the request, or a server side issue.
445+
*/
446+
public Future<DescribeViewResult> describeViewAsync(
447+
final DescribeViewRequest describeViewRequest) throws AmazonServiceException,
448+
AmazonClientException {
449+
return executorService.submit(new Callable<DescribeViewResult>() {
450+
public DescribeViewResult call() throws Exception {
451+
return describeView(describeViewRequest);
452+
}
453+
});
454+
}
455+
456+
/**
457+
* <p>
458+
* Retrieves the view for the specified view token.
459+
* </p>
460+
*
461+
* @param describeViewRequest
462+
* @return A Java Future object containing the response from the
463+
* DescribeView service method, as returned by Amazon Connect
464+
* Participant.
465+
* @throws AccessDeniedException
466+
* @throws InternalServerException
467+
* @throws ThrottlingException
468+
* @throws ResourceNotFoundException
469+
* @throws ValidationException
470+
* @throws AmazonClientException If any internal errors are encountered
471+
* inside the client while attempting to make the request or
472+
* handle the response. For example if a network connection is
473+
* not available.
474+
* @throws AmazonServiceException If an error response is returned by Amazon
475+
* Connect Participant indicating either a problem with the data
476+
* in the request, or a server side issue.
477+
*/
478+
public Future<DescribeViewResult> describeViewAsync(
479+
final DescribeViewRequest describeViewRequest,
480+
final AsyncHandler<DescribeViewRequest, DescribeViewResult> asyncHandler)
481+
throws AmazonServiceException, AmazonClientException {
482+
return executorService.submit(new Callable<DescribeViewResult>() {
483+
public DescribeViewResult call() throws Exception {
484+
DescribeViewResult result = null;
485+
try {
486+
result = describeView(describeViewRequest);
487+
} catch (Exception ex) {
488+
asyncHandler.onError(ex);
489+
throw ex;
490+
}
491+
asyncHandler.onSuccess(describeViewRequest, result);
492+
return result;
493+
}
494+
});
495+
}
496+
424497
/**
425498
* <p>
426499
* Disconnects a participant.

aws-android-sdk-connectparticipant/src/main/java/com/amazonaws/services/connectparticipant/AmazonConnectParticipantClient.java

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ private void init() {
129129
jsonErrorUnmarshallers.add(new AccessDeniedExceptionUnmarshaller());
130130
jsonErrorUnmarshallers.add(new ConflictExceptionUnmarshaller());
131131
jsonErrorUnmarshallers.add(new InternalServerExceptionUnmarshaller());
132+
jsonErrorUnmarshallers.add(new ResourceNotFoundExceptionUnmarshaller());
132133
jsonErrorUnmarshallers.add(new ServiceQuotaExceededExceptionUnmarshaller());
133134
jsonErrorUnmarshallers.add(new ThrottlingExceptionUnmarshaller());
134135
jsonErrorUnmarshallers.add(new ValidationExceptionUnmarshaller());
@@ -323,6 +324,56 @@ public CreateParticipantConnectionResult createParticipantConnection(
323324
}
324325
}
325326

327+
/**
328+
* <p>
329+
* Retrieves the view for the specified view token.
330+
* </p>
331+
*
332+
* @param describeViewRequest
333+
* @return describeViewResult The response from the DescribeView service
334+
* method, as returned by Amazon Connect Participant.
335+
* @throws AccessDeniedException
336+
* @throws InternalServerException
337+
* @throws ThrottlingException
338+
* @throws ResourceNotFoundException
339+
* @throws ValidationException
340+
* @throws AmazonClientException If any internal errors are encountered
341+
* inside the client while attempting to make the request or
342+
* handle the response. For example if a network connection is
343+
* not available.
344+
* @throws AmazonServiceException If an error response is returned by Amazon
345+
* Connect Participant indicating either a problem with the data
346+
* in the request, or a server side issue.
347+
*/
348+
public DescribeViewResult describeView(DescribeViewRequest describeViewRequest)
349+
throws AmazonServiceException, AmazonClientException {
350+
ExecutionContext executionContext = createExecutionContext(describeViewRequest);
351+
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
352+
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
353+
Request<DescribeViewRequest> request = null;
354+
Response<DescribeViewResult> response = null;
355+
try {
356+
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
357+
try {
358+
request = new DescribeViewRequestMarshaller().marshall(describeViewRequest);
359+
// Binds the request metrics to the current request.
360+
request.setAWSRequestMetrics(awsRequestMetrics);
361+
} finally {
362+
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
363+
}
364+
Unmarshaller<DescribeViewResult, JsonUnmarshallerContext> unmarshaller = new DescribeViewResultJsonUnmarshaller();
365+
JsonResponseHandler<DescribeViewResult> responseHandler = new JsonResponseHandler<DescribeViewResult>(
366+
unmarshaller);
367+
368+
response = invoke(request, responseHandler, executionContext);
369+
370+
return response.getAwsResponse();
371+
} finally {
372+
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
373+
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
374+
}
375+
}
376+
326377
/**
327378
* <p>
328379
* Disconnects a participant.

aws-android-sdk-connectparticipant/src/main/java/com/amazonaws/services/connectparticipant/model/CreateParticipantConnectionRequest.java

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ public class CreateParticipantConnectionRequest extends AmazonWebServiceRequest
8080
Serializable {
8181
/**
8282
* <p>
83-
* Type of connection information required. This can be omitted if
84-
* <code>ConnectParticipant</code> is <code>true</code>.
83+
* Type of connection information required. If you need
84+
* <code>CONNECTION_CREDENTIALS</code> along with marking participant as
85+
* connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
8586
* </p>
8687
*/
8788
private java.util.List<String> type;
@@ -112,13 +113,16 @@ public class CreateParticipantConnectionRequest extends AmazonWebServiceRequest
112113

113114
/**
114115
* <p>
115-
* Type of connection information required. This can be omitted if
116-
* <code>ConnectParticipant</code> is <code>true</code>.
116+
* Type of connection information required. If you need
117+
* <code>CONNECTION_CREDENTIALS</code> along with marking participant as
118+
* connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
117119
* </p>
118120
*
119121
* @return <p>
120-
* Type of connection information required. This can be omitted if
121-
* <code>ConnectParticipant</code> is <code>true</code>.
122+
* Type of connection information required. If you need
123+
* <code>CONNECTION_CREDENTIALS</code> along with marking
124+
* participant as connected, pass
125+
* <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
122126
* </p>
123127
*/
124128
public java.util.List<String> getType() {
@@ -127,13 +131,16 @@ public java.util.List<String> getType() {
127131

128132
/**
129133
* <p>
130-
* Type of connection information required. This can be omitted if
131-
* <code>ConnectParticipant</code> is <code>true</code>.
134+
* Type of connection information required. If you need
135+
* <code>CONNECTION_CREDENTIALS</code> along with marking participant as
136+
* connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
132137
* </p>
133138
*
134139
* @param type <p>
135-
* Type of connection information required. This can be omitted
136-
* if <code>ConnectParticipant</code> is <code>true</code>.
140+
* Type of connection information required. If you need
141+
* <code>CONNECTION_CREDENTIALS</code> along with marking
142+
* participant as connected, pass
143+
* <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
137144
* </p>
138145
*/
139146
public void setType(java.util.Collection<String> type) {
@@ -147,16 +154,19 @@ public void setType(java.util.Collection<String> type) {
147154

148155
/**
149156
* <p>
150-
* Type of connection information required. This can be omitted if
151-
* <code>ConnectParticipant</code> is <code>true</code>.
157+
* Type of connection information required. If you need
158+
* <code>CONNECTION_CREDENTIALS</code> along with marking participant as
159+
* connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
152160
* </p>
153161
* <p>
154162
* Returns a reference to this object so that method calls can be chained
155163
* together.
156164
*
157165
* @param type <p>
158-
* Type of connection information required. This can be omitted
159-
* if <code>ConnectParticipant</code> is <code>true</code>.
166+
* Type of connection information required. If you need
167+
* <code>CONNECTION_CREDENTIALS</code> along with marking
168+
* participant as connected, pass
169+
* <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
160170
* </p>
161171
* @return A reference to this updated object so that method calls can be
162172
* chained together.
@@ -173,16 +183,19 @@ public CreateParticipantConnectionRequest withType(String... type) {
173183

174184
/**
175185
* <p>
176-
* Type of connection information required. This can be omitted if
177-
* <code>ConnectParticipant</code> is <code>true</code>.
186+
* Type of connection information required. If you need
187+
* <code>CONNECTION_CREDENTIALS</code> along with marking participant as
188+
* connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
178189
* </p>
179190
* <p>
180191
* Returns a reference to this object so that method calls can be chained
181192
* together.
182193
*
183194
* @param type <p>
184-
* Type of connection information required. This can be omitted
185-
* if <code>ConnectParticipant</code> is <code>true</code>.
195+
* Type of connection information required. If you need
196+
* <code>CONNECTION_CREDENTIALS</code> along with marking
197+
* participant as connected, pass
198+
* <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
186199
* </p>
187200
* @return A reference to this updated object so that method calls can be
188201
* chained together.

0 commit comments

Comments
 (0)