commonMain.aws.sdk.kotlin.services.dataexchange.model.AssetSourceEntry.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
/**
* The source of the assets.
*/
public class AssetSourceEntry private constructor(builder: Builder) {
/**
* The Amazon S3 bucket that's part of the source of the asset.
*/
public val bucket: kotlin.String = requireNotNull(builder.bucket) { "A non-null value must be provided for bucket" }
/**
* The name of the object in Amazon S3 for the asset.
*/
public val key: kotlin.String = requireNotNull(builder.key) { "A non-null value must be provided for key" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.dataexchange.model.AssetSourceEntry = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AssetSourceEntry(")
append("bucket=$bucket,")
append("key=$key")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = bucket.hashCode()
result = 31 * result + (key.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 AssetSourceEntry
if (bucket != other.bucket) return false
if (key != other.key) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.dataexchange.model.AssetSourceEntry = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon S3 bucket that's part of the source of the asset.
*/
public var bucket: kotlin.String? = null
/**
* The name of the object in Amazon S3 for the asset.
*/
public var key: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.dataexchange.model.AssetSourceEntry) : this() {
this.bucket = x.bucket
this.key = x.key
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.dataexchange.model.AssetSourceEntry = AssetSourceEntry(this)
internal fun correctErrors(): Builder {
if (bucket == null) bucket = ""
if (key == null) key = ""
return this
}
}
}