-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c21f620
commit 0bff034
Showing
16 changed files
with
666 additions
and
30 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
33 changes: 33 additions & 0 deletions
33
...n/java/com/amazonaws/util/awsclientgenerator/domainmodels/c2j_protocol_test/C2jGiven.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,33 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
package com.amazonaws.util.awsclientgenerator.domainmodels.c2j_protocol_test; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class C2jGiven { | ||
@Data | ||
public class C2jGivenHttp { | ||
private String method; | ||
private String requestUri; | ||
} | ||
|
||
@Data | ||
public class C2jGivenInput { | ||
private String shape; | ||
private String locationName; | ||
} | ||
|
||
@Data | ||
public class C2jGivenEndpoint { | ||
private String hostPrefix; | ||
} | ||
|
||
private String name; | ||
private C2jGivenHttp http; | ||
private C2jGivenInput input; | ||
private C2jGivenEndpoint endpoint; | ||
} |
43 changes: 43 additions & 0 deletions
43
.../amazonaws/util/awsclientgenerator/domainmodels/c2j_protocol_test/C2jInputSerialized.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 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
package com.amazonaws.util.awsclientgenerator.domainmodels.c2j_protocol_test; | ||
|
||
import lombok.Data; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Data | ||
public class C2jInputSerialized { | ||
/** | ||
* The HTTP method. | ||
*/ | ||
private String method; | ||
/** | ||
* The HTTP body as a string. | ||
*/ | ||
private String body; | ||
/** | ||
* The uri path and querystring of the request. | ||
*/ | ||
private String uri; | ||
/** | ||
* The URL host of the request. | ||
*/ | ||
private String host; | ||
/** | ||
* Any HTTP headers for the HTTP request. | ||
*/ | ||
private Map<String, String> headers; | ||
/** | ||
* A list of header names that must not exist in the HTTP Request. | ||
*/ | ||
private List<String> forbidHeaders; | ||
/** | ||
* A list of header names that must exist in the HTTP Request. | ||
*/ | ||
private List<String> requireHeaders; | ||
} |
35 changes: 35 additions & 0 deletions
35
...om/amazonaws/util/awsclientgenerator/domainmodels/c2j_protocol_test/C2jInputTestCase.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,35 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
package com.amazonaws.util.awsclientgenerator.domainmodels.c2j_protocol_test; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
import lombok.Data; | ||
|
||
@Data | ||
public class C2jInputTestCase { | ||
/** | ||
* A test case id. | ||
*/ | ||
private String id; | ||
/** | ||
* A test case description. | ||
*/ | ||
private String description; | ||
/** | ||
* This corresponds to the JSON object that would define an operation in the service's JSON model. | ||
* Valid keys include http, input, endpoint, and name. | ||
*/ | ||
private C2jGiven given; | ||
/** | ||
* The input parameters a user would provide. | ||
*/ | ||
private JsonNode params; | ||
|
||
/** | ||
* The expected serialized HTTP request. | ||
*/ | ||
private C2jInputSerialized serialized; | ||
} |
38 changes: 38 additions & 0 deletions
38
...m/amazonaws/util/awsclientgenerator/domainmodels/c2j_protocol_test/C2jInputTestSuite.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,38 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
package com.amazonaws.util.awsclientgenerator.domainmodels.c2j_protocol_test; | ||
|
||
|
||
import com.amazonaws.util.awsclientgenerator.domainmodels.c2j.C2jMetadata; | ||
import com.amazonaws.util.awsclientgenerator.domainmodels.c2j.C2jShape; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Data | ||
public class C2jInputTestSuite { | ||
/** | ||
* A description of the tests | ||
*/ | ||
private String description; | ||
/** | ||
* The top level metadata that would correspond to the metadata key in the service's JSON model. | ||
*/ | ||
private C2jMetadata metadata; | ||
/** | ||
* An URL string the test cases must use when constructing the request's URL endpoint. | ||
*/ | ||
private String clientEndpoint; | ||
/** | ||
* A JSON object of shapes. This would correspond to the top level shapes key in the service's JSON model. | ||
*/ | ||
private Map<String, C2jShape> shapes; | ||
/** | ||
* a JSON list of test cases. | ||
*/ | ||
private List<C2jInputTestCase> cases; | ||
} |
17 changes: 17 additions & 0 deletions
17
...m/amazonaws/util/awsclientgenerator/domainmodels/c2j_protocol_test/C2jOutputResponse.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,17 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
package com.amazonaws.util.awsclientgenerator.domainmodels.c2j_protocol_test; | ||
|
||
import lombok.Data; | ||
|
||
import java.util.Map; | ||
|
||
@Data | ||
public class C2jOutputResponse { | ||
Integer status_code; | ||
private Map<String, String> headers; | ||
private String body; | ||
} |
48 changes: 48 additions & 0 deletions
48
...m/amazonaws/util/awsclientgenerator/domainmodels/c2j_protocol_test/C2jOutputTestCase.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,48 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
package com.amazonaws.util.awsclientgenerator.domainmodels.c2j_protocol_test; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
import lombok.Data; | ||
|
||
@Data | ||
public class C2jOutputTestCase { | ||
/** | ||
* A test case id. | ||
*/ | ||
private String id; | ||
/** | ||
* A test case description. | ||
*/ | ||
private String description; | ||
/** | ||
* This corresponds to the JSON object that would define an operation in the service's JSON model. | ||
* Valid keys include http, input, endpoint, and name. | ||
*/ | ||
private C2jGiven given; | ||
/** | ||
* A JSON hash representing the structure of the parsed response. Either this or error (not both) must appear in the test case. | ||
*/ | ||
private JsonNode result; | ||
/** | ||
* A JSON hash representing the structure of the parsed error response. Either this or result (not both) must appear in the test case. | ||
*/ | ||
private JsonNode error; | ||
/** | ||
* A string specifying the AWS error code extracted from the response. Corresponds to the error shape to be unmarshalled and | ||
* should always be set, even when the shape can not be found. Must be present when the error key is present. | ||
*/ | ||
private String errorCode; | ||
/** | ||
* A string specifying the error message extracted from the response. | ||
* Should be able to be extracted even when an error shape is not unmarshalled. May only be present when the error key is present. | ||
*/ | ||
private String errorMessage; | ||
/** | ||
* The HTTP response to be parsed | ||
*/ | ||
private C2jOutputResponse response; | ||
} |
37 changes: 37 additions & 0 deletions
37
.../amazonaws/util/awsclientgenerator/domainmodels/c2j_protocol_test/C2jOutputTestSuite.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,37 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
package com.amazonaws.util.awsclientgenerator.domainmodels.c2j_protocol_test; | ||
|
||
import com.amazonaws.util.awsclientgenerator.domainmodels.c2j.C2jMetadata; | ||
import com.amazonaws.util.awsclientgenerator.domainmodels.c2j.C2jShape; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Data | ||
public class C2jOutputTestSuite { | ||
/** | ||
* A description of the tests | ||
*/ | ||
private String description; | ||
/** | ||
* The top level metadata that would correspond to the metadata key in the service's JSON model. | ||
*/ | ||
private C2jMetadata metadata; | ||
/** | ||
* A URL string the test cases must use when constructing the request's URL endpoint. | ||
*/ | ||
private String clientEndpoint; | ||
/** | ||
* A JSON object of C2jShapes. This would correspond to the top level C2jShapes key in the service's JSON model. | ||
*/ | ||
private Map<String, C2jShape> shapes; | ||
/** | ||
* a JSON list of test cases. | ||
*/ | ||
private List<C2jOutputTestCase> cases; | ||
} |
24 changes: 24 additions & 0 deletions
24
...va/com/amazonaws/util/awsclientgenerator/domainmodels/c2j_protocol_test/C2jTestSuite.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,24 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
package com.amazonaws.util.awsclientgenerator.domainmodels.c2j_protocol_test; | ||
|
||
import com.amazonaws.util.awsclientgenerator.domainmodels.c2j.C2jMetadata; | ||
import com.amazonaws.util.awsclientgenerator.domainmodels.c2j.C2jShape; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Data | ||
public class C2jTestSuite { | ||
public enum TestSuiteType { | ||
INPUT, | ||
OUTPUT | ||
} | ||
TestSuiteType type; // only can be present. | ||
private List<C2jInputTestSuite> inputTestSuites; | ||
private List<C2jOutputTestSuite> outputTestSuites; | ||
} |
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
Oops, something went wrong.