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

commonMain.aws.sdk.kotlin.services.rekognition.model.GetContentModerationRequestMetadata.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.rekognition.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains metadata about a content moderation request, including the SortBy and AggregateBy options.
 */
public class GetContentModerationRequestMetadata private constructor(builder: Builder) {
    /**
     * The aggregation method chosen for a GetContentModeration request.
     */
    public val aggregateBy: aws.sdk.kotlin.services.rekognition.model.ContentModerationAggregateBy? = builder.aggregateBy
    /**
     * The sorting method chosen for a GetContentModeration request.
     */
    public val sortBy: aws.sdk.kotlin.services.rekognition.model.ContentModerationSortBy? = builder.sortBy

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

    override fun toString(): kotlin.String = buildString {
        append("GetContentModerationRequestMetadata(")
        append("aggregateBy=$aggregateBy,")
        append("sortBy=$sortBy")
        append(")")
    }

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

        if (aggregateBy != other.aggregateBy) return false
        if (sortBy != other.sortBy) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The aggregation method chosen for a GetContentModeration request.
         */
        public var aggregateBy: aws.sdk.kotlin.services.rekognition.model.ContentModerationAggregateBy? = null
        /**
         * The sorting method chosen for a GetContentModeration request.
         */
        public var sortBy: aws.sdk.kotlin.services.rekognition.model.ContentModerationSortBy? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rekognition.model.GetContentModerationRequestMetadata) : this() {
            this.aggregateBy = x.aggregateBy
            this.sortBy = x.sortBy
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy