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

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

/**
 * Represents the equivalent of a Hive user-defined function (`UDF`) definition.
 */
public class UserDefinedFunction private constructor(builder: Builder) {
    /**
     * The ID of the Data Catalog in which the function resides.
     */
    public val catalogId: kotlin.String? = builder.catalogId
    /**
     * The Java class that contains the function code.
     */
    public val className: kotlin.String? = builder.className
    /**
     * The time at which the function was created.
     */
    public val createTime: aws.smithy.kotlin.runtime.time.Instant? = builder.createTime
    /**
     * The name of the catalog database that contains the function.
     */
    public val databaseName: kotlin.String? = builder.databaseName
    /**
     * The name of the function.
     */
    public val functionName: kotlin.String? = builder.functionName
    /**
     * The owner of the function.
     */
    public val ownerName: kotlin.String? = builder.ownerName
    /**
     * The owner type.
     */
    public val ownerType: aws.sdk.kotlin.services.glue.model.PrincipalType? = builder.ownerType
    /**
     * The resource URIs for the function.
     */
    public val resourceUris: List? = builder.resourceUris

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

    override fun toString(): kotlin.String = buildString {
        append("UserDefinedFunction(")
        append("catalogId=$catalogId,")
        append("className=$className,")
        append("createTime=$createTime,")
        append("databaseName=$databaseName,")
        append("functionName=$functionName,")
        append("ownerName=$ownerName,")
        append("ownerType=$ownerType,")
        append("resourceUris=$resourceUris")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = catalogId?.hashCode() ?: 0
        result = 31 * result + (className?.hashCode() ?: 0)
        result = 31 * result + (createTime?.hashCode() ?: 0)
        result = 31 * result + (databaseName?.hashCode() ?: 0)
        result = 31 * result + (functionName?.hashCode() ?: 0)
        result = 31 * result + (ownerName?.hashCode() ?: 0)
        result = 31 * result + (ownerType?.hashCode() ?: 0)
        result = 31 * result + (resourceUris?.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 UserDefinedFunction

        if (catalogId != other.catalogId) return false
        if (className != other.className) return false
        if (createTime != other.createTime) return false
        if (databaseName != other.databaseName) return false
        if (functionName != other.functionName) return false
        if (ownerName != other.ownerName) return false
        if (ownerType != other.ownerType) return false
        if (resourceUris != other.resourceUris) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the Data Catalog in which the function resides.
         */
        public var catalogId: kotlin.String? = null
        /**
         * The Java class that contains the function code.
         */
        public var className: kotlin.String? = null
        /**
         * The time at which the function was created.
         */
        public var createTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the catalog database that contains the function.
         */
        public var databaseName: kotlin.String? = null
        /**
         * The name of the function.
         */
        public var functionName: kotlin.String? = null
        /**
         * The owner of the function.
         */
        public var ownerName: kotlin.String? = null
        /**
         * The owner type.
         */
        public var ownerType: aws.sdk.kotlin.services.glue.model.PrincipalType? = null
        /**
         * The resource URIs for the function.
         */
        public var resourceUris: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.UserDefinedFunction) : this() {
            this.catalogId = x.catalogId
            this.className = x.className
            this.createTime = x.createTime
            this.databaseName = x.databaseName
            this.functionName = x.functionName
            this.ownerName = x.ownerName
            this.ownerType = x.ownerType
            this.resourceUris = x.resourceUris
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy