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

commonMain.aws.sdk.kotlin.services.amplifybackend.model.BackendApiResourceConfig.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.amplifybackend.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The resource config for the data model, configured as a part of the Amplify project.
 */
public class BackendApiResourceConfig private constructor(builder: Builder) {
    /**
     * Additional authentication methods used to interact with your data models.
     */
    public val additionalAuthTypes: List? = builder.additionalAuthTypes
    /**
     * The API name used to interact with the data model, configured as a part of your Amplify project.
     */
    public val apiName: kotlin.String? = builder.apiName
    /**
     * The conflict resolution strategy for your data stored in the data models.
     */
    public val conflictResolution: aws.sdk.kotlin.services.amplifybackend.model.BackendApiConflictResolution? = builder.conflictResolution
    /**
     * The default authentication type for interacting with the configured data models in your Amplify project.
     */
    public val defaultAuthType: aws.sdk.kotlin.services.amplifybackend.model.BackendApiAuthType? = builder.defaultAuthType
    /**
     * The service used to provision and interact with the data model.
     */
    public val service: kotlin.String? = builder.service
    /**
     * The definition of the data model in the annotated transform of the GraphQL schema.
     */
    public val transformSchema: kotlin.String? = builder.transformSchema

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

    override fun toString(): kotlin.String = buildString {
        append("BackendApiResourceConfig(")
        append("additionalAuthTypes=$additionalAuthTypes,")
        append("apiName=$apiName,")
        append("conflictResolution=$conflictResolution,")
        append("defaultAuthType=$defaultAuthType,")
        append("service=$service,")
        append("transformSchema=$transformSchema")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = additionalAuthTypes?.hashCode() ?: 0
        result = 31 * result + (apiName?.hashCode() ?: 0)
        result = 31 * result + (conflictResolution?.hashCode() ?: 0)
        result = 31 * result + (defaultAuthType?.hashCode() ?: 0)
        result = 31 * result + (service?.hashCode() ?: 0)
        result = 31 * result + (transformSchema?.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 BackendApiResourceConfig

        if (additionalAuthTypes != other.additionalAuthTypes) return false
        if (apiName != other.apiName) return false
        if (conflictResolution != other.conflictResolution) return false
        if (defaultAuthType != other.defaultAuthType) return false
        if (service != other.service) return false
        if (transformSchema != other.transformSchema) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Additional authentication methods used to interact with your data models.
         */
        public var additionalAuthTypes: List? = null
        /**
         * The API name used to interact with the data model, configured as a part of your Amplify project.
         */
        public var apiName: kotlin.String? = null
        /**
         * The conflict resolution strategy for your data stored in the data models.
         */
        public var conflictResolution: aws.sdk.kotlin.services.amplifybackend.model.BackendApiConflictResolution? = null
        /**
         * The default authentication type for interacting with the configured data models in your Amplify project.
         */
        public var defaultAuthType: aws.sdk.kotlin.services.amplifybackend.model.BackendApiAuthType? = null
        /**
         * The service used to provision and interact with the data model.
         */
        public var service: kotlin.String? = null
        /**
         * The definition of the data model in the annotated transform of the GraphQL schema.
         */
        public var transformSchema: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.amplifybackend.model.BackendApiResourceConfig) : this() {
            this.additionalAuthTypes = x.additionalAuthTypes
            this.apiName = x.apiName
            this.conflictResolution = x.conflictResolution
            this.defaultAuthType = x.defaultAuthType
            this.service = x.service
            this.transformSchema = x.transformSchema
        }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy