Class IntegrationResponse

java.lang.Object
software.amazon.smithy.aws.apigateway.traits.IntegrationResponse
All Implemented Interfaces:
ToNode, ToSmithyBuilder<IntegrationResponse>

public final class IntegrationResponse extends Object implements ToNode, ToSmithyBuilder<IntegrationResponse>
An API Gateway integration response object.
See Also:
  • Method Details

    • builder

      public static IntegrationResponse.Builder builder()
      Creates a builder used to build an IntegrationResponse.
      Returns:
      Returns the created builder.
    • getStatusCode

      public String getStatusCode()
      Gets the status code of the response.
      Returns:
      Returns the status code.
    • getContentHandling

      public Optional<String> getContentHandling()
      Gets the response payload content handling type.

      Valid values are 1) CONVERT_TO_TEXT, for converting a binary payload into a Base64-encoded string or converting a text payload into a utf-8-encoded string or passing through the text payload natively without modification, and 2) CONVERT_TO_BINARY, for converting a text payload into Base64-decoded blob or passing through a binary payload natively without modification.

      Returns:
      Returns the content handling type.
    • getResponseTemplates

      public Map<String,String> getResponseTemplates()
      Gets a map of MIME types to mapping templates for the response payload.
      Returns:
      Returns the immutable map.
    • getResponseTemplate

      public Optional<String> getResponseTemplate(String mimeType)
      Gets a specific response template by MIME type.
      Parameters:
      mimeType - Response template MIME type.
      Returns:
      Returns the optionally found response template.
    • getResponseParameters

      public Map<String,String> getResponseParameters()
      Gets response parameters.
      Returns:
      Returns the map of parameter expressions to how they modify the response.
      See Also:
    • getResponseParameter

      public Optional<String> getResponseParameter(String name)
      Gets a specific response parameter by it's input mapping expression.
      Parameters:
      name - Header name to retrieve.
      Returns:
      Returns the optionally found response parameter.
    • toBuilder

      public IntegrationResponse.Builder toBuilder()
      Description copied from interface: ToSmithyBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToSmithyBuilder<IntegrationResponse>
      Returns:
      a builder for type T
    • toNode

      public Node toNode()
      Description copied from interface: ToNode
      Converts a value to a Node.
      Specified by:
      toNode in interface ToNode
      Returns:
      Returns the creates Node.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object