
commonMain.aws.sdk.kotlin.services.iottwinmaker.model.GetSyncJobResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iottwinmaker.model
import aws.smithy.kotlin.runtime.time.Instant
public class GetSyncJobResponse private constructor(builder: Builder) {
/**
* The sync job ARN.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* The creation date and time.
*/
public val creationDateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.creationDateTime) { "A non-null value must be provided for creationDateTime" }
/**
* The SyncJob response status.
*/
public val status: aws.sdk.kotlin.services.iottwinmaker.model.SyncJobStatus? = builder.status
/**
* The sync IAM role.
*/
public val syncRole: kotlin.String = requireNotNull(builder.syncRole) { "A non-null value must be provided for syncRole" }
/**
* The sync soucre.
*
* Currently the only supported syncSource is `SITEWISE `.
*/
public val syncSource: kotlin.String = requireNotNull(builder.syncSource) { "A non-null value must be provided for syncSource" }
/**
* The update date and time.
*/
public val updateDateTime: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.updateDateTime) { "A non-null value must be provided for updateDateTime" }
/**
* The ID of the workspace that contains the sync job.
*/
public val workspaceId: kotlin.String = requireNotNull(builder.workspaceId) { "A non-null value must be provided for workspaceId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iottwinmaker.model.GetSyncJobResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetSyncJobResponse(")
append("arn=$arn,")
append("creationDateTime=$creationDateTime,")
append("status=$status,")
append("syncRole=$syncRole,")
append("syncSource=$syncSource,")
append("updateDateTime=$updateDateTime,")
append("workspaceId=$workspaceId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn.hashCode()
result = 31 * result + (creationDateTime.hashCode())
result = 31 * result + (status?.hashCode() ?: 0)
result = 31 * result + (syncRole.hashCode())
result = 31 * result + (syncSource.hashCode())
result = 31 * result + (updateDateTime.hashCode())
result = 31 * result + (workspaceId.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 GetSyncJobResponse
if (arn != other.arn) return false
if (creationDateTime != other.creationDateTime) return false
if (status != other.status) return false
if (syncRole != other.syncRole) return false
if (syncSource != other.syncSource) return false
if (updateDateTime != other.updateDateTime) return false
if (workspaceId != other.workspaceId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iottwinmaker.model.GetSyncJobResponse = Builder(this).apply(block).build()
public class Builder {
/**
* The sync job ARN.
*/
public var arn: kotlin.String? = null
/**
* The creation date and time.
*/
public var creationDateTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The SyncJob response status.
*/
public var status: aws.sdk.kotlin.services.iottwinmaker.model.SyncJobStatus? = null
/**
* The sync IAM role.
*/
public var syncRole: kotlin.String? = null
/**
* The sync soucre.
*
* Currently the only supported syncSource is `SITEWISE `.
*/
public var syncSource: kotlin.String? = null
/**
* The update date and time.
*/
public var updateDateTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The ID of the workspace that contains the sync job.
*/
public var workspaceId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.GetSyncJobResponse) : this() {
this.arn = x.arn
this.creationDateTime = x.creationDateTime
this.status = x.status
this.syncRole = x.syncRole
this.syncSource = x.syncSource
this.updateDateTime = x.updateDateTime
this.workspaceId = x.workspaceId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iottwinmaker.model.GetSyncJobResponse = GetSyncJobResponse(this)
/**
* construct an [aws.sdk.kotlin.services.iottwinmaker.model.SyncJobStatus] inside the given [block]
*/
public fun status(block: aws.sdk.kotlin.services.iottwinmaker.model.SyncJobStatus.Builder.() -> kotlin.Unit) {
this.status = aws.sdk.kotlin.services.iottwinmaker.model.SyncJobStatus.invoke(block)
}
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
if (creationDateTime == null) creationDateTime = Instant.fromEpochSeconds(0)
if (syncRole == null) syncRole = ""
if (syncSource == null) syncSource = ""
if (updateDateTime == null) updateDateTime = Instant.fromEpochSeconds(0)
if (workspaceId == null) workspaceId = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy