commonMain.aws.sdk.kotlin.services.codegurusecurity.model.FindingIdentifier.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
/**
* An object that contains information about a finding and the scan that generated it.
*/
public class FindingIdentifier private constructor(builder: Builder) {
/**
* The identifier for a finding.
*/
public val findingId: kotlin.String = requireNotNull(builder.findingId) { "A non-null value must be provided for findingId" }
/**
* The name of the scan that generated the finding.
*/
public val scanName: kotlin.String = requireNotNull(builder.scanName) { "A non-null value must be provided for scanName" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codegurusecurity.model.FindingIdentifier = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FindingIdentifier(")
append("findingId=$findingId,")
append("scanName=$scanName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = findingId.hashCode()
result = 31 * result + (scanName.hashCode())
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 FindingIdentifier
if (findingId != other.findingId) return false
if (scanName != other.scanName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codegurusecurity.model.FindingIdentifier = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The identifier for a finding.
*/
public var findingId: kotlin.String? = null
/**
* The name of the scan that generated the finding.
*/
public var scanName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codegurusecurity.model.FindingIdentifier) : this() {
this.findingId = x.findingId
this.scanName = x.scanName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codegurusecurity.model.FindingIdentifier = FindingIdentifier(this)
internal fun correctErrors(): Builder {
if (findingId == null) findingId = ""
if (scanName == null) scanName = ""
return this
}
}
}