
commonMain.aws.sdk.kotlin.services.iot.model.StartDetectMitigationActionsTaskRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
public class StartDetectMitigationActionsTaskRequest private constructor(builder: Builder) {
/**
* The actions to be performed when a device has unexpected behavior.
*/
public val actions: List? = builder.actions
/**
* Each mitigation action task must have a unique client request token. If you try to create a new task with the same token as a task that already exists, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.
*/
public val clientRequestToken: kotlin.String? = builder.clientRequestToken
/**
* Specifies to list only active violations.
*/
public val includeOnlyActiveViolations: kotlin.Boolean? = builder.includeOnlyActiveViolations
/**
* Specifies to include suppressed alerts.
*/
public val includeSuppressedAlerts: kotlin.Boolean? = builder.includeSuppressedAlerts
/**
* Specifies the ML Detect findings to which the mitigation actions are applied.
*/
public val target: aws.sdk.kotlin.services.iot.model.DetectMitigationActionsTaskTarget? = builder.target
/**
* The unique identifier of the task.
*/
public val taskId: kotlin.String? = builder.taskId
/**
* Specifies the time period of which violation events occurred between.
*/
public val violationEventOccurrenceRange: aws.sdk.kotlin.services.iot.model.ViolationEventOccurrenceRange? = builder.violationEventOccurrenceRange
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.StartDetectMitigationActionsTaskRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StartDetectMitigationActionsTaskRequest(")
append("actions=$actions,")
append("clientRequestToken=$clientRequestToken,")
append("includeOnlyActiveViolations=$includeOnlyActiveViolations,")
append("includeSuppressedAlerts=$includeSuppressedAlerts,")
append("target=$target,")
append("taskId=$taskId,")
append("violationEventOccurrenceRange=$violationEventOccurrenceRange")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = actions?.hashCode() ?: 0
result = 31 * result + (clientRequestToken?.hashCode() ?: 0)
result = 31 * result + (includeOnlyActiveViolations?.hashCode() ?: 0)
result = 31 * result + (includeSuppressedAlerts?.hashCode() ?: 0)
result = 31 * result + (target?.hashCode() ?: 0)
result = 31 * result + (taskId?.hashCode() ?: 0)
result = 31 * result + (violationEventOccurrenceRange?.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 StartDetectMitigationActionsTaskRequest
if (actions != other.actions) return false
if (clientRequestToken != other.clientRequestToken) return false
if (includeOnlyActiveViolations != other.includeOnlyActiveViolations) return false
if (includeSuppressedAlerts != other.includeSuppressedAlerts) return false
if (target != other.target) return false
if (taskId != other.taskId) return false
if (violationEventOccurrenceRange != other.violationEventOccurrenceRange) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.StartDetectMitigationActionsTaskRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The actions to be performed when a device has unexpected behavior.
*/
public var actions: List? = null
/**
* Each mitigation action task must have a unique client request token. If you try to create a new task with the same token as a task that already exists, an exception occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.
*/
public var clientRequestToken: kotlin.String? = null
/**
* Specifies to list only active violations.
*/
public var includeOnlyActiveViolations: kotlin.Boolean? = null
/**
* Specifies to include suppressed alerts.
*/
public var includeSuppressedAlerts: kotlin.Boolean? = null
/**
* Specifies the ML Detect findings to which the mitigation actions are applied.
*/
public var target: aws.sdk.kotlin.services.iot.model.DetectMitigationActionsTaskTarget? = null
/**
* The unique identifier of the task.
*/
public var taskId: kotlin.String? = null
/**
* Specifies the time period of which violation events occurred between.
*/
public var violationEventOccurrenceRange: aws.sdk.kotlin.services.iot.model.ViolationEventOccurrenceRange? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.StartDetectMitigationActionsTaskRequest) : this() {
this.actions = x.actions
this.clientRequestToken = x.clientRequestToken
this.includeOnlyActiveViolations = x.includeOnlyActiveViolations
this.includeSuppressedAlerts = x.includeSuppressedAlerts
this.target = x.target
this.taskId = x.taskId
this.violationEventOccurrenceRange = x.violationEventOccurrenceRange
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.StartDetectMitigationActionsTaskRequest = StartDetectMitigationActionsTaskRequest(this)
/**
* construct an [aws.sdk.kotlin.services.iot.model.DetectMitigationActionsTaskTarget] inside the given [block]
*/
public fun target(block: aws.sdk.kotlin.services.iot.model.DetectMitigationActionsTaskTarget.Builder.() -> kotlin.Unit) {
this.target = aws.sdk.kotlin.services.iot.model.DetectMitigationActionsTaskTarget.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.iot.model.ViolationEventOccurrenceRange] inside the given [block]
*/
public fun violationEventOccurrenceRange(block: aws.sdk.kotlin.services.iot.model.ViolationEventOccurrenceRange.Builder.() -> kotlin.Unit) {
this.violationEventOccurrenceRange = aws.sdk.kotlin.services.iot.model.ViolationEventOccurrenceRange.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy