
commonMain.aws.sdk.kotlin.services.iot.model.EnableIotLoggingParams.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iot.model
/**
* Parameters used when defining a mitigation action that enable Amazon Web Services IoT Core logging.
*/
public class EnableIotLoggingParams private constructor(builder: Builder) {
/**
* Specifies the type of information to be logged.
*/
public val logLevel: aws.sdk.kotlin.services.iot.model.LogLevel = requireNotNull(builder.logLevel) { "A non-null value must be provided for logLevel" }
/**
* The Amazon Resource Name (ARN) of the IAM role used for logging.
*/
public val roleArnForLogging: kotlin.String = requireNotNull(builder.roleArnForLogging) { "A non-null value must be provided for roleArnForLogging" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot.model.EnableIotLoggingParams = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EnableIotLoggingParams(")
append("logLevel=$logLevel,")
append("roleArnForLogging=$roleArnForLogging")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = logLevel.hashCode()
result = 31 * result + (roleArnForLogging.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 EnableIotLoggingParams
if (logLevel != other.logLevel) return false
if (roleArnForLogging != other.roleArnForLogging) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot.model.EnableIotLoggingParams = Builder(this).apply(block).build()
public class Builder {
/**
* Specifies the type of information to be logged.
*/
public var logLevel: aws.sdk.kotlin.services.iot.model.LogLevel? = null
/**
* The Amazon Resource Name (ARN) of the IAM role used for logging.
*/
public var roleArnForLogging: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iot.model.EnableIotLoggingParams) : this() {
this.logLevel = x.logLevel
this.roleArnForLogging = x.roleArnForLogging
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iot.model.EnableIotLoggingParams = EnableIotLoggingParams(this)
internal fun correctErrors(): Builder {
if (logLevel == null) logLevel = LogLevel.SdkUnknown("no value provided")
if (roleArnForLogging == null) roleArnForLogging = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy