
commonMain.aws.sdk.kotlin.services.pipes.model.PipeTargetBatchJobParameters.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.pipes.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The parameters for using an Batch job as a target.
*/
public class PipeTargetBatchJobParameters private constructor(builder: Builder) {
/**
* The array properties for the submitted job, such as the size of the array. The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. This parameter is used only if the target is an Batch job.
*/
public val arrayProperties: aws.sdk.kotlin.services.pipes.model.BatchArrayProperties? = builder.arrayProperties
/**
* The overrides that are sent to a container.
*/
public val containerOverrides: aws.sdk.kotlin.services.pipes.model.BatchContainerOverrides? = builder.containerOverrides
/**
* A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a `SEQUENTIAL` type dependency without specifying a job ID for array jobs so that each child array job completes sequentially, starting at index 0. You can also specify an `N_TO_N` type dependency with a job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of each dependency to complete before it can begin.
*/
public val dependsOn: List? = builder.dependsOn
/**
* The job definition used by this job. This value can be one of `name`, `name:revision`, or the Amazon Resource Name (ARN) for the job definition. If name is specified without a revision then the latest active revision is used.
*/
public val jobDefinition: kotlin.String = requireNotNull(builder.jobDefinition) { "A non-null value must be provided for jobDefinition" }
/**
* The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
*/
public val jobName: kotlin.String = requireNotNull(builder.jobName) { "A non-null value must be provided for jobName" }
/**
* Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job definition. Parameters are specified as a key and value pair mapping. Parameters included here override any corresponding parameter defaults from the job definition.
*/
public val parameters: Map? = builder.parameters
/**
* The retry strategy to use for failed jobs. When a retry strategy is specified here, it overrides the retry strategy defined in the job definition.
*/
public val retryStrategy: aws.sdk.kotlin.services.pipes.model.BatchRetryStrategy? = builder.retryStrategy
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pipes.model.PipeTargetBatchJobParameters = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PipeTargetBatchJobParameters(")
append("arrayProperties=$arrayProperties,")
append("containerOverrides=$containerOverrides,")
append("dependsOn=$dependsOn,")
append("jobDefinition=$jobDefinition,")
append("jobName=$jobName,")
append("parameters=$parameters,")
append("retryStrategy=$retryStrategy")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arrayProperties?.hashCode() ?: 0
result = 31 * result + (containerOverrides?.hashCode() ?: 0)
result = 31 * result + (dependsOn?.hashCode() ?: 0)
result = 31 * result + (jobDefinition.hashCode())
result = 31 * result + (jobName.hashCode())
result = 31 * result + (parameters?.hashCode() ?: 0)
result = 31 * result + (retryStrategy?.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 PipeTargetBatchJobParameters
if (arrayProperties != other.arrayProperties) return false
if (containerOverrides != other.containerOverrides) return false
if (dependsOn != other.dependsOn) return false
if (jobDefinition != other.jobDefinition) return false
if (jobName != other.jobName) return false
if (parameters != other.parameters) return false
if (retryStrategy != other.retryStrategy) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pipes.model.PipeTargetBatchJobParameters = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The array properties for the submitted job, such as the size of the array. The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. This parameter is used only if the target is an Batch job.
*/
public var arrayProperties: aws.sdk.kotlin.services.pipes.model.BatchArrayProperties? = null
/**
* The overrides that are sent to a container.
*/
public var containerOverrides: aws.sdk.kotlin.services.pipes.model.BatchContainerOverrides? = null
/**
* A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a `SEQUENTIAL` type dependency without specifying a job ID for array jobs so that each child array job completes sequentially, starting at index 0. You can also specify an `N_TO_N` type dependency with a job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of each dependency to complete before it can begin.
*/
public var dependsOn: List? = null
/**
* The job definition used by this job. This value can be one of `name`, `name:revision`, or the Amazon Resource Name (ARN) for the job definition. If name is specified without a revision then the latest active revision is used.
*/
public var jobDefinition: kotlin.String? = null
/**
* The name of the job. It can be up to 128 letters long. The first character must be alphanumeric, can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
*/
public var jobName: kotlin.String? = null
/**
* Additional parameters passed to the job that replace parameter substitution placeholders that are set in the job definition. Parameters are specified as a key and value pair mapping. Parameters included here override any corresponding parameter defaults from the job definition.
*/
public var parameters: Map? = null
/**
* The retry strategy to use for failed jobs. When a retry strategy is specified here, it overrides the retry strategy defined in the job definition.
*/
public var retryStrategy: aws.sdk.kotlin.services.pipes.model.BatchRetryStrategy? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pipes.model.PipeTargetBatchJobParameters) : this() {
this.arrayProperties = x.arrayProperties
this.containerOverrides = x.containerOverrides
this.dependsOn = x.dependsOn
this.jobDefinition = x.jobDefinition
this.jobName = x.jobName
this.parameters = x.parameters
this.retryStrategy = x.retryStrategy
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pipes.model.PipeTargetBatchJobParameters = PipeTargetBatchJobParameters(this)
/**
* construct an [aws.sdk.kotlin.services.pipes.model.BatchArrayProperties] inside the given [block]
*/
public fun arrayProperties(block: aws.sdk.kotlin.services.pipes.model.BatchArrayProperties.Builder.() -> kotlin.Unit) {
this.arrayProperties = aws.sdk.kotlin.services.pipes.model.BatchArrayProperties.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.pipes.model.BatchContainerOverrides] inside the given [block]
*/
public fun containerOverrides(block: aws.sdk.kotlin.services.pipes.model.BatchContainerOverrides.Builder.() -> kotlin.Unit) {
this.containerOverrides = aws.sdk.kotlin.services.pipes.model.BatchContainerOverrides.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.pipes.model.BatchRetryStrategy] inside the given [block]
*/
public fun retryStrategy(block: aws.sdk.kotlin.services.pipes.model.BatchRetryStrategy.Builder.() -> kotlin.Unit) {
this.retryStrategy = aws.sdk.kotlin.services.pipes.model.BatchRetryStrategy.invoke(block)
}
internal fun correctErrors(): Builder {
if (jobDefinition == null) jobDefinition = ""
if (jobName == null) jobName = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy