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

commonMain.aws.sdk.kotlin.services.cloudwatchlogs.model.UpdateDeliveryConfigurationRequest.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.cloudwatchlogs.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateDeliveryConfigurationRequest private constructor(builder: Builder) {
    /**
     * The field delimiter to use between record fields when the final output format of a delivery is in `Plain`, `W3C`, or `Raw` format.
     */
    public val fieldDelimiter: kotlin.String? = builder.fieldDelimiter
    /**
     * The ID of the delivery to be updated by this request.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The list of record fields to be delivered to the destination, in order. If the delivery’s log source has mandatory fields, they must be included in this list.
     */
    public val recordFields: List? = builder.recordFields
    /**
     * This structure contains parameters that are valid only when the delivery’s delivery destination is an S3 bucket.
     */
    public val s3DeliveryConfiguration: aws.sdk.kotlin.services.cloudwatchlogs.model.S3DeliveryConfiguration? = builder.s3DeliveryConfiguration

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateDeliveryConfigurationRequest(")
        append("fieldDelimiter=$fieldDelimiter,")
        append("id=$id,")
        append("recordFields=$recordFields,")
        append("s3DeliveryConfiguration=$s3DeliveryConfiguration")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = fieldDelimiter?.hashCode() ?: 0
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (recordFields?.hashCode() ?: 0)
        result = 31 * result + (s3DeliveryConfiguration?.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 UpdateDeliveryConfigurationRequest

        if (fieldDelimiter != other.fieldDelimiter) return false
        if (id != other.id) return false
        if (recordFields != other.recordFields) return false
        if (s3DeliveryConfiguration != other.s3DeliveryConfiguration) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The field delimiter to use between record fields when the final output format of a delivery is in `Plain`, `W3C`, or `Raw` format.
         */
        public var fieldDelimiter: kotlin.String? = null
        /**
         * The ID of the delivery to be updated by this request.
         */
        public var id: kotlin.String? = null
        /**
         * The list of record fields to be delivered to the destination, in order. If the delivery’s log source has mandatory fields, they must be included in this list.
         */
        public var recordFields: List? = null
        /**
         * This structure contains parameters that are valid only when the delivery’s delivery destination is an S3 bucket.
         */
        public var s3DeliveryConfiguration: aws.sdk.kotlin.services.cloudwatchlogs.model.S3DeliveryConfiguration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudwatchlogs.model.UpdateDeliveryConfigurationRequest) : this() {
            this.fieldDelimiter = x.fieldDelimiter
            this.id = x.id
            this.recordFields = x.recordFields
            this.s3DeliveryConfiguration = x.s3DeliveryConfiguration
        }

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

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy