commonMain.aws.sdk.kotlin.services.codedeploy.model.AppSpecContent.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
/**
* A revision for an Lambda or Amazon ECS deployment that is a YAML-formatted or JSON-formatted string. For Lambda and Amazon ECS deployments, the revision is the same as the AppSpec file. This method replaces the deprecated `RawString` data type.
*/
public class AppSpecContent private constructor(builder: Builder) {
/**
* The YAML-formatted or JSON-formatted revision string.
*
* For an Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.
*
* For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.
*
* For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as `BeforeInstall`, during a deployment.
*/
public val content: kotlin.String? = builder.content
/**
* The SHA256 hash value of the revision content.
*/
public val sha256: kotlin.String? = builder.sha256
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codedeploy.model.AppSpecContent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AppSpecContent(")
append("content=$content,")
append("sha256=$sha256")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = content?.hashCode() ?: 0
result = 31 * result + (sha256?.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 AppSpecContent
if (content != other.content) return false
if (sha256 != other.sha256) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codedeploy.model.AppSpecContent = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The YAML-formatted or JSON-formatted revision string.
*
* For an Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.
*
* For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.
*
* For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as `BeforeInstall`, during a deployment.
*/
public var content: kotlin.String? = null
/**
* The SHA256 hash value of the revision content.
*/
public var sha256: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codedeploy.model.AppSpecContent) : this() {
this.content = x.content
this.sha256 = x.sha256
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codedeploy.model.AppSpecContent = AppSpecContent(this)
internal fun correctErrors(): Builder {
return this
}
}
}