Class HttpResponse.Builder
java.lang.Object
software.amazon.awscdk.integtests.alpha.HttpResponse.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<HttpResponse>
- Enclosing interface:
HttpResponse
@Stability(Experimental)
public static final class HttpResponse.Builder
extends Object
implements software.amazon.jsii.Builder<HttpResponse>
A builder for
HttpResponse
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofHttpResponse.getBody()
build()
Builds the configured instance.Sets the value ofHttpResponse.getHeaders()
Sets the value ofHttpResponse.getOk()
Sets the value ofHttpResponse.getStatus()
statusText
(String statusText) Sets the value ofHttpResponse.getStatusText()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
body
Sets the value ofHttpResponse.getBody()
- Parameters:
body
- The response, either as parsed JSON or a string literal.- Returns:
this
-
headers
Sets the value ofHttpResponse.getHeaders()
- Parameters:
headers
- Headers associated with the response.- Returns:
this
-
ok
Sets the value ofHttpResponse.getOk()
- Parameters:
ok
- Indicates whether the response was successful. status range 200-299- Returns:
this
-
status
Sets the value ofHttpResponse.getStatus()
- Parameters:
status
- Status code of the response.- Returns:
this
-
statusText
Sets the value ofHttpResponse.getStatusText()
- Parameters:
statusText
- The status message corresponding to the status code.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<HttpResponse>
- Returns:
- a new instance of
HttpResponse
- Throws:
NullPointerException
- if any required attribute was not provided
-