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

commonMain.aws.sdk.kotlin.services.eventbridge.model.CreateArchiveRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.eventbridge.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateArchiveRequest private constructor(builder: Builder) {
    /**
     * The name for the archive to create.
     */
    public val archiveName: kotlin.String? = builder.archiveName
    /**
     * A description for the archive.
     */
    public val description: kotlin.String? = builder.description
    /**
     * An event pattern to use to filter events sent to the archive.
     */
    public val eventPattern: kotlin.String? = builder.eventPattern
    /**
     * The ARN of the event bus that sends events to the archive.
     */
    public val eventSourceArn: kotlin.String? = builder.eventSourceArn
    /**
     * The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely
     */
    public val retentionDays: kotlin.Int? = builder.retentionDays

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

    override fun toString(): kotlin.String = buildString {
        append("CreateArchiveRequest(")
        append("archiveName=$archiveName,")
        append("description=$description,")
        append("eventPattern=$eventPattern,")
        append("eventSourceArn=$eventSourceArn,")
        append("retentionDays=$retentionDays")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = archiveName?.hashCode() ?: 0
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (eventPattern?.hashCode() ?: 0)
        result = 31 * result + (eventSourceArn?.hashCode() ?: 0)
        result = 31 * result + (retentionDays ?: 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 CreateArchiveRequest

        if (archiveName != other.archiveName) return false
        if (description != other.description) return false
        if (eventPattern != other.eventPattern) return false
        if (eventSourceArn != other.eventSourceArn) return false
        if (retentionDays != other.retentionDays) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name for the archive to create.
         */
        public var archiveName: kotlin.String? = null
        /**
         * A description for the archive.
         */
        public var description: kotlin.String? = null
        /**
         * An event pattern to use to filter events sent to the archive.
         */
        public var eventPattern: kotlin.String? = null
        /**
         * The ARN of the event bus that sends events to the archive.
         */
        public var eventSourceArn: kotlin.String? = null
        /**
         * The number of days to retain events for. Default value is 0. If set to 0, events are retained indefinitely
         */
        public var retentionDays: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.eventbridge.model.CreateArchiveRequest) : this() {
            this.archiveName = x.archiveName
            this.description = x.description
            this.eventPattern = x.eventPattern
            this.eventSourceArn = x.eventSourceArn
            this.retentionDays = x.retentionDays
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy