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

commonMain.aws.sdk.kotlin.services.ssm.model.PutComplianceItemsRequest.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

public class PutComplianceItemsRequest private constructor(builder: Builder) {
    /**
     * Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:`string`.
     */
    public val complianceType: kotlin.String? = builder.complianceType
    /**
     * A summary of the call execution that includes an execution ID, the type of execution (for example, `Command`), and the date/time of the execution using a datetime object that is saved in the following format: `yyyy-MM-dd'T'HH:mm:ss'Z'`
     */
    public val executionSummary: aws.sdk.kotlin.services.ssm.model.ComplianceExecutionSummary? = builder.executionSummary
    /**
     * MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.
     */
    public val itemContentHash: kotlin.String? = builder.itemContentHash
    /**
     * Information about the compliance as defined by the resource type. For example, for a patch compliance type, `Items` includes information about the PatchSeverity, Classification, and so on.
     */
    public val items: List? = builder.items
    /**
     * Specify an ID for this resource. For a managed node, this is the node ID.
     */
    public val resourceId: kotlin.String? = builder.resourceId
    /**
     * Specify the type of resource. `ManagedInstance` is currently the only supported resource type.
     */
    public val resourceType: kotlin.String? = builder.resourceType
    /**
     * The mode for uploading compliance items. You can specify `COMPLETE` or `PARTIAL`. In `COMPLETE` mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.
     *
     * In `PARTIAL` mode, the system overwrites compliance information for a specific association. The association must be configured with `SyncCompliance` set to `MANUAL`. By default, all requests use `COMPLETE` mode.
     *
     * This attribute is only valid for association compliance.
     */
    public val uploadType: aws.sdk.kotlin.services.ssm.model.ComplianceUploadType? = builder.uploadType

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

    override fun toString(): kotlin.String = buildString {
        append("PutComplianceItemsRequest(")
        append("complianceType=$complianceType,")
        append("executionSummary=$executionSummary,")
        append("itemContentHash=$itemContentHash,")
        append("items=$items,")
        append("resourceId=$resourceId,")
        append("resourceType=$resourceType,")
        append("uploadType=$uploadType")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = complianceType?.hashCode() ?: 0
        result = 31 * result + (executionSummary?.hashCode() ?: 0)
        result = 31 * result + (itemContentHash?.hashCode() ?: 0)
        result = 31 * result + (items?.hashCode() ?: 0)
        result = 31 * result + (resourceId?.hashCode() ?: 0)
        result = 31 * result + (resourceType?.hashCode() ?: 0)
        result = 31 * result + (uploadType?.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 PutComplianceItemsRequest

        if (complianceType != other.complianceType) return false
        if (executionSummary != other.executionSummary) return false
        if (itemContentHash != other.itemContentHash) return false
        if (items != other.items) return false
        if (resourceId != other.resourceId) return false
        if (resourceType != other.resourceType) return false
        if (uploadType != other.uploadType) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specify the compliance type. For example, specify Association (for a State Manager association), Patch, or Custom:`string`.
         */
        public var complianceType: kotlin.String? = null
        /**
         * A summary of the call execution that includes an execution ID, the type of execution (for example, `Command`), and the date/time of the execution using a datetime object that is saved in the following format: `yyyy-MM-dd'T'HH:mm:ss'Z'`
         */
        public var executionSummary: aws.sdk.kotlin.services.ssm.model.ComplianceExecutionSummary? = null
        /**
         * MD5 or SHA-256 content hash. The content hash is used to determine if existing information should be overwritten or ignored. If the content hashes match, the request to put compliance information is ignored.
         */
        public var itemContentHash: kotlin.String? = null
        /**
         * Information about the compliance as defined by the resource type. For example, for a patch compliance type, `Items` includes information about the PatchSeverity, Classification, and so on.
         */
        public var items: List? = null
        /**
         * Specify an ID for this resource. For a managed node, this is the node ID.
         */
        public var resourceId: kotlin.String? = null
        /**
         * Specify the type of resource. `ManagedInstance` is currently the only supported resource type.
         */
        public var resourceType: kotlin.String? = null
        /**
         * The mode for uploading compliance items. You can specify `COMPLETE` or `PARTIAL`. In `COMPLETE` mode, the system overwrites all existing compliance information for the resource. You must provide a full list of compliance items each time you send the request.
         *
         * In `PARTIAL` mode, the system overwrites compliance information for a specific association. The association must be configured with `SyncCompliance` set to `MANUAL`. By default, all requests use `COMPLETE` mode.
         *
         * This attribute is only valid for association compliance.
         */
        public var uploadType: aws.sdk.kotlin.services.ssm.model.ComplianceUploadType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssm.model.PutComplianceItemsRequest) : this() {
            this.complianceType = x.complianceType
            this.executionSummary = x.executionSummary
            this.itemContentHash = x.itemContentHash
            this.items = x.items
            this.resourceId = x.resourceId
            this.resourceType = x.resourceType
            this.uploadType = x.uploadType
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy