All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.aws.awsprototypingsdk.openapigateway.ApiGatewayIntegrationResponse Maven / Gradle / Ivy

There is a newer version: 0.19.68
Show newest version
package software.aws.awsprototypingsdk.openapigateway;

/**
 * (experimental) API Gateway integration response.
 * 

* @see https://docs.aws.amazon.com/apigateway/latest/api/API_Integration.html */ @javax.annotation.Generated(value = "jsii-pacmak/1.82.0 (build 2d2ddd7)", date = "2023-08-15T05:38:04.560Z") @software.amazon.jsii.Jsii(module = software.aws.awsprototypingsdk.openapigateway.$Module.class, fqn = "@aws-prototyping-sdk/open-api-gateway.ApiGatewayIntegrationResponse") @software.amazon.jsii.Jsii.Proxy(ApiGatewayIntegrationResponse.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public interface ApiGatewayIntegrationResponse extends software.amazon.jsii.JsiiSerializable { /** * (experimental) Specifies parameter mappings for the response. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.util.Map getResponseParameters(); /** * (experimental) Specifies MIME type-specific mapping templates for the response’s payload. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.util.Map getResponseTemplates(); /** * (experimental) HTTP status code for the method response. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getStatusCode(); /** * (experimental) Response payload encoding conversion types. *

* 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 a * base64-decoded blob or passing through a binary payload natively without modification. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getContentHandling() { return null; } /** * @return a {@link Builder} of {@link ApiGatewayIntegrationResponse} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link ApiGatewayIntegrationResponse} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.util.Map responseParameters; java.util.Map responseTemplates; java.lang.String statusCode; java.lang.String contentHandling; /** * Sets the value of {@link ApiGatewayIntegrationResponse#getResponseParameters} * @param responseParameters Specifies parameter mappings for the response. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder responseParameters(java.util.Map responseParameters) { this.responseParameters = responseParameters; return this; } /** * Sets the value of {@link ApiGatewayIntegrationResponse#getResponseTemplates} * @param responseTemplates Specifies MIME type-specific mapping templates for the response’s payload. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder responseTemplates(java.util.Map responseTemplates) { this.responseTemplates = responseTemplates; return this; } /** * Sets the value of {@link ApiGatewayIntegrationResponse#getStatusCode} * @param statusCode HTTP status code for the method response. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder statusCode(java.lang.String statusCode) { this.statusCode = statusCode; return this; } /** * Sets the value of {@link ApiGatewayIntegrationResponse#getContentHandling} * @param contentHandling Response payload encoding conversion types. * 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 a * base64-decoded blob or passing through a binary payload natively without modification. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder contentHandling(java.lang.String contentHandling) { this.contentHandling = contentHandling; return this; } /** * Builds the configured instance. * @return a new instance of {@link ApiGatewayIntegrationResponse} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public ApiGatewayIntegrationResponse build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link ApiGatewayIntegrationResponse} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ApiGatewayIntegrationResponse { private final java.util.Map responseParameters; private final java.util.Map responseTemplates; private final java.lang.String statusCode; private final java.lang.String contentHandling; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.responseParameters = software.amazon.jsii.Kernel.get(this, "responseParameters", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); this.responseTemplates = software.amazon.jsii.Kernel.get(this, "responseTemplates", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); this.statusCode = software.amazon.jsii.Kernel.get(this, "statusCode", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.contentHandling = software.amazon.jsii.Kernel.get(this, "contentHandling", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.responseParameters = java.util.Objects.requireNonNull(builder.responseParameters, "responseParameters is required"); this.responseTemplates = java.util.Objects.requireNonNull(builder.responseTemplates, "responseTemplates is required"); this.statusCode = java.util.Objects.requireNonNull(builder.statusCode, "statusCode is required"); this.contentHandling = builder.contentHandling; } @Override public final java.util.Map getResponseParameters() { return this.responseParameters; } @Override public final java.util.Map getResponseTemplates() { return this.responseTemplates; } @Override public final java.lang.String getStatusCode() { return this.statusCode; } @Override public final java.lang.String getContentHandling() { return this.contentHandling; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("responseParameters", om.valueToTree(this.getResponseParameters())); data.set("responseTemplates", om.valueToTree(this.getResponseTemplates())); data.set("statusCode", om.valueToTree(this.getStatusCode())); if (this.getContentHandling() != null) { data.set("contentHandling", om.valueToTree(this.getContentHandling())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@aws-prototyping-sdk/open-api-gateway.ApiGatewayIntegrationResponse")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ApiGatewayIntegrationResponse.Jsii$Proxy that = (ApiGatewayIntegrationResponse.Jsii$Proxy) o; if (!responseParameters.equals(that.responseParameters)) return false; if (!responseTemplates.equals(that.responseTemplates)) return false; if (!statusCode.equals(that.statusCode)) return false; return this.contentHandling != null ? this.contentHandling.equals(that.contentHandling) : that.contentHandling == null; } @Override public final int hashCode() { int result = this.responseParameters.hashCode(); result = 31 * result + (this.responseTemplates.hashCode()); result = 31 * result + (this.statusCode.hashCode()); result = 31 * result + (this.contentHandling != null ? this.contentHandling.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy