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

commonMain.aws.sdk.kotlin.services.s3.model.MetricsAndOperator.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.s3.model



/**
 * A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. The operator must have at least two predicates, and an object must match all of the predicates in order for the filter to apply.
 */
public class MetricsAndOperator private constructor(builder: Builder) {
    /**
     * The access point ARN used when evaluating an `AND` predicate.
     */
    public val accessPointArn: kotlin.String? = builder.accessPointArn
    /**
     * The prefix used when evaluating an AND predicate.
     */
    public val prefix: kotlin.String? = builder.prefix
    /**
     * The list of tags used when evaluating an AND predicate.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("MetricsAndOperator(")
        append("accessPointArn=$accessPointArn,")
        append("prefix=$prefix,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = accessPointArn?.hashCode() ?: 0
        result = 31 * result + (prefix?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 MetricsAndOperator

        if (accessPointArn != other.accessPointArn) return false
        if (prefix != other.prefix) return false
        if (tags != other.tags) return false

        return true
    }

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

    public class Builder {
        /**
         * The access point ARN used when evaluating an `AND` predicate.
         */
        public var accessPointArn: kotlin.String? = null
        /**
         * The prefix used when evaluating an AND predicate.
         */
        public var prefix: kotlin.String? = null
        /**
         * The list of tags used when evaluating an AND predicate.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.s3.model.MetricsAndOperator) : this() {
            this.accessPointArn = x.accessPointArn
            this.prefix = x.prefix
            this.tags = x.tags
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy