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

commonMain.aws.sdk.kotlin.services.managedblockchainquery.model.GetTransactionRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.managedblockchainquery.model



public class GetTransactionRequest private constructor(builder: Builder) {
    /**
     * The blockchain network where the transaction occurred.
     */
    public val network: aws.sdk.kotlin.services.managedblockchainquery.model.QueryNetwork? = builder.network
    /**
     * The hash of the transaction. It is generated whenever a transaction is verified and added to the blockchain.
     */
    public val transactionHash: kotlin.String? = builder.transactionHash

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

    override fun toString(): kotlin.String = buildString {
        append("GetTransactionRequest(")
        append("network=$network,")
        append("transactionHash=$transactionHash")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = network?.hashCode() ?: 0
        result = 31 * result + (transactionHash?.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 GetTransactionRequest

        if (network != other.network) return false
        if (transactionHash != other.transactionHash) return false

        return true
    }

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

    public class Builder {
        /**
         * The blockchain network where the transaction occurred.
         */
        public var network: aws.sdk.kotlin.services.managedblockchainquery.model.QueryNetwork? = null
        /**
         * The hash of the transaction. It is generated whenever a transaction is verified and added to the blockchain.
         */
        public var transactionHash: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.managedblockchainquery.model.GetTransactionRequest) : this() {
            this.network = x.network
            this.transactionHash = x.transactionHash
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy