
commonMain.aws.sdk.kotlin.services.kafkaconnect.model.S3Location.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kafkaconnect.model
/**
* The location of an object in Amazon S3.
*/
public class S3Location private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of an S3 bucket.
*/
public val bucketArn: kotlin.String = requireNotNull(builder.bucketArn) { "A non-null value must be provided for bucketArn" }
/**
* The file key for an object in an S3 bucket.
*/
public val fileKey: kotlin.String = requireNotNull(builder.fileKey) { "A non-null value must be provided for fileKey" }
/**
* The version of an object in an S3 bucket.
*/
public val objectVersion: kotlin.String? = builder.objectVersion
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kafkaconnect.model.S3Location = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("S3Location(")
append("bucketArn=$bucketArn,")
append("fileKey=$fileKey,")
append("objectVersion=$objectVersion")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = bucketArn.hashCode()
result = 31 * result + (fileKey.hashCode())
result = 31 * result + (objectVersion?.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 S3Location
if (bucketArn != other.bucketArn) return false
if (fileKey != other.fileKey) return false
if (objectVersion != other.objectVersion) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kafkaconnect.model.S3Location = Builder(this).apply(block).build()
public class Builder {
/**
* The Amazon Resource Name (ARN) of an S3 bucket.
*/
public var bucketArn: kotlin.String? = null
/**
* The file key for an object in an S3 bucket.
*/
public var fileKey: kotlin.String? = null
/**
* The version of an object in an S3 bucket.
*/
public var objectVersion: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kafkaconnect.model.S3Location) : this() {
this.bucketArn = x.bucketArn
this.fileKey = x.fileKey
this.objectVersion = x.objectVersion
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kafkaconnect.model.S3Location = S3Location(this)
internal fun correctErrors(): Builder {
if (bucketArn == null) bucketArn = ""
if (fileKey == null) fileKey = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy