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

com.github.mmuller88.cdkAlpsSpecRestApi.AlpsSpecRestApiProps Maven / Gradle / Ivy

There is a newer version: 0.1.10
Show newest version
package com.github.mmuller88.cdkAlpsSpecRestApi;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.16.0 (build 99a3413)", date = "2020-12-20T12:38:15.419Z")
@software.amazon.jsii.Jsii(module = com.github.mmuller88.cdkAlpsSpecRestApi.$Module.class, fqn = "cdk-alps-spec-rest-api.AlpsSpecRestApiProps")
@software.amazon.jsii.Jsii.Proxy(AlpsSpecRestApiProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface AlpsSpecRestApiProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * ALPS Spec File.
     * 

* Must be YAML. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull java.lang.String getAlpsSpecFile(); /** * Optional mapping from openApi spec operationId to Lambda name. *

* Per default it uses a Lambda integration with using the openApi spec operationId property as Lambda name */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.util.Map getOperationIdLambdaMapping() { return null; } /** * @return a {@link Builder} of {@link AlpsSpecRestApiProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link AlpsSpecRestApiProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { private java.lang.String alpsSpecFile; private java.util.Map operationIdLambdaMapping; /** * Sets the value of {@link AlpsSpecRestApiProps#getAlpsSpecFile} * @param alpsSpecFile ALPS Spec File. This parameter is required. * Must be YAML. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder alpsSpecFile(java.lang.String alpsSpecFile) { this.alpsSpecFile = alpsSpecFile; return this; } /** * Sets the value of {@link AlpsSpecRestApiProps#getOperationIdLambdaMapping} * @param operationIdLambdaMapping Optional mapping from openApi spec operationId to Lambda name. * Per default it uses a Lambda integration with using the openApi spec operationId property as Lambda name * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder operationIdLambdaMapping(java.util.Map operationIdLambdaMapping) { this.operationIdLambdaMapping = operationIdLambdaMapping; return this; } /** * Builds the configured instance. * @return a new instance of {@link AlpsSpecRestApiProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public AlpsSpecRestApiProps build() { return new Jsii$Proxy(alpsSpecFile, operationIdLambdaMapping); } } /** * An implementation for {@link AlpsSpecRestApiProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements AlpsSpecRestApiProps { private final java.lang.String alpsSpecFile; private final java.util.Map operationIdLambdaMapping; /** * 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.alpsSpecFile = software.amazon.jsii.Kernel.get(this, "alpsSpecFile", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.operationIdLambdaMapping = software.amazon.jsii.Kernel.get(this, "operationIdLambdaMapping", software.amazon.jsii.NativeType.mapOf(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 java.lang.String alpsSpecFile, final java.util.Map operationIdLambdaMapping) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.alpsSpecFile = java.util.Objects.requireNonNull(alpsSpecFile, "alpsSpecFile is required"); this.operationIdLambdaMapping = operationIdLambdaMapping; } @Override public final java.lang.String getAlpsSpecFile() { return this.alpsSpecFile; } @Override public final java.util.Map getOperationIdLambdaMapping() { return this.operationIdLambdaMapping; } @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("alpsSpecFile", om.valueToTree(this.getAlpsSpecFile())); if (this.getOperationIdLambdaMapping() != null) { data.set("operationIdLambdaMapping", om.valueToTree(this.getOperationIdLambdaMapping())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("cdk-alps-spec-rest-api.AlpsSpecRestApiProps")); 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; AlpsSpecRestApiProps.Jsii$Proxy that = (AlpsSpecRestApiProps.Jsii$Proxy) o; if (!alpsSpecFile.equals(that.alpsSpecFile)) return false; return this.operationIdLambdaMapping != null ? this.operationIdLambdaMapping.equals(that.operationIdLambdaMapping) : that.operationIdLambdaMapping == null; } @Override public final int hashCode() { int result = this.alpsSpecFile.hashCode(); result = 31 * result + (this.operationIdLambdaMapping != null ? this.operationIdLambdaMapping.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy