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

commonMain.aws.sdk.kotlin.services.qldb.model.ExportJournalToS3Request.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.qldb.model

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

public class ExportJournalToS3Request private constructor(builder: Builder) {
    /**
     * The exclusive end date and time for the range of journal contents to export.
     *
     * The `ExclusiveEndTime` must be in `ISO 8601` date and time format and in Universal Coordinated Time (UTC). For example: `2019-06-13T21:36:34Z`.
     *
     * The `ExclusiveEndTime` must be less than or equal to the current UTC date and time.
     */
    public val exclusiveEndTime: aws.smithy.kotlin.runtime.time.Instant? = builder.exclusiveEndTime
    /**
     * The inclusive start date and time for the range of journal contents to export.
     *
     * The `InclusiveStartTime` must be in `ISO 8601` date and time format and in Universal Coordinated Time (UTC). For example: `2019-06-13T21:36:34Z`.
     *
     * The `InclusiveStartTime` must be before `ExclusiveEndTime`.
     *
     * If you provide an `InclusiveStartTime` that is before the ledger's `CreationDateTime`, Amazon QLDB defaults it to the ledger's `CreationDateTime`.
     */
    public val inclusiveStartTime: aws.smithy.kotlin.runtime.time.Instant? = builder.inclusiveStartTime
    /**
     * The name of the ledger.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The output format of your exported journal data. A journal export job can write the data objects in either the text or binary representation of [Amazon Ion](https://docs.aws.amazon.com/qldb/latest/developerguide/ion.html) format, or in [JSON Lines](https://jsonlines.org/) text format.
     *
     * Default: `ION_TEXT`
     *
     * In JSON Lines format, each journal block in an exported data object is a valid JSON object that is delimited by a newline. You can use this format to directly integrate JSON exports with analytics tools such as Amazon Athena and Glue because these services can parse newline-delimited JSON automatically.
     */
    public val outputFormat: aws.sdk.kotlin.services.qldb.model.OutputFormat? = builder.outputFormat
    /**
     * The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal export job to do the following:
     * + Write objects into your Amazon S3 bucket.
     * + (Optional) Use your customer managed key in Key Management Service (KMS) for server-side encryption of your exported data.
     *
     * To pass a role to QLDB when requesting a journal export, you must have permissions to perform the `iam:PassRole` action on the IAM role resource. This is required for all journal export requests.
     */
    public val roleArn: kotlin.String? = builder.roleArn
    /**
     * The configuration settings of the Amazon S3 bucket destination for your export request.
     */
    public val s3ExportConfiguration: aws.sdk.kotlin.services.qldb.model.S3ExportConfiguration? = builder.s3ExportConfiguration

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

    override fun toString(): kotlin.String = buildString {
        append("ExportJournalToS3Request(")
        append("exclusiveEndTime=$exclusiveEndTime,")
        append("inclusiveStartTime=$inclusiveStartTime,")
        append("name=$name,")
        append("outputFormat=$outputFormat,")
        append("roleArn=$roleArn,")
        append("s3ExportConfiguration=$s3ExportConfiguration")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = exclusiveEndTime?.hashCode() ?: 0
        result = 31 * result + (inclusiveStartTime?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (outputFormat?.hashCode() ?: 0)
        result = 31 * result + (roleArn?.hashCode() ?: 0)
        result = 31 * result + (s3ExportConfiguration?.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 ExportJournalToS3Request

        if (exclusiveEndTime != other.exclusiveEndTime) return false
        if (inclusiveStartTime != other.inclusiveStartTime) return false
        if (name != other.name) return false
        if (outputFormat != other.outputFormat) return false
        if (roleArn != other.roleArn) return false
        if (s3ExportConfiguration != other.s3ExportConfiguration) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The exclusive end date and time for the range of journal contents to export.
         *
         * The `ExclusiveEndTime` must be in `ISO 8601` date and time format and in Universal Coordinated Time (UTC). For example: `2019-06-13T21:36:34Z`.
         *
         * The `ExclusiveEndTime` must be less than or equal to the current UTC date and time.
         */
        public var exclusiveEndTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The inclusive start date and time for the range of journal contents to export.
         *
         * The `InclusiveStartTime` must be in `ISO 8601` date and time format and in Universal Coordinated Time (UTC). For example: `2019-06-13T21:36:34Z`.
         *
         * The `InclusiveStartTime` must be before `ExclusiveEndTime`.
         *
         * If you provide an `InclusiveStartTime` that is before the ledger's `CreationDateTime`, Amazon QLDB defaults it to the ledger's `CreationDateTime`.
         */
        public var inclusiveStartTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the ledger.
         */
        public var name: kotlin.String? = null
        /**
         * The output format of your exported journal data. A journal export job can write the data objects in either the text or binary representation of [Amazon Ion](https://docs.aws.amazon.com/qldb/latest/developerguide/ion.html) format, or in [JSON Lines](https://jsonlines.org/) text format.
         *
         * Default: `ION_TEXT`
         *
         * In JSON Lines format, each journal block in an exported data object is a valid JSON object that is delimited by a newline. You can use this format to directly integrate JSON exports with analytics tools such as Amazon Athena and Glue because these services can parse newline-delimited JSON automatically.
         */
        public var outputFormat: aws.sdk.kotlin.services.qldb.model.OutputFormat? = null
        /**
         * The Amazon Resource Name (ARN) of the IAM role that grants QLDB permissions for a journal export job to do the following:
         * + Write objects into your Amazon S3 bucket.
         * + (Optional) Use your customer managed key in Key Management Service (KMS) for server-side encryption of your exported data.
         *
         * To pass a role to QLDB when requesting a journal export, you must have permissions to perform the `iam:PassRole` action on the IAM role resource. This is required for all journal export requests.
         */
        public var roleArn: kotlin.String? = null
        /**
         * The configuration settings of the Amazon S3 bucket destination for your export request.
         */
        public var s3ExportConfiguration: aws.sdk.kotlin.services.qldb.model.S3ExportConfiguration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qldb.model.ExportJournalToS3Request) : this() {
            this.exclusiveEndTime = x.exclusiveEndTime
            this.inclusiveStartTime = x.inclusiveStartTime
            this.name = x.name
            this.outputFormat = x.outputFormat
            this.roleArn = x.roleArn
            this.s3ExportConfiguration = x.s3ExportConfiguration
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy