
commonMain.aws.sdk.kotlin.services.cloudfront.model.ResponseHeadersPolicyRemoveHeadersConfig.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudfront.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A list of HTTP header names that CloudFront removes from HTTP responses to requests that match the cache behavior that this response headers policy is attached to.
*/
public class ResponseHeadersPolicyRemoveHeadersConfig private constructor(builder: Builder) {
/**
* The list of HTTP header names.
*/
public val items: List? = builder.items
/**
* The number of HTTP header names in the list.
*/
public val quantity: kotlin.Int = requireNotNull(builder.quantity) { "A non-null value must be provided for quantity" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudfront.model.ResponseHeadersPolicyRemoveHeadersConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ResponseHeadersPolicyRemoveHeadersConfig(")
append("items=$items,")
append("quantity=$quantity")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = items?.hashCode() ?: 0
result = 31 * result + (quantity)
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 ResponseHeadersPolicyRemoveHeadersConfig
if (items != other.items) return false
if (quantity != other.quantity) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudfront.model.ResponseHeadersPolicyRemoveHeadersConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The list of HTTP header names.
*/
public var items: List? = null
/**
* The number of HTTP header names in the list.
*/
public var quantity: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudfront.model.ResponseHeadersPolicyRemoveHeadersConfig) : this() {
this.items = x.items
this.quantity = x.quantity
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudfront.model.ResponseHeadersPolicyRemoveHeadersConfig = ResponseHeadersPolicyRemoveHeadersConfig(this)
internal fun correctErrors(): Builder {
if (quantity == null) quantity = 0
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy