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

commonMain.aws.sdk.kotlin.services.codepipeline.model.GetPipelineResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.codepipeline.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Represents the output of a `GetPipeline` action.
 */
public class GetPipelineResponse private constructor(builder: Builder) {
    /**
     * Represents the pipeline metadata information returned as part of the output of a `GetPipeline` action.
     */
    public val metadata: aws.sdk.kotlin.services.codepipeline.model.PipelineMetadata? = builder.metadata
    /**
     * Represents the structure of actions and stages to be performed in the pipeline.
     */
    public val pipeline: aws.sdk.kotlin.services.codepipeline.model.PipelineDeclaration? = builder.pipeline

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

    override fun toString(): kotlin.String = buildString {
        append("GetPipelineResponse(")
        append("metadata=$metadata,")
        append("pipeline=$pipeline")
        append(")")
    }

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

        if (metadata != other.metadata) return false
        if (pipeline != other.pipeline) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Represents the pipeline metadata information returned as part of the output of a `GetPipeline` action.
         */
        public var metadata: aws.sdk.kotlin.services.codepipeline.model.PipelineMetadata? = null
        /**
         * Represents the structure of actions and stages to be performed in the pipeline.
         */
        public var pipeline: aws.sdk.kotlin.services.codepipeline.model.PipelineDeclaration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codepipeline.model.GetPipelineResponse) : this() {
            this.metadata = x.metadata
            this.pipeline = x.pipeline
        }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy