commonMain.aws.sdk.kotlin.services.snowball.model.DependentService.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snowball-jvm Show documentation
Show all versions of snowball-jvm Show documentation
The AWS SDK for Kotlin client for Snowball
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.snowball.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The name and version of the service dependant on the requested service.
*/
public class DependentService private constructor(builder: Builder) {
/**
* The name of the dependent service.
*/
public val serviceName: aws.sdk.kotlin.services.snowball.model.ServiceName? = builder.serviceName
/**
* The version of the dependent service.
*/
public val serviceVersion: aws.sdk.kotlin.services.snowball.model.ServiceVersion? = builder.serviceVersion
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.snowball.model.DependentService = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DependentService(")
append("serviceName=$serviceName,")
append("serviceVersion=$serviceVersion")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = serviceName?.hashCode() ?: 0
result = 31 * result + (serviceVersion?.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 DependentService
if (serviceName != other.serviceName) return false
if (serviceVersion != other.serviceVersion) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.snowball.model.DependentService = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the dependent service.
*/
public var serviceName: aws.sdk.kotlin.services.snowball.model.ServiceName? = null
/**
* The version of the dependent service.
*/
public var serviceVersion: aws.sdk.kotlin.services.snowball.model.ServiceVersion? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.snowball.model.DependentService) : this() {
this.serviceName = x.serviceName
this.serviceVersion = x.serviceVersion
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.snowball.model.DependentService = DependentService(this)
/**
* construct an [aws.sdk.kotlin.services.snowball.model.ServiceVersion] inside the given [block]
*/
public fun serviceVersion(block: aws.sdk.kotlin.services.snowball.model.ServiceVersion.Builder.() -> kotlin.Unit) {
this.serviceVersion = aws.sdk.kotlin.services.snowball.model.ServiceVersion.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}