# Cloud AutoML V1 API - Class Google::Cloud::AutoML::V1::Document::Layout (v1.8.0)

1.8.0 (latest) 1.7.0 1.6.0 1.5.1 1.4.0 1.3.1 1.2.1 1.1.0 1.0.1 0.10.0 0.9.2 0.8.0 0.7.0 0.6.0 0.5.1 0.4.8 Reference documentation and code samples for the Cloud AutoML V1 API class Google::Cloud::AutoML::V1::Document::Layout.

Describes the layout information of a [text_segment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Document-Layout#Google__Cloud__AutoML__V1__Document__Layout_text_segment_instance_ "Google::Cloud::AutoML::V1::Document::Layout#text_segment (method)") in the document.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #bounding_poly

    def bounding_poly() -> ::Google::Cloud::AutoML::V1::BoundingPoly

**Returns**

- ([::Google::Cloud::AutoML::V1::BoundingPoly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-BoundingPoly)) --- The position of the [text_segment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Document-Layout#Google__Cloud__AutoML__V1__Document__Layout_text_segment_instance_ "Google::Cloud::AutoML::V1::Document::Layout#text_segment (method)") in the page. Contains exactly 4 \[normalized_vertices\]\[google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices\] and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The \[NormalizedVertex-s\]\[google.cloud.automl.v1p1beta.NormalizedVertex\] are relative to the page. Coordinates are based on top-left as point (0,0).

### #bounding_poly=

    def bounding_poly=(value) -> ::Google::Cloud::AutoML::V1::BoundingPoly

**Parameter**

- **value** ([::Google::Cloud::AutoML::V1::BoundingPoly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-BoundingPoly)) --- The position of the [text_segment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Document-Layout#Google__Cloud__AutoML__V1__Document__Layout_text_segment_instance_ "Google::Cloud::AutoML::V1::Document::Layout#text_segment (method)") in the page. Contains exactly 4 \[normalized_vertices\]\[google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices\] and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The \[NormalizedVertex-s\]\[google.cloud.automl.v1p1beta.NormalizedVertex\] are relative to the page. Coordinates are based on top-left as point (0,0).
**Returns**

- ([::Google::Cloud::AutoML::V1::BoundingPoly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-BoundingPoly)) --- The position of the [text_segment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Document-Layout#Google__Cloud__AutoML__V1__Document__Layout_text_segment_instance_ "Google::Cloud::AutoML::V1::Document::Layout#text_segment (method)") in the page. Contains exactly 4 \[normalized_vertices\]\[google.cloud.automl.v1p1beta.BoundingPoly.normalized_vertices\] and they are connected by edges in the order provided, which will represent a rectangle parallel to the frame. The \[NormalizedVertex-s\]\[google.cloud.automl.v1p1beta.NormalizedVertex\] are relative to the page. Coordinates are based on top-left as point (0,0).

### #page_number

    def page_number() -> ::Integer

**Returns**

- (::Integer) --- Page number of the [text_segment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Document-Layout#Google__Cloud__AutoML__V1__Document__Layout_text_segment_instance_ "Google::Cloud::AutoML::V1::Document::Layout#text_segment (method)") in the original document, starts from 1.

### #page_number=

    def page_number=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Page number of the [text_segment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Document-Layout#Google__Cloud__AutoML__V1__Document__Layout_text_segment_instance_ "Google::Cloud::AutoML::V1::Document::Layout#text_segment (method)") in the original document, starts from 1.
**Returns**

- (::Integer) --- Page number of the [text_segment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Document-Layout#Google__Cloud__AutoML__V1__Document__Layout_text_segment_instance_ "Google::Cloud::AutoML::V1::Document::Layout#text_segment (method)") in the original document, starts from 1.

### #text_segment

    def text_segment() -> ::Google::Cloud::AutoML::V1::TextSegment

**Returns**

- ([::Google::Cloud::AutoML::V1::TextSegment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextSegment)) --- Text Segment that represents a segment in \[document_text\]\[google.cloud.automl.v1p1beta.Document.document_text\].

### #text_segment=

    def text_segment=(value) -> ::Google::Cloud::AutoML::V1::TextSegment

**Parameter**

- **value** ([::Google::Cloud::AutoML::V1::TextSegment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextSegment)) --- Text Segment that represents a segment in \[document_text\]\[google.cloud.automl.v1p1beta.Document.document_text\].
**Returns**

- ([::Google::Cloud::AutoML::V1::TextSegment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextSegment)) --- Text Segment that represents a segment in \[document_text\]\[google.cloud.automl.v1p1beta.Document.document_text\].

### #text_segment_type

    def text_segment_type() -> ::Google::Cloud::AutoML::V1::Document::Layout::TextSegmentType

**Returns**

- ([::Google::Cloud::AutoML::V1::Document::Layout::TextSegmentType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType)) --- The type of the [text_segment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Document-Layout#Google__Cloud__AutoML__V1__Document__Layout_text_segment_instance_ "Google::Cloud::AutoML::V1::Document::Layout#text_segment (method)") in document.

### #text_segment_type=

    def text_segment_type=(value) -> ::Google::Cloud::AutoML::V1::Document::Layout::TextSegmentType

**Parameter**

- **value** ([::Google::Cloud::AutoML::V1::Document::Layout::TextSegmentType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType)) --- The type of the [text_segment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Document-Layout#Google__Cloud__AutoML__V1__Document__Layout_text_segment_instance_ "Google::Cloud::AutoML::V1::Document::Layout#text_segment (method)") in document.
**Returns**

- ([::Google::Cloud::AutoML::V1::Document::Layout::TextSegmentType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Document-Layout-TextSegmentType)) --- The type of the [text_segment](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-Document-Layout#Google__Cloud__AutoML__V1__Document__Layout_text_segment_instance_ "Google::Cloud::AutoML::V1::Document::Layout#text_segment (method)") in document.