commonMain.aws.sdk.kotlin.services.cloudwatchlogs.model.PutDeliveryDestinationPolicyRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudwatchlogs-jvm Show documentation
Show all versions of cloudwatchlogs-jvm Show documentation
The AWS SDK for Kotlin client for CloudWatch Logs
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatchlogs.model
import aws.smithy.kotlin.runtime.SdkDsl
public class PutDeliveryDestinationPolicyRequest private constructor(builder: Builder) {
/**
* The name of the delivery destination to assign this policy to.
*/
public val deliveryDestinationName: kotlin.String? = builder.deliveryDestinationName
/**
* The contents of the 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.PutDeliveryDestinationPolicyRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutDeliveryDestinationPolicyRequest(")
append("deliveryDestinationName=$deliveryDestinationName,")
append("deliveryDestinationPolicy=$deliveryDestinationPolicy")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = deliveryDestinationName?.hashCode() ?: 0
result = 31 * 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 PutDeliveryDestinationPolicyRequest
if (deliveryDestinationName != other.deliveryDestinationName) return false
if (deliveryDestinationPolicy != other.deliveryDestinationPolicy) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchlogs.model.PutDeliveryDestinationPolicyRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the delivery destination to assign this policy to.
*/
public var deliveryDestinationName: kotlin.String? = null
/**
* The contents of the policy.
*/
public var deliveryDestinationPolicy: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchlogs.model.PutDeliveryDestinationPolicyRequest) : this() {
this.deliveryDestinationName = x.deliveryDestinationName
this.deliveryDestinationPolicy = x.deliveryDestinationPolicy
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchlogs.model.PutDeliveryDestinationPolicyRequest = PutDeliveryDestinationPolicyRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}