All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.ssm.model.PatchStatus.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.ssm.model

import aws.smithy.kotlin.runtime.time.Instant

/**
 * Information about the approval status of a patch.
 */
public class PatchStatus private constructor(builder: Builder) {
    /**
     * The date the patch was approved (or will be approved if the status is `PENDING_APPROVAL`).
     */
    public val approvalDate: aws.smithy.kotlin.runtime.time.Instant? = builder.approvalDate
    /**
     * The compliance severity level for a patch.
     */
    public val complianceLevel: aws.sdk.kotlin.services.ssm.model.PatchComplianceLevel? = builder.complianceLevel
    /**
     * The approval status of a patch.
     */
    public val deploymentStatus: aws.sdk.kotlin.services.ssm.model.PatchDeploymentStatus? = builder.deploymentStatus

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssm.model.PatchStatus = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("PatchStatus(")
        append("approvalDate=$approvalDate,")
        append("complianceLevel=$complianceLevel,")
        append("deploymentStatus=$deploymentStatus")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = approvalDate?.hashCode() ?: 0
        result = 31 * result + (complianceLevel?.hashCode() ?: 0)
        result = 31 * result + (deploymentStatus?.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 PatchStatus

        if (approvalDate != other.approvalDate) return false
        if (complianceLevel != other.complianceLevel) return false
        if (deploymentStatus != other.deploymentStatus) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssm.model.PatchStatus = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The date the patch was approved (or will be approved if the status is `PENDING_APPROVAL`).
         */
        public var approvalDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The compliance severity level for a patch.
         */
        public var complianceLevel: aws.sdk.kotlin.services.ssm.model.PatchComplianceLevel? = null
        /**
         * The approval status of a patch.
         */
        public var deploymentStatus: aws.sdk.kotlin.services.ssm.model.PatchDeploymentStatus? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssm.model.PatchStatus) : this() {
            this.approvalDate = x.approvalDate
            this.complianceLevel = x.complianceLevel
            this.deploymentStatus = x.deploymentStatus
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.ssm.model.PatchStatus = PatchStatus(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy