
commonMain.aws.sdk.kotlin.services.s3.model.Bucket.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.s3.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* In terms of implementation, a Bucket is a resource.
*/
public class Bucket private constructor(builder: Builder) {
/**
* Date the bucket was created. This date can change when making changes to your bucket, such as editing its bucket policy.
*/
public val creationDate: aws.smithy.kotlin.runtime.time.Instant? = builder.creationDate
/**
* The name of the bucket.
*/
public val name: kotlin.String? = builder.name
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3.model.Bucket = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Bucket(")
append("creationDate=$creationDate,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = creationDate?.hashCode() ?: 0
result = 31 * result + (name?.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 Bucket
if (creationDate != other.creationDate) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3.model.Bucket = Builder(this).apply(block).build()
public class Builder {
/**
* Date the bucket was created. This date can change when making changes to your bucket, such as editing its bucket policy.
*/
public var creationDate: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The name of the bucket.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.s3.model.Bucket) : this() {
this.creationDate = x.creationDate
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.s3.model.Bucket = Bucket(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy