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

commonMain.aws.sdk.kotlin.services.iotsitewise.model.ActionSummary.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iotsitewise.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains the summary of the actions.
 */
public class ActionSummary private constructor(builder: Builder) {
    /**
     * The ID of the action definition.
     */
    public val actionDefinitionId: kotlin.String? = builder.actionDefinitionId
    /**
     * The ID of the action.
     */
    public val actionId: kotlin.String? = builder.actionId
    /**
     * The resource the action will be taken on.
     */
    public val targetResource: aws.sdk.kotlin.services.iotsitewise.model.TargetResource? = builder.targetResource

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

    override fun toString(): kotlin.String = buildString {
        append("ActionSummary(")
        append("actionDefinitionId=$actionDefinitionId,")
        append("actionId=$actionId,")
        append("targetResource=$targetResource")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = actionDefinitionId?.hashCode() ?: 0
        result = 31 * result + (actionId?.hashCode() ?: 0)
        result = 31 * result + (targetResource?.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 ActionSummary

        if (actionDefinitionId != other.actionDefinitionId) return false
        if (actionId != other.actionId) return false
        if (targetResource != other.targetResource) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the action definition.
         */
        public var actionDefinitionId: kotlin.String? = null
        /**
         * The ID of the action.
         */
        public var actionId: kotlin.String? = null
        /**
         * The resource the action will be taken on.
         */
        public var targetResource: aws.sdk.kotlin.services.iotsitewise.model.TargetResource? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotsitewise.model.ActionSummary) : this() {
            this.actionDefinitionId = x.actionDefinitionId
            this.actionId = x.actionId
            this.targetResource = x.targetResource
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy