commonMain.aws.sdk.kotlin.services.vpclattice.model.CreateAccessLogSubscriptionRequest.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 CreateAccessLogSubscriptionRequest 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 Amazon Resource Name (ARN) of the destination. The supported destination types are CloudWatch Log groups, Kinesis Data Firehose delivery streams, and Amazon S3 buckets.
*/
public val destinationArn: kotlin.String = requireNotNull(builder.destinationArn) { "A non-null value must be provided for destinationArn" }
/**
* The ID or Amazon Resource Name (ARN) of the service network or service.
*/
public val resourceIdentifier: kotlin.String = requireNotNull(builder.resourceIdentifier) { "A non-null value must be provided for resourceIdentifier" }
/**
* The tags for the access log subscription.
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.vpclattice.model.CreateAccessLogSubscriptionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateAccessLogSubscriptionRequest(")
append("clientToken=$clientToken,")
append("destinationArn=$destinationArn,")
append("resourceIdentifier=$resourceIdentifier,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientToken?.hashCode() ?: 0
result = 31 * result + (destinationArn.hashCode())
result = 31 * result + (resourceIdentifier.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 CreateAccessLogSubscriptionRequest
if (clientToken != other.clientToken) return false
if (destinationArn != other.destinationArn) return false
if (resourceIdentifier != other.resourceIdentifier) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.vpclattice.model.CreateAccessLogSubscriptionRequest = 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 Amazon Resource Name (ARN) of the destination. The supported destination types are CloudWatch Log groups, Kinesis Data Firehose delivery streams, and Amazon S3 buckets.
*/
public var destinationArn: kotlin.String? = null
/**
* The ID or Amazon Resource Name (ARN) of the service network or service.
*/
public var resourceIdentifier: kotlin.String? = null
/**
* The tags for the access log subscription.
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.vpclattice.model.CreateAccessLogSubscriptionRequest) : this() {
this.clientToken = x.clientToken
this.destinationArn = x.destinationArn
this.resourceIdentifier = x.resourceIdentifier
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.vpclattice.model.CreateAccessLogSubscriptionRequest = CreateAccessLogSubscriptionRequest(this)
internal fun correctErrors(): Builder {
if (destinationArn == null) destinationArn = ""
if (resourceIdentifier == null) resourceIdentifier = ""
return this
}
}
}