commonMain.aws.sdk.kotlin.services.apprunner.model.CreateServiceResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apprunner-jvm Show documentation
Show all versions of apprunner-jvm Show documentation
The AWS SDK for Kotlin client for AppRunner
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.apprunner.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateServiceResponse private constructor(builder: Builder) {
/**
* The unique ID of the asynchronous operation that this request started. You can use it combined with the [ListOperations](https://docs.aws.amazon.com/apprunner/latest/api/API_ListOperations.html) call to track the operation's progress.
*/
public val operationId: kotlin.String = requireNotNull(builder.operationId) { "A non-null value must be provided for operationId" }
/**
* A description of the App Runner service that's created by this request.
*/
public val service: aws.sdk.kotlin.services.apprunner.model.Service? = builder.service
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.apprunner.model.CreateServiceResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateServiceResponse(")
append("operationId=$operationId,")
append("service=$service")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = operationId.hashCode()
result = 31 * result + (service?.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 CreateServiceResponse
if (operationId != other.operationId) return false
if (service != other.service) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.apprunner.model.CreateServiceResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The unique ID of the asynchronous operation that this request started. You can use it combined with the [ListOperations](https://docs.aws.amazon.com/apprunner/latest/api/API_ListOperations.html) call to track the operation's progress.
*/
public var operationId: kotlin.String? = null
/**
* A description of the App Runner service that's created by this request.
*/
public var service: aws.sdk.kotlin.services.apprunner.model.Service? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.apprunner.model.CreateServiceResponse) : this() {
this.operationId = x.operationId
this.service = x.service
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.apprunner.model.CreateServiceResponse = CreateServiceResponse(this)
/**
* construct an [aws.sdk.kotlin.services.apprunner.model.Service] inside the given [block]
*/
public fun service(block: aws.sdk.kotlin.services.apprunner.model.Service.Builder.() -> kotlin.Unit) {
this.service = aws.sdk.kotlin.services.apprunner.model.Service.invoke(block)
}
internal fun correctErrors(): Builder {
if (operationId == null) operationId = ""
return this
}
}
}