software.aws.awsprototypingsdk.cdkgraph.SGUnresolvedReference Maven / Gradle / Ivy
Show all versions of cdk-graph Show documentation
package software.aws.awsprototypingsdk.cdkgraph;
/**
* (experimental) Unresolved reference struct.
*
* During graph computation references are unresolved and stored in this struct.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.82.0 (build 2d2ddd7)", date = "2023-08-15T05:45:13.823Z")
@software.amazon.jsii.Jsii(module = software.aws.awsprototypingsdk.cdkgraph.$Module.class, fqn = "@aws-prototyping-sdk/cdk-graph.SGUnresolvedReference")
@software.amazon.jsii.Jsii.Proxy(SGUnresolvedReference.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface SGUnresolvedReference extends software.amazon.jsii.JsiiSerializable {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.aws.awsprototypingsdk.cdkgraph.ReferenceTypeEnum getReferenceType();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getSource();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getTarget();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Object getValue() {
return null;
}
/**
* @return a {@link Builder} of {@link SGUnresolvedReference}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link SGUnresolvedReference}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
software.aws.awsprototypingsdk.cdkgraph.ReferenceTypeEnum referenceType;
java.lang.String source;
java.lang.String target;
java.lang.Object value;
/**
* Sets the value of {@link SGUnresolvedReference#getReferenceType}
* @param referenceType the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder referenceType(software.aws.awsprototypingsdk.cdkgraph.ReferenceTypeEnum referenceType) {
this.referenceType = referenceType;
return this;
}
/**
* Sets the value of {@link SGUnresolvedReference#getSource}
* @param source the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder source(java.lang.String source) {
this.source = source;
return this;
}
/**
* Sets the value of {@link SGUnresolvedReference#getTarget}
* @param target the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder target(java.lang.String target) {
this.target = target;
return this;
}
/**
* Sets the value of {@link SGUnresolvedReference#getValue}
* @param value the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder value(java.lang.String value) {
this.value = value;
return this;
}
/**
* Sets the value of {@link SGUnresolvedReference#getValue}
* @param value the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder value(java.lang.Number value) {
this.value = value;
return this;
}
/**
* Sets the value of {@link SGUnresolvedReference#getValue}
* @param value the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder value(java.lang.Boolean value) {
this.value = value;
return this;
}
/**
* Sets the value of {@link SGUnresolvedReference#getValue}
* @param value the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder value(software.aws.awsprototypingsdk.cdkgraph.PlainObject value) {
this.value = value;
return this;
}
/**
* Sets the value of {@link SGUnresolvedReference#getValue}
* @param value the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder value(java.util.List extends java.lang.Object> value) {
this.value = value;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link SGUnresolvedReference}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public SGUnresolvedReference build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link SGUnresolvedReference}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SGUnresolvedReference {
private final software.aws.awsprototypingsdk.cdkgraph.ReferenceTypeEnum referenceType;
private final java.lang.String source;
private final java.lang.String target;
private final java.lang.Object value;
/**
* 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.referenceType = software.amazon.jsii.Kernel.get(this, "referenceType", software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.cdkgraph.ReferenceTypeEnum.class));
this.source = software.amazon.jsii.Kernel.get(this, "source", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.target = software.amazon.jsii.Kernel.get(this, "target", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.value = software.amazon.jsii.Kernel.get(this, "value", software.amazon.jsii.NativeType.forClass(java.lang.Object.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.referenceType = java.util.Objects.requireNonNull(builder.referenceType, "referenceType is required");
this.source = java.util.Objects.requireNonNull(builder.source, "source is required");
this.target = java.util.Objects.requireNonNull(builder.target, "target is required");
this.value = builder.value;
}
@Override
public final software.aws.awsprototypingsdk.cdkgraph.ReferenceTypeEnum getReferenceType() {
return this.referenceType;
}
@Override
public final java.lang.String getSource() {
return this.source;
}
@Override
public final java.lang.String getTarget() {
return this.target;
}
@Override
public final java.lang.Object getValue() {
return this.value;
}
@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("referenceType", om.valueToTree(this.getReferenceType()));
data.set("source", om.valueToTree(this.getSource()));
data.set("target", om.valueToTree(this.getTarget()));
if (this.getValue() != null) {
data.set("value", om.valueToTree(this.getValue()));
}
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.SGUnresolvedReference"));
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;
SGUnresolvedReference.Jsii$Proxy that = (SGUnresolvedReference.Jsii$Proxy) o;
if (!referenceType.equals(that.referenceType)) return false;
if (!source.equals(that.source)) return false;
if (!target.equals(that.target)) return false;
return this.value != null ? this.value.equals(that.value) : that.value == null;
}
@Override
public final int hashCode() {
int result = this.referenceType.hashCode();
result = 31 * result + (this.source.hashCode());
result = 31 * result + (this.target.hashCode());
result = 31 * result + (this.value != null ? this.value.hashCode() : 0);
return result;
}
}
}