
commonMain.aws.sdk.kotlin.services.ecr.model.LifecyclePolicyPreviewResult.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ecr.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* The result of the lifecycle policy preview.
*/
public class LifecyclePolicyPreviewResult private constructor(builder: Builder) {
/**
* The type of action to be taken.
*/
public val action: aws.sdk.kotlin.services.ecr.model.LifecyclePolicyRuleAction? = builder.action
/**
* The priority of the applied rule.
*/
public val appliedRulePriority: kotlin.Int? = builder.appliedRulePriority
/**
* The `sha256` digest of the image manifest.
*/
public val imageDigest: kotlin.String? = builder.imageDigest
/**
* The date and time, expressed in standard JavaScript date format, at which the current image was pushed to the repository.
*/
public val imagePushedAt: aws.smithy.kotlin.runtime.time.Instant? = builder.imagePushedAt
/**
* The list of tags associated with this image.
*/
public val imageTags: List? = builder.imageTags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ecr.model.LifecyclePolicyPreviewResult = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LifecyclePolicyPreviewResult(")
append("action=$action,")
append("appliedRulePriority=$appliedRulePriority,")
append("imageDigest=$imageDigest,")
append("imagePushedAt=$imagePushedAt,")
append("imageTags=$imageTags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = action?.hashCode() ?: 0
result = 31 * result + (appliedRulePriority ?: 0)
result = 31 * result + (imageDigest?.hashCode() ?: 0)
result = 31 * result + (imagePushedAt?.hashCode() ?: 0)
result = 31 * result + (imageTags?.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 LifecyclePolicyPreviewResult
if (action != other.action) return false
if (appliedRulePriority != other.appliedRulePriority) return false
if (imageDigest != other.imageDigest) return false
if (imagePushedAt != other.imagePushedAt) return false
if (imageTags != other.imageTags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ecr.model.LifecyclePolicyPreviewResult = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The type of action to be taken.
*/
public var action: aws.sdk.kotlin.services.ecr.model.LifecyclePolicyRuleAction? = null
/**
* The priority of the applied rule.
*/
public var appliedRulePriority: kotlin.Int? = null
/**
* The `sha256` digest of the image manifest.
*/
public var imageDigest: kotlin.String? = null
/**
* The date and time, expressed in standard JavaScript date format, at which the current image was pushed to the repository.
*/
public var imagePushedAt: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The list of tags associated with this image.
*/
public var imageTags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ecr.model.LifecyclePolicyPreviewResult) : this() {
this.action = x.action
this.appliedRulePriority = x.appliedRulePriority
this.imageDigest = x.imageDigest
this.imagePushedAt = x.imagePushedAt
this.imageTags = x.imageTags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ecr.model.LifecyclePolicyPreviewResult = LifecyclePolicyPreviewResult(this)
/**
* construct an [aws.sdk.kotlin.services.ecr.model.LifecyclePolicyRuleAction] inside the given [block]
*/
public fun action(block: aws.sdk.kotlin.services.ecr.model.LifecyclePolicyRuleAction.Builder.() -> kotlin.Unit) {
this.action = aws.sdk.kotlin.services.ecr.model.LifecyclePolicyRuleAction.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy