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

commonMain.aws.sdk.kotlin.services.codedeploy.model.GetApplicationRevisionResponse.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.codedeploy.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Represents the output of a `GetApplicationRevision` operation.
 */
public class GetApplicationRevisionResponse private constructor(builder: Builder) {
    /**
     * The name of the application that corresponds to the revision.
     */
    public val applicationName: kotlin.String? = builder.applicationName
    /**
     * Additional information about the revision, including type and location.
     */
    public val revision: aws.sdk.kotlin.services.codedeploy.model.RevisionLocation? = builder.revision
    /**
     * General information about the revision.
     */
    public val revisionInfo: aws.sdk.kotlin.services.codedeploy.model.GenericRevisionInfo? = builder.revisionInfo

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

    override fun toString(): kotlin.String = buildString {
        append("GetApplicationRevisionResponse(")
        append("applicationName=$applicationName,")
        append("revision=$revision,")
        append("revisionInfo=$revisionInfo")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = applicationName?.hashCode() ?: 0
        result = 31 * result + (revision?.hashCode() ?: 0)
        result = 31 * result + (revisionInfo?.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 GetApplicationRevisionResponse

        if (applicationName != other.applicationName) return false
        if (revision != other.revision) return false
        if (revisionInfo != other.revisionInfo) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the application that corresponds to the revision.
         */
        public var applicationName: kotlin.String? = null
        /**
         * Additional information about the revision, including type and location.
         */
        public var revision: aws.sdk.kotlin.services.codedeploy.model.RevisionLocation? = null
        /**
         * General information about the revision.
         */
        public var revisionInfo: aws.sdk.kotlin.services.codedeploy.model.GenericRevisionInfo? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codedeploy.model.GetApplicationRevisionResponse) : this() {
            this.applicationName = x.applicationName
            this.revision = x.revision
            this.revisionInfo = x.revisionInfo
        }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy