package com.knecon.fforesight.service.layoutparser.internal.api.data.taas;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

@Data
@Builder
@AllArgsConstructor
@Schema(description = "Object containing information about either a Paragraph/Headline/Header/Footer or a Table.")
public class StructureObject {

    @Schema(description = "The ID of this StructureObject.")
    Integer structureObjectNumber;
    @Schema(description = "This value indicates the start of the string offsets in this Object, with respect to the reading order.")
    int page;
    @Schema(description = "This stringOffset indicates the start of the string offsets in this Object, with respect to the reading order of the entire document. It is equal to the previous' StructureObject stringOffset + its length.")
    int stringOffset;
    @Schema(description = "The bounding box of this StructureObject. Is always exactly 4 values representing x, y, w, h, where x, y specify the lower left corner.", example = "[100, 100, 50, 50]")
    float[] boundingBox;
    @Schema(description = "Object containing information about a Paragraph/Headline/Header/Footer. Either this or table is null.")
    ParagraphData paragraph;
    @Schema(description = "Object containing information about a Table. Either this or paragraph is null.")
    TableData table;

}
