Class PutRestApiRequest
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceRequest
-
- com.amazonaws.services.apigateway.model.PutRestApiRequest
-
- All Implemented Interfaces:
ReadLimitInfo,Serializable,Cloneable
public class PutRestApiRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
A PUT request to update an existing API, with external API definitions specified as the request body.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
-
Constructor Summary
Constructors Constructor Description PutRestApiRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PutRestApiRequestaddParametersEntry(String key, String value)PutRestApiRequestclearParametersEntries()Removes all the entries added into Parameters.PutRestApiRequestclone()Creates a shallow clone of this request.booleanequals(Object obj)ByteBuffergetBody()The PUT request body containing external API definitions.BooleangetFailOnWarnings()A query parameter to indicate whether to rollback the API update (true) or not (false) when a warning is encountered.StringgetMode()Themodequery parameter to specify the update mode.Map<String,String>getParameters()Custom headers supplied as part of the request.StringgetRestApiId()The identifier of the RestApi to be updated.inthashCode()BooleanisFailOnWarnings()A query parameter to indicate whether to rollback the API update (true) or not (false) when a warning is encountered.voidsetBody(ByteBuffer body)The PUT request body containing external API definitions.voidsetFailOnWarnings(Boolean failOnWarnings)A query parameter to indicate whether to rollback the API update (true) or not (false) when a warning is encountered.voidsetMode(PutMode mode)Themodequery parameter to specify the update mode.voidsetMode(String mode)Themodequery parameter to specify the update mode.voidsetParameters(Map<String,String> parameters)Custom headers supplied as part of the request.voidsetRestApiId(String restApiId)The identifier of the RestApi to be updated.StringtoString()Returns a string representation of this object; useful for testing and debugging.PutRestApiRequestwithBody(ByteBuffer body)The PUT request body containing external API definitions.PutRestApiRequestwithFailOnWarnings(Boolean failOnWarnings)A query parameter to indicate whether to rollback the API update (true) or not (false) when a warning is encountered.PutRestApiRequestwithMode(PutMode mode)Themodequery parameter to specify the update mode.PutRestApiRequestwithMode(String mode)Themodequery parameter to specify the update mode.PutRestApiRequestwithParameters(Map<String,String> parameters)Custom headers supplied as part of the request.PutRestApiRequestwithRestApiId(String restApiId)The identifier of the RestApi to be updated.-
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
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
-
-
-
-
Method Detail
-
setRestApiId
public void setRestApiId(String restApiId)
The identifier of the RestApi to be updated.
- Parameters:
restApiId- The identifier of the RestApi to be updated.
-
getRestApiId
public String getRestApiId()
The identifier of the RestApi to be updated.
- Returns:
- The identifier of the RestApi to be updated.
-
withRestApiId
public PutRestApiRequest withRestApiId(String restApiId)
The identifier of the RestApi to be updated.
- Parameters:
restApiId- The identifier of the RestApi to be updated.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMode
public void setMode(String mode)
The
modequery parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".- Parameters:
mode- Themodequery parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".- See Also:
PutMode
-
getMode
public String getMode()
The
modequery parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".- Returns:
- The
modequery parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge". - See Also:
PutMode
-
withMode
public PutRestApiRequest withMode(String mode)
The
modequery parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".- Parameters:
mode- Themodequery parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
PutMode
-
setMode
public void setMode(PutMode mode)
The
modequery parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".- Parameters:
mode- Themodequery parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".- See Also:
PutMode
-
withMode
public PutRestApiRequest withMode(PutMode mode)
The
modequery parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".- Parameters:
mode- Themodequery parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
PutMode
-
setFailOnWarnings
public void setFailOnWarnings(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 isfalse.- Parameters:
failOnWarnings- A query parameter to indicate whether to rollback the API update (true) or not (false) when a warning is encountered. The default value isfalse.
-
getFailOnWarnings
public 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 isfalse.- Returns:
- A query parameter to indicate whether to rollback the API update
(
true) or not (false) when a warning is encountered. The default value isfalse.
-
withFailOnWarnings
public PutRestApiRequest withFailOnWarnings(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 isfalse.- Parameters:
failOnWarnings- A query parameter to indicate whether to rollback the API update (true) or not (false) when a warning is encountered. The default value isfalse.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isFailOnWarnings
public 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 isfalse.- Returns:
- A query parameter to indicate whether to rollback the API update
(
true) or not (false) when a warning is encountered. The default value isfalse.
-
getParameters
public Map<String,String> getParameters()
Custom headers supplied as part of the request.
- Returns:
- Custom headers supplied as part of the request.
-
setParameters
public void setParameters(Map<String,String> parameters)
Custom headers supplied as part of the request.
- Parameters:
parameters- Custom headers supplied as part of the request.
-
withParameters
public PutRestApiRequest withParameters(Map<String,String> parameters)
Custom headers supplied as part of the request.
- Parameters:
parameters- Custom headers supplied as part of the request.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
addParametersEntry
public PutRestApiRequest addParametersEntry(String key, String value)
-
clearParametersEntries
public PutRestApiRequest clearParametersEntries()
Removes all the entries added into Parameters. <p> Returns a reference to this object so that method calls can be chained together.
-
setBody
public void setBody(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.
- Parameters:
body- The PUT request body containing external API definitions. Currently, only Swagger definition JSON files are supported.
-
getBody
public ByteBuffer getBody()
The PUT request body containing external API definitions. Currently, only Swagger definition JSON files are supported.
ByteBuffers are stateful. Calling theirgetmethods changes theirposition. We recommend usingByteBuffer.asReadOnlyBuffer()to create a read-only view of the buffer with an independentposition, and callinggetmethods on this rather than directly on the returnedByteBuffer. Doing so will ensure that anyone else using theByteBufferwill not be affected by changes to theposition.- Returns:
- The PUT request body containing external API definitions. Currently, only Swagger definition JSON files are supported.
-
withBody
public PutRestApiRequest withBody(ByteBuffer body)
The PUT request body containing external API definitions. Currently, only Swagger definition JSON files are supported.
- Parameters:
body- The PUT request body containing external API definitions. Currently, only Swagger definition JSON files are supported.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public PutRestApiRequest clone()
Description copied from class:AmazonWebServiceRequestCreates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clonein classAmazonWebServiceRequest- See Also:
Object.clone()
-
-