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

commonMain.aws.sdk.kotlin.services.vpclattice.model.GetAccessLogSubscriptionResponse.kt Maven / Gradle / Ivy

There is a newer version: 1.3.77
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.vpclattice.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

public class GetAccessLogSubscriptionResponse private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the access log subscription.
     */
    public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
    /**
     * The date and time that the access log subscription was created, specified in ISO-8601 format.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdAt) { "A non-null value must be provided for createdAt" }
    /**
     * The Amazon Resource Name (ARN) of the access log destination.
     */
    public val destinationArn: kotlin.String = requireNotNull(builder.destinationArn) { "A non-null value must be provided for destinationArn" }
    /**
     * The ID of the access log subscription.
     */
    public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
    /**
     * The date and time that the access log subscription was last updated, specified in ISO-8601 format.
     */
    public val lastUpdatedAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.lastUpdatedAt) { "A non-null value must be provided for lastUpdatedAt" }
    /**
     * The Amazon Resource Name (ARN) of the service network or service.
     */
    public val resourceArn: kotlin.String = requireNotNull(builder.resourceArn) { "A non-null value must be provided for resourceArn" }
    /**
     * The ID of the service network or service.
     */
    public val resourceId: kotlin.String = requireNotNull(builder.resourceId) { "A non-null value must be provided for resourceId" }

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

    override fun toString(): kotlin.String = buildString {
        append("GetAccessLogSubscriptionResponse(")
        append("arn=$arn,")
        append("createdAt=$createdAt,")
        append("destinationArn=$destinationArn,")
        append("id=$id,")
        append("lastUpdatedAt=$lastUpdatedAt,")
        append("resourceArn=$resourceArn,")
        append("resourceId=$resourceId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arn.hashCode()
        result = 31 * result + (createdAt.hashCode())
        result = 31 * result + (destinationArn.hashCode())
        result = 31 * result + (id.hashCode())
        result = 31 * result + (lastUpdatedAt.hashCode())
        result = 31 * result + (resourceArn.hashCode())
        result = 31 * result + (resourceId.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 GetAccessLogSubscriptionResponse

        if (arn != other.arn) return false
        if (createdAt != other.createdAt) return false
        if (destinationArn != other.destinationArn) return false
        if (id != other.id) return false
        if (lastUpdatedAt != other.lastUpdatedAt) return false
        if (resourceArn != other.resourceArn) return false
        if (resourceId != other.resourceId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the access log subscription.
         */
        public var arn: kotlin.String? = null
        /**
         * The date and time that the access log subscription was created, specified in ISO-8601 format.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The Amazon Resource Name (ARN) of the access log destination.
         */
        public var destinationArn: kotlin.String? = null
        /**
         * The ID of the access log subscription.
         */
        public var id: kotlin.String? = null
        /**
         * The date and time that the access log subscription was last updated, specified in ISO-8601 format.
         */
        public var lastUpdatedAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The Amazon Resource Name (ARN) of the service network or service.
         */
        public var resourceArn: kotlin.String? = null
        /**
         * The ID of the service network or service.
         */
        public var resourceId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.vpclattice.model.GetAccessLogSubscriptionResponse) : this() {
            this.arn = x.arn
            this.createdAt = x.createdAt
            this.destinationArn = x.destinationArn
            this.id = x.id
            this.lastUpdatedAt = x.lastUpdatedAt
            this.resourceArn = x.resourceArn
            this.resourceId = x.resourceId
        }

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

        internal fun correctErrors(): Builder {
            if (arn == null) arn = ""
            if (createdAt == null) createdAt = Instant.fromEpochSeconds(0)
            if (destinationArn == null) destinationArn = ""
            if (id == null) id = ""
            if (lastUpdatedAt == null) lastUpdatedAt = Instant.fromEpochSeconds(0)
            if (resourceArn == null) resourceArn = ""
            if (resourceId == null) resourceId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy