commonMain.aws.sdk.kotlin.services.timestreamquery.model.ScheduledQuery.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
import aws.smithy.kotlin.runtime.time.Instant
/**
* Scheduled Query
*/
public class ScheduledQuery private constructor(builder: Builder) {
/**
* The Amazon Resource Name.
*/
public val arn: kotlin.String = requireNotNull(builder.arn) { "A non-null value must be provided for arn" }
/**
* The creation time of the scheduled query.
*/
public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
/**
* Configuration for scheduled query error reporting.
*/
public val errorReportConfiguration: aws.sdk.kotlin.services.timestreamquery.model.ErrorReportConfiguration? = builder.errorReportConfiguration
/**
* Status of the last scheduled query run.
*/
public val lastRunStatus: aws.sdk.kotlin.services.timestreamquery.model.ScheduledQueryRunStatus? = builder.lastRunStatus
/**
* The name of the scheduled query.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* The next time the scheduled query is to be run.
*/
public val nextInvocationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.nextInvocationTime
/**
* The last time the scheduled query was run.
*/
public val previousInvocationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.previousInvocationTime
/**
* State of scheduled query.
*/
public val state: aws.sdk.kotlin.services.timestreamquery.model.ScheduledQueryState = requireNotNull(builder.state) { "A non-null value must be provided for state" }
/**
* Target data source where final scheduled query result will be written.
*/
public val targetDestination: aws.sdk.kotlin.services.timestreamquery.model.TargetDestination? = builder.targetDestination
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.timestreamquery.model.ScheduledQuery = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ScheduledQuery(")
append("arn=$arn,")
append("creationTime=$creationTime,")
append("errorReportConfiguration=$errorReportConfiguration,")
append("lastRunStatus=$lastRunStatus,")
append("name=$name,")
append("nextInvocationTime=$nextInvocationTime,")
append("previousInvocationTime=$previousInvocationTime,")
append("state=$state,")
append("targetDestination=$targetDestination")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn.hashCode()
result = 31 * result + (creationTime?.hashCode() ?: 0)
result = 31 * result + (errorReportConfiguration?.hashCode() ?: 0)
result = 31 * result + (lastRunStatus?.hashCode() ?: 0)
result = 31 * result + (name.hashCode())
result = 31 * result + (nextInvocationTime?.hashCode() ?: 0)
result = 31 * result + (previousInvocationTime?.hashCode() ?: 0)
result = 31 * result + (state.hashCode())
result = 31 * result + (targetDestination?.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 ScheduledQuery
if (arn != other.arn) return false
if (creationTime != other.creationTime) return false
if (errorReportConfiguration != other.errorReportConfiguration) return false
if (lastRunStatus != other.lastRunStatus) return false
if (name != other.name) return false
if (nextInvocationTime != other.nextInvocationTime) return false
if (previousInvocationTime != other.previousInvocationTime) return false
if (state != other.state) return false
if (targetDestination != other.targetDestination) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.timestreamquery.model.ScheduledQuery = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name.
*/
public var arn: kotlin.String? = null
/**
* The creation time of the scheduled query.
*/
public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* Configuration for scheduled query error reporting.
*/
public var errorReportConfiguration: aws.sdk.kotlin.services.timestreamquery.model.ErrorReportConfiguration? = null
/**
* Status of the last scheduled query run.
*/
public var lastRunStatus: aws.sdk.kotlin.services.timestreamquery.model.ScheduledQueryRunStatus? = null
/**
* The name of the scheduled query.
*/
public var name: kotlin.String? = null
/**
* The next time the scheduled query is to be run.
*/
public var nextInvocationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The last time the scheduled query was run.
*/
public var previousInvocationTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* State of scheduled query.
*/
public var state: aws.sdk.kotlin.services.timestreamquery.model.ScheduledQueryState? = null
/**
* Target data source where final scheduled query result will be written.
*/
public var targetDestination: aws.sdk.kotlin.services.timestreamquery.model.TargetDestination? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.timestreamquery.model.ScheduledQuery) : this() {
this.arn = x.arn
this.creationTime = x.creationTime
this.errorReportConfiguration = x.errorReportConfiguration
this.lastRunStatus = x.lastRunStatus
this.name = x.name
this.nextInvocationTime = x.nextInvocationTime
this.previousInvocationTime = x.previousInvocationTime
this.state = x.state
this.targetDestination = x.targetDestination
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.timestreamquery.model.ScheduledQuery = ScheduledQuery(this)
/**
* construct an [aws.sdk.kotlin.services.timestreamquery.model.ErrorReportConfiguration] inside the given [block]
*/
public fun errorReportConfiguration(block: aws.sdk.kotlin.services.timestreamquery.model.ErrorReportConfiguration.Builder.() -> kotlin.Unit) {
this.errorReportConfiguration = aws.sdk.kotlin.services.timestreamquery.model.ErrorReportConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.timestreamquery.model.TargetDestination] inside the given [block]
*/
public fun targetDestination(block: aws.sdk.kotlin.services.timestreamquery.model.TargetDestination.Builder.() -> kotlin.Unit) {
this.targetDestination = aws.sdk.kotlin.services.timestreamquery.model.TargetDestination.invoke(block)
}
internal fun correctErrors(): Builder {
if (arn == null) arn = ""
if (name == null) name = ""
if (state == null) state = ScheduledQueryState.SdkUnknown("no value provided")
return this
}
}
}