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

commonMain.aws.sdk.kotlin.services.backup.model.UpdateReportPlanRequest.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.backup.model

import aws.smithy.kotlin.runtime.SdkDsl

public class UpdateReportPlanRequest private constructor(builder: Builder) {
    /**
     * A customer-chosen string that you can use to distinguish between otherwise identical calls to `UpdateReportPlanInput`. Retrying a successful request with the same idempotency token results in a success message with no action taken.
     */
    public val idempotencyToken: kotlin.String? = builder.idempotencyToken
    /**
     * The information about where to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.
     */
    public val reportDeliveryChannel: aws.sdk.kotlin.services.backup.model.ReportDeliveryChannel? = builder.reportDeliveryChannel
    /**
     * An optional description of the report plan with a maximum 1,024 characters.
     */
    public val reportPlanDescription: kotlin.String? = builder.reportPlanDescription
    /**
     * The unique name of the report plan. This name is between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).
     */
    public val reportPlanName: kotlin.String? = builder.reportPlanName
    /**
     * The report template for the report. Reports are built using a report template. The report templates are:
     *
     * `RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT`
     *
     * If the report template is `RESOURCE_COMPLIANCE_REPORT` or `CONTROL_COMPLIANCE_REPORT`, this API resource also describes the report coverage by Amazon Web Services Regions and frameworks.
     */
    public val reportSetting: aws.sdk.kotlin.services.backup.model.ReportSetting? = builder.reportSetting

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateReportPlanRequest(")
        append("idempotencyToken=$idempotencyToken,")
        append("reportDeliveryChannel=$reportDeliveryChannel,")
        append("reportPlanDescription=$reportPlanDescription,")
        append("reportPlanName=$reportPlanName,")
        append("reportSetting=$reportSetting")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = idempotencyToken?.hashCode() ?: 0
        result = 31 * result + (reportDeliveryChannel?.hashCode() ?: 0)
        result = 31 * result + (reportPlanDescription?.hashCode() ?: 0)
        result = 31 * result + (reportPlanName?.hashCode() ?: 0)
        result = 31 * result + (reportSetting?.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 UpdateReportPlanRequest

        if (idempotencyToken != other.idempotencyToken) return false
        if (reportDeliveryChannel != other.reportDeliveryChannel) return false
        if (reportPlanDescription != other.reportPlanDescription) return false
        if (reportPlanName != other.reportPlanName) return false
        if (reportSetting != other.reportSetting) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A customer-chosen string that you can use to distinguish between otherwise identical calls to `UpdateReportPlanInput`. Retrying a successful request with the same idempotency token results in a success message with no action taken.
         */
        public var idempotencyToken: kotlin.String? = null
        /**
         * The information about where to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.
         */
        public var reportDeliveryChannel: aws.sdk.kotlin.services.backup.model.ReportDeliveryChannel? = null
        /**
         * An optional description of the report plan with a maximum 1,024 characters.
         */
        public var reportPlanDescription: kotlin.String? = null
        /**
         * The unique name of the report plan. This name is between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).
         */
        public var reportPlanName: kotlin.String? = null
        /**
         * The report template for the report. Reports are built using a report template. The report templates are:
         *
         * `RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT`
         *
         * If the report template is `RESOURCE_COMPLIANCE_REPORT` or `CONTROL_COMPLIANCE_REPORT`, this API resource also describes the report coverage by Amazon Web Services Regions and frameworks.
         */
        public var reportSetting: aws.sdk.kotlin.services.backup.model.ReportSetting? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.backup.model.UpdateReportPlanRequest) : this() {
            this.idempotencyToken = x.idempotencyToken
            this.reportDeliveryChannel = x.reportDeliveryChannel
            this.reportPlanDescription = x.reportPlanDescription
            this.reportPlanName = x.reportPlanName
            this.reportSetting = x.reportSetting
        }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy