Layout

google.cloud.automl.v1beta1.Document. Layout

Represents a Layout.

Constructor

new Layout(propertiesopt)

Constructs a new Layout.

Parameters:
Name Type Attributes Description
properties google.cloud.automl.v1beta1.Document.ILayout <optional>

Properties to set

Implements:
  • ILayout

Members

(static) TextSegmentType :number

TextSegmentType enum.

Properties:
Name Type Description
TEXT_SEGMENT_TYPE_UNSPECIFIED number

TEXT_SEGMENT_TYPE_UNSPECIFIED value

TOKEN number

TOKEN value

PARAGRAPH number

PARAGRAPH value

FORM_FIELD number

FORM_FIELD value

FORM_FIELD_NAME number

FORM_FIELD_NAME value

FORM_FIELD_CONTENTS number

FORM_FIELD_CONTENTS value

TABLE number

TABLE value

TABLE_HEADER number

TABLE_HEADER value

TABLE_ROW number

TABLE_ROW value

TABLE_CELL number

TABLE_CELL value

boundingPoly :google.cloud.automl.v1beta1.IBoundingPoly|null|undefined

Layout boundingPoly.

pageNumber :number

Layout pageNumber.

textSegment :google.cloud.automl.v1beta1.ITextSegment|null|undefined

Layout textSegment.

textSegmentType :google.cloud.automl.v1beta1.Document.Layout.TextSegmentType

Layout textSegmentType.

Methods

(static) create(propertiesopt) → {google.cloud.automl.v1beta1.Document.Layout}

Creates a new Layout instance using the specified properties.

Parameters:
Name Type Attributes Description
properties google.cloud.automl.v1beta1.Document.ILayout <optional>

Properties to set

(static) decode(reader, lengthopt) → {google.cloud.automl.v1beta1.Document.Layout}

Decodes a Layout message from the specified reader or buffer.

Parameters:
Name Type Attributes Description
reader $protobuf.Reader | Uint8Array

Reader or buffer to decode from

length number <optional>

Message length if known beforehand

Throws:
  • If the payload is not a reader or valid buffer

    Type
    Error
  • If required fields are missing

    Type
    $protobuf.util.ProtocolError

(static) decodeDelimited(reader) → {google.cloud.automl.v1beta1.Document.Layout}

Decodes a Layout message from the specified reader or buffer, length delimited.

Parameters:
Name Type Description
reader $protobuf.Reader | Uint8Array

Reader or buffer to decode from

Throws:
  • If the payload is not a reader or valid buffer

    Type
    Error
  • If required fields are missing

    Type
    $protobuf.util.ProtocolError

(static) encode(message, writeropt) → {$protobuf.Writer}

Encodes the specified Layout message. Does not implicitly verify messages.

Parameters:
Name Type Attributes Description
message google.cloud.automl.v1beta1.Document.ILayout

Layout message or plain object to encode

writer $protobuf.Writer <optional>

Writer to encode to

(static) encodeDelimited(message, writeropt) → {$protobuf.Writer}

Encodes the specified Layout message, length delimited. Does not implicitly verify messages.

Parameters:
Name Type Attributes Description
message google.cloud.automl.v1beta1.Document.ILayout

Layout message or plain object to encode

writer $protobuf.Writer <optional>

Writer to encode to

(static) fromObject(object) → {google.cloud.automl.v1beta1.Document.Layout}

Creates a Layout message from a plain object. Also converts values to their respective internal types.

Parameters:
Name Type Description
object Object.<string, *>

Plain object

(static) toObject(message, optionsopt) → {Object.<string, *>}

Creates a plain object from a Layout message. Also converts values to other types if specified.

Parameters:
Name Type Attributes Description
message google.cloud.automl.v1beta1.Document.Layout

Layout

options $protobuf.IConversionOptions <optional>

Conversion options

(static) verify(message) → {string|null}

Verifies a Layout message.

Parameters:
Name Type Description
message Object.<string, *>

Plain object to verify

toJSON() → {Object.<string, *>}

Converts this Layout to JSON.