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

commonMain.aws.sdk.kotlin.services.codebuild.model.SourceAuth.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codebuild.model



/**
 * Information about the authorization settings for CodeBuild to access the source code to be built.
 *
 * This information is for the CodeBuild console's use only. Your code should not get or set this information directly.
 */
class SourceAuth private constructor(builder: Builder) {
    /**
     * The resource value that applies to the specified authorization type.
     */
    val resource: kotlin.String? = builder.resource
    /**
     * This data type is deprecated and is no longer accurate or used.
     *
     * The authorization type to use. The only valid value is `OAUTH`, which represents the OAuth authorization type.
     */
    val type: aws.sdk.kotlin.services.codebuild.model.SourceAuthType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("SourceAuth(")
        append("resource=$resource,")
        append("type=$type)")
    }

    override fun hashCode(): kotlin.Int {
        var result = resource?.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 SourceAuth

        if (resource != other.resource) return false
        if (type != other.type) return false

        return true
    }

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

    class Builder {
        /**
         * The resource value that applies to the specified authorization type.
         */
        var resource: kotlin.String? = null
        /**
         * This data type is deprecated and is no longer accurate or used.
         *
         * The authorization type to use. The only valid value is `OAUTH`, which represents the OAuth authorization type.
         */
        var type: aws.sdk.kotlin.services.codebuild.model.SourceAuthType? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codebuild.model.SourceAuth) : this() {
            this.resource = x.resource
            this.type = x.type
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy