io.github.cdklabs.cdk.cicd.wrapper.VPCFromLookUpStackProps Maven / Gradle / Ivy
Show all versions of cdk-cicd-wrapper Show documentation
package io.github.cdklabs.cdk.cicd.wrapper;
/**
* Properties for the VPCStack.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-03T16:35:59.364Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.cicd.wrapper.$Module.class, fqn = "@cdklabs/cdk-cicd-wrapper.VPCFromLookUpStackProps")
@software.amazon.jsii.Jsii.Proxy(VPCFromLookUpStackProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface VPCFromLookUpStackProps extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.StackProps {
/**
* The configuration for the VPC to be created or looked up.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getVpcId();
/**
* The list of CodeBuild VPC InterfacesVpcEndpointAwsServices to extend the defaultCodeBuildVPCInterfaces.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getCodeBuildVPCInterfaces() {
return null;
}
/**
* @return a {@link Builder} of {@link VPCFromLookUpStackProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link VPCFromLookUpStackProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String vpcId;
java.util.List codeBuildVpcInterfaces;
java.lang.Boolean analyticsReporting;
java.lang.Boolean crossRegionReferences;
java.lang.String description;
software.amazon.awscdk.Environment env;
software.amazon.awscdk.PermissionsBoundary permissionsBoundary;
java.lang.String stackName;
java.lang.Boolean suppressTemplateIndentation;
software.amazon.awscdk.IStackSynthesizer synthesizer;
java.util.Map tags;
java.lang.Boolean terminationProtection;
/**
* Sets the value of {@link VPCFromLookUpStackProps#getVpcId}
* @param vpcId The configuration for the VPC to be created or looked up. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder vpcId(java.lang.String vpcId) {
this.vpcId = vpcId;
return this;
}
/**
* Sets the value of {@link VPCFromLookUpStackProps#getCodeBuildVpcInterfaces}
* @param codeBuildVpcInterfaces The list of CodeBuild VPC InterfacesVpcEndpointAwsServices to extend the defaultCodeBuildVPCInterfaces.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder codeBuildVpcInterfaces(java.util.List extends software.amazon.awscdk.services.ec2.InterfaceVpcEndpointAwsService> codeBuildVpcInterfaces) {
this.codeBuildVpcInterfaces = (java.util.List)codeBuildVpcInterfaces;
return this;
}
/**
* Sets the value of {@link VPCFromLookUpStackProps#getAnalyticsReporting}
* @param analyticsReporting Include runtime versioning information in this Stack.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder analyticsReporting(java.lang.Boolean analyticsReporting) {
this.analyticsReporting = analyticsReporting;
return this;
}
/**
* Sets the value of {@link VPCFromLookUpStackProps#getCrossRegionReferences}
* @param crossRegionReferences Enable this flag to allow native cross region stack references.
* Enabling this will create a CloudFormation custom resource
* in both the producing stack and consuming stack in order to perform the export/import
*
* This feature is currently experimental
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder crossRegionReferences(java.lang.Boolean crossRegionReferences) {
this.crossRegionReferences = crossRegionReferences;
return this;
}
/**
* Sets the value of {@link VPCFromLookUpStackProps#getDescription}
* @param description A description of the stack.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder description(java.lang.String description) {
this.description = description;
return this;
}
/**
* Sets the value of {@link VPCFromLookUpStackProps#getEnv}
* @param env The AWS environment (account/region) where this stack will be deployed.
* Set the region
/account
fields of env
to either a concrete value to
* select the indicated environment (recommended for production stacks), or to
* the values of environment variables
* CDK_DEFAULT_REGION
/CDK_DEFAULT_ACCOUNT
to let the target environment
* depend on the AWS credentials/configuration that the CDK CLI is executed
* under (recommended for development stacks).
*
* If the Stack
is instantiated inside a Stage
, any undefined
* region
/account
fields from env
will default to the same field on the
* encompassing Stage
, if configured there.
*
* If either region
or account
are not set nor inherited from Stage
, the
* Stack will be considered "environment-agnostic"". Environment-agnostic
* stacks can be deployed to any environment but may not be able to take
* advantage of all features of the CDK. For example, they will not be able to
* use environmental context lookups such as ec2.Vpc.fromLookup
and will not
* automatically translate Service Principals to the right format based on the
* environment's AWS partition, and other such enhancements.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder env(software.amazon.awscdk.Environment env) {
this.env = env;
return this;
}
/**
* Sets the value of {@link VPCFromLookUpStackProps#getPermissionsBoundary}
* @param permissionsBoundary Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder permissionsBoundary(software.amazon.awscdk.PermissionsBoundary permissionsBoundary) {
this.permissionsBoundary = permissionsBoundary;
return this;
}
/**
* Sets the value of {@link VPCFromLookUpStackProps#getStackName}
* @param stackName Name to deploy the stack with.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder stackName(java.lang.String stackName) {
this.stackName = stackName;
return this;
}
/**
* Sets the value of {@link VPCFromLookUpStackProps#getSuppressTemplateIndentation}
* @param suppressTemplateIndentation Enable this flag to suppress indentation in generated CloudFormation templates.
* If not specified, the value of the @aws-cdk/core:suppressTemplateIndentation
* context key will be used. If that is not specified, then the
* default value false
will be used.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder suppressTemplateIndentation(java.lang.Boolean suppressTemplateIndentation) {
this.suppressTemplateIndentation = suppressTemplateIndentation;
return this;
}
/**
* Sets the value of {@link VPCFromLookUpStackProps#getSynthesizer}
* @param synthesizer Synthesis method to use while deploying this stack.
* The Stack Synthesizer controls aspects of synthesis and deployment,
* like how assets are referenced and what IAM roles to use. For more
* information, see the README of the main CDK package.
*
* If not specified, the defaultStackSynthesizer
from App
will be used.
* If that is not specified, DefaultStackSynthesizer
is used if
* @aws-cdk/core:newStyleStackSynthesis
is set to true
or the CDK major
* version is v2. In CDK v1 LegacyStackSynthesizer
is the default if no
* other synthesizer is specified.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder synthesizer(software.amazon.awscdk.IStackSynthesizer synthesizer) {
this.synthesizer = synthesizer;
return this;
}
/**
* Sets the value of {@link VPCFromLookUpStackProps#getTags}
* @param tags Stack tags that will be applied to all the taggable resources and the stack itself.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder tags(java.util.Map tags) {
this.tags = tags;
return this;
}
/**
* Sets the value of {@link VPCFromLookUpStackProps#getTerminationProtection}
* @param terminationProtection Whether to enable termination protection for this stack.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder terminationProtection(java.lang.Boolean terminationProtection) {
this.terminationProtection = terminationProtection;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link VPCFromLookUpStackProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public VPCFromLookUpStackProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link VPCFromLookUpStackProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements VPCFromLookUpStackProps {
private final java.lang.String vpcId;
private final java.util.List codeBuildVpcInterfaces;
private final java.lang.Boolean analyticsReporting;
private final java.lang.Boolean crossRegionReferences;
private final java.lang.String description;
private final software.amazon.awscdk.Environment env;
private final software.amazon.awscdk.PermissionsBoundary permissionsBoundary;
private final java.lang.String stackName;
private final java.lang.Boolean suppressTemplateIndentation;
private final software.amazon.awscdk.IStackSynthesizer synthesizer;
private final java.util.Map tags;
private final java.lang.Boolean terminationProtection;
/**
* 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.vpcId = software.amazon.jsii.Kernel.get(this, "vpcId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.codeBuildVpcInterfaces = software.amazon.jsii.Kernel.get(this, "codeBuildVPCInterfaces", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.InterfaceVpcEndpointAwsService.class)));
this.analyticsReporting = software.amazon.jsii.Kernel.get(this, "analyticsReporting", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.crossRegionReferences = software.amazon.jsii.Kernel.get(this, "crossRegionReferences", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.env = software.amazon.jsii.Kernel.get(this, "env", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Environment.class));
this.permissionsBoundary = software.amazon.jsii.Kernel.get(this, "permissionsBoundary", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.PermissionsBoundary.class));
this.stackName = software.amazon.jsii.Kernel.get(this, "stackName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.suppressTemplateIndentation = software.amazon.jsii.Kernel.get(this, "suppressTemplateIndentation", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.synthesizer = software.amazon.jsii.Kernel.get(this, "synthesizer", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.IStackSynthesizer.class));
this.tags = software.amazon.jsii.Kernel.get(this, "tags", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.terminationProtection = software.amazon.jsii.Kernel.get(this, "terminationProtection", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.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.vpcId = java.util.Objects.requireNonNull(builder.vpcId, "vpcId is required");
this.codeBuildVpcInterfaces = (java.util.List)builder.codeBuildVpcInterfaces;
this.analyticsReporting = builder.analyticsReporting;
this.crossRegionReferences = builder.crossRegionReferences;
this.description = builder.description;
this.env = builder.env;
this.permissionsBoundary = builder.permissionsBoundary;
this.stackName = builder.stackName;
this.suppressTemplateIndentation = builder.suppressTemplateIndentation;
this.synthesizer = builder.synthesizer;
this.tags = builder.tags;
this.terminationProtection = builder.terminationProtection;
}
@Override
public final java.lang.String getVpcId() {
return this.vpcId;
}
@Override
public final java.util.List getCodeBuildVPCInterfaces() {
return this.codeBuildVpcInterfaces;
}
@Override
public final java.lang.Boolean getAnalyticsReporting() {
return this.analyticsReporting;
}
@Override
public final java.lang.Boolean getCrossRegionReferences() {
return this.crossRegionReferences;
}
@Override
public final java.lang.String getDescription() {
return this.description;
}
@Override
public final software.amazon.awscdk.Environment getEnv() {
return this.env;
}
@Override
public final software.amazon.awscdk.PermissionsBoundary getPermissionsBoundary() {
return this.permissionsBoundary;
}
@Override
public final java.lang.String getStackName() {
return this.stackName;
}
@Override
public final java.lang.Boolean getSuppressTemplateIndentation() {
return this.suppressTemplateIndentation;
}
@Override
public final software.amazon.awscdk.IStackSynthesizer getSynthesizer() {
return this.synthesizer;
}
@Override
public final java.util.Map getTags() {
return this.tags;
}
@Override
public final java.lang.Boolean getTerminationProtection() {
return this.terminationProtection;
}
@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("vpcId", om.valueToTree(this.getVpcId()));
if (this.getCodeBuildVPCInterfaces() != null) {
data.set("codeBuildVPCInterfaces", om.valueToTree(this.getCodeBuildVPCInterfaces()));
}
if (this.getAnalyticsReporting() != null) {
data.set("analyticsReporting", om.valueToTree(this.getAnalyticsReporting()));
}
if (this.getCrossRegionReferences() != null) {
data.set("crossRegionReferences", om.valueToTree(this.getCrossRegionReferences()));
}
if (this.getDescription() != null) {
data.set("description", om.valueToTree(this.getDescription()));
}
if (this.getEnv() != null) {
data.set("env", om.valueToTree(this.getEnv()));
}
if (this.getPermissionsBoundary() != null) {
data.set("permissionsBoundary", om.valueToTree(this.getPermissionsBoundary()));
}
if (this.getStackName() != null) {
data.set("stackName", om.valueToTree(this.getStackName()));
}
if (this.getSuppressTemplateIndentation() != null) {
data.set("suppressTemplateIndentation", om.valueToTree(this.getSuppressTemplateIndentation()));
}
if (this.getSynthesizer() != null) {
data.set("synthesizer", om.valueToTree(this.getSynthesizer()));
}
if (this.getTags() != null) {
data.set("tags", om.valueToTree(this.getTags()));
}
if (this.getTerminationProtection() != null) {
data.set("terminationProtection", om.valueToTree(this.getTerminationProtection()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@cdklabs/cdk-cicd-wrapper.VPCFromLookUpStackProps"));
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;
VPCFromLookUpStackProps.Jsii$Proxy that = (VPCFromLookUpStackProps.Jsii$Proxy) o;
if (!vpcId.equals(that.vpcId)) return false;
if (this.codeBuildVpcInterfaces != null ? !this.codeBuildVpcInterfaces.equals(that.codeBuildVpcInterfaces) : that.codeBuildVpcInterfaces != null) return false;
if (this.analyticsReporting != null ? !this.analyticsReporting.equals(that.analyticsReporting) : that.analyticsReporting != null) return false;
if (this.crossRegionReferences != null ? !this.crossRegionReferences.equals(that.crossRegionReferences) : that.crossRegionReferences != null) return false;
if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false;
if (this.env != null ? !this.env.equals(that.env) : that.env != null) return false;
if (this.permissionsBoundary != null ? !this.permissionsBoundary.equals(that.permissionsBoundary) : that.permissionsBoundary != null) return false;
if (this.stackName != null ? !this.stackName.equals(that.stackName) : that.stackName != null) return false;
if (this.suppressTemplateIndentation != null ? !this.suppressTemplateIndentation.equals(that.suppressTemplateIndentation) : that.suppressTemplateIndentation != null) return false;
if (this.synthesizer != null ? !this.synthesizer.equals(that.synthesizer) : that.synthesizer != null) return false;
if (this.tags != null ? !this.tags.equals(that.tags) : that.tags != null) return false;
return this.terminationProtection != null ? this.terminationProtection.equals(that.terminationProtection) : that.terminationProtection == null;
}
@Override
public final int hashCode() {
int result = this.vpcId.hashCode();
result = 31 * result + (this.codeBuildVpcInterfaces != null ? this.codeBuildVpcInterfaces.hashCode() : 0);
result = 31 * result + (this.analyticsReporting != null ? this.analyticsReporting.hashCode() : 0);
result = 31 * result + (this.crossRegionReferences != null ? this.crossRegionReferences.hashCode() : 0);
result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
result = 31 * result + (this.env != null ? this.env.hashCode() : 0);
result = 31 * result + (this.permissionsBoundary != null ? this.permissionsBoundary.hashCode() : 0);
result = 31 * result + (this.stackName != null ? this.stackName.hashCode() : 0);
result = 31 * result + (this.suppressTemplateIndentation != null ? this.suppressTemplateIndentation.hashCode() : 0);
result = 31 * result + (this.synthesizer != null ? this.synthesizer.hashCode() : 0);
result = 31 * result + (this.tags != null ? this.tags.hashCode() : 0);
result = 31 * result + (this.terminationProtection != null ? this.terminationProtection.hashCode() : 0);
return result;
}
}
}