Skip to content

Commit

Permalink
feat(aws-android-sdk-connectparticipant): update models to latest (#3397
Browse files Browse the repository at this point in the history
)
  • Loading branch information
awsmobilesdk authored Oct 20, 2023
1 parent 3539aef commit 6ee1aa7
Show file tree
Hide file tree
Showing 19 changed files with 1,806 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,30 @@ CreateParticipantConnectionResult createParticipantConnection(
CreateParticipantConnectionRequest createParticipantConnectionRequest)
throws AmazonClientException, AmazonServiceException;

/**
* <p>
* Retrieves the view for the specified view token.
* </p>
*
* @param describeViewRequest
* @return describeViewResult The response from the DescribeView service
* method, as returned by Amazon Connect Participant.
* @throws AccessDeniedException
* @throws InternalServerException
* @throws ThrottlingException
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by Amazon
* Connect Participant indicating either a problem with the data
* in the request, or a server side issue.
*/
DescribeViewResult describeView(DescribeViewRequest describeViewRequest)
throws AmazonClientException, AmazonServiceException;

/**
* <p>
* Disconnects a participant.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,61 @@ Future<CreateParticipantConnectionResult> createParticipantConnectionAsync(
AsyncHandler<CreateParticipantConnectionRequest, CreateParticipantConnectionResult> asyncHandler)
throws AmazonServiceException, AmazonClientException;

/**
* <p>
* Retrieves the view for the specified view token.
* </p>
*
* @param describeViewRequest
* @return A Java Future object containing the response from the
* DescribeView service method, as returned by Amazon Connect
* Participant.
* @throws AccessDeniedException
* @throws InternalServerException
* @throws ThrottlingException
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by Amazon
* Connect Participant indicating either a problem with the data
* in the request, or a server side issue.
*/
Future<DescribeViewResult> describeViewAsync(DescribeViewRequest describeViewRequest)
throws AmazonServiceException, AmazonClientException;

/**
* <p>
* Retrieves the view for the specified view token.
* </p>
*
* @param describeViewRequest
* @param asyncHandler Asynchronous callback handler for events in the
* life-cycle of the request. Users could provide the
* implementation of the four callback methods in this interface
* to process the operation result or handle the exception.
* @return A Java Future object containing the response from the
* DescribeView service method, as returned by Amazon Connect
* Participant.
* @throws AccessDeniedException
* @throws InternalServerException
* @throws ThrottlingException
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by Amazon
* Connect Participant indicating either a problem with the data
* in the request, or a server side issue.
*/
Future<DescribeViewResult> describeViewAsync(DescribeViewRequest describeViewRequest,
AsyncHandler<DescribeViewRequest, DescribeViewResult> asyncHandler)
throws AmazonServiceException, AmazonClientException;

/**
* <p>
* Disconnects a participant.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,79 @@ public CreateParticipantConnectionResult call() throws Exception {
});
}

/**
* <p>
* Retrieves the view for the specified view token.
* </p>
*
* @param describeViewRequest
* @return A Java Future object containing the response from the
* DescribeView service method, as returned by Amazon Connect
* Participant.
* @throws AccessDeniedException
* @throws InternalServerException
* @throws ThrottlingException
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by Amazon
* Connect Participant indicating either a problem with the data
* in the request, or a server side issue.
*/
public Future<DescribeViewResult> describeViewAsync(
final DescribeViewRequest describeViewRequest) throws AmazonServiceException,
AmazonClientException {
return executorService.submit(new Callable<DescribeViewResult>() {
public DescribeViewResult call() throws Exception {
return describeView(describeViewRequest);
}
});
}

/**
* <p>
* Retrieves the view for the specified view token.
* </p>
*
* @param describeViewRequest
* @return A Java Future object containing the response from the
* DescribeView service method, as returned by Amazon Connect
* Participant.
* @throws AccessDeniedException
* @throws InternalServerException
* @throws ThrottlingException
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by Amazon
* Connect Participant indicating either a problem with the data
* in the request, or a server side issue.
*/
public Future<DescribeViewResult> describeViewAsync(
final DescribeViewRequest describeViewRequest,
final AsyncHandler<DescribeViewRequest, DescribeViewResult> asyncHandler)
throws AmazonServiceException, AmazonClientException {
return executorService.submit(new Callable<DescribeViewResult>() {
public DescribeViewResult call() throws Exception {
DescribeViewResult result = null;
try {
result = describeView(describeViewRequest);
} catch (Exception ex) {
asyncHandler.onError(ex);
throw ex;
}
asyncHandler.onSuccess(describeViewRequest, result);
return result;
}
});
}

