commonMain.aws.sdk.kotlin.services.codedeploy.model.TargetInstances.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
/**
* Information about the instances to be used in the replacement environment in a blue/green deployment.
*/
public class TargetInstances private constructor(builder: Builder) {
/**
* The names of one or more Auto Scaling groups to identify a replacement environment for a blue/green deployment.
*/
public val autoScalingGroups: List? = builder.autoScalingGroups
/**
* Information about the groups of Amazon EC2 instance tags that an instance must be identified by in order for it to be included in the replacement environment for a blue/green deployment. Cannot be used in the same call as `tagFilters`.
*/
public val ec2TagSet: aws.sdk.kotlin.services.codedeploy.model.Ec2TagSet? = builder.ec2TagSet
/**
* The tag filter key, type, and value used to identify Amazon EC2 instances in a replacement environment for a blue/green deployment. Cannot be used in the same call as `ec2TagSet`.
*/
public val tagFilters: List? = builder.tagFilters
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codedeploy.model.TargetInstances = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TargetInstances(")
append("autoScalingGroups=$autoScalingGroups,")
append("ec2TagSet=$ec2TagSet,")
append("tagFilters=$tagFilters")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = autoScalingGroups?.hashCode() ?: 0
result = 31 * result + (ec2TagSet?.hashCode() ?: 0)
result = 31 * result + (tagFilters?.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 TargetInstances
if (autoScalingGroups != other.autoScalingGroups) return false
if (ec2TagSet != other.ec2TagSet) return false
if (tagFilters != other.tagFilters) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codedeploy.model.TargetInstances = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The names of one or more Auto Scaling groups to identify a replacement environment for a blue/green deployment.
*/
public var autoScalingGroups: List? = null
/**
* Information about the groups of Amazon EC2 instance tags that an instance must be identified by in order for it to be included in the replacement environment for a blue/green deployment. Cannot be used in the same call as `tagFilters`.
*/
public var ec2TagSet: aws.sdk.kotlin.services.codedeploy.model.Ec2TagSet? = null
/**
* The tag filter key, type, and value used to identify Amazon EC2 instances in a replacement environment for a blue/green deployment. Cannot be used in the same call as `ec2TagSet`.
*/
public var tagFilters: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codedeploy.model.TargetInstances) : this() {
this.autoScalingGroups = x.autoScalingGroups
this.ec2TagSet = x.ec2TagSet
this.tagFilters = x.tagFilters
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codedeploy.model.TargetInstances = TargetInstances(this)
/**
* construct an [aws.sdk.kotlin.services.codedeploy.model.Ec2TagSet] inside the given [block]
*/
public fun ec2TagSet(block: aws.sdk.kotlin.services.codedeploy.model.Ec2TagSet.Builder.() -> kotlin.Unit) {
this.ec2TagSet = aws.sdk.kotlin.services.codedeploy.model.Ec2TagSet.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}