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

commonMain.aws.sdk.kotlin.services.configservice.model.ConfigStreamDeliveryInfo.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.configservice.model

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

/**
 * A list that contains the status of the delivery of the configuration stream notification to the Amazon SNS topic.
 */
public class ConfigStreamDeliveryInfo private constructor(builder: Builder) {
    /**
     * The error code from the last attempted delivery.
     */
    public val lastErrorCode: kotlin.String? = builder.lastErrorCode
    /**
     * The error message from the last attempted delivery.
     */
    public val lastErrorMessage: kotlin.String? = builder.lastErrorMessage
    /**
     * Status of the last attempted delivery.
     *
     * **Note** Providing an SNS topic on a [DeliveryChannel](https://docs.aws.amazon.com/config/latest/APIReference/API_DeliveryChannel.html) for Config is optional. If the SNS delivery is turned off, the last status will be **Not_Applicable**.
     */
    public val lastStatus: aws.sdk.kotlin.services.configservice.model.DeliveryStatus? = builder.lastStatus
    /**
     * The time from the last status change.
     */
    public val lastStatusChangeTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastStatusChangeTime

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

    override fun toString(): kotlin.String = buildString {
        append("ConfigStreamDeliveryInfo(")
        append("lastErrorCode=$lastErrorCode,")
        append("lastErrorMessage=$lastErrorMessage,")
        append("lastStatus=$lastStatus,")
        append("lastStatusChangeTime=$lastStatusChangeTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = lastErrorCode?.hashCode() ?: 0
        result = 31 * result + (lastErrorMessage?.hashCode() ?: 0)
        result = 31 * result + (lastStatus?.hashCode() ?: 0)
        result = 31 * result + (lastStatusChangeTime?.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 ConfigStreamDeliveryInfo

        if (lastErrorCode != other.lastErrorCode) return false
        if (lastErrorMessage != other.lastErrorMessage) return false
        if (lastStatus != other.lastStatus) return false
        if (lastStatusChangeTime != other.lastStatusChangeTime) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The error code from the last attempted delivery.
         */
        public var lastErrorCode: kotlin.String? = null
        /**
         * The error message from the last attempted delivery.
         */
        public var lastErrorMessage: kotlin.String? = null
        /**
         * Status of the last attempted delivery.
         *
         * **Note** Providing an SNS topic on a [DeliveryChannel](https://docs.aws.amazon.com/config/latest/APIReference/API_DeliveryChannel.html) for Config is optional. If the SNS delivery is turned off, the last status will be **Not_Applicable**.
         */
        public var lastStatus: aws.sdk.kotlin.services.configservice.model.DeliveryStatus? = null
        /**
         * The time from the last status change.
         */
        public var lastStatusChangeTime: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.configservice.model.ConfigStreamDeliveryInfo) : this() {
            this.lastErrorCode = x.lastErrorCode
            this.lastErrorMessage = x.lastErrorMessage
            this.lastStatus = x.lastStatus
            this.lastStatusChangeTime = x.lastStatusChangeTime
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy