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

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

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

/**
 * (experimental) Options common to all open api gateway projects.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.82.0 (build 2d2ddd7)", date = "2023-08-15T05:38:04.596Z")
@software.amazon.jsii.Jsii(module = software.aws.awsprototypingsdk.openapigateway.$Module.class, fqn = "@aws-prototyping-sdk/open-api-gateway.OpenApiGatewayProjectOptions")
@software.amazon.jsii.Jsii.Proxy(OpenApiGatewayProjectOptions.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface OpenApiGatewayProjectOptions extends software.amazon.jsii.JsiiSerializable, software.aws.awsprototypingsdk.openapigateway.CommonApiProjectOptions {

    /**
     * (experimental) The path to the OpenAPI specification file, relative to the project source directory (srcdir).
     * 

* Default: "spec/spec.yaml" */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getSpecFile() { return null; } /** * @return a {@link Builder} of {@link OpenApiGatewayProjectOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link OpenApiGatewayProjectOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.lang.String specFile; java.util.List clientLanguages; java.lang.String apiSrcDir; java.util.List documentationFormats; java.lang.Boolean forceGenerateCodeAndDocs; java.lang.String generatedCodeDir; io.github.cdklabs.projen.java.JavaProjectOptions javaClientOptions; java.lang.String parsedSpecFileName; io.github.cdklabs.projen.python.PythonProjectOptions pythonClientOptions; io.github.cdklabs.projen.typescript.TypeScriptProjectOptions typescriptClientOptions; /** * Sets the value of {@link OpenApiGatewayProjectOptions#getSpecFile} * @param specFile The path to the OpenAPI specification file, relative to the project source directory (srcdir). * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder specFile(java.lang.String specFile) { this.specFile = specFile; return this; } /** * Sets the value of {@link OpenApiGatewayProjectOptions#getClientLanguages} * @param clientLanguages The list of languages for which clients will be generated. This parameter is required. * A typescript client will always be generated. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder clientLanguages(java.util.List clientLanguages) { this.clientLanguages = (java.util.List)clientLanguages; return this; } /** * Sets the value of {@link OpenApiGatewayProjectOptions#getApiSrcDir} * @param apiSrcDir The directory in which the api generated code will reside, relative to the project srcdir. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder apiSrcDir(java.lang.String apiSrcDir) { this.apiSrcDir = apiSrcDir; return this; } /** * Sets the value of {@link OpenApiGatewayProjectOptions#getDocumentationFormats} * @param documentationFormats Formats to generate documentation in. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder documentationFormats(java.util.List documentationFormats) { this.documentationFormats = (java.util.List)documentationFormats; return this; } /** * Sets the value of {@link OpenApiGatewayProjectOptions#getForceGenerateCodeAndDocs} * @param forceGenerateCodeAndDocs Force to generate code and docs even if there were no changes in spec. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder forceGenerateCodeAndDocs(java.lang.Boolean forceGenerateCodeAndDocs) { this.forceGenerateCodeAndDocs = forceGenerateCodeAndDocs; return this; } /** * Sets the value of {@link OpenApiGatewayProjectOptions#getGeneratedCodeDir} * @param generatedCodeDir The directory in which generated client code will be generated, relative to the outdir of this project. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder generatedCodeDir(java.lang.String generatedCodeDir) { this.generatedCodeDir = generatedCodeDir; return this; } /** * Sets the value of {@link OpenApiGatewayProjectOptions#getJavaClientOptions} * @param javaClientOptions Options for the generated java client (if specified in clientLanguages). * These override the default inferred options. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder javaClientOptions(io.github.cdklabs.projen.java.JavaProjectOptions javaClientOptions) { this.javaClientOptions = javaClientOptions; return this; } /** * Sets the value of {@link OpenApiGatewayProjectOptions#getParsedSpecFileName} * @param parsedSpecFileName The name of the output parsed OpenAPI specification file. * Must end with .json. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder parsedSpecFileName(java.lang.String parsedSpecFileName) { this.parsedSpecFileName = parsedSpecFileName; return this; } /** * Sets the value of {@link OpenApiGatewayProjectOptions#getPythonClientOptions} * @param pythonClientOptions Options for the generated python client (if specified in clientLanguages). * These override the default inferred options. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder pythonClientOptions(io.github.cdklabs.projen.python.PythonProjectOptions pythonClientOptions) { this.pythonClientOptions = pythonClientOptions; return this; } /** * Sets the value of {@link OpenApiGatewayProjectOptions#getTypescriptClientOptions} * @param typescriptClientOptions Options for the generated typescript client. * These override the default inferred options. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder typescriptClientOptions(io.github.cdklabs.projen.typescript.TypeScriptProjectOptions typescriptClientOptions) { this.typescriptClientOptions = typescriptClientOptions; return this; } /** * Builds the configured instance. * @return a new instance of {@link OpenApiGatewayProjectOptions} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public OpenApiGatewayProjectOptions build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link OpenApiGatewayProjectOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements OpenApiGatewayProjectOptions { private final java.lang.String specFile; private final java.util.List clientLanguages; private final java.lang.String apiSrcDir; private final java.util.List documentationFormats; private final java.lang.Boolean forceGenerateCodeAndDocs; private final java.lang.String generatedCodeDir; private final io.github.cdklabs.projen.java.JavaProjectOptions javaClientOptions; private final java.lang.String parsedSpecFileName; private final io.github.cdklabs.projen.python.PythonProjectOptions pythonClientOptions; private final io.github.cdklabs.projen.typescript.TypeScriptProjectOptions typescriptClientOptions; /** * 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.specFile = software.amazon.jsii.Kernel.get(this, "specFile", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.clientLanguages = software.amazon.jsii.Kernel.get(this, "clientLanguages", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.openapigateway.ClientLanguage.class))); this.apiSrcDir = software.amazon.jsii.Kernel.get(this, "apiSrcDir", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.documentationFormats = software.amazon.jsii.Kernel.get(this, "documentationFormats", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.openapigateway.DocumentationFormat.class))); this.forceGenerateCodeAndDocs = software.amazon.jsii.Kernel.get(this, "forceGenerateCodeAndDocs", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.generatedCodeDir = software.amazon.jsii.Kernel.get(this, "generatedCodeDir", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.javaClientOptions = software.amazon.jsii.Kernel.get(this, "javaClientOptions", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.projen.java.JavaProjectOptions.class)); this.parsedSpecFileName = software.amazon.jsii.Kernel.get(this, "parsedSpecFileName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.pythonClientOptions = software.amazon.jsii.Kernel.get(this, "pythonClientOptions", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.projen.python.PythonProjectOptions.class)); this.typescriptClientOptions = software.amazon.jsii.Kernel.get(this, "typescriptClientOptions", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.projen.typescript.TypeScriptProjectOptions.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ @SuppressWarnings("unchecked") protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.specFile = builder.specFile; this.clientLanguages = (java.util.List)java.util.Objects.requireNonNull(builder.clientLanguages, "clientLanguages is required"); this.apiSrcDir = builder.apiSrcDir; this.documentationFormats = (java.util.List)builder.documentationFormats; this.forceGenerateCodeAndDocs = builder.forceGenerateCodeAndDocs; this.generatedCodeDir = builder.generatedCodeDir; this.javaClientOptions = builder.javaClientOptions; this.parsedSpecFileName = builder.parsedSpecFileName; this.pythonClientOptions = builder.pythonClientOptions; this.typescriptClientOptions = builder.typescriptClientOptions; } @Override public final java.lang.String getSpecFile() { return this.specFile; } @Override public final java.util.List getClientLanguages() { return this.clientLanguages; } @Override public final java.lang.String getApiSrcDir() { return this.apiSrcDir; } @Override public final java.util.List getDocumentationFormats() { return this.documentationFormats; } @Override public final java.lang.Boolean getForceGenerateCodeAndDocs() { return this.forceGenerateCodeAndDocs; } @Override public final java.lang.String getGeneratedCodeDir() { return this.generatedCodeDir; } @Override public final io.github.cdklabs.projen.java.JavaProjectOptions getJavaClientOptions() { return this.javaClientOptions; } @Override public final java.lang.String getParsedSpecFileName() { return this.parsedSpecFileName; } @Override public final io.github.cdklabs.projen.python.PythonProjectOptions getPythonClientOptions() { return this.pythonClientOptions; } @Override public final io.github.cdklabs.projen.typescript.TypeScriptProjectOptions getTypescriptClientOptions() { return this.typescriptClientOptions; } @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(); if (this.getSpecFile() != null) { data.set("specFile", om.valueToTree(this.getSpecFile())); } data.set("clientLanguages", om.valueToTree(this.getClientLanguages())); if (this.getApiSrcDir() != null) { data.set("apiSrcDir", om.valueToTree(this.getApiSrcDir())); } if (this.getDocumentationFormats() != null) { data.set("documentationFormats", om.valueToTree(this.getDocumentationFormats())); } if (this.getForceGenerateCodeAndDocs() != null) { data.set("forceGenerateCodeAndDocs", om.valueToTree(this.getForceGenerateCodeAndDocs())); } if (this.getGeneratedCodeDir() != null) { data.set("generatedCodeDir", om.valueToTree(this.getGeneratedCodeDir())); } if (this.getJavaClientOptions() != null) { data.set("javaClientOptions", om.valueToTree(this.getJavaClientOptions())); } if (this.getParsedSpecFileName() != null) { data.set("parsedSpecFileName", om.valueToTree(this.getParsedSpecFileName())); } if (this.getPythonClientOptions() != null) { data.set("pythonClientOptions", om.valueToTree(this.getPythonClientOptions())); } if (this.getTypescriptClientOptions() != null) { data.set("typescriptClientOptions", om.valueToTree(this.getTypescriptClientOptions())); } 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.OpenApiGatewayProjectOptions")); 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; OpenApiGatewayProjectOptions.Jsii$Proxy that = (OpenApiGatewayProjectOptions.Jsii$Proxy) o; if (this.specFile != null ? !this.specFile.equals(that.specFile) : that.specFile != null) return false; if (!clientLanguages.equals(that.clientLanguages)) return false; if (this.apiSrcDir != null ? !this.apiSrcDir.equals(that.apiSrcDir) : that.apiSrcDir != null) return false; if (this.documentationFormats != null ? !this.documentationFormats.equals(that.documentationFormats) : that.documentationFormats != null) return false; if (this.forceGenerateCodeAndDocs != null ? !this.forceGenerateCodeAndDocs.equals(that.forceGenerateCodeAndDocs) : that.forceGenerateCodeAndDocs != null) return false; if (this.generatedCodeDir != null ? !this.generatedCodeDir.equals(that.generatedCodeDir) : that.generatedCodeDir != null) return false; if (this.javaClientOptions != null ? !this.javaClientOptions.equals(that.javaClientOptions) : that.javaClientOptions != null) return false; if (this.parsedSpecFileName != null ? !this.parsedSpecFileName.equals(that.parsedSpecFileName) : that.parsedSpecFileName != null) return false; if (this.pythonClientOptions != null ? !this.pythonClientOptions.equals(that.pythonClientOptions) : that.pythonClientOptions != null) return false; return this.typescriptClientOptions != null ? this.typescriptClientOptions.equals(that.typescriptClientOptions) : that.typescriptClientOptions == null; } @Override public final int hashCode() { int result = this.specFile != null ? this.specFile.hashCode() : 0; result = 31 * result + (this.clientLanguages.hashCode()); result = 31 * result + (this.apiSrcDir != null ? this.apiSrcDir.hashCode() : 0); result = 31 * result + (this.documentationFormats != null ? this.documentationFormats.hashCode() : 0); result = 31 * result + (this.forceGenerateCodeAndDocs != null ? this.forceGenerateCodeAndDocs.hashCode() : 0); result = 31 * result + (this.generatedCodeDir != null ? this.generatedCodeDir.hashCode() : 0); result = 31 * result + (this.javaClientOptions != null ? this.javaClientOptions.hashCode() : 0); result = 31 * result + (this.parsedSpecFileName != null ? this.parsedSpecFileName.hashCode() : 0); result = 31 * result + (this.pythonClientOptions != null ? this.pythonClientOptions.hashCode() : 0); result = 31 * result + (this.typescriptClientOptions != null ? this.typescriptClientOptions.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy