commonMain.aws.sdk.kotlin.services.redshift.model.ModifyScheduledActionRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redshift-jvm Show documentation
Show all versions of redshift-jvm Show documentation
The AWS SDK for Kotlin client for Redshift
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.redshift.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
public class ModifyScheduledActionRequest private constructor(builder: Builder) {
/**
* A modified enable flag of the scheduled action. If true, the scheduled action is active. If false, the scheduled action is disabled.
*/
public val enable: kotlin.Boolean? = builder.enable
/**
* A modified end time of the scheduled action. For more information about this parameter, see ScheduledAction.
*/
public val endTime: aws.smithy.kotlin.runtime.time.Instant? = builder.endTime
/**
* A different IAM role to assume to run the target action. For more information about this parameter, see ScheduledAction.
*/
public val iamRole: kotlin.String? = builder.iamRole
/**
* A modified schedule in either `at( )` or `cron( )` format. For more information about this parameter, see ScheduledAction.
*/
public val schedule: kotlin.String? = builder.schedule
/**
* A modified description of the scheduled action.
*/
public val scheduledActionDescription: kotlin.String? = builder.scheduledActionDescription
/**
* The name of the scheduled action to modify.
*/
public val scheduledActionName: kotlin.String? = builder.scheduledActionName
/**
* A modified start time of the scheduled action. For more information about this parameter, see ScheduledAction.
*/
public val startTime: aws.smithy.kotlin.runtime.time.Instant? = builder.startTime
/**
* A modified JSON format of the scheduled action. For more information about this parameter, see ScheduledAction.
*/
public val targetAction: aws.sdk.kotlin.services.redshift.model.ScheduledActionType? = builder.targetAction
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.redshift.model.ModifyScheduledActionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ModifyScheduledActionRequest(")
append("enable=$enable,")
append("endTime=$endTime,")
append("iamRole=$iamRole,")
append("schedule=$schedule,")
append("scheduledActionDescription=$scheduledActionDescription,")
append("scheduledActionName=$scheduledActionName,")
append("startTime=$startTime,")
append("targetAction=$targetAction")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = enable?.hashCode() ?: 0
result = 31 * result + (endTime?.hashCode() ?: 0)
result = 31 * result + (iamRole?.hashCode() ?: 0)
result = 31 * result + (schedule?.hashCode() ?: 0)
result = 31 * result + (scheduledActionDescription?.hashCode() ?: 0)
result = 31 * result + (scheduledActionName?.hashCode() ?: 0)
result = 31 * result + (startTime?.hashCode() ?: 0)
result = 31 * result + (targetAction?.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 ModifyScheduledActionRequest
if (enable != other.enable) return false
if (endTime != other.endTime) return false
if (iamRole != other.iamRole) return false
if (schedule != other.schedule) return false
if (scheduledActionDescription != other.scheduledActionDescription) return false
if (scheduledActionName != other.scheduledActionName) return false
if (startTime != other.startTime) return false
if (targetAction != other.targetAction) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.redshift.model.ModifyScheduledActionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A modified enable flag of the scheduled action. If true, the scheduled action is active. If false, the scheduled action is disabled.
*/
public var enable: kotlin.Boolean? = null
/**
* A modified end time of the scheduled action. For more information about this parameter, see ScheduledAction.
*/
public var endTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* A different IAM role to assume to run the target action. For more information about this parameter, see ScheduledAction.
*/
public var iamRole: kotlin.String? = null
/**
* A modified schedule in either `at( )` or `cron( )` format. For more information about this parameter, see ScheduledAction.
*/
public var schedule: kotlin.String? = null
/**
* A modified description of the scheduled action.
*/
public var scheduledActionDescription: kotlin.String? = null
/**
* The name of the scheduled action to modify.
*/
public var scheduledActionName: kotlin.String? = null
/**
* A modified start time of the scheduled action. For more information about this parameter, see ScheduledAction.
*/
public var startTime: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* A modified JSON format of the scheduled action. For more information about this parameter, see ScheduledAction.
*/
public var targetAction: aws.sdk.kotlin.services.redshift.model.ScheduledActionType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.redshift.model.ModifyScheduledActionRequest) : this() {
this.enable = x.enable
this.endTime = x.endTime
this.iamRole = x.iamRole
this.schedule = x.schedule
this.scheduledActionDescription = x.scheduledActionDescription
this.scheduledActionName = x.scheduledActionName
this.startTime = x.startTime
this.targetAction = x.targetAction
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.redshift.model.ModifyScheduledActionRequest = ModifyScheduledActionRequest(this)
/**
* construct an [aws.sdk.kotlin.services.redshift.model.ScheduledActionType] inside the given [block]
*/
public fun targetAction(block: aws.sdk.kotlin.services.redshift.model.ScheduledActionType.Builder.() -> kotlin.Unit) {
this.targetAction = aws.sdk.kotlin.services.redshift.model.ScheduledActionType.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}