commonMain.aws.sdk.kotlin.services.cloudwatchlogs.model.PutDeliveryDestinationRequest.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 PutDeliveryDestinationRequest private constructor(builder: Builder) {
/**
* A structure that contains the ARN of the Amazon Web Services resource that will receive the logs.
*/
public val deliveryDestinationConfiguration: aws.sdk.kotlin.services.cloudwatchlogs.model.DeliveryDestinationConfiguration? = builder.deliveryDestinationConfiguration
/**
* A name for this delivery destination. This name must be unique for all delivery destinations in your account.
*/
public val name: kotlin.String? = builder.name
/**
* The format for the logs that this delivery destination will receive.
*/
public val outputFormat: aws.sdk.kotlin.services.cloudwatchlogs.model.OutputFormat? = builder.outputFormat
/**
* An optional list of key-value pairs to associate with the resource.
*
* For more information about tagging, see [Tagging Amazon Web Services resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html)
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchlogs.model.PutDeliveryDestinationRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutDeliveryDestinationRequest(")
append("deliveryDestinationConfiguration=$deliveryDestinationConfiguration,")
append("name=$name,")
append("outputFormat=$outputFormat,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = deliveryDestinationConfiguration?.hashCode() ?: 0
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (outputFormat?.hashCode() ?: 0)
result = 31 * result + (tags?.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 PutDeliveryDestinationRequest
if (deliveryDestinationConfiguration != other.deliveryDestinationConfiguration) return false
if (name != other.name) return false
if (outputFormat != other.outputFormat) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchlogs.model.PutDeliveryDestinationRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A structure that contains the ARN of the Amazon Web Services resource that will receive the logs.
*/
public var deliveryDestinationConfiguration: aws.sdk.kotlin.services.cloudwatchlogs.model.DeliveryDestinationConfiguration? = null
/**
* A name for this delivery destination. This name must be unique for all delivery destinations in your account.
*/
public var name: kotlin.String? = null
/**
* The format for the logs that this delivery destination will receive.
*/
public var outputFormat: aws.sdk.kotlin.services.cloudwatchlogs.model.OutputFormat? = null
/**
* An optional list of key-value pairs to associate with the resource.
*
* For more information about tagging, see [Tagging Amazon Web Services resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html)
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchlogs.model.PutDeliveryDestinationRequest) : this() {
this.deliveryDestinationConfiguration = x.deliveryDestinationConfiguration
this.name = x.name
this.outputFormat = x.outputFormat
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchlogs.model.PutDeliveryDestinationRequest = PutDeliveryDestinationRequest(this)
/**
* construct an [aws.sdk.kotlin.services.cloudwatchlogs.model.DeliveryDestinationConfiguration] inside the given [block]
*/
public fun deliveryDestinationConfiguration(block: aws.sdk.kotlin.services.cloudwatchlogs.model.DeliveryDestinationConfiguration.Builder.() -> kotlin.Unit) {
this.deliveryDestinationConfiguration = aws.sdk.kotlin.services.cloudwatchlogs.model.DeliveryDestinationConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}