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

io.github.cdklabs.cdkvalidatorcfnguard.CfnGuardValidatorProps Maven / Gradle / Ivy

There is a newer version: 0.0.60
Show newest version
package io.github.cdklabs.cdkvalidatorcfnguard;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.85.0 (build 08ee592)", date = "2023-07-31T15:02:01.377Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdkvalidatorcfnguard.$Module.class, fqn = "@cdklabs/cdk-validator-cfnguard.CfnGuardValidatorProps")
@software.amazon.jsii.Jsii.Proxy(CfnGuardValidatorProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface CfnGuardValidatorProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * Enable the default Control Tower Guard rules.
     * 

* Default: true */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.Boolean getControlTowerRulesEnabled() { return null; } /** * List of rule names to disable. *

* Default: - no rules are disabled */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.util.List getDisabledRules() { return null; } /** * Local file paths to either a directory containing guard rules, or to an individual guard rule file. *

* If the path is to a directory then the directory must * only contain guard rule and the plugin will use * all the rules in the directory *

* Default: - no local rules will be used */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.util.List getRules() { return null; } /** * @return a {@link Builder} of {@link CfnGuardValidatorProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link CfnGuardValidatorProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { java.lang.Boolean controlTowerRulesEnabled; java.util.List disabledRules; java.util.List rules; /** * Sets the value of {@link CfnGuardValidatorProps#getControlTowerRulesEnabled} * @param controlTowerRulesEnabled Enable the default Control Tower Guard rules. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder controlTowerRulesEnabled(java.lang.Boolean controlTowerRulesEnabled) { this.controlTowerRulesEnabled = controlTowerRulesEnabled; return this; } /** * Sets the value of {@link CfnGuardValidatorProps#getDisabledRules} * @param disabledRules List of rule names to disable. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder disabledRules(java.util.List disabledRules) { this.disabledRules = disabledRules; return this; } /** * Sets the value of {@link CfnGuardValidatorProps#getRules} * @param rules Local file paths to either a directory containing guard rules, or to an individual guard rule file. * If the path is to a directory then the directory must * only contain guard rule and the plugin will use * all the rules in the directory * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder rules(java.util.List rules) { this.rules = rules; return this; } /** * Builds the configured instance. * @return a new instance of {@link CfnGuardValidatorProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public CfnGuardValidatorProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link CfnGuardValidatorProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnGuardValidatorProps { private final java.lang.Boolean controlTowerRulesEnabled; private final java.util.List disabledRules; private final java.util.List rules; /** * 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.controlTowerRulesEnabled = software.amazon.jsii.Kernel.get(this, "controlTowerRulesEnabled", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.disabledRules = software.amazon.jsii.Kernel.get(this, "disabledRules", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); this.rules = software.amazon.jsii.Kernel.get(this, "rules", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.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.controlTowerRulesEnabled = builder.controlTowerRulesEnabled; this.disabledRules = builder.disabledRules; this.rules = builder.rules; } @Override public final java.lang.Boolean getControlTowerRulesEnabled() { return this.controlTowerRulesEnabled; } @Override public final java.util.List getDisabledRules() { return this.disabledRules; } @Override public final java.util.List getRules() { return this.rules; } @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.getControlTowerRulesEnabled() != null) { data.set("controlTowerRulesEnabled", om.valueToTree(this.getControlTowerRulesEnabled())); } if (this.getDisabledRules() != null) { data.set("disabledRules", om.valueToTree(this.getDisabledRules())); } if (this.getRules() != null) { data.set("rules", om.valueToTree(this.getRules())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@cdklabs/cdk-validator-cfnguard.CfnGuardValidatorProps")); 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; CfnGuardValidatorProps.Jsii$Proxy that = (CfnGuardValidatorProps.Jsii$Proxy) o; if (this.controlTowerRulesEnabled != null ? !this.controlTowerRulesEnabled.equals(that.controlTowerRulesEnabled) : that.controlTowerRulesEnabled != null) return false; if (this.disabledRules != null ? !this.disabledRules.equals(that.disabledRules) : that.disabledRules != null) return false; return this.rules != null ? this.rules.equals(that.rules) : that.rules == null; } @Override public final int hashCode() { int result = this.controlTowerRulesEnabled != null ? this.controlTowerRulesEnabled.hashCode() : 0; result = 31 * result + (this.disabledRules != null ? this.disabledRules.hashCode() : 0); result = 31 * result + (this.rules != null ? this.rules.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy