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

commonMain.aws.sdk.kotlin.services.swf.model.CountClosedWorkflowExecutionsRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.swf.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CountClosedWorkflowExecutionsRequest private constructor(builder: Builder) {
    /**
     * If specified, only workflow executions that match this close status are counted. This filter has an affect only if `executionStatus` is specified as `CLOSED`.
     *
     * `closeStatusFilter`, `executionFilter`, `typeFilter` and `tagFilter` are mutually exclusive. You can specify at most one of these in a request.
     */
    public val closeStatusFilter: aws.sdk.kotlin.services.swf.model.CloseStatusFilter? = builder.closeStatusFilter
    /**
     * If specified, only workflow executions that meet the close time criteria of the filter are counted.
     *
     * `startTimeFilter` and `closeTimeFilter` are mutually exclusive. You must specify one of these in a request but not both.
     */
    public val closeTimeFilter: aws.sdk.kotlin.services.swf.model.ExecutionTimeFilter? = builder.closeTimeFilter
    /**
     * The name of the domain containing the workflow executions to count.
     */
    public val domain: kotlin.String? = builder.domain
    /**
     * If specified, only workflow executions matching the `WorkflowId` in the filter are counted.
     *
     * `closeStatusFilter`, `executionFilter`, `typeFilter` and `tagFilter` are mutually exclusive. You can specify at most one of these in a request.
     */
    public val executionFilter: aws.sdk.kotlin.services.swf.model.WorkflowExecutionFilter? = builder.executionFilter
    /**
     * If specified, only workflow executions that meet the start time criteria of the filter are counted.
     *
     * `startTimeFilter` and `closeTimeFilter` are mutually exclusive. You must specify one of these in a request but not both.
     */
    public val startTimeFilter: aws.sdk.kotlin.services.swf.model.ExecutionTimeFilter? = builder.startTimeFilter
    /**
     * If specified, only executions that have a tag that matches the filter are counted.
     *
     * `closeStatusFilter`, `executionFilter`, `typeFilter` and `tagFilter` are mutually exclusive. You can specify at most one of these in a request.
     */
    public val tagFilter: aws.sdk.kotlin.services.swf.model.TagFilter? = builder.tagFilter
    /**
     * If specified, indicates the type of the workflow executions to be counted.
     *
     * `closeStatusFilter`, `executionFilter`, `typeFilter` and `tagFilter` are mutually exclusive. You can specify at most one of these in a request.
     */
    public val typeFilter: aws.sdk.kotlin.services.swf.model.WorkflowTypeFilter? = builder.typeFilter

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

    override fun toString(): kotlin.String = buildString {
        append("CountClosedWorkflowExecutionsRequest(")
        append("closeStatusFilter=$closeStatusFilter,")
        append("closeTimeFilter=$closeTimeFilter,")
        append("domain=$domain,")
        append("executionFilter=$executionFilter,")
        append("startTimeFilter=$startTimeFilter,")
        append("tagFilter=$tagFilter,")
        append("typeFilter=$typeFilter")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = closeStatusFilter?.hashCode() ?: 0
        result = 31 * result + (closeTimeFilter?.hashCode() ?: 0)
        result = 31 * result + (domain?.hashCode() ?: 0)
        result = 31 * result + (executionFilter?.hashCode() ?: 0)
        result = 31 * result + (startTimeFilter?.hashCode() ?: 0)
        result = 31 * result + (tagFilter?.hashCode() ?: 0)
        result = 31 * result + (typeFilter?.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 CountClosedWorkflowExecutionsRequest

        if (closeStatusFilter != other.closeStatusFilter) return false
        if (closeTimeFilter != other.closeTimeFilter) return false
        if (domain != other.domain) return false
        if (executionFilter != other.executionFilter) return false
        if (startTimeFilter != other.startTimeFilter) return false
        if (tagFilter != other.tagFilter) return false
        if (typeFilter != other.typeFilter) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * If specified, only workflow executions that match this close status are counted. This filter has an affect only if `executionStatus` is specified as `CLOSED`.
         *
         * `closeStatusFilter`, `executionFilter`, `typeFilter` and `tagFilter` are mutually exclusive. You can specify at most one of these in a request.
         */
        public var closeStatusFilter: aws.sdk.kotlin.services.swf.model.CloseStatusFilter? = null
        /**
         * If specified, only workflow executions that meet the close time criteria of the filter are counted.
         *
         * `startTimeFilter` and `closeTimeFilter` are mutually exclusive. You must specify one of these in a request but not both.
         */
        public var closeTimeFilter: aws.sdk.kotlin.services.swf.model.ExecutionTimeFilter? = null
        /**
         * The name of the domain containing the workflow executions to count.
         */
        public var domain: kotlin.String? = null
        /**
         * If specified, only workflow executions matching the `WorkflowId` in the filter are counted.
         *
         * `closeStatusFilter`, `executionFilter`, `typeFilter` and `tagFilter` are mutually exclusive. You can specify at most one of these in a request.
         */
        public var executionFilter: aws.sdk.kotlin.services.swf.model.WorkflowExecutionFilter? = null
        /**
         * If specified, only workflow executions that meet the start time criteria of the filter are counted.
         *
         * `startTimeFilter` and `closeTimeFilter` are mutually exclusive. You must specify one of these in a request but not both.
         */
        public var startTimeFilter: aws.sdk.kotlin.services.swf.model.ExecutionTimeFilter? = null
        /**
         * If specified, only executions that have a tag that matches the filter are counted.
         *
         * `closeStatusFilter`, `executionFilter`, `typeFilter` and `tagFilter` are mutually exclusive. You can specify at most one of these in a request.
         */
        public var tagFilter: aws.sdk.kotlin.services.swf.model.TagFilter? = null
        /**
         * If specified, indicates the type of the workflow executions to be counted.
         *
         * `closeStatusFilter`, `executionFilter`, `typeFilter` and `tagFilter` are mutually exclusive. You can specify at most one of these in a request.
         */
        public var typeFilter: aws.sdk.kotlin.services.swf.model.WorkflowTypeFilter? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.swf.model.CountClosedWorkflowExecutionsRequest) : this() {
            this.closeStatusFilter = x.closeStatusFilter
            this.closeTimeFilter = x.closeTimeFilter
            this.domain = x.domain
            this.executionFilter = x.executionFilter
            this.startTimeFilter = x.startTimeFilter
            this.tagFilter = x.tagFilter
            this.typeFilter = x.typeFilter
        }

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

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

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

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy