software.aws.awsprototypingsdk.cdkgraph.SGGraphStore Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cdk-graph Show documentation
Show all versions of cdk-graph Show documentation
@aws-prototyping-sdk/cdk-graph
package software.aws.awsprototypingsdk.cdkgraph;
/**
* (experimental) Serializable graph store.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.82.0 (build 2d2ddd7)", date = "2023-08-15T05:45:13.822Z")
@software.amazon.jsii.Jsii(module = software.aws.awsprototypingsdk.cdkgraph.$Module.class, fqn = "@aws-prototyping-sdk/cdk-graph.SGGraphStore")
@software.amazon.jsii.Jsii.Proxy(SGGraphStore.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface SGGraphStore extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) List of edges.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.util.List getEdges();
/**
* (experimental) Node tree.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.cdkgraph.SGNode getTree();
/**
* (experimental) Store version.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getVersion();
/**
* @return a {@link Builder} of {@link SGGraphStore}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link SGGraphStore}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.util.List edges;
software.aws.awsprototypingsdk.cdkgraph.SGNode tree;
java.lang.String version;
/**
* Sets the value of {@link SGGraphStore#getEdges}
* @param edges List of edges. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder edges(java.util.List extends software.aws.awsprototypingsdk.cdkgraph.SGEdge> edges) {
this.edges = (java.util.List)edges;
return this;
}
/**
* Sets the value of {@link SGGraphStore#getTree}
* @param tree Node tree. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder tree(software.aws.awsprototypingsdk.cdkgraph.SGNode tree) {
this.tree = tree;
return this;
}
/**
* Sets the value of {@link SGGraphStore#getVersion}
* @param version Store version. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder version(java.lang.String version) {
this.version = version;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link SGGraphStore}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public SGGraphStore build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link SGGraphStore}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SGGraphStore {
private final java.util.List edges;
private final software.aws.awsprototypingsdk.cdkgraph.SGNode tree;
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.edges = software.amazon.jsii.Kernel.get(this, "edges", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.SGEdge.class)));
this.tree = software.amazon.jsii.Kernel.get(this, "tree", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.SGNode.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 Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.edges = (java.util.List)java.util.Objects.requireNonNull(builder.edges, "edges is required");
this.tree = java.util.Objects.requireNonNull(builder.tree, "tree is required");
this.version = java.util.Objects.requireNonNull(builder.version, "version is required");
}
@Override
public final java.util.List getEdges() {
return this.edges;
}
@Override
public final software.aws.awsprototypingsdk.cdkgraph.SGNode getTree() {
return this.tree;
}
@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("edges", om.valueToTree(this.getEdges()));
data.set("tree", om.valueToTree(this.getTree()));
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("@aws-prototyping-sdk/cdk-graph.SGGraphStore"));
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;
SGGraphStore.Jsii$Proxy that = (SGGraphStore.Jsii$Proxy) o;
if (!edges.equals(that.edges)) return false;
if (!tree.equals(that.tree)) return false;
return this.version.equals(that.version);
}
@Override
public final int hashCode() {
int result = this.edges.hashCode();
result = 31 * result + (this.tree.hashCode());
result = 31 * result + (this.version.hashCode());
return result;
}
}
}