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

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

/**
 * Specifies a crawler program that examines a data source and uses classifiers to try to determine its schema. If successful, the crawler records metadata concerning the data source in the Glue Data Catalog.
 */
public class Crawler private constructor(builder: Builder) {
    /**
     * A list of UTF-8 strings that specify the custom classifiers that are associated with the crawler.
     */
    public val classifiers: List? = builder.classifiers
    /**
     * Crawler configuration information. This versioned JSON string allows users to specify aspects of a crawler's behavior. For more information, see [Setting crawler configuration options](https://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html).
     */
    public val configuration: kotlin.String? = builder.configuration
    /**
     * If the crawler is running, contains the total time elapsed since the last crawl began.
     */
    public val crawlElapsedTime: kotlin.Long = builder.crawlElapsedTime
    /**
     * The name of the `SecurityConfiguration` structure to be used by this crawler.
     */
    public val crawlerSecurityConfiguration: kotlin.String? = builder.crawlerSecurityConfiguration
    /**
     * The time that the crawler was created.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
    /**
     * The name of the database in which the crawler's output is stored.
     */
    public val databaseName: kotlin.String? = builder.databaseName
    /**
     * A description of the crawler.
     */
    public val description: kotlin.String? = builder.description
    /**
     * Specifies whether the crawler should use Lake Formation credentials for the crawler instead of the IAM role credentials.
     */
    public val lakeFormationConfiguration: aws.sdk.kotlin.services.glue.model.LakeFormationConfiguration? = builder.lakeFormationConfiguration
    /**
     * The status of the last crawl, and potentially error information if an error occurred.
     */
    public val lastCrawl: aws.sdk.kotlin.services.glue.model.LastCrawlInfo? = builder.lastCrawl
    /**
     * The time that the crawler was last updated.
     */
    public val lastUpdated: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdated
    /**
     * A configuration that specifies whether data lineage is enabled for the crawler.
     */
    public val lineageConfiguration: aws.sdk.kotlin.services.glue.model.LineageConfiguration? = builder.lineageConfiguration
    /**
     * The name of the crawler.
     */
    public val name: kotlin.String? = builder.name
    /**
     * A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.
     */
    public val recrawlPolicy: aws.sdk.kotlin.services.glue.model.RecrawlPolicy? = builder.recrawlPolicy
    /**
     * The Amazon Resource Name (ARN) of an IAM role that's used to access customer resources, such as Amazon Simple Storage Service (Amazon S3) data.
     */
    public val role: kotlin.String? = builder.role
    /**
     * For scheduled crawlers, the schedule when the crawler runs.
     */
    public val schedule: aws.sdk.kotlin.services.glue.model.Schedule? = builder.schedule
    /**
     * The policy that specifies update and delete behaviors for the crawler.
     */
    public val schemaChangePolicy: aws.sdk.kotlin.services.glue.model.SchemaChangePolicy? = builder.schemaChangePolicy
    /**
     * Indicates whether the crawler is running, or whether a run is pending.
     */
    public val state: aws.sdk.kotlin.services.glue.model.CrawlerState? = builder.state
    /**
     * The prefix added to the names of tables that are created.
     */
    public val tablePrefix: kotlin.String? = builder.tablePrefix
    /**
     * A collection of targets to crawl.
     */
    public val targets: aws.sdk.kotlin.services.glue.model.CrawlerTargets? = builder.targets
    /**
     * The version of the crawler.
     */
    public val version: kotlin.Long = builder.version

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

    override fun toString(): kotlin.String = buildString {
        append("Crawler(")
        append("classifiers=$classifiers,")
        append("configuration=$configuration,")
        append("crawlElapsedTime=$crawlElapsedTime,")
        append("crawlerSecurityConfiguration=$crawlerSecurityConfiguration,")
        append("creationTime=$creationTime,")
        append("databaseName=$databaseName,")
        append("description=$description,")
        append("lakeFormationConfiguration=$lakeFormationConfiguration,")
        append("lastCrawl=$lastCrawl,")
        append("lastUpdated=$lastUpdated,")
        append("lineageConfiguration=$lineageConfiguration,")
        append("name=$name,")
        append("recrawlPolicy=$recrawlPolicy,")
        append("role=$role,")
        append("schedule=$schedule,")
        append("schemaChangePolicy=$schemaChangePolicy,")
        append("state=$state,")
        append("tablePrefix=$tablePrefix,")
        append("targets=$targets,")
        append("version=$version")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = classifiers?.hashCode() ?: 0
        result = 31 * result + (configuration?.hashCode() ?: 0)
        result = 31 * result + (crawlElapsedTime.hashCode())
        result = 31 * result + (crawlerSecurityConfiguration?.hashCode() ?: 0)
        result = 31 * result + (creationTime?.hashCode() ?: 0)
        result = 31 * result + (databaseName?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (lakeFormationConfiguration?.hashCode() ?: 0)
        result = 31 * result + (lastCrawl?.hashCode() ?: 0)
        result = 31 * result + (lastUpdated?.hashCode() ?: 0)
        result = 31 * result + (lineageConfiguration?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (recrawlPolicy?.hashCode() ?: 0)
        result = 31 * result + (role?.hashCode() ?: 0)
        result = 31 * result + (schedule?.hashCode() ?: 0)
        result = 31 * result + (schemaChangePolicy?.hashCode() ?: 0)
        result = 31 * result + (state?.hashCode() ?: 0)
        result = 31 * result + (tablePrefix?.hashCode() ?: 0)
        result = 31 * result + (targets?.hashCode() ?: 0)
        result = 31 * result + (version.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 Crawler

        if (classifiers != other.classifiers) return false
        if (configuration != other.configuration) return false
        if (crawlElapsedTime != other.crawlElapsedTime) return false
        if (crawlerSecurityConfiguration != other.crawlerSecurityConfiguration) return false
        if (creationTime != other.creationTime) return false
        if (databaseName != other.databaseName) return false
        if (description != other.description) return false
        if (lakeFormationConfiguration != other.lakeFormationConfiguration) return false
        if (lastCrawl != other.lastCrawl) return false
        if (lastUpdated != other.lastUpdated) return false
        if (lineageConfiguration != other.lineageConfiguration) return false
        if (name != other.name) return false
        if (recrawlPolicy != other.recrawlPolicy) return false
        if (role != other.role) return false
        if (schedule != other.schedule) return false
        if (schemaChangePolicy != other.schemaChangePolicy) return false
        if (state != other.state) return false
        if (tablePrefix != other.tablePrefix) return false
        if (targets != other.targets) return false
        if (version != other.version) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A list of UTF-8 strings that specify the custom classifiers that are associated with the crawler.
         */
        public var classifiers: List? = null
        /**
         * Crawler configuration information. This versioned JSON string allows users to specify aspects of a crawler's behavior. For more information, see [Setting crawler configuration options](https://docs.aws.amazon.com/glue/latest/dg/crawler-configuration.html).
         */
        public var configuration: kotlin.String? = null
        /**
         * If the crawler is running, contains the total time elapsed since the last crawl began.
         */
        public var crawlElapsedTime: kotlin.Long = 0L
        /**
         * The name of the `SecurityConfiguration` structure to be used by this crawler.
         */
        public var crawlerSecurityConfiguration: kotlin.String? = null
        /**
         * The time that the crawler was created.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the database in which the crawler's output is stored.
         */
        public var databaseName: kotlin.String? = null
        /**
         * A description of the crawler.
         */
        public var description: kotlin.String? = null
        /**
         * Specifies whether the crawler should use Lake Formation credentials for the crawler instead of the IAM role credentials.
         */
        public var lakeFormationConfiguration: aws.sdk.kotlin.services.glue.model.LakeFormationConfiguration? = null
        /**
         * The status of the last crawl, and potentially error information if an error occurred.
         */
        public var lastCrawl: aws.sdk.kotlin.services.glue.model.LastCrawlInfo? = null
        /**
         * The time that the crawler was last updated.
         */
        public var lastUpdated: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * A configuration that specifies whether data lineage is enabled for the crawler.
         */
        public var lineageConfiguration: aws.sdk.kotlin.services.glue.model.LineageConfiguration? = null
        /**
         * The name of the crawler.
         */
        public var name: kotlin.String? = null
        /**
         * A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.
         */
        public var recrawlPolicy: aws.sdk.kotlin.services.glue.model.RecrawlPolicy? = null
        /**
         * The Amazon Resource Name (ARN) of an IAM role that's used to access customer resources, such as Amazon Simple Storage Service (Amazon S3) data.
         */
        public var role: kotlin.String? = null
        /**
         * For scheduled crawlers, the schedule when the crawler runs.
         */
        public var schedule: aws.sdk.kotlin.services.glue.model.Schedule? = null
        /**
         * The policy that specifies update and delete behaviors for the crawler.
         */
        public var schemaChangePolicy: aws.sdk.kotlin.services.glue.model.SchemaChangePolicy? = null
        /**
         * Indicates whether the crawler is running, or whether a run is pending.
         */
        public var state: aws.sdk.kotlin.services.glue.model.CrawlerState? = null
        /**
         * The prefix added to the names of tables that are created.
         */
        public var tablePrefix: kotlin.String? = null
        /**
         * A collection of targets to crawl.
         */
        public var targets: aws.sdk.kotlin.services.glue.model.CrawlerTargets? = null
        /**
         * The version of the crawler.
         */
        public var version: kotlin.Long = 0L

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.Crawler) : this() {
            this.classifiers = x.classifiers
            this.configuration = x.configuration
            this.crawlElapsedTime = x.crawlElapsedTime
            this.crawlerSecurityConfiguration = x.crawlerSecurityConfiguration
            this.creationTime = x.creationTime
            this.databaseName = x.databaseName
            this.description = x.description
            this.lakeFormationConfiguration = x.lakeFormationConfiguration
            this.lastCrawl = x.lastCrawl
            this.lastUpdated = x.lastUpdated
            this.lineageConfiguration = x.lineageConfiguration
            this.name = x.name
            this.recrawlPolicy = x.recrawlPolicy
            this.role = x.role
            this.schedule = x.schedule
            this.schemaChangePolicy = x.schemaChangePolicy
            this.state = x.state
            this.tablePrefix = x.tablePrefix
            this.targets = x.targets
            this.version = x.version
        }

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

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

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy