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

commonMain.aws.sdk.kotlin.services.codecommit.model.FileModes.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codecommit.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Information about file modes in a merge or pull request.
 */
public class FileModes private constructor(builder: Builder) {
    /**
     * The file mode of a file in the base of a merge or pull request.
     */
    public val base: aws.sdk.kotlin.services.codecommit.model.FileModeTypeEnum? = builder.base
    /**
     * The file mode of a file in the destination of a merge or pull request.
     */
    public val destination: aws.sdk.kotlin.services.codecommit.model.FileModeTypeEnum? = builder.destination
    /**
     * The file mode of a file in the source of a merge or pull request.
     */
    public val source: aws.sdk.kotlin.services.codecommit.model.FileModeTypeEnum? = builder.source

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

    override fun toString(): kotlin.String = buildString {
        append("FileModes(")
        append("base=$base,")
        append("destination=$destination,")
        append("source=$source")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = base?.hashCode() ?: 0
        result = 31 * result + (destination?.hashCode() ?: 0)
        result = 31 * result + (source?.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 FileModes

        if (base != other.base) return false
        if (destination != other.destination) return false
        if (source != other.source) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The file mode of a file in the base of a merge or pull request.
         */
        public var base: aws.sdk.kotlin.services.codecommit.model.FileModeTypeEnum? = null
        /**
         * The file mode of a file in the destination of a merge or pull request.
         */
        public var destination: aws.sdk.kotlin.services.codecommit.model.FileModeTypeEnum? = null
        /**
         * The file mode of a file in the source of a merge or pull request.
         */
        public var source: aws.sdk.kotlin.services.codecommit.model.FileModeTypeEnum? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codecommit.model.FileModes) : this() {
            this.base = x.base
            this.destination = x.destination
            this.source = x.source
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy