commonMain.aws.sdk.kotlin.services.dataexchange.model.CreateS3DataAccessFromS3BucketRequestDetails.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
/**
* Details of the operation to create an Amazon S3 data access from an S3 bucket.
*/
public class CreateS3DataAccessFromS3BucketRequestDetails private constructor(builder: Builder) {
/**
* Details about the S3 data access source asset.
*/
public val assetSource: aws.sdk.kotlin.services.dataexchange.model.S3DataAccessAssetSourceEntry? = builder.assetSource
/**
* The unique identifier for the data set associated with the creation of this Amazon S3 data access.
*/
public val dataSetId: kotlin.String = requireNotNull(builder.dataSetId) { "A non-null value must be provided for dataSetId" }
/**
* The unique identifier for a revision.
*/
public val revisionId: kotlin.String = requireNotNull(builder.revisionId) { "A non-null value must be provided for revisionId" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dataexchange.model.CreateS3DataAccessFromS3BucketRequestDetails = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateS3DataAccessFromS3BucketRequestDetails(")
append("assetSource=$assetSource,")
append("dataSetId=$dataSetId,")
append("revisionId=$revisionId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = assetSource?.hashCode() ?: 0
result = 31 * result + (dataSetId.hashCode())
result = 31 * result + (revisionId.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 CreateS3DataAccessFromS3BucketRequestDetails
if (assetSource != other.assetSource) return false
if (dataSetId != other.dataSetId) return false
if (revisionId != other.revisionId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dataexchange.model.CreateS3DataAccessFromS3BucketRequestDetails = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Details about the S3 data access source asset.
*/
public var assetSource: aws.sdk.kotlin.services.dataexchange.model.S3DataAccessAssetSourceEntry? = null
/**
* The unique identifier for the data set associated with the creation of this Amazon S3 data access.
*/
public var dataSetId: kotlin.String? = null
/**
* The unique identifier for a revision.
*/
public var revisionId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.CreateS3DataAccessFromS3BucketRequestDetails) : this() {
this.assetSource = x.assetSource
this.dataSetId = x.dataSetId
this.revisionId = x.revisionId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dataexchange.model.CreateS3DataAccessFromS3BucketRequestDetails = CreateS3DataAccessFromS3BucketRequestDetails(this)
/**
* construct an [aws.sdk.kotlin.services.dataexchange.model.S3DataAccessAssetSourceEntry] inside the given [block]
*/
public fun assetSource(block: aws.sdk.kotlin.services.dataexchange.model.S3DataAccessAssetSourceEntry.Builder.() -> kotlin.Unit) {
this.assetSource = aws.sdk.kotlin.services.dataexchange.model.S3DataAccessAssetSourceEntry.invoke(block)
}
internal fun correctErrors(): Builder {
if (dataSetId == null) dataSetId = ""
if (revisionId == null) revisionId = ""
return this
}
}
}