commonMain.aws.sdk.kotlin.services.vpclattice.model.CreateServiceNetworkServiceAssociationRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vpclattice-jvm Show documentation
Show all versions of vpclattice-jvm Show documentation
The AWS SDK for Kotlin client for VPC Lattice
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.vpclattice.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateServiceNetworkServiceAssociationRequest private constructor(builder: Builder) {
/**
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails.
*/
public val clientToken: kotlin.String? = builder.clientToken
/**
* The ID or Amazon Resource Name (ARN) of the service.
*/
public val serviceIdentifier: kotlin.String = requireNotNull(builder.serviceIdentifier) { "A non-null value must be provided for serviceIdentifier" }
/**
* The ID or Amazon Resource Name (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts.
*/
public val serviceNetworkIdentifier: kotlin.String = requireNotNull(builder.serviceNetworkIdentifier) { "A non-null value must be provided for serviceNetworkIdentifier" }
/**
* The tags for the association.
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.vpclattice.model.CreateServiceNetworkServiceAssociationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateServiceNetworkServiceAssociationRequest(")
append("clientToken=$clientToken,")
append("serviceIdentifier=$serviceIdentifier,")
append("serviceNetworkIdentifier=$serviceNetworkIdentifier,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientToken?.hashCode() ?: 0
result = 31 * result + (serviceIdentifier.hashCode())
result = 31 * result + (serviceNetworkIdentifier.hashCode())
result = 31 * result + (tags?.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 CreateServiceNetworkServiceAssociationRequest
if (clientToken != other.clientToken) return false
if (serviceIdentifier != other.serviceIdentifier) return false
if (serviceNetworkIdentifier != other.serviceNetworkIdentifier) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.vpclattice.model.CreateServiceNetworkServiceAssociationRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails.
*/
public var clientToken: kotlin.String? = null
/**
* The ID or Amazon Resource Name (ARN) of the service.
*/
public var serviceIdentifier: kotlin.String? = null
/**
* The ID or Amazon Resource Name (ARN) of the service network. You must use the ARN if the resources specified in the operation are in different accounts.
*/
public var serviceNetworkIdentifier: kotlin.String? = null
/**
* The tags for the association.
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.vpclattice.model.CreateServiceNetworkServiceAssociationRequest) : this() {
this.clientToken = x.clientToken
this.serviceIdentifier = x.serviceIdentifier
this.serviceNetworkIdentifier = x.serviceNetworkIdentifier
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.vpclattice.model.CreateServiceNetworkServiceAssociationRequest = CreateServiceNetworkServiceAssociationRequest(this)
internal fun correctErrors(): Builder {
if (serviceIdentifier == null) serviceIdentifier = ""
if (serviceNetworkIdentifier == null) serviceNetworkIdentifier = ""
return this
}
}
}