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

commonMain.aws.sdk.kotlin.services.ecrpublic.model.DescribeRegistriesResponse.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.ecrpublic.model

import aws.smithy.kotlin.runtime.SdkDsl

public class DescribeRegistriesResponse private constructor(builder: Builder) {
    /**
     * The `nextToken` value to include in a future `DescribeRepositories` request. If the results of a `DescribeRepositories` request exceed `maxResults`, you can use this value to retrieve the next page of results. If there are no more results, this value is `null`.
     */
    public val nextToken: kotlin.String? = builder.nextToken
    /**
     * An object that contains the details for a public registry.
     */
    public val registries: List = requireNotNull(builder.registries) { "A non-null value must be provided for registries" }

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeRegistriesResponse(")
        append("nextToken=$nextToken,")
        append("registries=$registries")
        append(")")
    }

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

        if (nextToken != other.nextToken) return false
        if (registries != other.registries) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The `nextToken` value to include in a future `DescribeRepositories` request. If the results of a `DescribeRepositories` request exceed `maxResults`, you can use this value to retrieve the next page of results. If there are no more results, this value is `null`.
         */
        public var nextToken: kotlin.String? = null
        /**
         * An object that contains the details for a public registry.
         */
        public var registries: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ecrpublic.model.DescribeRegistriesResponse) : this() {
            this.nextToken = x.nextToken
            this.registries = x.registries
        }

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

        internal fun correctErrors(): Builder {
            if (registries == null) registries = emptyList()
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy