
commonMain.aws.sdk.kotlin.services.lightsail.model.Operation.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lightsail.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* Describes the API operation.
*/
public class Operation private constructor(builder: Builder) {
/**
* The timestamp when the operation was initialized (`1479816991.349`).
*/
public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
/**
* The error code.
*/
public val errorCode: kotlin.String? = builder.errorCode
/**
* The error details.
*/
public val errorDetails: kotlin.String? = builder.errorDetails
/**
* The ID of the operation.
*/
public val id: kotlin.String? = builder.id
/**
* A Boolean value indicating whether the operation is terminal.
*/
public val isTerminal: kotlin.Boolean? = builder.isTerminal
/**
* The Amazon Web Services Region and Availability Zone.
*/
public val location: aws.sdk.kotlin.services.lightsail.model.ResourceLocation? = builder.location
/**
* Details about the operation (`Debian-1GB-Ohio-1`).
*/
public val operationDetails: kotlin.String? = builder.operationDetails
/**
* The type of operation.
*/
public val operationType: aws.sdk.kotlin.services.lightsail.model.OperationType? = builder.operationType
/**
* The resource name.
*/
public val resourceName: kotlin.String? = builder.resourceName
/**
* The resource type.
*/
public val resourceType: aws.sdk.kotlin.services.lightsail.model.ResourceType? = builder.resourceType
/**
* The status of the operation.
*/
public val status: aws.sdk.kotlin.services.lightsail.model.OperationStatus? = builder.status
/**
* The timestamp when the status was changed (`1479816991.349`).
*/
public val statusChangedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.statusChangedAt
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lightsail.model.Operation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Operation(")
append("createdAt=$createdAt,")
append("errorCode=$errorCode,")
append("errorDetails=$errorDetails,")
append("id=$id,")
append("isTerminal=$isTerminal,")
append("location=$location,")
append("operationDetails=$operationDetails,")
append("operationType=$operationType,")
append("resourceName=$resourceName,")
append("resourceType=$resourceType,")
append("status=$status,")
append("statusChangedAt=$statusChangedAt")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = createdAt?.hashCode() ?: 0
result = 31 * result + (errorCode?.hashCode() ?: 0)
result = 31 * result + (errorDetails?.hashCode() ?: 0)
result = 31 * result + (id?.hashCode() ?: 0)
result = 31 * result + (isTerminal?.hashCode() ?: 0)
result = 31 * result + (location?.hashCode() ?: 0)
result = 31 * result + (operationDetails?.hashCode() ?: 0)
result = 31 * result + (operationType?.hashCode() ?: 0)
result = 31 * result + (resourceName?.hashCode() ?: 0)
result = 31 * result + (resourceType?.hashCode() ?: 0)
result = 31 * result + (status?.hashCode() ?: 0)
result = 31 * result + (statusChangedAt?.hashCode() ?: 0)
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 Operation
if (createdAt != other.createdAt) return false
if (errorCode != other.errorCode) return false
if (errorDetails != other.errorDetails) return false
if (id != other.id) return false
if (isTerminal != other.isTerminal) return false
if (location != other.location) return false
if (operationDetails != other.operationDetails) return false
if (operationType != other.operationType) return false
if (resourceName != other.resourceName) return false
if (resourceType != other.resourceType) return false
if (status != other.status) return false
if (statusChangedAt != other.statusChangedAt) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.Operation = Builder(this).apply(block).build()
public class Builder {
/**
* The timestamp when the operation was initialized (`1479816991.349`).
*/
public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The error code.
*/
public var errorCode: kotlin.String? = null
/**
* The error details.
*/
public var errorDetails: kotlin.String? = null
/**
* The ID of the operation.
*/
public var id: kotlin.String? = null
/**
* A Boolean value indicating whether the operation is terminal.
*/
public var isTerminal: kotlin.Boolean? = null
/**
* The Amazon Web Services Region and Availability Zone.
*/
public var location: aws.sdk.kotlin.services.lightsail.model.ResourceLocation? = null
/**
* Details about the operation (`Debian-1GB-Ohio-1`).
*/
public var operationDetails: kotlin.String? = null
/**
* The type of operation.
*/
public var operationType: aws.sdk.kotlin.services.lightsail.model.OperationType? = null
/**
* The resource name.
*/
public var resourceName: kotlin.String? = null
/**
* The resource type.
*/
public var resourceType: aws.sdk.kotlin.services.lightsail.model.ResourceType? = null
/**
* The status of the operation.
*/
public var status: aws.sdk.kotlin.services.lightsail.model.OperationStatus? = null
/**
* The timestamp when the status was changed (`1479816991.349`).
*/
public var statusChangedAt: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lightsail.model.Operation) : this() {
this.createdAt = x.createdAt
this.errorCode = x.errorCode
this.errorDetails = x.errorDetails
this.id = x.id
this.isTerminal = x.isTerminal
this.location = x.location
this.operationDetails = x.operationDetails
this.operationType = x.operationType
this.resourceName = x.resourceName
this.resourceType = x.resourceType
this.status = x.status
this.statusChangedAt = x.statusChangedAt
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lightsail.model.Operation = Operation(this)
/**
* construct an [aws.sdk.kotlin.services.lightsail.model.ResourceLocation] inside the given [block]
*/
public fun location(block: aws.sdk.kotlin.services.lightsail.model.ResourceLocation.Builder.() -> kotlin.Unit) {
this.location = aws.sdk.kotlin.services.lightsail.model.ResourceLocation.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy