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

commonMain.aws.sdk.kotlin.services.codegurureviewer.model.CodeArtifacts.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

/**
 * Code artifacts are source code artifacts and build artifacts used in a repository analysis or a pull request review.
 * + Source code artifacts are source code files in a Git repository that are compressed into a .zip file.
 * + Build artifacts are .jar or .class files that are compressed in a .zip file.
 */
public class CodeArtifacts private constructor(builder: Builder) {
    /**
     * The S3 object key for a build artifacts .zip file that contains .jar or .class files. This is required for a code review with security analysis. For more information, see [Create code reviews with GitHub Actions](https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/working-with-cicd.html) in the *Amazon CodeGuru Reviewer User Guide*.
     */
    public val buildArtifactsObjectKey: kotlin.String? = builder.buildArtifactsObjectKey
    /**
     * The S3 object key for a source code .zip file. This is required for all code reviews.
     */
    public val sourceCodeArtifactsObjectKey: kotlin.String = requireNotNull(builder.sourceCodeArtifactsObjectKey) { "A non-null value must be provided for sourceCodeArtifactsObjectKey" }

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

    override fun toString(): kotlin.String = buildString {
        append("CodeArtifacts(")
        append("buildArtifactsObjectKey=$buildArtifactsObjectKey,")
        append("sourceCodeArtifactsObjectKey=$sourceCodeArtifactsObjectKey")
        append(")")
    }

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

        if (buildArtifactsObjectKey != other.buildArtifactsObjectKey) return false
        if (sourceCodeArtifactsObjectKey != other.sourceCodeArtifactsObjectKey) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The S3 object key for a build artifacts .zip file that contains .jar or .class files. This is required for a code review with security analysis. For more information, see [Create code reviews with GitHub Actions](https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/working-with-cicd.html) in the *Amazon CodeGuru Reviewer User Guide*.
         */
        public var buildArtifactsObjectKey: kotlin.String? = null
        /**
         * The S3 object key for a source code .zip file. This is required for all code reviews.
         */
        public var sourceCodeArtifactsObjectKey: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codegurureviewer.model.CodeArtifacts) : this() {
            this.buildArtifactsObjectKey = x.buildArtifactsObjectKey
            this.sourceCodeArtifactsObjectKey = x.sourceCodeArtifactsObjectKey
        }

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

        internal fun correctErrors(): Builder {
            if (sourceCodeArtifactsObjectKey == null) sourceCodeArtifactsObjectKey = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy