/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.comprehend.model; import java.io.Serializable; /** *
* A reference to a block. *
*/ public class BlockReference implements Serializable { /** ** Unique identifier for the block. *
*
* Constraints:
* Length: 1 -
*/
private String blockId;
/**
*
* Offset of the start of the block within its parent block. *
*/ private Integer beginOffset; /** ** Offset of the end of the block within its parent block. *
*/ private Integer endOffset; /** ** List of child blocks within this block. *
*/ private java.util.List* Unique identifier for the block. *
*
* Constraints:
* Length: 1 -
*
* @return
* Unique identifier for the block. *
*/ public String getBlockId() { return blockId; } /** ** Unique identifier for the block. *
*
* Constraints:
* Length: 1 -
*
* @param blockId
* Unique identifier for the block. *
*/ public void setBlockId(String blockId) { this.blockId = blockId; } /** ** Unique identifier for the block. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 -
*
* @param blockId
* Unique identifier for the block. *
* @return A reference to this updated object so that method calls can be * chained together. */ public BlockReference withBlockId(String blockId) { this.blockId = blockId; return this; } /** ** Offset of the start of the block within its parent block. *
* * @return* Offset of the start of the block within its parent block. *
*/ public Integer getBeginOffset() { return beginOffset; } /** ** Offset of the start of the block within its parent block. *
* * @param beginOffset* Offset of the start of the block within its parent block. *
*/ public void setBeginOffset(Integer beginOffset) { this.beginOffset = beginOffset; } /** ** Offset of the start of the block within its parent block. *
** Returns a reference to this object so that method calls can be chained * together. * * @param beginOffset
* Offset of the start of the block within its parent block. *
* @return A reference to this updated object so that method calls can be * chained together. */ public BlockReference withBeginOffset(Integer beginOffset) { this.beginOffset = beginOffset; return this; } /** ** Offset of the end of the block within its parent block. *
* * @return* Offset of the end of the block within its parent block. *
*/ public Integer getEndOffset() { return endOffset; } /** ** Offset of the end of the block within its parent block. *
* * @param endOffset* Offset of the end of the block within its parent block. *
*/ public void setEndOffset(Integer endOffset) { this.endOffset = endOffset; } /** ** Offset of the end of the block within its parent block. *
** Returns a reference to this object so that method calls can be chained * together. * * @param endOffset
* Offset of the end of the block within its parent block. *
* @return A reference to this updated object so that method calls can be * chained together. */ public BlockReference withEndOffset(Integer endOffset) { this.endOffset = endOffset; return this; } /** ** List of child blocks within this block. *
* * @return* List of child blocks within this block. *
*/ public java.util.List* List of child blocks within this block. *
* * @param childBlocks* List of child blocks within this block. *
*/ public void setChildBlocks(java.util.Collection* List of child blocks within this block. *
** Returns a reference to this object so that method calls can be chained * together. * * @param childBlocks
* List of child blocks within this block. *
* @return A reference to this updated object so that method calls can be * chained together. */ public BlockReference withChildBlocks(ChildBlock... childBlocks) { if (getChildBlocks() == null) { this.childBlocks = new java.util.ArrayList* List of child blocks within this block. *
** Returns a reference to this object so that method calls can be chained * together. * * @param childBlocks
* List of child blocks within this block. *
* @return A reference to this updated object so that method calls can be * chained together. */ public BlockReference withChildBlocks(java.util.Collection