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

commonMain.aws.sdk.kotlin.services.codeguruprofiler.model.AggregatedProfileTime.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codeguruprofiler.model

import aws.smithy.kotlin.runtime.time.Instant

/**
 * Specifies the aggregation period and aggregation start time for an aggregated profile. An aggregated profile is used to collect posted agent profiles during an aggregation period. There are three possible aggregation periods (1 day, 1 hour, or 5 minutes).
 */
public class AggregatedProfileTime private constructor(builder: Builder) {
    /**
     * The aggregation period. This indicates the period during which an aggregation profile collects posted agent profiles for a profiling group. Use one of three valid durations that are specified using the ISO 8601 format.
     * + `P1D` — 1 day
     * + `PT1H` — 1 hour
     * + `PT5M` — 5 minutes
     */
    public val period: aws.sdk.kotlin.services.codeguruprofiler.model.AggregationPeriod? = builder.period
    /**
     * The time that aggregation of posted agent profiles for a profiling group starts. The aggregation profile contains profiles posted by the agent starting at this time for an aggregation period specified by the `period` property of the `AggregatedProfileTime` object.
     *
     *  Specify `start` using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
     */
    public val start: aws.smithy.kotlin.runtime.time.Instant? = builder.start

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

    override fun toString(): kotlin.String = buildString {
        append("AggregatedProfileTime(")
        append("period=$period,")
        append("start=$start")
        append(")")
    }

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

        if (period != other.period) return false
        if (start != other.start) return false

        return true
    }

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

    public class Builder {
        /**
         * The aggregation period. This indicates the period during which an aggregation profile collects posted agent profiles for a profiling group. Use one of three valid durations that are specified using the ISO 8601 format.
         * + `P1D` — 1 day
         * + `PT1H` — 1 hour
         * + `PT5M` — 5 minutes
         */
        public var period: aws.sdk.kotlin.services.codeguruprofiler.model.AggregationPeriod? = null
        /**
         * The time that aggregation of posted agent profiles for a profiling group starts. The aggregation profile contains profiles posted by the agent starting at this time for an aggregation period specified by the `period` property of the `AggregatedProfileTime` object.
         *
         *  Specify `start` using the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
         */
        public var start: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codeguruprofiler.model.AggregatedProfileTime) : this() {
            this.period = x.period
            this.start = x.start
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.codeguruprofiler.model.AggregatedProfileTime = AggregatedProfileTime(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy