commonMain.aws.sdk.kotlin.services.dataexchange.model.JobEntry.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataexchange-jvm Show documentation
Show all versions of dataexchange-jvm Show documentation
The AWS Kotlin client for DataExchange
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.dataexchange.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* AWS Data Exchange Jobs are asynchronous import or export operations used to create or copy assets. A data set owner can both import and export as they see fit. Someone with an entitlement to a data set can only export. Jobs are deleted 90 days after they are created.
*/
public class JobEntry private constructor(builder: Builder) {
/**
* The ARN for the job.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* The date and time that the job was created, in ISO 8601 format.
*/
public val createdAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdAt) { "A non-null value must be provided for createdAt" }
/**
* Details of the operation to be performed by the job, such as export destination details or import source details.
*/
public val details: aws.sdk.kotlin.services.dataexchange.model.ResponseDetails? = builder.details
/**
* Errors for jobs.
*/
public val errors: List? = builder.errors
/**
* The unique identifier for the job.
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
/**
* The state of the job.
*/
public val state: aws.sdk.kotlin.services.dataexchange.model.State = requireNotNull(builder.state) { "A non-null value must be provided for state" }
/**
* The job type.
*/
public val type: aws.sdk.kotlin.services.dataexchange.model.Type = requireNotNull(builder.type) { "A non-null value must be provided for type" }
/**
* The date and time that the job was last updated, in ISO 8601 format.
*/
public val updatedAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updatedAt) { "A non-null value must be provided for updatedAt" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dataexchange.model.JobEntry = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("JobEntry(")
append("arn=$arn,")
append("createdAt=$createdAt,")
append("details=$details,")
append("errors=$errors,")
append("id=$id,")
append("state=$state,")
append("type=$type,")
append("updatedAt=$updatedAt")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn.hashCode()
result = 31 * result + (createdAt.hashCode())
result = 31 * result + (details?.hashCode() ?: 0)
result = 31 * result + (errors?.hashCode() ?: 0)
result = 31 * result + (id.hashCode())
result = 31 * result + (state.hashCode())
result = 31 * result + (type.hashCode())
result = 31 * result + (updatedAt.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 JobEntry
if (arn != other.arn) return false
if (createdAt != other.createdAt) return false
if (details != other.details) return false
if (errors != other.errors) return false
if (id != other.id) return false
if (state != other.state) return false
if (type != other.type) return false
if (updatedAt != other.updatedAt) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dataexchange.model.JobEntry = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ARN for the job.
*/
public var arn: kotlin.String? = null
/**
* The date and time that the job was created, in ISO 8601 format.
*/
public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Details of the operation to be performed by the job, such as export destination details or import source details.
*/
public var details: aws.sdk.kotlin.services.dataexchange.model.ResponseDetails? = null
/**
* Errors for jobs.
*/
public var errors: List? = null
/**
* The unique identifier for the job.
*/
public var id: kotlin.String? = null
/**
* The state of the job.
*/
public var state: aws.sdk.kotlin.services.dataexchange.model.State? = null
/**
* The job type.
*/
public var type: aws.sdk.kotlin.services.dataexchange.model.Type? = null
/**
* The date and time that the job was last updated, in ISO 8601 format.
*/
public var updatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.JobEntry) : this() {
this.arn = x.arn
this.createdAt = x.createdAt
this.details = x.details
this.errors = x.errors
this.id = x.id
this.state = x.state
this.type = x.type
this.updatedAt = x.updatedAt
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dataexchange.model.JobEntry = JobEntry(this)
/**
* construct an [aws.sdk.kotlin.services.dataexchange.model.ResponseDetails] inside the given [block]
*/
public fun details(block: aws.sdk.kotlin.services.dataexchange.model.ResponseDetails.Builder.() -> kotlin.Unit) {
this.details = aws.sdk.kotlin.services.dataexchange.model.ResponseDetails.invoke(block)
}
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
if (id == null) id = ""
if (state == null) state = State.SdkUnknown("no value provided")
if (type == null) type = Type.SdkUnknown("no value provided")
if (updatedAt == null) updatedAt = Instant.fromEpochSeconds(0)
return this
}
}
}