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

commonMain.aws.sdk.kotlin.services.iot.model.DescribeJobTemplateResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iot.model

import aws.smithy.kotlin.runtime.time.Instant

public class DescribeJobTemplateResponse private constructor(builder: Builder) {
    /**
     * The criteria that determine when and how a job abort takes place.
     */
    public val abortConfig: aws.sdk.kotlin.services.iot.model.AbortConfig? = builder.abortConfig
    /**
     * The time, in seconds since the epoch, when the job template was created.
     */
    public val createdAt: aws.smithy.kotlin.runtime.time.Instant? = builder.createdAt
    /**
     * A description of the job template.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes.
     *
     * **Note:**The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.
     */
    public val destinationPackageVersions: List? = builder.destinationPackageVersions
    /**
     * The job document.
     */
    public val document: kotlin.String? = builder.document
    /**
     * An S3 link to the job document.
     */
    public val documentSource: kotlin.String? = builder.documentSource
    /**
     * The configuration that determines how many retries are allowed for each failure type for a job.
     */
    public val jobExecutionsRetryConfig: aws.sdk.kotlin.services.iot.model.JobExecutionsRetryConfig? = builder.jobExecutionsRetryConfig
    /**
     * Allows you to create a staged rollout of a job.
     */
    public val jobExecutionsRolloutConfig: aws.sdk.kotlin.services.iot.model.JobExecutionsRolloutConfig? = builder.jobExecutionsRolloutConfig
    /**
     * The ARN of the job template.
     */
    public val jobTemplateArn: kotlin.String? = builder.jobTemplateArn
    /**
     * The unique identifier of the job template.
     */
    public val jobTemplateId: kotlin.String? = builder.jobTemplateId
    /**
     * Allows you to configure an optional maintenance window for the rollout of a job document to all devices in the target group for a job.
     */
    public val maintenanceWindows: List? = builder.maintenanceWindows
    /**
     * Configuration for pre-signed S3 URLs.
     */
    public val presignedUrlConfig: aws.sdk.kotlin.services.iot.model.PresignedUrlConfig? = builder.presignedUrlConfig
    /**
     * Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to `IN_PROGRESS`. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to `TIMED_OUT`.
     */
    public val timeoutConfig: aws.sdk.kotlin.services.iot.model.TimeoutConfig? = builder.timeoutConfig

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeJobTemplateResponse(")
        append("abortConfig=$abortConfig,")
        append("createdAt=$createdAt,")
        append("description=$description,")
        append("destinationPackageVersions=$destinationPackageVersions,")
        append("document=$document,")
        append("documentSource=$documentSource,")
        append("jobExecutionsRetryConfig=$jobExecutionsRetryConfig,")
        append("jobExecutionsRolloutConfig=$jobExecutionsRolloutConfig,")
        append("jobTemplateArn=$jobTemplateArn,")
        append("jobTemplateId=$jobTemplateId,")
        append("maintenanceWindows=$maintenanceWindows,")
        append("presignedUrlConfig=$presignedUrlConfig,")
        append("timeoutConfig=$timeoutConfig")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = abortConfig?.hashCode() ?: 0
        result = 31 * result + (createdAt?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (destinationPackageVersions?.hashCode() ?: 0)
        result = 31 * result + (document?.hashCode() ?: 0)
        result = 31 * result + (documentSource?.hashCode() ?: 0)
        result = 31 * result + (jobExecutionsRetryConfig?.hashCode() ?: 0)
        result = 31 * result + (jobExecutionsRolloutConfig?.hashCode() ?: 0)
        result = 31 * result + (jobTemplateArn?.hashCode() ?: 0)
        result = 31 * result + (jobTemplateId?.hashCode() ?: 0)
        result = 31 * result + (maintenanceWindows?.hashCode() ?: 0)
        result = 31 * result + (presignedUrlConfig?.hashCode() ?: 0)
        result = 31 * result + (timeoutConfig?.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 DescribeJobTemplateResponse

        if (abortConfig != other.abortConfig) return false
        if (createdAt != other.createdAt) return false
        if (description != other.description) return false
        if (destinationPackageVersions != other.destinationPackageVersions) return false
        if (document != other.document) return false
        if (documentSource != other.documentSource) return false
        if (jobExecutionsRetryConfig != other.jobExecutionsRetryConfig) return false
        if (jobExecutionsRolloutConfig != other.jobExecutionsRolloutConfig) return false
        if (jobTemplateArn != other.jobTemplateArn) return false
        if (jobTemplateId != other.jobTemplateId) return false
        if (maintenanceWindows != other.maintenanceWindows) return false
        if (presignedUrlConfig != other.presignedUrlConfig) return false
        if (timeoutConfig != other.timeoutConfig) return false

        return true
    }

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

    public class Builder {
        /**
         * The criteria that determine when and how a job abort takes place.
         */
        public var abortConfig: aws.sdk.kotlin.services.iot.model.AbortConfig? = null
        /**
         * The time, in seconds since the epoch, when the job template was created.
         */
        public var createdAt: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A description of the job template.
         */
        public var description: kotlin.String? = null
        /**
         * The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes.
         *
         * **Note:**The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.
         */
        public var destinationPackageVersions: List? = null
        /**
         * The job document.
         */
        public var document: kotlin.String? = null
        /**
         * An S3 link to the job document.
         */
        public var documentSource: kotlin.String? = null
        /**
         * The configuration that determines how many retries are allowed for each failure type for a job.
         */
        public var jobExecutionsRetryConfig: aws.sdk.kotlin.services.iot.model.JobExecutionsRetryConfig? = null
        /**
         * Allows you to create a staged rollout of a job.
         */
        public var jobExecutionsRolloutConfig: aws.sdk.kotlin.services.iot.model.JobExecutionsRolloutConfig? = null
        /**
         * The ARN of the job template.
         */
        public var jobTemplateArn: kotlin.String? = null
        /**
         * The unique identifier of the job template.
         */
        public var jobTemplateId: kotlin.String? = null
        /**
         * Allows you to configure an optional maintenance window for the rollout of a job document to all devices in the target group for a job.
         */
        public var maintenanceWindows: List? = null
        /**
         * Configuration for pre-signed S3 URLs.
         */
        public var presignedUrlConfig: aws.sdk.kotlin.services.iot.model.PresignedUrlConfig? = null
        /**
         * Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to `IN_PROGRESS`. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to `TIMED_OUT`.
         */
        public var timeoutConfig: aws.sdk.kotlin.services.iot.model.TimeoutConfig? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.DescribeJobTemplateResponse) : this() {
            this.abortConfig = x.abortConfig
            this.createdAt = x.createdAt
            this.description = x.description
            this.destinationPackageVersions = x.destinationPackageVersions
            this.document = x.document
            this.documentSource = x.documentSource
            this.jobExecutionsRetryConfig = x.jobExecutionsRetryConfig
            this.jobExecutionsRolloutConfig = x.jobExecutionsRolloutConfig
            this.jobTemplateArn = x.jobTemplateArn
            this.jobTemplateId = x.jobTemplateId
            this.maintenanceWindows = x.maintenanceWindows
            this.presignedUrlConfig = x.presignedUrlConfig
            this.timeoutConfig = x.timeoutConfig
        }

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

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

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy