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

commonMain.aws.sdk.kotlin.services.devicefarm.model.CreateUploadRequest.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

/**
 * Represents a request to the create upload operation.
 */
public class CreateUploadRequest private constructor(builder: Builder) {
    /**
     * The upload's content type (for example, `application/octet-stream`).
     */
    public val contentType: kotlin.String? = builder.contentType
    /**
     * The upload's file name. The name should not contain any forward slashes (`/`). If you are uploading an iOS app, the file name must end with the `.ipa` extension. If you are uploading an Android app, the file name must end with the `.apk` extension. For all others, the file name must end with the `.zip` file extension.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The ARN of the project for the upload.
     */
    public val projectArn: kotlin.String? = builder.projectArn
    /**
     * The upload's upload type.
     *
     * Must be one of the following values:
     * + ANDROID_APP
     * + IOS_APP
     * + WEB_APP
     * + EXTERNAL_DATA
     * + APPIUM_JAVA_JUNIT_TEST_PACKAGE
     * + APPIUM_JAVA_TESTNG_TEST_PACKAGE
     * + APPIUM_PYTHON_TEST_PACKAGE
     * + APPIUM_NODE_TEST_PACKAGE
     * + APPIUM_RUBY_TEST_PACKAGE
     * + APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE
     * + APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE
     * + APPIUM_WEB_PYTHON_TEST_PACKAGE
     * + APPIUM_WEB_NODE_TEST_PACKAGE
     * + APPIUM_WEB_RUBY_TEST_PACKAGE
     * + INSTRUMENTATION_TEST_PACKAGE
     * + XCTEST_TEST_PACKAGE
     * + XCTEST_UI_TEST_PACKAGE
     * + APPIUM_JAVA_JUNIT_TEST_SPEC
     * + APPIUM_JAVA_TESTNG_TEST_SPEC
     * + APPIUM_PYTHON_TEST_SPEC
     * + APPIUM_NODE_TEST_SPEC
     * + APPIUM_RUBY_TEST_SPEC
     * + APPIUM_WEB_JAVA_JUNIT_TEST_SPEC
     * + APPIUM_WEB_JAVA_TESTNG_TEST_SPEC
     * + APPIUM_WEB_PYTHON_TEST_SPEC
     * + APPIUM_WEB_NODE_TEST_SPEC
     * + APPIUM_WEB_RUBY_TEST_SPEC
     * + INSTRUMENTATION_TEST_SPEC
     * + XCTEST_UI_TEST_SPEC
     *
     *  If you call `CreateUpload` with `WEB_APP` specified, AWS Device Farm throws an `ArgumentException` error.
     */
    public val type: aws.sdk.kotlin.services.devicefarm.model.UploadType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("CreateUploadRequest(")
        append("contentType=$contentType,")
        append("name=$name,")
        append("projectArn=$projectArn,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = contentType?.hashCode() ?: 0
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (projectArn?.hashCode() ?: 0)
        result = 31 * result + (type?.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 CreateUploadRequest

        if (contentType != other.contentType) return false
        if (name != other.name) return false
        if (projectArn != other.projectArn) return false
        if (type != other.type) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The upload's content type (for example, `application/octet-stream`).
         */
        public var contentType: kotlin.String? = null
        /**
         * The upload's file name. The name should not contain any forward slashes (`/`). If you are uploading an iOS app, the file name must end with the `.ipa` extension. If you are uploading an Android app, the file name must end with the `.apk` extension. For all others, the file name must end with the `.zip` file extension.
         */
        public var name: kotlin.String? = null
        /**
         * The ARN of the project for the upload.
         */
        public var projectArn: kotlin.String? = null
        /**
         * The upload's upload type.
         *
         * Must be one of the following values:
         * + ANDROID_APP
         * + IOS_APP
         * + WEB_APP
         * + EXTERNAL_DATA
         * + APPIUM_JAVA_JUNIT_TEST_PACKAGE
         * + APPIUM_JAVA_TESTNG_TEST_PACKAGE
         * + APPIUM_PYTHON_TEST_PACKAGE
         * + APPIUM_NODE_TEST_PACKAGE
         * + APPIUM_RUBY_TEST_PACKAGE
         * + APPIUM_WEB_JAVA_JUNIT_TEST_PACKAGE
         * + APPIUM_WEB_JAVA_TESTNG_TEST_PACKAGE
         * + APPIUM_WEB_PYTHON_TEST_PACKAGE
         * + APPIUM_WEB_NODE_TEST_PACKAGE
         * + APPIUM_WEB_RUBY_TEST_PACKAGE
         * + INSTRUMENTATION_TEST_PACKAGE
         * + XCTEST_TEST_PACKAGE
         * + XCTEST_UI_TEST_PACKAGE
         * + APPIUM_JAVA_JUNIT_TEST_SPEC
         * + APPIUM_JAVA_TESTNG_TEST_SPEC
         * + APPIUM_PYTHON_TEST_SPEC
         * + APPIUM_NODE_TEST_SPEC
         * + APPIUM_RUBY_TEST_SPEC
         * + APPIUM_WEB_JAVA_JUNIT_TEST_SPEC
         * + APPIUM_WEB_JAVA_TESTNG_TEST_SPEC
         * + APPIUM_WEB_PYTHON_TEST_SPEC
         * + APPIUM_WEB_NODE_TEST_SPEC
         * + APPIUM_WEB_RUBY_TEST_SPEC
         * + INSTRUMENTATION_TEST_SPEC
         * + XCTEST_UI_TEST_SPEC
         *
         *  If you call `CreateUpload` with `WEB_APP` specified, AWS Device Farm throws an `ArgumentException` error.
         */
        public var type: aws.sdk.kotlin.services.devicefarm.model.UploadType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.devicefarm.model.CreateUploadRequest) : this() {
            this.contentType = x.contentType
            this.name = x.name
            this.projectArn = x.projectArn
            this.type = x.type
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy