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

commonMain.aws.sdk.kotlin.services.codepipeline.model.PollForJobsRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.99
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codepipeline.model



/**
 * Represents the input of a `PollForJobs` action.
 */
public class PollForJobsRequest private constructor(builder: Builder) {
    /**
     * Represents information about an action type.
     */
    public val actionTypeId: aws.sdk.kotlin.services.codepipeline.model.ActionTypeId? = builder.actionTypeId
    /**
     * The maximum number of jobs to return in a poll for jobs call.
     */
    public val maxBatchSize: kotlin.Int? = builder.maxBatchSize
    /**
     * A map of property names and values. For an action type with no queryable properties, this value must be null or an empty map. For an action type with a queryable property, you must supply that property as a key in the map. Only jobs whose action configuration matches the mapped value are returned.
     */
    public val queryParam: Map? = builder.queryParam

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

    override fun toString(): kotlin.String = buildString {
        append("PollForJobsRequest(")
        append("actionTypeId=$actionTypeId,")
        append("maxBatchSize=$maxBatchSize,")
        append("queryParam=$queryParam")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = actionTypeId?.hashCode() ?: 0
        result = 31 * result + (maxBatchSize ?: 0)
        result = 31 * result + (queryParam?.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 PollForJobsRequest

        if (actionTypeId != other.actionTypeId) return false
        if (maxBatchSize != other.maxBatchSize) return false
        if (queryParam != other.queryParam) return false

        return true
    }

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

    public class Builder {
        /**
         * Represents information about an action type.
         */
        public var actionTypeId: aws.sdk.kotlin.services.codepipeline.model.ActionTypeId? = null
        /**
         * The maximum number of jobs to return in a poll for jobs call.
         */
        public var maxBatchSize: kotlin.Int? = null
        /**
         * A map of property names and values. For an action type with no queryable properties, this value must be null or an empty map. For an action type with a queryable property, you must supply that property as a key in the map. Only jobs whose action configuration matches the mapped value are returned.
         */
        public var queryParam: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codepipeline.model.PollForJobsRequest) : this() {
            this.actionTypeId = x.actionTypeId
            this.maxBatchSize = x.maxBatchSize
            this.queryParam = x.queryParam
        }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy