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

commonMain.aws.sdk.kotlin.services.codegurureviewer.model.ThirdPartySourceRepository.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codegurureviewer.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about a third-party source repository connected to CodeGuru Reviewer.
 */
public class ThirdPartySourceRepository private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is `arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id`. For more information, see [Connection](https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html) in the *Amazon Web Services CodeStar Connections API Reference*.
     */
    public val connectionArn: kotlin.String = requireNotNull(builder.connectionArn) { "A non-null value must be provided for connectionArn" }
    /**
     * The name of the third party source repository.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The owner of the repository. For a GitHub, GitHub Enterprise, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, this can be the username or Amazon Web Services account ID
     */
    public val owner: kotlin.String = requireNotNull(builder.owner) { "A non-null value must be provided for owner" }

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

    override fun toString(): kotlin.String = buildString {
        append("ThirdPartySourceRepository(")
        append("connectionArn=$connectionArn,")
        append("name=$name,")
        append("owner=$owner")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = connectionArn.hashCode()
        result = 31 * result + (name.hashCode())
        result = 31 * result + (owner.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 ThirdPartySourceRepository

        if (connectionArn != other.connectionArn) return false
        if (name != other.name) return false
        if (owner != other.owner) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is `arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id`. For more information, see [Connection](https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html) in the *Amazon Web Services CodeStar Connections API Reference*.
         */
        public var connectionArn: kotlin.String? = null
        /**
         * The name of the third party source repository.
         */
        public var name: kotlin.String? = null
        /**
         * The owner of the repository. For a GitHub, GitHub Enterprise, or Bitbucket repository, this is the username for the account that owns the repository. For an S3 repository, this can be the username or Amazon Web Services account ID
         */
        public var owner: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codegurureviewer.model.ThirdPartySourceRepository) : this() {
            this.connectionArn = x.connectionArn
            this.name = x.name
            this.owner = x.owner
        }

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

        internal fun correctErrors(): Builder {
            if (connectionArn == null) connectionArn = ""
            if (name == null) name = ""
            if (owner == null) owner = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy