
commonMain.aws.sdk.kotlin.services.managedblockchainquery.model.ContractIdentifier.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.managedblockchainquery.model
/**
* Container for the blockchain address and network information about a contract.
*/
public class ContractIdentifier private constructor(builder: Builder) {
/**
* Container for the blockchain address about a contract.
*/
public val contractAddress: kotlin.String = requireNotNull(builder.contractAddress) { "A non-null value must be provided for contractAddress" }
/**
* The blockchain network of the contract.
*/
public val network: aws.sdk.kotlin.services.managedblockchainquery.model.QueryNetwork = requireNotNull(builder.network) { "A non-null value must be provided for network" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.managedblockchainquery.model.ContractIdentifier = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ContractIdentifier(")
append("contractAddress=$contractAddress,")
append("network=$network")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = contractAddress.hashCode()
result = 31 * result + (network.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 ContractIdentifier
if (contractAddress != other.contractAddress) return false
if (network != other.network) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.managedblockchainquery.model.ContractIdentifier = Builder(this).apply(block).build()
public class Builder {
/**
* Container for the blockchain address about a contract.
*/
public var contractAddress: kotlin.String? = null
/**
* The blockchain network of the contract.
*/
public var network: aws.sdk.kotlin.services.managedblockchainquery.model.QueryNetwork? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.managedblockchainquery.model.ContractIdentifier) : this() {
this.contractAddress = x.contractAddress
this.network = x.network
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.managedblockchainquery.model.ContractIdentifier = ContractIdentifier(this)
internal fun correctErrors(): Builder {
if (contractAddress == null) contractAddress = ""
if (network == null) network = QueryNetwork.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy