io.github.cdklabs.cdk.stacksets.StackSetProps Maven / Gradle / Ivy
package io.github.cdklabs.cdk.stacksets;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.83.0 (build fd4544d)", date = "2023-06-13T00:17:42.435Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.stacksets.$Module.class, fqn = "cdk-stacksets.StackSetProps")
@software.amazon.jsii.Jsii.Proxy(StackSetProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface StackSetProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) Which accounts/OUs and regions to deploy the StackSet to.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.stacksets.StackSetTarget getTarget();
/**
* (experimental) The Stack that will be deployed to the target.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.stacksets.StackSetTemplate getTemplate();
/**
* (experimental) Specify a list of capabilities required by your stackset.
*
* StackSets that contains certain functionality require an explicit acknowledgement
* that the stack contains these capabilities.
*
* If you deploy a stack that requires certain capabilities and they are
* not specified, the deployment will fail with a InsufficientCapabilities
error.
*
* Default: - no specific capabilities
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getCapabilities() {
return null;
}
/**
* (experimental) The type of deployment for this StackSet.
*
* The deployment can either be managed by
* AWS Organizations (i.e. DeploymentType.serviceManaged()) or by the AWS account that
* the StackSet is deployed from.
*
* In order to use DeploymentType.serviceManaged() the account needs to either be the
* organizations's management account or a delegated administrator account.
*
* Default: DeploymentType.self()
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable io.github.cdklabs.cdk.stacksets.DeploymentType getDeploymentType() {
return null;
}
/**
* (experimental) An optional description to add to the StackSet.
*
* Default: - no description
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getDescription() {
return null;
}
/**
* (experimental) If this is true
then StackSets will perform non-conflicting operations concurrently and queue any conflicting operations.
*
* This means that you can submit more than one operation per StackSet and they will be
* executed concurrently. For example you can submit a single request that updates existing
* stack instances and creates new stack instances. Any conflicting operations will be queued
* for immediate processing once the conflict is resolved.
*
* Default: true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getManagedExecution() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable io.github.cdklabs.cdk.stacksets.OperationPreferences getOperationPreferences() {
return null;
}
/**
* (experimental) The name of the stack set.
*
* Default: - CloudFormation generated name
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getStackSetName() {
return null;
}
/**
* @return a {@link Builder} of {@link StackSetProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link StackSetProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
io.github.cdklabs.cdk.stacksets.StackSetTarget target;
io.github.cdklabs.cdk.stacksets.StackSetTemplate template;
java.util.List capabilities;
io.github.cdklabs.cdk.stacksets.DeploymentType deploymentType;
java.lang.String description;
java.lang.Boolean managedExecution;
io.github.cdklabs.cdk.stacksets.OperationPreferences operationPreferences;
java.lang.String stackSetName;
/**
* Sets the value of {@link StackSetProps#getTarget}
* @param target Which accounts/OUs and regions to deploy the StackSet to. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder target(io.github.cdklabs.cdk.stacksets.StackSetTarget target) {
this.target = target;
return this;
}
/**
* Sets the value of {@link StackSetProps#getTemplate}
* @param template The Stack that will be deployed to the target. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder template(io.github.cdklabs.cdk.stacksets.StackSetTemplate template) {
this.template = template;
return this;
}
/**
* Sets the value of {@link StackSetProps#getCapabilities}
* @param capabilities Specify a list of capabilities required by your stackset.
* StackSets that contains certain functionality require an explicit acknowledgement
* that the stack contains these capabilities.
*
* If you deploy a stack that requires certain capabilities and they are
* not specified, the deployment will fail with a InsufficientCapabilities
error.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder capabilities(java.util.List extends io.github.cdklabs.cdk.stacksets.Capability> capabilities) {
this.capabilities = (java.util.List)capabilities;
return this;
}
/**
* Sets the value of {@link StackSetProps#getDeploymentType}
* @param deploymentType The type of deployment for this StackSet.
* The deployment can either be managed by
* AWS Organizations (i.e. DeploymentType.serviceManaged()) or by the AWS account that
* the StackSet is deployed from.
*
* In order to use DeploymentType.serviceManaged() the account needs to either be the
* organizations's management account or a delegated administrator account.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder deploymentType(io.github.cdklabs.cdk.stacksets.DeploymentType deploymentType) {
this.deploymentType = deploymentType;
return this;
}
/**
* Sets the value of {@link StackSetProps#getDescription}
* @param description An optional description to add to the StackSet.
* @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 StackSetProps#getManagedExecution}
* @param managedExecution If this is true
then StackSets will perform non-conflicting operations concurrently and queue any conflicting operations.
* This means that you can submit more than one operation per StackSet and they will be
* executed concurrently. For example you can submit a single request that updates existing
* stack instances and creates new stack instances. Any conflicting operations will be queued
* for immediate processing once the conflict is resolved.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder managedExecution(java.lang.Boolean managedExecution) {
this.managedExecution = managedExecution;
return this;
}
/**
* Sets the value of {@link StackSetProps#getOperationPreferences}
* @param operationPreferences the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder operationPreferences(io.github.cdklabs.cdk.stacksets.OperationPreferences operationPreferences) {
this.operationPreferences = operationPreferences;
return this;
}
/**
* Sets the value of {@link StackSetProps#getStackSetName}
* @param stackSetName The name of the stack set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder stackSetName(java.lang.String stackSetName) {
this.stackSetName = stackSetName;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link StackSetProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public StackSetProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link StackSetProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements StackSetProps {
private final io.github.cdklabs.cdk.stacksets.StackSetTarget target;
private final io.github.cdklabs.cdk.stacksets.StackSetTemplate template;
private final java.util.List capabilities;
private final io.github.cdklabs.cdk.stacksets.DeploymentType deploymentType;
private final java.lang.String description;
private final java.lang.Boolean managedExecution;
private final io.github.cdklabs.cdk.stacksets.OperationPreferences operationPreferences;
private final java.lang.String stackSetName;
/**
* 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.target = software.amazon.jsii.Kernel.get(this, "target", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.stacksets.StackSetTarget.class));
this.template = software.amazon.jsii.Kernel.get(this, "template", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.stacksets.StackSetTemplate.class));
this.capabilities = software.amazon.jsii.Kernel.get(this, "capabilities", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.stacksets.Capability.class)));
this.deploymentType = software.amazon.jsii.Kernel.get(this, "deploymentType", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.stacksets.DeploymentType.class));
this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.managedExecution = software.amazon.jsii.Kernel.get(this, "managedExecution", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.operationPreferences = software.amazon.jsii.Kernel.get(this, "operationPreferences", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.stacksets.OperationPreferences.class));
this.stackSetName = software.amazon.jsii.Kernel.get(this, "stackSetName", software.amazon.jsii.NativeType.forClass(java.lang.String.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.target = java.util.Objects.requireNonNull(builder.target, "target is required");
this.template = java.util.Objects.requireNonNull(builder.template, "template is required");
this.capabilities = (java.util.List)builder.capabilities;
this.deploymentType = builder.deploymentType;
this.description = builder.description;
this.managedExecution = builder.managedExecution;
this.operationPreferences = builder.operationPreferences;
this.stackSetName = builder.stackSetName;
}
@Override
public final io.github.cdklabs.cdk.stacksets.StackSetTarget getTarget() {
return this.target;
}
@Override
public final io.github.cdklabs.cdk.stacksets.StackSetTemplate getTemplate() {
return this.template;
}
@Override
public final java.util.List getCapabilities() {
return this.capabilities;
}
@Override
public final io.github.cdklabs.cdk.stacksets.DeploymentType getDeploymentType() {
return this.deploymentType;
}
@Override
public final java.lang.String getDescription() {
return this.description;
}
@Override
public final java.lang.Boolean getManagedExecution() {
return this.managedExecution;
}
@Override
public final io.github.cdklabs.cdk.stacksets.OperationPreferences getOperationPreferences() {
return this.operationPreferences;
}
@Override
public final java.lang.String getStackSetName() {
return this.stackSetName;
}
@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("target", om.valueToTree(this.getTarget()));
data.set("template", om.valueToTree(this.getTemplate()));
if (this.getCapabilities() != null) {
data.set("capabilities", om.valueToTree(this.getCapabilities()));
}
if (this.getDeploymentType() != null) {
data.set("deploymentType", om.valueToTree(this.getDeploymentType()));
}
if (this.getDescription() != null) {
data.set("description", om.valueToTree(this.getDescription()));
}
if (this.getManagedExecution() != null) {
data.set("managedExecution", om.valueToTree(this.getManagedExecution()));
}
if (this.getOperationPreferences() != null) {
data.set("operationPreferences", om.valueToTree(this.getOperationPreferences()));
}
if (this.getStackSetName() != null) {
data.set("stackSetName", om.valueToTree(this.getStackSetName()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("cdk-stacksets.StackSetProps"));
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;
StackSetProps.Jsii$Proxy that = (StackSetProps.Jsii$Proxy) o;
if (!target.equals(that.target)) return false;
if (!template.equals(that.template)) return false;
if (this.capabilities != null ? !this.capabilities.equals(that.capabilities) : that.capabilities != null) return false;
if (this.deploymentType != null ? !this.deploymentType.equals(that.deploymentType) : that.deploymentType != null) return false;
if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false;
if (this.managedExecution != null ? !this.managedExecution.equals(that.managedExecution) : that.managedExecution != null) return false;
if (this.operationPreferences != null ? !this.operationPreferences.equals(that.operationPreferences) : that.operationPreferences != null) return false;
return this.stackSetName != null ? this.stackSetName.equals(that.stackSetName) : that.stackSetName == null;
}
@Override
public final int hashCode() {
int result = this.target.hashCode();
result = 31 * result + (this.template.hashCode());
result = 31 * result + (this.capabilities != null ? this.capabilities.hashCode() : 0);
result = 31 * result + (this.deploymentType != null ? this.deploymentType.hashCode() : 0);
result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
result = 31 * result + (this.managedExecution != null ? this.managedExecution.hashCode() : 0);
result = 31 * result + (this.operationPreferences != null ? this.operationPreferences.hashCode() : 0);
result = 31 * result + (this.stackSetName != null ? this.stackSetName.hashCode() : 0);
return result;
}
}
}