commonMain.aws.sdk.kotlin.services.lookoutequipment.model.S3Object.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lookoutequipment.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains information about an S3 bucket.
*/
public class S3Object private constructor(builder: Builder) {
/**
* The name of the specific S3 bucket.
*/
public val bucket: kotlin.String = requireNotNull(builder.bucket) { "A non-null value must be provided for bucket" }
/**
* The Amazon Web Services Key Management Service (KMS key) key being used to encrypt the S3 object. Without this key, data in the bucket is not accessible.
*/
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.lookoutequipment.model.S3Object = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("S3Object(")
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 S3Object
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.lookoutequipment.model.S3Object = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the specific S3 bucket.
*/
public var bucket: kotlin.String? = null
/**
* The Amazon Web Services Key Management Service (KMS key) key being used to encrypt the S3 object. Without this key, data in the bucket is not accessible.
*/
public var key: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lookoutequipment.model.S3Object) : this() {
this.bucket = x.bucket
this.key = x.key
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lookoutequipment.model.S3Object = S3Object(this)
internal fun correctErrors(): Builder {
if (bucket == null) bucket = ""
if (key == null) key = ""
return this
}
}
}