commonMain.aws.sdk.kotlin.services.cloudwatchlogs.model.CreateDeliveryRequest.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 CreateDeliveryRequest private constructor(builder: Builder) {
/**
* The ARN of the delivery destination to use for this delivery.
*/
public val deliveryDestinationArn: kotlin.String? = builder.deliveryDestinationArn
/**
* The name of the delivery source to use for this delivery.
*/
public val deliverySourceName: kotlin.String? = builder.deliverySourceName
/**
* The field delimiter to use between record fields when the final output format of a delivery is in `Plain`, `W3C`, or `Raw` format.
*/
public val fieldDelimiter: kotlin.String? = builder.fieldDelimiter
/**
* The list of record fields to be delivered to the destination, in order. If the delivery’s log source has mandatory fields, they must be included in this list.
*/
public val recordFields: List? = builder.recordFields
/**
* This structure contains parameters that are valid only when the delivery’s delivery destination is an S3 bucket.
*/
public val s3DeliveryConfiguration: aws.sdk.kotlin.services.cloudwatchlogs.model.S3DeliveryConfiguration? = builder.s3DeliveryConfiguration
/**
* 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.CreateDeliveryRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateDeliveryRequest(")
append("deliveryDestinationArn=$deliveryDestinationArn,")
append("deliverySourceName=$deliverySourceName,")
append("fieldDelimiter=$fieldDelimiter,")
append("recordFields=$recordFields,")
append("s3DeliveryConfiguration=$s3DeliveryConfiguration,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = deliveryDestinationArn?.hashCode() ?: 0
result = 31 * result + (deliverySourceName?.hashCode() ?: 0)
result = 31 * result + (fieldDelimiter?.hashCode() ?: 0)
result = 31 * result + (recordFields?.hashCode() ?: 0)
result = 31 * result + (s3DeliveryConfiguration?.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 CreateDeliveryRequest
if (deliveryDestinationArn != other.deliveryDestinationArn) return false
if (deliverySourceName != other.deliverySourceName) return false
if (fieldDelimiter != other.fieldDelimiter) return false
if (recordFields != other.recordFields) return false
if (s3DeliveryConfiguration != other.s3DeliveryConfiguration) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchlogs.model.CreateDeliveryRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ARN of the delivery destination to use for this delivery.
*/
public var deliveryDestinationArn: kotlin.String? = null
/**
* The name of the delivery source to use for this delivery.
*/
public var deliverySourceName: kotlin.String? = null
/**
* The field delimiter to use between record fields when the final output format of a delivery is in `Plain`, `W3C`, or `Raw` format.
*/
public var fieldDelimiter: kotlin.String? = null
/**
* The list of record fields to be delivered to the destination, in order. If the delivery’s log source has mandatory fields, they must be included in this list.
*/
public var recordFields: List? = null
/**
* This structure contains parameters that are valid only when the delivery’s delivery destination is an S3 bucket.
*/
public var s3DeliveryConfiguration: aws.sdk.kotlin.services.cloudwatchlogs.model.S3DeliveryConfiguration? = 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.CreateDeliveryRequest) : this() {
this.deliveryDestinationArn = x.deliveryDestinationArn
this.deliverySourceName = x.deliverySourceName
this.fieldDelimiter = x.fieldDelimiter
this.recordFields = x.recordFields
this.s3DeliveryConfiguration = x.s3DeliveryConfiguration
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchlogs.model.CreateDeliveryRequest = CreateDeliveryRequest(this)
/**
* construct an [aws.sdk.kotlin.services.cloudwatchlogs.model.S3DeliveryConfiguration] inside the given [block]
*/
public fun s3DeliveryConfiguration(block: aws.sdk.kotlin.services.cloudwatchlogs.model.S3DeliveryConfiguration.Builder.() -> kotlin.Unit) {
this.s3DeliveryConfiguration = aws.sdk.kotlin.services.cloudwatchlogs.model.S3DeliveryConfiguration.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}