
commonMain.aws.sdk.kotlin.services.qbusiness.model.AttachmentInput.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.qbusiness.model
/**
* A file directly uploaded into a web experience chat.
*/
public class AttachmentInput private constructor(builder: Builder) {
/**
* The data contained within the uploaded file.
*/
public val data: kotlin.ByteArray = requireNotNull(builder.data) { "A non-null value must be provided for data" }
/**
* The name of the file.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qbusiness.model.AttachmentInput = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AttachmentInput(")
append("data=$data,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = data.contentHashCode()
result = 31 * result + (name.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 AttachmentInput
if (data != null) {
if (other.data == null) return false
if (!data.contentEquals(other.data)) return false
} else if (other.data != null) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qbusiness.model.AttachmentInput = Builder(this).apply(block).build()
public class Builder {
/**
* The data contained within the uploaded file.
*/
public var data: kotlin.ByteArray? = null
/**
* The name of the file.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.qbusiness.model.AttachmentInput) : this() {
this.data = x.data
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.qbusiness.model.AttachmentInput = AttachmentInput(this)
internal fun correctErrors(): Builder {
if (data == null) data = ByteArray(0)
if (name == null) name = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy