All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.neptune.alpha.SubnetGroupProps Maven / Gradle / Ivy

There is a newer version: 2.168.0-alpha.0
Show newest version
package software.amazon.awscdk.services.neptune.alpha;

/**
 * (experimental) Properties for creating a SubnetGroup.
 * 

* 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.neptune.alpha.*;
 * import software.amazon.awscdk.*;
 * import software.amazon.awscdk.services.ec2.*;
 * Subnet subnet;
 * SubnetFilter subnetFilter;
 * Vpc vpc;
 * SubnetGroupProps subnetGroupProps = SubnetGroupProps.builder()
 *         .vpc(vpc)
 *         // the properties below are optional
 *         .description("description")
 *         .removalPolicy(RemovalPolicy.DESTROY)
 *         .subnetGroupName("subnetGroupName")
 *         .vpcSubnets(SubnetSelection.builder()
 *                 .availabilityZones(List.of("availabilityZones"))
 *                 .onePerAz(false)
 *                 .subnetFilters(List.of(subnetFilter))
 *                 .subnetGroupName("subnetGroupName")
 *                 .subnets(List.of(subnet))
 *                 .subnetType(SubnetType.PRIVATE_ISOLATED)
 *                 .build())
 *         .build();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.50.0 (build d1830a4)", date = "2022-01-12T15:39:30.402Z") @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.neptune.alpha.$Module.class, fqn = "@aws-cdk/aws-neptune-alpha.SubnetGroupProps") @software.amazon.jsii.Jsii.Proxy(SubnetGroupProps.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public interface SubnetGroupProps extends software.amazon.jsii.JsiiSerializable { /** * (experimental) The VPC to place the subnet group in. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.IVpc getVpc(); /** * (experimental) Description of the subnet group. *

* Default: - a name is generated */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getDescription() { return null; } /** * (experimental) The removal policy to apply when the subnet group are removed from the stack or replaced during an update. *

* Default: RemovalPolicy.DESTROY */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.RemovalPolicy getRemovalPolicy() { return null; } /** * (experimental) The name of the subnet group. *

* Default: - a name is generated */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getSubnetGroupName() { return null; } /** * (experimental) Which subnets within the VPC to associate with this group. *

* Default: - private subnets */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.SubnetSelection getVpcSubnets() { return null; } /** * @return a {@link Builder} of {@link SubnetGroupProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link SubnetGroupProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { software.amazon.awscdk.services.ec2.IVpc vpc; java.lang.String description; software.amazon.awscdk.RemovalPolicy removalPolicy; java.lang.String subnetGroupName; software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets; /** * Sets the value of {@link SubnetGroupProps#getVpc} * @param vpc The VPC to place the subnet group in. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder vpc(software.amazon.awscdk.services.ec2.IVpc vpc) { this.vpc = vpc; return this; } /** * Sets the value of {@link SubnetGroupProps#getDescription} * @param description Description of the subnet group. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder description(java.lang.String description) { this.description = description; return this; } /** * Sets the value of {@link SubnetGroupProps#getRemovalPolicy} * @param removalPolicy The removal policy to apply when the subnet group are removed from the stack or replaced during an update. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder removalPolicy(software.amazon.awscdk.RemovalPolicy removalPolicy) { this.removalPolicy = removalPolicy; return this; } /** * Sets the value of {@link SubnetGroupProps#getSubnetGroupName} * @param subnetGroupName The name of the subnet group. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder subnetGroupName(java.lang.String subnetGroupName) { this.subnetGroupName = subnetGroupName; return this; } /** * Sets the value of {@link SubnetGroupProps#getVpcSubnets} * @param vpcSubnets Which subnets within the VPC to associate with this group. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder vpcSubnets(software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets) { this.vpcSubnets = vpcSubnets; return this; } /** * Builds the configured instance. * @return a new instance of {@link SubnetGroupProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public SubnetGroupProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link SubnetGroupProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SubnetGroupProps { private final software.amazon.awscdk.services.ec2.IVpc vpc; private final java.lang.String description; private final software.amazon.awscdk.RemovalPolicy removalPolicy; private final java.lang.String subnetGroupName; private final software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets; /** * 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.vpc = software.amazon.jsii.Kernel.get(this, "vpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class)); this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.removalPolicy = software.amazon.jsii.Kernel.get(this, "removalPolicy", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.RemovalPolicy.class)); this.subnetGroupName = software.amazon.jsii.Kernel.get(this, "subnetGroupName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.vpcSubnets = software.amazon.jsii.Kernel.get(this, "vpcSubnets", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.SubnetSelection.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.vpc = java.util.Objects.requireNonNull(builder.vpc, "vpc is required"); this.description = builder.description; this.removalPolicy = builder.removalPolicy; this.subnetGroupName = builder.subnetGroupName; this.vpcSubnets = builder.vpcSubnets; } @Override public final software.amazon.awscdk.services.ec2.IVpc getVpc() { return this.vpc; } @Override public final java.lang.String getDescription() { return this.description; } @Override public final software.amazon.awscdk.RemovalPolicy getRemovalPolicy() { return this.removalPolicy; } @Override public final java.lang.String getSubnetGroupName() { return this.subnetGroupName; } @Override public final software.amazon.awscdk.services.ec2.SubnetSelection getVpcSubnets() { return this.vpcSubnets; } @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("vpc", om.valueToTree(this.getVpc())); if (this.getDescription() != null) { data.set("description", om.valueToTree(this.getDescription())); } if (this.getRemovalPolicy() != null) { data.set("removalPolicy", om.valueToTree(this.getRemovalPolicy())); } if (this.getSubnetGroupName() != null) { data.set("subnetGroupName", om.valueToTree(this.getSubnetGroupName())); } if (this.getVpcSubnets() != null) { data.set("vpcSubnets", om.valueToTree(this.getVpcSubnets())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@aws-cdk/aws-neptune-alpha.SubnetGroupProps")); 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; SubnetGroupProps.Jsii$Proxy that = (SubnetGroupProps.Jsii$Proxy) o; if (!vpc.equals(that.vpc)) return false; if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false; if (this.removalPolicy != null ? !this.removalPolicy.equals(that.removalPolicy) : that.removalPolicy != null) return false; if (this.subnetGroupName != null ? !this.subnetGroupName.equals(that.subnetGroupName) : that.subnetGroupName != null) return false; return this.vpcSubnets != null ? this.vpcSubnets.equals(that.vpcSubnets) : that.vpcSubnets == null; } @Override public final int hashCode() { int result = this.vpc.hashCode(); result = 31 * result + (this.description != null ? this.description.hashCode() : 0); result = 31 * result + (this.removalPolicy != null ? this.removalPolicy.hashCode() : 0); result = 31 * result + (this.subnetGroupName != null ? this.subnetGroupName.hashCode() : 0); result = 31 * result + (this.vpcSubnets != null ? this.vpcSubnets.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy