commonMain.aws.sdk.kotlin.services.elasticbeanstalk.model.SwapEnvironmentCnamesRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticbeanstalk-jvm Show documentation
Show all versions of elasticbeanstalk-jvm Show documentation
The AWS SDK for Kotlin client for Elastic Beanstalk
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.elasticbeanstalk.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Swaps the CNAMEs of two environments.
*/
public class SwapEnvironmentCnamesRequest private constructor(builder: Builder) {
/**
* The ID of the destination environment.
*
* Condition: You must specify at least the `DestinationEnvironmentID` or the `DestinationEnvironmentName`. You may also specify both. You must specify the `SourceEnvironmentId` with the `DestinationEnvironmentId`.
*/
public val destinationEnvironmentId: kotlin.String? = builder.destinationEnvironmentId
/**
* The name of the destination environment.
*
* Condition: You must specify at least the `DestinationEnvironmentID` or the `DestinationEnvironmentName`. You may also specify both. You must specify the `SourceEnvironmentName` with the `DestinationEnvironmentName`.
*/
public val destinationEnvironmentName: kotlin.String? = builder.destinationEnvironmentName
/**
* The ID of the source environment.
*
* Condition: You must specify at least the `SourceEnvironmentID` or the `SourceEnvironmentName`. You may also specify both. If you specify the `SourceEnvironmentId`, you must specify the `DestinationEnvironmentId`.
*/
public val sourceEnvironmentId: kotlin.String? = builder.sourceEnvironmentId
/**
* The name of the source environment.
*
* Condition: You must specify at least the `SourceEnvironmentID` or the `SourceEnvironmentName`. You may also specify both. If you specify the `SourceEnvironmentName`, you must specify the `DestinationEnvironmentName`.
*/
public val sourceEnvironmentName: kotlin.String? = builder.sourceEnvironmentName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.elasticbeanstalk.model.SwapEnvironmentCnamesRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SwapEnvironmentCnamesRequest(")
append("destinationEnvironmentId=$destinationEnvironmentId,")
append("destinationEnvironmentName=$destinationEnvironmentName,")
append("sourceEnvironmentId=$sourceEnvironmentId,")
append("sourceEnvironmentName=$sourceEnvironmentName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = destinationEnvironmentId?.hashCode() ?: 0
result = 31 * result + (destinationEnvironmentName?.hashCode() ?: 0)
result = 31 * result + (sourceEnvironmentId?.hashCode() ?: 0)
result = 31 * result + (sourceEnvironmentName?.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 SwapEnvironmentCnamesRequest
if (destinationEnvironmentId != other.destinationEnvironmentId) return false
if (destinationEnvironmentName != other.destinationEnvironmentName) return false
if (sourceEnvironmentId != other.sourceEnvironmentId) return false
if (sourceEnvironmentName != other.sourceEnvironmentName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.elasticbeanstalk.model.SwapEnvironmentCnamesRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ID of the destination environment.
*
* Condition: You must specify at least the `DestinationEnvironmentID` or the `DestinationEnvironmentName`. You may also specify both. You must specify the `SourceEnvironmentId` with the `DestinationEnvironmentId`.
*/
public var destinationEnvironmentId: kotlin.String? = null
/**
* The name of the destination environment.
*
* Condition: You must specify at least the `DestinationEnvironmentID` or the `DestinationEnvironmentName`. You may also specify both. You must specify the `SourceEnvironmentName` with the `DestinationEnvironmentName`.
*/
public var destinationEnvironmentName: kotlin.String? = null
/**
* The ID of the source environment.
*
* Condition: You must specify at least the `SourceEnvironmentID` or the `SourceEnvironmentName`. You may also specify both. If you specify the `SourceEnvironmentId`, you must specify the `DestinationEnvironmentId`.
*/
public var sourceEnvironmentId: kotlin.String? = null
/**
* The name of the source environment.
*
* Condition: You must specify at least the `SourceEnvironmentID` or the `SourceEnvironmentName`. You may also specify both. If you specify the `SourceEnvironmentName`, you must specify the `DestinationEnvironmentName`.
*/
public var sourceEnvironmentName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.elasticbeanstalk.model.SwapEnvironmentCnamesRequest) : this() {
this.destinationEnvironmentId = x.destinationEnvironmentId
this.destinationEnvironmentName = x.destinationEnvironmentName
this.sourceEnvironmentId = x.sourceEnvironmentId
this.sourceEnvironmentName = x.sourceEnvironmentName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.elasticbeanstalk.model.SwapEnvironmentCnamesRequest = SwapEnvironmentCnamesRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}