
commonMain.aws.sdk.kotlin.services.qbusiness.model.AttachmentOutput.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.qbusiness.model
/**
* The details of a file uploaded during chat.
*/
public class AttachmentOutput private constructor(builder: Builder) {
/**
* An error associated with a file uploaded during chat.
*/
public val error: aws.sdk.kotlin.services.qbusiness.model.ErrorDetail? = builder.error
/**
* The name of a file uploaded during chat.
*/
public val name: kotlin.String? = builder.name
/**
* The status of a file uploaded during chat.
*/
public val status: aws.sdk.kotlin.services.qbusiness.model.AttachmentStatus? = builder.status
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qbusiness.model.AttachmentOutput = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AttachmentOutput(")
append("error=$error,")
append("name=$name,")
append("status=$status")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = error?.hashCode() ?: 0
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (status?.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 AttachmentOutput
if (error != other.error) return false
if (name != other.name) return false
if (status != other.status) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qbusiness.model.AttachmentOutput = Builder(this).apply(block).build()
public class Builder {
/**
* An error associated with a file uploaded during chat.
*/
public var error: aws.sdk.kotlin.services.qbusiness.model.ErrorDetail? = null
/**
* The name of a file uploaded during chat.
*/
public var name: kotlin.String? = null
/**
* The status of a file uploaded during chat.
*/
public var status: aws.sdk.kotlin.services.qbusiness.model.AttachmentStatus? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qbusiness.model.AttachmentOutput) : this() {
this.error = x.error
this.name = x.name
this.status = x.status
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qbusiness.model.AttachmentOutput = AttachmentOutput(this)
/**
* construct an [aws.sdk.kotlin.services.qbusiness.model.ErrorDetail] inside the given [block]
*/
public fun error(block: aws.sdk.kotlin.services.qbusiness.model.ErrorDetail.Builder.() -> kotlin.Unit) {
this.error = aws.sdk.kotlin.services.qbusiness.model.ErrorDetail.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy