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

commonMain.aws.sdk.kotlin.services.apptest.model.MainframeAction.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.apptest.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Specifies the mainframe action.
 */
public class MainframeAction private constructor(builder: Builder) {
    /**
     * The action type of the mainframe action.
     */
    public val actionType: aws.sdk.kotlin.services.apptest.model.MainframeActionType? = builder.actionType
    /**
     * The properties of the mainframe action.
     */
    public val properties: aws.sdk.kotlin.services.apptest.model.MainframeActionProperties? = builder.properties
    /**
     * The resource of the mainframe action.
     */
    public val resource: kotlin.String = requireNotNull(builder.resource) { "A non-null value must be provided for resource" }

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

    override fun toString(): kotlin.String = buildString {
        append("MainframeAction(")
        append("actionType=$actionType,")
        append("properties=$properties,")
        append("resource=$resource")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = actionType?.hashCode() ?: 0
        result = 31 * result + (properties?.hashCode() ?: 0)
        result = 31 * result + (resource.hashCode())
        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 MainframeAction

        if (actionType != other.actionType) return false
        if (properties != other.properties) return false
        if (resource != other.resource) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The action type of the mainframe action.
         */
        public var actionType: aws.sdk.kotlin.services.apptest.model.MainframeActionType? = null
        /**
         * The properties of the mainframe action.
         */
        public var properties: aws.sdk.kotlin.services.apptest.model.MainframeActionProperties? = null
        /**
         * The resource of the mainframe action.
         */
        public var resource: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.apptest.model.MainframeAction) : this() {
            this.actionType = x.actionType
            this.properties = x.properties
            this.resource = x.resource
        }

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

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

        internal fun correctErrors(): Builder {
            if (resource == null) resource = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy