
commonMain.aws.sdk.kotlin.services.iot.model.AuditSuppression.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* Filters out specific findings of a Device Defender audit.
*/
public class AuditSuppression private constructor(builder: Builder) {
/**
* An audit check name. Checks must be enabled for your account. (Use `DescribeAccountAuditConfiguration` to see the list of all checks, including those that are enabled or use `UpdateAccountAuditConfiguration` to select which checks are enabled.)
*/
public val checkName: kotlin.String = requireNotNull(builder.checkName) { "A non-null value must be provided for checkName" }
/**
* The description of the audit suppression.
*/
public val description: kotlin.String? = builder.description
/**
* The expiration date (epoch timestamp in seconds) that you want the suppression to adhere to.
*/
public val expirationDate: aws.smithy.kotlin.runtime.time.Instant? = builder.expirationDate
/**
* Information that identifies the noncompliant resource.
*/
public val resourceIdentifier: aws.sdk.kotlin.services.iot.model.ResourceIdentifier? = builder.resourceIdentifier
/**
* Indicates whether a suppression should exist indefinitely or not.
*/
public val suppressIndefinitely: kotlin.Boolean? = builder.suppressIndefinitely
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.AuditSuppression = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AuditSuppression(")
append("checkName=$checkName,")
append("description=$description,")
append("expirationDate=$expirationDate,")
append("resourceIdentifier=$resourceIdentifier,")
append("suppressIndefinitely=$suppressIndefinitely")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = checkName.hashCode()
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (expirationDate?.hashCode() ?: 0)
result = 31 * result + (resourceIdentifier?.hashCode() ?: 0)
result = 31 * result + (suppressIndefinitely?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as AuditSuppression
if (checkName != other.checkName) return false
if (description != other.description) return false
if (expirationDate != other.expirationDate) return false
if (resourceIdentifier != other.resourceIdentifier) return false
if (suppressIndefinitely != other.suppressIndefinitely) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.AuditSuppression = Builder(this).apply(block).build()
public class Builder {
/**
* An audit check name. Checks must be enabled for your account. (Use `DescribeAccountAuditConfiguration` to see the list of all checks, including those that are enabled or use `UpdateAccountAuditConfiguration` to select which checks are enabled.)
*/
public var checkName: kotlin.String? = null
/**
* The description of the audit suppression.
*/
public var description: kotlin.String? = null
/**
* The expiration date (epoch timestamp in seconds) that you want the suppression to adhere to.
*/
public var expirationDate: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Information that identifies the noncompliant resource.
*/
public var resourceIdentifier: aws.sdk.kotlin.services.iot.model.ResourceIdentifier? = null
/**
* Indicates whether a suppression should exist indefinitely or not.
*/
public var suppressIndefinitely: kotlin.Boolean? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.AuditSuppression) : this() {
this.checkName = x.checkName
this.description = x.description
this.expirationDate = x.expirationDate
this.resourceIdentifier = x.resourceIdentifier
this.suppressIndefinitely = x.suppressIndefinitely
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.AuditSuppression = AuditSuppression(this)
/**
* construct an [aws.sdk.kotlin.services.iot.model.ResourceIdentifier] inside the given [block]
*/
public fun resourceIdentifier(block: aws.sdk.kotlin.services.iot.model.ResourceIdentifier.Builder.() -> kotlin.Unit) {
this.resourceIdentifier = aws.sdk.kotlin.services.iot.model.ResourceIdentifier.invoke(block)
}
internal fun correctErrors(): Builder {
if (checkName == null) checkName = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy