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

commonMain.aws.sdk.kotlin.services.databrew.model.Schedule.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.databrew.model

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

/**
 * Represents one or more dates and times when a job is to run.
 */
public class Schedule private constructor(builder: Builder) {
    /**
     * The ID of the Amazon Web Services account that owns the schedule.
     */
    public val accountId: kotlin.String? = builder.accountId
    /**
     * The date and time that the schedule was created.
     */
    public val createDate: aws.smithy.kotlin.runtime.time.Instant? = builder.createDate
    /**
     * The Amazon Resource Name (ARN) of the user who created the schedule.
     */
    public val createdBy: kotlin.String? = builder.createdBy
    /**
     * The dates and times when the job is to run. For more information, see [Cron expressions](https://docs.aws.amazon.com/databrew/latest/dg/jobs.cron.html) in the *Glue DataBrew Developer Guide*.
     */
    public val cronExpression: kotlin.String? = builder.cronExpression
    /**
     * A list of jobs to be run, according to the schedule.
     */
    public val jobNames: List? = builder.jobNames
    /**
     * The Amazon Resource Name (ARN) of the user who last modified the schedule.
     */
    public val lastModifiedBy: kotlin.String? = builder.lastModifiedBy
    /**
     * The date and time when the schedule was last modified.
     */
    public val lastModifiedDate: aws.smithy.kotlin.runtime.time.Instant? = builder.lastModifiedDate
    /**
     * The name of the schedule.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The Amazon Resource Name (ARN) of the schedule.
     */
    public val resourceArn: kotlin.String? = builder.resourceArn
    /**
     * Metadata tags that have been applied to the schedule.
     */
    public val tags: Map? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("Schedule(")
        append("accountId=$accountId,")
        append("createDate=$createDate,")
        append("createdBy=$createdBy,")
        append("cronExpression=$cronExpression,")
        append("jobNames=$jobNames,")
        append("lastModifiedBy=$lastModifiedBy,")
        append("lastModifiedDate=$lastModifiedDate,")
        append("name=$name,")
        append("resourceArn=$resourceArn,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = accountId?.hashCode() ?: 0
        result = 31 * result + (createDate?.hashCode() ?: 0)
        result = 31 * result + (createdBy?.hashCode() ?: 0)
        result = 31 * result + (cronExpression?.hashCode() ?: 0)
        result = 31 * result + (jobNames?.hashCode() ?: 0)
        result = 31 * result + (lastModifiedBy?.hashCode() ?: 0)
        result = 31 * result + (lastModifiedDate?.hashCode() ?: 0)
        result = 31 * result + (name.hashCode())
        result = 31 * result + (resourceArn?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 Schedule

        if (accountId != other.accountId) return false
        if (createDate != other.createDate) return false
        if (createdBy != other.createdBy) return false
        if (cronExpression != other.cronExpression) return false
        if (jobNames != other.jobNames) return false
        if (lastModifiedBy != other.lastModifiedBy) return false
        if (lastModifiedDate != other.lastModifiedDate) return false
        if (name != other.name) return false
        if (resourceArn != other.resourceArn) return false
        if (tags != other.tags) return false

        return true
    }

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

    public class Builder {
        /**
         * The ID of the Amazon Web Services account that owns the schedule.
         */
        public var accountId: kotlin.String? = null
        /**
         * The date and time that the schedule was created.
         */
        public var createDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The Amazon Resource Name (ARN) of the user who created the schedule.
         */
        public var createdBy: kotlin.String? = null
        /**
         * The dates and times when the job is to run. For more information, see [Cron expressions](https://docs.aws.amazon.com/databrew/latest/dg/jobs.cron.html) in the *Glue DataBrew Developer Guide*.
         */
        public var cronExpression: kotlin.String? = null
        /**
         * A list of jobs to be run, according to the schedule.
         */
        public var jobNames: List? = null
        /**
         * The Amazon Resource Name (ARN) of the user who last modified the schedule.
         */
        public var lastModifiedBy: kotlin.String? = null
        /**
         * The date and time when the schedule was last modified.
         */
        public var lastModifiedDate: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the schedule.
         */
        public var name: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the schedule.
         */
        public var resourceArn: kotlin.String? = null
        /**
         * Metadata tags that have been applied to the schedule.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.databrew.model.Schedule) : this() {
            this.accountId = x.accountId
            this.createDate = x.createDate
            this.createdBy = x.createdBy
            this.cronExpression = x.cronExpression
            this.jobNames = x.jobNames
            this.lastModifiedBy = x.lastModifiedBy
            this.lastModifiedDate = x.lastModifiedDate
            this.name = x.name
            this.resourceArn = x.resourceArn
            this.tags = x.tags
        }

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

        internal fun correctErrors(): Builder {
            if (name == null) name = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy