software.aws.awsprototypingsdk.openapigateway.SmithyMavenConfiguration Maven / Gradle / Ivy
Show all versions of open-api-gateway Show documentation
package software.aws.awsprototypingsdk.openapigateway;
/**
* (experimental) Configuration for smithy maven dependencies.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.82.0 (build 2d2ddd7)", date = "2023-08-15T05:38:04.790Z")
@software.amazon.jsii.Jsii(module = software.aws.awsprototypingsdk.openapigateway.$Module.class, fqn = "@aws-prototyping-sdk/open-api-gateway.SmithyMavenConfiguration")
@software.amazon.jsii.Jsii.Proxy(SmithyMavenConfiguration.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface SmithyMavenConfiguration extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) The dependencies used in the build.gradle and smithy-build.json files eg. software.amazon.smithy:smithy-validation-model:1.27.2 The following required dependencies are always added: - software.amazon.smithy:smithy-cli:1.27.2 - software.amazon.smithy:smithy-model:1.27.2 - software.amazon.smithy:smithy-openapi:1.27.2 - software.amazon.smithy:smithy-aws-traits:1.27.2 You can however override the version of these dependencies if required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getDependencies() {
return null;
}
/**
* (experimental) The repository urls used in the build.gradle and smithy-build.json files.
*
* Default: maven central and maven local
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getRepositoryUrls() {
return null;
}
/**
* @return a {@link Builder} of {@link SmithyMavenConfiguration}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link SmithyMavenConfiguration}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.util.List dependencies;
java.util.List repositoryUrls;
/**
* Sets the value of {@link SmithyMavenConfiguration#getDependencies}
* @param dependencies The dependencies used in the build.gradle and smithy-build.json files eg. software.amazon.smithy:smithy-validation-model:1.27.2 The following required dependencies are always added: - software.amazon.smithy:smithy-cli:1.27.2 - software.amazon.smithy:smithy-model:1.27.2 - software.amazon.smithy:smithy-openapi:1.27.2 - software.amazon.smithy:smithy-aws-traits:1.27.2 You can however override the version of these dependencies if required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder dependencies(java.util.List dependencies) {
this.dependencies = dependencies;
return this;
}
/**
* Sets the value of {@link SmithyMavenConfiguration#getRepositoryUrls}
* @param repositoryUrls The repository urls used in the build.gradle and smithy-build.json files.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder repositoryUrls(java.util.List repositoryUrls) {
this.repositoryUrls = repositoryUrls;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link SmithyMavenConfiguration}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public SmithyMavenConfiguration build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link SmithyMavenConfiguration}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SmithyMavenConfiguration {
private final java.util.List dependencies;
private final java.util.List repositoryUrls;
/**
* 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.dependencies = software.amazon.jsii.Kernel.get(this, "dependencies", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.repositoryUrls = software.amazon.jsii.Kernel.get(this, "repositoryUrls", software.amazon.jsii.NativeType.listOf(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.dependencies = builder.dependencies;
this.repositoryUrls = builder.repositoryUrls;
}
@Override
public final java.util.List getDependencies() {
return this.dependencies;
}
@Override
public final java.util.List getRepositoryUrls() {
return this.repositoryUrls;
}
@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.getDependencies() != null) {
data.set("dependencies", om.valueToTree(this.getDependencies()));
}
if (this.getRepositoryUrls() != null) {
data.set("repositoryUrls", om.valueToTree(this.getRepositoryUrls()));
}
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.SmithyMavenConfiguration"));
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;
SmithyMavenConfiguration.Jsii$Proxy that = (SmithyMavenConfiguration.Jsii$Proxy) o;
if (this.dependencies != null ? !this.dependencies.equals(that.dependencies) : that.dependencies != null) return false;
return this.repositoryUrls != null ? this.repositoryUrls.equals(that.repositoryUrls) : that.repositoryUrls == null;
}
@Override
public final int hashCode() {
int result = this.dependencies != null ? this.dependencies.hashCode() : 0;
result = 31 * result + (this.repositoryUrls != null ? this.repositoryUrls.hashCode() : 0);
return result;
}
}
}