commonMain.aws.sdk.kotlin.services.codegurusecurity.model.AccountFindingsMetric.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codegurusecurity-jvm Show documentation
Show all versions of codegurusecurity-jvm Show documentation
The AWS SDK for Kotlin client for CodeGuru Security
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codegurusecurity.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* A summary of findings metrics for an account on a specified date.
*/
public class AccountFindingsMetric private constructor(builder: Builder) {
/**
* The number of closed findings of each severity on the specified date.
*/
public val closedFindings: aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity? = builder.closedFindings
/**
* The date from which the findings metrics were retrieved.
*/
public val date: aws.smithy.kotlin.runtime.time.Instant? = builder.date
/**
* The average time in days it takes to close findings of each severity as of a specified date.
*/
public val meanTimeToClose: aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity? = builder.meanTimeToClose
/**
* The number of new findings of each severity on the specified date.
*/
public val newFindings: aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity? = builder.newFindings
/**
* The number of open findings of each severity as of the specified date.
*/
public val openFindings: aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity? = builder.openFindings
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codegurusecurity.model.AccountFindingsMetric = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AccountFindingsMetric(")
append("closedFindings=$closedFindings,")
append("date=$date,")
append("meanTimeToClose=$meanTimeToClose,")
append("newFindings=$newFindings,")
append("openFindings=$openFindings")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = closedFindings?.hashCode() ?: 0
result = 31 * result + (date?.hashCode() ?: 0)
result = 31 * result + (meanTimeToClose?.hashCode() ?: 0)
result = 31 * result + (newFindings?.hashCode() ?: 0)
result = 31 * result + (openFindings?.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 AccountFindingsMetric
if (closedFindings != other.closedFindings) return false
if (date != other.date) return false
if (meanTimeToClose != other.meanTimeToClose) return false
if (newFindings != other.newFindings) return false
if (openFindings != other.openFindings) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codegurusecurity.model.AccountFindingsMetric = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The number of closed findings of each severity on the specified date.
*/
public var closedFindings: aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity? = null
/**
* The date from which the findings metrics were retrieved.
*/
public var date: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The average time in days it takes to close findings of each severity as of a specified date.
*/
public var meanTimeToClose: aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity? = null
/**
* The number of new findings of each severity on the specified date.
*/
public var newFindings: aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity? = null
/**
* The number of open findings of each severity as of the specified date.
*/
public var openFindings: aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codegurusecurity.model.AccountFindingsMetric) : this() {
this.closedFindings = x.closedFindings
this.date = x.date
this.meanTimeToClose = x.meanTimeToClose
this.newFindings = x.newFindings
this.openFindings = x.openFindings
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codegurusecurity.model.AccountFindingsMetric = AccountFindingsMetric(this)
/**
* construct an [aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity] inside the given [block]
*/
public fun closedFindings(block: aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity.Builder.() -> kotlin.Unit) {
this.closedFindings = aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity] inside the given [block]
*/
public fun meanTimeToClose(block: aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity.Builder.() -> kotlin.Unit) {
this.meanTimeToClose = aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity] inside the given [block]
*/
public fun newFindings(block: aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity.Builder.() -> kotlin.Unit) {
this.newFindings = aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity] inside the given [block]
*/
public fun openFindings(block: aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity.Builder.() -> kotlin.Unit) {
this.openFindings = aws.sdk.kotlin.services.codegurusecurity.model.FindingMetricsValuePerSeverity.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}