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

commonMain.aws.sdk.kotlin.services.ssm.model.GetPatchBaselineResponse.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.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

public class GetPatchBaselineResponse private constructor(builder: Builder) {
    /**
     * A set of rules used to include patches in the baseline.
     */
    public val approvalRules: aws.sdk.kotlin.services.ssm.model.PatchRuleGroup? = builder.approvalRules
    /**
     * A list of explicitly approved patches for the baseline.
     */
    public val approvedPatches: List? = builder.approvedPatches
    /**
     * Returns the specified compliance severity level for approved patches in the patch baseline.
     */
    public val approvedPatchesComplianceLevel: aws.sdk.kotlin.services.ssm.model.PatchComplianceLevel? = builder.approvedPatchesComplianceLevel
    /**
     * Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is `false`. Applies to Linux managed nodes only.
     */
    public val approvedPatchesEnableNonSecurity: kotlin.Boolean? = builder.approvedPatchesEnableNonSecurity
    /**
     * The ID of the retrieved patch baseline.
     */
    public val baselineId: kotlin.String? = builder.baselineId
    /**
     * The date the patch baseline was created.
     */
    public val createdDate: aws.smithy.kotlin.runtime.time.Instant? = builder.createdDate
    /**
     * A description of the patch baseline.
     */
    public val description: kotlin.String? = builder.description
    /**
     * A set of global filters used to exclude patches from the baseline.
     */
    public val globalFilters: aws.sdk.kotlin.services.ssm.model.PatchFilterGroup? = builder.globalFilters
    /**
     * The date the patch baseline was last modified.
     */
    public val modifiedDate: aws.smithy.kotlin.runtime.time.Instant? = builder.modifiedDate
    /**
     * The name of the patch baseline.
     */
    public val name: kotlin.String? = builder.name
    /**
     * Returns the operating system specified for the patch baseline.
     */
    public val operatingSystem: aws.sdk.kotlin.services.ssm.model.OperatingSystem? = builder.operatingSystem
    /**
     * Patch groups included in the patch baseline.
     */
    public val patchGroups: List? = builder.patchGroups
    /**
     * A list of explicitly rejected patches for the baseline.
     */
    public val rejectedPatches: List? = builder.rejectedPatches
    /**
     * The action specified to take on patches included in the `RejectedPatches` list. A patch can be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it as a dependency.
     */
    public val rejectedPatchesAction: aws.sdk.kotlin.services.ssm.model.PatchAction? = builder.rejectedPatchesAction
    /**
     * Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.
     */
    public val sources: List? = builder.sources

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

