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

commonMain.aws.sdk.kotlin.services.codeconnections.model.GetResourceSyncStatusResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codeconnections.model

import aws.smithy.kotlin.runtime.SdkDsl

public class GetResourceSyncStatusResponse private constructor(builder: Builder) {
    /**
     * The desired state of the Amazon Web Services resource for the sync status with the Git repository.
     */
    public val desiredState: aws.sdk.kotlin.services.codeconnections.model.Revision? = builder.desiredState
    /**
     * The latest successful sync for the sync status with the Git repository.
     */
    public val latestSuccessfulSync: aws.sdk.kotlin.services.codeconnections.model.ResourceSyncAttempt? = builder.latestSuccessfulSync
    /**
     * The latest sync for the sync status with the Git repository, whether successful or not.
     */
    public val latestSync: aws.sdk.kotlin.services.codeconnections.model.ResourceSyncAttempt? = builder.latestSync

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

    override fun toString(): kotlin.String = buildString {
        append("GetResourceSyncStatusResponse(")
        append("desiredState=$desiredState,")
        append("latestSuccessfulSync=$latestSuccessfulSync,")
        append("latestSync=$latestSync")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = desiredState?.hashCode() ?: 0
        result = 31 * result + (latestSuccessfulSync?.hashCode() ?: 0)
        result = 31 * result + (latestSync?.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 GetResourceSyncStatusResponse

        if (desiredState != other.desiredState) return false
        if (latestSuccessfulSync != other.latestSuccessfulSync) return false
        if (latestSync != other.latestSync) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The desired state of the Amazon Web Services resource for the sync status with the Git repository.
         */
        public var desiredState: aws.sdk.kotlin.services.codeconnections.model.Revision? = null
        /**
         * The latest successful sync for the sync status with the Git repository.
         */
        public var latestSuccessfulSync: aws.sdk.kotlin.services.codeconnections.model.ResourceSyncAttempt? = null
        /**
         * The latest sync for the sync status with the Git repository, whether successful or not.
         */
        public var latestSync: aws.sdk.kotlin.services.codeconnections.model.ResourceSyncAttempt? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codeconnections.model.GetResourceSyncStatusResponse) : this() {
            this.desiredState = x.desiredState
            this.latestSuccessfulSync = x.latestSuccessfulSync
            this.latestSync = x.latestSync
        }

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy