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

commonMain.aws.sdk.kotlin.services.rum.model.GetAppMonitorDataRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.rum.model



public class GetAppMonitorDataRequest private constructor(builder: Builder) {
    /**
     * An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify.
     */
    public val filters: List? = builder.filters
    /**
     * The maximum number of results to return in one operation.
     */
    public val maxResults: kotlin.Int = builder.maxResults
    /**
     * The name of the app monitor that collected the data that you want to retrieve.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * Use the token returned by the previous operation to request the next page of results.
     */
    public val nextToken: kotlin.String? = builder.nextToken
    /**
     * A structure that defines the time range that you want to retrieve results from.
     */
    public val timeRange: aws.sdk.kotlin.services.rum.model.TimeRange? = builder.timeRange

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

    override fun toString(): kotlin.String = buildString {
        append("GetAppMonitorDataRequest(")
        append("filters=$filters,")
        append("maxResults=$maxResults,")
        append("name=$name,")
        append("nextToken=$nextToken,")
        append("timeRange=$timeRange")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = filters?.hashCode() ?: 0
        result = 31 * result + (maxResults)
        result = 31 * result + (name.hashCode())
        result = 31 * result + (nextToken?.hashCode() ?: 0)
        result = 31 * result + (timeRange?.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 GetAppMonitorDataRequest

        if (filters != other.filters) return false
        if (maxResults != other.maxResults) return false
        if (name != other.name) return false
        if (nextToken != other.nextToken) return false
        if (timeRange != other.timeRange) return false

        return true
    }

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

    public class Builder {
        /**
         * An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify.
         */
        public var filters: List? = null
        /**
         * The maximum number of results to return in one operation.
         */
        public var maxResults: kotlin.Int = 0
        /**
         * The name of the app monitor that collected the data that you want to retrieve.
         */
        public var name: kotlin.String? = null
        /**
         * Use the token returned by the previous operation to request the next page of results.
         */
        public var nextToken: kotlin.String? = null
        /**
         * A structure that defines the time range that you want to retrieve results from.
         */
        public var timeRange: aws.sdk.kotlin.services.rum.model.TimeRange? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rum.model.GetAppMonitorDataRequest) : this() {
            this.filters = x.filters
            this.maxResults = x.maxResults
            this.name = x.name
            this.nextToken = x.nextToken
            this.timeRange = x.timeRange
        }

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

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

        internal fun correctErrors(): Builder {
            if (name == null) name = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy