commonMain.aws.sdk.kotlin.services.elasticbeanstalk.model.CreateApplicationRequest.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
/**
* Request to create an application.
*/
public class CreateApplicationRequest private constructor(builder: Builder) {
/**
* The name of the application. Must be unique within your account.
*/
public val applicationName: kotlin.String? = builder.applicationName
/**
* Your description of the application.
*/
public val description: kotlin.String? = builder.description
/**
* Specifies an application resource lifecycle configuration to prevent your application from accumulating too many versions.
*/
public val resourceLifecycleConfig: aws.sdk.kotlin.services.elasticbeanstalk.model.ApplicationResourceLifecycleConfig? = builder.resourceLifecycleConfig
/**
* Specifies the tags applied to the application.
*
* Elastic Beanstalk applies these tags only to the application. Environments that you create in the application don't inherit the tags.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.elasticbeanstalk.model.CreateApplicationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateApplicationRequest(")
append("applicationName=$applicationName,")
append("description=$description,")
append("resourceLifecycleConfig=$resourceLifecycleConfig,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = applicationName?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (resourceLifecycleConfig?.hashCode() ?: 0)
result = 31 * result + (tags?.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 CreateApplicationRequest
if (applicationName != other.applicationName) return false
if (description != other.description) return false
if (resourceLifecycleConfig != other.resourceLifecycleConfig) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.elasticbeanstalk.model.CreateApplicationRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the application. Must be unique within your account.
*/
public var applicationName: kotlin.String? = null
/**
* Your description of the application.
*/
public var description: kotlin.String? = null
/**
* Specifies an application resource lifecycle configuration to prevent your application from accumulating too many versions.
*/
public var resourceLifecycleConfig: aws.sdk.kotlin.services.elasticbeanstalk.model.ApplicationResourceLifecycleConfig? = null
/**
* Specifies the tags applied to the application.
*
* Elastic Beanstalk applies these tags only to the application. Environments that you create in the application don't inherit the tags.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.elasticbeanstalk.model.CreateApplicationRequest) : this() {
this.applicationName = x.applicationName
this.description = x.description
this.resourceLifecycleConfig = x.resourceLifecycleConfig
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.elasticbeanstalk.model.CreateApplicationRequest = CreateApplicationRequest(this)
/**
* construct an [aws.sdk.kotlin.services.elasticbeanstalk.model.ApplicationResourceLifecycleConfig] inside the given [block]
*/
public fun resourceLifecycleConfig(block: aws.sdk.kotlin.services.elasticbeanstalk.model.ApplicationResourceLifecycleConfig.Builder.() -> kotlin.Unit) {
this.resourceLifecycleConfig = aws.sdk.kotlin.services.elasticbeanstalk.model.ApplicationResourceLifecycleConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}