Class HttpExample.Builder
- java.lang.Object
-
- io.contract_testing.contractcase.definitions.interactions.http.HttpExample.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<HttpExample>
- Enclosing interface:
- HttpExample
@Stability(Stable) public static final class HttpExample.Builder extends Object implements software.amazon.jsii.Builder<HttpExample>
A builder forHttpExample
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpExamplebuild()Builds the configured instance.HttpExample.Builderrequest(Object request)Sets the value ofHttpExample.getRequest()HttpExample.Builderresponse(Object response)Sets the value ofHttpExample.getResponse()
-
-
-
Method Detail
-
request
@Stability(Stable) public HttpExample.Builder request(Object request)
Sets the value ofHttpExample.getRequest()- Parameters:
request- A test equivalence matcher that will match an HTTP request (recommended: the Test Equivalence MatcherHttpRequest). This parameter is required.- Returns:
this
-
response
@Stability(Stable) public HttpExample.Builder response(Object response)
Sets the value ofHttpExample.getResponse()- Parameters:
response- A test equivalence matcher that will match an HTTP response (recommended: the Test Equivalence MatcherHttpResponse). This parameter is required.- Returns:
this
-
build
@Stability(Stable) public HttpExample build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<HttpExample>- Returns:
- a new instance of
HttpExample - Throws:
NullPointerException- if any required attribute was not provided
-
-