-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(aws-android-sdk-lambda): update models to latest (#3341)
Co-authored-by: Erica Eaton <67125657+eeatonaws@users.noreply.github.com>
- Loading branch information
1 parent
8887f19
commit 6d2f730
Showing
4 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
...ambda/src/main/java/com/amazonaws/services/lambda/model/RecursiveInvocationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
package com.amazonaws.services.lambda.model; | ||
|
||
import com.amazonaws.AmazonServiceException; | ||
|
||
/** | ||
* <p> | ||
* Lambda has detected your function being invoked in a recursive loop with | ||
* other Amazon Web Services resources and stopped your function's invocation. | ||
* </p> | ||
*/ | ||
public class RecursiveInvocationException extends AmazonServiceException { | ||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* <p> | ||
* The exception type. | ||
* </p> | ||
*/ | ||
private String type; | ||
|
||
/** | ||
* Constructs a new RecursiveInvocationException with the specified error | ||
* message. | ||
* | ||
* @param message Describes the error encountered. | ||
*/ | ||
public RecursiveInvocationException(String message) { | ||
super(message); | ||
} | ||
|
||
/** | ||
* <p> | ||
* The exception type. | ||
* </p> | ||
* | ||
* @return <p> | ||
* The exception type. | ||
* </p> | ||
*/ | ||
public String getType() { | ||
return type; | ||
} | ||
|
||
/** | ||
* <p> | ||
* The exception type. | ||
* </p> | ||
* | ||
* @param type <p> | ||
* The exception type. | ||
* </p> | ||
*/ | ||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...m/amazonaws/services/lambda/model/transform/RecursiveInvocationExceptionUnmarshaller.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://aws.amazon.com/apache2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
package com.amazonaws.services.lambda.model.transform; | ||
|
||
import com.amazonaws.AmazonServiceException; | ||
import com.amazonaws.http.JsonErrorResponseHandler.JsonErrorResponse; | ||
import com.amazonaws.transform.JsonErrorUnmarshaller; | ||
import com.amazonaws.services.lambda.model.RecursiveInvocationException; | ||
|
||
public class RecursiveInvocationExceptionUnmarshaller extends JsonErrorUnmarshaller { | ||
|
||
public RecursiveInvocationExceptionUnmarshaller() { | ||
super(RecursiveInvocationException.class); | ||
} | ||
|
||
@Override | ||
public boolean match(JsonErrorResponse error) throws Exception { | ||
return error.getErrorCode().equals("RecursiveInvocationException"); | ||
} | ||
|
||
@Override | ||
public AmazonServiceException unmarshall(JsonErrorResponse error) throws Exception { | ||
|
||
RecursiveInvocationException e = (RecursiveInvocationException) super.unmarshall(error); | ||
e.setErrorCode("RecursiveInvocationException"); | ||
e.setType(String.valueOf(error.get("Type"))); | ||
|
||
return e; | ||
} | ||
} |