commonMain.aws.sdk.kotlin.services.securityhub.model.AutomationRulesMetadata.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of securityhub-jvm Show documentation
Show all versions of securityhub-jvm Show documentation
The AWS SDK for Kotlin client for SecurityHub
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.securityhub.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Metadata for automation rules in the calling account. The response includes rules with a `RuleStatus` of `ENABLED` and `DISABLED`.
*/
public class AutomationRulesMetadata private constructor(builder: Builder) {
/**
* A timestamp that indicates when the rule was created.
*
* This field accepts only the specified formats. Timestamps can end with `Z` or `("+" / "-") time-hour [":" time-minute]`. The time-secfrac after seconds is limited to a maximum of 9 digits. The offset is bounded by +/-18:00. Here are valid timestamp formats with examples:
* + `YYYY-MM-DDTHH:MM:SSZ` (for example, `2019-01-31T23:00:00Z`)
* + `YYYY-MM-DDTHH:MM:SS.mmmmmmmmmZ` (for example, `2019-01-31T23:00:00.123456789Z`)
* + `YYYY-MM-DDTHH:MM:SS+HH:MM` (for example, `2024-01-04T15:25:10+17:59`)
* + `YYYY-MM-DDTHH:MM:SS-HHMM` (for example, `2024-01-04T15:25:10-1759`)
* + `YYYY-MM-DDTHH:MM:SS.mmmmmmmmm+HH:MM` (for example, `2024-01-04T15:25:10.123456789+17:59`)
*/
public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
/**
* The principal that created a rule.
*/
public val createdBy: kotlin.String? = builder.createdBy
/**
* A description of the rule.
*/
public val description: kotlin.String? = builder.description
/**
* Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. This is useful when a finding matches the criteria for multiple rules, and each rule has different actions. If a rule is terminal, Security Hub applies the rule action to a finding that matches the rule criteria and doesn't evaluate other rules for the finding. By default, a rule isn't terminal.
*/
public val isTerminal: kotlin.Boolean? = builder.isTerminal
/**
* The Amazon Resource Name (ARN) for the rule.
*/
public val ruleArn: kotlin.String? = builder.ruleArn
/**
* The name of the rule.
*/
public val ruleName: kotlin.String? = builder.ruleName
/**
* An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings. Security Hub applies rules with lower values for this parameter first.
*/
public val ruleOrder: kotlin.Int? = builder.ruleOrder
/**
* Whether the rule is active after it is created. If this parameter is equal to `ENABLED`, Security Hub starts applying the rule to findings and finding updates after the rule is created. To change the value of this parameter after creating a rule, use `BatchUpdateAutomationRules`[](https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_BatchUpdateAutomationRules.html).
*/
public val ruleStatus: aws.sdk.kotlin.services.securityhub.model.RuleStatus? = builder.ruleStatus
/**
* A timestamp that indicates when the rule was most recently updated.
*
* This field accepts only the specified formats. Timestamps can end with `Z` or `("+" / "-") time-hour [":" time-minute]`. The time-secfrac after seconds is limited to a maximum of 9 digits. The offset is bounded by +/-18:00. Here are valid timestamp formats with examples:
* + `YYYY-MM-DDTHH:MM:SSZ` (for example, `2019-01-31T23:00:00Z`)
* + `YYYY-MM-DDTHH:MM:SS.mmmmmmmmmZ` (for example, `2019-01-31T23:00:00.123456789Z`)
* + `YYYY-MM-DDTHH:MM:SS+HH:MM` (for example, `2024-01-04T15:25:10+17:59`)
* + `YYYY-MM-DDTHH:MM:SS-HHMM` (for example, `2024-01-04T15:25:10-1759`)
* + `YYYY-MM-DDTHH:MM:SS.mmmmmmmmm+HH:MM` (for example, `2024-01-04T15:25:10.123456789+17:59`)
*/
public val updatedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.updatedAt
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.securityhub.model.AutomationRulesMetadata = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AutomationRulesMetadata(")
append("createdAt=$createdAt,")
append("createdBy=$createdBy,")
append("description=$description,")
append("isTerminal=$isTerminal,")
append("ruleArn=$ruleArn,")
append("ruleName=$ruleName,")
append("ruleOrder=$ruleOrder,")
append("ruleStatus=$ruleStatus,")
append("updatedAt=$updatedAt")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = createdAt?.hashCode() ?: 0
result = 31 * result + (createdBy?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (isTerminal?.hashCode() ?: 0)
result = 31 * result + (ruleArn?.hashCode() ?: 0)
result = 31 * result + (ruleName?.hashCode() ?: 0)
result = 31 * result + (ruleOrder ?: 0)
result = 31 * result + (ruleStatus?.hashCode() ?: 0)
result = 31 * result + (updatedAt?.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 AutomationRulesMetadata
if (createdAt != other.createdAt) return false
if (createdBy != other.createdBy) return false
if (description != other.description) return false
if (isTerminal != other.isTerminal) return false
if (ruleArn != other.ruleArn) return false
if (ruleName != other.ruleName) return false
if (ruleOrder != other.ruleOrder) return false
if (ruleStatus != other.ruleStatus) return false
if (updatedAt != other.updatedAt) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.securityhub.model.AutomationRulesMetadata = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A timestamp that indicates when the rule was created.
*
* This field accepts only the specified formats. Timestamps can end with `Z` or `("+" / "-") time-hour [":" time-minute]`. The time-secfrac after seconds is limited to a maximum of 9 digits. The offset is bounded by +/-18:00. Here are valid timestamp formats with examples:
* + `YYYY-MM-DDTHH:MM:SSZ` (for example, `2019-01-31T23:00:00Z`)
* + `YYYY-MM-DDTHH:MM:SS.mmmmmmmmmZ` (for example, `2019-01-31T23:00:00.123456789Z`)
* + `YYYY-MM-DDTHH:MM:SS+HH:MM` (for example, `2024-01-04T15:25:10+17:59`)
* + `YYYY-MM-DDTHH:MM:SS-HHMM` (for example, `2024-01-04T15:25:10-1759`)
* + `YYYY-MM-DDTHH:MM:SS.mmmmmmmmm+HH:MM` (for example, `2024-01-04T15:25:10.123456789+17:59`)
*/
public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The principal that created a rule.
*/
public var createdBy: kotlin.String? = null
/**
* A description of the rule.
*/
public var description: kotlin.String? = null
/**
* Specifies whether a rule is the last to be applied with respect to a finding that matches the rule criteria. This is useful when a finding matches the criteria for multiple rules, and each rule has different actions. If a rule is terminal, Security Hub applies the rule action to a finding that matches the rule criteria and doesn't evaluate other rules for the finding. By default, a rule isn't terminal.
*/
public var isTerminal: kotlin.Boolean? = null
/**
* The Amazon Resource Name (ARN) for the rule.
*/
public var ruleArn: kotlin.String? = null
/**
* The name of the rule.
*/
public var ruleName: kotlin.String? = null
/**
* An integer ranging from 1 to 1000 that represents the order in which the rule action is applied to findings. Security Hub applies rules with lower values for this parameter first.
*/
public var ruleOrder: kotlin.Int? = null
/**
* Whether the rule is active after it is created. If this parameter is equal to `ENABLED`, Security Hub starts applying the rule to findings and finding updates after the rule is created. To change the value of this parameter after creating a rule, use `BatchUpdateAutomationRules`[](https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_BatchUpdateAutomationRules.html).
*/
public var ruleStatus: aws.sdk.kotlin.services.securityhub.model.RuleStatus? = null
/**
* A timestamp that indicates when the rule was most recently updated.
*
* This field accepts only the specified formats. Timestamps can end with `Z` or `("+" / "-") time-hour [":" time-minute]`. The time-secfrac after seconds is limited to a maximum of 9 digits. The offset is bounded by +/-18:00. Here are valid timestamp formats with examples:
* + `YYYY-MM-DDTHH:MM:SSZ` (for example, `2019-01-31T23:00:00Z`)
* + `YYYY-MM-DDTHH:MM:SS.mmmmmmmmmZ` (for example, `2019-01-31T23:00:00.123456789Z`)
* + `YYYY-MM-DDTHH:MM:SS+HH:MM` (for example, `2024-01-04T15:25:10+17:59`)
* + `YYYY-MM-DDTHH:MM:SS-HHMM` (for example, `2024-01-04T15:25:10-1759`)
* + `YYYY-MM-DDTHH:MM:SS.mmmmmmmmm+HH:MM` (for example, `2024-01-04T15:25:10.123456789+17:59`)
*/
public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.securityhub.model.AutomationRulesMetadata) : this() {
this.createdAt = x.createdAt
this.createdBy = x.createdBy
this.description = x.description
this.isTerminal = x.isTerminal
this.ruleArn = x.ruleArn
this.ruleName = x.ruleName
this.ruleOrder = x.ruleOrder
this.ruleStatus = x.ruleStatus
this.updatedAt = x.updatedAt
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.securityhub.model.AutomationRulesMetadata = AutomationRulesMetadata(this)
internal fun correctErrors(): Builder {
return this
}
}
}