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

commonMain.aws.sdk.kotlin.services.appsync.model.AssociateMergedGraphqlApiRequest.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.appsync.model

import aws.smithy.kotlin.runtime.SdkDsl

public class AssociateMergedGraphqlApiRequest private constructor(builder: Builder) {
    /**
     * The description field.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.
     */
    public val mergedApiIdentifier: kotlin.String? = builder.mergedApiIdentifier
    /**
     * The `SourceApiAssociationConfig` object data.
     */
    public val sourceApiAssociationConfig: aws.sdk.kotlin.services.appsync.model.SourceApiAssociationConfig? = builder.sourceApiAssociationConfig
    /**
     * The identifier of the AppSync Source API. This is generated by the AppSync service. In most cases, source APIs (especially in your account) only require the API ID value or ARN of the source API. However, source APIs from other accounts (cross-account use cases) strictly require the full resource ARN of the source API.
     */
    public val sourceApiIdentifier: kotlin.String? = builder.sourceApiIdentifier

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

    override fun toString(): kotlin.String = buildString {
        append("AssociateMergedGraphqlApiRequest(")
        append("description=$description,")
        append("mergedApiIdentifier=$mergedApiIdentifier,")
        append("sourceApiAssociationConfig=$sourceApiAssociationConfig,")
        append("sourceApiIdentifier=$sourceApiIdentifier")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (mergedApiIdentifier?.hashCode() ?: 0)
        result = 31 * result + (sourceApiAssociationConfig?.hashCode() ?: 0)
        result = 31 * result + (sourceApiIdentifier?.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 AssociateMergedGraphqlApiRequest

        if (description != other.description) return false
        if (mergedApiIdentifier != other.mergedApiIdentifier) return false
        if (sourceApiAssociationConfig != other.sourceApiAssociationConfig) return false
        if (sourceApiIdentifier != other.sourceApiIdentifier) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The description field.
         */
        public var description: kotlin.String? = null
        /**
         * The identifier of the AppSync Merged API. This is generated by the AppSync service. In most cases, Merged APIs (especially in your account) only require the API ID value or ARN of the merged API. However, Merged APIs in other accounts (cross-account use cases) strictly require the full resource ARN of the merged API.
         */
        public var mergedApiIdentifier: kotlin.String? = null
        /**
         * The `SourceApiAssociationConfig` object data.
         */
        public var sourceApiAssociationConfig: aws.sdk.kotlin.services.appsync.model.SourceApiAssociationConfig? = null
        /**
         * The identifier of the AppSync Source API. This is generated by the AppSync service. In most cases, source APIs (especially in your account) only require the API ID value or ARN of the source API. However, source APIs from other accounts (cross-account use cases) strictly require the full resource ARN of the source API.
         */
        public var sourceApiIdentifier: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.appsync.model.AssociateMergedGraphqlApiRequest) : this() {
            this.description = x.description
            this.mergedApiIdentifier = x.mergedApiIdentifier
            this.sourceApiAssociationConfig = x.sourceApiAssociationConfig
            this.sourceApiIdentifier = x.sourceApiIdentifier
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy