
commonMain.aws.sdk.kotlin.services.s3.model.AnalyticsConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.s3.model
/**
* Specifies the configuration and any analyses for the analytics filter of an Amazon S3 bucket.
*/
public class AnalyticsConfiguration private constructor(builder: Builder) {
/**
* The filter used to describe a set of objects for analyses. A filter must have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, all objects will be considered in any analysis.
*/
public val filter: aws.sdk.kotlin.services.s3.model.AnalyticsFilter? = builder.filter
/**
* The ID that identifies the analytics configuration.
*/
public val id: kotlin.String = requireNotNull(builder.id) { "A non-null value must be provided for id" }
/**
* Contains data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes.
*/
public val storageClassAnalysis: aws.sdk.kotlin.services.s3.model.StorageClassAnalysis? = builder.storageClassAnalysis
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3.model.AnalyticsConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AnalyticsConfiguration(")
append("filter=$filter,")
append("id=$id,")
append("storageClassAnalysis=$storageClassAnalysis")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = filter?.hashCode() ?: 0
result = 31 * result + (id.hashCode())
result = 31 * result + (storageClassAnalysis?.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 AnalyticsConfiguration
if (filter != other.filter) return false
if (id != other.id) return false
if (storageClassAnalysis != other.storageClassAnalysis) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3.model.AnalyticsConfiguration = Builder(this).apply(block).build()
public class Builder {
/**
* The filter used to describe a set of objects for analyses. A filter must have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, all objects will be considered in any analysis.
*/
public var filter: aws.sdk.kotlin.services.s3.model.AnalyticsFilter? = null
/**
* The ID that identifies the analytics configuration.
*/
public var id: kotlin.String? = null
/**
* Contains data related to access patterns to be collected and made available to analyze the tradeoffs between different storage classes.
*/
public var storageClassAnalysis: aws.sdk.kotlin.services.s3.model.StorageClassAnalysis? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.s3.model.AnalyticsConfiguration) : this() {
this.filter = x.filter
this.id = x.id
this.storageClassAnalysis = x.storageClassAnalysis
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.s3.model.AnalyticsConfiguration = AnalyticsConfiguration(this)
/**
* construct an [aws.sdk.kotlin.services.s3.model.StorageClassAnalysis] inside the given [block]
*/
public fun storageClassAnalysis(block: aws.sdk.kotlin.services.s3.model.StorageClassAnalysis.Builder.() -> kotlin.Unit) {
this.storageClassAnalysis = aws.sdk.kotlin.services.s3.model.StorageClassAnalysis.invoke(block)
}
internal fun correctErrors(): Builder {
if (id == null) id = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy