public class PutRestApiRequest extends AmazonWebServiceRequest implements java.io.Serializable, java.lang.Cloneable
A PUT request to update an existing API, with external API definitions specified as the request body.
Modifier and Type | Field and Description |
---|---|
private java.nio.ByteBuffer |
body
The PUT request body containing external API definitions.
|
private java.lang.Boolean |
failOnWarnings
A query parameter to indicate whether to rollback the API update (
true ) or not (false ) when a warning is
encountered. |
private java.lang.String |
mode
The
mode query parameter to specify the update mode. |
private java.util.Map<java.lang.String,java.lang.String> |
parameters
Custom headers supplied as part of the request.
|
private java.lang.String |
restApiId
The identifier of the RestApi to be updated.
|
NOOP
Constructor and Description |
---|
PutRestApiRequest() |
Modifier and Type | Method and Description |
---|---|
PutRestApiRequest |
addParametersEntry(java.lang.String key,
java.lang.String value) |
PutRestApiRequest |
clearParametersEntries()
Removes all the entries added into Parameters.
|
PutRestApiRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(java.lang.Object obj) |
java.nio.ByteBuffer |
getBody()
The PUT request body containing external API definitions.
|
java.lang.Boolean |
getFailOnWarnings()
A query parameter to indicate whether to rollback the API update (
true ) or not (false ) when a warning is
encountered. |
java.lang.String |
getMode()
The
mode query parameter to specify the update mode. |
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
Custom headers supplied as part of the request.
|
java.lang.String |
getRestApiId()
The identifier of the RestApi to be updated.
|
int |
hashCode() |
java.lang.Boolean |
isFailOnWarnings()
A query parameter to indicate whether to rollback the API update (
true ) or not (false ) when a warning is
encountered. |
void |
setBody(java.nio.ByteBuffer body)
The PUT request body containing external API definitions.
|
void |
setFailOnWarnings(java.lang.Boolean failOnWarnings)
A query parameter to indicate whether to rollback the API update (
true ) or not (false ) when a warning is
encountered. |
void |
setMode(PutMode mode)
The
mode query parameter to specify the update mode. |
void |
setMode(java.lang.String mode)
The
mode query parameter to specify the update mode. |
void |
setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Custom headers supplied as part of the request.
|
void |
setRestApiId(java.lang.String restApiId)
The identifier of the RestApi to be updated.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
PutRestApiRequest |
withBody(java.nio.ByteBuffer body)
The PUT request body containing external API definitions.
|
PutRestApiRequest |
withFailOnWarnings(java.lang.Boolean failOnWarnings)
A query parameter to indicate whether to rollback the API update (
true ) or not (false ) when a warning is
encountered. |
PutRestApiRequest |
withMode(PutMode mode)
The
mode query parameter to specify the update mode. |
PutRestApiRequest |
withMode(java.lang.String mode)
The
mode query parameter to specify the update mode. |
PutRestApiRequest |
withParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Custom headers supplied as part of the request.
|
PutRestApiRequest |
withRestApiId(java.lang.String restApiId)
The identifier of the RestApi to be updated.
|
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.String restApiId
The identifier of the RestApi to be updated.
private java.lang.String mode
The mode
query parameter to specify the update mode. Valid
values are "merge" and "overwrite". By default, the update mode is
"merge".
private java.lang.Boolean failOnWarnings
A query parameter to indicate whether to rollback the API update (
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 headers supplied as part of the request.
private java.nio.ByteBuffer body
The PUT request body containing external API definitions. Currently, only Swagger definition JSON files are supported.
public void setRestApiId(java.lang.String restApiId)
The identifier of the RestApi to be updated.
restApiId
- The identifier of the RestApi to be updated.public java.lang.String getRestApiId()
The identifier of the RestApi to be updated.
public PutRestApiRequest withRestApiId(java.lang.String restApiId)
The identifier of the RestApi to be updated.
restApiId
- The identifier of the RestApi to be updated.public void setMode(java.lang.String mode)
The mode
query parameter to specify the update mode. Valid
values are "merge" and "overwrite". By default, the update mode is
"merge".
mode
- The mode
query parameter to specify the update mode.
Valid values are "merge" and "overwrite". By default, the update
mode is "merge".PutMode
public java.lang.String getMode()
The mode
query parameter to specify the update mode. Valid
values are "merge" and "overwrite". By default, the update mode is
"merge".
mode
query parameter to specify the update mode.
Valid values are "merge" and "overwrite". By default, the update
mode is "merge".PutMode
public PutRestApiRequest withMode(java.lang.String mode)
The mode
query parameter to specify the update mode. Valid
values are "merge" and "overwrite". By default, the update mode is
"merge".
mode
- The mode
query parameter to specify the update mode.
Valid values are "merge" and "overwrite". By default, the update
mode is "merge".PutMode
public void setMode(PutMode mode)
The mode
query parameter to specify the update mode. Valid
values are "merge" and "overwrite". By default, the update mode is
"merge".
mode
- The mode
query parameter to specify the update mode.
Valid values are "merge" and "overwrite". By default, the update
mode is "merge".PutMode
public PutRestApiRequest withMode(PutMode mode)
The mode
query parameter to specify the update mode. Valid
values are "merge" and "overwrite". By default, the update mode is
"merge".
mode
- The mode
query parameter to specify the update mode.
Valid values are "merge" and "overwrite". By default, the update
mode is "merge".PutMode
public void setFailOnWarnings(java.lang.Boolean failOnWarnings)
A query parameter to indicate whether to rollback the API update (
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 update (
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 update (
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 PutRestApiRequest withFailOnWarnings(java.lang.Boolean failOnWarnings)
A query parameter to indicate whether to rollback the API update (
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 update (
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 update (
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 headers supplied as part of the request.
public void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Custom headers supplied as part of the request.
parameters
- Custom headers supplied as part of the request.public PutRestApiRequest withParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Custom headers supplied as part of the request.
parameters
- Custom headers supplied as part of the request.public PutRestApiRequest addParametersEntry(java.lang.String key, java.lang.String value)
public PutRestApiRequest clearParametersEntries()
public void setBody(java.nio.ByteBuffer body)
The PUT 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 PUT request body containing external API definitions.
Currently, only Swagger definition JSON files are supported.public java.nio.ByteBuffer getBody()
The PUT 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 PutRestApiRequest withBody(java.nio.ByteBuffer body)
The PUT request body containing external API definitions. Currently, only Swagger definition JSON files are supported.
body
- The PUT 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 PutRestApiRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()