software.amazon.awscdk.services.ec2.alpha.VPCCidrBlockattributes Maven / Gradle / Ivy
Show all versions of ec2-alpha Show documentation
package software.amazon.awscdk.services.ec2.alpha;
/**
* (experimental) Attributes for VPCCidrBlock used for defining a new CIDR Block and also for importing an existing CIDR.
*
* Example:
*
*
* // The code below shows an example of how to instantiate this type.
* // The values are placeholders you should change.
* import software.amazon.awscdk.services.ec2.alpha.*;
* VPCCidrBlockattributes vPCCidrBlockattributes = VPCCidrBlockattributes.builder()
* .amazonProvidedIpv6CidrBlock(false)
* .cidrBlock("cidrBlock")
* .cidrBlockName("cidrBlockName")
* .ipv4IpamPoolId("ipv4IpamPoolId")
* .ipv4IpamProvisionedCidrs(List.of("ipv4IpamProvisionedCidrs"))
* .ipv4NetmaskLength(123)
* .ipv6IpamPoolId("ipv6IpamPoolId")
* .ipv6NetmaskLength(123)
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-11-15T10:25:09.196Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ec2.alpha.$Module.class, fqn = "@aws-cdk/aws-ec2-alpha.VPCCidrBlockattributes")
@software.amazon.jsii.Jsii.Proxy(VPCCidrBlockattributes.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface VPCCidrBlockattributes extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) Amazon Provided Ipv6.
*
* Default: false
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getAmazonProvidedIpv6CidrBlock() {
return null;
}
/**
* (experimental) The secondary IPv4 CIDR Block.
*
* Default: - no CIDR block provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getCidrBlock() {
return null;
}
/**
* (experimental) The secondary IPv4 CIDR Block.
*
* Default: - no CIDR block provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getCidrBlockName() {
return null;
}
/**
* (experimental) IPAM pool for IPv4 address type.
*
* Default: - no IPAM pool Id provided for IPv4
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getIpv4IpamPoolId() {
return null;
}
/**
* (experimental) IPv4 CIDR provisioned under pool Required to check for overlapping CIDRs after provisioning is complete under IPAM pool.
*
* Default: - no IPAM IPv4 CIDR range is provisioned using IPAM
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getIpv4IpamProvisionedCidrs() {
return null;
}
/**
* (experimental) Net mask length for IPv4 address type.
*
* Default: - no Net mask length configured for IPv4
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getIpv4NetmaskLength() {
return null;
}
/**
* (experimental) IPAM pool for IPv6 address type.
*
* Default: - no IPAM pool Id provided for IPv6
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getIpv6IpamPoolId() {
return null;
}
/**
* (experimental) Net mask length for IPv6 address type.
*
* Default: - no Net mask length configured for IPv6
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getIpv6NetmaskLength() {
return null;
}
/**
* @return a {@link Builder} of {@link VPCCidrBlockattributes}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link VPCCidrBlockattributes}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Boolean amazonProvidedIpv6CidrBlock;
java.lang.String cidrBlock;
java.lang.String cidrBlockName;
java.lang.String ipv4IpamPoolId;
java.util.List ipv4IpamProvisionedCidrs;
java.lang.Number ipv4NetmaskLength;
java.lang.String ipv6IpamPoolId;
java.lang.Number ipv6NetmaskLength;
/**
* Sets the value of {@link VPCCidrBlockattributes#getAmazonProvidedIpv6CidrBlock}
* @param amazonProvidedIpv6CidrBlock Amazon Provided Ipv6.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder amazonProvidedIpv6CidrBlock(java.lang.Boolean amazonProvidedIpv6CidrBlock) {
this.amazonProvidedIpv6CidrBlock = amazonProvidedIpv6CidrBlock;
return this;
}
/**
* Sets the value of {@link VPCCidrBlockattributes#getCidrBlock}
* @param cidrBlock The secondary IPv4 CIDR Block.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder cidrBlock(java.lang.String cidrBlock) {
this.cidrBlock = cidrBlock;
return this;
}
/**
* Sets the value of {@link VPCCidrBlockattributes#getCidrBlockName}
* @param cidrBlockName The secondary IPv4 CIDR Block.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder cidrBlockName(java.lang.String cidrBlockName) {
this.cidrBlockName = cidrBlockName;
return this;
}
/**
* Sets the value of {@link VPCCidrBlockattributes#getIpv4IpamPoolId}
* @param ipv4IpamPoolId IPAM pool for IPv4 address type.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder ipv4IpamPoolId(java.lang.String ipv4IpamPoolId) {
this.ipv4IpamPoolId = ipv4IpamPoolId;
return this;
}
/**
* Sets the value of {@link VPCCidrBlockattributes#getIpv4IpamProvisionedCidrs}
* @param ipv4IpamProvisionedCidrs IPv4 CIDR provisioned under pool Required to check for overlapping CIDRs after provisioning is complete under IPAM pool.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder ipv4IpamProvisionedCidrs(java.util.List ipv4IpamProvisionedCidrs) {
this.ipv4IpamProvisionedCidrs = ipv4IpamProvisionedCidrs;
return this;
}
/**
* Sets the value of {@link VPCCidrBlockattributes#getIpv4NetmaskLength}
* @param ipv4NetmaskLength Net mask length for IPv4 address type.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder ipv4NetmaskLength(java.lang.Number ipv4NetmaskLength) {
this.ipv4NetmaskLength = ipv4NetmaskLength;
return this;
}
/**
* Sets the value of {@link VPCCidrBlockattributes#getIpv6IpamPoolId}
* @param ipv6IpamPoolId IPAM pool for IPv6 address type.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder ipv6IpamPoolId(java.lang.String ipv6IpamPoolId) {
this.ipv6IpamPoolId = ipv6IpamPoolId;
return this;
}
/**
* Sets the value of {@link VPCCidrBlockattributes#getIpv6NetmaskLength}
* @param ipv6NetmaskLength Net mask length for IPv6 address type.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder ipv6NetmaskLength(java.lang.Number ipv6NetmaskLength) {
this.ipv6NetmaskLength = ipv6NetmaskLength;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link VPCCidrBlockattributes}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public VPCCidrBlockattributes build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link VPCCidrBlockattributes}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements VPCCidrBlockattributes {
private final java.lang.Boolean amazonProvidedIpv6CidrBlock;
private final java.lang.String cidrBlock;
private final java.lang.String cidrBlockName;
private final java.lang.String ipv4IpamPoolId;
private final java.util.List ipv4IpamProvisionedCidrs;
private final java.lang.Number ipv4NetmaskLength;
private final java.lang.String ipv6IpamPoolId;
private final java.lang.Number ipv6NetmaskLength;
/**
* 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.amazonProvidedIpv6CidrBlock = software.amazon.jsii.Kernel.get(this, "amazonProvidedIpv6CidrBlock", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.cidrBlock = software.amazon.jsii.Kernel.get(this, "cidrBlock", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.cidrBlockName = software.amazon.jsii.Kernel.get(this, "cidrBlockName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.ipv4IpamPoolId = software.amazon.jsii.Kernel.get(this, "ipv4IpamPoolId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.ipv4IpamProvisionedCidrs = software.amazon.jsii.Kernel.get(this, "ipv4IpamProvisionedCidrs", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.ipv4NetmaskLength = software.amazon.jsii.Kernel.get(this, "ipv4NetmaskLength", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.ipv6IpamPoolId = software.amazon.jsii.Kernel.get(this, "ipv6IpamPoolId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.ipv6NetmaskLength = software.amazon.jsii.Kernel.get(this, "ipv6NetmaskLength", software.amazon.jsii.NativeType.forClass(java.lang.Number.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.amazonProvidedIpv6CidrBlock = builder.amazonProvidedIpv6CidrBlock;
this.cidrBlock = builder.cidrBlock;
this.cidrBlockName = builder.cidrBlockName;
this.ipv4IpamPoolId = builder.ipv4IpamPoolId;
this.ipv4IpamProvisionedCidrs = builder.ipv4IpamProvisionedCidrs;
this.ipv4NetmaskLength = builder.ipv4NetmaskLength;
this.ipv6IpamPoolId = builder.ipv6IpamPoolId;
this.ipv6NetmaskLength = builder.ipv6NetmaskLength;
}
@Override
public final java.lang.Boolean getAmazonProvidedIpv6CidrBlock() {
return this.amazonProvidedIpv6CidrBlock;
}
@Override
public final java.lang.String getCidrBlock() {
return this.cidrBlock;
}
@Override
public final java.lang.String getCidrBlockName() {
return this.cidrBlockName;
}
@Override
public final java.lang.String getIpv4IpamPoolId() {
return this.ipv4IpamPoolId;
}
@Override
public final java.util.List getIpv4IpamProvisionedCidrs() {
return this.ipv4IpamProvisionedCidrs;
}
@Override
public final java.lang.Number getIpv4NetmaskLength() {
return this.ipv4NetmaskLength;
}
@Override
public final java.lang.String getIpv6IpamPoolId() {
return this.ipv6IpamPoolId;
}
@Override
public final java.lang.Number getIpv6NetmaskLength() {
return this.ipv6NetmaskLength;
}
@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.getAmazonProvidedIpv6CidrBlock() != null) {
data.set("amazonProvidedIpv6CidrBlock", om.valueToTree(this.getAmazonProvidedIpv6CidrBlock()));
}
if (this.getCidrBlock() != null) {
data.set("cidrBlock", om.valueToTree(this.getCidrBlock()));
}
if (this.getCidrBlockName() != null) {
data.set("cidrBlockName", om.valueToTree(this.getCidrBlockName()));
}
if (this.getIpv4IpamPoolId() != null) {
data.set("ipv4IpamPoolId", om.valueToTree(this.getIpv4IpamPoolId()));
}
if (this.getIpv4IpamProvisionedCidrs() != null) {
data.set("ipv4IpamProvisionedCidrs", om.valueToTree(this.getIpv4IpamProvisionedCidrs()));
}
if (this.getIpv4NetmaskLength() != null) {
data.set("ipv4NetmaskLength", om.valueToTree(this.getIpv4NetmaskLength()));
}
if (this.getIpv6IpamPoolId() != null) {
data.set("ipv6IpamPoolId", om.valueToTree(this.getIpv6IpamPoolId()));
}
if (this.getIpv6NetmaskLength() != null) {
data.set("ipv6NetmaskLength", om.valueToTree(this.getIpv6NetmaskLength()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-ec2-alpha.VPCCidrBlockattributes"));
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;
VPCCidrBlockattributes.Jsii$Proxy that = (VPCCidrBlockattributes.Jsii$Proxy) o;
if (this.amazonProvidedIpv6CidrBlock != null ? !this.amazonProvidedIpv6CidrBlock.equals(that.amazonProvidedIpv6CidrBlock) : that.amazonProvidedIpv6CidrBlock != null) return false;
if (this.cidrBlock != null ? !this.cidrBlock.equals(that.cidrBlock) : that.cidrBlock != null) return false;
if (this.cidrBlockName != null ? !this.cidrBlockName.equals(that.cidrBlockName) : that.cidrBlockName != null) return false;
if (this.ipv4IpamPoolId != null ? !this.ipv4IpamPoolId.equals(that.ipv4IpamPoolId) : that.ipv4IpamPoolId != null) return false;
if (this.ipv4IpamProvisionedCidrs != null ? !this.ipv4IpamProvisionedCidrs.equals(that.ipv4IpamProvisionedCidrs) : that.ipv4IpamProvisionedCidrs != null) return false;
if (this.ipv4NetmaskLength != null ? !this.ipv4NetmaskLength.equals(that.ipv4NetmaskLength) : that.ipv4NetmaskLength != null) return false;
if (this.ipv6IpamPoolId != null ? !this.ipv6IpamPoolId.equals(that.ipv6IpamPoolId) : that.ipv6IpamPoolId != null) return false;
return this.ipv6NetmaskLength != null ? this.ipv6NetmaskLength.equals(that.ipv6NetmaskLength) : that.ipv6NetmaskLength == null;
}
@Override
public final int hashCode() {
int result = this.amazonProvidedIpv6CidrBlock != null ? this.amazonProvidedIpv6CidrBlock.hashCode() : 0;
result = 31 * result + (this.cidrBlock != null ? this.cidrBlock.hashCode() : 0);
result = 31 * result + (this.cidrBlockName != null ? this.cidrBlockName.hashCode() : 0);
result = 31 * result + (this.ipv4IpamPoolId != null ? this.ipv4IpamPoolId.hashCode() : 0);
result = 31 * result + (this.ipv4IpamProvisionedCidrs != null ? this.ipv4IpamProvisionedCidrs.hashCode() : 0);
result = 31 * result + (this.ipv4NetmaskLength != null ? this.ipv4NetmaskLength.hashCode() : 0);
result = 31 * result + (this.ipv6IpamPoolId != null ? this.ipv6IpamPoolId.hashCode() : 0);
result = 31 * result + (this.ipv6NetmaskLength != null ? this.ipv6NetmaskLength.hashCode() : 0);
return result;
}
}
}