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

commonMain.aws.sdk.kotlin.services.redshift.model.DescribeEndpointAuthorizationRequest.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.redshift.model

import aws.smithy.kotlin.runtime.SdkDsl

public class DescribeEndpointAuthorizationRequest private constructor(builder: Builder) {
    /**
     * The Amazon Web Services account ID of either the cluster owner (grantor) or grantee. If `Grantee` parameter is true, then the `Account` value is of the grantor.
     */
    public val account: kotlin.String? = builder.account
    /**
     * The cluster identifier of the cluster to access.
     */
    public val clusterIdentifier: kotlin.String? = builder.clusterIdentifier
    /**
     * Indicates whether to check authorization from a grantor or grantee point of view. If true, Amazon Redshift returns endpoint authorizations that you've been granted. If false (default), checks authorization from a grantor point of view.
     */
    public val grantee: kotlin.Boolean? = builder.grantee
    /**
     * An optional pagination token provided by a previous `DescribeEndpointAuthorization` request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by the `MaxRecords` parameter.
     */
    public val marker: kotlin.String? = builder.marker
    /**
     * The maximum number of records to include in the response. If more records exist than the specified `MaxRecords` value, a pagination token called a `Marker` is included in the response so that the remaining results can be retrieved.
     */
    public val maxRecords: kotlin.Int? = builder.maxRecords

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeEndpointAuthorizationRequest(")
        append("account=$account,")
        append("clusterIdentifier=$clusterIdentifier,")
        append("grantee=$grantee,")
        append("marker=$marker,")
        append("maxRecords=$maxRecords")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = account?.hashCode() ?: 0
        result = 31 * result + (clusterIdentifier?.hashCode() ?: 0)
        result = 31 * result + (grantee?.hashCode() ?: 0)
        result = 31 * result + (marker?.hashCode() ?: 0)
        result = 31 * result + (maxRecords ?: 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 DescribeEndpointAuthorizationRequest

        if (account != other.account) return false
        if (clusterIdentifier != other.clusterIdentifier) return false
        if (grantee != other.grantee) return false
        if (marker != other.marker) return false
        if (maxRecords != other.maxRecords) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Web Services account ID of either the cluster owner (grantor) or grantee. If `Grantee` parameter is true, then the `Account` value is of the grantor.
         */
        public var account: kotlin.String? = null
        /**
         * The cluster identifier of the cluster to access.
         */
        public var clusterIdentifier: kotlin.String? = null
        /**
         * Indicates whether to check authorization from a grantor or grantee point of view. If true, Amazon Redshift returns endpoint authorizations that you've been granted. If false (default), checks authorization from a grantor point of view.
         */
        public var grantee: kotlin.Boolean? = null
        /**
         * An optional pagination token provided by a previous `DescribeEndpointAuthorization` request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by the `MaxRecords` parameter.
         */
        public var marker: kotlin.String? = null
        /**
         * The maximum number of records to include in the response. If more records exist than the specified `MaxRecords` value, a pagination token called a `Marker` is included in the response so that the remaining results can be retrieved.
         */
        public var maxRecords: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.redshift.model.DescribeEndpointAuthorizationRequest) : this() {
            this.account = x.account
            this.clusterIdentifier = x.clusterIdentifier
            this.grantee = x.grantee
            this.marker = x.marker
            this.maxRecords = x.maxRecords
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy