io.github.cdklabs.cdknag.NagLoggerSuppressedErrorData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cdknag Show documentation
Show all versions of cdknag Show documentation
Check CDK v2 applications for best practices using a combination on available rule packs.
package io.github.cdklabs.cdknag;
/**
* Data for onSuppressedError method of an INagLogger.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.102.0 (build e354887)", date = "2024-08-24T00:13:16.227Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdknag.$Module.class, fqn = "cdk-nag.NagLoggerSuppressedErrorData")
@software.amazon.jsii.Jsii.Proxy(NagLoggerSuppressedErrorData.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface NagLoggerSuppressedErrorData extends software.amazon.jsii.JsiiSerializable, io.github.cdklabs.cdknag.NagLoggerErrorData {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.lang.String getErrorSuppressionReason();
/**
* @return a {@link Builder} of {@link NagLoggerSuppressedErrorData}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link NagLoggerSuppressedErrorData}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String errorSuppressionReason;
java.lang.String errorMessage;
java.lang.String nagPackName;
software.amazon.awscdk.CfnResource resource;
java.lang.String ruleExplanation;
java.lang.String ruleId;
java.lang.String ruleInfo;
io.github.cdklabs.cdknag.NagMessageLevel ruleLevel;
java.lang.String ruleOriginalName;
/**
* Sets the value of {@link NagLoggerSuppressedErrorData#getErrorSuppressionReason}
* @param errorSuppressionReason the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder errorSuppressionReason(java.lang.String errorSuppressionReason) {
this.errorSuppressionReason = errorSuppressionReason;
return this;
}
/**
* Sets the value of {@link NagLoggerSuppressedErrorData#getErrorMessage}
* @param errorMessage the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder errorMessage(java.lang.String errorMessage) {
this.errorMessage = errorMessage;
return this;
}
/**
* Sets the value of {@link NagLoggerSuppressedErrorData#getNagPackName}
* @param nagPackName the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder nagPackName(java.lang.String nagPackName) {
this.nagPackName = nagPackName;
return this;
}
/**
* Sets the value of {@link NagLoggerSuppressedErrorData#getResource}
* @param resource the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder resource(software.amazon.awscdk.CfnResource resource) {
this.resource = resource;
return this;
}
/**
* Sets the value of {@link NagLoggerSuppressedErrorData#getRuleExplanation}
* @param ruleExplanation the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder ruleExplanation(java.lang.String ruleExplanation) {
this.ruleExplanation = ruleExplanation;
return this;
}
/**
* Sets the value of {@link NagLoggerSuppressedErrorData#getRuleId}
* @param ruleId the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder ruleId(java.lang.String ruleId) {
this.ruleId = ruleId;
return this;
}
/**
* Sets the value of {@link NagLoggerSuppressedErrorData#getRuleInfo}
* @param ruleInfo the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder ruleInfo(java.lang.String ruleInfo) {
this.ruleInfo = ruleInfo;
return this;
}
/**
* Sets the value of {@link NagLoggerSuppressedErrorData#getRuleLevel}
* @param ruleLevel the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder ruleLevel(io.github.cdklabs.cdknag.NagMessageLevel ruleLevel) {
this.ruleLevel = ruleLevel;
return this;
}
/**
* Sets the value of {@link NagLoggerSuppressedErrorData#getRuleOriginalName}
* @param ruleOriginalName the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder ruleOriginalName(java.lang.String ruleOriginalName) {
this.ruleOriginalName = ruleOriginalName;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link NagLoggerSuppressedErrorData}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public NagLoggerSuppressedErrorData build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link NagLoggerSuppressedErrorData}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements NagLoggerSuppressedErrorData {
private final java.lang.String errorSuppressionReason;
private final java.lang.String errorMessage;
private final java.lang.String nagPackName;
private final software.amazon.awscdk.CfnResource resource;
private final java.lang.String ruleExplanation;
private final java.lang.String ruleId;
private final java.lang.String ruleInfo;
private final io.github.cdklabs.cdknag.NagMessageLevel ruleLevel;
private final java.lang.String ruleOriginalName;
/**
* 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.errorSuppressionReason = software.amazon.jsii.Kernel.get(this, "errorSuppressionReason", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.errorMessage = software.amazon.jsii.Kernel.get(this, "errorMessage", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.nagPackName = software.amazon.jsii.Kernel.get(this, "nagPackName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.resource = software.amazon.jsii.Kernel.get(this, "resource", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.CfnResource.class));
this.ruleExplanation = software.amazon.jsii.Kernel.get(this, "ruleExplanation", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.ruleId = software.amazon.jsii.Kernel.get(this, "ruleId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.ruleInfo = software.amazon.jsii.Kernel.get(this, "ruleInfo", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.ruleLevel = software.amazon.jsii.Kernel.get(this, "ruleLevel", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdknag.NagMessageLevel.class));
this.ruleOriginalName = software.amazon.jsii.Kernel.get(this, "ruleOriginalName", 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.errorSuppressionReason = java.util.Objects.requireNonNull(builder.errorSuppressionReason, "errorSuppressionReason is required");
this.errorMessage = java.util.Objects.requireNonNull(builder.errorMessage, "errorMessage is required");
this.nagPackName = java.util.Objects.requireNonNull(builder.nagPackName, "nagPackName is required");
this.resource = java.util.Objects.requireNonNull(builder.resource, "resource is required");
this.ruleExplanation = java.util.Objects.requireNonNull(builder.ruleExplanation, "ruleExplanation is required");
this.ruleId = java.util.Objects.requireNonNull(builder.ruleId, "ruleId is required");
this.ruleInfo = java.util.Objects.requireNonNull(builder.ruleInfo, "ruleInfo is required");
this.ruleLevel = java.util.Objects.requireNonNull(builder.ruleLevel, "ruleLevel is required");
this.ruleOriginalName = java.util.Objects.requireNonNull(builder.ruleOriginalName, "ruleOriginalName is required");
}
@Override
public final java.lang.String getErrorSuppressionReason() {
return this.errorSuppressionReason;
}
@Override
public final java.lang.String getErrorMessage() {
return this.errorMessage;
}
@Override
public final java.lang.String getNagPackName() {
return this.nagPackName;
}
@Override
public final software.amazon.awscdk.CfnResource getResource() {
return this.resource;
}
@Override
public final java.lang.String getRuleExplanation() {
return this.ruleExplanation;
}
@Override
public final java.lang.String getRuleId() {
return this.ruleId;
}
@Override
public final java.lang.String getRuleInfo() {
return this.ruleInfo;
}
@Override
public final io.github.cdklabs.cdknag.NagMessageLevel getRuleLevel() {
return this.ruleLevel;
}
@Override
public final java.lang.String getRuleOriginalName() {
return this.ruleOriginalName;
}
@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("errorSuppressionReason", om.valueToTree(this.getErrorSuppressionReason()));
data.set("errorMessage", om.valueToTree(this.getErrorMessage()));
data.set("nagPackName", om.valueToTree(this.getNagPackName()));
data.set("resource", om.valueToTree(this.getResource()));
data.set("ruleExplanation", om.valueToTree(this.getRuleExplanation()));
data.set("ruleId", om.valueToTree(this.getRuleId()));
data.set("ruleInfo", om.valueToTree(this.getRuleInfo()));
data.set("ruleLevel", om.valueToTree(this.getRuleLevel()));
data.set("ruleOriginalName", om.valueToTree(this.getRuleOriginalName()));
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("cdk-nag.NagLoggerSuppressedErrorData"));
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;
NagLoggerSuppressedErrorData.Jsii$Proxy that = (NagLoggerSuppressedErrorData.Jsii$Proxy) o;
if (!errorSuppressionReason.equals(that.errorSuppressionReason)) return false;
if (!errorMessage.equals(that.errorMessage)) return false;
if (!nagPackName.equals(that.nagPackName)) return false;
if (!resource.equals(that.resource)) return false;
if (!ruleExplanation.equals(that.ruleExplanation)) return false;
if (!ruleId.equals(that.ruleId)) return false;
if (!ruleInfo.equals(that.ruleInfo)) return false;
if (!ruleLevel.equals(that.ruleLevel)) return false;
return this.ruleOriginalName.equals(that.ruleOriginalName);
}
@Override
public final int hashCode() {
int result = this.errorSuppressionReason.hashCode();
result = 31 * result + (this.errorMessage.hashCode());
result = 31 * result + (this.nagPackName.hashCode());
result = 31 * result + (this.resource.hashCode());
result = 31 * result + (this.ruleExplanation.hashCode());
result = 31 * result + (this.ruleId.hashCode());
result = 31 * result + (this.ruleInfo.hashCode());
result = 31 * result + (this.ruleLevel.hashCode());
result = 31 * result + (this.ruleOriginalName.hashCode());
return result;
}
}
}