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

commonMain.aws.sdk.kotlin.services.dataexchange.model.ImportAssetFromApiGatewayApiRequestDetails.kt Maven / Gradle / Ivy

There is a newer version: 1.3.32
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.dataexchange.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The request details.
 */
public class ImportAssetFromApiGatewayApiRequestDetails private constructor(builder: Builder) {
    /**
     * The API description. Markdown supported.
     */
    public val apiDescription: kotlin.String? = builder.apiDescription
    /**
     * The API Gateway API ID.
     */
    public val apiId: kotlin.String = requireNotNull(builder.apiId) { "A non-null value must be provided for apiId" }
    /**
     * The API Gateway API key.
     */
    public val apiKey: kotlin.String? = builder.apiKey
    /**
     * The API name.
     */
    public val apiName: kotlin.String = requireNotNull(builder.apiName) { "A non-null value must be provided for apiName" }
    /**
     * The Base64-encoded MD5 hash of the OpenAPI 3.0 JSON API specification file. It is used to ensure the integrity of the file.
     */
    public val apiSpecificationMd5Hash: kotlin.String = requireNotNull(builder.apiSpecificationMd5Hash) { "A non-null value must be provided for apiSpecificationMd5Hash" }
    /**
     * The data set ID.
     */
    public val dataSetId: kotlin.String = requireNotNull(builder.dataSetId) { "A non-null value must be provided for dataSetId" }
    /**
     * The protocol type.
     */
    public val protocolType: aws.sdk.kotlin.services.dataexchange.model.ProtocolType = requireNotNull(builder.protocolType) { "A non-null value must be provided for protocolType" }
    /**
     * The revision ID.
     */
    public val revisionId: kotlin.String = requireNotNull(builder.revisionId) { "A non-null value must be provided for revisionId" }
    /**
     * The API stage.
     */
    public val stage: kotlin.String = requireNotNull(builder.stage) { "A non-null value must be provided for stage" }

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

    override fun toString(): kotlin.String = buildString {
        append("ImportAssetFromApiGatewayApiRequestDetails(")
        append("apiDescription=$apiDescription,")
        append("apiId=$apiId,")
        append("apiKey=$apiKey,")
        append("apiName=$apiName,")
        append("apiSpecificationMd5Hash=$apiSpecificationMd5Hash,")
        append("dataSetId=$dataSetId,")
        append("protocolType=$protocolType,")
        append("revisionId=$revisionId,")
        append("stage=$stage")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = apiDescription?.hashCode() ?: 0
        result = 31 * result + (apiId.hashCode())
        result = 31 * result + (apiKey?.hashCode() ?: 0)
        result = 31 * result + (apiName.hashCode())
        result = 31 * result + (apiSpecificationMd5Hash.hashCode())
        result = 31 * result + (dataSetId.hashCode())
        result = 31 * result + (protocolType.hashCode())
        result = 31 * result + (revisionId.hashCode())
        result = 31 * result + (stage.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 ImportAssetFromApiGatewayApiRequestDetails

        if (apiDescription != other.apiDescription) return false
        if (apiId != other.apiId) return false
        if (apiKey != other.apiKey) return false
        if (apiName != other.apiName) return false
        if (apiSpecificationMd5Hash != other.apiSpecificationMd5Hash) return false
        if (dataSetId != other.dataSetId) return false
        if (protocolType != other.protocolType) return false
        if (revisionId != other.revisionId) return false
        if (stage != other.stage) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The API description. Markdown supported.
         */
        public var apiDescription: kotlin.String? = null
        /**
         * The API Gateway API ID.
         */
        public var apiId: kotlin.String? = null
        /**
         * The API Gateway API key.
         */
        public var apiKey: kotlin.String? = null
        /**
         * The API name.
         */
        public var apiName: kotlin.String? = null
        /**
         * The Base64-encoded MD5 hash of the OpenAPI 3.0 JSON API specification file. It is used to ensure the integrity of the file.
         */
        public var apiSpecificationMd5Hash: kotlin.String? = null
        /**
         * The data set ID.
         */
        public var dataSetId: kotlin.String? = null
        /**
         * The protocol type.
         */
        public var protocolType: aws.sdk.kotlin.services.dataexchange.model.ProtocolType? = null
        /**
         * The revision ID.
         */
        public var revisionId: kotlin.String? = null
        /**
         * The API stage.
         */
        public var stage: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.ImportAssetFromApiGatewayApiRequestDetails) : this() {
            this.apiDescription = x.apiDescription
            this.apiId = x.apiId
            this.apiKey = x.apiKey
            this.apiName = x.apiName
            this.apiSpecificationMd5Hash = x.apiSpecificationMd5Hash
            this.dataSetId = x.dataSetId
            this.protocolType = x.protocolType
            this.revisionId = x.revisionId
            this.stage = x.stage
        }

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

        internal fun correctErrors(): Builder {
            if (apiId == null) apiId = ""
            if (apiName == null) apiName = ""
            if (apiSpecificationMd5Hash == null) apiSpecificationMd5Hash = ""
            if (dataSetId == null) dataSetId = ""
            if (protocolType == null) protocolType = ProtocolType.SdkUnknown("no value provided")
            if (revisionId == null) revisionId = ""
            if (stage == null) stage = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy