commonMain.aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedEntityInfo.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatchlogs.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Reserved for internal use.
*/
public class RejectedEntityInfo private constructor(builder: Builder) {
/**
* Reserved for internal use.
*/
public val errorType: aws.sdk.kotlin.services.cloudwatchlogs.model.EntityRejectionErrorType = requireNotNull(builder.errorType) { "A non-null value must be provided for errorType" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedEntityInfo = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RejectedEntityInfo(")
append("errorType=$errorType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = errorType.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 RejectedEntityInfo
if (errorType != other.errorType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedEntityInfo = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Reserved for internal use.
*/
public var errorType: aws.sdk.kotlin.services.cloudwatchlogs.model.EntityRejectionErrorType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedEntityInfo) : this() {
this.errorType = x.errorType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchlogs.model.RejectedEntityInfo = RejectedEntityInfo(this)
internal fun correctErrors(): Builder {
if (errorType == null) errorType = EntityRejectionErrorType.SdkUnknown("no value provided")
return this
}
}
}