
commonMain.aws.sdk.kotlin.services.apptest.model.M2ManagedApplicationAction.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 AWS Mainframe Modernization managed application action.
*/
public class M2ManagedApplicationAction private constructor(builder: Builder) {
/**
* The action type of the AWS Mainframe Modernization managed application action.
*/
public val actionType: aws.sdk.kotlin.services.apptest.model.M2ManagedActionType = requireNotNull(builder.actionType) { "A non-null value must be provided for actionType" }
/**
* The properties of the AWS Mainframe Modernization managed application action.
*/
public val properties: aws.sdk.kotlin.services.apptest.model.M2ManagedActionProperties? = builder.properties
/**
* The resource of the AWS Mainframe Modernization managed application 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.M2ManagedApplicationAction = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("M2ManagedApplicationAction(")
append("actionType=$actionType,")
append("properties=$properties,")
append("resource=$resource")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = actionType.hashCode()
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 M2ManagedApplicationAction
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.M2ManagedApplicationAction = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The action type of the AWS Mainframe Modernization managed application action.
*/
public var actionType: aws.sdk.kotlin.services.apptest.model.M2ManagedActionType? = null
/**
* The properties of the AWS Mainframe Modernization managed application action.
*/
public var properties: aws.sdk.kotlin.services.apptest.model.M2ManagedActionProperties? = null
/**
* The resource of the AWS Mainframe Modernization managed application action.
*/
public var resource: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.apptest.model.M2ManagedApplicationAction) : this() {
this.actionType = x.actionType
this.properties = x.properties
this.resource = x.resource
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.apptest.model.M2ManagedApplicationAction = M2ManagedApplicationAction(this)
/**
* construct an [aws.sdk.kotlin.services.apptest.model.M2ManagedActionProperties] inside the given [block]
*/
public fun properties(block: aws.sdk.kotlin.services.apptest.model.M2ManagedActionProperties.Builder.() -> kotlin.Unit) {
this.properties = aws.sdk.kotlin.services.apptest.model.M2ManagedActionProperties.invoke(block)
}
internal fun correctErrors(): Builder {
if (actionType == null) actionType = M2ManagedActionType.SdkUnknown("no value provided")
if (resource == null) resource = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy