blob: d993f7ef85119e216b157a5852d47899304848e9 [file] [log] [blame]
// Copyright 2020 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package documentai provides access to the Cloud Document AI API.
//
// For product documentation, see: https://cloud.google.com/document-ai/docs/
//
// Creating a client
//
// Usage example:
//
// import "google.golang.org/api/documentai/v1beta2"
// ...
// ctx := context.Background()
// documentaiService, err := documentai.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for authentication.
//
// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// Other authentication options
//
// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
//
// documentaiService, err := documentai.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// documentaiService, err := documentai.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See https://godoc.org/google.golang.org/api/option/ for details on options.
package documentai // import "google.golang.org/api/documentai/v1beta2"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
const apiId = "documentai:v1beta2"
const apiName = "documentai"
const apiVersion = "v1beta2"
const basePath = "https://documentai.googleapis.com/"
const mtlsBasePath = "https://documentai.mtls.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// View and manage your data across Google Cloud Platform services
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
scopesOption := option.WithScopes(
"https://www.googleapis.com/auth/cloud-platform",
)
// NOTE: prepend, so we don't override user-specified scopes.
opts = append([]option.ClientOption{scopesOption}, opts...)
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Projects = NewProjectsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Projects *ProjectsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Documents = NewProjectsDocumentsService(s)
rs.Locations = NewProjectsLocationsService(s)
rs.Operations = NewProjectsOperationsService(s)
return rs
}
type ProjectsService struct {
s *Service
Documents *ProjectsDocumentsService
Locations *ProjectsLocationsService
Operations *ProjectsOperationsService
}
func NewProjectsDocumentsService(s *Service) *ProjectsDocumentsService {
rs := &ProjectsDocumentsService{s: s}
return rs
}
type ProjectsDocumentsService struct {
s *Service
}
func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
rs := &ProjectsLocationsService{s: s}
rs.Documents = NewProjectsLocationsDocumentsService(s)
rs.Operations = NewProjectsLocationsOperationsService(s)
return rs
}
type ProjectsLocationsService struct {
s *Service
Documents *ProjectsLocationsDocumentsService
Operations *ProjectsLocationsOperationsService
}
func NewProjectsLocationsDocumentsService(s *Service) *ProjectsLocationsDocumentsService {
rs := &ProjectsLocationsDocumentsService{s: s}
return rs
}
type ProjectsLocationsDocumentsService struct {
s *Service
}
func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
rs := &ProjectsLocationsOperationsService{s: s}
return rs
}
type ProjectsLocationsOperationsService struct {
s *Service
}
func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
rs := &ProjectsOperationsService{s: s}
return rs
}
type ProjectsOperationsService struct {
s *Service
}
// GoogleCloudDocumentaiUiv1beta3CreateLabelerPoolOperationMetadata: The
// long running operation metadata for CreateLabelerPool.
type GoogleCloudDocumentaiUiv1beta3CreateLabelerPoolOperationMetadata struct {
// CreateTime: The creation time of the operation.
CreateTime string `json:"createTime,omitempty"`
// State: Used only when Operation.done is false.
//
// Possible values:
// "STATE_UNSPECIFIED" - Unspecified state.
// "RUNNING" - Operation is still running.
// "CANCELLING" - Operation is being cancelled.
// "SUCCEEDED" - Operation succeeded.
// "FAILED" - Operation failed.
// "CANCELLED" - Operation is cancelled.
State string `json:"state,omitempty"`
// StateMessage: A message providing more details about the current
// state of processing. For example, the error message if the operation
// is failed.
StateMessage string `json:"stateMessage,omitempty"`
// UpdateTime: The last update time of the operation.
UpdateTime string `json:"updateTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiUiv1beta3CreateLabelerPoolOperationMetadata) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiUiv1beta3CreateLabelerPoolOperationMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiUiv1beta3CreateProcessorVersionMetadata: The
// metadata that represents a processor version being created.
type GoogleCloudDocumentaiUiv1beta3CreateProcessorVersionMetadata struct {
// CreateTime: The creation time of the operation.
CreateTime string `json:"createTime,omitempty"`
// State: The state of the current disable processor operation.
//
// Possible values:
// "STATE_UNSPECIFIED" - The training state is unspecified.
// "QUEUED" - The training request has been issued but processing has
// not yet begun.
// "PREPARING" - The service is preparing to execute the training.
// "RUNNING" - The training is in progress.
// "SUCCEEDED" - The training completed successfully.
// "FAILED" - The training failed. `error` should contain the details
// of the failure.
// "CANCELLING" - The training is being cancelled. `error` should
// describe the reason for the cancellation.
// "CANCELLED" - The training has been cancelled. `error` should
// describe the reason for the cancellation.
State string `json:"state,omitempty"`
// UpdateTime: The last update time of the operation.
UpdateTime string `json:"updateTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiUiv1beta3CreateProcessorVersionMetadata) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiUiv1beta3CreateProcessorVersionMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiUiv1beta3DeleteLabelerPoolOperationMetadata: The
// long running operation metadata for DeleteLabelerPool.
type GoogleCloudDocumentaiUiv1beta3DeleteLabelerPoolOperationMetadata struct {
// CreateTime: The creation time of the operation.
CreateTime string `json:"createTime,omitempty"`
// State: Used only when Operation.done is false.
//
// Possible values:
// "STATE_UNSPECIFIED" - Unspecified state.
// "RUNNING" - Operation is still running.
// "CANCELLING" - Operation is being cancelled.
// "SUCCEEDED" - Operation succeeded.
// "FAILED" - Operation failed.
// "CANCELLED" - Operation is cancelled.
State string `json:"state,omitempty"`
// StateMessage: A message providing more details about the current
// state of processing. For example, the error message if the operation
// is failed.
StateMessage string `json:"stateMessage,omitempty"`
// UpdateTime: The last update time of the operation.
UpdateTime string `json:"updateTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiUiv1beta3DeleteLabelerPoolOperationMetadata) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiUiv1beta3DeleteLabelerPoolOperationMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiUiv1beta3DeleteProcessorMetadata: The long
// running operation metadata for delete processor method.
type GoogleCloudDocumentaiUiv1beta3DeleteProcessorMetadata struct {
// CreateTime: The creation time of the operation.
CreateTime string `json:"createTime,omitempty"`
// State: The state of the current delete processor operation.
//
// Possible values:
// "STATE_UNSPECIFIED" - The default value. This value is used if the
// state is omitted.
// "WAITING" - Request operation is waiting for scheduling.
// "RUNNING" - Request is being processed.
// "SUCCEEDED" - The operation is completed successfully.
// "FAILED" - The operation has failed.
State string `json:"state,omitempty"`
// StateMessage: A message providing more details about the current
// state of processing. For example, the error message if the operation
// is failed.
StateMessage string `json:"stateMessage,omitempty"`
// UpdateTime: The last update time of the operation.
UpdateTime string `json:"updateTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiUiv1beta3DeleteProcessorMetadata) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiUiv1beta3DeleteProcessorMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiUiv1beta3DisableProcessorMetadata: The long
// running operation metadata for disable processor method.
type GoogleCloudDocumentaiUiv1beta3DisableProcessorMetadata struct {
// CreateTime: The creation time of the operation.
CreateTime string `json:"createTime,omitempty"`
// State: The state of the current disable processor operation.
//
// Possible values:
// "STATE_UNSPECIFIED" - The default value. This value is used if the
// state is omitted.
// "WAITING" - Request operation is waiting for scheduling.
// "RUNNING" - Request is being processed.
// "SUCCEEDED" - The operation is completed successfully.
// "CANCELLING" - The operation was being cancelled.
// "CANCELLED" - The operation was cancelled.
// "FAILED" - The operation has failed.
State string `json:"state,omitempty"`
// StateMessage: A message providing more details about the current
// state of processing. For example, the error message if the operation
// is failed.
StateMessage string `json:"stateMessage,omitempty"`
// UpdateTime: The last update time of the operation.
UpdateTime string `json:"updateTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiUiv1beta3DisableProcessorMetadata) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiUiv1beta3DisableProcessorMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiUiv1beta3DisableProcessorResponse: Response
// message for the disable processor method. Intentionally empty proto
// for adding fields in future.
type GoogleCloudDocumentaiUiv1beta3DisableProcessorResponse struct {
}
// GoogleCloudDocumentaiUiv1beta3EnableProcessorMetadata: The long
// running operation metadata for enable processor method.
type GoogleCloudDocumentaiUiv1beta3EnableProcessorMetadata struct {
// CreateTime: The creation time of the operation.
CreateTime string `json:"createTime,omitempty"`
// State: The state of the current enable processor operation.
//
// Possible values:
// "STATE_UNSPECIFIED" - The default value. This value is used if the
// state is omitted.
// "WAITING" - Request operation is waiting for scheduling.
// "RUNNING" - Request is being processed.
// "SUCCEEDED" - The operation is completed successfully.
// "CANCELLING" - The operation was being cancelled.
// "CANCELLED" - The operation was cancelled.
// "FAILED" - The operation has failed.
State string `json:"state,omitempty"`
// StateMessage: A message providing more details about the current
// state of processing. For example, the error message if the operation
// is failed.
StateMessage string `json:"stateMessage,omitempty"`
// UpdateTime: The last update time of the operation.
UpdateTime string `json:"updateTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiUiv1beta3EnableProcessorMetadata) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiUiv1beta3EnableProcessorMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiUiv1beta3EnableProcessorResponse: Response
// message for the enable processor method. Intentionally empty proto
// for adding fields in future.
type GoogleCloudDocumentaiUiv1beta3EnableProcessorResponse struct {
}
// GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata: The
// long running operation metadata for UpdateLabelerPool.
type GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata struct {
// CreateTime: The creation time of the operation.
CreateTime string `json:"createTime,omitempty"`
// State: Used only when Operation.done is false.
//
// Possible values:
// "STATE_UNSPECIFIED" - Unspecified state.
// "RUNNING" - Operation is still running.
// "CANCELLING" - Operation is being cancelled.
// "SUCCEEDED" - Operation succeeded.
// "FAILED" - Operation failed.
// "CANCELLED" - Operation is cancelled.
State string `json:"state,omitempty"`
// StateMessage: A message providing more details about the current
// state of processing. For example, the error message if the operation
// is failed.
StateMessage string `json:"stateMessage,omitempty"`
// UpdateTime: The last update time of the operation.
UpdateTime string `json:"updateTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse: Response
// to an batch document processing request. This is returned in the LRO
// Operation after the operation is complete.
type GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse struct {
// Responses: Responses for each individual document.
Responses []*GoogleCloudDocumentaiV1beta1ProcessDocumentResponse `json:"responses,omitempty"`
// ForceSendFields is a list of field names (e.g. "Responses") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Responses") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1BoundingPoly: A bounding polygon for the
// detected image annotation.
type GoogleCloudDocumentaiV1beta1BoundingPoly struct {
// NormalizedVertices: The bounding polygon normalized vertices.
NormalizedVertices []*GoogleCloudDocumentaiV1beta1NormalizedVertex `json:"normalizedVertices,omitempty"`
// Vertices: The bounding polygon vertices.
Vertices []*GoogleCloudDocumentaiV1beta1Vertex `json:"vertices,omitempty"`
// ForceSendFields is a list of field names (e.g. "NormalizedVertices")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NormalizedVertices") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1BoundingPoly) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1BoundingPoly
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1Document: Document represents the
// canonical document resource in Document Understanding AI. It is an
// interchange format that provides insights into documents and allows
// for collaboration between users and Document Understanding AI to
// iterate and optimize for quality.
type GoogleCloudDocumentaiV1beta1Document struct {
// Content: Inline document content, represented as a stream of bytes.
// Note: As with all `bytes` fields, protobuffers use a pure binary
// representation, whereas JSON representations use base64.
Content string `json:"content,omitempty"`
// Entities: A list of entities detected on Document.text. For document
// shards, entities in this list may cross shard boundaries.
Entities []*GoogleCloudDocumentaiV1beta1DocumentEntity `json:"entities,omitempty"`
// EntityRelations: Relationship among Document.entities.
EntityRelations []*GoogleCloudDocumentaiV1beta1DocumentEntityRelation `json:"entityRelations,omitempty"`
// Error: Any error that occurred while processing this document.
Error *GoogleRpcStatus `json:"error,omitempty"`
// MimeType: An IANA published MIME type (also referred to as media
// type). For more information, see
// https://www.iana.org/assignments/media-types/media-types.xhtml.
MimeType string `json:"mimeType,omitempty"`
// Pages: Visual page layout for the Document.
Pages []*GoogleCloudDocumentaiV1beta1DocumentPage `json:"pages,omitempty"`
// Revisions: Revision history of this document.
Revisions []*GoogleCloudDocumentaiV1beta1DocumentRevision `json:"revisions,omitempty"`
// ShardInfo: Information about the sharding if this document is sharded
// part of a larger document. If the document is not sharded, this
// message is not specified.
ShardInfo *GoogleCloudDocumentaiV1beta1DocumentShardInfo `json:"shardInfo,omitempty"`
// Text: UTF-8 encoded text in reading order from the document.
Text string `json:"text,omitempty"`
// TextChanges: A list of text corrections made to [Document.text]. This
// is usually used for annotating corrections to OCR mistakes. Text
// changes for a given revision may not overlap with each other.
TextChanges []*GoogleCloudDocumentaiV1beta1DocumentTextChange `json:"textChanges,omitempty"`
// TextStyles: Styles for the Document.text.
TextStyles []*GoogleCloudDocumentaiV1beta1DocumentStyle `json:"textStyles,omitempty"`
// Translations: A list of translations on Document.text. For document
// shards, translations in this list may cross shard boundaries.
Translations []*GoogleCloudDocumentaiV1beta1DocumentTranslation `json:"translations,omitempty"`
// Uri: Currently supports Google Cloud Storage URI of the form
// `gs://bucket_name/object_name`. Object versioning is not supported.
// See [Google Cloud Storage Request
// URIs](https://cloud.google.com/storage/docs/reference-uris) for more
// info.
Uri string `json:"uri,omitempty"`
// ForceSendFields is a list of field names (e.g. "Content") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Content") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1Document) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1Document
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentEntity: A phrase in the text that
// is a known entity type, such as a person, an organization, or
// location.
type GoogleCloudDocumentaiV1beta1DocumentEntity struct {
// Confidence: Optional. Confidence of detected Schema entity. Range [0,
// 1].
Confidence float64 `json:"confidence,omitempty"`
// Id: Optional. Canonical id. This will be a unique value in the entity
// list for this document.
Id string `json:"id,omitempty"`
// MentionId: Deprecated. Use `id` field instead.
MentionId string `json:"mentionId,omitempty"`
// MentionText: Text value in the document e.g. `1600 Amphitheatre
// Pkwy`.
MentionText string `json:"mentionText,omitempty"`
// NormalizedValue: Optional. Normalized entity value. Absent if the
// extracted value could not be converted or the type (e.g. address) is
// not supported for certain parsers. This field is also only populated
// for certain supported document types.
NormalizedValue *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue `json:"normalizedValue,omitempty"`
// PageAnchor: Optional. Represents the provenance of this entity wrt.
// the location on the page where it was found.
PageAnchor *GoogleCloudDocumentaiV1beta1DocumentPageAnchor `json:"pageAnchor,omitempty"`
// Properties: Optional. Entities can be nested to form a hierarchical
// data structure representing the content in the document.
Properties []*GoogleCloudDocumentaiV1beta1DocumentEntity `json:"properties,omitempty"`
// Provenance: Optional. The history of this annotation.
Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"`
// Redacted: Optional. Whether the entity will be redacted for
// de-identification purposes.
Redacted bool `json:"redacted,omitempty"`
// TextAnchor: Provenance of the entity. Text anchor indexing into the
// Document.text.
TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"`
// Type: Entity type from a schema e.g. `Address`.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Confidence") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Confidence") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentEntity) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntity
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GoogleCloudDocumentaiV1beta1DocumentEntity) UnmarshalJSON(data []byte) error {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntity
var s1 struct {
Confidence gensupport.JSONFloat64 `json:"confidence"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Confidence = float64(s1.Confidence)
return nil
}
// GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue: Parsed and
// normalized entity value.
type GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue struct {
// AddressValue: Postal address. See also: https:
// //github.com/googleapis/googleapis/blob/ //
// master/google/type/postal_address.proto
AddressValue *GoogleTypePostalAddress `json:"addressValue,omitempty"`
// DateValue: Date value. Includes year, month, day. See also: https:
// //github.com/googleapis/googleapis/blob/master/google/type/date.proto
DateValue *GoogleTypeDate `json:"dateValue,omitempty"`
// DatetimeValue: DateTime value. Includes date, time, and timezone. See
// also: https: //github.com/googleapis/googleapis/blob/ //
// master/google/type/datetime.proto
DatetimeValue *GoogleTypeDateTime `json:"datetimeValue,omitempty"`
// MoneyValue: Money value. See also: https:
// //github.com/googleapis/googleapis/blob/ //
// master/google/type/money.proto
MoneyValue *GoogleTypeMoney `json:"moneyValue,omitempty"`
// Text: Required. Normalized entity value stored as a string. This
// field is populated for supported document type (e.g. Invoice). For
// some entity types, one of respective 'structured_value' fields may
// also be populated. - Money/Currency type (`money_value`) is in the
// ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601
// text format. - Datetime type (`datetime_value`) is in the ISO 8601
// text format.
Text string `json:"text,omitempty"`
// ForceSendFields is a list of field names (e.g. "AddressValue") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AddressValue") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentEntityRelation: Relationship
// between Entities.
type GoogleCloudDocumentaiV1beta1DocumentEntityRelation struct {
// ObjectId: Object entity id.
ObjectId string `json:"objectId,omitempty"`
// Relation: Relationship description.
Relation string `json:"relation,omitempty"`
// SubjectId: Subject entity id.
SubjectId string `json:"subjectId,omitempty"`
// ForceSendFields is a list of field names (e.g. "ObjectId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ObjectId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentEntityRelation) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityRelation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPage: A page in a Document.
type GoogleCloudDocumentaiV1beta1DocumentPage struct {
// Blocks: A list of visually detected text blocks on the page. A block
// has a set of lines (collected into paragraphs) that have a common
// line-spacing and orientation.
Blocks []*GoogleCloudDocumentaiV1beta1DocumentPageBlock `json:"blocks,omitempty"`
// DetectedLanguages: A list of detected languages together with
// confidence.
DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"`
// Dimension: Physical dimension of the page.
Dimension *GoogleCloudDocumentaiV1beta1DocumentPageDimension `json:"dimension,omitempty"`
// FormFields: A list of visually detected form fields on the page.
FormFields []*GoogleCloudDocumentaiV1beta1DocumentPageFormField `json:"formFields,omitempty"`
// Image: Rendered image for this page. This image is preprocessed to
// remove any skew, rotation, and distortions such that the annotation
// bounding boxes can be upright and axis-aligned.
Image *GoogleCloudDocumentaiV1beta1DocumentPageImage `json:"image,omitempty"`
// Layout: Layout for the page.
Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"`
// Lines: A list of visually detected text lines on the page. A
// collection of tokens that a human would perceive as a line.
Lines []*GoogleCloudDocumentaiV1beta1DocumentPageLine `json:"lines,omitempty"`
// PageNumber: 1-based index for current Page in a parent Document.
// Useful when a page is taken out of a Document for individual
// processing.
PageNumber int64 `json:"pageNumber,omitempty"`
// Paragraphs: A list of visually detected text paragraphs on the page.
// A collection of lines that a human would perceive as a paragraph.
Paragraphs []*GoogleCloudDocumentaiV1beta1DocumentPageParagraph `json:"paragraphs,omitempty"`
// Tables: A list of visually detected tables on the page.
Tables []*GoogleCloudDocumentaiV1beta1DocumentPageTable `json:"tables,omitempty"`
// Tokens: A list of visually detected tokens on the page.
Tokens []*GoogleCloudDocumentaiV1beta1DocumentPageToken `json:"tokens,omitempty"`
// Transforms: Transformation matrices that were applied to the original
// document image to produce Page.image.
Transforms []*GoogleCloudDocumentaiV1beta1DocumentPageMatrix `json:"transforms,omitempty"`
// VisualElements: A list of detected non-text visual elements e.g.
// checkbox, signature etc. on the page.
VisualElements []*GoogleCloudDocumentaiV1beta1DocumentPageVisualElement `json:"visualElements,omitempty"`
// ForceSendFields is a list of field names (e.g. "Blocks") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Blocks") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPage) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPage
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPageAnchor: Referencing the
// visual context of the entity in the Document.pages. Page anchors can
// be cross-page, consist of multiple bounding polygons and optionally
// reference specific layout element types.
type GoogleCloudDocumentaiV1beta1DocumentPageAnchor struct {
// PageRefs: One or more references to visual page elements
PageRefs []*GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef `json:"pageRefs,omitempty"`
// ForceSendFields is a list of field names (e.g. "PageRefs") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "PageRefs") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageAnchor) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchor
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef: Represents a
// weak reference to a page element within a document.
type GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef struct {
// BoundingPoly: Optional. Identifies the bounding polygon of a layout
// element on the page.
BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"`
// LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead.
LayoutId string `json:"layoutId,omitempty"`
// LayoutType: Optional. The type of the layout element that is being
// referenced if any.
//
// Possible values:
// "LAYOUT_TYPE_UNSPECIFIED" - Layout Unspecified.
// "BLOCK" - References a Page.blocks element.
// "PARAGRAPH" - References a Page.paragraphs element.
// "LINE" - References a Page.lines element.
// "TOKEN" - References a Page.tokens element.
// "VISUAL_ELEMENT" - References a Page.visual_elements element.
// "TABLE" - Refrrences a Page.tables element.
// "FORM_FIELD" - References a Page.form_fields element.
LayoutType string `json:"layoutType,omitempty"`
// Page: Required. Index into the Document.pages element
Page int64 `json:"page,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BoundingPoly") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPageBlock: A block has a set of
// lines (collected into paragraphs) that have a common line-spacing and
// orientation.
type GoogleCloudDocumentaiV1beta1DocumentPageBlock struct {
// DetectedLanguages: A list of detected languages together with
// confidence.
DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"`
// Layout: Layout for Block.
Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"`
// Provenance: The history of this annotation.
Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"`
// ForceSendFields is a list of field names (e.g. "DetectedLanguages")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DetectedLanguages") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageBlock) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageBlock
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage: Detected
// language for a structural component.
type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct {
// Confidence: Confidence of detected language. Range [0, 1].
Confidence float64 `json:"confidence,omitempty"`
// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
// For more information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
LanguageCode string `json:"languageCode,omitempty"`
// ForceSendFields is a list of field names (e.g. "Confidence") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Confidence") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage) UnmarshalJSON(data []byte) error {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage
var s1 struct {
Confidence gensupport.JSONFloat64 `json:"confidence"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Confidence = float64(s1.Confidence)
return nil
}
// GoogleCloudDocumentaiV1beta1DocumentPageDimension: Dimension for the
// page.
type GoogleCloudDocumentaiV1beta1DocumentPageDimension struct {
// Height: Page height.
Height float64 `json:"height,omitempty"`
// Unit: Dimension unit.
Unit string `json:"unit,omitempty"`
// Width: Page width.
Width float64 `json:"width,omitempty"`
// ForceSendFields is a list of field names (e.g. "Height") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Height") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageDimension) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDimension
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageDimension) UnmarshalJSON(data []byte) error {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDimension
var s1 struct {
Height gensupport.JSONFloat64 `json:"height"`
Width gensupport.JSONFloat64 `json:"width"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Height = float64(s1.Height)
s.Width = float64(s1.Width)
return nil
}
// GoogleCloudDocumentaiV1beta1DocumentPageFormField: A form field
// detected on the page.
type GoogleCloudDocumentaiV1beta1DocumentPageFormField struct {
// FieldName: Layout for the FormField name. e.g. `Address`, `Email`,
// `Grand total`, `Phone number`, etc.
FieldName *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"fieldName,omitempty"`
// FieldValue: Layout for the FormField value.
FieldValue *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"fieldValue,omitempty"`
// NameDetectedLanguages: A list of detected languages for name together
// with confidence.
NameDetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"nameDetectedLanguages,omitempty"`
// ValueDetectedLanguages: A list of detected languages for value
// together with confidence.
ValueDetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"valueDetectedLanguages,omitempty"`
// ValueType: If the value is non-textual, this field represents the
// type. Current valid values are: - blank (this indicates the
// field_value is normal text) - "unfilled_checkbox" - "filled_checkbox"
ValueType string `json:"valueType,omitempty"`
// ForceSendFields is a list of field names (e.g. "FieldName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FieldName") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageFormField) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageFormField
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPageImage: Rendered image
// contents for this page.
type GoogleCloudDocumentaiV1beta1DocumentPageImage struct {
// Content: Raw byte content of the image.
Content string `json:"content,omitempty"`
// Height: Height of the image in pixels.
Height int64 `json:"height,omitempty"`
// MimeType: Encoding mime type for the image.
MimeType string `json:"mimeType,omitempty"`
// Width: Width of the image in pixels.
Width int64 `json:"width,omitempty"`
// ForceSendFields is a list of field names (e.g. "Content") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Content") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageImage) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImage
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPageLayout: Visual element
// describing a layout unit on a page.
type GoogleCloudDocumentaiV1beta1DocumentPageLayout struct {
// BoundingPoly: The bounding polygon for the Layout.
BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"`
// Confidence: Confidence of the current Layout within context of the
// object this layout is for. e.g. confidence can be for a single token,
// a table, a visual element, etc. depending on context. Range [0, 1].
Confidence float64 `json:"confidence,omitempty"`
// Orientation: Detected orientation for the Layout.
//
// Possible values:
// "ORIENTATION_UNSPECIFIED" - Unspecified orientation.
// "PAGE_UP" - Orientation is aligned with page up.
// "PAGE_RIGHT" - Orientation is aligned with page right. Turn the
// head 90 degrees clockwise from upright to read.
// "PAGE_DOWN" - Orientation is aligned with page down. Turn the head
// 180 degrees from upright to read.
// "PAGE_LEFT" - Orientation is aligned with page left. Turn the head
// 90 degrees counterclockwise from upright to read.
Orientation string `json:"orientation,omitempty"`
// TextAnchor: Text anchor indexing into the Document.text.
TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"`
// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BoundingPoly") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageLayout) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLayout
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageLayout) UnmarshalJSON(data []byte) error {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLayout
var s1 struct {
Confidence gensupport.JSONFloat64 `json:"confidence"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Confidence = float64(s1.Confidence)
return nil
}
// GoogleCloudDocumentaiV1beta1DocumentPageLine: A collection of tokens
// that a human would perceive as a line. Does not cross column
// boundaries, can be horizontal, vertical, etc.
type GoogleCloudDocumentaiV1beta1DocumentPageLine struct {
// DetectedLanguages: A list of detected languages together with
// confidence.
DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"`
// Layout: Layout for Line.
Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"`
// Provenance: The history of this annotation.
Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"`
// ForceSendFields is a list of field names (e.g. "DetectedLanguages")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DetectedLanguages") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageLine) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLine
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPageMatrix: Representation for
// transformation matrix, intended to be compatible and used with OpenCV
// format for image manipulation.
type GoogleCloudDocumentaiV1beta1DocumentPageMatrix struct {
// Cols: Number of columns in the matrix.
Cols int64 `json:"cols,omitempty"`
// Data: The matrix data.
Data string `json:"data,omitempty"`
// Rows: Number of rows in the matrix.
Rows int64 `json:"rows,omitempty"`
// Type: This encodes information about what data type the matrix uses.
// For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list
// of OpenCV primitive data types, please refer to
// https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
Type int64 `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Cols") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Cols") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageMatrix) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageMatrix
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPageParagraph: A collection of
// lines that a human would perceive as a paragraph.
type GoogleCloudDocumentaiV1beta1DocumentPageParagraph struct {
// DetectedLanguages: A list of detected languages together with
// confidence.
DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"`
// Layout: Layout for Paragraph.
Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"`
// Provenance: The history of this annotation.
Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"`
// ForceSendFields is a list of field names (e.g. "DetectedLanguages")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DetectedLanguages") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageParagraph) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageParagraph
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPageTable: A table representation
// similar to HTML table structure.
type GoogleCloudDocumentaiV1beta1DocumentPageTable struct {
// BodyRows: Body rows of the table.
BodyRows []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow `json:"bodyRows,omitempty"`
// DetectedLanguages: A list of detected languages together with
// confidence.
DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"`
// HeaderRows: Header rows of the table.
HeaderRows []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow `json:"headerRows,omitempty"`
// Layout: Layout for Table.
Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"`
// ForceSendFields is a list of field names (e.g. "BodyRows") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BodyRows") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageTable) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTable
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell: A cell
// representation inside the table.
type GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell struct {
// ColSpan: How many columns this cell spans.
ColSpan int64 `json:"colSpan,omitempty"`
// DetectedLanguages: A list of detected languages together with
// confidence.
DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"`
// Layout: Layout for TableCell.
Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"`
// RowSpan: How many rows this cell spans.
RowSpan int64 `json:"rowSpan,omitempty"`
// ForceSendFields is a list of field names (e.g. "ColSpan") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ColSpan") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow: A row of table
// cells.
type GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow struct {
// Cells: Cells that make up this row.
Cells []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell `json:"cells,omitempty"`
// ForceSendFields is a list of field names (e.g. "Cells") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Cells") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPageToken: A detected token.
type GoogleCloudDocumentaiV1beta1DocumentPageToken struct {
// DetectedBreak: Detected break at the end of a Token.
DetectedBreak *GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak `json:"detectedBreak,omitempty"`
// DetectedLanguages: A list of detected languages together with
// confidence.
DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"`
// Layout: Layout for Token.
Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"`
// Provenance: The history of this annotation.
Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"`
// ForceSendFields is a list of field names (e.g. "DetectedBreak") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DetectedBreak") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageToken) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageToken
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak: Detected
// break at the end of a Token.
type GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak struct {
// Type: Detected break type.
//
// Possible values:
// "TYPE_UNSPECIFIED" - Unspecified break type.
// "SPACE" - A single whitespace.
// "WIDE_SPACE" - A wider whitespace.
// "HYPHEN" - A hyphen that indicates that a token has been split
// across lines.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Type") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Type") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentPageVisualElement: Detected
// non-text visual elements e.g. checkbox, signature etc. on the page.
type GoogleCloudDocumentaiV1beta1DocumentPageVisualElement struct {
// DetectedLanguages: A list of detected languages together with
// confidence.
DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"`
// Layout: Layout for VisualElement.
Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"`
// Type: Type of the VisualElement.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "DetectedLanguages")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DetectedLanguages") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentPageVisualElement) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageVisualElement
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentProvenance: Structure to identify
// provenance relationships between annotations in different revisions.
type GoogleCloudDocumentaiV1beta1DocumentProvenance struct {
// Id: The Id of this operation. Needs to be unique within the scope of
// the revision.
Id int64 `json:"id,omitempty"`
// Parents: References to the original elements that are replaced.
Parents []*GoogleCloudDocumentaiV1beta1DocumentProvenanceParent `json:"parents,omitempty"`
// Revision: The index of the revision that produced this element.
Revision int64 `json:"revision,omitempty"`
// Type: The type of provenance operation.
//
// Possible values:
// "OPERATION_TYPE_UNSPECIFIED" - Operation type unspecified.
// "ADD" - Add an element. Implicit if no `parents` are set for the
// provenance.
// "REMOVE" - The element is removed. No `parents` should be set.
// "REPLACE" - Explicitly replaces the element(s) identified by
// `parents`.
// "EVAL_REQUESTED" - Element is requested for human review.
// "EVAL_APPROVED" - Element is review and approved at human review,
// confidence will be set to 1.0
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Id") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Id") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentProvenance) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentProvenance
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentProvenanceParent: Structure for
// referencing parent provenances. When an element replaces one of more
// other elements parent references identify the elements that are
// replaced.
type GoogleCloudDocumentaiV1beta1DocumentProvenanceParent struct {
// Id: The id of the parent provenance.
Id int64 `json:"id,omitempty"`
// Revision: The index of the [Document.revisions] identifying the
// parent revision.
Revision int64 `json:"revision,omitempty"`
// ForceSendFields is a list of field names (e.g. "Id") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Id") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentProvenanceParent) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentProvenanceParent
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentRevision: Contains past or
// forward revisions of this document.
type GoogleCloudDocumentaiV1beta1DocumentRevision struct {
// Agent: If the change was made by a person specify the name or id of
// that person.
Agent string `json:"agent,omitempty"`
// CreateTime: The time that the revision was created.
CreateTime string `json:"createTime,omitempty"`
// HumanReview: Human Review information of this revision.
HumanReview *GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview `json:"humanReview,omitempty"`
// Id: Id of the revision. Unique within the context of the document.
Id string `json:"id,omitempty"`
// Parent: The revisions that this revision is based on. This can
// include one or more parent (when documents are merged.) This field
// represents the index into the `revisions` field.
Parent []int64 `json:"parent,omitempty"`
// Processor: If the annotation was made by processor identify the
// processor by its resource name.
Processor string `json:"processor,omitempty"`
// ForceSendFields is a list of field names (e.g. "Agent") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Agent") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentRevision) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentRevision
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview: Human Review
// information of the document.
type GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview struct {
// State: Human review state. e.g. `requested`, `succeeded`, `rejected`.
State string `json:"state,omitempty"`
// StateMessage: A message providing more details about the current
// state of processing. For example, the rejection reason when the state
// is `rejected`.
StateMessage string `json:"stateMessage,omitempty"`
// ForceSendFields is a list of field names (e.g. "State") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "State") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentShardInfo: For a large document,
// sharding may be performed to produce several document shards. Each
// document shard contains this field to detail which shard it is.
type GoogleCloudDocumentaiV1beta1DocumentShardInfo struct {
// ShardCount: Total number of shards.
ShardCount int64 `json:"shardCount,omitempty,string"`
// ShardIndex: The 0-based index of this shard.
ShardIndex int64 `json:"shardIndex,omitempty,string"`
// TextOffset: The index of the first character in Document.text in the
// overall document global text.
TextOffset int64 `json:"textOffset,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "ShardCount") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ShardCount") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentShardInfo) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentShardInfo
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentStyle: Annotation for common text
// style attributes. This adheres to CSS conventions as much as
// possible.
type GoogleCloudDocumentaiV1beta1DocumentStyle struct {
// BackgroundColor: Text background color.
BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"`
// Color: Text color.
Color *GoogleTypeColor `json:"color,omitempty"`
// FontSize: Font size.
FontSize *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize `json:"fontSize,omitempty"`
// FontWeight: Font weight. Possible values are normal, bold, bolder,
// and lighter. https://www.w3schools.com/cssref/pr_font_weight.asp
FontWeight string `json:"fontWeight,omitempty"`
// TextAnchor: Text anchor indexing into the Document.text.
TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"`
// TextDecoration: Text decoration. Follows CSS standard.
// https://www.w3schools.com/cssref/pr_text_text-decoration.asp
TextDecoration string `json:"textDecoration,omitempty"`
// TextStyle: Text style. Possible values are normal, italic, and
// oblique. https://www.w3schools.com/cssref/pr_font_font-style.asp
TextStyle string `json:"textStyle,omitempty"`
// ForceSendFields is a list of field names (e.g. "BackgroundColor") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BackgroundColor") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentStyle) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyle
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentStyleFontSize: Font size with
// unit.
type GoogleCloudDocumentaiV1beta1DocumentStyleFontSize struct {
// Size: Font size for the text.
Size float64 `json:"size,omitempty"`
// Unit: Unit for the font size. Follows CSS naming (in, px, pt, etc.).
Unit string `json:"unit,omitempty"`
// ForceSendFields is a list of field names (e.g. "Size") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Size") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyleFontSize
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) UnmarshalJSON(data []byte) error {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyleFontSize
var s1 struct {
Size gensupport.JSONFloat64 `json:"size"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Size = float64(s1.Size)
return nil
}
// GoogleCloudDocumentaiV1beta1DocumentTextAnchor: Text reference
// indexing into the Document.text.
type GoogleCloudDocumentaiV1beta1DocumentTextAnchor struct {
// Content: Contains the content of the text span so that users do not
// have to look it up in the text_segments.
Content string `json:"content,omitempty"`
// TextSegments: The text segments from the Document.text.
TextSegments []*GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment `json:"textSegments,omitempty"`
// ForceSendFields is a list of field names (e.g. "Content") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Content") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentTextAnchor) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextAnchor
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment: A text
// segment in the Document.text. The indices may be out of bounds which
// indicate that the text extends into another document shard for large
// sharded documents. See ShardInfo.text_offset
type GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment struct {
// EndIndex: TextSegment half open end UTF-8 char index in the
// Document.text.
EndIndex int64 `json:"endIndex,omitempty,string"`
// StartIndex: TextSegment start UTF-8 char index in the Document.text.
StartIndex int64 `json:"startIndex,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "EndIndex") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "EndIndex") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentTextChange: This message is used
// for text changes aka. OCR corrections.
type GoogleCloudDocumentaiV1beta1DocumentTextChange struct {
// ChangedText: The text that replaces the text identified in the
// `text_anchor`.
ChangedText string `json:"changedText,omitempty"`
// Provenance: The history of this annotation.
Provenance []*GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"`
// TextAnchor: Provenance of the correction. Text anchor indexing into
// the Document.text. There can only be a single
// `TextAnchor.text_segments` element. If the start and end index of the
// text segment are the same, the text change is inserted before that
// index.
TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"`
// ForceSendFields is a list of field names (e.g. "ChangedText") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ChangedText") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentTextChange) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextChange
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1DocumentTranslation: A translation of the
// text segment.
type GoogleCloudDocumentaiV1beta1DocumentTranslation struct {
// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
// For more information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
LanguageCode string `json:"languageCode,omitempty"`
// Provenance: The history of this annotation.
Provenance []*GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"`
// TextAnchor: Provenance of the translation. Text anchor indexing into
// the Document.text. There can only be a single
// `TextAnchor.text_segments` element. If the start and end index of the
// text segment are the same, the text change is inserted before that
// index.
TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"`
// TranslatedText: Text translated into the target language.
TranslatedText string `json:"translatedText,omitempty"`
// ForceSendFields is a list of field names (e.g. "LanguageCode") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "LanguageCode") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1DocumentTranslation) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1DocumentTranslation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1GcsDestination: The Google Cloud Storage
// location where the output file will be written to.
type GoogleCloudDocumentaiV1beta1GcsDestination struct {
Uri string `json:"uri,omitempty"`
// ForceSendFields is a list of field names (e.g. "Uri") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Uri") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1GcsDestination) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1GcsDestination
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1GcsSource: The Google Cloud Storage
// location where the input file will be read from.
type GoogleCloudDocumentaiV1beta1GcsSource struct {
Uri string `json:"uri,omitempty"`
// ForceSendFields is a list of field names (e.g. "Uri") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Uri") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1GcsSource) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1GcsSource
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1InputConfig: The desired input location
// and metadata.
type GoogleCloudDocumentaiV1beta1InputConfig struct {
// GcsSource: The Google Cloud Storage location to read the input from.
// This must be a single file.
GcsSource *GoogleCloudDocumentaiV1beta1GcsSource `json:"gcsSource,omitempty"`
// MimeType: Required. Mimetype of the input. Current supported
// mimetypes are application/pdf, image/tiff, and image/gif. In
// addition, application/json type is supported for requests with
// ProcessDocumentRequest.automl_params field set. The JSON file needs
// to be in Document format.
MimeType string `json:"mimeType,omitempty"`
// ForceSendFields is a list of field names (e.g. "GcsSource") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "GcsSource") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1InputConfig) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1InputConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1NormalizedVertex: A vertex represents a
// 2D point in the image. NOTE: the normalized vertex coordinates are
// relative to the original image and range from 0 to 1.
type GoogleCloudDocumentaiV1beta1NormalizedVertex struct {
// X: X coordinate.
X float64 `json:"x,omitempty"`
// Y: Y coordinate.
Y float64 `json:"y,omitempty"`
// ForceSendFields is a list of field names (e.g. "X") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "X") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1NormalizedVertex) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1NormalizedVertex
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GoogleCloudDocumentaiV1beta1NormalizedVertex) UnmarshalJSON(data []byte) error {
type NoMethod GoogleCloudDocumentaiV1beta1NormalizedVertex
var s1 struct {
X gensupport.JSONFloat64 `json:"x"`
Y gensupport.JSONFloat64 `json:"y"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.X = float64(s1.X)
s.Y = float64(s1.Y)
return nil
}
// GoogleCloudDocumentaiV1beta1OperationMetadata: Contains metadata for
// the BatchProcessDocuments operation.
type GoogleCloudDocumentaiV1beta1OperationMetadata struct {
// CreateTime: The creation time of the operation.
CreateTime string `json:"createTime,omitempty"`
// State: The state of the current batch processing.
//
// Possible values:
// "STATE_UNSPECIFIED" - The default value. This value is used if the
// state is omitted.
// "ACCEPTED" - Request is received.
// "WAITING" - Request operation is waiting for scheduling.
// "RUNNING" - Request is being processed.
// "SUCCEEDED" - The batch processing completed successfully.
// "CANCELLED" - The batch processing was cancelled.
// "FAILED" - The batch processing has failed.
State string `json:"state,omitempty"`
// StateMessage: A message providing more details about the current
// state of processing.
StateMessage string `json:"stateMessage,omitempty"`
// UpdateTime: The last update time of the operation.
UpdateTime string `json:"updateTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1OperationMetadata) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1OperationMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1OutputConfig: The desired output location
// and metadata.
type GoogleCloudDocumentaiV1beta1OutputConfig struct {
// GcsDestination: The Google Cloud Storage location to write the output
// to.
GcsDestination *GoogleCloudDocumentaiV1beta1GcsDestination `json:"gcsDestination,omitempty"`
// PagesPerShard: The max number of pages to include into each output
// Document shard JSON on Google Cloud Storage. The valid range is [1,
// 100]. If not specified, the default value is 20. For example, for one
// pdf file with 100 pages, 100 parsed pages will be produced. If
// `pages_per_shard` = 20, then 5 Document shard JSON files each
// containing 20 parsed pages will be written under the prefix
// OutputConfig.gcs_destination.uri and suffix pages-x-to-y.json where x
// and y are 1-indexed page numbers. Example GCS outputs with 157 pages
// and pages_per_shard = 50: pages-001-to-050.json pages-051-to-100.json
// pages-101-to-150.json pages-151-to-157.json
PagesPerShard int64 `json:"pagesPerShard,omitempty"`
// ForceSendFields is a list of field names (e.g. "GcsDestination") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "GcsDestination") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1OutputConfig) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1OutputConfig
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1ProcessDocumentResponse: Response to a
// single document processing request.
type GoogleCloudDocumentaiV1beta1ProcessDocumentResponse struct {
// InputConfig: Information about the input file. This is the same as
// the corresponding input config in the request.
InputConfig *GoogleCloudDocumentaiV1beta1InputConfig `json:"inputConfig,omitempty"`
// OutputConfig: The output location of the parsed responses. The
// responses are written to this location as JSON-serialized `Document`
// objects.
OutputConfig *GoogleCloudDocumentaiV1beta1OutputConfig `json:"outputConfig,omitempty"`
// ForceSendFields is a list of field names (e.g. "InputConfig") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "InputConfig") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1ProcessDocumentResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1ProcessDocumentResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta1Vertex: A vertex represents a 2D point in
// the image. NOTE: the vertex coordinates are in the same scale as the
// original image.
type GoogleCloudDocumentaiV1beta1Vertex struct {
// X: X coordinate.
X int64 `json:"x,omitempty"`
// Y: Y coordinate.
Y int64 `json:"y,omitempty"`
// ForceSendFields is a list of field names (e.g. "X") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "X") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta1Vertex) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta1Vertex
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2AutoMlParams: Parameters to control
// AutoML model prediction behavior.
type GoogleCloudDocumentaiV1beta2AutoMlParams struct {
// Model: Resource name of the AutoML model. Format:
// `projects/{project-id}/locations/{location-id}/models/{model-id}`.
Model string `json:"model,omitempty"`
// ForceSendFields is a list of field names (e.g. "Model") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Model") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2AutoMlParams) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2AutoMlParams
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest: Request to
// batch process documents as an asynchronous operation. The output is
// written to Cloud Storage as JSON in the [Document] format.
type GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest struct {
// Requests: Required. Individual requests for each document.
Requests []*GoogleCloudDocumentaiV1beta2ProcessDocumentRequest `json:"requests,omitempty"`
// ForceSendFields is a list of field names (e.g. "Requests") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Requests") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2BatchProcessDocumentsRequest
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse: Response
// to an batch document processing request. This is returned in the LRO
// Operation after the operation is complete.
type GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse struct {
// Responses: Responses for each individual document.
Responses []*GoogleCloudDocumentaiV1beta2ProcessDocumentResponse `json:"responses,omitempty"`
// ForceSendFields is a list of field names (e.g. "Responses") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Responses") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2BoundingPoly: A bounding polygon for the
// detected image annotation.
type GoogleCloudDocumentaiV1beta2BoundingPoly struct {
// NormalizedVertices: The bounding polygon normalized vertices.
NormalizedVertices []*GoogleCloudDocumentaiV1beta2NormalizedVertex `json:"normalizedVertices,omitempty"`
// Vertices: The bounding polygon vertices.
Vertices []*GoogleCloudDocumentaiV1beta2Vertex `json:"vertices,omitempty"`
// ForceSendFields is a list of field names (e.g. "NormalizedVertices")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NormalizedVertices") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2BoundingPoly) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2BoundingPoly
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2Document: Document represents the
// canonical document resource in Document Understanding AI. It is an
// interchange format that provides insights into documents and allows
// for collaboration between users and Document Understanding AI to
// iterate and optimize for quality.
type GoogleCloudDocumentaiV1beta2Document struct {
// Content: Inline document content, represented as a stream of bytes.
// Note: As with all `bytes` fields, protobuffers use a pure binary
// representation, whereas JSON representations use base64.
Content string `json:"content,omitempty"`
// Entities: A list of entities detected on Document.text. For document
// shards, entities in this list may cross shard boundaries.
Entities []*GoogleCloudDocumentaiV1beta2DocumentEntity `json:"entities,omitempty"`
// EntityRelations: Relationship among Document.entities.
EntityRelations []*GoogleCloudDocumentaiV1beta2DocumentEntityRelation `json:"entityRelations,omitempty"`
// Error: Any error that occurred while processing this document.
Error *GoogleRpcStatus `json:"error,omitempty"`
// Labels: Labels for this document.
Labels []*GoogleCloudDocumentaiV1beta2DocumentLabel `json:"labels,omitempty"`
// MimeType: An IANA published MIME type (also referred to as media
// type). For more information, see
// https://www.iana.org/assignments/media-types/media-types.xhtml.
MimeType string `json:"mimeType,omitempty"`
// Pages: Visual page layout for the Document.
Pages []*GoogleCloudDocumentaiV1beta2DocumentPage `json:"pages,omitempty"`
// Revisions: Revision history of this document.
Revisions []*GoogleCloudDocumentaiV1beta2DocumentRevision `json:"revisions,omitempty"`
// ShardInfo: Information about the sharding if this document is sharded
// part of a larger document. If the document is not sharded, this
// message is not specified.
ShardInfo *GoogleCloudDocumentaiV1beta2DocumentShardInfo `json:"shardInfo,omitempty"`
// Text: UTF-8 encoded text in reading order from the document.
Text string `json:"text,omitempty"`
// TextChanges: A list of text corrections made to [Document.text]. This
// is usually used for annotating corrections to OCR mistakes. Text
// changes for a given revision may not overlap with each other.
TextChanges []*GoogleCloudDocumentaiV1beta2DocumentTextChange `json:"textChanges,omitempty"`
// TextStyles: Styles for the Document.text.
TextStyles []*GoogleCloudDocumentaiV1beta2DocumentStyle `json:"textStyles,omitempty"`
// Translations: A list of translations on Document.text. For document
// shards, translations in this list may cross shard boundaries.
Translations []*GoogleCloudDocumentaiV1beta2DocumentTranslation `json:"translations,omitempty"`
// Uri: Currently supports Google Cloud Storage URI of the form
// `gs://bucket_name/object_name`. Object versioning is not supported.
// See [Google Cloud Storage Request
// URIs](https://cloud.google.com/storage/docs/reference-uris) for more
// info.
Uri string `json:"uri,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Content") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Content") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2Document) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2Document
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2DocumentEntity: A phrase in the text that
// is a known entity type, such as a person, an organization, or
// location.
type GoogleCloudDocumentaiV1beta2DocumentEntity struct {
// Confidence: Optional. Confidence of detected Schema entity. Range [0,
// 1].
Confidence float64 `json:"confidence,omitempty"`
// Id: Optional. Canonical id. This will be a unique value in the entity
// list for this document.
Id string `json:"id,omitempty"`
// MentionId: Deprecated. Use `id` field instead.
MentionId string `json:"mentionId,omitempty"`
// MentionText: Text value in the document e.g. `1600 Amphitheatre
// Pkwy`.
MentionText string `json:"mentionText,omitempty"`
// NormalizedValue: Optional. Normalized entity value. Absent if the
// extracted value could not be converted or the type (e.g. address) is
// not supported for certain parsers. This field is also only populated
// for certain supported document types.
NormalizedValue *GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue `json:"normalizedValue,omitempty"`
// PageAnchor: Optional. Represents the provenance of this entity wrt.
// the location on the page where it was found.
PageAnchor *GoogleCloudDocumentaiV1beta2DocumentPageAnchor `json:"pageAnchor,omitempty"`
// Properties: Optional. Entities can be nested to form a hierarchical
// data structure representing the content in the document.
Properties []*GoogleCloudDocumentaiV1beta2DocumentEntity `json:"properties,omitempty"`
// Provenance: Optional. The history of this annotation.
Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"`
// Redacted: Optional. Whether the entity will be redacted for
// de-identification purposes.
Redacted bool `json:"redacted,omitempty"`
// TextAnchor: Provenance of the entity. Text anchor indexing into the
// Document.text.
TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"`
// Type: Entity type from a schema e.g. `Address`.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Confidence") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Confidence") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentEntity) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntity
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GoogleCloudDocumentaiV1beta2DocumentEntity) UnmarshalJSON(data []byte) error {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntity
var s1 struct {
Confidence gensupport.JSONFloat64 `json:"confidence"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Confidence = float64(s1.Confidence)
return nil
}
// GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue: Parsed and
// normalized entity value.
type GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue struct {
// AddressValue: Postal address. See also: https:
// //github.com/googleapis/googleapis/blob/ //
// master/google/type/postal_address.proto
AddressValue *GoogleTypePostalAddress `json:"addressValue,omitempty"`
// DateValue: Date value. Includes year, month, day. See also: https:
// //github.com/googleapis/googleapis/blob/master/google/type/date.proto
DateValue *GoogleTypeDate `json:"dateValue,omitempty"`
// DatetimeValue: DateTime value. Includes date, time, and timezone. See
// also: https: //github.com/googleapis/googleapis/blob/ //
// master/google/type/datetime.proto
DatetimeValue *GoogleTypeDateTime `json:"datetimeValue,omitempty"`
// MoneyValue: Money value. See also: https:
// //github.com/googleapis/googleapis/blob/ //
// master/google/type/money.proto
MoneyValue *GoogleTypeMoney `json:"moneyValue,omitempty"`
// Text: Required. Normalized entity value stored as a string. This
// field is populated for supported document type (e.g. Invoice). For
// some entity types, one of respective 'structured_value' fields may
// also be populated. - Money/Currency type (`money_value`) is in the
// ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601
// text format. - Datetime type (`datetime_value`) is in the ISO 8601
// text format.
Text string `json:"text,omitempty"`
// ForceSendFields is a list of field names (e.g. "AddressValue") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AddressValue") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2DocumentEntityRelation: Relationship
// between Entities.
type GoogleCloudDocumentaiV1beta2DocumentEntityRelation struct {
// ObjectId: Object entity id.
ObjectId string `json:"objectId,omitempty"`
// Relation: Relationship description.
Relation string `json:"relation,omitempty"`
// SubjectId: Subject entity id.
SubjectId string `json:"subjectId,omitempty"`
// ForceSendFields is a list of field names (e.g. "ObjectId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ObjectId") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentEntityRelation) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntityRelation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2DocumentLabel: Label attaches schema
// information and/or other metadata to segments within a Document.
// Multiple Labels on a single field can denote either different labels,
// different instances of the same label created at different times, or
// some combination of both.
type GoogleCloudDocumentaiV1beta2DocumentLabel struct {
// AutomlModel: Label is generated AutoML model. This field stores the
// full resource name of the AutoML model. Format:
// `projects/{project-id}/locations/{location-id}/models/{model-id}`
AutomlModel string `json:"automlModel,omitempty"`
// Confidence: Confidence score between 0 and 1 for label assignment.
Confidence float64 `json:"confidence,omitempty"`
// Name: Name of the label. When the label is generated from AutoML Text
// Classification model, this field represents the name of the category.
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "AutomlModel") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AutomlModel") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentLabel) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentLabel
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GoogleCloudDocumentaiV1beta2DocumentLabel) UnmarshalJSON(data []byte) error {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentLabel
var s1 struct {
Confidence gensupport.JSONFloat64 `json:"confidence"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Confidence = float64(s1.Confidence)
return nil
}
// GoogleCloudDocumentaiV1beta2DocumentPage: A page in a Document.
type GoogleCloudDocumentaiV1beta2DocumentPage struct {
// Blocks: A list of visually detected text blocks on the page. A block
// has a set of lines (collected into paragraphs) that have a common
// line-spacing and orientation.
Blocks []*GoogleCloudDocumentaiV1beta2DocumentPageBlock `json:"blocks,omitempty"`
// DetectedLanguages: A list of detected languages together with
// confidence.
DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"`
// Dimension: Physical dimension of the page.
Dimension *GoogleCloudDocumentaiV1beta2DocumentPageDimension `json:"dimension,omitempty"`
// FormFields: A list of visually detected form fields on the page.
FormFields []*GoogleCloudDocumentaiV1beta2DocumentPageFormField `json:"formFields,omitempty"`
// Image: Rendered image for this page. This image is preprocessed to
// remove any skew, rotation, and distortions such that the annotation
// bounding boxes can be upright and axis-aligned.
Image *GoogleCloudDocumentaiV1beta2DocumentPageImage `json:"image,omitempty"`
// Layout: Layout for the page.
Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"`
// Lines: A list of visually detected text lines on the page. A
// collection of tokens that a human would perceive as a line.
Lines []*GoogleCloudDocumentaiV1beta2DocumentPageLine `json:"lines,omitempty"`
// PageNumber: 1-based index for current Page in a parent Document.
// Useful when a page is taken out of a Document for individual
// processing.
PageNumber int64 `json:"pageNumber,omitempty"`
// Paragraphs: A list of visually detected text paragraphs on the page.
// A collection of lines that a human would perceive as a paragraph.
Paragraphs []*GoogleCloudDocumentaiV1beta2DocumentPageParagraph `json:"paragraphs,omitempty"`
// Tables: A list of visually detected tables on the page.
Tables []*GoogleCloudDocumentaiV1beta2DocumentPageTable `json:"tables,omitempty"`
// Tokens: A list of visually detected tokens on the page.
Tokens []*GoogleCloudDocumentaiV1beta2DocumentPageToken `json:"tokens,omitempty"`
// Transforms: Transformation matrices that were applied to the original
// document image to produce Page.image.
Transforms []*GoogleCloudDocumentaiV1beta2DocumentPageMatrix `json:"transforms,omitempty"`
// VisualElements: A list of detected non-text visual elements e.g.
// checkbox, signature etc. on the page.
VisualElements []*GoogleCloudDocumentaiV1beta2DocumentPageVisualElement `json:"visualElements,omitempty"`
// ForceSendFields is a list of field names (e.g. "Blocks") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Blocks") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPage) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPage
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2DocumentPageAnchor: Referencing the
// visual context of the entity in the Document.pages. Page anchors can
// be cross-page, consist of multiple bounding polygons and optionally
// reference specific layout element types.
type GoogleCloudDocumentaiV1beta2DocumentPageAnchor struct {
// PageRefs: One or more references to visual page elements
PageRefs []*GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef `json:"pageRefs,omitempty"`
// ForceSendFields is a list of field names (e.g. "PageRefs") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "PageRefs") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPageAnchor) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageAnchor
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef: Represents a
// weak reference to a page element within a document.
type GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef struct {
// BoundingPoly: Optional. Identifies the bounding polygon of a layout
// element on the page.
BoundingPoly *GoogleCloudDocumentaiV1beta2BoundingPoly `json:"boundingPoly,omitempty"`
// LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead.
LayoutId string `json:"layoutId,omitempty"`
// LayoutType: Optional. The type of the layout element that is being
// referenced if any.
//
// Possible values:
// "LAYOUT_TYPE_UNSPECIFIED" - Layout Unspecified.
// "BLOCK" - References a Page.blocks element.
// "PARAGRAPH" - References a Page.paragraphs element.
// "LINE" - References a Page.lines element.
// "TOKEN" - References a Page.tokens element.
// "VISUAL_ELEMENT" - References a Page.visual_elements element.
// "TABLE" - Refrrences a Page.tables element.
// "FORM_FIELD" - References a Page.form_fields element.
LayoutType string `json:"layoutType,omitempty"`
// Page: Required. Index into the Document.pages element
Page int64 `json:"page,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BoundingPoly") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2DocumentPageBlock: A block has a set of
// lines (collected into paragraphs) that have a common line-spacing and
// orientation.
type GoogleCloudDocumentaiV1beta2DocumentPageBlock struct {
// DetectedLanguages: A list of detected languages together with
// confidence.
DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"`
// Layout: Layout for Block.
Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"`
// Provenance: The history of this annotation.
Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"`
// ForceSendFields is a list of field names (e.g. "DetectedLanguages")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DetectedLanguages") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPageBlock) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageBlock
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage: Detected
// language for a structural component.
type GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage struct {
// Confidence: Confidence of detected language. Range [0, 1].
Confidence float64 `json:"confidence,omitempty"`
// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
// For more information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
LanguageCode string `json:"languageCode,omitempty"`
// ForceSendFields is a list of field names (e.g. "Confidence") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Confidence") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage) UnmarshalJSON(data []byte) error {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage
var s1 struct {
Confidence gensupport.JSONFloat64 `json:"confidence"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Confidence = float64(s1.Confidence)
return nil
}
// GoogleCloudDocumentaiV1beta2DocumentPageDimension: Dimension for the
// page.
type GoogleCloudDocumentaiV1beta2DocumentPageDimension struct {
// Height: Page height.
Height float64 `json:"height,omitempty"`
// Unit: Dimension unit.
Unit string `json:"unit,omitempty"`
// Width: Page width.
Width float64 `json:"width,omitempty"`
// ForceSendFields is a list of field names (e.g. "Height") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Height") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPageDimension) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDimension
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPageDimension) UnmarshalJSON(data []byte) error {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDimension
var s1 struct {
Height gensupport.JSONFloat64 `json:"height"`
Width gensupport.JSONFloat64 `json:"width"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Height = float64(s1.Height)
s.Width = float64(s1.Width)
return nil
}
// GoogleCloudDocumentaiV1beta2DocumentPageFormField: A form field
// detected on the page.
type GoogleCloudDocumentaiV1beta2DocumentPageFormField struct {
// FieldName: Layout for the FormField name. e.g. `Address`, `Email`,
// `Grand total`, `Phone number`, etc.
FieldName *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"fieldName,omitempty"`
// FieldValue: Layout for the FormField value.
FieldValue *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"fieldValue,omitempty"`
// NameDetectedLanguages: A list of detected languages for name together
// with confidence.
NameDetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"nameDetectedLanguages,omitempty"`
// ValueDetectedLanguages: A list of detected languages for value
// together with confidence.
ValueDetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"valueDetectedLanguages,omitempty"`
// ValueType: If the value is non-textual, this field represents the
// type. Current valid values are: - blank (this indicates the
// field_value is normal text) - "unfilled_checkbox" - "filled_checkbox"
ValueType string `json:"valueType,omitempty"`
// ForceSendFields is a list of field names (e.g. "FieldName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FieldName") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPageFormField) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageFormField
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2DocumentPageImage: Rendered image
// contents for this page.
type GoogleCloudDocumentaiV1beta2DocumentPageImage struct {
// Content: Raw byte content of the image.
Content string `json:"content,omitempty"`
// Height: Height of the image in pixels.
Height int64 `json:"height,omitempty"`
// MimeType: Encoding mime type for the image.
MimeType string `json:"mimeType,omitempty"`
// Width: Width of the image in pixels.
Width int64 `json:"width,omitempty"`
// ForceSendFields is a list of field names (e.g. "Content") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Content") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPageImage) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImage
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2DocumentPageLayout: Visual element
// describing a layout unit on a page.
type GoogleCloudDocumentaiV1beta2DocumentPageLayout struct {
// BoundingPoly: The bounding polygon for the Layout.
BoundingPoly *GoogleCloudDocumentaiV1beta2BoundingPoly `json:"boundingPoly,omitempty"`
// Confidence: Confidence of the current Layout within context of the
// object this layout is for. e.g. confidence can be for a single token,
// a table, a visual element, etc. depending on context. Range [0, 1].
Confidence float64 `json:"confidence,omitempty"`
// Orientation: Detected orientation for the Layout.
//
// Possible values:
// "ORIENTATION_UNSPECIFIED" - Unspecified orientation.
// "PAGE_UP" - Orientation is aligned with page up.
// "PAGE_RIGHT" - Orientation is aligned with page right. Turn the
// head 90 degrees clockwise from upright to read.
// "PAGE_DOWN" - Orientation is aligned with page down. Turn the head
// 180 degrees from upright to read.
// "PAGE_LEFT" - Orientation is aligned with page left. Turn the head
// 90 degrees counterclockwise from upright to read.
Orientation string `json:"orientation,omitempty"`
// TextAnchor: Text anchor indexing into the Document.text.
TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"`
// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BoundingPoly") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPageLayout) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageLayout
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPageLayout) UnmarshalJSON(data []byte) error {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageLayout
var s1 struct {
Confidence gensupport.JSONFloat64 `json:"confidence"`
*NoMethod
}
s1.NoMethod = (*NoMethod)(s)
if err := json.Unmarshal(data, &s1); err != nil {
return err
}
s.Confidence = float64(s1.Confidence)
return nil
}
// GoogleCloudDocumentaiV1beta2DocumentPageLine: A collection of tokens
// that a human would perceive as a line. Does not cross column
// boundaries, can be horizontal, vertical, etc.
type GoogleCloudDocumentaiV1beta2DocumentPageLine struct {
// DetectedLanguages: A list of detected languages together with
// confidence.
DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"`
// Layout: Layout for Line.
Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"`
// Provenance: The history of this annotation.
Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"`
// ForceSendFields is a list of field names (e.g. "DetectedLanguages")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DetectedLanguages") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPageLine) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageLine
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2DocumentPageMatrix: Representation for
// transformation matrix, intended to be compatible and used with OpenCV
// format for image manipulation.
type GoogleCloudDocumentaiV1beta2DocumentPageMatrix struct {
// Cols: Number of columns in the matrix.
Cols int64 `json:"cols,omitempty"`
// Data: The matrix data.
Data string `json:"data,omitempty"`
// Rows: Number of rows in the matrix.
Rows int64 `json:"rows,omitempty"`
// Type: This encodes information about what data type the matrix uses.
// For example, 0 (CV_8U) is an unsigned 8-bit image. For the full list
// of OpenCV primitive data types, please refer to
// https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html
Type int64 `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Cols") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Cols") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPageMatrix) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageMatrix
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2DocumentPageParagraph: A collection of
// lines that a human would perceive as a paragraph.
type GoogleCloudDocumentaiV1beta2DocumentPageParagraph struct {
// DetectedLanguages: A list of detected languages together with
// confidence.
DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"`
// Layout: Layout for Paragraph.
Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"`
// Provenance: The history of this annotation.
Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"`
// ForceSendFields is a list of field names (e.g. "DetectedLanguages")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DetectedLanguages") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GoogleCloudDocumentaiV1beta2DocumentPageParagraph) MarshalJSON() ([]byte, error) {
type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageParagraph
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// GoogleCloudDocumentaiV1beta2DocumentPageTable: A table representation
// similar to HTML table structure.
type GoogleCloudDocumentaiV1beta2DocumentPageTable struct {
// BodyRows: Body rows of the table.
BodyRows []*GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow `json:"bodyRows,omitempty"`
// DetectedLanguages: A list of detected languages together with
// confidence.
DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"`
// HeaderRows: Header rows of the table.
HeaderRows []*GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow `json:"headerRows,omitempty"`
// Layout: Layout for Table.
Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"`