    override fun toString(): kotlin.String = buildString {
        append("GetPatchBaselineResponse(")
        append("approvalRules=$approvalRules,")
        append("approvedPatches=$approvedPatches,")
        append("approvedPatchesComplianceLevel=$approvedPatchesComplianceLevel,")
        append("approvedPatchesEnableNonSecurity=$approvedPatchesEnableNonSecurity,")
        append("baselineId=$baselineId,")
        append("createdDate=$createdDate,")
        append("description=$description,")
        append("globalFilters=$globalFilters,")
        append("modifiedDate=$modifiedDate,")
        append("name=$name,")
        append("operatingSystem=$operatingSystem,")
        append("patchGroups=$patchGroups,")
        append("rejectedPatches=$rejectedPatches,")
        append("rejectedPatchesAction=$rejectedPatchesAction,")
        append("sources=$sources")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = approvalRules?.hashCode() ?: 0
        result = 31 * result + (approvedPatches?.hashCode() ?: 0)
        result = 31 * result + (approvedPatchesComplianceLevel?.hashCode() ?: 0)
        result = 31 * result + (approvedPatchesEnableNonSecurity?.hashCode() ?: 0)
        result = 31 * result + (baselineId?.hashCode() ?: 0)
        result = 31 * result + (createdDate?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (globalFilters?.hashCode() ?: 0)
        result = 31 * result + (modifiedDate?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (operatingSystem?.hashCode() ?: 0)
        result = 31 * result + (patchGroups?.hashCode() ?: 0)
        result = 31 * result + (rejectedPatches?.hashCode() ?: 0)
        result = 31 * result + (rejectedPatchesAction?.hashCode() ?: 0)
        result = 31 * result + (sources?.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 GetPatchBaselineResponse

        if (approvalRules != other.approvalRules) return false
        if (approvedPatches != other.approvedPatches) return false
        if (approvedPatchesComplianceLevel != other.approvedPatchesComplianceLevel) return false
        if (approvedPatchesEnableNonSecurity != other.approvedPatchesEnableNonSecurity) return false
        if (baselineId != other.baselineId) return false
        if (createdDate != other.createdDate) return false
        if (description != other.description) return false
        if (globalFilters != other.globalFilters) return false
        if (modifiedDate != other.modifiedDate) return false
        if (name != other.name) return false
        if (operatingSystem != other.operatingSystem) return false
        if (patchGroups != other.patchGroups) return false
        if (rejectedPatches != other.rejectedPatches) return false
        if (rejectedPatchesAction != other.rejectedPatchesAction) return false
        if (sources != other.sources) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A set of rules used to include patches in the baseline.
         */
        public var approvalRules: aws.sdk.kotlin.services.ssm.model.PatchRuleGroup? = null
        /**
         * A list of explicitly approved patches for the baseline.
         */
        public var approvedPatches: List? = null
        /**
         * Returns the specified compliance severity level for approved patches in the patch baseline.
         */
        public var approvedPatchesComplianceLevel: aws.sdk.kotlin.services.ssm.model.PatchComplianceLevel? = null
        /**
         * Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is `false`. Applies to Linux managed nodes only.
         */
        public var approvedPatchesEnableNonSecurity: kotlin.Boolean? = null
        /**
         * The ID of the retrieved patch baseline.
         */
        public var baselineId: kotlin.String? = null
        /**
         * The date the patch baseline was created.
         */
        public var createdDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A description of the patch baseline.
         */
        public var description: kotlin.String? = null
        /**
         * A set of global filters used to exclude patches from the baseline.
         */
        public var globalFilters: aws.sdk.kotlin.services.ssm.model.PatchFilterGroup? = null
        /**
         * The date the patch baseline was last modified.
         */
        public var modifiedDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the patch baseline.
         */
        public var name: kotlin.String? = null
        /**
         * Returns the operating system specified for the patch baseline.
         */
        public var operatingSystem: aws.sdk.kotlin.services.ssm.model.OperatingSystem? = null
        /**
         * Patch groups included in the patch baseline.
         */
        public var patchGroups: List? = null
        /**
         * A list of explicitly rejected patches for the baseline.
         */
        public var rejectedPatches: List? = null
        /**
         * The action specified to take on patches included in the `RejectedPatches` list. A patch can be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it as a dependency.
         */
        public var rejectedPatchesAction: aws.sdk.kotlin.services.ssm.model.PatchAction? = null
        /**
         * Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.
         */
        public var sources: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssm.model.GetPatchBaselineResponse) : this() {
            this.approvalRules = x.approvalRules
            this.approvedPatches = x.approvedPatches
            this.approvedPatchesComplianceLevel = x.approvedPatchesComplianceLevel
            this.approvedPatchesEnableNonSecurity = x.approvedPatchesEnableNonSecurity
            this.baselineId = x.baselineId
            this.createdDate = x.createdDate
            this.description = x.description
            this.globalFilters = x.globalFilters
            this.modifiedDate = x.modifiedDate
            this.name = x.name
            this.operatingSystem = x.operatingSystem
            this.patchGroups = x.patchGroups
            this.rejectedPatches = x.rejectedPatches
            this.rejectedPatchesAction = x.rejectedPatchesAction
            this.sources = x.sources
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.ssm.model.PatchRuleGroup] inside the given [block]
         */
        public fun approvalRules(block: aws.sdk.kotlin.services.ssm.model.PatchRuleGroup.Builder.() -> kotlin.Unit) {
            this.approvalRules = aws.sdk.kotlin.services.ssm.model.PatchRuleGroup.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.ssm.model.PatchFilterGroup] inside the given [block]
         */
        public fun globalFilters(block: aws.sdk.kotlin.services.ssm.model.PatchFilterGroup.Builder.() -> kotlin.Unit) {
            this.globalFilters = aws.sdk.kotlin.services.ssm.model.PatchFilterGroup.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy