
commonMain.aws.sdk.kotlin.services.osis.model.LogPublishingOptions.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.osis.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Container for the values required to configure logging for the pipeline. If you don't specify these values, OpenSearch Ingestion will not publish logs from your application to CloudWatch Logs.
*/
public class LogPublishingOptions private constructor(builder: Builder) {
/**
* The destination for OpenSearch Ingestion logs sent to Amazon CloudWatch Logs. This parameter is required if `IsLoggingEnabled` is set to `true`.
*/
public val cloudWatchLogDestination: aws.sdk.kotlin.services.osis.model.CloudWatchLogDestination? = builder.cloudWatchLogDestination
/**
* Whether logs should be published.
*/
public val isLoggingEnabled: kotlin.Boolean? = builder.isLoggingEnabled
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.osis.model.LogPublishingOptions = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LogPublishingOptions(")
append("cloudWatchLogDestination=$cloudWatchLogDestination,")
append("isLoggingEnabled=$isLoggingEnabled")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = cloudWatchLogDestination?.hashCode() ?: 0
result = 31 * result + (isLoggingEnabled?.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 LogPublishingOptions
if (cloudWatchLogDestination != other.cloudWatchLogDestination) return false
if (isLoggingEnabled != other.isLoggingEnabled) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.osis.model.LogPublishingOptions = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The destination for OpenSearch Ingestion logs sent to Amazon CloudWatch Logs. This parameter is required if `IsLoggingEnabled` is set to `true`.
*/
public var cloudWatchLogDestination: aws.sdk.kotlin.services.osis.model.CloudWatchLogDestination? = null
/**
* Whether logs should be published.
*/
public var isLoggingEnabled: kotlin.Boolean? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.osis.model.LogPublishingOptions) : this() {
this.cloudWatchLogDestination = x.cloudWatchLogDestination
this.isLoggingEnabled = x.isLoggingEnabled
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.osis.model.LogPublishingOptions = LogPublishingOptions(this)
/**
* construct an [aws.sdk.kotlin.services.osis.model.CloudWatchLogDestination] inside the given [block]
*/
public fun cloudWatchLogDestination(block: aws.sdk.kotlin.services.osis.model.CloudWatchLogDestination.Builder.() -> kotlin.Unit) {
this.cloudWatchLogDestination = aws.sdk.kotlin.services.osis.model.CloudWatchLogDestination.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy