commonMain.aws.sdk.kotlin.services.timestreamquery.model.ScheduleConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of timestreamquery-jvm Show documentation
Show all versions of timestreamquery-jvm Show documentation
The AWS SDK for Kotlin client for Timestream Query
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.timestreamquery.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Configuration of the schedule of the query.
*/
public class ScheduleConfiguration private constructor(builder: Builder) {
/**
* An expression that denotes when to trigger the scheduled query run. This can be a cron expression or a rate expression.
*/
public val scheduleExpression: kotlin.String = requireNotNull(builder.scheduleExpression) { "A non-null value must be provided for scheduleExpression" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.timestreamquery.model.ScheduleConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ScheduleConfiguration(")
append("scheduleExpression=$scheduleExpression")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = scheduleExpression.hashCode()
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 ScheduleConfiguration
if (scheduleExpression != other.scheduleExpression) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.timestreamquery.model.ScheduleConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An expression that denotes when to trigger the scheduled query run. This can be a cron expression or a rate expression.
*/
public var scheduleExpression: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.timestreamquery.model.ScheduleConfiguration) : this() {
this.scheduleExpression = x.scheduleExpression
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.timestreamquery.model.ScheduleConfiguration = ScheduleConfiguration(this)
internal fun correctErrors(): Builder {
if (scheduleExpression == null) scheduleExpression = ""
return this
}
}
}