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

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

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

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



/**
 * A set of rules used to make a recommendation during an analysis.
 */
public class Pattern private constructor(builder: Builder) {
    /**
     * A list of the different counters used to determine if there is a match.
     */
    public val countersToAggregate: List? = builder.countersToAggregate
    /**
     * The description of the recommendation. This explains a potential inefficiency in a profiled application.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The universally unique identifier (UUID) of this pattern.
     */
    public val id: kotlin.String? = builder.id
    /**
     * The name for this pattern.
     */
    public val name: kotlin.String? = builder.name
    /**
     * A string that contains the steps recommended to address the potential inefficiency.
     */
    public val resolutionSteps: kotlin.String? = builder.resolutionSteps
    /**
     * A list of frame names that were searched during the analysis that generated a recommendation.
     */
    public val targetFrames: List>? = builder.targetFrames
    /**
     * The percentage of time an application spends in one method that triggers a recommendation. The percentage of time is the same as the percentage of the total gathered sample counts during analysis.
     */
    public val thresholdPercent: kotlin.Double = builder.thresholdPercent

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

    override fun toString(): kotlin.String = buildString {
        append("Pattern(")
        append("countersToAggregate=$countersToAggregate,")
        append("description=$description,")
        append("id=$id,")
        append("name=$name,")
        append("resolutionSteps=$resolutionSteps,")
        append("targetFrames=$targetFrames,")
        append("thresholdPercent=$thresholdPercent")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = countersToAggregate?.hashCode() ?: 0
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (id?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (resolutionSteps?.hashCode() ?: 0)
        result = 31 * result + (targetFrames?.hashCode() ?: 0)
        result = 31 * result + (thresholdPercent.hashCode())
        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 Pattern

        if (countersToAggregate != other.countersToAggregate) return false
        if (description != other.description) return false
        if (id != other.id) return false
        if (name != other.name) return false
        if (resolutionSteps != other.resolutionSteps) return false
        if (targetFrames != other.targetFrames) return false
        if (thresholdPercent != other.thresholdPercent) return false

        return true
    }

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

    public class Builder {
        /**
         * A list of the different counters used to determine if there is a match.
         */
        public var countersToAggregate: List? = null
        /**
         * The description of the recommendation. This explains a potential inefficiency in a profiled application.
         */
        public var description: kotlin.String? = null
        /**
         * The universally unique identifier (UUID) of this pattern.
         */
        public var id: kotlin.String? = null
        /**
         * The name for this pattern.
         */
        public var name: kotlin.String? = null
        /**
         * A string that contains the steps recommended to address the potential inefficiency.
         */
        public var resolutionSteps: kotlin.String? = null
        /**
         * A list of frame names that were searched during the analysis that generated a recommendation.
         */
        public var targetFrames: List>? = null
        /**
         * The percentage of time an application spends in one method that triggers a recommendation. The percentage of time is the same as the percentage of the total gathered sample counts during analysis.
         */
        public var thresholdPercent: kotlin.Double = 0.0

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codeguruprofiler.model.Pattern) : this() {
            this.countersToAggregate = x.countersToAggregate
            this.description = x.description
            this.id = x.id
            this.name = x.name
            this.resolutionSteps = x.resolutionSteps
            this.targetFrames = x.targetFrames
            this.thresholdPercent = x.thresholdPercent
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy