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

commonMain.aws.sdk.kotlin.services.route53.model.CreateQueryLoggingConfigResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.route53.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateQueryLoggingConfigResponse private constructor(builder: Builder) {
    /**
     * The unique URL representing the new query logging configuration.
     */
    public val location: kotlin.String = requireNotNull(builder.location) { "A non-null value must be provided for location" }
    /**
     * A complex type that contains the ID for a query logging configuration, the ID of the hosted zone that you want to log queries for, and the ARN for the log group that you want Amazon Route 53 to send query logs to.
     */
    public val queryLoggingConfig: aws.sdk.kotlin.services.route53.model.QueryLoggingConfig? = builder.queryLoggingConfig

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

    override fun toString(): kotlin.String = buildString {
        append("CreateQueryLoggingConfigResponse(")
        append("location=$location,")
        append("queryLoggingConfig=$queryLoggingConfig")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = location.hashCode()
        result = 31 * result + (queryLoggingConfig?.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 CreateQueryLoggingConfigResponse

        if (location != other.location) return false
        if (queryLoggingConfig != other.queryLoggingConfig) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The unique URL representing the new query logging configuration.
         */
        public var location: kotlin.String? = null
        /**
         * A complex type that contains the ID for a query logging configuration, the ID of the hosted zone that you want to log queries for, and the ARN for the log group that you want Amazon Route 53 to send query logs to.
         */
        public var queryLoggingConfig: aws.sdk.kotlin.services.route53.model.QueryLoggingConfig? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.route53.model.CreateQueryLoggingConfigResponse) : this() {
            this.location = x.location
            this.queryLoggingConfig = x.queryLoggingConfig
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.route53.model.QueryLoggingConfig] inside the given [block]
         */
        public fun queryLoggingConfig(block: aws.sdk.kotlin.services.route53.model.QueryLoggingConfig.Builder.() -> kotlin.Unit) {
            this.queryLoggingConfig = aws.sdk.kotlin.services.route53.model.QueryLoggingConfig.invoke(block)
        }

        internal fun correctErrors(): Builder {
            if (location == null) location = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy