commonMain.aws.sdk.kotlin.services.comprehend.model.BlockReference.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of comprehend-jvm Show documentation
Show all versions of comprehend-jvm Show documentation
The AWS SDK for Kotlin client for Comprehend
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.comprehend.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A reference to a block.
*/
public class BlockReference private constructor(builder: Builder) {
/**
* Offset of the start of the block within its parent block.
*/
public val beginOffset: kotlin.Int? = builder.beginOffset
/**
* Unique identifier for the block.
*/
public val blockId: kotlin.String? = builder.blockId
/**
* List of child blocks within this block.
*/
public val childBlocks: List? = builder.childBlocks
/**
* Offset of the end of the block within its parent block.
*/
public val endOffset: kotlin.Int? = builder.endOffset
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.comprehend.model.BlockReference = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("BlockReference(")
append("beginOffset=$beginOffset,")
append("blockId=$blockId,")
append("childBlocks=$childBlocks,")
append("endOffset=$endOffset")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = beginOffset ?: 0
result = 31 * result + (blockId?.hashCode() ?: 0)
result = 31 * result + (childBlocks?.hashCode() ?: 0)
result = 31 * result + (endOffset ?: 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 BlockReference
if (beginOffset != other.beginOffset) return false
if (blockId != other.blockId) return false
if (childBlocks != other.childBlocks) return false
if (endOffset != other.endOffset) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.comprehend.model.BlockReference = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Offset of the start of the block within its parent block.
*/
public var beginOffset: kotlin.Int? = null
/**
* Unique identifier for the block.
*/
public var blockId: kotlin.String? = null
/**
* List of child blocks within this block.
*/
public var childBlocks: List? = null
/**
* Offset of the end of the block within its parent block.
*/
public var endOffset: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.comprehend.model.BlockReference) : this() {
this.beginOffset = x.beginOffset
this.blockId = x.blockId
this.childBlocks = x.childBlocks
this.endOffset = x.endOffset
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.BlockReference = BlockReference(this)
internal fun correctErrors(): Builder {
return this
}
}
}