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

commonMain.aws.sdk.kotlin.services.braket.model.CreateJobRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.braket.model



public class CreateJobRequest private constructor(builder: Builder) {
    /**
     * Definition of the Amazon Braket job to be created. Specifies the container image the job uses and information about the Python scripts used for entry and training.
     */
    public val algorithmSpecification: aws.sdk.kotlin.services.braket.model.AlgorithmSpecification? = builder.algorithmSpecification
    /**
     * The list of Amazon Braket resources associated with the hybrid job.
     */
    public val associations: List? = builder.associations
    /**
     * Information about the output locations for job checkpoint data.
     */
    public val checkpointConfig: aws.sdk.kotlin.services.braket.model.JobCheckpointConfig? = builder.checkpointConfig
    /**
     * A unique token that guarantees that the call to this API is idempotent.
     */
    public val clientToken: kotlin.String = requireNotNull(builder.clientToken) { "A non-null value must be provided for clientToken" }
    /**
     * The quantum processing unit (QPU) or simulator used to create an Amazon Braket job.
     */
    public val deviceConfig: aws.sdk.kotlin.services.braket.model.DeviceConfig? = builder.deviceConfig
    /**
     * Algorithm-specific parameters used by an Amazon Braket job that influence the quality of the training job. The values are set with a string of JSON key:value pairs, where the key is the name of the hyperparameter and the value is the value of th hyperparameter.
     */
    public val hyperParameters: Map? = builder.hyperParameters
    /**
     * A list of parameters that specify the name and type of input data and where it is located.
     */
    public val inputDataConfig: List? = builder.inputDataConfig
    /**
     * Configuration of the resource instances to use while running the hybrid job on Amazon Braket.
     */
    public val instanceConfig: aws.sdk.kotlin.services.braket.model.InstanceConfig? = builder.instanceConfig
    /**
     * The name of the Amazon Braket job.
     */
    public val jobName: kotlin.String = requireNotNull(builder.jobName) { "A non-null value must be provided for jobName" }
    /**
     * The path to the S3 location where you want to store job artifacts and the encryption key used to store them.
     */
    public val outputDataConfig: aws.sdk.kotlin.services.braket.model.JobOutputDataConfig? = builder.outputDataConfig
    /**
     * The Amazon Resource Name (ARN) of an IAM role that Amazon Braket can assume to perform tasks on behalf of a user. It can access user resources, run an Amazon Braket job container on behalf of user, and output resources to the users' s3 buckets.
     */
    public val roleArn: kotlin.String = requireNotNull(builder.roleArn) { "A non-null value must be provided for roleArn" }
    /**
     * The user-defined criteria that specifies when a job stops running.
     */
    public val stoppingCondition: aws.sdk.kotlin.services.braket.model.JobStoppingCondition? = builder.stoppingCondition
    /**
     * A tag object that consists of a key and an optional value, used to manage metadata for Amazon Braket resources.
     */
    public val tags: Map? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateJobRequest(")
        append("algorithmSpecification=$algorithmSpecification,")
        append("associations=$associations,")
        append("checkpointConfig=$checkpointConfig,")
        append("clientToken=$clientToken,")
        append("deviceConfig=$deviceConfig,")
        append("hyperParameters=$hyperParameters,")
        append("inputDataConfig=$inputDataConfig,")
        append("instanceConfig=$instanceConfig,")
        append("jobName=$jobName,")
        append("outputDataConfig=$outputDataConfig,")
        append("roleArn=$roleArn,")
        append("stoppingCondition=$stoppingCondition,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = algorithmSpecification?.hashCode() ?: 0
        result = 31 * result + (associations?.hashCode() ?: 0)
        result = 31 * result + (checkpointConfig?.hashCode() ?: 0)
        result = 31 * result + (clientToken.hashCode())
        result = 31 * result + (deviceConfig?.hashCode() ?: 0)
        result = 31 * result + (hyperParameters?.hashCode() ?: 0)
        result = 31 * result + (inputDataConfig?.hashCode() ?: 0)
        result = 31 * result + (instanceConfig?.hashCode() ?: 0)
        result = 31 * result + (jobName.hashCode())
        result = 31 * result + (outputDataConfig?.hashCode() ?: 0)
        result = 31 * result + (roleArn.hashCode())
        result = 31 * result + (stoppingCondition?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 CreateJobRequest

        if (algorithmSpecification != other.algorithmSpecification) return false
        if (associations != other.associations) return false
        if (checkpointConfig != other.checkpointConfig) return false
        if (clientToken != other.clientToken) return false
        if (deviceConfig != other.deviceConfig) return false
        if (hyperParameters != other.hyperParameters) return false
        if (inputDataConfig != other.inputDataConfig) return false
        if (instanceConfig != other.instanceConfig) return false
        if (jobName != other.jobName) return false
        if (outputDataConfig != other.outputDataConfig) return false
        if (roleArn != other.roleArn) return false
        if (stoppingCondition != other.stoppingCondition) return false
        if (tags != other.tags) return false

        return true
    }

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

    public class Builder {
        /**
         * Definition of the Amazon Braket job to be created. Specifies the container image the job uses and information about the Python scripts used for entry and training.
         */
        public var algorithmSpecification: aws.sdk.kotlin.services.braket.model.AlgorithmSpecification? = null
        /**
         * The list of Amazon Braket resources associated with the hybrid job.
         */
        public var associations: List? = null
        /**
         * Information about the output locations for job checkpoint data.
         */
        public var checkpointConfig: aws.sdk.kotlin.services.braket.model.JobCheckpointConfig? = null
        /**
         * A unique token that guarantees that the call to this API is idempotent.
         */
        public var clientToken: kotlin.String? = null
        /**
         * The quantum processing unit (QPU) or simulator used to create an Amazon Braket job.
         */
        public var deviceConfig: aws.sdk.kotlin.services.braket.model.DeviceConfig? = null
        /**
         * Algorithm-specific parameters used by an Amazon Braket job that influence the quality of the training job. The values are set with a string of JSON key:value pairs, where the key is the name of the hyperparameter and the value is the value of th hyperparameter.
         */
        public var hyperParameters: Map? = null
        /**
         * A list of parameters that specify the name and type of input data and where it is located.
         */
        public var inputDataConfig: List? = null
        /**
         * Configuration of the resource instances to use while running the hybrid job on Amazon Braket.
         */
        public var instanceConfig: aws.sdk.kotlin.services.braket.model.InstanceConfig? = null
        /**
         * The name of the Amazon Braket job.
         */
        public var jobName: kotlin.String? = null
        /**
         * The path to the S3 location where you want to store job artifacts and the encryption key used to store them.
         */
        public var outputDataConfig: aws.sdk.kotlin.services.braket.model.JobOutputDataConfig? = null
        /**
         * The Amazon Resource Name (ARN) of an IAM role that Amazon Braket can assume to perform tasks on behalf of a user. It can access user resources, run an Amazon Braket job container on behalf of user, and output resources to the users' s3 buckets.
         */
        public var roleArn: kotlin.String? = null
        /**
         * The user-defined criteria that specifies when a job stops running.
         */
        public var stoppingCondition: aws.sdk.kotlin.services.braket.model.JobStoppingCondition? = null
        /**
         * A tag object that consists of a key and an optional value, used to manage metadata for Amazon Braket resources.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.braket.model.CreateJobRequest) : this() {
            this.algorithmSpecification = x.algorithmSpecification
            this.associations = x.associations
            this.checkpointConfig = x.checkpointConfig
            this.clientToken = x.clientToken
            this.deviceConfig = x.deviceConfig
            this.hyperParameters = x.hyperParameters
            this.inputDataConfig = x.inputDataConfig
            this.instanceConfig = x.instanceConfig
            this.jobName = x.jobName
            this.outputDataConfig = x.outputDataConfig
            this.roleArn = x.roleArn
            this.stoppingCondition = x.stoppingCondition
            this.tags = x.tags
        }

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

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

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

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

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

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

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

        internal fun correctErrors(): Builder {
            if (clientToken == null) clientToken = ""
            if (jobName == null) jobName = ""
            if (roleArn == null) roleArn = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy