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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Specifies the name of an S3 bucket and a `CodeArtifacts` object that contains the S3 object keys for a source code .zip file and for a build artifacts .zip file that contains .jar or .class files.
 */
public class S3RepositoryDetails private constructor(builder: Builder) {
    /**
     * The name of the S3 bucket used for associating a new S3 repository. It must begin with `codeguru-reviewer-`.
     */
    public val bucketName: kotlin.String? = builder.bucketName
    /**
     * A `CodeArtifacts` object. The `CodeArtifacts` object includes the S3 object key for a source code .zip file and for a build artifacts .zip file that contains .jar or .class files.
     */
    public val codeArtifacts: aws.sdk.kotlin.services.codegurureviewer.model.CodeArtifacts? = builder.codeArtifacts

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

    override fun toString(): kotlin.String = buildString {
        append("S3RepositoryDetails(")
        append("bucketName=$bucketName,")
        append("codeArtifacts=$codeArtifacts")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = bucketName?.hashCode() ?: 0
        result = 31 * result + (codeArtifacts?.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 S3RepositoryDetails

        if (bucketName != other.bucketName) return false
        if (codeArtifacts != other.codeArtifacts) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the S3 bucket used for associating a new S3 repository. It must begin with `codeguru-reviewer-`.
         */
        public var bucketName: kotlin.String? = null
        /**
         * A `CodeArtifacts` object. The `CodeArtifacts` object includes the S3 object key for a source code .zip file and for a build artifacts .zip file that contains .jar or .class files.
         */
        public var codeArtifacts: aws.sdk.kotlin.services.codegurureviewer.model.CodeArtifacts? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codegurureviewer.model.S3RepositoryDetails) : this() {
            this.bucketName = x.bucketName
            this.codeArtifacts = x.codeArtifacts
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.codegurureviewer.model.CodeArtifacts] inside the given [block]
         */
        public fun codeArtifacts(block: aws.sdk.kotlin.services.codegurureviewer.model.CodeArtifacts.Builder.() -> kotlin.Unit) {
            this.codeArtifacts = aws.sdk.kotlin.services.codegurureviewer.model.CodeArtifacts.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy