com.github.mmuller88.alpsUnifiedTs.AlpsDef Maven / Gradle / Ivy
package com.github.mmuller88.alpsUnifiedTs;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.16.0 (build 99a3413)", date = "2020-12-19T21:27:37.743Z")
@software.amazon.jsii.Jsii(module = com.github.mmuller88.alpsUnifiedTs.$Module.class, fqn = "alps-unified-ts.AlpsDef")
@software.amazon.jsii.Jsii.Proxy(AlpsDef.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface AlpsDef extends software.amazon.jsii.JsiiSerializable {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.util.List getDescriptor();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull com.github.mmuller88.alpsUnifiedTs.DocDef getDoc();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.util.List getExt();
/**
* can be any string e.g.: 1.0.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getVersion();
/**
* @return a {@link Builder} of {@link AlpsDef}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link AlpsDef}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
private java.util.List descriptor;
private com.github.mmuller88.alpsUnifiedTs.DocDef doc;
private java.util.List ext;
private java.lang.String version;
/**
* Sets the value of {@link AlpsDef#getDescriptor}
* @param descriptor the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder descriptor(java.util.List extends com.github.mmuller88.alpsUnifiedTs.DescriptorDef> descriptor) {
this.descriptor = (java.util.List)descriptor;
return this;
}
/**
* Sets the value of {@link AlpsDef#getDoc}
* @param doc the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder doc(com.github.mmuller88.alpsUnifiedTs.DocDef doc) {
this.doc = doc;
return this;
}
/**
* Sets the value of {@link AlpsDef#getExt}
* @param ext the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder ext(java.util.List extends com.github.mmuller88.alpsUnifiedTs.ExtDef> ext) {
this.ext = (java.util.List)ext;
return this;
}
/**
* Sets the value of {@link AlpsDef#getVersion}
* @param version can be any string e.g.: 1.0. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder version(java.lang.String version) {
this.version = version;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link AlpsDef}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public AlpsDef build() {
return new Jsii$Proxy(descriptor, doc, ext, version);
}
}
/**
* An implementation for {@link AlpsDef}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements AlpsDef {
private final java.util.List descriptor;
private final com.github.mmuller88.alpsUnifiedTs.DocDef doc;
private final java.util.List ext;
private final java.lang.String version;
/**
* 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.descriptor = software.amazon.jsii.Kernel.get(this, "descriptor", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.github.mmuller88.alpsUnifiedTs.DescriptorDef.class)));
this.doc = software.amazon.jsii.Kernel.get(this, "doc", software.amazon.jsii.NativeType.forClass(com.github.mmuller88.alpsUnifiedTs.DocDef.class));
this.ext = software.amazon.jsii.Kernel.get(this, "ext", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.github.mmuller88.alpsUnifiedTs.ExtDef.class)));
this.version = software.amazon.jsii.Kernel.get(this, "version", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final java.util.List extends com.github.mmuller88.alpsUnifiedTs.DescriptorDef> descriptor, final com.github.mmuller88.alpsUnifiedTs.DocDef doc, final java.util.List extends com.github.mmuller88.alpsUnifiedTs.ExtDef> ext, final java.lang.String version) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.descriptor = (java.util.List)java.util.Objects.requireNonNull(descriptor, "descriptor is required");
this.doc = java.util.Objects.requireNonNull(doc, "doc is required");
this.ext = (java.util.List)java.util.Objects.requireNonNull(ext, "ext is required");
this.version = java.util.Objects.requireNonNull(version, "version is required");
}
@Override
public final java.util.List getDescriptor() {
return this.descriptor;
}
@Override
public final com.github.mmuller88.alpsUnifiedTs.DocDef getDoc() {
return this.doc;
}
@Override
public final java.util.List getExt() {
return this.ext;
}
@Override
public final java.lang.String getVersion() {
return this.version;
}
@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("descriptor", om.valueToTree(this.getDescriptor()));
data.set("doc", om.valueToTree(this.getDoc()));
data.set("ext", om.valueToTree(this.getExt()));
data.set("version", om.valueToTree(this.getVersion()));
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("alps-unified-ts.AlpsDef"));
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;
AlpsDef.Jsii$Proxy that = (AlpsDef.Jsii$Proxy) o;
if (!descriptor.equals(that.descriptor)) return false;
if (!doc.equals(that.doc)) return false;
if (!ext.equals(that.ext)) return false;
return this.version.equals(that.version);
}
@Override
public final int hashCode() {
int result = this.descriptor.hashCode();
result = 31 * result + (this.doc.hashCode());
result = 31 * result + (this.ext.hashCode());
result = 31 * result + (this.version.hashCode());
return result;
}
}
}