
commonMain.aws.sdk.kotlin.services.iot.model.ViolationEvent.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
/**
* Information about a Device Defender security profile behavior violation.
*/
public class ViolationEvent private constructor(builder: Builder) {
/**
* The behavior that was violated.
*/
public val behavior: aws.sdk.kotlin.services.iot.model.Behavior? = builder.behavior
/**
* The value of the metric (the measurement).
*/
public val metricValue: aws.sdk.kotlin.services.iot.model.MetricValue? = builder.metricValue
/**
* The name of the security profile whose behavior was violated.
*/
public val securityProfileName: kotlin.String? = builder.securityProfileName
/**
* The name of the thing responsible for the violation event.
*/
public val thingName: kotlin.String? = builder.thingName
/**
* The verification state of the violation (detect alarm).
*/
public val verificationState: aws.sdk.kotlin.services.iot.model.VerificationState? = builder.verificationState
/**
* The description of the verification state of the violation.
*/
public val verificationStateDescription: kotlin.String? = builder.verificationStateDescription
/**
* The details of a violation event.
*/
public val violationEventAdditionalInfo: aws.sdk.kotlin.services.iot.model.ViolationEventAdditionalInfo? = builder.violationEventAdditionalInfo
/**
* The time the violation event occurred.
*/
public val violationEventTime: aws.smithy.kotlin.runtime.time.Instant? = builder.violationEventTime
/**
* The type of violation event.
*/
public val violationEventType: aws.sdk.kotlin.services.iot.model.ViolationEventType? = builder.violationEventType
/**
* The ID of the violation event.
*/
public val violationId: kotlin.String? = builder.violationId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.ViolationEvent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ViolationEvent(")
append("behavior=$behavior,")
append("metricValue=$metricValue,")
append("securityProfileName=$securityProfileName,")
append("thingName=$thingName,")
append("verificationState=$verificationState,")
append("verificationStateDescription=$verificationStateDescription,")
append("violationEventAdditionalInfo=$violationEventAdditionalInfo,")
append("violationEventTime=$violationEventTime,")
append("violationEventType=$violationEventType,")
append("violationId=$violationId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = behavior?.hashCode() ?: 0
result = 31 * result + (metricValue?.hashCode() ?: 0)
result = 31 * result + (securityProfileName?.hashCode() ?: 0)
result = 31 * result + (thingName?.hashCode() ?: 0)
result = 31 * result + (verificationState?.hashCode() ?: 0)
result = 31 * result + (verificationStateDescription?.hashCode() ?: 0)
result = 31 * result + (violationEventAdditionalInfo?.hashCode() ?: 0)
result = 31 * result + (violationEventTime?.hashCode() ?: 0)
result = 31 * result + (violationEventType?.hashCode() ?: 0)
result = 31 * result + (violationId?.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 ViolationEvent
if (behavior != other.behavior) return false
if (metricValue != other.metricValue) return false
if (securityProfileName != other.securityProfileName) return false
if (thingName != other.thingName) return false
if (verificationState != other.verificationState) return false
if (verificationStateDescription != other.verificationStateDescription) return false
if (violationEventAdditionalInfo != other.violationEventAdditionalInfo) return false
if (violationEventTime != other.violationEventTime) return false
if (violationEventType != other.violationEventType) return false
if (violationId != other.violationId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.ViolationEvent = Builder(this).apply(block).build()
public class Builder {
/**
* The behavior that was violated.
*/
public var behavior: aws.sdk.kotlin.services.iot.model.Behavior? = null
/**
* The value of the metric (the measurement).
*/
public var metricValue: aws.sdk.kotlin.services.iot.model.MetricValue? = null
/**
* The name of the security profile whose behavior was violated.
*/
public var securityProfileName: kotlin.String? = null
/**
* The name of the thing responsible for the violation event.
*/
public var thingName: kotlin.String? = null
/**
* The verification state of the violation (detect alarm).
*/
public var verificationState: aws.sdk.kotlin.services.iot.model.VerificationState? = null
/**
* The description of the verification state of the violation.
*/
public var verificationStateDescription: kotlin.String? = null
/**
* The details of a violation event.
*/
public var violationEventAdditionalInfo: aws.sdk.kotlin.services.iot.model.ViolationEventAdditionalInfo? = null
/**
* The time the violation event occurred.
*/
public var violationEventTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The type of violation event.
*/
public var violationEventType: aws.sdk.kotlin.services.iot.model.ViolationEventType? = null
/**
* The ID of the violation event.
*/
public var violationId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.ViolationEvent) : this() {
this.behavior = x.behavior
this.metricValue = x.metricValue
this.securityProfileName = x.securityProfileName
this.thingName = x.thingName
this.verificationState = x.verificationState
this.verificationStateDescription = x.verificationStateDescription
this.violationEventAdditionalInfo = x.violationEventAdditionalInfo
this.violationEventTime = x.violationEventTime
this.violationEventType = x.violationEventType
this.violationId = x.violationId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.ViolationEvent = ViolationEvent(this)
/**
* construct an [aws.sdk.kotlin.services.iot.model.Behavior] inside the given [block]
*/
public fun behavior(block: aws.sdk.kotlin.services.iot.model.Behavior.Builder.() -> kotlin.Unit) {
this.behavior = aws.sdk.kotlin.services.iot.model.Behavior.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.iot.model.MetricValue] inside the given [block]
*/
public fun metricValue(block: aws.sdk.kotlin.services.iot.model.MetricValue.Builder.() -> kotlin.Unit) {
this.metricValue = aws.sdk.kotlin.services.iot.model.MetricValue.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.iot.model.ViolationEventAdditionalInfo] inside the given [block]
*/
public fun violationEventAdditionalInfo(block: aws.sdk.kotlin.services.iot.model.ViolationEventAdditionalInfo.Builder.() -> kotlin.Unit) {
this.violationEventAdditionalInfo = aws.sdk.kotlin.services.iot.model.ViolationEventAdditionalInfo.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy