commonMain.aws.sdk.kotlin.services.codedeploy.model.EcsService.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codedeploy-jvm Show documentation
Show all versions of codedeploy-jvm Show documentation
The AWS SDK for Kotlin client for CodeDeploy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codedeploy.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains the service and cluster names used to identify an Amazon ECS deployment's target.
*/
public class EcsService private constructor(builder: Builder) {
/**
* The name of the cluster that the Amazon ECS service is associated with.
*/
public val clusterName: kotlin.String? = builder.clusterName
/**
* The name of the target Amazon ECS service.
*/
public val serviceName: kotlin.String? = builder.serviceName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codedeploy.model.EcsService = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EcsService(")
append("clusterName=$clusterName,")
append("serviceName=$serviceName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clusterName?.hashCode() ?: 0
result = 31 * result + (serviceName?.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 EcsService
if (clusterName != other.clusterName) return false
if (serviceName != other.serviceName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codedeploy.model.EcsService = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the cluster that the Amazon ECS service is associated with.
*/
public var clusterName: kotlin.String? = null
/**
* The name of the target Amazon ECS service.
*/
public var serviceName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codedeploy.model.EcsService) : this() {
this.clusterName = x.clusterName
this.serviceName = x.serviceName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codedeploy.model.EcsService = EcsService(this)
internal fun correctErrors(): Builder {
return this
}
}
}