
io.github.cdklabs.cdkethereumnode.EthereumNodeProps Maven / Gradle / Ivy
package io.github.cdklabs.cdkethereumnode;
/**
* Construct properties for `EthereumNode`.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.79.0 (build b22f628)", date = "2023-03-28T00:21:28.403Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdkethereumnode.$Module.class, fqn = "@cdklabs/cdk-ethereum-node.EthereumNodeProps")
@software.amazon.jsii.Jsii.Proxy(EthereumNodeProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface EthereumNodeProps extends software.amazon.jsii.JsiiSerializable {
/**
* The Availability Zone in which the node will be created.
*
* Default: - us-east-1a
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getAvailabilityZone() {
return null;
}
/**
* The Amazon Managed Blockchain instance type for the Ethereum node.
*
* Default: - BURSTABLE3_LARGE
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable io.github.cdklabs.cdkethereumnode.InstanceType getInstanceType() {
return null;
}
/**
* The Ethereum Network in which the node will be created.
*
* Default: - The default network selected is Mainnet network
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable io.github.cdklabs.cdkethereumnode.Network getNetwork() {
return null;
}
/**
* @return a {@link Builder} of {@link EthereumNodeProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link EthereumNodeProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String availabilityZone;
io.github.cdklabs.cdkethereumnode.InstanceType instanceType;
io.github.cdklabs.cdkethereumnode.Network network;
/**
* Sets the value of {@link EthereumNodeProps#getAvailabilityZone}
* @param availabilityZone The Availability Zone in which the node will be created.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder availabilityZone(java.lang.String availabilityZone) {
this.availabilityZone = availabilityZone;
return this;
}
/**
* Sets the value of {@link EthereumNodeProps#getInstanceType}
* @param instanceType The Amazon Managed Blockchain instance type for the Ethereum node.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder instanceType(io.github.cdklabs.cdkethereumnode.InstanceType instanceType) {
this.instanceType = instanceType;
return this;
}
/**
* Sets the value of {@link EthereumNodeProps#getNetwork}
* @param network The Ethereum Network in which the node will be created.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder network(io.github.cdklabs.cdkethereumnode.Network network) {
this.network = network;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link EthereumNodeProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public EthereumNodeProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link EthereumNodeProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements EthereumNodeProps {
private final java.lang.String availabilityZone;
private final io.github.cdklabs.cdkethereumnode.InstanceType instanceType;
private final io.github.cdklabs.cdkethereumnode.Network network;
/**
* 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.availabilityZone = software.amazon.jsii.Kernel.get(this, "availabilityZone", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.instanceType = software.amazon.jsii.Kernel.get(this, "instanceType", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkethereumnode.InstanceType.class));
this.network = software.amazon.jsii.Kernel.get(this, "network", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkethereumnode.Network.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.availabilityZone = builder.availabilityZone;
this.instanceType = builder.instanceType;
this.network = builder.network;
}
@Override
public final java.lang.String getAvailabilityZone() {
return this.availabilityZone;
}
@Override
public final io.github.cdklabs.cdkethereumnode.InstanceType getInstanceType() {
return this.instanceType;
}
@Override
public final io.github.cdklabs.cdkethereumnode.Network getNetwork() {
return this.network;
}
@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.getAvailabilityZone() != null) {
data.set("availabilityZone", om.valueToTree(this.getAvailabilityZone()));
}
if (this.getInstanceType() != null) {
data.set("instanceType", om.valueToTree(this.getInstanceType()));
}
if (this.getNetwork() != null) {
data.set("network", om.valueToTree(this.getNetwork()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@cdklabs/cdk-ethereum-node.EthereumNodeProps"));
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;
EthereumNodeProps.Jsii$Proxy that = (EthereumNodeProps.Jsii$Proxy) o;
if (this.availabilityZone != null ? !this.availabilityZone.equals(that.availabilityZone) : that.availabilityZone != null) return false;
if (this.instanceType != null ? !this.instanceType.equals(that.instanceType) : that.instanceType != null) return false;
return this.network != null ? this.network.equals(that.network) : that.network == null;
}
@Override
public final int hashCode() {
int result = this.availabilityZone != null ? this.availabilityZone.hashCode() : 0;
result = 31 * result + (this.instanceType != null ? this.instanceType.hashCode() : 0);
result = 31 * result + (this.network != null ? this.network.hashCode() : 0);
return result;
}
}
}