
commonMain.aws.sdk.kotlin.services.batch.model.UpdateSchedulingPolicyRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.batch.model
/**
* Contains the parameters for `UpdateSchedulingPolicy`.
*/
public class UpdateSchedulingPolicyRequest private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the scheduling policy to update.
*/
public val arn: kotlin.String? = builder.arn
/**
* The fair share policy.
*/
public val fairsharePolicy: aws.sdk.kotlin.services.batch.model.FairsharePolicy? = builder.fairsharePolicy
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.batch.model.UpdateSchedulingPolicyRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateSchedulingPolicyRequest(")
append("arn=$arn,")
append("fairsharePolicy=$fairsharePolicy")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = arn?.hashCode() ?: 0
result = 31 * result + (fairsharePolicy?.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 UpdateSchedulingPolicyRequest
if (arn != other.arn) return false
if (fairsharePolicy != other.fairsharePolicy) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.batch.model.UpdateSchedulingPolicyRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The Amazon Resource Name (ARN) of the scheduling policy to update.
*/
public var arn: kotlin.String? = null
/**
* The fair share policy.
*/
public var fairsharePolicy: aws.sdk.kotlin.services.batch.model.FairsharePolicy? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.batch.model.UpdateSchedulingPolicyRequest) : this() {
this.arn = x.arn
this.fairsharePolicy = x.fairsharePolicy
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.batch.model.UpdateSchedulingPolicyRequest = UpdateSchedulingPolicyRequest(this)
/**
* construct an [aws.sdk.kotlin.services.batch.model.FairsharePolicy] inside the given [block]
*/
public fun fairsharePolicy(block: aws.sdk.kotlin.services.batch.model.FairsharePolicy.Builder.() -> kotlin.Unit) {
this.fairsharePolicy = aws.sdk.kotlin.services.batch.model.FairsharePolicy.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy