
commonMain.aws.sdk.kotlin.services.appmesh.model.FileAccessLog.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appmesh.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* An object that represents an access log file.
*/
public class FileAccessLog private constructor(builder: Builder) {
/**
* The specified format for the logs. The format is either `json_format` or `text_format`.
*/
public val format: aws.sdk.kotlin.services.appmesh.model.LoggingFormat? = builder.format
/**
* The file path to write access logs to. You can use `/dev/stdout` to send access logs to standard out and configure your Envoy container to use a log driver, such as `awslogs`, to export the access logs to a log storage service such as Amazon CloudWatch Logs. You can also specify a path in the Envoy container's file system to write the files to disk.
*
* The Envoy process must have write permissions to the path that you specify here. Otherwise, Envoy fails to bootstrap properly.
*/
public val path: kotlin.String = requireNotNull(builder.path) { "A non-null value must be provided for path" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appmesh.model.FileAccessLog = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FileAccessLog(")
append("format=$format,")
append("path=$path")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = format?.hashCode() ?: 0
result = 31 * result + (path.hashCode())
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 FileAccessLog
if (format != other.format) return false
if (path != other.path) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appmesh.model.FileAccessLog = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The specified format for the logs. The format is either `json_format` or `text_format`.
*/
public var format: aws.sdk.kotlin.services.appmesh.model.LoggingFormat? = null
/**
* The file path to write access logs to. You can use `/dev/stdout` to send access logs to standard out and configure your Envoy container to use a log driver, such as `awslogs`, to export the access logs to a log storage service such as Amazon CloudWatch Logs. You can also specify a path in the Envoy container's file system to write the files to disk.
*
* The Envoy process must have write permissions to the path that you specify here. Otherwise, Envoy fails to bootstrap properly.
*/
public var path: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appmesh.model.FileAccessLog) : this() {
this.format = x.format
this.path = x.path
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appmesh.model.FileAccessLog = FileAccessLog(this)
internal fun correctErrors(): Builder {
if (path == null) path = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy