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

commonMain.aws.sdk.kotlin.services.medialive.model.BatchUpdateScheduleRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.medialive.model



/**
 * List of actions to create and list of actions to delete.
 */
public class BatchUpdateScheduleRequest private constructor(builder: Builder) {
    /**
     * Id of the channel whose schedule is being updated.
     */
    public val channelId: kotlin.String? = requireNotNull(builder.channelId) { "A non-null value must be provided for channelId" }
    /**
     * Schedule actions to create in the schedule.
     */
    public val creates: aws.sdk.kotlin.services.medialive.model.BatchScheduleActionCreateRequest? = builder.creates
    /**
     * Schedule actions to delete from the schedule.
     */
    public val deletes: aws.sdk.kotlin.services.medialive.model.BatchScheduleActionDeleteRequest? = builder.deletes

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

    override fun toString(): kotlin.String = buildString {
        append("BatchUpdateScheduleRequest(")
        append("channelId=$channelId,")
        append("creates=$creates,")
        append("deletes=$deletes")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = channelId?.hashCode() ?: 0
        result = 31 * result + (creates?.hashCode() ?: 0)
        result = 31 * result + (deletes?.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 BatchUpdateScheduleRequest

        if (channelId != other.channelId) return false
        if (creates != other.creates) return false
        if (deletes != other.deletes) return false

        return true
    }

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

    public class Builder {
        /**
         * Id of the channel whose schedule is being updated.
         */
        public var channelId: kotlin.String? = null
        /**
         * Schedule actions to create in the schedule.
         */
        public var creates: aws.sdk.kotlin.services.medialive.model.BatchScheduleActionCreateRequest? = null
        /**
         * Schedule actions to delete from the schedule.
         */
        public var deletes: aws.sdk.kotlin.services.medialive.model.BatchScheduleActionDeleteRequest? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.medialive.model.BatchUpdateScheduleRequest) : this() {
            this.channelId = x.channelId
            this.creates = x.creates
            this.deletes = x.deletes
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy