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

commonMain.aws.sdk.kotlin.services.glue.model.GetPartitionsRequest.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.glue.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

public class GetPartitionsRequest private constructor(builder: Builder) {
    /**
     * The ID of the Data Catalog where the partitions in question reside. If none is provided, the Amazon Web Services account ID is used by default.
     */
    public val catalogId: kotlin.String? = builder.catalogId
    /**
     * The name of the catalog database where the partitions reside.
     */
    public val databaseName: kotlin.String? = builder.databaseName
    /**
     * When true, specifies not returning the partition column schema. Useful when you are interested only in other partition attributes such as partition values or location. This approach avoids the problem of a large response by not returning duplicate data.
     */
    public val excludeColumnSchema: kotlin.Boolean? = builder.excludeColumnSchema
    /**
     * An expression that filters the partitions to be returned.
     *
     * The expression uses SQL syntax similar to the SQL `WHERE` filter clause. The SQL statement parser [JSQLParser](http://jsqlparser.sourceforge.net/home.php) parses the expression.
     *
     * *Operators*: The following are the operators that you can use in the `Expression` API call:
     *
     * ## =
     * Checks whether the values of the two operands are equal; if yes, then the condition becomes true.
     *
     * Example: Assume 'variable a' holds 10 and 'variable b' holds 20.
     *
     * (a = b) is not true.
     *
     * ## < >
     * Checks whether the values of two operands are equal; if the values are not equal, then the condition becomes true.
     *
     * Example: (a < > b) is true.
     *
     * ## >
     * Checks whether the value of the left operand is greater than the value of the right operand; if yes, then the condition becomes true.
     *
     * Example: (a > b) is not true.
     *
     * ## <
     * Checks whether the value of the left operand is less than the value of the right operand; if yes, then the condition becomes true.
     *
     * Example: (a < b) is true.
     *
     * ## >=
     * Checks whether the value of the left operand is greater than or equal to the value of the right operand; if yes, then the condition becomes true.
     *
     * Example: (a >= b) is not true.
     *
     * ## <=
     * Checks whether the value of the left operand is less than or equal to the value of the right operand; if yes, then the condition becomes true.
     *
     * Example: (a <= b) is true.
     *
     * ## AND, OR, IN, BETWEEN, LIKE, NOT, IS NULL
     * Logical operators.
     *
     * *Supported Partition Key Types*: The following are the supported partition keys.
     * + `string`
     * + `date`
     * + `timestamp`
     * + `int`
     * + `bigint`
     * + `long`
     * + `tinyint`
     * + `smallint`
     * + `decimal`
     *
     * If an type is encountered that is not valid, an exception is thrown.
     *
     * The following list shows the valid operators on each type. When you define a crawler, the `partitionKey` type is created as a `STRING`, to be compatible with the catalog partitions.
     *
     * *Sample API Call*:
     */
    public val expression: kotlin.String? = builder.expression
    /**
     * The maximum number of partitions to return in a single response.
     */
    public val maxResults: kotlin.Int? = builder.maxResults
    /**
     * A continuation token, if this is not the first call to retrieve these partitions.
     */
    public val nextToken: kotlin.String? = builder.nextToken
    /**
     * The time as of when to read the partition contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with `TransactionId`.
     */
    public val queryAsOfTime: aws.smithy.kotlin.runtime.time.Instant? = builder.queryAsOfTime
    /**
     * The segment of the table's partitions to scan in this request.
     */
    public val segment: aws.sdk.kotlin.services.glue.model.Segment? = builder.segment
    /**
     * The name of the partitions' table.
     */
    public val tableName: kotlin.String? = builder.tableName
    /**
     * The transaction ID at which to read the partition contents.
     */
    public val transactionId: kotlin.String? = builder.transactionId

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

    override fun toString(): kotlin.String = buildString {
        append("GetPartitionsRequest(")
        append("catalogId=$catalogId,")
        append("databaseName=$databaseName,")
        append("excludeColumnSchema=$excludeColumnSchema,")
        append("expression=$expression,")
        append("maxResults=$maxResults,")
        append("nextToken=$nextToken,")
        append("queryAsOfTime=$queryAsOfTime,")
        append("segment=$segment,")
        append("tableName=$tableName,")
        append("transactionId=$transactionId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = catalogId?.hashCode() ?: 0
        result = 31 * result + (databaseName?.hashCode() ?: 0)
        result = 31 * result + (excludeColumnSchema?.hashCode() ?: 0)
        result = 31 * result + (expression?.hashCode() ?: 0)
        result = 31 * result + (maxResults ?: 0)
        result = 31 * result + (nextToken?.hashCode() ?: 0)
        result = 31 * result + (queryAsOfTime?.hashCode() ?: 0)
        result = 31 * result + (segment?.hashCode() ?: 0)
        result = 31 * result + (tableName?.hashCode() ?: 0)
        result = 31 * result + (transactionId?.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 GetPartitionsRequest

        if (catalogId != other.catalogId) return false
        if (databaseName != other.databaseName) return false
        if (excludeColumnSchema != other.excludeColumnSchema) return false
        if (expression != other.expression) return false
        if (maxResults != other.maxResults) return false
        if (nextToken != other.nextToken) return false
        if (queryAsOfTime != other.queryAsOfTime) return false
        if (segment != other.segment) return false
        if (tableName != other.tableName) return false
        if (transactionId != other.transactionId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the Data Catalog where the partitions in question reside. If none is provided, the Amazon Web Services account ID is used by default.
         */
        public var catalogId: kotlin.String? = null
        /**
         * The name of the catalog database where the partitions reside.
         */
        public var databaseName: kotlin.String? = null
        /**
         * When true, specifies not returning the partition column schema. Useful when you are interested only in other partition attributes such as partition values or location. This approach avoids the problem of a large response by not returning duplicate data.
         */
        public var excludeColumnSchema: kotlin.Boolean? = null
        /**
         * An expression that filters the partitions to be returned.
         *
         * The expression uses SQL syntax similar to the SQL `WHERE` filter clause. The SQL statement parser [JSQLParser](http://jsqlparser.sourceforge.net/home.php) parses the expression.
         *
         * *Operators*: The following are the operators that you can use in the `Expression` API call:
         *
         * ## =
         * Checks whether the values of the two operands are equal; if yes, then the condition becomes true.
         *
         * Example: Assume 'variable a' holds 10 and 'variable b' holds 20.
         *
         * (a = b) is not true.
         *
         * ## < >
         * Checks whether the values of two operands are equal; if the values are not equal, then the condition becomes true.
         *
         * Example: (a < > b) is true.
         *
         * ## >
         * Checks whether the value of the left operand is greater than the value of the right operand; if yes, then the condition becomes true.
         *
         * Example: (a > b) is not true.
         *
         * ## <
         * Checks whether the value of the left operand is less than the value of the right operand; if yes, then the condition becomes true.
         *
         * Example: (a < b) is true.
         *
         * ## >=
         * Checks whether the value of the left operand is greater than or equal to the value of the right operand; if yes, then the condition becomes true.
         *
         * Example: (a >= b) is not true.
         *
         * ## <=
         * Checks whether the value of the left operand is less than or equal to the value of the right operand; if yes, then the condition becomes true.
         *
         * Example: (a <= b) is true.
         *
         * ## AND, OR, IN, BETWEEN, LIKE, NOT, IS NULL
         * Logical operators.
         *
         * *Supported Partition Key Types*: The following are the supported partition keys.
         * + `string`
         * + `date`
         * + `timestamp`
         * + `int`
         * + `bigint`
         * + `long`
         * + `tinyint`
         * + `smallint`
         * + `decimal`
         *
         * If an type is encountered that is not valid, an exception is thrown.
         *
         * The following list shows the valid operators on each type. When you define a crawler, the `partitionKey` type is created as a `STRING`, to be compatible with the catalog partitions.
         *
         * *Sample API Call*:
         */
        public var expression: kotlin.String? = null
        /**
         * The maximum number of partitions to return in a single response.
         */
        public var maxResults: kotlin.Int? = null
        /**
         * A continuation token, if this is not the first call to retrieve these partitions.
         */
        public var nextToken: kotlin.String? = null
        /**
         * The time as of when to read the partition contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with `TransactionId`.
         */
        public var queryAsOfTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The segment of the table's partitions to scan in this request.
         */
        public var segment: aws.sdk.kotlin.services.glue.model.Segment? = null
        /**
         * The name of the partitions' table.
         */
        public var tableName: kotlin.String? = null
        /**
         * The transaction ID at which to read the partition contents.
         */
        public var transactionId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.GetPartitionsRequest) : this() {
            this.catalogId = x.catalogId
            this.databaseName = x.databaseName
            this.excludeColumnSchema = x.excludeColumnSchema
            this.expression = x.expression
            this.maxResults = x.maxResults
            this.nextToken = x.nextToken
            this.queryAsOfTime = x.queryAsOfTime
            this.segment = x.segment
            this.tableName = x.tableName
            this.transactionId = x.transactionId
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy