
commonMain.aws.sdk.kotlin.services.s3.model.RequestPaymentConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.s3.model
/**
* Container for Payer.
*/
public class RequestPaymentConfiguration private constructor(builder: Builder) {
/**
* Specifies who pays for the download and request fees.
*/
public val payer: aws.sdk.kotlin.services.s3.model.Payer = requireNotNull(builder.payer) { "A non-null value must be provided for payer" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.s3.model.RequestPaymentConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RequestPaymentConfiguration(")
append("payer=$payer")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = payer.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 RequestPaymentConfiguration
if (payer != other.payer) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.s3.model.RequestPaymentConfiguration = Builder(this).apply(block).build()
public class Builder {
/**
* Specifies who pays for the download and request fees.
*/
public var payer: aws.sdk.kotlin.services.s3.model.Payer? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.s3.model.RequestPaymentConfiguration) : this() {
this.payer = x.payer
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.s3.model.RequestPaymentConfiguration = RequestPaymentConfiguration(this)
internal fun correctErrors(): Builder {
if (payer == null) payer = Payer.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy