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

commonMain.aws.sdk.kotlin.services.kinesisvideo.model.StreamNameCondition.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.kinesisvideo.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Specifies the condition that streams must satisfy to be returned when you list streams (see the `ListStreams` API). A condition has a comparison operation and a value. Currently, you can specify only the `BEGINS_WITH` operator, which finds streams whose names start with a given prefix.
 */
public class StreamNameCondition private constructor(builder: Builder) {
    /**
     * A comparison operator. Currently, you can specify only the `BEGINS_WITH` operator, which finds streams whose names start with a given prefix.
     */
    public val comparisonOperator: aws.sdk.kotlin.services.kinesisvideo.model.ComparisonOperator? = builder.comparisonOperator
    /**
     * A value to compare.
     */
    public val comparisonValue: kotlin.String? = builder.comparisonValue

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

    override fun toString(): kotlin.String = buildString {
        append("StreamNameCondition(")
        append("comparisonOperator=$comparisonOperator,")
        append("comparisonValue=$comparisonValue")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = comparisonOperator?.hashCode() ?: 0
        result = 31 * result + (comparisonValue?.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 StreamNameCondition

        if (comparisonOperator != other.comparisonOperator) return false
        if (comparisonValue != other.comparisonValue) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A comparison operator. Currently, you can specify only the `BEGINS_WITH` operator, which finds streams whose names start with a given prefix.
         */
        public var comparisonOperator: aws.sdk.kotlin.services.kinesisvideo.model.ComparisonOperator? = null
        /**
         * A value to compare.
         */
        public var comparisonValue: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kinesisvideo.model.StreamNameCondition) : this() {
            this.comparisonOperator = x.comparisonOperator
            this.comparisonValue = x.comparisonValue
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy