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

commonMain.aws.sdk.kotlin.services.devicefarm.model.CreateInstanceProfileRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.devicefarm.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreateInstanceProfileRequest private constructor(builder: Builder) {
    /**
     * The description of your instance profile.
     */
    public val description: kotlin.String? = builder.description
    /**
     * An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run.
     *
     * The list of packages is considered only if you set `packageCleanup` to `true`.
     */
    public val excludeAppPackagesFromCleanup: List? = builder.excludeAppPackagesFromCleanup
    /**
     * The name of your instance profile.
     */
    public val name: kotlin.String? = builder.name
    /**
     * When set to `true`, Device Farm removes app packages after a test run. The default value is `false` for private devices.
     */
    public val packageCleanup: kotlin.Boolean? = builder.packageCleanup
    /**
     * When set to `true`, Device Farm reboots the instance after a test run. The default value is `true`.
     */
    public val rebootAfterUse: kotlin.Boolean? = builder.rebootAfterUse

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

    override fun toString(): kotlin.String = buildString {
        append("CreateInstanceProfileRequest(")
        append("description=$description,")
        append("excludeAppPackagesFromCleanup=$excludeAppPackagesFromCleanup,")
        append("name=$name,")
        append("packageCleanup=$packageCleanup,")
        append("rebootAfterUse=$rebootAfterUse")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (excludeAppPackagesFromCleanup?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (packageCleanup?.hashCode() ?: 0)
        result = 31 * result + (rebootAfterUse?.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 CreateInstanceProfileRequest

        if (description != other.description) return false
        if (excludeAppPackagesFromCleanup != other.excludeAppPackagesFromCleanup) return false
        if (name != other.name) return false
        if (packageCleanup != other.packageCleanup) return false
        if (rebootAfterUse != other.rebootAfterUse) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The description of your instance profile.
         */
        public var description: kotlin.String? = null
        /**
         * An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run.
         *
         * The list of packages is considered only if you set `packageCleanup` to `true`.
         */
        public var excludeAppPackagesFromCleanup: List? = null
        /**
         * The name of your instance profile.
         */
        public var name: kotlin.String? = null
        /**
         * When set to `true`, Device Farm removes app packages after a test run. The default value is `false` for private devices.
         */
        public var packageCleanup: kotlin.Boolean? = null
        /**
         * When set to `true`, Device Farm reboots the instance after a test run. The default value is `true`.
         */
        public var rebootAfterUse: kotlin.Boolean? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.devicefarm.model.CreateInstanceProfileRequest) : this() {
            this.description = x.description
            this.excludeAppPackagesFromCleanup = x.excludeAppPackagesFromCleanup
            this.name = x.name
            this.packageCleanup = x.packageCleanup
            this.rebootAfterUse = x.rebootAfterUse
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy