commonMain.aws.sdk.kotlin.services.codebuild.model.LogsConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codebuild-jvm Show documentation
Show all versions of codebuild-jvm Show documentation
The AWS SDK for Kotlin client for CodeBuild
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codebuild.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Information about logs for a build project. These can be logs in CloudWatch Logs, built in a specified S3 bucket, or both.
*/
public class LogsConfig private constructor(builder: Builder) {
/**
* Information about CloudWatch Logs for a build project. CloudWatch Logs are enabled by default.
*/
public val cloudWatchLogs: aws.sdk.kotlin.services.codebuild.model.CloudWatchLogsConfig? = builder.cloudWatchLogs
/**
* Information about logs built to an S3 bucket for a build project. S3 logs are not enabled by default.
*/
public val s3Logs: aws.sdk.kotlin.services.codebuild.model.S3LogsConfig? = builder.s3Logs
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codebuild.model.LogsConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LogsConfig(")
append("cloudWatchLogs=$cloudWatchLogs,")
append("s3Logs=$s3Logs")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = cloudWatchLogs?.hashCode() ?: 0
result = 31 * result + (s3Logs?.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 LogsConfig
if (cloudWatchLogs != other.cloudWatchLogs) return false
if (s3Logs != other.s3Logs) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codebuild.model.LogsConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Information about CloudWatch Logs for a build project. CloudWatch Logs are enabled by default.
*/
public var cloudWatchLogs: aws.sdk.kotlin.services.codebuild.model.CloudWatchLogsConfig? = null
/**
* Information about logs built to an S3 bucket for a build project. S3 logs are not enabled by default.
*/
public var s3Logs: aws.sdk.kotlin.services.codebuild.model.S3LogsConfig? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codebuild.model.LogsConfig) : this() {
this.cloudWatchLogs = x.cloudWatchLogs
this.s3Logs = x.s3Logs
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codebuild.model.LogsConfig = LogsConfig(this)
/**
* construct an [aws.sdk.kotlin.services.codebuild.model.CloudWatchLogsConfig] inside the given [block]
*/
public fun cloudWatchLogs(block: aws.sdk.kotlin.services.codebuild.model.CloudWatchLogsConfig.Builder.() -> kotlin.Unit) {
this.cloudWatchLogs = aws.sdk.kotlin.services.codebuild.model.CloudWatchLogsConfig.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.codebuild.model.S3LogsConfig] inside the given [block]
*/
public fun s3Logs(block: aws.sdk.kotlin.services.codebuild.model.S3LogsConfig.Builder.() -> kotlin.Unit) {
this.s3Logs = aws.sdk.kotlin.services.codebuild.model.S3LogsConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}