commonMain.aws.sdk.kotlin.services.servicediscovery.model.OperationSummary.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.servicediscovery.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A complex type that contains information about an operation that matches the criteria that you specified in a [ListOperations](https://docs.aws.amazon.com/cloud-map/latest/api/API_ListOperations.html) request.
*/
public class OperationSummary private constructor(builder: Builder) {
/**
* The ID for an operation.
*/
public val id: kotlin.String? = builder.id
/**
* The status of the operation. Values include the following:
* + **SUBMITTED**: This is the initial state immediately after you submit a request.
* + **PENDING**: Cloud Map is performing the operation.
* + **SUCCESS**: The operation succeeded.
* + **FAIL**: The operation failed. For the failure reason, see `ErrorMessage`.
*/
public val status: aws.sdk.kotlin.services.servicediscovery.model.OperationStatus? = builder.status
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.servicediscovery.model.OperationSummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OperationSummary(")
append("id=$id,")
append("status=$status")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = id?.hashCode() ?: 0
result = 31 * result + (status?.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 OperationSummary
if (id != other.id) return false
if (status != other.status) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.servicediscovery.model.OperationSummary = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID for an operation.
*/
public var id: kotlin.String? = null
/**
* The status of the operation. Values include the following:
* + **SUBMITTED**: This is the initial state immediately after you submit a request.
* + **PENDING**: Cloud Map is performing the operation.
* + **SUCCESS**: The operation succeeded.
* + **FAIL**: The operation failed. For the failure reason, see `ErrorMessage`.
*/
public var status: aws.sdk.kotlin.services.servicediscovery.model.OperationStatus? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.servicediscovery.model.OperationSummary) : this() {
this.id = x.id
this.status = x.status
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.servicediscovery.model.OperationSummary = OperationSummary(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy