commonMain.aws.sdk.kotlin.services.dataexchange.model.ImportAssetFromApiGatewayApiResponseDetails.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataexchange-jvm Show documentation
Show all versions of dataexchange-jvm Show documentation
The AWS Kotlin client for DataExchange
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.dataexchange.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* The response details.
*/
public class ImportAssetFromApiGatewayApiResponseDetails private constructor(builder: Builder) {
/**
* The API description.
*/
public val apiDescription: kotlin.String? = builder.apiDescription
/**
* The API ID.
*/
public val apiId: kotlin.String = requireNotNull(builder.apiId) { "A non-null value must be provided for apiId" }
/**
* The 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 for the API asset, used to ensure the integrity of the API at that location.
*/
public val apiSpecificationMd5Hash: kotlin.String = requireNotNull(builder.apiSpecificationMd5Hash) { "A non-null value must be provided for apiSpecificationMd5Hash" }
/**
* The upload URL of the API specification.
*/
public val apiSpecificationUploadUrl: kotlin.String = requireNotNull(builder.apiSpecificationUploadUrl) { "A non-null value must be provided for apiSpecificationUploadUrl" }
/**
* The date and time that the upload URL expires, in ISO 8601 format.
*/
public val apiSpecificationUploadUrlExpiresAt: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.apiSpecificationUploadUrlExpiresAt) { "A non-null value must be provided for apiSpecificationUploadUrlExpiresAt" }
/**
* 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.ImportAssetFromApiGatewayApiResponseDetails = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ImportAssetFromApiGatewayApiResponseDetails(")
append("apiDescription=$apiDescription,")
append("apiId=$apiId,")
append("apiKey=$apiKey,")
append("apiName=$apiName,")
append("apiSpecificationMd5Hash=$apiSpecificationMd5Hash,")
append("apiSpecificationUploadUrl=$apiSpecificationUploadUrl,")
append("apiSpecificationUploadUrlExpiresAt=$apiSpecificationUploadUrlExpiresAt,")
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 + (apiSpecificationUploadUrl.hashCode())
result = 31 * result + (apiSpecificationUploadUrlExpiresAt.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 ImportAssetFromApiGatewayApiResponseDetails
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 (apiSpecificationUploadUrl != other.apiSpecificationUploadUrl) return false
if (apiSpecificationUploadUrlExpiresAt != other.apiSpecificationUploadUrlExpiresAt) 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.ImportAssetFromApiGatewayApiResponseDetails = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The API description.
*/
public var apiDescription: kotlin.String? = null
/**
* The API ID.
*/
public var apiId: kotlin.String? = null
/**
* The API key.
*/
public var apiKey: kotlin.String? = null
/**
* The API name.
*/
public var apiName: kotlin.String? = null
/**
* The Base64-encoded Md5 hash for the API asset, used to ensure the integrity of the API at that location.
*/
public var apiSpecificationMd5Hash: kotlin.String? = null
/**
* The upload URL of the API specification.
*/
public var apiSpecificationUploadUrl: kotlin.String? = null
/**
* The date and time that the upload URL expires, in ISO 8601 format.
*/
public var apiSpecificationUploadUrlExpiresAt: aws.smithy.kotlin.runtime.time.Instant? = 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.ImportAssetFromApiGatewayApiResponseDetails) : this() {
this.apiDescription = x.apiDescription
this.apiId = x.apiId
this.apiKey = x.apiKey
this.apiName = x.apiName
this.apiSpecificationMd5Hash = x.apiSpecificationMd5Hash
this.apiSpecificationUploadUrl = x.apiSpecificationUploadUrl
this.apiSpecificationUploadUrlExpiresAt = x.apiSpecificationUploadUrlExpiresAt
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.ImportAssetFromApiGatewayApiResponseDetails = ImportAssetFromApiGatewayApiResponseDetails(this)
internal fun correctErrors(): Builder {
if (apiId == null) apiId = ""
if (apiName == null) apiName = ""
if (apiSpecificationMd5Hash == null) apiSpecificationMd5Hash = ""
if (apiSpecificationUploadUrl == null) apiSpecificationUploadUrl = ""
if (apiSpecificationUploadUrlExpiresAt == null) apiSpecificationUploadUrlExpiresAt = Instant.fromEpochSeconds(0)
if (dataSetId == null) dataSetId = ""
if (protocolType == null) protocolType = ProtocolType.SdkUnknown("no value provided")
if (revisionId == null) revisionId = ""
if (stage == null) stage = ""
return this
}
}
}