commonMain.aws.sdk.kotlin.services.codegurusecurity.model.CreateScanResponse.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
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codegurusecurity.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateScanResponse private constructor(builder: Builder) {
/**
* The identifier for the resource object that contains resources that were scanned.
*/
public val resourceId: aws.sdk.kotlin.services.codegurusecurity.model.ResourceId? = builder.resourceId
/**
* UUID that identifies the individual scan run.
*/
public val runId: kotlin.String = requireNotNull(builder.runId) { "A non-null value must be provided for runId" }
/**
* The name of the scan.
*/
public val scanName: kotlin.String = requireNotNull(builder.scanName) { "A non-null value must be provided for scanName" }
/**
* The ARN for the scan name.
*/
public val scanNameArn: kotlin.String? = builder.scanNameArn
/**
* The current state of the scan. Returns either `InProgress`, `Successful`, or `Failed`.
*/
public val scanState: aws.sdk.kotlin.services.codegurusecurity.model.ScanState = requireNotNull(builder.scanState) { "A non-null value must be provided for scanState" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codegurusecurity.model.CreateScanResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateScanResponse(")
append("resourceId=$resourceId,")
append("runId=$runId,")
append("scanName=$scanName,")
append("scanNameArn=$scanNameArn,")
append("scanState=$scanState")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = resourceId?.hashCode() ?: 0
result = 31 * result + (runId.hashCode())
result = 31 * result + (scanName.hashCode())
result = 31 * result + (scanNameArn?.hashCode() ?: 0)
result = 31 * result + (scanState.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 CreateScanResponse
if (resourceId != other.resourceId) return false
if (runId != other.runId) return false
if (scanName != other.scanName) return false
if (scanNameArn != other.scanNameArn) return false
if (scanState != other.scanState) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codegurusecurity.model.CreateScanResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The identifier for the resource object that contains resources that were scanned.
*/
public var resourceId: aws.sdk.kotlin.services.codegurusecurity.model.ResourceId? = null
/**
* UUID that identifies the individual scan run.
*/
public var runId: kotlin.String? = null
/**
* The name of the scan.
*/
public var scanName: kotlin.String? = null
/**
* The ARN for the scan name.
*/
public var scanNameArn: kotlin.String? = null
/**
* The current state of the scan. Returns either `InProgress`, `Successful`, or `Failed`.
*/
public var scanState: aws.sdk.kotlin.services.codegurusecurity.model.ScanState? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codegurusecurity.model.CreateScanResponse) : this() {
this.resourceId = x.resourceId
this.runId = x.runId
this.scanName = x.scanName
this.scanNameArn = x.scanNameArn
this.scanState = x.scanState
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codegurusecurity.model.CreateScanResponse = CreateScanResponse(this)
internal fun correctErrors(): Builder {
if (runId == null) runId = ""
if (scanName == null) scanName = ""
if (scanState == null) scanState = ScanState.SdkUnknown("no value provided")
return this
}
}
}