Interface MockInput.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<MockInput.Builder,MockInput>,SdkBuilder<MockInput.Builder,MockInput>,SdkPojo
- Enclosing class:
- MockInput
@Mutable @NotThreadSafe public static interface MockInput.Builder extends SdkPojo, CopyableBuilder<MockInput.Builder,MockInput>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default MockInput.BuildererrorOutput(Consumer<MockErrorOutput.Builder> errorOutput)The mocked error output when calling TestState.MockInput.BuildererrorOutput(MockErrorOutput errorOutput)The mocked error output when calling TestState.MockInput.BuilderfieldValidationMode(String fieldValidationMode)Determines the level of strictness when validating mocked results against their respective API models.MockInput.BuilderfieldValidationMode(MockResponseValidationMode fieldValidationMode)Determines the level of strictness when validating mocked results against their respective API models.MockInput.Builderresult(String result)A JSON string containing the mocked result of the state invocation.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
result
MockInput.Builder result(String result)
A JSON string containing the mocked result of the state invocation.
- Parameters:
result- A JSON string containing the mocked result of the state invocation.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
errorOutput
MockInput.Builder errorOutput(MockErrorOutput errorOutput)
The mocked error output when calling TestState. When specified, the mocked response is returned as a JSON object that contains an
errorandcausefield.- Parameters:
errorOutput- The mocked error output when calling TestState. When specified, the mocked response is returned as a JSON object that contains anerrorandcausefield.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
errorOutput
default MockInput.Builder errorOutput(Consumer<MockErrorOutput.Builder> errorOutput)
The mocked error output when calling TestState. When specified, the mocked response is returned as a JSON object that contains an
This is a convenience method that creates an instance of theerrorandcausefield.MockErrorOutput.Builderavoiding the need to create one manually viaMockErrorOutput.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toerrorOutput(MockErrorOutput).- Parameters:
errorOutput- a consumer that will call methods onMockErrorOutput.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
errorOutput(MockErrorOutput)
-
fieldValidationMode
MockInput.Builder fieldValidationMode(String fieldValidationMode)
Determines the level of strictness when validating mocked results against their respective API models. Values include:
-
STRICT: All required fields must be present, and all present fields must conform to the API's schema. -
PRESENT: All present fields must conform to the API's schema. -
NONE: No validation is performed.
If no value is specified, the default value is
STRICT.- Parameters:
fieldValidationMode- Determines the level of strictness when validating mocked results against their respective API models. Values include:-
STRICT: All required fields must be present, and all present fields must conform to the API's schema. -
PRESENT: All present fields must conform to the API's schema. -
NONE: No validation is performed.
If no value is specified, the default value is
STRICT.-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
MockResponseValidationMode,MockResponseValidationMode
-
-
fieldValidationMode
MockInput.Builder fieldValidationMode(MockResponseValidationMode fieldValidationMode)
Determines the level of strictness when validating mocked results against their respective API models. Values include:
-
STRICT: All required fields must be present, and all present fields must conform to the API's schema. -
PRESENT: All present fields must conform to the API's schema. -
NONE: No validation is performed.
If no value is specified, the default value is
STRICT.- Parameters:
fieldValidationMode- Determines the level of strictness when validating mocked results against their respective API models. Values include:-
STRICT: All required fields must be present, and all present fields must conform to the API's schema. -
PRESENT: All present fields must conform to the API's schema. -
NONE: No validation is performed.
If no value is specified, the default value is
STRICT.-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
MockResponseValidationMode,MockResponseValidationMode
-
-
-