commonMain.aws.sdk.kotlin.services.securityhub.model.Note.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
/**
* A user-defined note added to a finding.
*/
public class Note private constructor(builder: Builder) {
/**
* The text of a note.
*
* Length Constraints: Minimum of 1. Maximum of 512.
*/
public val text: kotlin.String? = builder.text
/**
* A timestamp that indicates when the note was 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: kotlin.String? = builder.updatedAt
/**
* The principal that created a note.
*/
public val updatedBy: kotlin.String? = builder.updatedBy
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.securityhub.model.Note = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Note(")
append("text=$text,")
append("updatedAt=$updatedAt,")
append("updatedBy=$updatedBy")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = text?.hashCode() ?: 0
result = 31 * result + (updatedAt?.hashCode() ?: 0)
result = 31 * result + (updatedBy?.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 Note
if (text != other.text) return false
if (updatedAt != other.updatedAt) return false
if (updatedBy != other.updatedBy) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.securityhub.model.Note = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The text of a note.
*
* Length Constraints: Minimum of 1. Maximum of 512.
*/
public var text: kotlin.String? = null
/**
* A timestamp that indicates when the note was 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: kotlin.String? = null
/**
* The principal that created a note.
*/
public var updatedBy: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.securityhub.model.Note) : this() {
this.text = x.text
this.updatedAt = x.updatedAt
this.updatedBy = x.updatedBy
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.securityhub.model.Note = Note(this)
internal fun correctErrors(): Builder {
return this
}
}
}