# Document AI V1 API - Class Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef (v1.12.1)

1.12.1 (latest) 1.12.0 1.11.0 1.10.2 1.9.0 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.0 1.2.0 1.1.1 1.0.0 0.23.1 0.22.0 0.21.1 0.20.0 0.19.0 0.18.0 0.17.2 0.16.2 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.4 Reference documentation and code samples for the Document AI V1 API class Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef.

Represents a weak reference to a page element within a document.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #bounding_poly

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

**Returns**

- ([::Google::Cloud::DocumentAI::V1::BoundingPoly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-BoundingPoly)) --- Optional. Identifies the bounding polygon of a layout element on the page. If `layout_type` is set, the bounding polygon must be exactly the same to the layout element it's referring to.

### #bounding_poly=

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

**Parameter**

- **value** ([::Google::Cloud::DocumentAI::V1::BoundingPoly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-BoundingPoly)) --- Optional. Identifies the bounding polygon of a layout element on the page. If `layout_type` is set, the bounding polygon must be exactly the same to the layout element it's referring to.
**Returns**

- ([::Google::Cloud::DocumentAI::V1::BoundingPoly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-BoundingPoly)) --- Optional. Identifies the bounding polygon of a layout element on the page. If `layout_type` is set, the bounding polygon must be exactly the same to the layout element it's referring to.

### #confidence

    def confidence() -> ::Float

**Returns**

- (::Float) --- Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.

### #confidence=

    def confidence=(value) -> ::Float

**Parameter**

- **value** (::Float) --- Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.
**Returns**

- (::Float) --- Optional. Confidence of detected page element, if applicable. Range `[0, 1]`.

### #layout_id

    def layout_id() -> ::String

**Returns**

- (::String) --- Optional. Deprecated. Use [PageRef.bounding_poly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-Document-PageAnchor-PageRef#Google__Cloud__DocumentAI__V1__Document__PageAnchor__PageRef_bounding_poly_instance_ "Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef#bounding_poly (method)") instead.

### #layout_id=

    def layout_id=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. Deprecated. Use [PageRef.bounding_poly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-Document-PageAnchor-PageRef#Google__Cloud__DocumentAI__V1__Document__PageAnchor__PageRef_bounding_poly_instance_ "Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef#bounding_poly (method)") instead.
**Returns**

- (::String) --- Optional. Deprecated. Use [PageRef.bounding_poly](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-Document-PageAnchor-PageRef#Google__Cloud__DocumentAI__V1__Document__PageAnchor__PageRef_bounding_poly_instance_ "Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef#bounding_poly (method)") instead.

### #layout_type

    def layout_type() -> ::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef::LayoutType

**Returns**

- ([::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef::LayoutType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-Document-PageAnchor-PageRef-LayoutType)) --- Optional. The type of the layout element that is being referenced if any.

### #layout_type=

    def layout_type=(value) -> ::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef::LayoutType

**Parameter**

- **value** ([::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef::LayoutType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-Document-PageAnchor-PageRef-LayoutType)) --- Optional. The type of the layout element that is being referenced if any.
**Returns**

- ([::Google::Cloud::DocumentAI::V1::Document::PageAnchor::PageRef::LayoutType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-Document-PageAnchor-PageRef-LayoutType)) --- Optional. The type of the layout element that is being referenced if any.

### #page

    def page() -> ::Integer

**Returns**

- (::Integer) --- Required. Index into the [Document.pages](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-Document#Google__Cloud__DocumentAI__V1__Document_pages_instance_ "Google::Cloud::DocumentAI::V1::Document#pages (method)") element, for example using `[Document.pages][page_refs.page]` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json.

### #page=

    def page=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- Required. Index into the [Document.pages](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-Document#Google__Cloud__DocumentAI__V1__Document_pages_instance_ "Google::Cloud::DocumentAI::V1::Document#pages (method)") element, for example using `[Document.pages][page_refs.page]` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json.
**Returns**

- (::Integer) --- Required. Index into the [Document.pages](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-Document#Google__Cloud__DocumentAI__V1__Document_pages_instance_ "Google::Cloud::DocumentAI::V1::Document#pages (method)") element, for example using `[Document.pages][page_refs.page]` to locate the related page element. This field is skipped when its value is the default `0`. See https://developers.google.com/protocol-buffers/docs/proto3#json.