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

commonMain.aws.sdk.kotlin.services.fis.model.ExperimentTemplateTarget.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.fis.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes a target for an experiment template.
 */
public class ExperimentTemplateTarget private constructor(builder: Builder) {
    /**
     * The filters to apply to identify target resources using specific attributes.
     */
    public val filters: List? = builder.filters
    /**
     * The resource type parameters.
     */
    public val parameters: Map? = builder.parameters
    /**
     * The Amazon Resource Names (ARNs) of the targets.
     */
    public val resourceArns: List? = builder.resourceArns
    /**
     * The tags for the target resources.
     */
    public val resourceTags: Map? = builder.resourceTags
    /**
     * The resource type.
     */
    public val resourceType: kotlin.String? = builder.resourceType
    /**
     * Scopes the identified resources to a specific count or percentage.
     */
    public val selectionMode: kotlin.String? = builder.selectionMode

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

    override fun toString(): kotlin.String = buildString {
        append("ExperimentTemplateTarget(")
        append("filters=$filters,")
        append("parameters=$parameters,")
        append("resourceArns=$resourceArns,")
        append("resourceTags=$resourceTags,")
        append("resourceType=$resourceType,")
        append("selectionMode=$selectionMode")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = filters?.hashCode() ?: 0
        result = 31 * result + (parameters?.hashCode() ?: 0)
        result = 31 * result + (resourceArns?.hashCode() ?: 0)
        result = 31 * result + (resourceTags?.hashCode() ?: 0)
        result = 31 * result + (resourceType?.hashCode() ?: 0)
        result = 31 * result + (selectionMode?.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 ExperimentTemplateTarget

        if (filters != other.filters) return false
        if (parameters != other.parameters) return false
        if (resourceArns != other.resourceArns) return false
        if (resourceTags != other.resourceTags) return false
        if (resourceType != other.resourceType) return false
        if (selectionMode != other.selectionMode) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The filters to apply to identify target resources using specific attributes.
         */
        public var filters: List? = null
        /**
         * The resource type parameters.
         */
        public var parameters: Map? = null
        /**
         * The Amazon Resource Names (ARNs) of the targets.
         */
        public var resourceArns: List? = null
        /**
         * The tags for the target resources.
         */
        public var resourceTags: Map? = null
        /**
         * The resource type.
         */
        public var resourceType: kotlin.String? = null
        /**
         * Scopes the identified resources to a specific count or percentage.
         */
        public var selectionMode: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.fis.model.ExperimentTemplateTarget) : this() {
            this.filters = x.filters
            this.parameters = x.parameters
            this.resourceArns = x.resourceArns
            this.resourceTags = x.resourceTags
            this.resourceType = x.resourceType
            this.selectionMode = x.selectionMode
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy