
commonMain.aws.sdk.kotlin.services.comprehend.model.ChildBlock.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.comprehend.model
/**
* Nested block contained within a block.
*/
public class ChildBlock private constructor(builder: Builder) {
/**
* Offset of the start of the child block within its parent block.
*/
public val beginOffset: kotlin.Int? = builder.beginOffset
/**
* Unique identifier for the child block.
*/
public val childBlockId: kotlin.String? = builder.childBlockId
/**
* Offset of the end of the child 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.ChildBlock = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ChildBlock(")
append("beginOffset=$beginOffset,")
append("childBlockId=$childBlockId,")
append("endOffset=$endOffset")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = beginOffset ?: 0
result = 31 * result + (childBlockId?.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 ChildBlock
if (beginOffset != other.beginOffset) return false
if (childBlockId != other.childBlockId) return false
if (endOffset != other.endOffset) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.comprehend.model.ChildBlock = Builder(this).apply(block).build()
public class Builder {
/**
* Offset of the start of the child block within its parent block.
*/
public var beginOffset: kotlin.Int? = null
/**
* Unique identifier for the child block.
*/
public var childBlockId: kotlin.String? = null
/**
* Offset of the end of the child block within its parent block.
*/
public var endOffset: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.comprehend.model.ChildBlock) : this() {
this.beginOffset = x.beginOffset
this.childBlockId = x.childBlockId
this.endOffset = x.endOffset
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.ChildBlock = ChildBlock(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy