public class ImportRestApiRequest extends AmazonWebServiceRequest implements java.io.Serializable, java.lang.Cloneable
A POST request to import an API to Amazon API Gateway using an input of an API definition file.
Modifier and Type | Field and Description |
---|---|
private java.nio.ByteBuffer |
body
The POST request body containing external API definitions.
|
private java.lang.Boolean |
failOnWarnings
A query parameter to indicate whether to rollback the API creation (
true ) or not (false ) when a warning is
encountered. |
private java.util.Map<java.lang.String,java.lang.String> |
parameters
Custom header parameters as part of the request.
|
NOOP
Constructor and Description |
---|
ImportRestApiRequest() |
Modifier and Type | Method and Description |
---|---|
ImportRestApiRequest |
addParametersEntry(java.lang.String key,
java.lang.String value) |
ImportRestApiRequest |
clearParametersEntries()
Removes all the entries added into Parameters.
|
ImportRestApiRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(java.lang.Object obj) |
java.nio.ByteBuffer |
getBody()
The POST request body containing external API definitions.
|
java.lang.Boolean |
getFailOnWarnings()
A query parameter to indicate whether to rollback the API creation (
true ) or not (false ) when a warning is
encountered. |
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
Custom header parameters as part of the request.
|
int |
hashCode() |
java.lang.Boolean |
isFailOnWarnings()
A query parameter to indicate whether to rollback the API creation (
true ) or not (false ) when a warning is
encountered. |
void |
setBody(java.nio.ByteBuffer body)
The POST request body containing external API definitions.
|
void |
setFailOnWarnings(java.lang.Boolean failOnWarnings)
A query parameter to indicate whether to rollback the API creation (
true ) or not (false ) when a warning is
encountered. |
void |
setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Custom header parameters as part of the request.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ImportRestApiRequest |
withBody(java.nio.ByteBuffer body)
The POST request body containing external API definitions.
|
ImportRestApiRequest |
withFailOnWarnings(java.lang.Boolean failOnWarnings)
A query parameter to indicate whether to rollback the API creation (
true ) or not (false ) when a warning is
encountered. |
ImportRestApiRequest |
withParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Custom header parameters as part of the request.
|
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
private java.lang.Boolean failOnWarnings
A query parameter to indicate whether to rollback the API creation (
true
) or not (false
) when a warning is
encountered. The default value is false
.
private java.util.Map<java.lang.String,java.lang.String> parameters
Custom header parameters as part of the request.
private java.nio.ByteBuffer body
The POST request body containing external API definitions. Currently, only Swagger definition JSON files are supported.
public void setFailOnWarnings(java.lang.Boolean failOnWarnings)
A query parameter to indicate whether to rollback the API creation (
true
) or not (false
) when a warning is
encountered. The default value is false
.
failOnWarnings
- A query parameter to indicate whether to rollback the API creation
(true
) or not (false
) when a warning is
encountered. The default value is false
.public java.lang.Boolean getFailOnWarnings()
A query parameter to indicate whether to rollback the API creation (
true
) or not (false
) when a warning is
encountered. The default value is false
.
true
) or not (false
) when a
warning is encountered. The default value is false
.public ImportRestApiRequest withFailOnWarnings(java.lang.Boolean failOnWarnings)
A query parameter to indicate whether to rollback the API creation (
true
) or not (false
) when a warning is
encountered. The default value is false
.
failOnWarnings
- A query parameter to indicate whether to rollback the API creation
(true
) or not (false
) when a warning is
encountered. The default value is false
.public java.lang.Boolean isFailOnWarnings()
A query parameter to indicate whether to rollback the API creation (
true
) or not (false
) when a warning is
encountered. The default value is false
.
true
) or not (false
) when a
warning is encountered. The default value is false
.public java.util.Map<java.lang.String,java.lang.String> getParameters()
Custom header parameters as part of the request.
public void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Custom header parameters as part of the request.
parameters
- Custom header parameters as part of the request.public ImportRestApiRequest withParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Custom header parameters as part of the request.
parameters
- Custom header parameters as part of the request.public ImportRestApiRequest addParametersEntry(java.lang.String key, java.lang.String value)
public ImportRestApiRequest clearParametersEntries()
public void setBody(java.nio.ByteBuffer body)
The POST request body containing external API definitions. Currently, only Swagger definition JSON files are supported.
AWS SDK for Java performs a Base64 encoding on this field before sending this request to AWS service by default. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
body
- The POST request body containing external API definitions.
Currently, only Swagger definition JSON files are supported.public java.nio.ByteBuffer getBody()
The POST request body containing external API definitions. Currently, only Swagger definition JSON files are supported.
ByteBuffer
s are stateful. Calling their get
methods
changes their position
. We recommend using
ByteBuffer.asReadOnlyBuffer()
to create a read-only view
of the buffer with an independent position
, and calling
get
methods on this rather than directly on the returned
ByteBuffer
. Doing so will ensure that anyone else using the
ByteBuffer
will not be affected by changes to the position
.
public ImportRestApiRequest withBody(java.nio.ByteBuffer body)
The POST request body containing external API definitions. Currently, only Swagger definition JSON files are supported.
body
- The POST request body containing external API definitions.
Currently, only Swagger definition JSON files are supported.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public ImportRestApiRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()