commonMain.aws.sdk.kotlin.services.cloudwatchlogs.model.Policy.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatchlogs.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A structure that contains information about one delivery destination policy.
*/
public class Policy private constructor(builder: Builder) {
/**
* The contents of the delivery destination policy.
*/
public val deliveryDestinationPolicy: kotlin.String? = builder.deliveryDestinationPolicy
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchlogs.model.Policy = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Policy(")
append("deliveryDestinationPolicy=$deliveryDestinationPolicy")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = deliveryDestinationPolicy?.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 Policy
if (deliveryDestinationPolicy != other.deliveryDestinationPolicy) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchlogs.model.Policy = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The contents of the delivery destination policy.
*/
public var deliveryDestinationPolicy: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchlogs.model.Policy) : this() {
this.deliveryDestinationPolicy = x.deliveryDestinationPolicy
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchlogs.model.Policy = Policy(this)
internal fun correctErrors(): Builder {
return this
}
}
}