commonMain.aws.sdk.kotlin.services.codestarconnections.model.ResourceSyncEvent.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codestarconnections-jvm Show documentation
Show all versions of codestarconnections-jvm Show documentation
The AWS SDK for Kotlin client for CodeStar connections
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codestarconnections.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Information about a resource sync event for the resource associated with a sync configuration.
*/
public class ResourceSyncEvent private constructor(builder: Builder) {
/**
* The event for a resource sync event.
*/
public val event: kotlin.String = requireNotNull(builder.event) { "A non-null value must be provided for event" }
/**
* The ID for a resource sync event.
*/
public val externalId: kotlin.String? = builder.externalId
/**
* The time that a resource sync event occurred.
*/
public val time: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.time) { "A non-null value must be provided for time" }
/**
* The type of resource sync event.
*/
public val type: kotlin.String = requireNotNull(builder.type) { "A non-null value must be provided for type" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codestarconnections.model.ResourceSyncEvent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ResourceSyncEvent(")
append("event=$event,")
append("externalId=$externalId,")
append("time=$time,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = event.hashCode()
result = 31 * result + (externalId?.hashCode() ?: 0)
result = 31 * result + (time.hashCode())
result = 31 * result + (type.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 ResourceSyncEvent
if (event != other.event) return false
if (externalId != other.externalId) return false
if (time != other.time) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codestarconnections.model.ResourceSyncEvent = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The event for a resource sync event.
*/
public var event: kotlin.String? = null
/**
* The ID for a resource sync event.
*/
public var externalId: kotlin.String? = null
/**
* The time that a resource sync event occurred.
*/
public var time: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The type of resource sync event.
*/
public var type: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codestarconnections.model.ResourceSyncEvent) : this() {
this.event = x.event
this.externalId = x.externalId
this.time = x.time
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codestarconnections.model.ResourceSyncEvent = ResourceSyncEvent(this)
internal fun correctErrors(): Builder {
if (event == null) event = ""
if (time == null) time = Instant.fromEpochSeconds(0)
if (type == null) type = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy