software.aws.awsprototypingsdk.cdkgraph.SGNode 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 node entity.
*/
@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.SGNode")
@software.amazon.jsii.Jsii.Proxy(SGNode.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface SGNode extends software.amazon.jsii.JsiiSerializable, software.aws.awsprototypingsdk.cdkgraph.SGEntity {
/**
* (experimental) Node id within parent (unique only between parent child nodes).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getId();
/**
* (experimental) Node type.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.cdkgraph.NodeTypeEnum getNodeType();
/**
* (experimental) Node path.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getPath();
/**
* (experimental) CloudFormation resource type for this node.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getCfnType() {
return null;
}
/**
* (experimental) Child node record.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.Map getChildren() {
return null;
}
/**
* (experimental) Synthesized construct information defining jii resolution data.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.aws.awsprototypingsdk.cdkgraph.ConstructInfo getConstructInfo() {
return null;
}
/**
* (experimental) List of edge UUIDs where this node is the source.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getEdges() {
return null;
}
/**
* (experimental) Logical id of the node, which is only unique within containing stack.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getLogicalId() {
return null;
}
/**
* (experimental) UUID of node parent.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getParent() {
return null;
}
/**
* (experimental) UUID of node stack.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getStack() {
return null;
}
/**
* @return a {@link Builder} of {@link SGNode}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link SGNode}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String id;
software.aws.awsprototypingsdk.cdkgraph.NodeTypeEnum nodeType;
java.lang.String path;
java.lang.String cfnType;
java.util.Map children;
software.aws.awsprototypingsdk.cdkgraph.ConstructInfo constructInfo;
java.util.List edges;
java.lang.String logicalId;
java.lang.String parent;
java.lang.String stack;
java.lang.String uuid;
java.util.Map attributes;
java.util.List flags;
java.util.List metadata;
java.util.Map tags;
/**
* Sets the value of {@link SGNode#getId}
* @param id Node id within parent (unique only between parent child nodes). This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder id(java.lang.String id) {
this.id = id;
return this;
}
/**
* Sets the value of {@link SGNode#getNodeType}
* @param nodeType Node type. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder nodeType(software.aws.awsprototypingsdk.cdkgraph.NodeTypeEnum nodeType) {
this.nodeType = nodeType;
return this;
}
/**
* Sets the value of {@link SGNode#getPath}
* @param path Node path. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder path(java.lang.String path) {
this.path = path;
return this;
}
/**
* Sets the value of {@link SGNode#getCfnType}
* @param cfnType CloudFormation resource type for this node.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder cfnType(java.lang.String cfnType) {
this.cfnType = cfnType;
return this;
}
/**
* Sets the value of {@link SGNode#getChildren}
* @param children Child node record.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder children(java.util.Map children) {
this.children = (java.util.Map)children;
return this;
}
/**
* Sets the value of {@link SGNode#getConstructInfo}
* @param constructInfo Synthesized construct information defining jii resolution data.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder constructInfo(software.aws.awsprototypingsdk.cdkgraph.ConstructInfo constructInfo) {
this.constructInfo = constructInfo;
return this;
}
/**
* Sets the value of {@link SGNode#getEdges}
* @param edges List of edge UUIDs where this node is the source.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder edges(java.util.List edges) {
this.edges = edges;
return this;
}
/**
* Sets the value of {@link SGNode#getLogicalId}
* @param logicalId Logical id of the node, which is only unique within containing stack.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder logicalId(java.lang.String logicalId) {
this.logicalId = logicalId;
return this;
}
/**
* Sets the value of {@link SGNode#getParent}
* @param parent UUID of node parent.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder parent(java.lang.String parent) {
this.parent = parent;
return this;
}
/**
* Sets the value of {@link SGNode#getStack}
* @param stack UUID of node stack.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder stack(java.lang.String stack) {
this.stack = stack;
return this;
}
/**
* Sets the value of {@link SGNode#getUuid}
* @param uuid Universally unique identity. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder uuid(java.lang.String uuid) {
this.uuid = uuid;
return this;
}
/**
* Sets the value of {@link SGNode#getAttributes}
* @param attributes Serializable entity attributes.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder attributes(java.util.Map attributes) {
this.attributes = (java.util.Map)attributes;
return this;
}
/**
* Sets the value of {@link SGNode#getFlags}
* @param flags Serializable entity flags.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder flags(java.util.List extends software.aws.awsprototypingsdk.cdkgraph.FlagEnum> flags) {
this.flags = (java.util.List)flags;
return this;
}
/**
* Sets the value of {@link SGNode#getMetadata}
* @param metadata Serializable entity metadata.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder metadata(java.util.List extends software.constructs.MetadataEntry> metadata) {
this.metadata = (java.util.List)metadata;
return this;
}
/**
* Sets the value of {@link SGNode#getTags}
* @param tags Serializable entity tags.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder tags(java.util.Map tags) {
this.tags = tags;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link SGNode}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public SGNode build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link SGNode}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SGNode {
private final java.lang.String id;
private final software.aws.awsprototypingsdk.cdkgraph.NodeTypeEnum nodeType;
private final java.lang.String path;
private final java.lang.String cfnType;
private final java.util.Map children;
private final software.aws.awsprototypingsdk.cdkgraph.ConstructInfo constructInfo;
private final java.util.List edges;
private final java.lang.String logicalId;
private final java.lang.String parent;
private final java.lang.String stack;
private final java.lang.String uuid;
private final java.util.Map attributes;
private final java.util.List flags;
private final java.util.List metadata;
private final java.util.Map tags;
/**
* 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.id = software.amazon.jsii.Kernel.get(this, "id", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.nodeType = software.amazon.jsii.Kernel.get(this, "nodeType", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.NodeTypeEnum.class));
this.path = software.amazon.jsii.Kernel.get(this, "path", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.cfnType = software.amazon.jsii.Kernel.get(this, "cfnType", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.children = software.amazon.jsii.Kernel.get(this, "children", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.SGNode.class)));
this.constructInfo = software.amazon.jsii.Kernel.get(this, "constructInfo", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.ConstructInfo.class));
this.edges = software.amazon.jsii.Kernel.get(this, "edges", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.logicalId = software.amazon.jsii.Kernel.get(this, "logicalId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.parent = software.amazon.jsii.Kernel.get(this, "parent", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.stack = software.amazon.jsii.Kernel.get(this, "stack", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.uuid = software.amazon.jsii.Kernel.get(this, "uuid", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.attributes = software.amazon.jsii.Kernel.get(this, "attributes", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)));
this.flags = software.amazon.jsii.Kernel.get(this, "flags", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.FlagEnum.class)));
this.metadata = software.amazon.jsii.Kernel.get(this, "metadata", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.constructs.MetadataEntry.class)));
this.tags = software.amazon.jsii.Kernel.get(this, "tags", 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}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.id = java.util.Objects.requireNonNull(builder.id, "id is required");
this.nodeType = java.util.Objects.requireNonNull(builder.nodeType, "nodeType is required");
this.path = java.util.Objects.requireNonNull(builder.path, "path is required");
this.cfnType = builder.cfnType;
this.children = (java.util.Map)builder.children;
this.constructInfo = builder.constructInfo;
this.edges = builder.edges;
this.logicalId = builder.logicalId;
this.parent = builder.parent;
this.stack = builder.stack;
this.uuid = java.util.Objects.requireNonNull(builder.uuid, "uuid is required");
this.attributes = (java.util.Map)builder.attributes;
this.flags = (java.util.List)builder.flags;
this.metadata = (java.util.List)builder.metadata;
this.tags = builder.tags;
}
@Override
public final java.lang.String getId() {
return this.id;
}
@Override
public final software.aws.awsprototypingsdk.cdkgraph.NodeTypeEnum getNodeType() {
return this.nodeType;
}
@Override
public final java.lang.String getPath() {
return this.path;
}
@Override
public final java.lang.String getCfnType() {
return this.cfnType;
}
@Override
public final java.util.Map getChildren() {
return this.children;
}
@Override
public final software.aws.awsprototypingsdk.cdkgraph.ConstructInfo getConstructInfo() {
return this.constructInfo;
}
@Override
public final java.util.List getEdges() {
return this.edges;
}
@Override
public final java.lang.String getLogicalId() {
return this.logicalId;
}
@Override
public final java.lang.String getParent() {
return this.parent;
}
@Override
public final java.lang.String getStack() {
return this.stack;
}
@Override
public final java.lang.String getUuid() {
return this.uuid;
}
@Override
public final java.util.Map getAttributes() {
return this.attributes;
}
@Override
public final java.util.List getFlags() {
return this.flags;
}
@Override
public final java.util.List getMetadata() {
return this.metadata;
}
@Override
public final java.util.Map getTags() {
return this.tags;
}
@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("id", om.valueToTree(this.getId()));
data.set("nodeType", om.valueToTree(this.getNodeType()));
data.set("path", om.valueToTree(this.getPath()));
if (this.getCfnType() != null) {
data.set("cfnType", om.valueToTree(this.getCfnType()));
}
if (this.getChildren() != null) {
data.set("children", om.valueToTree(this.getChildren()));
}
if (this.getConstructInfo() != null) {
data.set("constructInfo", om.valueToTree(this.getConstructInfo()));
}
if (this.getEdges() != null) {
data.set("edges", om.valueToTree(this.getEdges()));
}
if (this.getLogicalId() != null) {
data.set("logicalId", om.valueToTree(this.getLogicalId()));
}
if (this.getParent() != null) {
data.set("parent", om.valueToTree(this.getParent()));
}
if (this.getStack() != null) {
data.set("stack", om.valueToTree(this.getStack()));
}
data.set("uuid", om.valueToTree(this.getUuid()));
if (this.getAttributes() != null) {
data.set("attributes", om.valueToTree(this.getAttributes()));
}
if (this.getFlags() != null) {
data.set("flags", om.valueToTree(this.getFlags()));
}
if (this.getMetadata() != null) {
data.set("metadata", om.valueToTree(this.getMetadata()));
}
if (this.getTags() != null) {
data.set("tags", om.valueToTree(this.getTags()));
}
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.SGNode"));
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;
SGNode.Jsii$Proxy that = (SGNode.Jsii$Proxy) o;
if (!id.equals(that.id)) return false;
if (!nodeType.equals(that.nodeType)) return false;
if (!path.equals(that.path)) return false;
if (this.cfnType != null ? !this.cfnType.equals(that.cfnType) : that.cfnType != null) return false;
if (this.children != null ? !this.children.equals(that.children) : that.children != null) return false;
if (this.constructInfo != null ? !this.constructInfo.equals(that.constructInfo) : that.constructInfo != null) return false;
if (this.edges != null ? !this.edges.equals(that.edges) : that.edges != null) return false;
if (this.logicalId != null ? !this.logicalId.equals(that.logicalId) : that.logicalId != null) return false;
if (this.parent != null ? !this.parent.equals(that.parent) : that.parent != null) return false;
if (this.stack != null ? !this.stack.equals(that.stack) : that.stack != null) return false;
if (!uuid.equals(that.uuid)) return false;
if (this.attributes != null ? !this.attributes.equals(that.attributes) : that.attributes != null) return false;
if (this.flags != null ? !this.flags.equals(that.flags) : that.flags != null) return false;
if (this.metadata != null ? !this.metadata.equals(that.metadata) : that.metadata != null) return false;
return this.tags != null ? this.tags.equals(that.tags) : that.tags == null;
}
@Override
public final int hashCode() {
int result = this.id.hashCode();
result = 31 * result + (this.nodeType.hashCode());
result = 31 * result + (this.path.hashCode());
result = 31 * result + (this.cfnType != null ? this.cfnType.hashCode() : 0);
result = 31 * result + (this.children != null ? this.children.hashCode() : 0);
result = 31 * result + (this.constructInfo != null ? this.constructInfo.hashCode() : 0);
result = 31 * result + (this.edges != null ? this.edges.hashCode() : 0);
result = 31 * result + (this.logicalId != null ? this.logicalId.hashCode() : 0);
result = 31 * result + (this.parent != null ? this.parent.hashCode() : 0);
result = 31 * result + (this.stack != null ? this.stack.hashCode() : 0);
result = 31 * result + (this.uuid.hashCode());
result = 31 * result + (this.attributes != null ? this.attributes.hashCode() : 0);
result = 31 * result + (this.flags != null ? this.flags.hashCode() : 0);
result = 31 * result + (this.metadata != null ? this.metadata.hashCode() : 0);
result = 31 * result + (this.tags != null ? this.tags.hashCode() : 0);
return result;
}
}
}