public static final class MockIntegrationTrait.Builder extends AbstractTraitBuilder<MockIntegrationTrait,MockIntegrationTrait.Builder>
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
MockIntegrationTrait |
build()
Creates an immutable object that is created from the properties
that have been set on the builder.
|
MockIntegrationTrait.Builder |
contentHandling(java.lang.String contentHandling)
Set the Request payload encoding conversion types.
|
MockIntegrationTrait.Builder |
passThroughBehavior(java.lang.String passThroughBehavior)
Configures the pass through behavior of the integration.
|
MockIntegrationTrait.Builder |
putRequestParameter(java.lang.String input,
java.lang.String output)
Adds a request parameters.
|
MockIntegrationTrait.Builder |
putRequestTemplate(java.lang.String mimeType,
java.lang.String template)
Adds a request template.
|
MockIntegrationTrait.Builder |
putResponse(java.lang.String statusCodeRegex,
IntegrationResponse integrationResponse)
Adds a response for the given response regex.
|
MockIntegrationTrait.Builder |
removeRequestParameter(java.lang.String expression)
Remove a request parameter by expression.
|
MockIntegrationTrait.Builder |
removeRequestTemplate(java.lang.String mimeType)
Removes a request template by MIME type.
|
MockIntegrationTrait.Builder |
removeResponse(java.lang.String statusCodeRegex)
Removes a response by status code regex.
|
MockIntegrationTrait.Builder |
requestParameters(java.util.Map<java.lang.String,java.lang.String> requestParameters)
Sets request parameters.
|
MockIntegrationTrait.Builder |
requestTemplates(java.util.Map<java.lang.String,java.lang.String> requestTemplates)
Sets request templates.
|
MockIntegrationTrait.Builder |
responses(java.util.Map<java.lang.String,IntegrationResponse> responses)
Sets responses for the given response regular expressions.
|
getSourceLocation, sourceLocation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
requiredState
public MockIntegrationTrait build()
SmithyBuilder
public MockIntegrationTrait.Builder passThroughBehavior(java.lang.String passThroughBehavior)
passThroughBehavior
- Pass through behavior setting.IntegrationTrait.getPassThroughBehavior()
public MockIntegrationTrait.Builder contentHandling(java.lang.String contentHandling)
Valid values are:
contentHandling
- Content handling property.public MockIntegrationTrait.Builder putRequestParameter(java.lang.String input, java.lang.String output)
input
- Input request expression.output
- Output request expression.IntegrationTrait.getRequestParameters()
public MockIntegrationTrait.Builder requestParameters(java.util.Map<java.lang.String,java.lang.String> requestParameters)
requestParameters
- Map of parameters to add.IntegrationTrait.getRequestParameters()
public MockIntegrationTrait.Builder removeRequestParameter(java.lang.String expression)
expression
- Expression to remove.public MockIntegrationTrait.Builder putRequestTemplate(java.lang.String mimeType, java.lang.String template)
mimeType
- MIME type of the request template to set.template
- Request template to set.IntegrationTrait.getRequestTemplates()
public MockIntegrationTrait.Builder requestTemplates(java.util.Map<java.lang.String,java.lang.String> requestTemplates)
requestTemplates
- Map of MIME types to the corresponding template.IntegrationTrait.getRequestTemplates()
public MockIntegrationTrait.Builder removeRequestTemplate(java.lang.String mimeType)
mimeType
- MIME type to remove.public MockIntegrationTrait.Builder putResponse(java.lang.String statusCodeRegex, IntegrationResponse integrationResponse)
statusCodeRegex
- Status code regular expression.integrationResponse
- Integration response to set.IntegrationTrait.getResponses()
public MockIntegrationTrait.Builder responses(java.util.Map<java.lang.String,IntegrationResponse> responses)
responses
- Map of regular expressions to responses.IntegrationTrait.getResponses()
public MockIntegrationTrait.Builder removeResponse(java.lang.String statusCodeRegex)
statusCodeRegex
- Status code regular expression to remove.