/**
* <p>
* Disconnects a participant.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ private void init() {
jsonErrorUnmarshallers.add(new AccessDeniedExceptionUnmarshaller());
jsonErrorUnmarshallers.add(new ConflictExceptionUnmarshaller());
jsonErrorUnmarshallers.add(new InternalServerExceptionUnmarshaller());
jsonErrorUnmarshallers.add(new ResourceNotFoundExceptionUnmarshaller());
jsonErrorUnmarshallers.add(new ServiceQuotaExceededExceptionUnmarshaller());
jsonErrorUnmarshallers.add(new ThrottlingExceptionUnmarshaller());
jsonErrorUnmarshallers.add(new ValidationExceptionUnmarshaller());
Expand Down Expand Up @@ -323,6 +324,56 @@ public CreateParticipantConnectionResult createParticipantConnection(
}
}

/**
* <p>
* Retrieves the view for the specified view token.
* </p>
*
* @param describeViewRequest
* @return describeViewResult The response from the DescribeView service
* method, as returned by Amazon Connect Participant.
* @throws AccessDeniedException
* @throws InternalServerException
* @throws ThrottlingException
* @throws ResourceNotFoundException
* @throws ValidationException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by Amazon
* Connect Participant indicating either a problem with the data
* in the request, or a server side issue.
*/
public DescribeViewResult describeView(DescribeViewRequest describeViewRequest)
throws AmazonServiceException, AmazonClientException {
ExecutionContext executionContext = createExecutionContext(describeViewRequest);
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
Request<DescribeViewRequest> request = null;
Response<DescribeViewResult> response = null;
try {
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
try {
request = new DescribeViewRequestMarshaller().marshall(describeViewRequest);
// Binds the request metrics to the current request.
request.setAWSRequestMetrics(awsRequestMetrics);
} finally {
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
}
Unmarshaller<DescribeViewResult, JsonUnmarshallerContext> unmarshaller = new DescribeViewResultJsonUnmarshaller();
JsonResponseHandler<DescribeViewResult> responseHandler = new JsonResponseHandler<DescribeViewResult>(
unmarshaller);

response = invoke(request, responseHandler, executionContext);

return response.getAwsResponse();
} finally {
awsRequestMetrics.endEvent(Field.ClientExecuteTime);
endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
}
}

/**
* <p>
* Disconnects a participant.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ public class CreateParticipantConnectionRequest extends AmazonWebServiceRequest
Serializable {
/**
* <p>
* Type of connection information required. This can be omitted if
* <code>ConnectParticipant</code> is <code>true</code>.
* Type of connection information required. If you need
* <code>CONNECTION_CREDENTIALS</code> along with marking participant as
* connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
* </p>
*/
private java.util.List<String> type;
Expand Down Expand Up @@ -112,13 +113,16 @@ public class CreateParticipantConnectionRequest extends AmazonWebServiceRequest

/**
* <p>
* Type of connection information required. This can be omitted if
* <code>ConnectParticipant</code> is <code>true</code>.
* Type of connection information required. If you need
* <code>CONNECTION_CREDENTIALS</code> along with marking participant as
* connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
* </p>
*
* @return <p>
* Type of connection information required. This can be omitted if
* <code>ConnectParticipant</code> is <code>true</code>.
* Type of connection information required. If you need
* <code>CONNECTION_CREDENTIALS</code> along with marking
* participant as connected, pass
* <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
* </p>
*/
public java.util.List<String> getType() {
Expand All @@ -127,13 +131,16 @@ public java.util.List<String> getType() {

/**
* <p>
* Type of connection information required. This can be omitted if
* <code>ConnectParticipant</code> is <code>true</code>.
* Type of connection information required. If you need
* <code>CONNECTION_CREDENTIALS</code> along with marking participant as
* connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
* </p>
*
* @param type <p>
* Type of connection information required. This can be omitted
* if <code>ConnectParticipant</code> is <code>true</code>.
* Type of connection information required. If you need
* <code>CONNECTION_CREDENTIALS</code> along with marking
* participant as connected, pass
* <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
* </p>
*/
public void setType(java.util.Collection<String> type) {
Expand All @@ -147,16 +154,19 @@ public void setType(java.util.Collection<String> type) {

/**
* <p>
* Type of connection information required. This can be omitted if
* <code>ConnectParticipant</code> is <code>true</code>.
* Type of connection information required. If you need
* <code>CONNECTION_CREDENTIALS</code> along with marking participant as
* connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
* </p>
* <p>
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param type <p>
* Type of connection information required. This can be omitted
* if <code>ConnectParticipant</code> is <code>true</code>.
* Type of connection information required. If you need
* <code>CONNECTION_CREDENTIALS</code> along with marking
* participant as connected, pass
* <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
* </p>
* @return A reference to this updated object so that method calls can be
* chained together.
Expand All @@ -173,16 +183,19 @@ public CreateParticipantConnectionRequest withType(String... type) {

/**
* <p>
* Type of connection information required. This can be omitted if
* <code>ConnectParticipant</code> is <code>true</code>.
* Type of connection information required. If you need
* <code>CONNECTION_CREDENTIALS</code> along with marking participant as
* connected, pass <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
* </p>
* <p>
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param type <p>
* Type of connection information required. This can be omitted
* if <code>ConnectParticipant</code> is <code>true</code>.
* Type of connection information required. If you need
* <code>CONNECTION_CREDENTIALS</code> along with marking
* participant as connected, pass
* <code>CONNECTION_CREDENTIALS</code> in <code>Type</code>.
* </p>
* @return A reference to this updated object so that method calls can be
* chained together.
Expand Down
Loading

0 comments on commit 6ee1aa7

Please sign in to comment.