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

commonMain.aws.sdk.kotlin.services.mediapackage.model.CreateHarvestJobRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.mediapackage.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Configuration parameters used to create a new HarvestJob.
 */
public class CreateHarvestJobRequest private constructor(builder: Builder) {
    /**
     * The end of the time-window which will be harvested
     */
    public val endTime: kotlin.String? = builder.endTime
    /**
     * The ID of the HarvestJob. The ID must be unique within the region and it cannot be changed after the HarvestJob is submitted
     */
    public val id: kotlin.String? = builder.id
    /**
     * The ID of the OriginEndpoint that the HarvestJob will harvest from. This cannot be changed after the HarvestJob is submitted.
     */
    public val originEndpointId: kotlin.String? = builder.originEndpointId
    /**
     * Configuration parameters for where in an S3 bucket to place the harvested content
     */
    public val s3Destination: aws.sdk.kotlin.services.mediapackage.model.S3Destination? = builder.s3Destination
    /**
     * The start of the time-window which will be harvested
     */
    public val startTime: kotlin.String? = builder.startTime

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

    override fun toString(): kotlin.String = buildString {
        append("CreateHarvestJobRequest(")
        append("endTime=$endTime,")
        append("id=$id,")
        append("originEndpointId=$originEndpointId,")
        append("s3Destination=$s3Destination,")
        append("startTime=$startTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = endTime?.hashCode() ?: 0
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (originEndpointId?.hashCode() ?: 0)
        result = 31 * result + (s3Destination?.hashCode() ?: 0)
        result = 31 * result + (startTime?.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 CreateHarvestJobRequest

        if (endTime != other.endTime) return false
        if (id != other.id) return false
        if (originEndpointId != other.originEndpointId) return false
        if (s3Destination != other.s3Destination) return false
        if (startTime != other.startTime) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The end of the time-window which will be harvested
         */
        public var endTime: kotlin.String? = null
        /**
         * The ID of the HarvestJob. The ID must be unique within the region and it cannot be changed after the HarvestJob is submitted
         */
        public var id: kotlin.String? = null
        /**
         * The ID of the OriginEndpoint that the HarvestJob will harvest from. This cannot be changed after the HarvestJob is submitted.
         */
        public var originEndpointId: kotlin.String? = null
        /**
         * Configuration parameters for where in an S3 bucket to place the harvested content
         */
        public var s3Destination: aws.sdk.kotlin.services.mediapackage.model.S3Destination? = null
        /**
         * The start of the time-window which will be harvested
         */
        public var startTime: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.mediapackage.model.CreateHarvestJobRequest) : this() {
            this.endTime = x.endTime
            this.id = x.id
            this.originEndpointId = x.originEndpointId
            this.s3Destination = x.s3Destination
            this.startTime = x.startTime
        }

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

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy