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

commonMain.aws.sdk.kotlin.services.appstream.model.UsageReportSubscription.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.appstream.model

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

/**
 * Describes information about the usage report subscription.
 */
public class UsageReportSubscription private constructor(builder: Builder) {
    /**
     * The time when the last usage report was generated.
     */
    public val lastGeneratedReportDate: aws.smithy.kotlin.runtime.time.Instant? = builder.lastGeneratedReportDate
    /**
     * The Amazon S3 bucket where generated reports are stored.
     *
     * If you enabled on-instance session scripts and Amazon S3 logging for your session script configuration, AppStream 2.0 created an S3 bucket to store the script output. The bucket is unique to your account and Region. When you enable usage reporting in this case, AppStream 2.0 uses the same bucket to store your usage reports. If you haven't already enabled on-instance session scripts, when you enable usage reports, AppStream 2.0 creates a new S3 bucket.
     */
    public val s3BucketName: kotlin.String? = builder.s3BucketName
    /**
     * The schedule for generating usage reports.
     */
    public val schedule: aws.sdk.kotlin.services.appstream.model.UsageReportSchedule? = builder.schedule
    /**
     * The errors that were returned if usage reports couldn't be generated.
     */
    public val subscriptionErrors: List? = builder.subscriptionErrors

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

    override fun toString(): kotlin.String = buildString {
        append("UsageReportSubscription(")
        append("lastGeneratedReportDate=$lastGeneratedReportDate,")
        append("s3BucketName=$s3BucketName,")
        append("schedule=$schedule,")
        append("subscriptionErrors=$subscriptionErrors")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = lastGeneratedReportDate?.hashCode() ?: 0
        result = 31 * result + (s3BucketName?.hashCode() ?: 0)
        result = 31 * result + (schedule?.hashCode() ?: 0)
        result = 31 * result + (subscriptionErrors?.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 UsageReportSubscription

        if (lastGeneratedReportDate != other.lastGeneratedReportDate) return false
        if (s3BucketName != other.s3BucketName) return false
        if (schedule != other.schedule) return false
        if (subscriptionErrors != other.subscriptionErrors) return false

        return true
    }

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

    public class Builder {
        /**
         * The time when the last usage report was generated.
         */
        public var lastGeneratedReportDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The Amazon S3 bucket where generated reports are stored.
         *
         * If you enabled on-instance session scripts and Amazon S3 logging for your session script configuration, AppStream 2.0 created an S3 bucket to store the script output. The bucket is unique to your account and Region. When you enable usage reporting in this case, AppStream 2.0 uses the same bucket to store your usage reports. If you haven't already enabled on-instance session scripts, when you enable usage reports, AppStream 2.0 creates a new S3 bucket.
         */
        public var s3BucketName: kotlin.String? = null
        /**
         * The schedule for generating usage reports.
         */
        public var schedule: aws.sdk.kotlin.services.appstream.model.UsageReportSchedule? = null
        /**
         * The errors that were returned if usage reports couldn't be generated.
         */
        public var subscriptionErrors: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.appstream.model.UsageReportSubscription) : this() {
            this.lastGeneratedReportDate = x.lastGeneratedReportDate
            this.s3BucketName = x.s3BucketName
            this.schedule = x.schedule
            this.subscriptionErrors = x.subscriptionErrors
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.appstream.model.UsageReportSubscription = UsageReportSubscription(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy