1 // Copyright 2024 Google LLC. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Code generated file. DO NOT EDIT. 6 7 // Package documentai provides access to the Cloud Document AI API. 8 // 9 // For product documentation, see: https://cloud.google.com/document-ai/docs/ 10 // 11 // # Library status 12 // 13 // These client libraries are officially supported by Google. However, this 14 // library is considered complete and is in maintenance mode. This means 15 // that we will address critical bugs and security issues but will not add 16 // any new features. 17 // 18 // When possible, we recommend using our newer 19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) 20 // that are still actively being worked and iterated on. 21 // 22 // # Creating a client 23 // 24 // Usage example: 25 // 26 // import "google.golang.org/api/documentai/v1" 27 // ... 28 // ctx := context.Background() 29 // documentaiService, err := documentai.NewService(ctx) 30 // 31 // In this example, Google Application Default Credentials are used for 32 // authentication. For information on how to create and obtain Application 33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 34 // 35 // # Other authentication options 36 // 37 // To use an API key for authentication (note: some APIs do not support API 38 // keys), use [google.golang.org/api/option.WithAPIKey]: 39 // 40 // documentaiService, err := documentai.NewService(ctx, option.WithAPIKey("AIza...")) 41 // 42 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth 43 // flow, use [google.golang.org/api/option.WithTokenSource]: 44 // 45 // config := &oauth2.Config{...} 46 // // ... 47 // token, err := config.Exchange(ctx, ...) 48 // documentaiService, err := documentai.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 49 // 50 // See [google.golang.org/api/option.ClientOption] for details on options. 51 package documentai // import "google.golang.org/api/documentai/v1" 52 53 import ( 54 "bytes" 55 "context" 56 "encoding/json" 57 "errors" 58 "fmt" 59 "io" 60 "net/http" 61 "net/url" 62 "strconv" 63 "strings" 64 65 googleapi "google.golang.org/api/googleapi" 66 internal "google.golang.org/api/internal" 67 gensupport "google.golang.org/api/internal/gensupport" 68 option "google.golang.org/api/option" 69 internaloption "google.golang.org/api/option/internaloption" 70 htransport "google.golang.org/api/transport/http" 71 ) 72 73 // Always reference these packages, just in case the auto-generated code 74 // below doesn't. 75 var _ = bytes.NewBuffer 76 var _ = strconv.Itoa 77 var _ = fmt.Sprintf 78 var _ = json.NewDecoder 79 var _ = io.Copy 80 var _ = url.Parse 81 var _ = gensupport.MarshalJSON 82 var _ = googleapi.Version 83 var _ = errors.New 84 var _ = strings.Replace 85 var _ = context.Canceled 86 var _ = internaloption.WithDefaultEndpoint 87 var _ = internal.Version 88 89 const apiId = "documentai:v1" 90 const apiName = "documentai" 91 const apiVersion = "v1" 92 const basePath = "https://documentai.googleapis.com/" 93 const basePathTemplate = "https://documentai.UNIVERSE_DOMAIN/" 94 const mtlsBasePath = "https://documentai.mtls.googleapis.com/" 95 96 // OAuth2 scopes used by this API. 97 const ( 98 // See, edit, configure, and delete your Google Cloud data and see the email 99 // address for your Google Account. 100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 101 ) 102 103 // NewService creates a new Service. 104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 105 scopesOption := internaloption.WithDefaultScopes( 106 "https://www.googleapis.com/auth/cloud-platform", 107 ) 108 // NOTE: prepend, so we don't override user-specified scopes. 109 opts = append([]option.ClientOption{scopesOption}, opts...) 110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 113 opts = append(opts, internaloption.EnableNewAuthLibrary()) 114 client, endpoint, err := htransport.NewClient(ctx, opts...) 115 if err != nil { 116 return nil, err 117 } 118 s, err := New(client) 119 if err != nil { 120 return nil, err 121 } 122 if endpoint != "" { 123 s.BasePath = endpoint 124 } 125 return s, nil 126 } 127 128 // New creates a new Service. It uses the provided http.Client for requests. 129 // 130 // Deprecated: please use NewService instead. 131 // To provide a custom HTTP client, use option.WithHTTPClient. 132 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 133 func New(client *http.Client) (*Service, error) { 134 if client == nil { 135 return nil, errors.New("client is nil") 136 } 137 s := &Service{client: client, BasePath: basePath} 138 s.Operations = NewOperationsService(s) 139 s.Projects = NewProjectsService(s) 140 return s, nil 141 } 142 143 type Service struct { 144 client *http.Client 145 BasePath string // API endpoint base URL 146 UserAgent string // optional additional User-Agent fragment 147 148 Operations *OperationsService 149 150 Projects *ProjectsService 151 } 152 153 func (s *Service) userAgent() string { 154 if s.UserAgent == "" { 155 return googleapi.UserAgent 156 } 157 return googleapi.UserAgent + " " + s.UserAgent 158 } 159 160 func NewOperationsService(s *Service) *OperationsService { 161 rs := &OperationsService{s: s} 162 return rs 163 } 164 165 type OperationsService struct { 166 s *Service 167 } 168 169 func NewProjectsService(s *Service) *ProjectsService { 170 rs := &ProjectsService{s: s} 171 rs.Locations = NewProjectsLocationsService(s) 172 rs.Operations = NewProjectsOperationsService(s) 173 return rs 174 } 175 176 type ProjectsService struct { 177 s *Service 178 179 Locations *ProjectsLocationsService 180 181 Operations *ProjectsOperationsService 182 } 183 184 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 185 rs := &ProjectsLocationsService{s: s} 186 rs.Operations = NewProjectsLocationsOperationsService(s) 187 rs.ProcessorTypes = NewProjectsLocationsProcessorTypesService(s) 188 rs.Processors = NewProjectsLocationsProcessorsService(s) 189 return rs 190 } 191 192 type ProjectsLocationsService struct { 193 s *Service 194 195 Operations *ProjectsLocationsOperationsService 196 197 ProcessorTypes *ProjectsLocationsProcessorTypesService 198 199 Processors *ProjectsLocationsProcessorsService 200 } 201 202 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { 203 rs := &ProjectsLocationsOperationsService{s: s} 204 return rs 205 } 206 207 type ProjectsLocationsOperationsService struct { 208 s *Service 209 } 210 211 func NewProjectsLocationsProcessorTypesService(s *Service) *ProjectsLocationsProcessorTypesService { 212 rs := &ProjectsLocationsProcessorTypesService{s: s} 213 return rs 214 } 215 216 type ProjectsLocationsProcessorTypesService struct { 217 s *Service 218 } 219 220 func NewProjectsLocationsProcessorsService(s *Service) *ProjectsLocationsProcessorsService { 221 rs := &ProjectsLocationsProcessorsService{s: s} 222 rs.HumanReviewConfig = NewProjectsLocationsProcessorsHumanReviewConfigService(s) 223 rs.ProcessorVersions = NewProjectsLocationsProcessorsProcessorVersionsService(s) 224 return rs 225 } 226 227 type ProjectsLocationsProcessorsService struct { 228 s *Service 229 230 HumanReviewConfig *ProjectsLocationsProcessorsHumanReviewConfigService 231 232 ProcessorVersions *ProjectsLocationsProcessorsProcessorVersionsService 233 } 234 235 func NewProjectsLocationsProcessorsHumanReviewConfigService(s *Service) *ProjectsLocationsProcessorsHumanReviewConfigService { 236 rs := &ProjectsLocationsProcessorsHumanReviewConfigService{s: s} 237 return rs 238 } 239 240 type ProjectsLocationsProcessorsHumanReviewConfigService struct { 241 s *Service 242 } 243 244 func NewProjectsLocationsProcessorsProcessorVersionsService(s *Service) *ProjectsLocationsProcessorsProcessorVersionsService { 245 rs := &ProjectsLocationsProcessorsProcessorVersionsService{s: s} 246 rs.Evaluations = NewProjectsLocationsProcessorsProcessorVersionsEvaluationsService(s) 247 return rs 248 } 249 250 type ProjectsLocationsProcessorsProcessorVersionsService struct { 251 s *Service 252 253 Evaluations *ProjectsLocationsProcessorsProcessorVersionsEvaluationsService 254 } 255 256 func NewProjectsLocationsProcessorsProcessorVersionsEvaluationsService(s *Service) *ProjectsLocationsProcessorsProcessorVersionsEvaluationsService { 257 rs := &ProjectsLocationsProcessorsProcessorVersionsEvaluationsService{s: s} 258 return rs 259 } 260 261 type ProjectsLocationsProcessorsProcessorVersionsEvaluationsService struct { 262 s *Service 263 } 264 265 func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { 266 rs := &ProjectsOperationsService{s: s} 267 return rs 268 } 269 270 type ProjectsOperationsService struct { 271 s *Service 272 } 273 274 // GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata: Metadata of the 275 // auto-labeling documents operation. 276 type GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata struct { 277 // CommonMetadata: The basic metadata of the long-running operation. 278 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 279 // IndividualAutoLabelStatuses: The list of individual auto-labeling statuses 280 // of the dataset documents. 281 IndividualAutoLabelStatuses []*GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadataIndividualAutoLabelStatus `json:"individualAutoLabelStatuses,omitempty"` 282 // TotalDocumentCount: Total number of the auto-labeling documents. 283 TotalDocumentCount int64 `json:"totalDocumentCount,omitempty"` 284 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 285 // unconditionally include in API requests. By default, fields with empty or 286 // default values are omitted from API requests. See 287 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 288 // details. 289 ForceSendFields []string `json:"-"` 290 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 291 // API requests with the JSON null value. By default, fields with empty values 292 // are omitted from API requests. See 293 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 294 NullFields []string `json:"-"` 295 } 296 297 func (s *GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata) MarshalJSON() ([]byte, error) { 298 type NoMethod GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata 299 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 300 } 301 302 // GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadataIndividualAutoLabelSt 303 // atus: The status of individual documents in the auto-labeling process. 304 type GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadataIndividualAutoLabelStatus struct { 305 // DocumentId: The document id of the auto-labeled document. This will replace 306 // the gcs_uri. 307 DocumentId *GoogleCloudDocumentaiUiv1beta3DocumentId `json:"documentId,omitempty"` 308 // Status: The status of the document auto-labeling. 309 Status *GoogleRpcStatus `json:"status,omitempty"` 310 // ForceSendFields is a list of field names (e.g. "DocumentId") to 311 // unconditionally include in API requests. By default, fields with empty or 312 // default values are omitted from API requests. See 313 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 314 // details. 315 ForceSendFields []string `json:"-"` 316 // NullFields is a list of field names (e.g. "DocumentId") to include in API 317 // requests with the JSON null value. By default, fields with empty values are 318 // omitted from API requests. See 319 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 320 NullFields []string `json:"-"` 321 } 322 323 func (s *GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadataIndividualAutoLabelStatus) MarshalJSON() ([]byte, error) { 324 type NoMethod GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadataIndividualAutoLabelStatus 325 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 326 } 327 328 // GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsResponse: The response proto 329 // of AutoLabelDocuments method. 330 type GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsResponse struct { 331 } 332 333 type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata struct { 334 // CommonMetadata: The basic metadata of the long-running operation. 335 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 336 // ErrorDocumentCount: Total number of documents that failed to be deleted in 337 // storage. 338 ErrorDocumentCount int64 `json:"errorDocumentCount,omitempty"` 339 // IndividualBatchDeleteStatuses: The list of response details of each 340 // document. 341 IndividualBatchDeleteStatuses []*GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus `json:"individualBatchDeleteStatuses,omitempty"` 342 // TotalDocumentCount: Total number of documents deleting from dataset. 343 TotalDocumentCount int64 `json:"totalDocumentCount,omitempty"` 344 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 345 // unconditionally include in API requests. By default, fields with empty or 346 // default values are omitted from API requests. See 347 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 348 // details. 349 ForceSendFields []string `json:"-"` 350 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 351 // API requests with the JSON null value. By default, fields with empty values 352 // are omitted from API requests. See 353 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 354 NullFields []string `json:"-"` 355 } 356 357 func (s *GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata) MarshalJSON() ([]byte, error) { 358 type NoMethod GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata 359 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 360 } 361 362 // GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDele 363 // teStatus: The status of each individual document in the batch delete 364 // process. 365 type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus struct { 366 // DocumentId: The document id of the document. 367 DocumentId *GoogleCloudDocumentaiUiv1beta3DocumentId `json:"documentId,omitempty"` 368 // Status: The status of deleting the document in storage. 369 Status *GoogleRpcStatus `json:"status,omitempty"` 370 // ForceSendFields is a list of field names (e.g. "DocumentId") to 371 // unconditionally include in API requests. By default, fields with empty or 372 // default values are omitted from API requests. See 373 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 374 // details. 375 ForceSendFields []string `json:"-"` 376 // NullFields is a list of field names (e.g. "DocumentId") to include in API 377 // requests with the JSON null value. By default, fields with empty values are 378 // omitted from API requests. See 379 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 380 NullFields []string `json:"-"` 381 } 382 383 func (s *GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus) MarshalJSON() ([]byte, error) { 384 type NoMethod GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus 385 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 386 } 387 388 // GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsResponse: Response of the 389 // delete documents operation. 390 type GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsResponse struct { 391 } 392 393 type GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata struct { 394 // CommonMetadata: The basic metadata of the long-running operation. 395 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 396 // DestDatasetType: The destination dataset split type. 397 // 398 // Possible values: 399 // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not set. 400 // "DATASET_SPLIT_TRAIN" - Identifies the train documents. 401 // "DATASET_SPLIT_TEST" - Identifies the test documents. 402 // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. 403 DestDatasetType string `json:"destDatasetType,omitempty"` 404 // DestSplitType: The destination dataset split type. 405 // 406 // Possible values: 407 // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not set. 408 // "DATASET_SPLIT_TRAIN" - Identifies the train documents. 409 // "DATASET_SPLIT_TEST" - Identifies the test documents. 410 // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. 411 DestSplitType string `json:"destSplitType,omitempty"` 412 // IndividualBatchMoveStatuses: The list of response details of each document. 413 IndividualBatchMoveStatuses []*GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadataIndividualBatchMoveStatus `json:"individualBatchMoveStatuses,omitempty"` 414 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 415 // unconditionally include in API requests. By default, fields with empty or 416 // default values are omitted from API requests. See 417 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 418 // details. 419 ForceSendFields []string `json:"-"` 420 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 421 // API requests with the JSON null value. By default, fields with empty values 422 // are omitted from API requests. See 423 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 424 NullFields []string `json:"-"` 425 } 426 427 func (s *GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata) MarshalJSON() ([]byte, error) { 428 type NoMethod GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadata 429 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 430 } 431 432 // GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadataIndividualBatchMoveSt 433 // atus: The status of each individual document in the batch move process. 434 type GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadataIndividualBatchMoveStatus struct { 435 // DocumentId: The document id of the document. 436 DocumentId *GoogleCloudDocumentaiUiv1beta3DocumentId `json:"documentId,omitempty"` 437 // Status: The status of moving the document. 438 Status *GoogleRpcStatus `json:"status,omitempty"` 439 // ForceSendFields is a list of field names (e.g. "DocumentId") to 440 // unconditionally include in API requests. By default, fields with empty or 441 // default values are omitted from API requests. See 442 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 443 // details. 444 ForceSendFields []string `json:"-"` 445 // NullFields is a list of field names (e.g. "DocumentId") to include in API 446 // requests with the JSON null value. By default, fields with empty values are 447 // omitted from API requests. See 448 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 449 NullFields []string `json:"-"` 450 } 451 452 func (s *GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadataIndividualBatchMoveStatus) MarshalJSON() ([]byte, error) { 453 type NoMethod GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsMetadataIndividualBatchMoveStatus 454 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 455 } 456 457 // GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsResponse: Response of the 458 // batch move documents operation. 459 type GoogleCloudDocumentaiUiv1beta3BatchMoveDocumentsResponse struct { 460 } 461 462 type GoogleCloudDocumentaiUiv1beta3BatchUpdateDocumentsMetadata struct { 463 // CommonMetadata: The basic metadata of the long-running operation. 464 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 465 // IndividualBatchUpdateStatuses: The list of response details of each 466 // document. 467 IndividualBatchUpdateStatuses []*GoogleCloudDocumentaiUiv1beta3BatchUpdateDocumentsMetadataIndividualBatchUpdateStatus `json:"individualBatchUpdateStatuses,omitempty"` 468 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 469 // unconditionally include in API requests. By default, fields with empty or 470 // default values are omitted from API requests. See 471 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 472 // details. 473 ForceSendFields []string `json:"-"` 474 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 475 // API requests with the JSON null value. By default, fields with empty values 476 // are omitted from API requests. See 477 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 478 NullFields []string `json:"-"` 479 } 480 481 func (s *GoogleCloudDocumentaiUiv1beta3BatchUpdateDocumentsMetadata) MarshalJSON() ([]byte, error) { 482 type NoMethod GoogleCloudDocumentaiUiv1beta3BatchUpdateDocumentsMetadata 483 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 484 } 485 486 // GoogleCloudDocumentaiUiv1beta3BatchUpdateDocumentsMetadataIndividualBatchUpda 487 // teStatus: The status of each individual document in the batch update 488 // process. 489 type GoogleCloudDocumentaiUiv1beta3BatchUpdateDocumentsMetadataIndividualBatchUpdateStatus struct { 490 // DocumentId: The document id of the document. 491 DocumentId *GoogleCloudDocumentaiUiv1beta3DocumentId `json:"documentId,omitempty"` 492 // Status: The status of updating the document in storage. 493 Status *GoogleRpcStatus `json:"status,omitempty"` 494 // ForceSendFields is a list of field names (e.g. "DocumentId") to 495 // unconditionally include in API requests. By default, fields with empty or 496 // default values are omitted from API requests. See 497 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 498 // details. 499 ForceSendFields []string `json:"-"` 500 // NullFields is a list of field names (e.g. "DocumentId") to include in API 501 // requests with the JSON null value. By default, fields with empty values are 502 // omitted from API requests. See 503 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 504 NullFields []string `json:"-"` 505 } 506 507 func (s *GoogleCloudDocumentaiUiv1beta3BatchUpdateDocumentsMetadataIndividualBatchUpdateStatus) MarshalJSON() ([]byte, error) { 508 type NoMethod GoogleCloudDocumentaiUiv1beta3BatchUpdateDocumentsMetadataIndividualBatchUpdateStatus 509 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 510 } 511 512 // GoogleCloudDocumentaiUiv1beta3BatchUpdateDocumentsResponse: Response of the 513 // batch update documents operation. 514 type GoogleCloudDocumentaiUiv1beta3BatchUpdateDocumentsResponse struct { 515 } 516 517 // GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata: The common metadata 518 // for long running operations. 519 type GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata struct { 520 // CreateTime: The creation time of the operation. 521 CreateTime string `json:"createTime,omitempty"` 522 // Resource: A related resource to this operation. 523 Resource string `json:"resource,omitempty"` 524 // State: The state of the operation. 525 // 526 // Possible values: 527 // "STATE_UNSPECIFIED" - Unspecified state. 528 // "RUNNING" - Operation is still running. 529 // "CANCELLING" - Operation is being cancelled. 530 // "SUCCEEDED" - Operation succeeded. 531 // "FAILED" - Operation failed. 532 // "CANCELLED" - Operation is cancelled. 533 State string `json:"state,omitempty"` 534 // StateMessage: A message providing more details about the current state of 535 // processing. 536 StateMessage string `json:"stateMessage,omitempty"` 537 // UpdateTime: The last update time of the operation. 538 UpdateTime string `json:"updateTime,omitempty"` 539 // ForceSendFields is a list of field names (e.g. "CreateTime") to 540 // unconditionally include in API requests. By default, fields with empty or 541 // default values are omitted from API requests. See 542 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 543 // details. 544 ForceSendFields []string `json:"-"` 545 // NullFields is a list of field names (e.g. "CreateTime") to include in API 546 // requests with the JSON null value. By default, fields with empty values are 547 // omitted from API requests. See 548 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 549 NullFields []string `json:"-"` 550 } 551 552 func (s *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata) MarshalJSON() ([]byte, error) { 553 type NoMethod GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata 554 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 555 } 556 557 // GoogleCloudDocumentaiUiv1beta3CreateLabelerPoolOperationMetadata: The 558 // long-running operation metadata for the CreateLabelerPool method. 559 type GoogleCloudDocumentaiUiv1beta3CreateLabelerPoolOperationMetadata struct { 560 // CommonMetadata: The basic metadata of the long-running operation. 561 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 562 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 563 // unconditionally include in API requests. By default, fields with empty or 564 // default values are omitted from API requests. See 565 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 566 // details. 567 ForceSendFields []string `json:"-"` 568 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 569 // API requests with the JSON null value. By default, fields with empty values 570 // are omitted from API requests. See 571 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 572 NullFields []string `json:"-"` 573 } 574 575 func (s *GoogleCloudDocumentaiUiv1beta3CreateLabelerPoolOperationMetadata) MarshalJSON() ([]byte, error) { 576 type NoMethod GoogleCloudDocumentaiUiv1beta3CreateLabelerPoolOperationMetadata 577 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 578 } 579 580 // GoogleCloudDocumentaiUiv1beta3DeleteLabelerPoolOperationMetadata: The 581 // long-running operation metadata for DeleteLabelerPool. 582 type GoogleCloudDocumentaiUiv1beta3DeleteLabelerPoolOperationMetadata struct { 583 // CommonMetadata: The basic metadata of the long-running operation. 584 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 585 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 586 // unconditionally include in API requests. By default, fields with empty or 587 // default values are omitted from API requests. See 588 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 589 // details. 590 ForceSendFields []string `json:"-"` 591 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 592 // API requests with the JSON null value. By default, fields with empty values 593 // are omitted from API requests. See 594 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 595 NullFields []string `json:"-"` 596 } 597 598 func (s *GoogleCloudDocumentaiUiv1beta3DeleteLabelerPoolOperationMetadata) MarshalJSON() ([]byte, error) { 599 type NoMethod GoogleCloudDocumentaiUiv1beta3DeleteLabelerPoolOperationMetadata 600 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 601 } 602 603 // GoogleCloudDocumentaiUiv1beta3DeleteProcessorMetadata: The long-running 604 // operation metadata for the DeleteProcessor method. 605 type GoogleCloudDocumentaiUiv1beta3DeleteProcessorMetadata struct { 606 // CommonMetadata: The basic metadata of the long-running operation. 607 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 608 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 609 // unconditionally include in API requests. By default, fields with empty or 610 // default values are omitted from API requests. See 611 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 612 // details. 613 ForceSendFields []string `json:"-"` 614 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 615 // API requests with the JSON null value. By default, fields with empty values 616 // are omitted from API requests. See 617 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 618 NullFields []string `json:"-"` 619 } 620 621 func (s *GoogleCloudDocumentaiUiv1beta3DeleteProcessorMetadata) MarshalJSON() ([]byte, error) { 622 type NoMethod GoogleCloudDocumentaiUiv1beta3DeleteProcessorMetadata 623 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 624 } 625 626 // GoogleCloudDocumentaiUiv1beta3DeleteProcessorVersionMetadata: The 627 // long-running operation metadata for the DeleteProcessorVersion method. 628 type GoogleCloudDocumentaiUiv1beta3DeleteProcessorVersionMetadata struct { 629 // CommonMetadata: The basic metadata of the long-running operation. 630 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 631 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 632 // unconditionally include in API requests. By default, fields with empty or 633 // default values are omitted from API requests. See 634 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 635 // details. 636 ForceSendFields []string `json:"-"` 637 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 638 // API requests with the JSON null value. By default, fields with empty values 639 // are omitted from API requests. See 640 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 641 NullFields []string `json:"-"` 642 } 643 644 func (s *GoogleCloudDocumentaiUiv1beta3DeleteProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 645 type NoMethod GoogleCloudDocumentaiUiv1beta3DeleteProcessorVersionMetadata 646 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 647 } 648 649 // GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionMetadata: The 650 // long-running operation metadata for the DeployProcessorVersion method. 651 type GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionMetadata struct { 652 // CommonMetadata: The basic metadata of the long-running operation. 653 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 654 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 655 // unconditionally include in API requests. By default, fields with empty or 656 // default values are omitted from API requests. See 657 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 658 // details. 659 ForceSendFields []string `json:"-"` 660 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 661 // API requests with the JSON null value. By default, fields with empty values 662 // are omitted from API requests. See 663 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 664 NullFields []string `json:"-"` 665 } 666 667 func (s *GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 668 type NoMethod GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionMetadata 669 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 670 } 671 672 // GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionResponse: Response 673 // message for the DeployProcessorVersion method. 674 type GoogleCloudDocumentaiUiv1beta3DeployProcessorVersionResponse struct { 675 } 676 677 // GoogleCloudDocumentaiUiv1beta3DisableProcessorMetadata: The long-running 678 // operation metadata for the DisableProcessor method. 679 type GoogleCloudDocumentaiUiv1beta3DisableProcessorMetadata struct { 680 // CommonMetadata: The basic metadata of the long-running operation. 681 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 682 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 683 // unconditionally include in API requests. By default, fields with empty or 684 // default values are omitted from API requests. See 685 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 686 // details. 687 ForceSendFields []string `json:"-"` 688 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 689 // API requests with the JSON null value. By default, fields with empty values 690 // are omitted from API requests. See 691 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 692 NullFields []string `json:"-"` 693 } 694 695 func (s *GoogleCloudDocumentaiUiv1beta3DisableProcessorMetadata) MarshalJSON() ([]byte, error) { 696 type NoMethod GoogleCloudDocumentaiUiv1beta3DisableProcessorMetadata 697 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 698 } 699 700 // GoogleCloudDocumentaiUiv1beta3DisableProcessorResponse: Response message for 701 // the DisableProcessor method. Intentionally empty proto for adding fields in 702 // future. 703 type GoogleCloudDocumentaiUiv1beta3DisableProcessorResponse struct { 704 } 705 706 // GoogleCloudDocumentaiUiv1beta3DocumentId: Document Identifier. 707 type GoogleCloudDocumentaiUiv1beta3DocumentId struct { 708 // GcsManagedDocId: A document id within user-managed Cloud Storage. 709 GcsManagedDocId *GoogleCloudDocumentaiUiv1beta3DocumentIdGCSManagedDocumentId `json:"gcsManagedDocId,omitempty"` 710 // RevisionRef: Points to a specific revision of the document if set. 711 RevisionRef *GoogleCloudDocumentaiUiv1beta3RevisionRef `json:"revisionRef,omitempty"` 712 // UnmanagedDocId: A document id within unmanaged dataset. 713 UnmanagedDocId *GoogleCloudDocumentaiUiv1beta3DocumentIdUnmanagedDocumentId `json:"unmanagedDocId,omitempty"` 714 // ForceSendFields is a list of field names (e.g. "GcsManagedDocId") to 715 // unconditionally include in API requests. By default, fields with empty or 716 // default values are omitted from API requests. See 717 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 718 // details. 719 ForceSendFields []string `json:"-"` 720 // NullFields is a list of field names (e.g. "GcsManagedDocId") to include in 721 // API requests with the JSON null value. By default, fields with empty values 722 // are omitted from API requests. See 723 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 724 NullFields []string `json:"-"` 725 } 726 727 func (s *GoogleCloudDocumentaiUiv1beta3DocumentId) MarshalJSON() ([]byte, error) { 728 type NoMethod GoogleCloudDocumentaiUiv1beta3DocumentId 729 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 730 } 731 732 // GoogleCloudDocumentaiUiv1beta3DocumentIdGCSManagedDocumentId: Identifies a 733 // document uniquely within the scope of a dataset in the user-managed Cloud 734 // Storage option. 735 type GoogleCloudDocumentaiUiv1beta3DocumentIdGCSManagedDocumentId struct { 736 // CwDocId: Id of the document (indexed) managed by Content Warehouse. 737 CwDocId string `json:"cwDocId,omitempty"` 738 // GcsUri: Required. The Cloud Storage URI where the actual document is stored. 739 GcsUri string `json:"gcsUri,omitempty"` 740 // ForceSendFields is a list of field names (e.g. "CwDocId") to unconditionally 741 // include in API requests. By default, fields with empty or default values are 742 // omitted from API requests. See 743 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 744 // details. 745 ForceSendFields []string `json:"-"` 746 // NullFields is a list of field names (e.g. "CwDocId") to include in API 747 // requests with the JSON null value. By default, fields with empty values are 748 // omitted from API requests. See 749 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 750 NullFields []string `json:"-"` 751 } 752 753 func (s *GoogleCloudDocumentaiUiv1beta3DocumentIdGCSManagedDocumentId) MarshalJSON() ([]byte, error) { 754 type NoMethod GoogleCloudDocumentaiUiv1beta3DocumentIdGCSManagedDocumentId 755 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 756 } 757 758 // GoogleCloudDocumentaiUiv1beta3DocumentIdUnmanagedDocumentId: Identifies a 759 // document uniquely within the scope of a dataset in unmanaged option. 760 type GoogleCloudDocumentaiUiv1beta3DocumentIdUnmanagedDocumentId struct { 761 // DocId: Required. The id of the document. 762 DocId string `json:"docId,omitempty"` 763 // ForceSendFields is a list of field names (e.g. "DocId") to unconditionally 764 // include in API requests. By default, fields with empty or default values are 765 // omitted from API requests. See 766 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 767 // details. 768 ForceSendFields []string `json:"-"` 769 // NullFields is a list of field names (e.g. "DocId") to include in API 770 // requests with the JSON null value. By default, fields with empty values are 771 // omitted from API requests. See 772 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 773 NullFields []string `json:"-"` 774 } 775 776 func (s *GoogleCloudDocumentaiUiv1beta3DocumentIdUnmanagedDocumentId) MarshalJSON() ([]byte, error) { 777 type NoMethod GoogleCloudDocumentaiUiv1beta3DocumentIdUnmanagedDocumentId 778 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 779 } 780 781 // GoogleCloudDocumentaiUiv1beta3EnableProcessorMetadata: The long-running 782 // operation metadata for the EnableProcessor method. 783 type GoogleCloudDocumentaiUiv1beta3EnableProcessorMetadata struct { 784 // CommonMetadata: The basic metadata of the long-running operation. 785 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 786 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 787 // unconditionally include in API requests. By default, fields with empty or 788 // default values are omitted from API requests. See 789 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 790 // details. 791 ForceSendFields []string `json:"-"` 792 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 793 // API requests with the JSON null value. By default, fields with empty values 794 // are omitted from API requests. See 795 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 796 NullFields []string `json:"-"` 797 } 798 799 func (s *GoogleCloudDocumentaiUiv1beta3EnableProcessorMetadata) MarshalJSON() ([]byte, error) { 800 type NoMethod GoogleCloudDocumentaiUiv1beta3EnableProcessorMetadata 801 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 802 } 803 804 // GoogleCloudDocumentaiUiv1beta3EnableProcessorResponse: Response message for 805 // the EnableProcessor method. Intentionally empty proto for adding fields in 806 // future. 807 type GoogleCloudDocumentaiUiv1beta3EnableProcessorResponse struct { 808 } 809 810 // GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionMetadata: Metadata of 811 // the EvaluateProcessorVersion method. 812 type GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionMetadata struct { 813 // CommonMetadata: The basic metadata of the long-running operation. 814 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 815 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 816 // unconditionally include in API requests. By default, fields with empty or 817 // default values are omitted from API requests. See 818 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 819 // details. 820 ForceSendFields []string `json:"-"` 821 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 822 // API requests with the JSON null value. By default, fields with empty values 823 // are omitted from API requests. See 824 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 825 NullFields []string `json:"-"` 826 } 827 828 func (s *GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 829 type NoMethod GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionMetadata 830 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 831 } 832 833 // GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionResponse: Response of 834 // the EvaluateProcessorVersion method. 835 type GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionResponse struct { 836 // Evaluation: The resource name of the created evaluation. 837 Evaluation string `json:"evaluation,omitempty"` 838 // ForceSendFields is a list of field names (e.g. "Evaluation") to 839 // unconditionally include in API requests. By default, fields with empty or 840 // default values are omitted from API requests. See 841 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 842 // details. 843 ForceSendFields []string `json:"-"` 844 // NullFields is a list of field names (e.g. "Evaluation") to include in API 845 // requests with the JSON null value. By default, fields with empty values are 846 // omitted from API requests. See 847 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 848 NullFields []string `json:"-"` 849 } 850 851 func (s *GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionResponse) MarshalJSON() ([]byte, error) { 852 type NoMethod GoogleCloudDocumentaiUiv1beta3EvaluateProcessorVersionResponse 853 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 854 } 855 856 // GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadata: Metadata of the batch 857 // export documents operation. 858 type GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadata struct { 859 // CommonMetadata: The basic metadata of the long-running operation. 860 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 861 // IndividualExportStatuses: The list of response details of each document. 862 IndividualExportStatuses []*GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataIndividualExportStatus `json:"individualExportStatuses,omitempty"` 863 // SplitExportStats: The list of statistics for each dataset split type. 864 SplitExportStats []*GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataSplitExportStat `json:"splitExportStats,omitempty"` 865 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 866 // unconditionally include in API requests. By default, fields with empty or 867 // default values are omitted from API requests. See 868 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 869 // details. 870 ForceSendFields []string `json:"-"` 871 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 872 // API requests with the JSON null value. By default, fields with empty values 873 // are omitted from API requests. See 874 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 875 NullFields []string `json:"-"` 876 } 877 878 func (s *GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadata) MarshalJSON() ([]byte, error) { 879 type NoMethod GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadata 880 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 881 } 882 883 // GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataIndividualExportStatus: 884 // The status of each individual document in the export process. 885 type GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataIndividualExportStatus struct { 886 // DocumentId: The path to source docproto of the document. 887 DocumentId *GoogleCloudDocumentaiUiv1beta3DocumentId `json:"documentId,omitempty"` 888 // OutputGcsDestination: The output_gcs_destination of the exported document if 889 // it was successful, otherwise empty. 890 OutputGcsDestination string `json:"outputGcsDestination,omitempty"` 891 // Status: The status of the exporting of the document. 892 Status *GoogleRpcStatus `json:"status,omitempty"` 893 // ForceSendFields is a list of field names (e.g. "DocumentId") to 894 // unconditionally include in API requests. By default, fields with empty or 895 // default values are omitted from API requests. See 896 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 897 // details. 898 ForceSendFields []string `json:"-"` 899 // NullFields is a list of field names (e.g. "DocumentId") to include in API 900 // requests with the JSON null value. By default, fields with empty values are 901 // omitted from API requests. See 902 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 903 NullFields []string `json:"-"` 904 } 905 906 func (s *GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataIndividualExportStatus) MarshalJSON() ([]byte, error) { 907 type NoMethod GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataIndividualExportStatus 908 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 909 } 910 911 // GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataSplitExportStat: The 912 // statistic representing a dataset split type for this export. 913 type GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataSplitExportStat struct { 914 // SplitType: The dataset split type. 915 // 916 // Possible values: 917 // "DATASET_SPLIT_TYPE_UNSPECIFIED" - Default value if the enum is not set. 918 // "DATASET_SPLIT_TRAIN" - Identifies the train documents. 919 // "DATASET_SPLIT_TEST" - Identifies the test documents. 920 // "DATASET_SPLIT_UNASSIGNED" - Identifies the unassigned documents. 921 SplitType string `json:"splitType,omitempty"` 922 // TotalDocumentCount: Total number of documents with the given dataset split 923 // type to be exported. 924 TotalDocumentCount int64 `json:"totalDocumentCount,omitempty"` 925 // ForceSendFields is a list of field names (e.g. "SplitType") to 926 // unconditionally include in API requests. By default, fields with empty or 927 // default values are omitted from API requests. See 928 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 929 // details. 930 ForceSendFields []string `json:"-"` 931 // NullFields is a list of field names (e.g. "SplitType") to include in API 932 // requests with the JSON null value. By default, fields with empty values are 933 // omitted from API requests. See 934 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 935 NullFields []string `json:"-"` 936 } 937 938 func (s *GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataSplitExportStat) MarshalJSON() ([]byte, error) { 939 type NoMethod GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataSplitExportStat 940 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 941 } 942 943 // GoogleCloudDocumentaiUiv1beta3ExportDocumentsResponse: The response proto of 944 // ExportDocuments method. 945 type GoogleCloudDocumentaiUiv1beta3ExportDocumentsResponse struct { 946 } 947 948 // GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionMetadata: Metadata 949 // message associated with the ExportProcessorVersion operation. 950 type GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionMetadata struct { 951 // CommonMetadata: The common metadata about the operation. 952 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 953 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 954 // unconditionally include in API requests. By default, fields with empty or 955 // default values are omitted from API requests. See 956 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 957 // details. 958 ForceSendFields []string `json:"-"` 959 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 960 // API requests with the JSON null value. By default, fields with empty values 961 // are omitted from API requests. See 962 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 963 NullFields []string `json:"-"` 964 } 965 966 func (s *GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 967 type NoMethod GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionMetadata 968 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 969 } 970 971 // GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionResponse: Response 972 // message associated with the ExportProcessorVersion operation. 973 type GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionResponse struct { 974 // GcsUri: The Cloud Storage URI containing the output artifacts. 975 GcsUri string `json:"gcsUri,omitempty"` 976 // ForceSendFields is a list of field names (e.g. "GcsUri") to unconditionally 977 // include in API requests. By default, fields with empty or default values are 978 // omitted from API requests. See 979 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 980 // details. 981 ForceSendFields []string `json:"-"` 982 // NullFields is a list of field names (e.g. "GcsUri") to include in API 983 // requests with the JSON null value. By default, fields with empty values are 984 // omitted from API requests. See 985 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 986 NullFields []string `json:"-"` 987 } 988 989 func (s *GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionResponse) MarshalJSON() ([]byte, error) { 990 type NoMethod GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionResponse 991 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 992 } 993 994 // GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata: Metadata of the 995 // import document operation. 996 type GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata struct { 997 // CommonMetadata: The basic metadata of the long-running operation. 998 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 999 // ImportConfigValidationResults: Validation statuses of the batch documents 1000 // import config. 1001 ImportConfigValidationResults []*GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult `json:"importConfigValidationResults,omitempty"` 1002 // IndividualImportStatuses: The list of response details of each document. 1003 IndividualImportStatuses []*GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataIndividualImportStatus `json:"individualImportStatuses,omitempty"` 1004 // TotalDocumentCount: Total number of the documents that are qualified for 1005 // importing. 1006 TotalDocumentCount int64 `json:"totalDocumentCount,omitempty"` 1007 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 1008 // unconditionally include in API requests. By default, fields with empty or 1009 // default values are omitted from API requests. See 1010 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1011 // details. 1012 ForceSendFields []string `json:"-"` 1013 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 1014 // API requests with the JSON null value. By default, fields with empty values 1015 // are omitted from API requests. See 1016 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1017 NullFields []string `json:"-"` 1018 } 1019 1020 func (s *GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata) MarshalJSON() ([]byte, error) { 1021 type NoMethod GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata 1022 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1023 } 1024 1025 // GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationRe 1026 // sult: The validation status of each import config. Status is set to an error 1027 // if there are no documents to import in the `import_config`, or `OK` if the 1028 // operation will try to proceed with at least one document. 1029 type GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult struct { 1030 // InputGcsSource: The source Cloud Storage URI specified in the import config. 1031 InputGcsSource string `json:"inputGcsSource,omitempty"` 1032 // Status: The validation status of import config. 1033 Status *GoogleRpcStatus `json:"status,omitempty"` 1034 // ForceSendFields is a list of field names (e.g. "InputGcsSource") to 1035 // unconditionally include in API requests. By default, fields with empty or 1036 // default values are omitted from API requests. See 1037 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1038 // details. 1039 ForceSendFields []string `json:"-"` 1040 // NullFields is a list of field names (e.g. "InputGcsSource") to include in 1041 // API requests with the JSON null value. By default, fields with empty values 1042 // are omitted from API requests. See 1043 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1044 NullFields []string `json:"-"` 1045 } 1046 1047 func (s *GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult) MarshalJSON() ([]byte, error) { 1048 type NoMethod GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult 1049 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1050 } 1051 1052 // GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataIndividualImportStatus: 1053 // The status of each individual document in the import process. 1054 type GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataIndividualImportStatus struct { 1055 // InputGcsSource: The source Cloud Storage URI of the document. 1056 InputGcsSource string `json:"inputGcsSource,omitempty"` 1057 // OutputDocumentId: The document id of imported document if it was successful, 1058 // otherwise empty. 1059 OutputDocumentId *GoogleCloudDocumentaiUiv1beta3DocumentId `json:"outputDocumentId,omitempty"` 1060 // OutputGcsDestination: The output_gcs_destination of the processed document 1061 // if it was successful, otherwise empty. 1062 OutputGcsDestination string `json:"outputGcsDestination,omitempty"` 1063 // Status: The status of the importing of the document. 1064 Status *GoogleRpcStatus `json:"status,omitempty"` 1065 // ForceSendFields is a list of field names (e.g. "InputGcsSource") to 1066 // unconditionally include in API requests. By default, fields with empty or 1067 // default values are omitted from API requests. See 1068 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1069 // details. 1070 ForceSendFields []string `json:"-"` 1071 // NullFields is a list of field names (e.g. "InputGcsSource") to include in 1072 // API requests with the JSON null value. By default, fields with empty values 1073 // are omitted from API requests. See 1074 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1075 NullFields []string `json:"-"` 1076 } 1077 1078 func (s *GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataIndividualImportStatus) MarshalJSON() ([]byte, error) { 1079 type NoMethod GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataIndividualImportStatus 1080 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1081 } 1082 1083 // GoogleCloudDocumentaiUiv1beta3ImportDocumentsResponse: Response of the 1084 // import document operation. 1085 type GoogleCloudDocumentaiUiv1beta3ImportDocumentsResponse struct { 1086 } 1087 1088 // GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionMetadata: The 1089 // long-running operation metadata for the ImportProcessorVersion method. 1090 type GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionMetadata struct { 1091 // CommonMetadata: The basic metadata for the long-running operation. 1092 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 1093 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 1094 // unconditionally include in API requests. By default, fields with empty or 1095 // default values are omitted from API requests. See 1096 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1097 // details. 1098 ForceSendFields []string `json:"-"` 1099 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 1100 // API requests with the JSON null value. By default, fields with empty values 1101 // are omitted from API requests. See 1102 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1103 NullFields []string `json:"-"` 1104 } 1105 1106 func (s *GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 1107 type NoMethod GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionMetadata 1108 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1109 } 1110 1111 // GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionResponse: The response 1112 // message for the ImportProcessorVersion method. 1113 type GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionResponse struct { 1114 // ProcessorVersion: The destination processor version name. 1115 ProcessorVersion string `json:"processorVersion,omitempty"` 1116 // ForceSendFields is a list of field names (e.g. "ProcessorVersion") to 1117 // unconditionally include in API requests. By default, fields with empty or 1118 // default values are omitted from API requests. See 1119 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1120 // details. 1121 ForceSendFields []string `json:"-"` 1122 // NullFields is a list of field names (e.g. "ProcessorVersion") to include in 1123 // API requests with the JSON null value. By default, fields with empty values 1124 // are omitted from API requests. See 1125 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1126 NullFields []string `json:"-"` 1127 } 1128 1129 func (s *GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionResponse) MarshalJSON() ([]byte, error) { 1130 type NoMethod GoogleCloudDocumentaiUiv1beta3ImportProcessorVersionResponse 1131 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1132 } 1133 1134 // GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata: The metadata proto of 1135 // `ResyncDataset` method. 1136 type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata struct { 1137 // CommonMetadata: The basic metadata of the long-running operation. 1138 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 1139 // DatasetResyncStatuses: The list of dataset resync statuses. Not checked when 1140 // ResyncDatasetRequest.dataset_documents is specified. 1141 DatasetResyncStatuses []*GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataDatasetResyncStatus `json:"datasetResyncStatuses,omitempty"` 1142 // IndividualDocumentResyncStatuses: The list of document resync statuses. The 1143 // same document could have multiple `individual_document_resync_statuses` if 1144 // it has multiple inconsistencies. 1145 IndividualDocumentResyncStatuses []*GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus `json:"individualDocumentResyncStatuses,omitempty"` 1146 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 1147 // unconditionally include in API requests. By default, fields with empty or 1148 // default values are omitted from API requests. See 1149 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1150 // details. 1151 ForceSendFields []string `json:"-"` 1152 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 1153 // API requests with the JSON null value. By default, fields with empty values 1154 // are omitted from API requests. See 1155 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1156 NullFields []string `json:"-"` 1157 } 1158 1159 func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata) MarshalJSON() ([]byte, error) { 1160 type NoMethod GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata 1161 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1162 } 1163 1164 // GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataDatasetResyncStatus: 1165 // Resync status against inconsistency types on the dataset level. 1166 type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataDatasetResyncStatus struct { 1167 // DatasetInconsistencyType: The type of the inconsistency of the dataset. 1168 // 1169 // Possible values: 1170 // "DATASET_INCONSISTENCY_TYPE_UNSPECIFIED" - Default value. 1171 // "DATASET_INCONSISTENCY_TYPE_NO_STORAGE_MARKER" - The marker file under the 1172 // dataset folder is not found. 1173 DatasetInconsistencyType string `json:"datasetInconsistencyType,omitempty"` 1174 // Status: The status of resyncing the dataset with regards to the detected 1175 // inconsistency. Empty if ResyncDatasetRequest.validate_only is `true`. 1176 Status *GoogleRpcStatus `json:"status,omitempty"` 1177 // ForceSendFields is a list of field names (e.g. "DatasetInconsistencyType") 1178 // to unconditionally include in API requests. By default, fields with empty or 1179 // default values are omitted from API requests. See 1180 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1181 // details. 1182 ForceSendFields []string `json:"-"` 1183 // NullFields is a list of field names (e.g. "DatasetInconsistencyType") to 1184 // include in API requests with the JSON null value. By default, fields with 1185 // empty values are omitted from API requests. See 1186 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1187 NullFields []string `json:"-"` 1188 } 1189 1190 func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataDatasetResyncStatus) MarshalJSON() ([]byte, error) { 1191 type NoMethod GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataDatasetResyncStatus 1192 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1193 } 1194 1195 // GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncSt 1196 // atus: Resync status for each document per inconsistency type. 1197 type GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus struct { 1198 // DocumentId: The document identifier. 1199 DocumentId *GoogleCloudDocumentaiUiv1beta3DocumentId `json:"documentId,omitempty"` 1200 // DocumentInconsistencyType: The type of document inconsistency. 1201 // 1202 // Possible values: 1203 // "DOCUMENT_INCONSISTENCY_TYPE_UNSPECIFIED" - Default value. 1204 // "DOCUMENT_INCONSISTENCY_TYPE_INVALID_DOCPROTO" - The document proto is 1205 // invalid. 1206 // "DOCUMENT_INCONSISTENCY_TYPE_MISMATCHED_METADATA" - Indexed docproto 1207 // metadata is mismatched. 1208 // "DOCUMENT_INCONSISTENCY_TYPE_NO_PAGE_IMAGE" - The page image or thumbnails 1209 // are missing. 1210 DocumentInconsistencyType string `json:"documentInconsistencyType,omitempty"` 1211 // Status: The status of resyncing the document with regards to the detected 1212 // inconsistency. Empty if ResyncDatasetRequest.validate_only is `true`. 1213 Status *GoogleRpcStatus `json:"status,omitempty"` 1214 // ForceSendFields is a list of field names (e.g. "DocumentId") to 1215 // unconditionally include in API requests. By default, fields with empty or 1216 // default values are omitted from API requests. See 1217 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1218 // details. 1219 ForceSendFields []string `json:"-"` 1220 // NullFields is a list of field names (e.g. "DocumentId") to include in API 1221 // requests with the JSON null value. By default, fields with empty values are 1222 // omitted from API requests. See 1223 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1224 NullFields []string `json:"-"` 1225 } 1226 1227 func (s *GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus) MarshalJSON() ([]byte, error) { 1228 type NoMethod GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus 1229 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1230 } 1231 1232 // GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse: The response proto of 1233 // ResyncDataset method. 1234 type GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse struct { 1235 } 1236 1237 // GoogleCloudDocumentaiUiv1beta3RevisionRef: The revision reference specifies 1238 // which revision on the document to read. 1239 type GoogleCloudDocumentaiUiv1beta3RevisionRef struct { 1240 // LatestProcessorVersion: Reads the revision generated by the processor 1241 // version. The format takes the full resource name of processor version. 1242 // `projects/{project}/locations/{location}/processors/{processor}/processorVers 1243 // ions/{processorVersion}` 1244 LatestProcessorVersion string `json:"latestProcessorVersion,omitempty"` 1245 // RevisionCase: Reads the revision by the predefined case. 1246 // 1247 // Possible values: 1248 // "REVISION_CASE_UNSPECIFIED" - Unspecified case, fall back to read the 1249 // `LATEST_HUMAN_REVIEW`. 1250 // "LATEST_HUMAN_REVIEW" - The latest revision made by a human. 1251 // "LATEST_TIMESTAMP" - The latest revision based on timestamp. 1252 // "BASE_OCR_REVISION" - The first (OCR) revision. 1253 RevisionCase string `json:"revisionCase,omitempty"` 1254 // RevisionId: Reads the revision given by the id. 1255 RevisionId string `json:"revisionId,omitempty"` 1256 // ForceSendFields is a list of field names (e.g. "LatestProcessorVersion") to 1257 // unconditionally include in API requests. By default, fields with empty or 1258 // default values are omitted from API requests. See 1259 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1260 // details. 1261 ForceSendFields []string `json:"-"` 1262 // NullFields is a list of field names (e.g. "LatestProcessorVersion") to 1263 // include in API requests with the JSON null value. By default, fields with 1264 // empty values are omitted from API requests. See 1265 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1266 NullFields []string `json:"-"` 1267 } 1268 1269 func (s *GoogleCloudDocumentaiUiv1beta3RevisionRef) MarshalJSON() ([]byte, error) { 1270 type NoMethod GoogleCloudDocumentaiUiv1beta3RevisionRef 1271 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1272 } 1273 1274 // GoogleCloudDocumentaiUiv1beta3SampleDocumentsMetadata: Metadata of the 1275 // sample documents operation. 1276 type GoogleCloudDocumentaiUiv1beta3SampleDocumentsMetadata struct { 1277 // CommonMetadata: The basic metadata of the long-running operation. 1278 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 1279 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 1280 // unconditionally include in API requests. By default, fields with empty or 1281 // default values are omitted from API requests. See 1282 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1283 // details. 1284 ForceSendFields []string `json:"-"` 1285 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 1286 // API requests with the JSON null value. By default, fields with empty values 1287 // are omitted from API requests. See 1288 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1289 NullFields []string `json:"-"` 1290 } 1291 1292 func (s *GoogleCloudDocumentaiUiv1beta3SampleDocumentsMetadata) MarshalJSON() ([]byte, error) { 1293 type NoMethod GoogleCloudDocumentaiUiv1beta3SampleDocumentsMetadata 1294 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1295 } 1296 1297 // GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponse: Response of the 1298 // sample documents operation. 1299 type GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponse struct { 1300 // SampleTestStatus: The status of sampling documents in test split. 1301 SampleTestStatus *GoogleRpcStatus `json:"sampleTestStatus,omitempty"` 1302 // SampleTrainingStatus: The status of sampling documents in training split. 1303 SampleTrainingStatus *GoogleRpcStatus `json:"sampleTrainingStatus,omitempty"` 1304 // SelectedDocuments: The result of the sampling process. 1305 SelectedDocuments []*GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponseSelectedDocument `json:"selectedDocuments,omitempty"` 1306 // ForceSendFields is a list of field names (e.g. "SampleTestStatus") to 1307 // unconditionally include in API requests. By default, fields with empty or 1308 // default values are omitted from API requests. See 1309 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1310 // details. 1311 ForceSendFields []string `json:"-"` 1312 // NullFields is a list of field names (e.g. "SampleTestStatus") to include in 1313 // API requests with the JSON null value. By default, fields with empty values 1314 // are omitted from API requests. See 1315 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1316 NullFields []string `json:"-"` 1317 } 1318 1319 func (s *GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponse) MarshalJSON() ([]byte, error) { 1320 type NoMethod GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponse 1321 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1322 } 1323 1324 type GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponseSelectedDocument struct { 1325 // DocumentId: An internal identifier for document. 1326 DocumentId string `json:"documentId,omitempty"` 1327 // ForceSendFields is a list of field names (e.g. "DocumentId") to 1328 // unconditionally include in API requests. By default, fields with empty or 1329 // default values are omitted from API requests. See 1330 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1331 // details. 1332 ForceSendFields []string `json:"-"` 1333 // NullFields is a list of field names (e.g. "DocumentId") to include in API 1334 // requests with the JSON null value. By default, fields with empty values are 1335 // omitted from API requests. See 1336 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1337 NullFields []string `json:"-"` 1338 } 1339 1340 func (s *GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponseSelectedDocument) MarshalJSON() ([]byte, error) { 1341 type NoMethod GoogleCloudDocumentaiUiv1beta3SampleDocumentsResponseSelectedDocument 1342 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1343 } 1344 1345 // GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata: The 1346 // long-running operation metadata for the SetDefaultProcessorVersion method. 1347 type GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata struct { 1348 // CommonMetadata: The basic metadata of the long-running operation. 1349 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 1350 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 1351 // unconditionally include in API requests. By default, fields with empty or 1352 // default values are omitted from API requests. See 1353 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1354 // details. 1355 ForceSendFields []string `json:"-"` 1356 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 1357 // API requests with the JSON null value. By default, fields with empty values 1358 // are omitted from API requests. See 1359 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1360 NullFields []string `json:"-"` 1361 } 1362 1363 func (s *GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 1364 type NoMethod GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionMetadata 1365 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1366 } 1367 1368 // GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionResponse: Response 1369 // message for the SetDefaultProcessorVersion method. 1370 type GoogleCloudDocumentaiUiv1beta3SetDefaultProcessorVersionResponse struct { 1371 } 1372 1373 // GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadata: The metadata 1374 // that represents a processor version being created. 1375 type GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadata struct { 1376 // CommonMetadata: The basic metadata of the long-running operation. 1377 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 1378 // TestDatasetValidation: The test dataset validation information. 1379 TestDatasetValidation *GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation `json:"testDatasetValidation,omitempty"` 1380 // TrainingDatasetValidation: The training dataset validation information. 1381 TrainingDatasetValidation *GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation `json:"trainingDatasetValidation,omitempty"` 1382 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 1383 // unconditionally include in API requests. By default, fields with empty or 1384 // default values are omitted from API requests. See 1385 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1386 // details. 1387 ForceSendFields []string `json:"-"` 1388 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 1389 // API requests with the JSON null value. By default, fields with empty values 1390 // are omitted from API requests. See 1391 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1392 NullFields []string `json:"-"` 1393 } 1394 1395 func (s *GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 1396 type NoMethod GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadata 1397 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1398 } 1399 1400 // GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation: 1401 // 1402 // The dataset validation information. This includes any and all errors with 1403 // 1404 // documents and the dataset. 1405 type GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation struct { 1406 // DatasetErrorCount: The total number of dataset errors. 1407 DatasetErrorCount int64 `json:"datasetErrorCount,omitempty"` 1408 // DatasetErrors: Error information for the dataset as a whole. A maximum of 10 1409 // dataset errors will be returned. A single dataset error is terminal for 1410 // training. 1411 DatasetErrors []*GoogleRpcStatus `json:"datasetErrors,omitempty"` 1412 // DocumentErrorCount: The total number of document errors. 1413 DocumentErrorCount int64 `json:"documentErrorCount,omitempty"` 1414 // DocumentErrors: Error information pertaining to specific documents. A 1415 // maximum of 10 document errors will be returned. Any document with errors 1416 // will not be used throughout training. 1417 DocumentErrors []*GoogleRpcStatus `json:"documentErrors,omitempty"` 1418 // ForceSendFields is a list of field names (e.g. "DatasetErrorCount") to 1419 // unconditionally include in API requests. By default, fields with empty or 1420 // default values are omitted from API requests. See 1421 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1422 // details. 1423 ForceSendFields []string `json:"-"` 1424 // NullFields is a list of field names (e.g. "DatasetErrorCount") to include in 1425 // API requests with the JSON null value. By default, fields with empty values 1426 // are omitted from API requests. See 1427 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1428 NullFields []string `json:"-"` 1429 } 1430 1431 func (s *GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation) MarshalJSON() ([]byte, error) { 1432 type NoMethod GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionMetadataDatasetValidation 1433 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1434 } 1435 1436 // GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionResponse: The response 1437 // for TrainProcessorVersion. 1438 type GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionResponse struct { 1439 // ProcessorVersion: The resource name of the processor version produced by 1440 // training. 1441 ProcessorVersion string `json:"processorVersion,omitempty"` 1442 // ForceSendFields is a list of field names (e.g. "ProcessorVersion") to 1443 // unconditionally include in API requests. By default, fields with empty or 1444 // default values are omitted from API requests. See 1445 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1446 // details. 1447 ForceSendFields []string `json:"-"` 1448 // NullFields is a list of field names (e.g. "ProcessorVersion") to include in 1449 // API requests with the JSON null value. By default, fields with empty values 1450 // are omitted from API requests. See 1451 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1452 NullFields []string `json:"-"` 1453 } 1454 1455 func (s *GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionResponse) MarshalJSON() ([]byte, error) { 1456 type NoMethod GoogleCloudDocumentaiUiv1beta3TrainProcessorVersionResponse 1457 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1458 } 1459 1460 // GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionMetadata: The 1461 // long-running operation metadata for the UndeployProcessorVersion method. 1462 type GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionMetadata struct { 1463 // CommonMetadata: The basic metadata of the long-running operation. 1464 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 1465 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 1466 // unconditionally include in API requests. By default, fields with empty or 1467 // default values are omitted from API requests. See 1468 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1469 // details. 1470 ForceSendFields []string `json:"-"` 1471 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 1472 // API requests with the JSON null value. By default, fields with empty values 1473 // are omitted from API requests. See 1474 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1475 NullFields []string `json:"-"` 1476 } 1477 1478 func (s *GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 1479 type NoMethod GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionMetadata 1480 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1481 } 1482 1483 // GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionResponse: Response 1484 // message for the UndeployProcessorVersion method. 1485 type GoogleCloudDocumentaiUiv1beta3UndeployProcessorVersionResponse struct { 1486 } 1487 1488 type GoogleCloudDocumentaiUiv1beta3UpdateDatasetOperationMetadata struct { 1489 // CommonMetadata: The basic metadata of the long-running operation. 1490 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 1491 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 1492 // unconditionally include in API requests. By default, fields with empty or 1493 // default values are omitted from API requests. See 1494 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1495 // details. 1496 ForceSendFields []string `json:"-"` 1497 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 1498 // API requests with the JSON null value. By default, fields with empty values 1499 // are omitted from API requests. See 1500 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1501 NullFields []string `json:"-"` 1502 } 1503 1504 func (s *GoogleCloudDocumentaiUiv1beta3UpdateDatasetOperationMetadata) MarshalJSON() ([]byte, error) { 1505 type NoMethod GoogleCloudDocumentaiUiv1beta3UpdateDatasetOperationMetadata 1506 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1507 } 1508 1509 // GoogleCloudDocumentaiUiv1beta3UpdateHumanReviewConfigMetadata: The 1510 // long-running operation metadata for updating the human review configuration. 1511 type GoogleCloudDocumentaiUiv1beta3UpdateHumanReviewConfigMetadata struct { 1512 // CommonMetadata: The basic metadata of the long-running operation. 1513 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 1514 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 1515 // unconditionally include in API requests. By default, fields with empty or 1516 // default values are omitted from API requests. See 1517 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1518 // details. 1519 ForceSendFields []string `json:"-"` 1520 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 1521 // API requests with the JSON null value. By default, fields with empty values 1522 // are omitted from API requests. See 1523 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1524 NullFields []string `json:"-"` 1525 } 1526 1527 func (s *GoogleCloudDocumentaiUiv1beta3UpdateHumanReviewConfigMetadata) MarshalJSON() ([]byte, error) { 1528 type NoMethod GoogleCloudDocumentaiUiv1beta3UpdateHumanReviewConfigMetadata 1529 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1530 } 1531 1532 // GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata: The 1533 // long-running operation metadata for UpdateLabelerPool. 1534 type GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata struct { 1535 // CommonMetadata: The basic metadata of the long-running operation. 1536 CommonMetadata *GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 1537 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 1538 // unconditionally include in API requests. By default, fields with empty or 1539 // default values are omitted from API requests. See 1540 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1541 // details. 1542 ForceSendFields []string `json:"-"` 1543 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 1544 // API requests with the JSON null value. By default, fields with empty values 1545 // are omitted from API requests. See 1546 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1547 NullFields []string `json:"-"` 1548 } 1549 1550 func (s *GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata) MarshalJSON() ([]byte, error) { 1551 type NoMethod GoogleCloudDocumentaiUiv1beta3UpdateLabelerPoolOperationMetadata 1552 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1553 } 1554 1555 // GoogleCloudDocumentaiV1Barcode: Encodes the detailed information of a 1556 // barcode. 1557 type GoogleCloudDocumentaiV1Barcode struct { 1558 // Format: Format of a barcode. The supported formats are: - `CODE_128`: Code 1559 // 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: 1560 // Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - 1561 // `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. 1562 // - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - 1563 // `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type. 1564 Format string `json:"format,omitempty"` 1565 // RawValue: Raw value encoded in the barcode. For example: 1566 // `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. 1567 RawValue string `json:"rawValue,omitempty"` 1568 // ValueFormat: Value format describes the format of the value that a barcode 1569 // encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - 1570 // `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. 1571 // - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: 1572 // URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - 1573 // `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license. 1574 ValueFormat string `json:"valueFormat,omitempty"` 1575 // ForceSendFields is a list of field names (e.g. "Format") to unconditionally 1576 // include in API requests. By default, fields with empty or default values are 1577 // omitted from API requests. See 1578 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1579 // details. 1580 ForceSendFields []string `json:"-"` 1581 // NullFields is a list of field names (e.g. "Format") to include in API 1582 // requests with the JSON null value. By default, fields with empty values are 1583 // omitted from API requests. See 1584 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1585 NullFields []string `json:"-"` 1586 } 1587 1588 func (s *GoogleCloudDocumentaiV1Barcode) MarshalJSON() ([]byte, error) { 1589 type NoMethod GoogleCloudDocumentaiV1Barcode 1590 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1591 } 1592 1593 // GoogleCloudDocumentaiV1BatchDocumentsInputConfig: The common config to 1594 // specify a set of documents used as input. 1595 type GoogleCloudDocumentaiV1BatchDocumentsInputConfig struct { 1596 // GcsDocuments: The set of documents individually specified on Cloud Storage. 1597 GcsDocuments *GoogleCloudDocumentaiV1GcsDocuments `json:"gcsDocuments,omitempty"` 1598 // GcsPrefix: The set of documents that match the specified Cloud Storage 1599 // `gcs_prefix`. 1600 GcsPrefix *GoogleCloudDocumentaiV1GcsPrefix `json:"gcsPrefix,omitempty"` 1601 // ForceSendFields is a list of field names (e.g. "GcsDocuments") to 1602 // unconditionally include in API requests. By default, fields with empty or 1603 // default values are omitted from API requests. See 1604 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1605 // details. 1606 ForceSendFields []string `json:"-"` 1607 // NullFields is a list of field names (e.g. "GcsDocuments") to include in API 1608 // requests with the JSON null value. By default, fields with empty values are 1609 // omitted from API requests. See 1610 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1611 NullFields []string `json:"-"` 1612 } 1613 1614 func (s *GoogleCloudDocumentaiV1BatchDocumentsInputConfig) MarshalJSON() ([]byte, error) { 1615 type NoMethod GoogleCloudDocumentaiV1BatchDocumentsInputConfig 1616 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1617 } 1618 1619 // GoogleCloudDocumentaiV1BatchProcessMetadata: The long-running operation 1620 // metadata for BatchProcessDocuments. 1621 type GoogleCloudDocumentaiV1BatchProcessMetadata struct { 1622 // CreateTime: The creation time of the operation. 1623 CreateTime string `json:"createTime,omitempty"` 1624 // IndividualProcessStatuses: The list of response details of each document. 1625 IndividualProcessStatuses []*GoogleCloudDocumentaiV1BatchProcessMetadataIndividualProcessStatus `json:"individualProcessStatuses,omitempty"` 1626 // State: The state of the current batch processing. 1627 // 1628 // Possible values: 1629 // "STATE_UNSPECIFIED" - The default value. This value is used if the state 1630 // is omitted. 1631 // "WAITING" - Request operation is waiting for scheduling. 1632 // "RUNNING" - Request is being processed. 1633 // "SUCCEEDED" - The batch processing completed successfully. 1634 // "CANCELLING" - The batch processing was being cancelled. 1635 // "CANCELLED" - The batch processing was cancelled. 1636 // "FAILED" - The batch processing has failed. 1637 State string `json:"state,omitempty"` 1638 // StateMessage: A message providing more details about the current state of 1639 // processing. For example, the error message if the operation is failed. 1640 StateMessage string `json:"stateMessage,omitempty"` 1641 // UpdateTime: The last update time of the operation. 1642 UpdateTime string `json:"updateTime,omitempty"` 1643 // ForceSendFields is a list of field names (e.g. "CreateTime") to 1644 // unconditionally include in API requests. By default, fields with empty or 1645 // default values are omitted from API requests. See 1646 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1647 // details. 1648 ForceSendFields []string `json:"-"` 1649 // NullFields is a list of field names (e.g. "CreateTime") to include in API 1650 // requests with the JSON null value. By default, fields with empty values are 1651 // omitted from API requests. See 1652 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1653 NullFields []string `json:"-"` 1654 } 1655 1656 func (s *GoogleCloudDocumentaiV1BatchProcessMetadata) MarshalJSON() ([]byte, error) { 1657 type NoMethod GoogleCloudDocumentaiV1BatchProcessMetadata 1658 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1659 } 1660 1661 // GoogleCloudDocumentaiV1BatchProcessMetadataIndividualProcessStatus: The 1662 // status of a each individual document in the batch process. 1663 type GoogleCloudDocumentaiV1BatchProcessMetadataIndividualProcessStatus struct { 1664 // HumanReviewStatus: The status of human review on the processed document. 1665 HumanReviewStatus *GoogleCloudDocumentaiV1HumanReviewStatus `json:"humanReviewStatus,omitempty"` 1666 // InputGcsSource: The source of the document, same as the input_gcs_source 1667 // field in the request when the batch process started. 1668 InputGcsSource string `json:"inputGcsSource,omitempty"` 1669 // OutputGcsDestination: The Cloud Storage output destination (in the request 1670 // as DocumentOutputConfig.GcsOutputConfig.gcs_uri) of the processed document 1671 // if it was successful, otherwise empty. 1672 OutputGcsDestination string `json:"outputGcsDestination,omitempty"` 1673 // Status: The status processing the document. 1674 Status *GoogleRpcStatus `json:"status,omitempty"` 1675 // ForceSendFields is a list of field names (e.g. "HumanReviewStatus") to 1676 // unconditionally include in API requests. By default, fields with empty or 1677 // default values are omitted from API requests. See 1678 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1679 // details. 1680 ForceSendFields []string `json:"-"` 1681 // NullFields is a list of field names (e.g. "HumanReviewStatus") to include in 1682 // API requests with the JSON null value. By default, fields with empty values 1683 // are omitted from API requests. See 1684 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1685 NullFields []string `json:"-"` 1686 } 1687 1688 func (s *GoogleCloudDocumentaiV1BatchProcessMetadataIndividualProcessStatus) MarshalJSON() ([]byte, error) { 1689 type NoMethod GoogleCloudDocumentaiV1BatchProcessMetadataIndividualProcessStatus 1690 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1691 } 1692 1693 // GoogleCloudDocumentaiV1BatchProcessRequest: Request message for 1694 // BatchProcessDocuments. 1695 type GoogleCloudDocumentaiV1BatchProcessRequest struct { 1696 // DocumentOutputConfig: The output configuration for the BatchProcessDocuments 1697 // method. 1698 DocumentOutputConfig *GoogleCloudDocumentaiV1DocumentOutputConfig `json:"documentOutputConfig,omitempty"` 1699 // InputDocuments: The input documents for the BatchProcessDocuments method. 1700 InputDocuments *GoogleCloudDocumentaiV1BatchDocumentsInputConfig `json:"inputDocuments,omitempty"` 1701 // Labels: Optional. The labels with user-defined metadata for the request. 1702 // Label keys and values can be no longer than 63 characters (Unicode 1703 // codepoints) and can only contain lowercase letters, numeric characters, 1704 // underscores, and dashes. International characters are allowed. Label values 1705 // are optional. Label keys must start with a letter. 1706 Labels map[string]string `json:"labels,omitempty"` 1707 // ProcessOptions: Inference-time options for the process API 1708 ProcessOptions *GoogleCloudDocumentaiV1ProcessOptions `json:"processOptions,omitempty"` 1709 // SkipHumanReview: Whether human review should be skipped for this request. 1710 // Default to `false`. 1711 SkipHumanReview bool `json:"skipHumanReview,omitempty"` 1712 // ForceSendFields is a list of field names (e.g. "DocumentOutputConfig") to 1713 // unconditionally include in API requests. By default, fields with empty or 1714 // default values are omitted from API requests. See 1715 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1716 // details. 1717 ForceSendFields []string `json:"-"` 1718 // NullFields is a list of field names (e.g. "DocumentOutputConfig") to include 1719 // in API requests with the JSON null value. By default, fields with empty 1720 // values are omitted from API requests. See 1721 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1722 NullFields []string `json:"-"` 1723 } 1724 1725 func (s *GoogleCloudDocumentaiV1BatchProcessRequest) MarshalJSON() ([]byte, error) { 1726 type NoMethod GoogleCloudDocumentaiV1BatchProcessRequest 1727 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1728 } 1729 1730 // GoogleCloudDocumentaiV1BatchProcessResponse: Response message for 1731 // BatchProcessDocuments. 1732 type GoogleCloudDocumentaiV1BatchProcessResponse struct { 1733 } 1734 1735 // GoogleCloudDocumentaiV1BoundingPoly: A bounding polygon for the detected 1736 // image annotation. 1737 type GoogleCloudDocumentaiV1BoundingPoly struct { 1738 // NormalizedVertices: The bounding polygon normalized vertices. 1739 NormalizedVertices []*GoogleCloudDocumentaiV1NormalizedVertex `json:"normalizedVertices,omitempty"` 1740 // Vertices: The bounding polygon vertices. 1741 Vertices []*GoogleCloudDocumentaiV1Vertex `json:"vertices,omitempty"` 1742 // ForceSendFields is a list of field names (e.g. "NormalizedVertices") to 1743 // unconditionally include in API requests. By default, fields with empty or 1744 // default values are omitted from API requests. See 1745 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1746 // details. 1747 ForceSendFields []string `json:"-"` 1748 // NullFields is a list of field names (e.g. "NormalizedVertices") to include 1749 // in API requests with the JSON null value. By default, fields with empty 1750 // values are omitted from API requests. See 1751 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1752 NullFields []string `json:"-"` 1753 } 1754 1755 func (s *GoogleCloudDocumentaiV1BoundingPoly) MarshalJSON() ([]byte, error) { 1756 type NoMethod GoogleCloudDocumentaiV1BoundingPoly 1757 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1758 } 1759 1760 // GoogleCloudDocumentaiV1CommonOperationMetadata: The common metadata for long 1761 // running operations. 1762 type GoogleCloudDocumentaiV1CommonOperationMetadata struct { 1763 // CreateTime: The creation time of the operation. 1764 CreateTime string `json:"createTime,omitempty"` 1765 // Resource: A related resource to this operation. 1766 Resource string `json:"resource,omitempty"` 1767 // State: The state of the operation. 1768 // 1769 // Possible values: 1770 // "STATE_UNSPECIFIED" - Unspecified state. 1771 // "RUNNING" - Operation is still running. 1772 // "CANCELLING" - Operation is being cancelled. 1773 // "SUCCEEDED" - Operation succeeded. 1774 // "FAILED" - Operation failed. 1775 // "CANCELLED" - Operation is cancelled. 1776 State string `json:"state,omitempty"` 1777 // StateMessage: A message providing more details about the current state of 1778 // processing. 1779 StateMessage string `json:"stateMessage,omitempty"` 1780 // UpdateTime: The last update time of the operation. 1781 UpdateTime string `json:"updateTime,omitempty"` 1782 // ForceSendFields is a list of field names (e.g. "CreateTime") to 1783 // unconditionally include in API requests. By default, fields with empty or 1784 // default values are omitted from API requests. See 1785 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1786 // details. 1787 ForceSendFields []string `json:"-"` 1788 // NullFields is a list of field names (e.g. "CreateTime") to include in API 1789 // requests with the JSON null value. By default, fields with empty values are 1790 // omitted from API requests. See 1791 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1792 NullFields []string `json:"-"` 1793 } 1794 1795 func (s *GoogleCloudDocumentaiV1CommonOperationMetadata) MarshalJSON() ([]byte, error) { 1796 type NoMethod GoogleCloudDocumentaiV1CommonOperationMetadata 1797 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1798 } 1799 1800 // GoogleCloudDocumentaiV1DeleteProcessorMetadata: The long-running operation 1801 // metadata for the DeleteProcessor method. 1802 type GoogleCloudDocumentaiV1DeleteProcessorMetadata struct { 1803 // CommonMetadata: The basic metadata of the long-running operation. 1804 CommonMetadata *GoogleCloudDocumentaiV1CommonOperationMetadata `json:"commonMetadata,omitempty"` 1805 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 1806 // unconditionally include in API requests. By default, fields with empty or 1807 // default values are omitted from API requests. See 1808 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1809 // details. 1810 ForceSendFields []string `json:"-"` 1811 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 1812 // API requests with the JSON null value. By default, fields with empty values 1813 // are omitted from API requests. See 1814 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1815 NullFields []string `json:"-"` 1816 } 1817 1818 func (s *GoogleCloudDocumentaiV1DeleteProcessorMetadata) MarshalJSON() ([]byte, error) { 1819 type NoMethod GoogleCloudDocumentaiV1DeleteProcessorMetadata 1820 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1821 } 1822 1823 // GoogleCloudDocumentaiV1DeleteProcessorVersionMetadata: The long-running 1824 // operation metadata for the DeleteProcessorVersion method. 1825 type GoogleCloudDocumentaiV1DeleteProcessorVersionMetadata struct { 1826 // CommonMetadata: The basic metadata of the long-running operation. 1827 CommonMetadata *GoogleCloudDocumentaiV1CommonOperationMetadata `json:"commonMetadata,omitempty"` 1828 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 1829 // unconditionally include in API requests. By default, fields with empty or 1830 // default values are omitted from API requests. See 1831 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1832 // details. 1833 ForceSendFields []string `json:"-"` 1834 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 1835 // API requests with the JSON null value. By default, fields with empty values 1836 // are omitted from API requests. See 1837 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1838 NullFields []string `json:"-"` 1839 } 1840 1841 func (s *GoogleCloudDocumentaiV1DeleteProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 1842 type NoMethod GoogleCloudDocumentaiV1DeleteProcessorVersionMetadata 1843 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1844 } 1845 1846 // GoogleCloudDocumentaiV1DeployProcessorVersionMetadata: The long-running 1847 // operation metadata for the DeployProcessorVersion method. 1848 type GoogleCloudDocumentaiV1DeployProcessorVersionMetadata struct { 1849 // CommonMetadata: The basic metadata of the long-running operation. 1850 CommonMetadata *GoogleCloudDocumentaiV1CommonOperationMetadata `json:"commonMetadata,omitempty"` 1851 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 1852 // unconditionally include in API requests. By default, fields with empty or 1853 // default values are omitted from API requests. See 1854 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1855 // details. 1856 ForceSendFields []string `json:"-"` 1857 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 1858 // API requests with the JSON null value. By default, fields with empty values 1859 // are omitted from API requests. See 1860 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1861 NullFields []string `json:"-"` 1862 } 1863 1864 func (s *GoogleCloudDocumentaiV1DeployProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 1865 type NoMethod GoogleCloudDocumentaiV1DeployProcessorVersionMetadata 1866 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1867 } 1868 1869 // GoogleCloudDocumentaiV1DeployProcessorVersionRequest: Request message for 1870 // the DeployProcessorVersion method. 1871 type GoogleCloudDocumentaiV1DeployProcessorVersionRequest struct { 1872 } 1873 1874 // GoogleCloudDocumentaiV1DeployProcessorVersionResponse: Response message for 1875 // the DeployProcessorVersion method. 1876 type GoogleCloudDocumentaiV1DeployProcessorVersionResponse struct { 1877 } 1878 1879 // GoogleCloudDocumentaiV1DisableProcessorMetadata: The long-running operation 1880 // metadata for the DisableProcessor method. 1881 type GoogleCloudDocumentaiV1DisableProcessorMetadata struct { 1882 // CommonMetadata: The basic metadata of the long-running operation. 1883 CommonMetadata *GoogleCloudDocumentaiV1CommonOperationMetadata `json:"commonMetadata,omitempty"` 1884 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 1885 // unconditionally include in API requests. By default, fields with empty or 1886 // default values are omitted from API requests. See 1887 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1888 // details. 1889 ForceSendFields []string `json:"-"` 1890 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 1891 // API requests with the JSON null value. By default, fields with empty values 1892 // are omitted from API requests. See 1893 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1894 NullFields []string `json:"-"` 1895 } 1896 1897 func (s *GoogleCloudDocumentaiV1DisableProcessorMetadata) MarshalJSON() ([]byte, error) { 1898 type NoMethod GoogleCloudDocumentaiV1DisableProcessorMetadata 1899 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1900 } 1901 1902 // GoogleCloudDocumentaiV1DisableProcessorRequest: Request message for the 1903 // DisableProcessor method. 1904 type GoogleCloudDocumentaiV1DisableProcessorRequest struct { 1905 } 1906 1907 // GoogleCloudDocumentaiV1DisableProcessorResponse: Response message for the 1908 // DisableProcessor method. Intentionally empty proto for adding fields in 1909 // future. 1910 type GoogleCloudDocumentaiV1DisableProcessorResponse struct { 1911 } 1912 1913 // GoogleCloudDocumentaiV1Document: Document represents the canonical document 1914 // resource in Document AI. It is an interchange format that provides insights 1915 // into documents and allows for collaboration between users and Document AI to 1916 // iterate and optimize for quality. 1917 type GoogleCloudDocumentaiV1Document struct { 1918 // Content: Optional. Inline document content, represented as a stream of 1919 // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary 1920 // representation, whereas JSON representations use base64. 1921 Content string `json:"content,omitempty"` 1922 // Entities: A list of entities detected on Document.text. For document shards, 1923 // entities in this list may cross shard boundaries. 1924 Entities []*GoogleCloudDocumentaiV1DocumentEntity `json:"entities,omitempty"` 1925 // EntityRelations: Placeholder. Relationship among Document.entities. 1926 EntityRelations []*GoogleCloudDocumentaiV1DocumentEntityRelation `json:"entityRelations,omitempty"` 1927 // Error: Any error that occurred while processing this document. 1928 Error *GoogleRpcStatus `json:"error,omitempty"` 1929 // MimeType: An IANA published media type (MIME type) 1930 // (https://www.iana.org/assignments/media-types/media-types.xhtml). 1931 MimeType string `json:"mimeType,omitempty"` 1932 // Pages: Visual page layout for the Document. 1933 Pages []*GoogleCloudDocumentaiV1DocumentPage `json:"pages,omitempty"` 1934 // Revisions: Placeholder. Revision history of this document. 1935 Revisions []*GoogleCloudDocumentaiV1DocumentRevision `json:"revisions,omitempty"` 1936 // ShardInfo: Information about the sharding if this document is sharded part 1937 // of a larger document. If the document is not sharded, this message is not 1938 // specified. 1939 ShardInfo *GoogleCloudDocumentaiV1DocumentShardInfo `json:"shardInfo,omitempty"` 1940 // Text: Optional. UTF-8 encoded text in reading order from the document. 1941 Text string `json:"text,omitempty"` 1942 // TextChanges: Placeholder. A list of text corrections made to Document.text. 1943 // This is usually used for annotating corrections to OCR mistakes. Text 1944 // changes for a given revision may not overlap with each other. 1945 TextChanges []*GoogleCloudDocumentaiV1DocumentTextChange `json:"textChanges,omitempty"` 1946 // TextStyles: Styles for the Document.text. 1947 TextStyles []*GoogleCloudDocumentaiV1DocumentStyle `json:"textStyles,omitempty"` 1948 // Uri: Optional. Currently supports Google Cloud Storage URI of the form 1949 // `gs://bucket_name/object_name`. Object versioning is not supported. For more 1950 // information, refer to Google Cloud Storage Request URIs 1951 // (https://cloud.google.com/storage/docs/reference-uris). 1952 Uri string `json:"uri,omitempty"` 1953 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 1954 // include in API requests. By default, fields with empty or default values are 1955 // omitted from API requests. See 1956 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1957 // details. 1958 ForceSendFields []string `json:"-"` 1959 // NullFields is a list of field names (e.g. "Content") to include in API 1960 // requests with the JSON null value. By default, fields with empty values are 1961 // omitted from API requests. See 1962 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1963 NullFields []string `json:"-"` 1964 } 1965 1966 func (s *GoogleCloudDocumentaiV1Document) MarshalJSON() ([]byte, error) { 1967 type NoMethod GoogleCloudDocumentaiV1Document 1968 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1969 } 1970 1971 // GoogleCloudDocumentaiV1DocumentEntity: An entity that could be a phrase in 1972 // the text or a property that belongs to the document. It is a known entity 1973 // type, such as a person, an organization, or location. 1974 type GoogleCloudDocumentaiV1DocumentEntity struct { 1975 // Confidence: Optional. Confidence of detected Schema entity. Range `[0, 1]`. 1976 Confidence float64 `json:"confidence,omitempty"` 1977 // Id: Optional. Canonical id. This will be a unique value in the entity list 1978 // for this document. 1979 Id string `json:"id,omitempty"` 1980 // MentionId: Optional. Deprecated. Use `id` field instead. 1981 MentionId string `json:"mentionId,omitempty"` 1982 // MentionText: Optional. Text value of the entity e.g. `1600 Amphitheatre 1983 // Pkwy`. 1984 MentionText string `json:"mentionText,omitempty"` 1985 // NormalizedValue: Optional. Normalized entity value. Absent if the extracted 1986 // value could not be converted or the type (e.g. address) is not supported for 1987 // certain parsers. This field is also only populated for certain supported 1988 // document types. 1989 NormalizedValue *GoogleCloudDocumentaiV1DocumentEntityNormalizedValue `json:"normalizedValue,omitempty"` 1990 // PageAnchor: Optional. Represents the provenance of this entity wrt. the 1991 // location on the page where it was found. 1992 PageAnchor *GoogleCloudDocumentaiV1DocumentPageAnchor `json:"pageAnchor,omitempty"` 1993 // Properties: Optional. Entities can be nested to form a hierarchical data 1994 // structure representing the content in the document. 1995 Properties []*GoogleCloudDocumentaiV1DocumentEntity `json:"properties,omitempty"` 1996 // Provenance: Optional. The history of this annotation. 1997 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 1998 // Redacted: Optional. Whether the entity will be redacted for 1999 // de-identification purposes. 2000 Redacted bool `json:"redacted,omitempty"` 2001 // TextAnchor: Optional. Provenance of the entity. Text anchor indexing into 2002 // the Document.text. 2003 TextAnchor *GoogleCloudDocumentaiV1DocumentTextAnchor `json:"textAnchor,omitempty"` 2004 // Type: Required. Entity type from a schema e.g. `Address`. 2005 Type string `json:"type,omitempty"` 2006 // ForceSendFields is a list of field names (e.g. "Confidence") to 2007 // unconditionally include in API requests. By default, fields with empty or 2008 // default values are omitted from API requests. See 2009 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2010 // details. 2011 ForceSendFields []string `json:"-"` 2012 // NullFields is a list of field names (e.g. "Confidence") to include in API 2013 // requests with the JSON null value. By default, fields with empty values are 2014 // omitted from API requests. See 2015 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2016 NullFields []string `json:"-"` 2017 } 2018 2019 func (s *GoogleCloudDocumentaiV1DocumentEntity) MarshalJSON() ([]byte, error) { 2020 type NoMethod GoogleCloudDocumentaiV1DocumentEntity 2021 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2022 } 2023 2024 func (s *GoogleCloudDocumentaiV1DocumentEntity) UnmarshalJSON(data []byte) error { 2025 type NoMethod GoogleCloudDocumentaiV1DocumentEntity 2026 var s1 struct { 2027 Confidence gensupport.JSONFloat64 `json:"confidence"` 2028 *NoMethod 2029 } 2030 s1.NoMethod = (*NoMethod)(s) 2031 if err := json.Unmarshal(data, &s1); err != nil { 2032 return err 2033 } 2034 s.Confidence = float64(s1.Confidence) 2035 return nil 2036 } 2037 2038 // GoogleCloudDocumentaiV1DocumentEntityNormalizedValue: Parsed and normalized 2039 // entity value. 2040 type GoogleCloudDocumentaiV1DocumentEntityNormalizedValue struct { 2041 // AddressValue: Postal address. See also: 2042 // https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto 2043 AddressValue *GoogleTypePostalAddress `json:"addressValue,omitempty"` 2044 // BooleanValue: Boolean value. Can be used for entities with binary values, or 2045 // for checkboxes. 2046 BooleanValue bool `json:"booleanValue,omitempty"` 2047 // DateValue: Date value. Includes year, month, day. See also: 2048 // https://github.com/googleapis/googleapis/blob/master/google/type/date.proto 2049 DateValue *GoogleTypeDate `json:"dateValue,omitempty"` 2050 // DatetimeValue: DateTime value. Includes date, time, and timezone. See also: 2051 // https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto 2052 DatetimeValue *GoogleTypeDateTime `json:"datetimeValue,omitempty"` 2053 // FloatValue: Float value. 2054 FloatValue float64 `json:"floatValue,omitempty"` 2055 // IntegerValue: Integer value. 2056 IntegerValue int64 `json:"integerValue,omitempty"` 2057 // MoneyValue: Money value. See also: 2058 // https://github.com/googleapis/googleapis/blob/master/google/type/money.proto 2059 MoneyValue *GoogleTypeMoney `json:"moneyValue,omitempty"` 2060 // Text: Optional. An optional field to store a normalized string. For some 2061 // entity types, one of respective `structured_value` fields may also be 2062 // populated. Also not all the types of `structured_value` will be normalized. 2063 // For example, some processors may not generate `float` or `integer` 2064 // normalized text by default. Below are sample formats mapped to structured 2065 // values. - Money/Currency type (`money_value`) is in the ISO 4217 text 2066 // format. - Date type (`date_value`) is in the ISO 8601 text format. - 2067 // Datetime type (`datetime_value`) is in the ISO 8601 text format. 2068 Text string `json:"text,omitempty"` 2069 // ForceSendFields is a list of field names (e.g. "AddressValue") to 2070 // unconditionally include in API requests. By default, fields with empty or 2071 // default values are omitted from API requests. See 2072 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2073 // details. 2074 ForceSendFields []string `json:"-"` 2075 // NullFields is a list of field names (e.g. "AddressValue") to include in API 2076 // requests with the JSON null value. By default, fields with empty values are 2077 // omitted from API requests. See 2078 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2079 NullFields []string `json:"-"` 2080 } 2081 2082 func (s *GoogleCloudDocumentaiV1DocumentEntityNormalizedValue) MarshalJSON() ([]byte, error) { 2083 type NoMethod GoogleCloudDocumentaiV1DocumentEntityNormalizedValue 2084 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2085 } 2086 2087 func (s *GoogleCloudDocumentaiV1DocumentEntityNormalizedValue) UnmarshalJSON(data []byte) error { 2088 type NoMethod GoogleCloudDocumentaiV1DocumentEntityNormalizedValue 2089 var s1 struct { 2090 FloatValue gensupport.JSONFloat64 `json:"floatValue"` 2091 *NoMethod 2092 } 2093 s1.NoMethod = (*NoMethod)(s) 2094 if err := json.Unmarshal(data, &s1); err != nil { 2095 return err 2096 } 2097 s.FloatValue = float64(s1.FloatValue) 2098 return nil 2099 } 2100 2101 // GoogleCloudDocumentaiV1DocumentEntityRelation: Relationship between 2102 // Entities. 2103 type GoogleCloudDocumentaiV1DocumentEntityRelation struct { 2104 // ObjectId: Object entity id. 2105 ObjectId string `json:"objectId,omitempty"` 2106 // Relation: Relationship description. 2107 Relation string `json:"relation,omitempty"` 2108 // SubjectId: Subject entity id. 2109 SubjectId string `json:"subjectId,omitempty"` 2110 // ForceSendFields is a list of field names (e.g. "ObjectId") to 2111 // unconditionally include in API requests. By default, fields with empty or 2112 // default values are omitted from API requests. See 2113 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2114 // details. 2115 ForceSendFields []string `json:"-"` 2116 // NullFields is a list of field names (e.g. "ObjectId") to include in API 2117 // requests with the JSON null value. By default, fields with empty values are 2118 // omitted from API requests. See 2119 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2120 NullFields []string `json:"-"` 2121 } 2122 2123 func (s *GoogleCloudDocumentaiV1DocumentEntityRelation) MarshalJSON() ([]byte, error) { 2124 type NoMethod GoogleCloudDocumentaiV1DocumentEntityRelation 2125 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2126 } 2127 2128 // GoogleCloudDocumentaiV1DocumentOutputConfig: Config that controls the output 2129 // of documents. All documents will be written as a JSON file. 2130 type GoogleCloudDocumentaiV1DocumentOutputConfig struct { 2131 // GcsOutputConfig: Output config to write the results to Cloud Storage. 2132 GcsOutputConfig *GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfig `json:"gcsOutputConfig,omitempty"` 2133 // ForceSendFields is a list of field names (e.g. "GcsOutputConfig") to 2134 // unconditionally include in API requests. By default, fields with empty or 2135 // default values are omitted from API requests. See 2136 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2137 // details. 2138 ForceSendFields []string `json:"-"` 2139 // NullFields is a list of field names (e.g. "GcsOutputConfig") to include in 2140 // API requests with the JSON null value. By default, fields with empty values 2141 // are omitted from API requests. See 2142 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2143 NullFields []string `json:"-"` 2144 } 2145 2146 func (s *GoogleCloudDocumentaiV1DocumentOutputConfig) MarshalJSON() ([]byte, error) { 2147 type NoMethod GoogleCloudDocumentaiV1DocumentOutputConfig 2148 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2149 } 2150 2151 // GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfig: The 2152 // configuration used when outputting documents. 2153 type GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfig struct { 2154 // FieldMask: Specifies which fields to include in the output documents. Only 2155 // supports top level document and pages field so it must be in the form of 2156 // `{document_field_name}` or `pages.{page_field_name}`. 2157 FieldMask string `json:"fieldMask,omitempty"` 2158 // GcsUri: The Cloud Storage uri (a directory) of the output. 2159 GcsUri string `json:"gcsUri,omitempty"` 2160 // ShardingConfig: Specifies the sharding config for the output document. 2161 ShardingConfig *GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfigShardingConfig `json:"shardingConfig,omitempty"` 2162 // ForceSendFields is a list of field names (e.g. "FieldMask") to 2163 // unconditionally include in API requests. By default, fields with empty or 2164 // default values are omitted from API requests. See 2165 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2166 // details. 2167 ForceSendFields []string `json:"-"` 2168 // NullFields is a list of field names (e.g. "FieldMask") to include in API 2169 // requests with the JSON null value. By default, fields with empty values are 2170 // omitted from API requests. See 2171 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2172 NullFields []string `json:"-"` 2173 } 2174 2175 func (s *GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfig) MarshalJSON() ([]byte, error) { 2176 type NoMethod GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfig 2177 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2178 } 2179 2180 // GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfigShardingConfig: 2181 // The sharding config for the output document. 2182 type GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfigShardingConfig struct { 2183 // PagesOverlap: The number of overlapping pages between consecutive shards. 2184 PagesOverlap int64 `json:"pagesOverlap,omitempty"` 2185 // PagesPerShard: The number of pages per shard. 2186 PagesPerShard int64 `json:"pagesPerShard,omitempty"` 2187 // ForceSendFields is a list of field names (e.g. "PagesOverlap") to 2188 // unconditionally include in API requests. By default, fields with empty or 2189 // default values are omitted from API requests. See 2190 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2191 // details. 2192 ForceSendFields []string `json:"-"` 2193 // NullFields is a list of field names (e.g. "PagesOverlap") to include in API 2194 // requests with the JSON null value. By default, fields with empty values are 2195 // omitted from API requests. See 2196 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2197 NullFields []string `json:"-"` 2198 } 2199 2200 func (s *GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfigShardingConfig) MarshalJSON() ([]byte, error) { 2201 type NoMethod GoogleCloudDocumentaiV1DocumentOutputConfigGcsOutputConfigShardingConfig 2202 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2203 } 2204 2205 // GoogleCloudDocumentaiV1DocumentPage: A page in a Document. 2206 type GoogleCloudDocumentaiV1DocumentPage struct { 2207 // Blocks: A list of visually detected text blocks on the page. A block has a 2208 // set of lines (collected into paragraphs) that have a common line-spacing and 2209 // orientation. 2210 Blocks []*GoogleCloudDocumentaiV1DocumentPageBlock `json:"blocks,omitempty"` 2211 // DetectedBarcodes: A list of detected barcodes. 2212 DetectedBarcodes []*GoogleCloudDocumentaiV1DocumentPageDetectedBarcode `json:"detectedBarcodes,omitempty"` 2213 // DetectedLanguages: A list of detected languages together with confidence. 2214 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 2215 // Dimension: Physical dimension of the page. 2216 Dimension *GoogleCloudDocumentaiV1DocumentPageDimension `json:"dimension,omitempty"` 2217 // FormFields: A list of visually detected form fields on the page. 2218 FormFields []*GoogleCloudDocumentaiV1DocumentPageFormField `json:"formFields,omitempty"` 2219 // Image: Rendered image for this page. This image is preprocessed to remove 2220 // any skew, rotation, and distortions such that the annotation bounding boxes 2221 // can be upright and axis-aligned. 2222 Image *GoogleCloudDocumentaiV1DocumentPageImage `json:"image,omitempty"` 2223 // ImageQualityScores: Image quality scores. 2224 ImageQualityScores *GoogleCloudDocumentaiV1DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` 2225 // Layout: Layout for the page. 2226 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 2227 // Lines: A list of visually detected text lines on the page. A collection of 2228 // tokens that a human would perceive as a line. 2229 Lines []*GoogleCloudDocumentaiV1DocumentPageLine `json:"lines,omitempty"` 2230 // PageNumber: 1-based index for current Page in a parent Document. Useful when 2231 // a page is taken out of a Document for individual processing. 2232 PageNumber int64 `json:"pageNumber,omitempty"` 2233 // Paragraphs: A list of visually detected text paragraphs on the page. A 2234 // collection of lines that a human would perceive as a paragraph. 2235 Paragraphs []*GoogleCloudDocumentaiV1DocumentPageParagraph `json:"paragraphs,omitempty"` 2236 // Provenance: The history of this page. 2237 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 2238 // Symbols: A list of visually detected symbols on the page. 2239 Symbols []*GoogleCloudDocumentaiV1DocumentPageSymbol `json:"symbols,omitempty"` 2240 // Tables: A list of visually detected tables on the page. 2241 Tables []*GoogleCloudDocumentaiV1DocumentPageTable `json:"tables,omitempty"` 2242 // Tokens: A list of visually detected tokens on the page. 2243 Tokens []*GoogleCloudDocumentaiV1DocumentPageToken `json:"tokens,omitempty"` 2244 // Transforms: Transformation matrices that were applied to the original 2245 // document image to produce Page.image. 2246 Transforms []*GoogleCloudDocumentaiV1DocumentPageMatrix `json:"transforms,omitempty"` 2247 // VisualElements: A list of detected non-text visual elements e.g. checkbox, 2248 // signature etc. on the page. 2249 VisualElements []*GoogleCloudDocumentaiV1DocumentPageVisualElement `json:"visualElements,omitempty"` 2250 // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally 2251 // include in API requests. By default, fields with empty or default values are 2252 // omitted from API requests. See 2253 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2254 // details. 2255 ForceSendFields []string `json:"-"` 2256 // NullFields is a list of field names (e.g. "Blocks") to include in API 2257 // requests with the JSON null value. By default, fields with empty values are 2258 // omitted from API requests. See 2259 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2260 NullFields []string `json:"-"` 2261 } 2262 2263 func (s *GoogleCloudDocumentaiV1DocumentPage) MarshalJSON() ([]byte, error) { 2264 type NoMethod GoogleCloudDocumentaiV1DocumentPage 2265 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2266 } 2267 2268 // GoogleCloudDocumentaiV1DocumentPageAnchor: Referencing the visual context of 2269 // the entity in the Document.pages. Page anchors can be cross-page, consist of 2270 // multiple bounding polygons and optionally reference specific layout element 2271 // types. 2272 type GoogleCloudDocumentaiV1DocumentPageAnchor struct { 2273 // PageRefs: One or more references to visual page elements 2274 PageRefs []*GoogleCloudDocumentaiV1DocumentPageAnchorPageRef `json:"pageRefs,omitempty"` 2275 // ForceSendFields is a list of field names (e.g. "PageRefs") to 2276 // unconditionally include in API requests. By default, fields with empty or 2277 // default values are omitted from API requests. See 2278 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2279 // details. 2280 ForceSendFields []string `json:"-"` 2281 // NullFields is a list of field names (e.g. "PageRefs") to include in API 2282 // requests with the JSON null value. By default, fields with empty values are 2283 // omitted from API requests. See 2284 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2285 NullFields []string `json:"-"` 2286 } 2287 2288 func (s *GoogleCloudDocumentaiV1DocumentPageAnchor) MarshalJSON() ([]byte, error) { 2289 type NoMethod GoogleCloudDocumentaiV1DocumentPageAnchor 2290 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2291 } 2292 2293 // GoogleCloudDocumentaiV1DocumentPageAnchorPageRef: Represents a weak 2294 // reference to a page element within a document. 2295 type GoogleCloudDocumentaiV1DocumentPageAnchorPageRef struct { 2296 // BoundingPoly: Optional. Identifies the bounding polygon of a layout element 2297 // on the page. If `layout_type` is set, the bounding polygon must be exactly 2298 // the same to the layout element it's referring to. 2299 BoundingPoly *GoogleCloudDocumentaiV1BoundingPoly `json:"boundingPoly,omitempty"` 2300 // Confidence: Optional. Confidence of detected page element, if applicable. 2301 // Range `[0, 1]`. 2302 Confidence float64 `json:"confidence,omitempty"` 2303 // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. 2304 LayoutId string `json:"layoutId,omitempty"` 2305 // LayoutType: Optional. The type of the layout element that is being 2306 // referenced if any. 2307 // 2308 // Possible values: 2309 // "LAYOUT_TYPE_UNSPECIFIED" - Layout Unspecified. 2310 // "BLOCK" - References a Page.blocks element. 2311 // "PARAGRAPH" - References a Page.paragraphs element. 2312 // "LINE" - References a Page.lines element. 2313 // "TOKEN" - References a Page.tokens element. 2314 // "VISUAL_ELEMENT" - References a Page.visual_elements element. 2315 // "TABLE" - Refrrences a Page.tables element. 2316 // "FORM_FIELD" - References a Page.form_fields element. 2317 LayoutType string `json:"layoutType,omitempty"` 2318 // Page: Required. Index into the Document.pages element, for example using 2319 // `Document.pages` to locate the related page element. This field is skipped 2320 // when its value is the default `0`. See 2321 // https://developers.google.com/protocol-buffers/docs/proto3#json. 2322 Page int64 `json:"page,omitempty,string"` 2323 // ForceSendFields is a list of field names (e.g. "BoundingPoly") to 2324 // unconditionally include in API requests. By default, fields with empty or 2325 // default values are omitted from API requests. See 2326 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2327 // details. 2328 ForceSendFields []string `json:"-"` 2329 // NullFields is a list of field names (e.g. "BoundingPoly") to include in API 2330 // requests with the JSON null value. By default, fields with empty values are 2331 // omitted from API requests. See 2332 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2333 NullFields []string `json:"-"` 2334 } 2335 2336 func (s *GoogleCloudDocumentaiV1DocumentPageAnchorPageRef) MarshalJSON() ([]byte, error) { 2337 type NoMethod GoogleCloudDocumentaiV1DocumentPageAnchorPageRef 2338 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2339 } 2340 2341 func (s *GoogleCloudDocumentaiV1DocumentPageAnchorPageRef) UnmarshalJSON(data []byte) error { 2342 type NoMethod GoogleCloudDocumentaiV1DocumentPageAnchorPageRef 2343 var s1 struct { 2344 Confidence gensupport.JSONFloat64 `json:"confidence"` 2345 *NoMethod 2346 } 2347 s1.NoMethod = (*NoMethod)(s) 2348 if err := json.Unmarshal(data, &s1); err != nil { 2349 return err 2350 } 2351 s.Confidence = float64(s1.Confidence) 2352 return nil 2353 } 2354 2355 // GoogleCloudDocumentaiV1DocumentPageBlock: A block has a set of lines 2356 // (collected into paragraphs) that have a common line-spacing and orientation. 2357 type GoogleCloudDocumentaiV1DocumentPageBlock struct { 2358 // DetectedLanguages: A list of detected languages together with confidence. 2359 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 2360 // Layout: Layout for Block. 2361 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 2362 // Provenance: The history of this annotation. 2363 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 2364 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 2365 // unconditionally include in API requests. By default, fields with empty or 2366 // default values are omitted from API requests. See 2367 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2368 // details. 2369 ForceSendFields []string `json:"-"` 2370 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 2371 // API requests with the JSON null value. By default, fields with empty values 2372 // are omitted from API requests. See 2373 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2374 NullFields []string `json:"-"` 2375 } 2376 2377 func (s *GoogleCloudDocumentaiV1DocumentPageBlock) MarshalJSON() ([]byte, error) { 2378 type NoMethod GoogleCloudDocumentaiV1DocumentPageBlock 2379 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2380 } 2381 2382 // GoogleCloudDocumentaiV1DocumentPageDetectedBarcode: A detected barcode. 2383 type GoogleCloudDocumentaiV1DocumentPageDetectedBarcode struct { 2384 // Barcode: Detailed barcode information of the DetectedBarcode. 2385 Barcode *GoogleCloudDocumentaiV1Barcode `json:"barcode,omitempty"` 2386 // Layout: Layout for DetectedBarcode. 2387 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 2388 // ForceSendFields is a list of field names (e.g. "Barcode") to unconditionally 2389 // include in API requests. By default, fields with empty or default values are 2390 // omitted from API requests. See 2391 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2392 // details. 2393 ForceSendFields []string `json:"-"` 2394 // NullFields is a list of field names (e.g. "Barcode") to include in API 2395 // requests with the JSON null value. By default, fields with empty values are 2396 // omitted from API requests. See 2397 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2398 NullFields []string `json:"-"` 2399 } 2400 2401 func (s *GoogleCloudDocumentaiV1DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { 2402 type NoMethod GoogleCloudDocumentaiV1DocumentPageDetectedBarcode 2403 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2404 } 2405 2406 // GoogleCloudDocumentaiV1DocumentPageDetectedLanguage: Detected language for a 2407 // structural component. 2408 type GoogleCloudDocumentaiV1DocumentPageDetectedLanguage struct { 2409 // Confidence: Confidence of detected language. Range `[0, 1]`. 2410 Confidence float64 `json:"confidence,omitempty"` 2411 // LanguageCode: The BCP-47 language code 2412 // (https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as 2413 // `en-US` or `sr-Latn`. 2414 LanguageCode string `json:"languageCode,omitempty"` 2415 // ForceSendFields is a list of field names (e.g. "Confidence") to 2416 // unconditionally include in API requests. By default, fields with empty or 2417 // default values are omitted from API requests. See 2418 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2419 // details. 2420 ForceSendFields []string `json:"-"` 2421 // NullFields is a list of field names (e.g. "Confidence") to include in API 2422 // requests with the JSON null value. By default, fields with empty values are 2423 // omitted from API requests. See 2424 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2425 NullFields []string `json:"-"` 2426 } 2427 2428 func (s *GoogleCloudDocumentaiV1DocumentPageDetectedLanguage) MarshalJSON() ([]byte, error) { 2429 type NoMethod GoogleCloudDocumentaiV1DocumentPageDetectedLanguage 2430 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2431 } 2432 2433 func (s *GoogleCloudDocumentaiV1DocumentPageDetectedLanguage) UnmarshalJSON(data []byte) error { 2434 type NoMethod GoogleCloudDocumentaiV1DocumentPageDetectedLanguage 2435 var s1 struct { 2436 Confidence gensupport.JSONFloat64 `json:"confidence"` 2437 *NoMethod 2438 } 2439 s1.NoMethod = (*NoMethod)(s) 2440 if err := json.Unmarshal(data, &s1); err != nil { 2441 return err 2442 } 2443 s.Confidence = float64(s1.Confidence) 2444 return nil 2445 } 2446 2447 // GoogleCloudDocumentaiV1DocumentPageDimension: Dimension for the page. 2448 type GoogleCloudDocumentaiV1DocumentPageDimension struct { 2449 // Height: Page height. 2450 Height float64 `json:"height,omitempty"` 2451 // Unit: Dimension unit. 2452 Unit string `json:"unit,omitempty"` 2453 // Width: Page width. 2454 Width float64 `json:"width,omitempty"` 2455 // ForceSendFields is a list of field names (e.g. "Height") to unconditionally 2456 // include in API requests. By default, fields with empty or default values are 2457 // omitted from API requests. See 2458 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2459 // details. 2460 ForceSendFields []string `json:"-"` 2461 // NullFields is a list of field names (e.g. "Height") to include in API 2462 // requests with the JSON null value. By default, fields with empty values are 2463 // omitted from API requests. See 2464 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2465 NullFields []string `json:"-"` 2466 } 2467 2468 func (s *GoogleCloudDocumentaiV1DocumentPageDimension) MarshalJSON() ([]byte, error) { 2469 type NoMethod GoogleCloudDocumentaiV1DocumentPageDimension 2470 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2471 } 2472 2473 func (s *GoogleCloudDocumentaiV1DocumentPageDimension) UnmarshalJSON(data []byte) error { 2474 type NoMethod GoogleCloudDocumentaiV1DocumentPageDimension 2475 var s1 struct { 2476 Height gensupport.JSONFloat64 `json:"height"` 2477 Width gensupport.JSONFloat64 `json:"width"` 2478 *NoMethod 2479 } 2480 s1.NoMethod = (*NoMethod)(s) 2481 if err := json.Unmarshal(data, &s1); err != nil { 2482 return err 2483 } 2484 s.Height = float64(s1.Height) 2485 s.Width = float64(s1.Width) 2486 return nil 2487 } 2488 2489 // GoogleCloudDocumentaiV1DocumentPageFormField: A form field detected on the 2490 // page. 2491 type GoogleCloudDocumentaiV1DocumentPageFormField struct { 2492 // CorrectedKeyText: Created for Labeling UI to export key text. If corrections 2493 // were made to the text identified by the `field_name.text_anchor`, this field 2494 // will contain the correction. 2495 CorrectedKeyText string `json:"correctedKeyText,omitempty"` 2496 // CorrectedValueText: Created for Labeling UI to export value text. If 2497 // corrections were made to the text identified by the 2498 // `field_value.text_anchor`, this field will contain the correction. 2499 CorrectedValueText string `json:"correctedValueText,omitempty"` 2500 // FieldName: Layout for the FormField name. e.g. `Address`, `Email`, `Grand 2501 // total`, `Phone number`, etc. 2502 FieldName *GoogleCloudDocumentaiV1DocumentPageLayout `json:"fieldName,omitempty"` 2503 // FieldValue: Layout for the FormField value. 2504 FieldValue *GoogleCloudDocumentaiV1DocumentPageLayout `json:"fieldValue,omitempty"` 2505 // NameDetectedLanguages: A list of detected languages for name together with 2506 // confidence. 2507 NameDetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"nameDetectedLanguages,omitempty"` 2508 // Provenance: The history of this annotation. 2509 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 2510 // ValueDetectedLanguages: A list of detected languages for value together with 2511 // confidence. 2512 ValueDetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"valueDetectedLanguages,omitempty"` 2513 // ValueType: If the value is non-textual, this field represents the type. 2514 // Current valid values are: - blank (this indicates the `field_value` is 2515 // normal text) - `unfilled_checkbox` - `filled_checkbox` 2516 ValueType string `json:"valueType,omitempty"` 2517 // ForceSendFields is a list of field names (e.g. "CorrectedKeyText") to 2518 // unconditionally include in API requests. By default, fields with empty or 2519 // default values are omitted from API requests. See 2520 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2521 // details. 2522 ForceSendFields []string `json:"-"` 2523 // NullFields is a list of field names (e.g. "CorrectedKeyText") to include in 2524 // API requests with the JSON null value. By default, fields with empty values 2525 // are omitted from API requests. See 2526 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2527 NullFields []string `json:"-"` 2528 } 2529 2530 func (s *GoogleCloudDocumentaiV1DocumentPageFormField) MarshalJSON() ([]byte, error) { 2531 type NoMethod GoogleCloudDocumentaiV1DocumentPageFormField 2532 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2533 } 2534 2535 // GoogleCloudDocumentaiV1DocumentPageImage: Rendered image contents for this 2536 // page. 2537 type GoogleCloudDocumentaiV1DocumentPageImage struct { 2538 // Content: Raw byte content of the image. 2539 Content string `json:"content,omitempty"` 2540 // Height: Height of the image in pixels. 2541 Height int64 `json:"height,omitempty"` 2542 // MimeType: Encoding media type (MIME type) 2543 // (https://www.iana.org/assignments/media-types/media-types.xhtml) for the 2544 // image. 2545 MimeType string `json:"mimeType,omitempty"` 2546 // Width: Width of the image in pixels. 2547 Width int64 `json:"width,omitempty"` 2548 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 2549 // include in API requests. By default, fields with empty or default values are 2550 // omitted from API requests. See 2551 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2552 // details. 2553 ForceSendFields []string `json:"-"` 2554 // NullFields is a list of field names (e.g. "Content") to include in API 2555 // requests with the JSON null value. By default, fields with empty values are 2556 // omitted from API requests. See 2557 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2558 NullFields []string `json:"-"` 2559 } 2560 2561 func (s *GoogleCloudDocumentaiV1DocumentPageImage) MarshalJSON() ([]byte, error) { 2562 type NoMethod GoogleCloudDocumentaiV1DocumentPageImage 2563 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2564 } 2565 2566 // GoogleCloudDocumentaiV1DocumentPageImageQualityScores: Image quality scores 2567 // for the page image. 2568 type GoogleCloudDocumentaiV1DocumentPageImageQualityScores struct { 2569 // DetectedDefects: A list of detected defects. 2570 DetectedDefects []*GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` 2571 // QualityScore: The overall quality score. Range `[0, 1]` where `1` is perfect 2572 // quality. 2573 QualityScore float64 `json:"qualityScore,omitempty"` 2574 // ForceSendFields is a list of field names (e.g. "DetectedDefects") to 2575 // unconditionally include in API requests. By default, fields with empty or 2576 // default values are omitted from API requests. See 2577 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2578 // details. 2579 ForceSendFields []string `json:"-"` 2580 // NullFields is a list of field names (e.g. "DetectedDefects") to include in 2581 // API requests with the JSON null value. By default, fields with empty values 2582 // are omitted from API requests. See 2583 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2584 NullFields []string `json:"-"` 2585 } 2586 2587 func (s *GoogleCloudDocumentaiV1DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { 2588 type NoMethod GoogleCloudDocumentaiV1DocumentPageImageQualityScores 2589 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2590 } 2591 2592 func (s *GoogleCloudDocumentaiV1DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { 2593 type NoMethod GoogleCloudDocumentaiV1DocumentPageImageQualityScores 2594 var s1 struct { 2595 QualityScore gensupport.JSONFloat64 `json:"qualityScore"` 2596 *NoMethod 2597 } 2598 s1.NoMethod = (*NoMethod)(s) 2599 if err := json.Unmarshal(data, &s1); err != nil { 2600 return err 2601 } 2602 s.QualityScore = float64(s1.QualityScore) 2603 return nil 2604 } 2605 2606 // GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect: Image 2607 // Quality Defects 2608 type GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect struct { 2609 // Confidence: Confidence of detected defect. Range `[0, 1]` where `1` 2610 // indicates strong confidence that the defect exists. 2611 Confidence float64 `json:"confidence,omitempty"` 2612 // Type: Name of the defect type. Supported values are: - 2613 // `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - 2614 // `quality/defect_faint` - `quality/defect_text_too_small` - 2615 // `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - 2616 // `quality/defect_glare` 2617 Type string `json:"type,omitempty"` 2618 // ForceSendFields is a list of field names (e.g. "Confidence") to 2619 // unconditionally include in API requests. By default, fields with empty or 2620 // default values are omitted from API requests. See 2621 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2622 // details. 2623 ForceSendFields []string `json:"-"` 2624 // NullFields is a list of field names (e.g. "Confidence") to include in API 2625 // requests with the JSON null value. By default, fields with empty values are 2626 // omitted from API requests. See 2627 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2628 NullFields []string `json:"-"` 2629 } 2630 2631 func (s *GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { 2632 type NoMethod GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect 2633 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2634 } 2635 2636 func (s *GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { 2637 type NoMethod GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect 2638 var s1 struct { 2639 Confidence gensupport.JSONFloat64 `json:"confidence"` 2640 *NoMethod 2641 } 2642 s1.NoMethod = (*NoMethod)(s) 2643 if err := json.Unmarshal(data, &s1); err != nil { 2644 return err 2645 } 2646 s.Confidence = float64(s1.Confidence) 2647 return nil 2648 } 2649 2650 // GoogleCloudDocumentaiV1DocumentPageLayout: Visual element describing a 2651 // layout unit on a page. 2652 type GoogleCloudDocumentaiV1DocumentPageLayout struct { 2653 // BoundingPoly: The bounding polygon for the Layout. 2654 BoundingPoly *GoogleCloudDocumentaiV1BoundingPoly `json:"boundingPoly,omitempty"` 2655 // Confidence: Confidence of the current Layout within context of the object 2656 // this layout is for. e.g. confidence can be for a single token, a table, a 2657 // visual element, etc. depending on context. Range `[0, 1]`. 2658 Confidence float64 `json:"confidence,omitempty"` 2659 // Orientation: Detected orientation for the Layout. 2660 // 2661 // Possible values: 2662 // "ORIENTATION_UNSPECIFIED" - Unspecified orientation. 2663 // "PAGE_UP" - Orientation is aligned with page up. 2664 // "PAGE_RIGHT" - Orientation is aligned with page right. Turn the head 90 2665 // degrees clockwise from upright to read. 2666 // "PAGE_DOWN" - Orientation is aligned with page down. Turn the head 180 2667 // degrees from upright to read. 2668 // "PAGE_LEFT" - Orientation is aligned with page left. Turn the head 90 2669 // degrees counterclockwise from upright to read. 2670 Orientation string `json:"orientation,omitempty"` 2671 // TextAnchor: Text anchor indexing into the Document.text. 2672 TextAnchor *GoogleCloudDocumentaiV1DocumentTextAnchor `json:"textAnchor,omitempty"` 2673 // ForceSendFields is a list of field names (e.g. "BoundingPoly") to 2674 // unconditionally include in API requests. By default, fields with empty or 2675 // default values are omitted from API requests. See 2676 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2677 // details. 2678 ForceSendFields []string `json:"-"` 2679 // NullFields is a list of field names (e.g. "BoundingPoly") to include in API 2680 // requests with the JSON null value. By default, fields with empty values are 2681 // omitted from API requests. See 2682 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2683 NullFields []string `json:"-"` 2684 } 2685 2686 func (s *GoogleCloudDocumentaiV1DocumentPageLayout) MarshalJSON() ([]byte, error) { 2687 type NoMethod GoogleCloudDocumentaiV1DocumentPageLayout 2688 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2689 } 2690 2691 func (s *GoogleCloudDocumentaiV1DocumentPageLayout) UnmarshalJSON(data []byte) error { 2692 type NoMethod GoogleCloudDocumentaiV1DocumentPageLayout 2693 var s1 struct { 2694 Confidence gensupport.JSONFloat64 `json:"confidence"` 2695 *NoMethod 2696 } 2697 s1.NoMethod = (*NoMethod)(s) 2698 if err := json.Unmarshal(data, &s1); err != nil { 2699 return err 2700 } 2701 s.Confidence = float64(s1.Confidence) 2702 return nil 2703 } 2704 2705 // GoogleCloudDocumentaiV1DocumentPageLine: A collection of tokens that a human 2706 // would perceive as a line. Does not cross column boundaries, can be 2707 // horizontal, vertical, etc. 2708 type GoogleCloudDocumentaiV1DocumentPageLine struct { 2709 // DetectedLanguages: A list of detected languages together with confidence. 2710 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 2711 // Layout: Layout for Line. 2712 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 2713 // Provenance: The history of this annotation. 2714 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 2715 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 2716 // unconditionally include in API requests. By default, fields with empty or 2717 // default values are omitted from API requests. See 2718 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2719 // details. 2720 ForceSendFields []string `json:"-"` 2721 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 2722 // API requests with the JSON null value. By default, fields with empty values 2723 // are omitted from API requests. See 2724 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2725 NullFields []string `json:"-"` 2726 } 2727 2728 func (s *GoogleCloudDocumentaiV1DocumentPageLine) MarshalJSON() ([]byte, error) { 2729 type NoMethod GoogleCloudDocumentaiV1DocumentPageLine 2730 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2731 } 2732 2733 // GoogleCloudDocumentaiV1DocumentPageMatrix: Representation for transformation 2734 // matrix, intended to be compatible and used with OpenCV format for image 2735 // manipulation. 2736 type GoogleCloudDocumentaiV1DocumentPageMatrix struct { 2737 // Cols: Number of columns in the matrix. 2738 Cols int64 `json:"cols,omitempty"` 2739 // Data: The matrix data. 2740 Data string `json:"data,omitempty"` 2741 // Rows: Number of rows in the matrix. 2742 Rows int64 `json:"rows,omitempty"` 2743 // Type: This encodes information about what data type the matrix uses. For 2744 // example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV 2745 // primitive data types, please refer to 2746 // https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html 2747 Type int64 `json:"type,omitempty"` 2748 // ForceSendFields is a list of field names (e.g. "Cols") to unconditionally 2749 // include in API requests. By default, fields with empty or default values are 2750 // omitted from API requests. See 2751 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2752 // details. 2753 ForceSendFields []string `json:"-"` 2754 // NullFields is a list of field names (e.g. "Cols") to include in API requests 2755 // with the JSON null value. By default, fields with empty values are omitted 2756 // from API requests. See 2757 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2758 NullFields []string `json:"-"` 2759 } 2760 2761 func (s *GoogleCloudDocumentaiV1DocumentPageMatrix) MarshalJSON() ([]byte, error) { 2762 type NoMethod GoogleCloudDocumentaiV1DocumentPageMatrix 2763 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2764 } 2765 2766 // GoogleCloudDocumentaiV1DocumentPageParagraph: A collection of lines that a 2767 // human would perceive as a paragraph. 2768 type GoogleCloudDocumentaiV1DocumentPageParagraph struct { 2769 // DetectedLanguages: A list of detected languages together with confidence. 2770 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 2771 // Layout: Layout for Paragraph. 2772 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 2773 // Provenance: The history of this annotation. 2774 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 2775 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 2776 // unconditionally include in API requests. By default, fields with empty or 2777 // default values are omitted from API requests. See 2778 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2779 // details. 2780 ForceSendFields []string `json:"-"` 2781 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 2782 // API requests with the JSON null value. By default, fields with empty values 2783 // are omitted from API requests. See 2784 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2785 NullFields []string `json:"-"` 2786 } 2787 2788 func (s *GoogleCloudDocumentaiV1DocumentPageParagraph) MarshalJSON() ([]byte, error) { 2789 type NoMethod GoogleCloudDocumentaiV1DocumentPageParagraph 2790 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2791 } 2792 2793 // GoogleCloudDocumentaiV1DocumentPageSymbol: A detected symbol. 2794 type GoogleCloudDocumentaiV1DocumentPageSymbol struct { 2795 // DetectedLanguages: A list of detected languages together with confidence. 2796 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 2797 // Layout: Layout for Symbol. 2798 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 2799 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 2800 // unconditionally include in API requests. By default, fields with empty or 2801 // default values are omitted from API requests. See 2802 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2803 // details. 2804 ForceSendFields []string `json:"-"` 2805 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 2806 // API requests with the JSON null value. By default, fields with empty values 2807 // are omitted from API requests. See 2808 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2809 NullFields []string `json:"-"` 2810 } 2811 2812 func (s *GoogleCloudDocumentaiV1DocumentPageSymbol) MarshalJSON() ([]byte, error) { 2813 type NoMethod GoogleCloudDocumentaiV1DocumentPageSymbol 2814 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2815 } 2816 2817 // GoogleCloudDocumentaiV1DocumentPageTable: A table representation similar to 2818 // HTML table structure. 2819 type GoogleCloudDocumentaiV1DocumentPageTable struct { 2820 // BodyRows: Body rows of the table. 2821 BodyRows []*GoogleCloudDocumentaiV1DocumentPageTableTableRow `json:"bodyRows,omitempty"` 2822 // DetectedLanguages: A list of detected languages together with confidence. 2823 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 2824 // HeaderRows: Header rows of the table. 2825 HeaderRows []*GoogleCloudDocumentaiV1DocumentPageTableTableRow `json:"headerRows,omitempty"` 2826 // Layout: Layout for Table. 2827 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 2828 // Provenance: The history of this table. 2829 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 2830 // ForceSendFields is a list of field names (e.g. "BodyRows") to 2831 // unconditionally include in API requests. By default, fields with empty or 2832 // default values are omitted from API requests. See 2833 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2834 // details. 2835 ForceSendFields []string `json:"-"` 2836 // NullFields is a list of field names (e.g. "BodyRows") to include in API 2837 // requests with the JSON null value. By default, fields with empty values are 2838 // omitted from API requests. See 2839 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2840 NullFields []string `json:"-"` 2841 } 2842 2843 func (s *GoogleCloudDocumentaiV1DocumentPageTable) MarshalJSON() ([]byte, error) { 2844 type NoMethod GoogleCloudDocumentaiV1DocumentPageTable 2845 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2846 } 2847 2848 // GoogleCloudDocumentaiV1DocumentPageTableTableCell: A cell representation 2849 // inside the table. 2850 type GoogleCloudDocumentaiV1DocumentPageTableTableCell struct { 2851 // ColSpan: How many columns this cell spans. 2852 ColSpan int64 `json:"colSpan,omitempty"` 2853 // DetectedLanguages: A list of detected languages together with confidence. 2854 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 2855 // Layout: Layout for TableCell. 2856 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 2857 // RowSpan: How many rows this cell spans. 2858 RowSpan int64 `json:"rowSpan,omitempty"` 2859 // ForceSendFields is a list of field names (e.g. "ColSpan") to unconditionally 2860 // include in API requests. By default, fields with empty or default values are 2861 // omitted from API requests. See 2862 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2863 // details. 2864 ForceSendFields []string `json:"-"` 2865 // NullFields is a list of field names (e.g. "ColSpan") to include in API 2866 // requests with the JSON null value. By default, fields with empty values are 2867 // omitted from API requests. See 2868 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2869 NullFields []string `json:"-"` 2870 } 2871 2872 func (s *GoogleCloudDocumentaiV1DocumentPageTableTableCell) MarshalJSON() ([]byte, error) { 2873 type NoMethod GoogleCloudDocumentaiV1DocumentPageTableTableCell 2874 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2875 } 2876 2877 // GoogleCloudDocumentaiV1DocumentPageTableTableRow: A row of table cells. 2878 type GoogleCloudDocumentaiV1DocumentPageTableTableRow struct { 2879 // Cells: Cells that make up this row. 2880 Cells []*GoogleCloudDocumentaiV1DocumentPageTableTableCell `json:"cells,omitempty"` 2881 // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally 2882 // include in API requests. By default, fields with empty or default values are 2883 // omitted from API requests. See 2884 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2885 // details. 2886 ForceSendFields []string `json:"-"` 2887 // NullFields is a list of field names (e.g. "Cells") to include in API 2888 // requests with the JSON null value. By default, fields with empty values are 2889 // omitted from API requests. See 2890 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2891 NullFields []string `json:"-"` 2892 } 2893 2894 func (s *GoogleCloudDocumentaiV1DocumentPageTableTableRow) MarshalJSON() ([]byte, error) { 2895 type NoMethod GoogleCloudDocumentaiV1DocumentPageTableTableRow 2896 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2897 } 2898 2899 // GoogleCloudDocumentaiV1DocumentPageToken: A detected token. 2900 type GoogleCloudDocumentaiV1DocumentPageToken struct { 2901 // DetectedBreak: Detected break at the end of a Token. 2902 DetectedBreak *GoogleCloudDocumentaiV1DocumentPageTokenDetectedBreak `json:"detectedBreak,omitempty"` 2903 // DetectedLanguages: A list of detected languages together with confidence. 2904 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 2905 // Layout: Layout for Token. 2906 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 2907 // Provenance: The history of this annotation. 2908 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 2909 // StyleInfo: Text style attributes. 2910 StyleInfo *GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo `json:"styleInfo,omitempty"` 2911 // ForceSendFields is a list of field names (e.g. "DetectedBreak") to 2912 // unconditionally include in API requests. By default, fields with empty or 2913 // default values are omitted from API requests. See 2914 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2915 // details. 2916 ForceSendFields []string `json:"-"` 2917 // NullFields is a list of field names (e.g. "DetectedBreak") to include in API 2918 // requests with the JSON null value. By default, fields with empty values are 2919 // omitted from API requests. See 2920 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2921 NullFields []string `json:"-"` 2922 } 2923 2924 func (s *GoogleCloudDocumentaiV1DocumentPageToken) MarshalJSON() ([]byte, error) { 2925 type NoMethod GoogleCloudDocumentaiV1DocumentPageToken 2926 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2927 } 2928 2929 // GoogleCloudDocumentaiV1DocumentPageTokenDetectedBreak: Detected break at the 2930 // end of a Token. 2931 type GoogleCloudDocumentaiV1DocumentPageTokenDetectedBreak struct { 2932 // Type: Detected break type. 2933 // 2934 // Possible values: 2935 // "TYPE_UNSPECIFIED" - Unspecified break type. 2936 // "SPACE" - A single whitespace. 2937 // "WIDE_SPACE" - A wider whitespace. 2938 // "HYPHEN" - A hyphen that indicates that a token has been split across 2939 // lines. 2940 Type string `json:"type,omitempty"` 2941 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 2942 // include in API requests. By default, fields with empty or default values are 2943 // omitted from API requests. See 2944 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2945 // details. 2946 ForceSendFields []string `json:"-"` 2947 // NullFields is a list of field names (e.g. "Type") to include in API requests 2948 // with the JSON null value. By default, fields with empty values are omitted 2949 // from API requests. See 2950 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2951 NullFields []string `json:"-"` 2952 } 2953 2954 func (s *GoogleCloudDocumentaiV1DocumentPageTokenDetectedBreak) MarshalJSON() ([]byte, error) { 2955 type NoMethod GoogleCloudDocumentaiV1DocumentPageTokenDetectedBreak 2956 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2957 } 2958 2959 // GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo: Font and other text style 2960 // attributes. 2961 type GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo struct { 2962 // BackgroundColor: Color of the background. 2963 BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` 2964 // Bold: Whether the text is bold (equivalent to font_weight is at least 2965 // `700`). 2966 Bold bool `json:"bold,omitempty"` 2967 // FontSize: Font size in points (`1` point is `¹⁄₇₂` inches). 2968 FontSize int64 `json:"fontSize,omitempty"` 2969 // FontType: Name or style of the font. 2970 FontType string `json:"fontType,omitempty"` 2971 // FontWeight: TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). 2972 // Normal is `400`, bold is `700`. 2973 FontWeight int64 `json:"fontWeight,omitempty"` 2974 // Handwritten: Whether the text is handwritten. 2975 Handwritten bool `json:"handwritten,omitempty"` 2976 // Italic: Whether the text is italic. 2977 Italic bool `json:"italic,omitempty"` 2978 // LetterSpacing: Letter spacing in points. 2979 LetterSpacing float64 `json:"letterSpacing,omitempty"` 2980 // PixelFontSize: Font size in pixels, equal to _unrounded font_size_ * 2981 // _resolution_ ÷ `72.0`. 2982 PixelFontSize float64 `json:"pixelFontSize,omitempty"` 2983 // Smallcaps: Whether the text is in small caps. This feature is not supported 2984 // yet. 2985 Smallcaps bool `json:"smallcaps,omitempty"` 2986 // Strikeout: Whether the text is strikethrough. This feature is not supported 2987 // yet. 2988 Strikeout bool `json:"strikeout,omitempty"` 2989 // Subscript: Whether the text is a subscript. This feature is not supported 2990 // yet. 2991 Subscript bool `json:"subscript,omitempty"` 2992 // Superscript: Whether the text is a superscript. This feature is not 2993 // supported yet. 2994 Superscript bool `json:"superscript,omitempty"` 2995 // TextColor: Color of the text. 2996 TextColor *GoogleTypeColor `json:"textColor,omitempty"` 2997 // Underlined: Whether the text is underlined. 2998 Underlined bool `json:"underlined,omitempty"` 2999 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to 3000 // unconditionally include in API requests. By default, fields with empty or 3001 // default values are omitted from API requests. See 3002 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3003 // details. 3004 ForceSendFields []string `json:"-"` 3005 // NullFields is a list of field names (e.g. "BackgroundColor") to include in 3006 // API requests with the JSON null value. By default, fields with empty values 3007 // are omitted from API requests. See 3008 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3009 NullFields []string `json:"-"` 3010 } 3011 3012 func (s *GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo) MarshalJSON() ([]byte, error) { 3013 type NoMethod GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo 3014 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3015 } 3016 3017 func (s *GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo) UnmarshalJSON(data []byte) error { 3018 type NoMethod GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo 3019 var s1 struct { 3020 LetterSpacing gensupport.JSONFloat64 `json:"letterSpacing"` 3021 PixelFontSize gensupport.JSONFloat64 `json:"pixelFontSize"` 3022 *NoMethod 3023 } 3024 s1.NoMethod = (*NoMethod)(s) 3025 if err := json.Unmarshal(data, &s1); err != nil { 3026 return err 3027 } 3028 s.LetterSpacing = float64(s1.LetterSpacing) 3029 s.PixelFontSize = float64(s1.PixelFontSize) 3030 return nil 3031 } 3032 3033 // GoogleCloudDocumentaiV1DocumentPageVisualElement: Detected non-text visual 3034 // elements e.g. checkbox, signature etc. on the page. 3035 type GoogleCloudDocumentaiV1DocumentPageVisualElement struct { 3036 // DetectedLanguages: A list of detected languages together with confidence. 3037 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 3038 // Layout: Layout for VisualElement. 3039 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 3040 // Type: Type of the VisualElement. 3041 Type string `json:"type,omitempty"` 3042 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 3043 // unconditionally include in API requests. By default, fields with empty or 3044 // default values are omitted from API requests. See 3045 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3046 // details. 3047 ForceSendFields []string `json:"-"` 3048 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 3049 // API requests with the JSON null value. By default, fields with empty values 3050 // are omitted from API requests. See 3051 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3052 NullFields []string `json:"-"` 3053 } 3054 3055 func (s *GoogleCloudDocumentaiV1DocumentPageVisualElement) MarshalJSON() ([]byte, error) { 3056 type NoMethod GoogleCloudDocumentaiV1DocumentPageVisualElement 3057 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3058 } 3059 3060 // GoogleCloudDocumentaiV1DocumentProvenance: Structure to identify provenance 3061 // relationships between annotations in different revisions. 3062 type GoogleCloudDocumentaiV1DocumentProvenance struct { 3063 // Id: The Id of this operation. Needs to be unique within the scope of the 3064 // revision. 3065 Id int64 `json:"id,omitempty"` 3066 // Parents: References to the original elements that are replaced. 3067 Parents []*GoogleCloudDocumentaiV1DocumentProvenanceParent `json:"parents,omitempty"` 3068 // Revision: The index of the revision that produced this element. 3069 Revision int64 `json:"revision,omitempty"` 3070 // Type: The type of provenance operation. 3071 // 3072 // Possible values: 3073 // "OPERATION_TYPE_UNSPECIFIED" - Operation type unspecified. If no operation 3074 // is specified a provenance entry is simply used to match against a `parent`. 3075 // "ADD" - Add an element. 3076 // "REMOVE" - Remove an element identified by `parent`. 3077 // "UPDATE" - Updates any fields within the given provenance scope of the 3078 // message. It overwrites the fields rather than replacing them. Use this when 3079 // you want to update a field value of an entity without also updating all the 3080 // child properties. 3081 // "REPLACE" - Currently unused. Replace an element identified by `parent`. 3082 // "EVAL_REQUESTED" - Deprecated. Request human review for the element 3083 // identified by `parent`. 3084 // "EVAL_APPROVED" - Deprecated. Element is reviewed and approved at human 3085 // review, confidence will be set to 1.0. 3086 // "EVAL_SKIPPED" - Deprecated. Element is skipped in the validation process. 3087 Type string `json:"type,omitempty"` 3088 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 3089 // include in API requests. By default, fields with empty or default values are 3090 // omitted from API requests. See 3091 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3092 // details. 3093 ForceSendFields []string `json:"-"` 3094 // NullFields is a list of field names (e.g. "Id") to include in API requests 3095 // with the JSON null value. By default, fields with empty values are omitted 3096 // from API requests. See 3097 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3098 NullFields []string `json:"-"` 3099 } 3100 3101 func (s *GoogleCloudDocumentaiV1DocumentProvenance) MarshalJSON() ([]byte, error) { 3102 type NoMethod GoogleCloudDocumentaiV1DocumentProvenance 3103 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3104 } 3105 3106 // GoogleCloudDocumentaiV1DocumentProvenanceParent: The parent element the 3107 // current element is based on. Used for referencing/aligning, removal and 3108 // replacement operations. 3109 type GoogleCloudDocumentaiV1DocumentProvenanceParent struct { 3110 // Id: The id of the parent provenance. 3111 Id int64 `json:"id,omitempty"` 3112 // Index: The index of the parent item in the corresponding item list (eg. list 3113 // of entities, properties within entities, etc.) in the parent revision. 3114 Index int64 `json:"index,omitempty"` 3115 // Revision: The index of the index into current revision's parent_ids list. 3116 Revision int64 `json:"revision,omitempty"` 3117 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 3118 // include in API requests. By default, fields with empty or default values are 3119 // omitted from API requests. See 3120 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3121 // details. 3122 ForceSendFields []string `json:"-"` 3123 // NullFields is a list of field names (e.g. "Id") to include in API requests 3124 // with the JSON null value. By default, fields with empty values are omitted 3125 // from API requests. See 3126 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3127 NullFields []string `json:"-"` 3128 } 3129 3130 func (s *GoogleCloudDocumentaiV1DocumentProvenanceParent) MarshalJSON() ([]byte, error) { 3131 type NoMethod GoogleCloudDocumentaiV1DocumentProvenanceParent 3132 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3133 } 3134 3135 // GoogleCloudDocumentaiV1DocumentRevision: Contains past or forward revisions 3136 // of this document. 3137 type GoogleCloudDocumentaiV1DocumentRevision struct { 3138 // Agent: If the change was made by a person specify the name or id of that 3139 // person. 3140 Agent string `json:"agent,omitempty"` 3141 // CreateTime: The time that the revision was created, internally generated by 3142 // doc proto storage at the time of create. 3143 CreateTime string `json:"createTime,omitempty"` 3144 // HumanReview: Human Review information of this revision. 3145 HumanReview *GoogleCloudDocumentaiV1DocumentRevisionHumanReview `json:"humanReview,omitempty"` 3146 // Id: Id of the revision, internally generated by doc proto storage. Unique 3147 // within the context of the document. 3148 Id string `json:"id,omitempty"` 3149 // Parent: The revisions that this revision is based on. This can include one 3150 // or more parent (when documents are merged.) This field represents the index 3151 // into the `revisions` field. 3152 Parent []int64 `json:"parent,omitempty"` 3153 // ParentIds: The revisions that this revision is based on. Must include all 3154 // the ids that have anything to do with this revision - eg. there are 3155 // `provenance.parent.revision` fields that index into this field. 3156 ParentIds []string `json:"parentIds,omitempty"` 3157 // Processor: If the annotation was made by processor identify the processor by 3158 // its resource name. 3159 Processor string `json:"processor,omitempty"` 3160 // ForceSendFields is a list of field names (e.g. "Agent") to unconditionally 3161 // include in API requests. By default, fields with empty or default values are 3162 // omitted from API requests. See 3163 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3164 // details. 3165 ForceSendFields []string `json:"-"` 3166 // NullFields is a list of field names (e.g. "Agent") to include in API 3167 // requests with the JSON null value. By default, fields with empty values are 3168 // omitted from API requests. See 3169 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3170 NullFields []string `json:"-"` 3171 } 3172 3173 func (s *GoogleCloudDocumentaiV1DocumentRevision) MarshalJSON() ([]byte, error) { 3174 type NoMethod GoogleCloudDocumentaiV1DocumentRevision 3175 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3176 } 3177 3178 // GoogleCloudDocumentaiV1DocumentRevisionHumanReview: Human Review information 3179 // of the document. 3180 type GoogleCloudDocumentaiV1DocumentRevisionHumanReview struct { 3181 // State: Human review state. e.g. `requested`, `succeeded`, `rejected`. 3182 State string `json:"state,omitempty"` 3183 // StateMessage: A message providing more details about the current state of 3184 // processing. For example, the rejection reason when the state is `rejected`. 3185 StateMessage string `json:"stateMessage,omitempty"` 3186 // ForceSendFields is a list of field names (e.g. "State") to unconditionally 3187 // include in API requests. By default, fields with empty or default values are 3188 // omitted from API requests. See 3189 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3190 // details. 3191 ForceSendFields []string `json:"-"` 3192 // NullFields is a list of field names (e.g. "State") to include in API 3193 // requests with the JSON null value. By default, fields with empty values are 3194 // omitted from API requests. See 3195 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3196 NullFields []string `json:"-"` 3197 } 3198 3199 func (s *GoogleCloudDocumentaiV1DocumentRevisionHumanReview) MarshalJSON() ([]byte, error) { 3200 type NoMethod GoogleCloudDocumentaiV1DocumentRevisionHumanReview 3201 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3202 } 3203 3204 // GoogleCloudDocumentaiV1DocumentSchema: The schema defines the output of the 3205 // processed document by a processor. 3206 type GoogleCloudDocumentaiV1DocumentSchema struct { 3207 // Description: Description of the schema. 3208 Description string `json:"description,omitempty"` 3209 // DisplayName: Display name to show to users. 3210 DisplayName string `json:"displayName,omitempty"` 3211 // EntityTypes: Entity types of the schema. 3212 EntityTypes []*GoogleCloudDocumentaiV1DocumentSchemaEntityType `json:"entityTypes,omitempty"` 3213 // Metadata: Metadata of the schema. 3214 Metadata *GoogleCloudDocumentaiV1DocumentSchemaMetadata `json:"metadata,omitempty"` 3215 // ForceSendFields is a list of field names (e.g. "Description") to 3216 // unconditionally include in API requests. By default, fields with empty or 3217 // default values are omitted from API requests. See 3218 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3219 // details. 3220 ForceSendFields []string `json:"-"` 3221 // NullFields is a list of field names (e.g. "Description") to include in API 3222 // requests with the JSON null value. By default, fields with empty values are 3223 // omitted from API requests. See 3224 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3225 NullFields []string `json:"-"` 3226 } 3227 3228 func (s *GoogleCloudDocumentaiV1DocumentSchema) MarshalJSON() ([]byte, error) { 3229 type NoMethod GoogleCloudDocumentaiV1DocumentSchema 3230 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3231 } 3232 3233 // GoogleCloudDocumentaiV1DocumentSchemaEntityType: EntityType is the wrapper 3234 // of a label of the corresponding model with detailed attributes and 3235 // limitations for entity-based processors. Multiple types can also compose a 3236 // dependency tree to represent nested types. 3237 type GoogleCloudDocumentaiV1DocumentSchemaEntityType struct { 3238 // BaseTypes: The entity type that this type is derived from. For now, one and 3239 // only one should be set. 3240 BaseTypes []string `json:"baseTypes,omitempty"` 3241 // DisplayName: User defined name for the type. 3242 DisplayName string `json:"displayName,omitempty"` 3243 // EnumValues: If specified, lists all the possible values for this entity. 3244 // This should not be more than a handful of values. If the number of values is 3245 // >10 or could change frequently use the `EntityType.value_ontology` field and 3246 // specify a list of all possible values in a value ontology file. 3247 EnumValues *GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues `json:"enumValues,omitempty"` 3248 // Name: Name of the type. It must be unique within the schema file and cannot 3249 // be a "Common Type". The following naming conventions are used: - Use 3250 // `snake_casing`. - Name matching is case-sensitive. - Maximum 64 characters. 3251 // - Must start with a letter. - Allowed characters: ASCII letters 3252 // `[a-z0-9_-]`. (For backward compatibility internal infrastructure and 3253 // tooling can handle any ascii character.) - The `/` is sometimes used to 3254 // denote a property of a type. For example `line_item/amount`. This convention 3255 // is deprecated, but will still be honored for backward compatibility. 3256 Name string `json:"name,omitempty"` 3257 // Properties: Description the nested structure, or composition of an entity. 3258 Properties []*GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty `json:"properties,omitempty"` 3259 // ForceSendFields is a list of field names (e.g. "BaseTypes") to 3260 // unconditionally include in API requests. By default, fields with empty or 3261 // default values are omitted from API requests. See 3262 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3263 // details. 3264 ForceSendFields []string `json:"-"` 3265 // NullFields is a list of field names (e.g. "BaseTypes") to include in API 3266 // requests with the JSON null value. By default, fields with empty values are 3267 // omitted from API requests. See 3268 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3269 NullFields []string `json:"-"` 3270 } 3271 3272 func (s *GoogleCloudDocumentaiV1DocumentSchemaEntityType) MarshalJSON() ([]byte, error) { 3273 type NoMethod GoogleCloudDocumentaiV1DocumentSchemaEntityType 3274 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3275 } 3276 3277 // GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues: Defines the a 3278 // list of enum values. 3279 type GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues struct { 3280 // Values: The individual values that this enum values type can include. 3281 Values []string `json:"values,omitempty"` 3282 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally 3283 // include in API requests. By default, fields with empty or default values are 3284 // omitted from API requests. See 3285 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3286 // details. 3287 ForceSendFields []string `json:"-"` 3288 // NullFields is a list of field names (e.g. "Values") to include in API 3289 // requests with the JSON null value. By default, fields with empty values are 3290 // omitted from API requests. See 3291 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3292 NullFields []string `json:"-"` 3293 } 3294 3295 func (s *GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues) MarshalJSON() ([]byte, error) { 3296 type NoMethod GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues 3297 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3298 } 3299 3300 // GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty: Defines properties 3301 // that can be part of the entity type. 3302 type GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty struct { 3303 // DisplayName: User defined name for the property. 3304 DisplayName string `json:"displayName,omitempty"` 3305 // Name: The name of the property. Follows the same guidelines as the 3306 // EntityType name. 3307 Name string `json:"name,omitempty"` 3308 // OccurrenceType: Occurrence type limits the number of instances an entity 3309 // type appears in the document. 3310 // 3311 // Possible values: 3312 // "OCCURRENCE_TYPE_UNSPECIFIED" - Unspecified occurrence type. 3313 // "OPTIONAL_ONCE" - There will be zero or one instance of this entity type. 3314 // The same entity instance may be mentioned multiple times. 3315 // "OPTIONAL_MULTIPLE" - The entity type will appear zero or multiple times. 3316 // "REQUIRED_ONCE" - The entity type will only appear exactly once. The same 3317 // entity instance may be mentioned multiple times. 3318 // "REQUIRED_MULTIPLE" - The entity type will appear once or more times. 3319 OccurrenceType string `json:"occurrenceType,omitempty"` 3320 // ValueType: A reference to the value type of the property. This type is 3321 // subject to the same conventions as the `Entity.base_types` field. 3322 ValueType string `json:"valueType,omitempty"` 3323 // ForceSendFields is a list of field names (e.g. "DisplayName") to 3324 // unconditionally include in API requests. By default, fields with empty or 3325 // default values are omitted from API requests. See 3326 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3327 // details. 3328 ForceSendFields []string `json:"-"` 3329 // NullFields is a list of field names (e.g. "DisplayName") to include in API 3330 // requests with the JSON null value. By default, fields with empty values are 3331 // omitted from API requests. See 3332 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3333 NullFields []string `json:"-"` 3334 } 3335 3336 func (s *GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty) MarshalJSON() ([]byte, error) { 3337 type NoMethod GoogleCloudDocumentaiV1DocumentSchemaEntityTypeProperty 3338 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3339 } 3340 3341 // GoogleCloudDocumentaiV1DocumentSchemaMetadata: Metadata for global schema 3342 // behavior. 3343 type GoogleCloudDocumentaiV1DocumentSchemaMetadata struct { 3344 // DocumentAllowMultipleLabels: If true, on a given page, there can be multiple 3345 // `document` annotations covering it. 3346 DocumentAllowMultipleLabels bool `json:"documentAllowMultipleLabels,omitempty"` 3347 // DocumentSplitter: If true, a `document` entity type can be applied to 3348 // subdocument (splitting). Otherwise, it can only be applied to the entire 3349 // document (classification). 3350 DocumentSplitter bool `json:"documentSplitter,omitempty"` 3351 // PrefixedNamingOnProperties: If set, all the nested entities must be prefixed 3352 // with the parents. 3353 PrefixedNamingOnProperties bool `json:"prefixedNamingOnProperties,omitempty"` 3354 // SkipNamingValidation: If set, we will skip the naming format validation in 3355 // the schema. So the string values in `DocumentSchema.EntityType.name` and 3356 // `DocumentSchema.EntityType.Property.name` will not be checked. 3357 SkipNamingValidation bool `json:"skipNamingValidation,omitempty"` 3358 // ForceSendFields is a list of field names (e.g. 3359 // "DocumentAllowMultipleLabels") to unconditionally include in API requests. 3360 // By default, fields with empty or default values are omitted from API 3361 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields 3362 // for more details. 3363 ForceSendFields []string `json:"-"` 3364 // NullFields is a list of field names (e.g. "DocumentAllowMultipleLabels") to 3365 // include in API requests with the JSON null value. By default, fields with 3366 // empty values are omitted from API requests. See 3367 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3368 NullFields []string `json:"-"` 3369 } 3370 3371 func (s *GoogleCloudDocumentaiV1DocumentSchemaMetadata) MarshalJSON() ([]byte, error) { 3372 type NoMethod GoogleCloudDocumentaiV1DocumentSchemaMetadata 3373 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3374 } 3375 3376 // GoogleCloudDocumentaiV1DocumentShardInfo: For a large document, sharding may 3377 // be performed to produce several document shards. Each document shard 3378 // contains this field to detail which shard it is. 3379 type GoogleCloudDocumentaiV1DocumentShardInfo struct { 3380 // ShardCount: Total number of shards. 3381 ShardCount int64 `json:"shardCount,omitempty,string"` 3382 // ShardIndex: The 0-based index of this shard. 3383 ShardIndex int64 `json:"shardIndex,omitempty,string"` 3384 // TextOffset: The index of the first character in Document.text in the overall 3385 // document global text. 3386 TextOffset int64 `json:"textOffset,omitempty,string"` 3387 // ForceSendFields is a list of field names (e.g. "ShardCount") to 3388 // unconditionally include in API requests. By default, fields with empty or 3389 // default values are omitted from API requests. See 3390 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3391 // details. 3392 ForceSendFields []string `json:"-"` 3393 // NullFields is a list of field names (e.g. "ShardCount") to include in API 3394 // requests with the JSON null value. By default, fields with empty values are 3395 // omitted from API requests. See 3396 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3397 NullFields []string `json:"-"` 3398 } 3399 3400 func (s *GoogleCloudDocumentaiV1DocumentShardInfo) MarshalJSON() ([]byte, error) { 3401 type NoMethod GoogleCloudDocumentaiV1DocumentShardInfo 3402 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3403 } 3404 3405 // GoogleCloudDocumentaiV1DocumentStyle: Annotation for common text style 3406 // attributes. This adheres to CSS conventions as much as possible. 3407 type GoogleCloudDocumentaiV1DocumentStyle struct { 3408 // BackgroundColor: Text background color. 3409 BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` 3410 // Color: Text color. 3411 Color *GoogleTypeColor `json:"color,omitempty"` 3412 // FontFamily: Font family such as `Arial`, `Times New Roman`. 3413 // https://www.w3schools.com/cssref/pr_font_font-family.asp 3414 FontFamily string `json:"fontFamily,omitempty"` 3415 // FontSize: Font size. 3416 FontSize *GoogleCloudDocumentaiV1DocumentStyleFontSize `json:"fontSize,omitempty"` 3417 // FontWeight: Font weight 3418 // (https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are 3419 // `normal`, `bold`, `bolder`, and `lighter`. 3420 FontWeight string `json:"fontWeight,omitempty"` 3421 // TextAnchor: Text anchor indexing into the Document.text. 3422 TextAnchor *GoogleCloudDocumentaiV1DocumentTextAnchor `json:"textAnchor,omitempty"` 3423 // TextDecoration: Text decoration 3424 // (https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS 3425 // standard. 3426 TextDecoration string `json:"textDecoration,omitempty"` 3427 // TextStyle: Text style 3428 // (https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values 3429 // are `normal`, `italic`, and `oblique`. 3430 TextStyle string `json:"textStyle,omitempty"` 3431 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to 3432 // unconditionally include in API requests. By default, fields with empty or 3433 // default values are omitted from API requests. See 3434 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3435 // details. 3436 ForceSendFields []string `json:"-"` 3437 // NullFields is a list of field names (e.g. "BackgroundColor") to include in 3438 // API requests with the JSON null value. By default, fields with empty values 3439 // are omitted from API requests. See 3440 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3441 NullFields []string `json:"-"` 3442 } 3443 3444 func (s *GoogleCloudDocumentaiV1DocumentStyle) MarshalJSON() ([]byte, error) { 3445 type NoMethod GoogleCloudDocumentaiV1DocumentStyle 3446 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3447 } 3448 3449 // GoogleCloudDocumentaiV1DocumentStyleFontSize: Font size with unit. 3450 type GoogleCloudDocumentaiV1DocumentStyleFontSize struct { 3451 // Size: Font size for the text. 3452 Size float64 `json:"size,omitempty"` 3453 // Unit: Unit for the font size. Follows CSS naming (such as `in`, `px`, and 3454 // `pt`). 3455 Unit string `json:"unit,omitempty"` 3456 // ForceSendFields is a list of field names (e.g. "Size") to unconditionally 3457 // include in API requests. By default, fields with empty or default values are 3458 // omitted from API requests. See 3459 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3460 // details. 3461 ForceSendFields []string `json:"-"` 3462 // NullFields is a list of field names (e.g. "Size") to include in API requests 3463 // with the JSON null value. By default, fields with empty values are omitted 3464 // from API requests. See 3465 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3466 NullFields []string `json:"-"` 3467 } 3468 3469 func (s *GoogleCloudDocumentaiV1DocumentStyleFontSize) MarshalJSON() ([]byte, error) { 3470 type NoMethod GoogleCloudDocumentaiV1DocumentStyleFontSize 3471 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3472 } 3473 3474 func (s *GoogleCloudDocumentaiV1DocumentStyleFontSize) UnmarshalJSON(data []byte) error { 3475 type NoMethod GoogleCloudDocumentaiV1DocumentStyleFontSize 3476 var s1 struct { 3477 Size gensupport.JSONFloat64 `json:"size"` 3478 *NoMethod 3479 } 3480 s1.NoMethod = (*NoMethod)(s) 3481 if err := json.Unmarshal(data, &s1); err != nil { 3482 return err 3483 } 3484 s.Size = float64(s1.Size) 3485 return nil 3486 } 3487 3488 // GoogleCloudDocumentaiV1DocumentTextAnchor: Text reference indexing into the 3489 // Document.text. 3490 type GoogleCloudDocumentaiV1DocumentTextAnchor struct { 3491 // Content: Contains the content of the text span so that users do not have to 3492 // look it up in the text_segments. It is always populated for formFields. 3493 Content string `json:"content,omitempty"` 3494 // TextSegments: The text segments from the Document.text. 3495 TextSegments []*GoogleCloudDocumentaiV1DocumentTextAnchorTextSegment `json:"textSegments,omitempty"` 3496 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 3497 // include in API requests. By default, fields with empty or default values are 3498 // omitted from API requests. See 3499 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3500 // details. 3501 ForceSendFields []string `json:"-"` 3502 // NullFields is a list of field names (e.g. "Content") to include in API 3503 // requests with the JSON null value. By default, fields with empty values are 3504 // omitted from API requests. See 3505 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3506 NullFields []string `json:"-"` 3507 } 3508 3509 func (s *GoogleCloudDocumentaiV1DocumentTextAnchor) MarshalJSON() ([]byte, error) { 3510 type NoMethod GoogleCloudDocumentaiV1DocumentTextAnchor 3511 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3512 } 3513 3514 // GoogleCloudDocumentaiV1DocumentTextAnchorTextSegment: A text segment in the 3515 // Document.text. The indices may be out of bounds which indicate that the text 3516 // extends into another document shard for large sharded documents. See 3517 // ShardInfo.text_offset 3518 type GoogleCloudDocumentaiV1DocumentTextAnchorTextSegment struct { 3519 // EndIndex: TextSegment half open end UTF-8 char index in the Document.text. 3520 EndIndex int64 `json:"endIndex,omitempty,string"` 3521 // StartIndex: TextSegment start UTF-8 char index in the Document.text. 3522 StartIndex int64 `json:"startIndex,omitempty,string"` 3523 // ForceSendFields is a list of field names (e.g. "EndIndex") to 3524 // unconditionally include in API requests. By default, fields with empty or 3525 // default values are omitted from API requests. See 3526 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3527 // details. 3528 ForceSendFields []string `json:"-"` 3529 // NullFields is a list of field names (e.g. "EndIndex") to include in API 3530 // requests with the JSON null value. By default, fields with empty values are 3531 // omitted from API requests. See 3532 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3533 NullFields []string `json:"-"` 3534 } 3535 3536 func (s *GoogleCloudDocumentaiV1DocumentTextAnchorTextSegment) MarshalJSON() ([]byte, error) { 3537 type NoMethod GoogleCloudDocumentaiV1DocumentTextAnchorTextSegment 3538 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3539 } 3540 3541 // GoogleCloudDocumentaiV1DocumentTextChange: This message is used for text 3542 // changes aka. OCR corrections. 3543 type GoogleCloudDocumentaiV1DocumentTextChange struct { 3544 // ChangedText: The text that replaces the text identified in the 3545 // `text_anchor`. 3546 ChangedText string `json:"changedText,omitempty"` 3547 // Provenance: The history of this annotation. 3548 Provenance []*GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 3549 // TextAnchor: Provenance of the correction. Text anchor indexing into the 3550 // Document.text. There can only be a single `TextAnchor.text_segments` 3551 // element. If the start and end index of the text segment are the same, the 3552 // text change is inserted before that index. 3553 TextAnchor *GoogleCloudDocumentaiV1DocumentTextAnchor `json:"textAnchor,omitempty"` 3554 // ForceSendFields is a list of field names (e.g. "ChangedText") to 3555 // unconditionally include in API requests. By default, fields with empty or 3556 // default values are omitted from API requests. See 3557 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3558 // details. 3559 ForceSendFields []string `json:"-"` 3560 // NullFields is a list of field names (e.g. "ChangedText") to include in API 3561 // requests with the JSON null value. By default, fields with empty values are 3562 // omitted from API requests. See 3563 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3564 NullFields []string `json:"-"` 3565 } 3566 3567 func (s *GoogleCloudDocumentaiV1DocumentTextChange) MarshalJSON() ([]byte, error) { 3568 type NoMethod GoogleCloudDocumentaiV1DocumentTextChange 3569 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3570 } 3571 3572 // GoogleCloudDocumentaiV1EnableProcessorMetadata: The long-running operation 3573 // metadata for the EnableProcessor method. 3574 type GoogleCloudDocumentaiV1EnableProcessorMetadata struct { 3575 // CommonMetadata: The basic metadata of the long-running operation. 3576 CommonMetadata *GoogleCloudDocumentaiV1CommonOperationMetadata `json:"commonMetadata,omitempty"` 3577 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 3578 // unconditionally include in API requests. By default, fields with empty or 3579 // default values are omitted from API requests. See 3580 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3581 // details. 3582 ForceSendFields []string `json:"-"` 3583 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 3584 // API requests with the JSON null value. By default, fields with empty values 3585 // are omitted from API requests. See 3586 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3587 NullFields []string `json:"-"` 3588 } 3589 3590 func (s *GoogleCloudDocumentaiV1EnableProcessorMetadata) MarshalJSON() ([]byte, error) { 3591 type NoMethod GoogleCloudDocumentaiV1EnableProcessorMetadata 3592 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3593 } 3594 3595 // GoogleCloudDocumentaiV1EnableProcessorRequest: Request message for the 3596 // EnableProcessor method. 3597 type GoogleCloudDocumentaiV1EnableProcessorRequest struct { 3598 } 3599 3600 // GoogleCloudDocumentaiV1EnableProcessorResponse: Response message for the 3601 // EnableProcessor method. Intentionally empty proto for adding fields in 3602 // future. 3603 type GoogleCloudDocumentaiV1EnableProcessorResponse struct { 3604 } 3605 3606 // GoogleCloudDocumentaiV1EvaluateProcessorVersionMetadata: Metadata of the 3607 // EvaluateProcessorVersion method. 3608 type GoogleCloudDocumentaiV1EvaluateProcessorVersionMetadata struct { 3609 // CommonMetadata: The basic metadata of the long-running operation. 3610 CommonMetadata *GoogleCloudDocumentaiV1CommonOperationMetadata `json:"commonMetadata,omitempty"` 3611 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 3612 // unconditionally include in API requests. By default, fields with empty or 3613 // default values are omitted from API requests. See 3614 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3615 // details. 3616 ForceSendFields []string `json:"-"` 3617 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 3618 // API requests with the JSON null value. By default, fields with empty values 3619 // are omitted from API requests. See 3620 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3621 NullFields []string `json:"-"` 3622 } 3623 3624 func (s *GoogleCloudDocumentaiV1EvaluateProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 3625 type NoMethod GoogleCloudDocumentaiV1EvaluateProcessorVersionMetadata 3626 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3627 } 3628 3629 // GoogleCloudDocumentaiV1EvaluateProcessorVersionRequest: Evaluates the given 3630 // ProcessorVersion against the supplied documents. 3631 type GoogleCloudDocumentaiV1EvaluateProcessorVersionRequest struct { 3632 // EvaluationDocuments: Optional. The documents used in the evaluation. If 3633 // unspecified, use the processor's dataset as evaluation input. 3634 EvaluationDocuments *GoogleCloudDocumentaiV1BatchDocumentsInputConfig `json:"evaluationDocuments,omitempty"` 3635 // ForceSendFields is a list of field names (e.g. "EvaluationDocuments") to 3636 // unconditionally include in API requests. By default, fields with empty or 3637 // default values are omitted from API requests. See 3638 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3639 // details. 3640 ForceSendFields []string `json:"-"` 3641 // NullFields is a list of field names (e.g. "EvaluationDocuments") to include 3642 // in API requests with the JSON null value. By default, fields with empty 3643 // values are omitted from API requests. See 3644 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3645 NullFields []string `json:"-"` 3646 } 3647 3648 func (s *GoogleCloudDocumentaiV1EvaluateProcessorVersionRequest) MarshalJSON() ([]byte, error) { 3649 type NoMethod GoogleCloudDocumentaiV1EvaluateProcessorVersionRequest 3650 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3651 } 3652 3653 // GoogleCloudDocumentaiV1EvaluateProcessorVersionResponse: Response of the 3654 // EvaluateProcessorVersion method. 3655 type GoogleCloudDocumentaiV1EvaluateProcessorVersionResponse struct { 3656 // Evaluation: The resource name of the created evaluation. 3657 Evaluation string `json:"evaluation,omitempty"` 3658 // ForceSendFields is a list of field names (e.g. "Evaluation") to 3659 // unconditionally include in API requests. By default, fields with empty or 3660 // default values are omitted from API requests. See 3661 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3662 // details. 3663 ForceSendFields []string `json:"-"` 3664 // NullFields is a list of field names (e.g. "Evaluation") to include in API 3665 // requests with the JSON null value. By default, fields with empty values are 3666 // omitted from API requests. See 3667 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3668 NullFields []string `json:"-"` 3669 } 3670 3671 func (s *GoogleCloudDocumentaiV1EvaluateProcessorVersionResponse) MarshalJSON() ([]byte, error) { 3672 type NoMethod GoogleCloudDocumentaiV1EvaluateProcessorVersionResponse 3673 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3674 } 3675 3676 // GoogleCloudDocumentaiV1Evaluation: An evaluation of a ProcessorVersion's 3677 // performance. 3678 type GoogleCloudDocumentaiV1Evaluation struct { 3679 // AllEntitiesMetrics: Metrics for all the entities in aggregate. 3680 AllEntitiesMetrics *GoogleCloudDocumentaiV1EvaluationMultiConfidenceMetrics `json:"allEntitiesMetrics,omitempty"` 3681 // CreateTime: The time that the evaluation was created. 3682 CreateTime string `json:"createTime,omitempty"` 3683 // DocumentCounters: Counters for the documents used in the evaluation. 3684 DocumentCounters *GoogleCloudDocumentaiV1EvaluationCounters `json:"documentCounters,omitempty"` 3685 // EntityMetrics: Metrics across confidence levels, for different entities. 3686 EntityMetrics map[string]GoogleCloudDocumentaiV1EvaluationMultiConfidenceMetrics `json:"entityMetrics,omitempty"` 3687 // KmsKeyName: The KMS key name used for encryption. 3688 KmsKeyName string `json:"kmsKeyName,omitempty"` 3689 // KmsKeyVersionName: The KMS key version with which data is encrypted. 3690 KmsKeyVersionName string `json:"kmsKeyVersionName,omitempty"` 3691 // Name: The resource name of the evaluation. Format: 3692 // `projects/{project}/locations/{location}/processors/{processor}/processorVers 3693 // ions/{processor_version}/evaluations/{evaluation}` 3694 Name string `json:"name,omitempty"` 3695 3696 // ServerResponse contains the HTTP response code and headers from the server. 3697 googleapi.ServerResponse `json:"-"` 3698 // ForceSendFields is a list of field names (e.g. "AllEntitiesMetrics") to 3699 // unconditionally include in API requests. By default, fields with empty or 3700 // default values are omitted from API requests. See 3701 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3702 // details. 3703 ForceSendFields []string `json:"-"` 3704 // NullFields is a list of field names (e.g. "AllEntitiesMetrics") to include 3705 // in API requests with the JSON null value. By default, fields with empty 3706 // values are omitted from API requests. See 3707 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3708 NullFields []string `json:"-"` 3709 } 3710 3711 func (s *GoogleCloudDocumentaiV1Evaluation) MarshalJSON() ([]byte, error) { 3712 type NoMethod GoogleCloudDocumentaiV1Evaluation 3713 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3714 } 3715 3716 // GoogleCloudDocumentaiV1EvaluationConfidenceLevelMetrics: Evaluations 3717 // metrics, at a specific confidence level. 3718 type GoogleCloudDocumentaiV1EvaluationConfidenceLevelMetrics struct { 3719 // ConfidenceLevel: The confidence level. 3720 ConfidenceLevel float64 `json:"confidenceLevel,omitempty"` 3721 // Metrics: The metrics at the specific confidence level. 3722 Metrics *GoogleCloudDocumentaiV1EvaluationMetrics `json:"metrics,omitempty"` 3723 // ForceSendFields is a list of field names (e.g. "ConfidenceLevel") to 3724 // unconditionally include in API requests. By default, fields with empty or 3725 // default values are omitted from API requests. See 3726 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3727 // details. 3728 ForceSendFields []string `json:"-"` 3729 // NullFields is a list of field names (e.g. "ConfidenceLevel") to include in 3730 // API requests with the JSON null value. By default, fields with empty values 3731 // are omitted from API requests. See 3732 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3733 NullFields []string `json:"-"` 3734 } 3735 3736 func (s *GoogleCloudDocumentaiV1EvaluationConfidenceLevelMetrics) MarshalJSON() ([]byte, error) { 3737 type NoMethod GoogleCloudDocumentaiV1EvaluationConfidenceLevelMetrics 3738 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3739 } 3740 3741 func (s *GoogleCloudDocumentaiV1EvaluationConfidenceLevelMetrics) UnmarshalJSON(data []byte) error { 3742 type NoMethod GoogleCloudDocumentaiV1EvaluationConfidenceLevelMetrics 3743 var s1 struct { 3744 ConfidenceLevel gensupport.JSONFloat64 `json:"confidenceLevel"` 3745 *NoMethod 3746 } 3747 s1.NoMethod = (*NoMethod)(s) 3748 if err := json.Unmarshal(data, &s1); err != nil { 3749 return err 3750 } 3751 s.ConfidenceLevel = float64(s1.ConfidenceLevel) 3752 return nil 3753 } 3754 3755 // GoogleCloudDocumentaiV1EvaluationCounters: Evaluation counters for the 3756 // documents that were used. 3757 type GoogleCloudDocumentaiV1EvaluationCounters struct { 3758 // EvaluatedDocumentsCount: How many documents were used in the evaluation. 3759 EvaluatedDocumentsCount int64 `json:"evaluatedDocumentsCount,omitempty"` 3760 // FailedDocumentsCount: How many documents were not included in the evaluation 3761 // as Document AI failed to process them. 3762 FailedDocumentsCount int64 `json:"failedDocumentsCount,omitempty"` 3763 // InputDocumentsCount: How many documents were sent for evaluation. 3764 InputDocumentsCount int64 `json:"inputDocumentsCount,omitempty"` 3765 // InvalidDocumentsCount: How many documents were not included in the 3766 // evaluation as they didn't pass validation. 3767 InvalidDocumentsCount int64 `json:"invalidDocumentsCount,omitempty"` 3768 // ForceSendFields is a list of field names (e.g. "EvaluatedDocumentsCount") to 3769 // unconditionally include in API requests. By default, fields with empty or 3770 // default values are omitted from API requests. See 3771 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3772 // details. 3773 ForceSendFields []string `json:"-"` 3774 // NullFields is a list of field names (e.g. "EvaluatedDocumentsCount") to 3775 // include in API requests with the JSON null value. By default, fields with 3776 // empty values are omitted from API requests. See 3777 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3778 NullFields []string `json:"-"` 3779 } 3780 3781 func (s *GoogleCloudDocumentaiV1EvaluationCounters) MarshalJSON() ([]byte, error) { 3782 type NoMethod GoogleCloudDocumentaiV1EvaluationCounters 3783 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3784 } 3785 3786 // GoogleCloudDocumentaiV1EvaluationMetrics: Evaluation metrics, either in 3787 // aggregate or about a specific entity. 3788 type GoogleCloudDocumentaiV1EvaluationMetrics struct { 3789 // F1Score: The calculated f1 score. 3790 F1Score float64 `json:"f1Score,omitempty"` 3791 // FalseNegativesCount: The amount of false negatives. 3792 FalseNegativesCount int64 `json:"falseNegativesCount,omitempty"` 3793 // FalsePositivesCount: The amount of false positives. 3794 FalsePositivesCount int64 `json:"falsePositivesCount,omitempty"` 3795 // GroundTruthDocumentCount: The amount of documents with a ground truth 3796 // occurrence. 3797 GroundTruthDocumentCount int64 `json:"groundTruthDocumentCount,omitempty"` 3798 // GroundTruthOccurrencesCount: The amount of occurrences in ground truth 3799 // documents. 3800 GroundTruthOccurrencesCount int64 `json:"groundTruthOccurrencesCount,omitempty"` 3801 // Precision: The calculated precision. 3802 Precision float64 `json:"precision,omitempty"` 3803 // PredictedDocumentCount: The amount of documents with a predicted occurrence. 3804 PredictedDocumentCount int64 `json:"predictedDocumentCount,omitempty"` 3805 // PredictedOccurrencesCount: The amount of occurrences in predicted documents. 3806 PredictedOccurrencesCount int64 `json:"predictedOccurrencesCount,omitempty"` 3807 // Recall: The calculated recall. 3808 Recall float64 `json:"recall,omitempty"` 3809 // TotalDocumentsCount: The amount of documents that had an occurrence of this 3810 // label. 3811 TotalDocumentsCount int64 `json:"totalDocumentsCount,omitempty"` 3812 // TruePositivesCount: The amount of true positives. 3813 TruePositivesCount int64 `json:"truePositivesCount,omitempty"` 3814 // ForceSendFields is a list of field names (e.g. "F1Score") to unconditionally 3815 // include in API requests. By default, fields with empty or default values are 3816 // omitted from API requests. See 3817 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3818 // details. 3819 ForceSendFields []string `json:"-"` 3820 // NullFields is a list of field names (e.g. "F1Score") to include in API 3821 // requests with the JSON null value. By default, fields with empty values are 3822 // omitted from API requests. See 3823 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3824 NullFields []string `json:"-"` 3825 } 3826 3827 func (s *GoogleCloudDocumentaiV1EvaluationMetrics) MarshalJSON() ([]byte, error) { 3828 type NoMethod GoogleCloudDocumentaiV1EvaluationMetrics 3829 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3830 } 3831 3832 func (s *GoogleCloudDocumentaiV1EvaluationMetrics) UnmarshalJSON(data []byte) error { 3833 type NoMethod GoogleCloudDocumentaiV1EvaluationMetrics 3834 var s1 struct { 3835 F1Score gensupport.JSONFloat64 `json:"f1Score"` 3836 Precision gensupport.JSONFloat64 `json:"precision"` 3837 Recall gensupport.JSONFloat64 `json:"recall"` 3838 *NoMethod 3839 } 3840 s1.NoMethod = (*NoMethod)(s) 3841 if err := json.Unmarshal(data, &s1); err != nil { 3842 return err 3843 } 3844 s.F1Score = float64(s1.F1Score) 3845 s.Precision = float64(s1.Precision) 3846 s.Recall = float64(s1.Recall) 3847 return nil 3848 } 3849 3850 // GoogleCloudDocumentaiV1EvaluationMultiConfidenceMetrics: Metrics across 3851 // multiple confidence levels. 3852 type GoogleCloudDocumentaiV1EvaluationMultiConfidenceMetrics struct { 3853 // Auprc: The calculated area under the precision recall curve (AUPRC), 3854 // computed by integrating over all confidence thresholds. 3855 Auprc float64 `json:"auprc,omitempty"` 3856 // AuprcExact: The AUPRC for metrics with fuzzy matching disabled, i.e., exact 3857 // matching only. 3858 AuprcExact float64 `json:"auprcExact,omitempty"` 3859 // ConfidenceLevelMetrics: Metrics across confidence levels with fuzzy matching 3860 // enabled. 3861 ConfidenceLevelMetrics []*GoogleCloudDocumentaiV1EvaluationConfidenceLevelMetrics `json:"confidenceLevelMetrics,omitempty"` 3862 // ConfidenceLevelMetricsExact: Metrics across confidence levels with only 3863 // exact matching. 3864 ConfidenceLevelMetricsExact []*GoogleCloudDocumentaiV1EvaluationConfidenceLevelMetrics `json:"confidenceLevelMetricsExact,omitempty"` 3865 // EstimatedCalibrationError: The Estimated Calibration Error (ECE) of the 3866 // confidence of the predicted entities. 3867 EstimatedCalibrationError float64 `json:"estimatedCalibrationError,omitempty"` 3868 // EstimatedCalibrationErrorExact: The ECE for the predicted entities with 3869 // fuzzy matching disabled, i.e., exact matching only. 3870 EstimatedCalibrationErrorExact float64 `json:"estimatedCalibrationErrorExact,omitempty"` 3871 // MetricsType: The metrics type for the label. 3872 // 3873 // Possible values: 3874 // "METRICS_TYPE_UNSPECIFIED" - The metrics type is unspecified. By default, 3875 // metrics without a particular specification are for leaf entity types (i.e., 3876 // top-level entity types without child types, or child types which are not 3877 // parent types themselves). 3878 // "AGGREGATE" - Indicates whether metrics for this particular label type 3879 // represent an aggregate of metrics for other types instead of being based on 3880 // actual TP/FP/FN values for the label type. Metrics for parent (i.e., 3881 // non-leaf) entity types are an aggregate of metrics for their children. 3882 MetricsType string `json:"metricsType,omitempty"` 3883 // ForceSendFields is a list of field names (e.g. "Auprc") to unconditionally 3884 // include in API requests. By default, fields with empty or default values are 3885 // omitted from API requests. See 3886 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3887 // details. 3888 ForceSendFields []string `json:"-"` 3889 // NullFields is a list of field names (e.g. "Auprc") to include in API 3890 // requests with the JSON null value. By default, fields with empty values are 3891 // omitted from API requests. See 3892 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3893 NullFields []string `json:"-"` 3894 } 3895 3896 func (s *GoogleCloudDocumentaiV1EvaluationMultiConfidenceMetrics) MarshalJSON() ([]byte, error) { 3897 type NoMethod GoogleCloudDocumentaiV1EvaluationMultiConfidenceMetrics 3898 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3899 } 3900 3901 func (s *GoogleCloudDocumentaiV1EvaluationMultiConfidenceMetrics) UnmarshalJSON(data []byte) error { 3902 type NoMethod GoogleCloudDocumentaiV1EvaluationMultiConfidenceMetrics 3903 var s1 struct { 3904 Auprc gensupport.JSONFloat64 `json:"auprc"` 3905 AuprcExact gensupport.JSONFloat64 `json:"auprcExact"` 3906 EstimatedCalibrationError gensupport.JSONFloat64 `json:"estimatedCalibrationError"` 3907 EstimatedCalibrationErrorExact gensupport.JSONFloat64 `json:"estimatedCalibrationErrorExact"` 3908 *NoMethod 3909 } 3910 s1.NoMethod = (*NoMethod)(s) 3911 if err := json.Unmarshal(data, &s1); err != nil { 3912 return err 3913 } 3914 s.Auprc = float64(s1.Auprc) 3915 s.AuprcExact = float64(s1.AuprcExact) 3916 s.EstimatedCalibrationError = float64(s1.EstimatedCalibrationError) 3917 s.EstimatedCalibrationErrorExact = float64(s1.EstimatedCalibrationErrorExact) 3918 return nil 3919 } 3920 3921 // GoogleCloudDocumentaiV1EvaluationReference: Gives a short summary of an 3922 // evaluation, and links to the evaluation itself. 3923 type GoogleCloudDocumentaiV1EvaluationReference struct { 3924 // AggregateMetrics: An aggregate of the statistics for the evaluation with 3925 // fuzzy matching on. 3926 AggregateMetrics *GoogleCloudDocumentaiV1EvaluationMetrics `json:"aggregateMetrics,omitempty"` 3927 // AggregateMetricsExact: An aggregate of the statistics for the evaluation 3928 // with fuzzy matching off. 3929 AggregateMetricsExact *GoogleCloudDocumentaiV1EvaluationMetrics `json:"aggregateMetricsExact,omitempty"` 3930 // Evaluation: The resource name of the evaluation. 3931 Evaluation string `json:"evaluation,omitempty"` 3932 // Operation: The resource name of the Long Running Operation for the 3933 // evaluation. 3934 Operation string `json:"operation,omitempty"` 3935 // ForceSendFields is a list of field names (e.g. "AggregateMetrics") to 3936 // unconditionally include in API requests. By default, fields with empty or 3937 // default values are omitted from API requests. See 3938 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3939 // details. 3940 ForceSendFields []string `json:"-"` 3941 // NullFields is a list of field names (e.g. "AggregateMetrics") to include in 3942 // API requests with the JSON null value. By default, fields with empty values 3943 // are omitted from API requests. See 3944 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3945 NullFields []string `json:"-"` 3946 } 3947 3948 func (s *GoogleCloudDocumentaiV1EvaluationReference) MarshalJSON() ([]byte, error) { 3949 type NoMethod GoogleCloudDocumentaiV1EvaluationReference 3950 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3951 } 3952 3953 // GoogleCloudDocumentaiV1FetchProcessorTypesResponse: Response message for the 3954 // FetchProcessorTypes method. 3955 type GoogleCloudDocumentaiV1FetchProcessorTypesResponse struct { 3956 // ProcessorTypes: The list of processor types. 3957 ProcessorTypes []*GoogleCloudDocumentaiV1ProcessorType `json:"processorTypes,omitempty"` 3958 3959 // ServerResponse contains the HTTP response code and headers from the server. 3960 googleapi.ServerResponse `json:"-"` 3961 // ForceSendFields is a list of field names (e.g. "ProcessorTypes") to 3962 // unconditionally include in API requests. By default, fields with empty or 3963 // default values are omitted from API requests. See 3964 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3965 // details. 3966 ForceSendFields []string `json:"-"` 3967 // NullFields is a list of field names (e.g. "ProcessorTypes") to include in 3968 // API requests with the JSON null value. By default, fields with empty values 3969 // are omitted from API requests. See 3970 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3971 NullFields []string `json:"-"` 3972 } 3973 3974 func (s *GoogleCloudDocumentaiV1FetchProcessorTypesResponse) MarshalJSON() ([]byte, error) { 3975 type NoMethod GoogleCloudDocumentaiV1FetchProcessorTypesResponse 3976 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3977 } 3978 3979 // GoogleCloudDocumentaiV1GcsDocument: Specifies a document stored on Cloud 3980 // Storage. 3981 type GoogleCloudDocumentaiV1GcsDocument struct { 3982 // GcsUri: The Cloud Storage object uri. 3983 GcsUri string `json:"gcsUri,omitempty"` 3984 // MimeType: An IANA MIME type (RFC6838) of the content. 3985 MimeType string `json:"mimeType,omitempty"` 3986 // ForceSendFields is a list of field names (e.g. "GcsUri") to unconditionally 3987 // include in API requests. By default, fields with empty or default values are 3988 // omitted from API requests. See 3989 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3990 // details. 3991 ForceSendFields []string `json:"-"` 3992 // NullFields is a list of field names (e.g. "GcsUri") to include in API 3993 // requests with the JSON null value. By default, fields with empty values are 3994 // omitted from API requests. See 3995 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3996 NullFields []string `json:"-"` 3997 } 3998 3999 func (s *GoogleCloudDocumentaiV1GcsDocument) MarshalJSON() ([]byte, error) { 4000 type NoMethod GoogleCloudDocumentaiV1GcsDocument 4001 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4002 } 4003 4004 // GoogleCloudDocumentaiV1GcsDocuments: Specifies a set of documents on Cloud 4005 // Storage. 4006 type GoogleCloudDocumentaiV1GcsDocuments struct { 4007 // Documents: The list of documents. 4008 Documents []*GoogleCloudDocumentaiV1GcsDocument `json:"documents,omitempty"` 4009 // ForceSendFields is a list of field names (e.g. "Documents") to 4010 // unconditionally include in API requests. By default, fields with empty or 4011 // default values are omitted from API requests. See 4012 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4013 // details. 4014 ForceSendFields []string `json:"-"` 4015 // NullFields is a list of field names (e.g. "Documents") to include in API 4016 // requests with the JSON null value. By default, fields with empty values are 4017 // omitted from API requests. See 4018 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4019 NullFields []string `json:"-"` 4020 } 4021 4022 func (s *GoogleCloudDocumentaiV1GcsDocuments) MarshalJSON() ([]byte, error) { 4023 type NoMethod GoogleCloudDocumentaiV1GcsDocuments 4024 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4025 } 4026 4027 // GoogleCloudDocumentaiV1GcsPrefix: Specifies all documents on Cloud Storage 4028 // with a common prefix. 4029 type GoogleCloudDocumentaiV1GcsPrefix struct { 4030 // GcsUriPrefix: The URI prefix. 4031 GcsUriPrefix string `json:"gcsUriPrefix,omitempty"` 4032 // ForceSendFields is a list of field names (e.g. "GcsUriPrefix") to 4033 // unconditionally include in API requests. By default, fields with empty or 4034 // default values are omitted from API requests. See 4035 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4036 // details. 4037 ForceSendFields []string `json:"-"` 4038 // NullFields is a list of field names (e.g. "GcsUriPrefix") to include in API 4039 // requests with the JSON null value. By default, fields with empty values are 4040 // omitted from API requests. See 4041 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4042 NullFields []string `json:"-"` 4043 } 4044 4045 func (s *GoogleCloudDocumentaiV1GcsPrefix) MarshalJSON() ([]byte, error) { 4046 type NoMethod GoogleCloudDocumentaiV1GcsPrefix 4047 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4048 } 4049 4050 // GoogleCloudDocumentaiV1HumanReviewStatus: The status of human review on a 4051 // processed document. 4052 type GoogleCloudDocumentaiV1HumanReviewStatus struct { 4053 // HumanReviewOperation: The name of the operation triggered by the processed 4054 // document. This field is populated only when the state is 4055 // `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as 4056 // the long-running operation returned by ReviewDocument. 4057 HumanReviewOperation string `json:"humanReviewOperation,omitempty"` 4058 // State: The state of human review on the processing request. 4059 // 4060 // Possible values: 4061 // "STATE_UNSPECIFIED" - Human review state is unspecified. Most likely due 4062 // to an internal error. 4063 // "SKIPPED" - Human review is skipped for the document. This can happen 4064 // because human review isn't enabled on the processor or the processing 4065 // request has been set to skip this document. 4066 // "VALIDATION_PASSED" - Human review validation is triggered and passed, so 4067 // no review is needed. 4068 // "IN_PROGRESS" - Human review validation is triggered and the document is 4069 // under review. 4070 // "ERROR" - Some error happened during triggering human review, see the 4071 // state_message for details. 4072 State string `json:"state,omitempty"` 4073 // StateMessage: A message providing more details about the human review state. 4074 StateMessage string `json:"stateMessage,omitempty"` 4075 // ForceSendFields is a list of field names (e.g. "HumanReviewOperation") to 4076 // unconditionally include in API requests. By default, fields with empty or 4077 // default values are omitted from API requests. See 4078 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4079 // details. 4080 ForceSendFields []string `json:"-"` 4081 // NullFields is a list of field names (e.g. "HumanReviewOperation") to include 4082 // in API requests with the JSON null value. By default, fields with empty 4083 // values are omitted from API requests. See 4084 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4085 NullFields []string `json:"-"` 4086 } 4087 4088 func (s *GoogleCloudDocumentaiV1HumanReviewStatus) MarshalJSON() ([]byte, error) { 4089 type NoMethod GoogleCloudDocumentaiV1HumanReviewStatus 4090 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4091 } 4092 4093 // GoogleCloudDocumentaiV1ListEvaluationsResponse: The response from 4094 // `ListEvaluations`. 4095 type GoogleCloudDocumentaiV1ListEvaluationsResponse struct { 4096 // Evaluations: The evaluations requested. 4097 Evaluations []*GoogleCloudDocumentaiV1Evaluation `json:"evaluations,omitempty"` 4098 // NextPageToken: A token, which can be sent as `page_token` to retrieve the 4099 // next page. If this field is omitted, there are no subsequent pages. 4100 NextPageToken string `json:"nextPageToken,omitempty"` 4101 4102 // ServerResponse contains the HTTP response code and headers from the server. 4103 googleapi.ServerResponse `json:"-"` 4104 // ForceSendFields is a list of field names (e.g. "Evaluations") to 4105 // unconditionally include in API requests. By default, fields with empty or 4106 // default values are omitted from API requests. See 4107 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4108 // details. 4109 ForceSendFields []string `json:"-"` 4110 // NullFields is a list of field names (e.g. "Evaluations") to include in API 4111 // requests with the JSON null value. By default, fields with empty values are 4112 // omitted from API requests. See 4113 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4114 NullFields []string `json:"-"` 4115 } 4116 4117 func (s *GoogleCloudDocumentaiV1ListEvaluationsResponse) MarshalJSON() ([]byte, error) { 4118 type NoMethod GoogleCloudDocumentaiV1ListEvaluationsResponse 4119 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4120 } 4121 4122 // GoogleCloudDocumentaiV1ListProcessorTypesResponse: Response message for the 4123 // ListProcessorTypes method. 4124 type GoogleCloudDocumentaiV1ListProcessorTypesResponse struct { 4125 // NextPageToken: Points to the next page, otherwise empty. 4126 NextPageToken string `json:"nextPageToken,omitempty"` 4127 // ProcessorTypes: The processor types. 4128 ProcessorTypes []*GoogleCloudDocumentaiV1ProcessorType `json:"processorTypes,omitempty"` 4129 4130 // ServerResponse contains the HTTP response code and headers from the server. 4131 googleapi.ServerResponse `json:"-"` 4132 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 4133 // unconditionally include in API requests. By default, fields with empty or 4134 // default values are omitted from API requests. See 4135 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4136 // details. 4137 ForceSendFields []string `json:"-"` 4138 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 4139 // requests with the JSON null value. By default, fields with empty values are 4140 // omitted from API requests. See 4141 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4142 NullFields []string `json:"-"` 4143 } 4144 4145 func (s *GoogleCloudDocumentaiV1ListProcessorTypesResponse) MarshalJSON() ([]byte, error) { 4146 type NoMethod GoogleCloudDocumentaiV1ListProcessorTypesResponse 4147 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4148 } 4149 4150 // GoogleCloudDocumentaiV1ListProcessorVersionsResponse: Response message for 4151 // the ListProcessorVersions method. 4152 type GoogleCloudDocumentaiV1ListProcessorVersionsResponse struct { 4153 // NextPageToken: Points to the next processor, otherwise empty. 4154 NextPageToken string `json:"nextPageToken,omitempty"` 4155 // ProcessorVersions: The list of processors. 4156 ProcessorVersions []*GoogleCloudDocumentaiV1ProcessorVersion `json:"processorVersions,omitempty"` 4157 4158 // ServerResponse contains the HTTP response code and headers from the server. 4159 googleapi.ServerResponse `json:"-"` 4160 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 4161 // unconditionally include in API requests. By default, fields with empty or 4162 // default values are omitted from API requests. See 4163 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4164 // details. 4165 ForceSendFields []string `json:"-"` 4166 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 4167 // requests with the JSON null value. By default, fields with empty values are 4168 // omitted from API requests. See 4169 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4170 NullFields []string `json:"-"` 4171 } 4172 4173 func (s *GoogleCloudDocumentaiV1ListProcessorVersionsResponse) MarshalJSON() ([]byte, error) { 4174 type NoMethod GoogleCloudDocumentaiV1ListProcessorVersionsResponse 4175 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4176 } 4177 4178 // GoogleCloudDocumentaiV1ListProcessorsResponse: Response message for the 4179 // ListProcessors method. 4180 type GoogleCloudDocumentaiV1ListProcessorsResponse struct { 4181 // NextPageToken: Points to the next processor, otherwise empty. 4182 NextPageToken string `json:"nextPageToken,omitempty"` 4183 // Processors: The list of processors. 4184 Processors []*GoogleCloudDocumentaiV1Processor `json:"processors,omitempty"` 4185 4186 // ServerResponse contains the HTTP response code and headers from the server. 4187 googleapi.ServerResponse `json:"-"` 4188 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 4189 // unconditionally include in API requests. By default, fields with empty or 4190 // default values are omitted from API requests. See 4191 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4192 // details. 4193 ForceSendFields []string `json:"-"` 4194 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 4195 // requests with the JSON null value. By default, fields with empty values are 4196 // omitted from API requests. See 4197 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4198 NullFields []string `json:"-"` 4199 } 4200 4201 func (s *GoogleCloudDocumentaiV1ListProcessorsResponse) MarshalJSON() ([]byte, error) { 4202 type NoMethod GoogleCloudDocumentaiV1ListProcessorsResponse 4203 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4204 } 4205 4206 // GoogleCloudDocumentaiV1NormalizedVertex: A vertex represents a 2D point in 4207 // the image. NOTE: the normalized vertex coordinates are relative to the 4208 // original image and range from 0 to 1. 4209 type GoogleCloudDocumentaiV1NormalizedVertex struct { 4210 // X: X coordinate. 4211 X float64 `json:"x,omitempty"` 4212 // Y: Y coordinate (starts from the top of the image). 4213 Y float64 `json:"y,omitempty"` 4214 // ForceSendFields is a list of field names (e.g. "X") to unconditionally 4215 // include in API requests. By default, fields with empty or default values are 4216 // omitted from API requests. See 4217 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4218 // details. 4219 ForceSendFields []string `json:"-"` 4220 // NullFields is a list of field names (e.g. "X") to include in API requests 4221 // with the JSON null value. By default, fields with empty values are omitted 4222 // from API requests. See 4223 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4224 NullFields []string `json:"-"` 4225 } 4226 4227 func (s *GoogleCloudDocumentaiV1NormalizedVertex) MarshalJSON() ([]byte, error) { 4228 type NoMethod GoogleCloudDocumentaiV1NormalizedVertex 4229 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4230 } 4231 4232 func (s *GoogleCloudDocumentaiV1NormalizedVertex) UnmarshalJSON(data []byte) error { 4233 type NoMethod GoogleCloudDocumentaiV1NormalizedVertex 4234 var s1 struct { 4235 X gensupport.JSONFloat64 `json:"x"` 4236 Y gensupport.JSONFloat64 `json:"y"` 4237 *NoMethod 4238 } 4239 s1.NoMethod = (*NoMethod)(s) 4240 if err := json.Unmarshal(data, &s1); err != nil { 4241 return err 4242 } 4243 s.X = float64(s1.X) 4244 s.Y = float64(s1.Y) 4245 return nil 4246 } 4247 4248 // GoogleCloudDocumentaiV1OcrConfig: Config for Document OCR. 4249 type GoogleCloudDocumentaiV1OcrConfig struct { 4250 // AdvancedOcrOptions: A list of advanced OCR options to further fine-tune OCR 4251 // behavior. Current valid values are: - `legacy_layout`: a heuristics layout 4252 // detection algorithm, which serves as an alternative to the current ML-based 4253 // layout detection algorithm. Customers can choose the best suitable layout 4254 // algorithm based on their situation. 4255 AdvancedOcrOptions []string `json:"advancedOcrOptions,omitempty"` 4256 // ComputeStyleInfo: Turn on font identification model and return font style 4257 // information. Deprecated, use PremiumFeatures.compute_style_info instead. 4258 ComputeStyleInfo bool `json:"computeStyleInfo,omitempty"` 4259 // DisableCharacterBoxesDetection: Turn off character box detector in OCR 4260 // engine. Character box detection is enabled by default in OCR 2.0 (and later) 4261 // processors. 4262 DisableCharacterBoxesDetection bool `json:"disableCharacterBoxesDetection,omitempty"` 4263 // EnableImageQualityScores: Enables intelligent document quality scores after 4264 // OCR. Can help with diagnosing why OCR responses are of poor quality for a 4265 // given input. Adds additional latency comparable to regular OCR to the 4266 // process call. 4267 EnableImageQualityScores bool `json:"enableImageQualityScores,omitempty"` 4268 // EnableNativePdfParsing: Enables special handling for PDFs with existing text 4269 // information. Results in better text extraction quality in such PDF inputs. 4270 EnableNativePdfParsing bool `json:"enableNativePdfParsing,omitempty"` 4271 // EnableSymbol: Includes symbol level OCR information if set to true. 4272 EnableSymbol bool `json:"enableSymbol,omitempty"` 4273 // Hints: Hints for the OCR model. 4274 Hints *GoogleCloudDocumentaiV1OcrConfigHints `json:"hints,omitempty"` 4275 // PremiumFeatures: Configurations for premium OCR features. 4276 PremiumFeatures *GoogleCloudDocumentaiV1OcrConfigPremiumFeatures `json:"premiumFeatures,omitempty"` 4277 // ForceSendFields is a list of field names (e.g. "AdvancedOcrOptions") to 4278 // unconditionally include in API requests. By default, fields with empty or 4279 // default values are omitted from API requests. See 4280 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4281 // details. 4282 ForceSendFields []string `json:"-"` 4283 // NullFields is a list of field names (e.g. "AdvancedOcrOptions") to include 4284 // in API requests with the JSON null value. By default, fields with empty 4285 // values are omitted from API requests. See 4286 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4287 NullFields []string `json:"-"` 4288 } 4289 4290 func (s *GoogleCloudDocumentaiV1OcrConfig) MarshalJSON() ([]byte, error) { 4291 type NoMethod GoogleCloudDocumentaiV1OcrConfig 4292 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4293 } 4294 4295 // GoogleCloudDocumentaiV1OcrConfigHints: Hints for OCR Engine 4296 type GoogleCloudDocumentaiV1OcrConfigHints struct { 4297 // LanguageHints: List of BCP-47 language codes to use for OCR. In most cases, 4298 // not specifying it yields the best results since it enables automatic 4299 // language detection. For languages based on the Latin alphabet, setting hints 4300 // is not needed. In rare cases, when the language of the text in the image is 4301 // known, setting a hint will help get better results (although it will be a 4302 // significant hindrance if the hint is wrong). 4303 LanguageHints []string `json:"languageHints,omitempty"` 4304 // ForceSendFields is a list of field names (e.g. "LanguageHints") to 4305 // unconditionally include in API requests. By default, fields with empty or 4306 // default values are omitted from API requests. See 4307 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4308 // details. 4309 ForceSendFields []string `json:"-"` 4310 // NullFields is a list of field names (e.g. "LanguageHints") to include in API 4311 // requests with the JSON null value. By default, fields with empty values are 4312 // omitted from API requests. See 4313 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4314 NullFields []string `json:"-"` 4315 } 4316 4317 func (s *GoogleCloudDocumentaiV1OcrConfigHints) MarshalJSON() ([]byte, error) { 4318 type NoMethod GoogleCloudDocumentaiV1OcrConfigHints 4319 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4320 } 4321 4322 // GoogleCloudDocumentaiV1OcrConfigPremiumFeatures: Configurations for premium 4323 // OCR features. 4324 type GoogleCloudDocumentaiV1OcrConfigPremiumFeatures struct { 4325 // ComputeStyleInfo: Turn on font identification model and return font style 4326 // information. 4327 ComputeStyleInfo bool `json:"computeStyleInfo,omitempty"` 4328 // EnableMathOcr: Turn on the model that can extract LaTeX math formulas. 4329 EnableMathOcr bool `json:"enableMathOcr,omitempty"` 4330 // EnableSelectionMarkDetection: Turn on selection mark detector in OCR engine. 4331 // Only available in OCR 2.0 (and later) processors. 4332 EnableSelectionMarkDetection bool `json:"enableSelectionMarkDetection,omitempty"` 4333 // ForceSendFields is a list of field names (e.g. "ComputeStyleInfo") to 4334 // unconditionally include in API requests. By default, fields with empty or 4335 // default values are omitted from API requests. See 4336 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4337 // details. 4338 ForceSendFields []string `json:"-"` 4339 // NullFields is a list of field names (e.g. "ComputeStyleInfo") to include in 4340 // API requests with the JSON null value. By default, fields with empty values 4341 // are omitted from API requests. See 4342 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4343 NullFields []string `json:"-"` 4344 } 4345 4346 func (s *GoogleCloudDocumentaiV1OcrConfigPremiumFeatures) MarshalJSON() ([]byte, error) { 4347 type NoMethod GoogleCloudDocumentaiV1OcrConfigPremiumFeatures 4348 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4349 } 4350 4351 // GoogleCloudDocumentaiV1ProcessOptions: Options for Process API 4352 type GoogleCloudDocumentaiV1ProcessOptions struct { 4353 // FromEnd: Only process certain pages from the end, same as above. 4354 FromEnd int64 `json:"fromEnd,omitempty"` 4355 // FromStart: Only process certain pages from the start. Process all if the 4356 // document has fewer pages. 4357 FromStart int64 `json:"fromStart,omitempty"` 4358 // IndividualPageSelector: Which pages to process (1-indexed). 4359 IndividualPageSelector *GoogleCloudDocumentaiV1ProcessOptionsIndividualPageSelector `json:"individualPageSelector,omitempty"` 4360 // OcrConfig: Only applicable to `OCR_PROCESSOR` and `FORM_PARSER_PROCESSOR`. 4361 // Returns error if set on other processor types. 4362 OcrConfig *GoogleCloudDocumentaiV1OcrConfig `json:"ocrConfig,omitempty"` 4363 // SchemaOverride: Optional. Override the schema of the ProcessorVersion. Will 4364 // return an Invalid Argument error if this field is set when the underlying 4365 // ProcessorVersion doesn't support schema override. 4366 SchemaOverride *GoogleCloudDocumentaiV1DocumentSchema `json:"schemaOverride,omitempty"` 4367 // ForceSendFields is a list of field names (e.g. "FromEnd") to unconditionally 4368 // include in API requests. By default, fields with empty or default values are 4369 // omitted from API requests. See 4370 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4371 // details. 4372 ForceSendFields []string `json:"-"` 4373 // NullFields is a list of field names (e.g. "FromEnd") to include in API 4374 // requests with the JSON null value. By default, fields with empty values are 4375 // omitted from API requests. See 4376 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4377 NullFields []string `json:"-"` 4378 } 4379 4380 func (s *GoogleCloudDocumentaiV1ProcessOptions) MarshalJSON() ([]byte, error) { 4381 type NoMethod GoogleCloudDocumentaiV1ProcessOptions 4382 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4383 } 4384 4385 // GoogleCloudDocumentaiV1ProcessOptionsIndividualPageSelector: A list of 4386 // individual page numbers. 4387 type GoogleCloudDocumentaiV1ProcessOptionsIndividualPageSelector struct { 4388 // Pages: Optional. Indices of the pages (starting from 1). 4389 Pages []int64 `json:"pages,omitempty"` 4390 // ForceSendFields is a list of field names (e.g. "Pages") to unconditionally 4391 // include in API requests. By default, fields with empty or default values are 4392 // omitted from API requests. See 4393 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4394 // details. 4395 ForceSendFields []string `json:"-"` 4396 // NullFields is a list of field names (e.g. "Pages") to include in API 4397 // requests with the JSON null value. By default, fields with empty values are 4398 // omitted from API requests. See 4399 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4400 NullFields []string `json:"-"` 4401 } 4402 4403 func (s *GoogleCloudDocumentaiV1ProcessOptionsIndividualPageSelector) MarshalJSON() ([]byte, error) { 4404 type NoMethod GoogleCloudDocumentaiV1ProcessOptionsIndividualPageSelector 4405 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4406 } 4407 4408 // GoogleCloudDocumentaiV1ProcessRequest: Request message for the 4409 // ProcessDocument method. 4410 type GoogleCloudDocumentaiV1ProcessRequest struct { 4411 // FieldMask: Specifies which fields to include in the ProcessResponse.document 4412 // output. Only supports top-level document and pages field, so it must be in 4413 // the form of `{document_field_name}` or `pages.{page_field_name}`. 4414 FieldMask string `json:"fieldMask,omitempty"` 4415 // GcsDocument: A raw document on Google Cloud Storage. 4416 GcsDocument *GoogleCloudDocumentaiV1GcsDocument `json:"gcsDocument,omitempty"` 4417 // InlineDocument: An inline document proto. 4418 InlineDocument *GoogleCloudDocumentaiV1Document `json:"inlineDocument,omitempty"` 4419 // Labels: Optional. The labels with user-defined metadata for the request. 4420 // Label keys and values can be no longer than 63 characters (Unicode 4421 // codepoints) and can only contain lowercase letters, numeric characters, 4422 // underscores, and dashes. International characters are allowed. Label values 4423 // are optional. Label keys must start with a letter. 4424 Labels map[string]string `json:"labels,omitempty"` 4425 // ProcessOptions: Inference-time options for the process API 4426 ProcessOptions *GoogleCloudDocumentaiV1ProcessOptions `json:"processOptions,omitempty"` 4427 // RawDocument: A raw document content (bytes). 4428 RawDocument *GoogleCloudDocumentaiV1RawDocument `json:"rawDocument,omitempty"` 4429 // SkipHumanReview: Whether human review should be skipped for this request. 4430 // Default to `false`. 4431 SkipHumanReview bool `json:"skipHumanReview,omitempty"` 4432 // ForceSendFields is a list of field names (e.g. "FieldMask") to 4433 // unconditionally include in API requests. By default, fields with empty or 4434 // default values are omitted from API requests. See 4435 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4436 // details. 4437 ForceSendFields []string `json:"-"` 4438 // NullFields is a list of field names (e.g. "FieldMask") to include in API 4439 // requests with the JSON null value. By default, fields with empty values are 4440 // omitted from API requests. See 4441 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4442 NullFields []string `json:"-"` 4443 } 4444 4445 func (s *GoogleCloudDocumentaiV1ProcessRequest) MarshalJSON() ([]byte, error) { 4446 type NoMethod GoogleCloudDocumentaiV1ProcessRequest 4447 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4448 } 4449 4450 // GoogleCloudDocumentaiV1ProcessResponse: Response message for the 4451 // ProcessDocument method. 4452 type GoogleCloudDocumentaiV1ProcessResponse struct { 4453 // Document: The document payload, will populate fields based on the 4454 // processor's behavior. 4455 Document *GoogleCloudDocumentaiV1Document `json:"document,omitempty"` 4456 // HumanReviewStatus: The status of human review on the processed document. 4457 HumanReviewStatus *GoogleCloudDocumentaiV1HumanReviewStatus `json:"humanReviewStatus,omitempty"` 4458 4459 // ServerResponse contains the HTTP response code and headers from the server. 4460 googleapi.ServerResponse `json:"-"` 4461 // ForceSendFields is a list of field names (e.g. "Document") to 4462 // unconditionally include in API requests. By default, fields with empty or 4463 // default values are omitted from API requests. See 4464 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4465 // details. 4466 ForceSendFields []string `json:"-"` 4467 // NullFields is a list of field names (e.g. "Document") to include in API 4468 // requests with the JSON null value. By default, fields with empty values are 4469 // omitted from API requests. See 4470 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4471 NullFields []string `json:"-"` 4472 } 4473 4474 func (s *GoogleCloudDocumentaiV1ProcessResponse) MarshalJSON() ([]byte, error) { 4475 type NoMethod GoogleCloudDocumentaiV1ProcessResponse 4476 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4477 } 4478 4479 // GoogleCloudDocumentaiV1Processor: The first-class citizen for Document AI. 4480 // Each processor defines how to extract structural information from a 4481 // document. 4482 type GoogleCloudDocumentaiV1Processor struct { 4483 // CreateTime: The time the processor was created. 4484 CreateTime string `json:"createTime,omitempty"` 4485 // DefaultProcessorVersion: The default processor version. 4486 DefaultProcessorVersion string `json:"defaultProcessorVersion,omitempty"` 4487 // DisplayName: The display name of the processor. 4488 DisplayName string `json:"displayName,omitempty"` 4489 // KmsKeyName: The KMS key (https://cloud.google.com/security-key-management) 4490 // used for encryption and decryption in CMEK scenarios. 4491 KmsKeyName string `json:"kmsKeyName,omitempty"` 4492 // Name: Output only. Immutable. The resource name of the processor. Format: 4493 // `projects/{project}/locations/{location}/processors/{processor}` 4494 Name string `json:"name,omitempty"` 4495 // ProcessEndpoint: Output only. Immutable. The http endpoint that can be 4496 // called to invoke processing. 4497 ProcessEndpoint string `json:"processEndpoint,omitempty"` 4498 // ProcessorVersionAliases: Output only. The processor version aliases. 4499 ProcessorVersionAliases []*GoogleCloudDocumentaiV1ProcessorVersionAlias `json:"processorVersionAliases,omitempty"` 4500 // State: Output only. The state of the processor. 4501 // 4502 // Possible values: 4503 // "STATE_UNSPECIFIED" - The processor is in an unspecified state. 4504 // "ENABLED" - The processor is enabled, i.e., has an enabled version which 4505 // can currently serve processing requests and all the feature dependencies 4506 // have been successfully initialized. 4507 // "DISABLED" - The processor is disabled. 4508 // "ENABLING" - The processor is being enabled, will become `ENABLED` if 4509 // successful. 4510 // "DISABLING" - The processor is being disabled, will become `DISABLED` if 4511 // successful. 4512 // "CREATING" - The processor is being created, will become either `ENABLED` 4513 // (for successful creation) or `FAILED` (for failed ones). Once a processor is 4514 // in this state, it can then be used for document processing, but the feature 4515 // dependencies of the processor might not be fully created yet. 4516 // "FAILED" - The processor failed during creation or initialization of 4517 // feature dependencies. The user should delete the processor and recreate one 4518 // as all the functionalities of the processor are disabled. 4519 // "DELETING" - The processor is being deleted, will be removed if 4520 // successful. 4521 State string `json:"state,omitempty"` 4522 // Type: The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. To 4523 // get a list of processor types, see FetchProcessorTypes. 4524 Type string `json:"type,omitempty"` 4525 4526 // ServerResponse contains the HTTP response code and headers from the server. 4527 googleapi.ServerResponse `json:"-"` 4528 // ForceSendFields is a list of field names (e.g. "CreateTime") to 4529 // unconditionally include in API requests. By default, fields with empty or 4530 // default values are omitted from API requests. See 4531 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4532 // details. 4533 ForceSendFields []string `json:"-"` 4534 // NullFields is a list of field names (e.g. "CreateTime") to include in API 4535 // requests with the JSON null value. By default, fields with empty values are 4536 // omitted from API requests. See 4537 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4538 NullFields []string `json:"-"` 4539 } 4540 4541 func (s *GoogleCloudDocumentaiV1Processor) MarshalJSON() ([]byte, error) { 4542 type NoMethod GoogleCloudDocumentaiV1Processor 4543 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4544 } 4545 4546 // GoogleCloudDocumentaiV1ProcessorType: A processor type is responsible for 4547 // performing a certain document understanding task on a certain type of 4548 // document. 4549 type GoogleCloudDocumentaiV1ProcessorType struct { 4550 // AllowCreation: Whether the processor type allows creation. If true, users 4551 // can create a processor of this processor type. Otherwise, users need to 4552 // request access. 4553 AllowCreation bool `json:"allowCreation,omitempty"` 4554 // AvailableLocations: The locations in which this processor is available. 4555 AvailableLocations []*GoogleCloudDocumentaiV1ProcessorTypeLocationInfo `json:"availableLocations,omitempty"` 4556 // Category: The processor category, used by UI to group processor types. 4557 Category string `json:"category,omitempty"` 4558 // LaunchStage: Launch stage of the processor type 4559 // 4560 // Possible values: 4561 // "LAUNCH_STAGE_UNSPECIFIED" - Do not use this default value. 4562 // "UNIMPLEMENTED" - The feature is not yet implemented. Users can not use 4563 // it. 4564 // "PRELAUNCH" - Prelaunch features are hidden from users and are only 4565 // visible internally. 4566 // "EARLY_ACCESS" - Early Access features are limited to a closed group of 4567 // testers. To use these features, you must sign up in advance and sign a 4568 // Trusted Tester agreement (which includes confidentiality provisions). These 4569 // features may be unstable, changed in backward-incompatible ways, and are not 4570 // guaranteed to be released. 4571 // "ALPHA" - Alpha is a limited availability test for releases before they 4572 // are cleared for widespread use. By Alpha, all significant design issues are 4573 // resolved and we are in the process of verifying functionality. Alpha 4574 // customers need to apply for access, agree to applicable terms, and have 4575 // their projects allowlisted. Alpha releases don't have to be feature 4576 // complete, no SLAs are provided, and there are no technical support 4577 // obligations, but they will be far enough along that customers can actually 4578 // use them in test environments or for limited-use tests -- just like they 4579 // would in normal production cases. 4580 // "BETA" - Beta is the point at which we are ready to open a release for any 4581 // customer to use. There are no SLA or technical support obligations in a Beta 4582 // release. Products will be complete from a feature perspective, but may have 4583 // some open outstanding issues. Beta releases are suitable for limited 4584 // production use cases. 4585 // "GA" - GA features are open to all developers and are considered stable 4586 // and fully qualified for production use. 4587 // "DEPRECATED" - Deprecated features are scheduled to be shut down and 4588 // removed. For more information, see the "Deprecation Policy" section of our 4589 // [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud 4590 // Platform Subject to the Deprecation 4591 // Policy](https://cloud.google.com/terms/deprecation) documentation. 4592 LaunchStage string `json:"launchStage,omitempty"` 4593 // Name: The resource name of the processor type. Format: 4594 // `projects/{project}/processorTypes/{processor_type}` 4595 Name string `json:"name,omitempty"` 4596 // SampleDocumentUris: A set of Cloud Storage URIs of sample documents for this 4597 // processor. 4598 SampleDocumentUris []string `json:"sampleDocumentUris,omitempty"` 4599 // Type: The processor type, such as: `OCR_PROCESSOR`, `INVOICE_PROCESSOR`. 4600 Type string `json:"type,omitempty"` 4601 4602 // ServerResponse contains the HTTP response code and headers from the server. 4603 googleapi.ServerResponse `json:"-"` 4604 // ForceSendFields is a list of field names (e.g. "AllowCreation") to 4605 // unconditionally include in API requests. By default, fields with empty or 4606 // default values are omitted from API requests. See 4607 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4608 // details. 4609 ForceSendFields []string `json:"-"` 4610 // NullFields is a list of field names (e.g. "AllowCreation") to include in API 4611 // requests with the JSON null value. By default, fields with empty values are 4612 // omitted from API requests. See 4613 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4614 NullFields []string `json:"-"` 4615 } 4616 4617 func (s *GoogleCloudDocumentaiV1ProcessorType) MarshalJSON() ([]byte, error) { 4618 type NoMethod GoogleCloudDocumentaiV1ProcessorType 4619 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4620 } 4621 4622 // GoogleCloudDocumentaiV1ProcessorTypeLocationInfo: The location information 4623 // about where the processor is available. 4624 type GoogleCloudDocumentaiV1ProcessorTypeLocationInfo struct { 4625 // LocationId: The location ID. For supported locations, refer to regional and 4626 // multi-regional support (/document-ai/docs/regions). 4627 LocationId string `json:"locationId,omitempty"` 4628 // ForceSendFields is a list of field names (e.g. "LocationId") to 4629 // unconditionally include in API requests. By default, fields with empty or 4630 // default values are omitted from API requests. See 4631 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4632 // details. 4633 ForceSendFields []string `json:"-"` 4634 // NullFields is a list of field names (e.g. "LocationId") to include in API 4635 // requests with the JSON null value. By default, fields with empty values are 4636 // omitted from API requests. See 4637 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4638 NullFields []string `json:"-"` 4639 } 4640 4641 func (s *GoogleCloudDocumentaiV1ProcessorTypeLocationInfo) MarshalJSON() ([]byte, error) { 4642 type NoMethod GoogleCloudDocumentaiV1ProcessorTypeLocationInfo 4643 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4644 } 4645 4646 // GoogleCloudDocumentaiV1ProcessorVersion: A processor version is an 4647 // implementation of a processor. Each processor can have multiple versions, 4648 // pretrained by Google internally or uptrained by the customer. A processor 4649 // can only have one default version at a time. Its document-processing 4650 // behavior is defined by that version. 4651 type GoogleCloudDocumentaiV1ProcessorVersion struct { 4652 // CreateTime: The time the processor version was created. 4653 CreateTime string `json:"createTime,omitempty"` 4654 // DeprecationInfo: If set, information about the eventual deprecation of this 4655 // version. 4656 DeprecationInfo *GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo `json:"deprecationInfo,omitempty"` 4657 // DisplayName: The display name of the processor version. 4658 DisplayName string `json:"displayName,omitempty"` 4659 // DocumentSchema: The schema of the processor version. Describes the output. 4660 DocumentSchema *GoogleCloudDocumentaiV1DocumentSchema `json:"documentSchema,omitempty"` 4661 // GoogleManaged: Output only. Denotes that this `ProcessorVersion` is managed 4662 // by Google. 4663 GoogleManaged bool `json:"googleManaged,omitempty"` 4664 // KmsKeyName: The KMS key name used for encryption. 4665 KmsKeyName string `json:"kmsKeyName,omitempty"` 4666 // KmsKeyVersionName: The KMS key version with which data is encrypted. 4667 KmsKeyVersionName string `json:"kmsKeyVersionName,omitempty"` 4668 // LatestEvaluation: The most recently invoked evaluation for the processor 4669 // version. 4670 LatestEvaluation *GoogleCloudDocumentaiV1EvaluationReference `json:"latestEvaluation,omitempty"` 4671 // ModelType: Output only. The model type of this processor version. 4672 // 4673 // Possible values: 4674 // "MODEL_TYPE_UNSPECIFIED" - The processor version has unspecified model 4675 // type. 4676 // "MODEL_TYPE_GENERATIVE" - The processor version has generative model type. 4677 // "MODEL_TYPE_CUSTOM" - The processor version has custom model type. 4678 ModelType string `json:"modelType,omitempty"` 4679 // Name: Identifier. The resource name of the processor version. Format: 4680 // `projects/{project}/locations/{location}/processors/{processor}/processorVers 4681 // ions/{processor_version}` 4682 Name string `json:"name,omitempty"` 4683 // State: Output only. The state of the processor version. 4684 // 4685 // Possible values: 4686 // "STATE_UNSPECIFIED" - The processor version is in an unspecified state. 4687 // "DEPLOYED" - The processor version is deployed and can be used for 4688 // processing. 4689 // "DEPLOYING" - The processor version is being deployed. 4690 // "UNDEPLOYED" - The processor version is not deployed and cannot be used 4691 // for processing. 4692 // "UNDEPLOYING" - The processor version is being undeployed. 4693 // "CREATING" - The processor version is being created. 4694 // "DELETING" - The processor version is being deleted. 4695 // "FAILED" - The processor version failed and is in an indeterminate state. 4696 // "IMPORTING" - The processor version is being imported. 4697 State string `json:"state,omitempty"` 4698 4699 // ServerResponse contains the HTTP response code and headers from the server. 4700 googleapi.ServerResponse `json:"-"` 4701 // ForceSendFields is a list of field names (e.g. "CreateTime") to 4702 // unconditionally include in API requests. By default, fields with empty or 4703 // default values are omitted from API requests. See 4704 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4705 // details. 4706 ForceSendFields []string `json:"-"` 4707 // NullFields is a list of field names (e.g. "CreateTime") to include in API 4708 // requests with the JSON null value. By default, fields with empty values are 4709 // omitted from API requests. See 4710 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4711 NullFields []string `json:"-"` 4712 } 4713 4714 func (s *GoogleCloudDocumentaiV1ProcessorVersion) MarshalJSON() ([]byte, error) { 4715 type NoMethod GoogleCloudDocumentaiV1ProcessorVersion 4716 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4717 } 4718 4719 // GoogleCloudDocumentaiV1ProcessorVersionAlias: Contains the alias and the 4720 // aliased resource name of processor version. 4721 type GoogleCloudDocumentaiV1ProcessorVersionAlias struct { 4722 // Alias: The alias in the form of `processor_version` resource name. 4723 Alias string `json:"alias,omitempty"` 4724 // ProcessorVersion: The resource name of aliased processor version. 4725 ProcessorVersion string `json:"processorVersion,omitempty"` 4726 // ForceSendFields is a list of field names (e.g. "Alias") to unconditionally 4727 // include in API requests. By default, fields with empty or default values are 4728 // omitted from API requests. See 4729 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4730 // details. 4731 ForceSendFields []string `json:"-"` 4732 // NullFields is a list of field names (e.g. "Alias") to include in API 4733 // requests with the JSON null value. By default, fields with empty values are 4734 // omitted from API requests. See 4735 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4736 NullFields []string `json:"-"` 4737 } 4738 4739 func (s *GoogleCloudDocumentaiV1ProcessorVersionAlias) MarshalJSON() ([]byte, error) { 4740 type NoMethod GoogleCloudDocumentaiV1ProcessorVersionAlias 4741 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4742 } 4743 4744 // GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo: Information about 4745 // the upcoming deprecation of this processor version. 4746 type GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo struct { 4747 // DeprecationTime: The time at which this processor version will be 4748 // deprecated. 4749 DeprecationTime string `json:"deprecationTime,omitempty"` 4750 // ReplacementProcessorVersion: If set, the processor version that will be used 4751 // as a replacement. 4752 ReplacementProcessorVersion string `json:"replacementProcessorVersion,omitempty"` 4753 // ForceSendFields is a list of field names (e.g. "DeprecationTime") to 4754 // unconditionally include in API requests. By default, fields with empty or 4755 // default values are omitted from API requests. See 4756 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4757 // details. 4758 ForceSendFields []string `json:"-"` 4759 // NullFields is a list of field names (e.g. "DeprecationTime") to include in 4760 // API requests with the JSON null value. By default, fields with empty values 4761 // are omitted from API requests. See 4762 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4763 NullFields []string `json:"-"` 4764 } 4765 4766 func (s *GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo) MarshalJSON() ([]byte, error) { 4767 type NoMethod GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo 4768 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4769 } 4770 4771 // GoogleCloudDocumentaiV1RawDocument: Payload message of raw document content 4772 // (bytes). 4773 type GoogleCloudDocumentaiV1RawDocument struct { 4774 // Content: Inline document content. 4775 Content string `json:"content,omitempty"` 4776 // DisplayName: The display name of the document, it supports all Unicode 4777 // characters except the following: `*`, `?`, `[`, `]`, `%`, `{`, `}`,`'`, 4778 // `\", `,` `~`, `=` and `:` are reserved. If not specified, a default ID is 4779 // generated. 4780 DisplayName string `json:"displayName,omitempty"` 4781 // MimeType: An IANA MIME type (RFC6838) indicating the nature and format of 4782 // the content. 4783 MimeType string `json:"mimeType,omitempty"` 4784 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 4785 // include in API requests. By default, fields with empty or default values are 4786 // omitted from API requests. See 4787 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4788 // details. 4789 ForceSendFields []string `json:"-"` 4790 // NullFields is a list of field names (e.g. "Content") to include in API 4791 // requests with the JSON null value. By default, fields with empty values are 4792 // omitted from API requests. See 4793 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4794 NullFields []string `json:"-"` 4795 } 4796 4797 func (s *GoogleCloudDocumentaiV1RawDocument) MarshalJSON() ([]byte, error) { 4798 type NoMethod GoogleCloudDocumentaiV1RawDocument 4799 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4800 } 4801 4802 // GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata: The long-running 4803 // operation metadata for the ReviewDocument method. 4804 type GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata struct { 4805 // CommonMetadata: The basic metadata of the long-running operation. 4806 CommonMetadata *GoogleCloudDocumentaiV1CommonOperationMetadata `json:"commonMetadata,omitempty"` 4807 // QuestionId: The Crowd Compute question ID. 4808 QuestionId string `json:"questionId,omitempty"` 4809 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 4810 // unconditionally include in API requests. By default, fields with empty or 4811 // default values are omitted from API requests. See 4812 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4813 // details. 4814 ForceSendFields []string `json:"-"` 4815 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 4816 // API requests with the JSON null value. By default, fields with empty values 4817 // are omitted from API requests. See 4818 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4819 NullFields []string `json:"-"` 4820 } 4821 4822 func (s *GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata) MarshalJSON() ([]byte, error) { 4823 type NoMethod GoogleCloudDocumentaiV1ReviewDocumentOperationMetadata 4824 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4825 } 4826 4827 // GoogleCloudDocumentaiV1ReviewDocumentRequest: Request message for the 4828 // ReviewDocument method. 4829 type GoogleCloudDocumentaiV1ReviewDocumentRequest struct { 4830 // DocumentSchema: The document schema of the human review task. 4831 DocumentSchema *GoogleCloudDocumentaiV1DocumentSchema `json:"documentSchema,omitempty"` 4832 // EnableSchemaValidation: Whether the validation should be performed on the 4833 // ad-hoc review request. 4834 EnableSchemaValidation bool `json:"enableSchemaValidation,omitempty"` 4835 // InlineDocument: An inline document proto. 4836 InlineDocument *GoogleCloudDocumentaiV1Document `json:"inlineDocument,omitempty"` 4837 // Priority: The priority of the human review task. 4838 // 4839 // Possible values: 4840 // "DEFAULT" - The default priority level. 4841 // "URGENT" - The urgent priority level. The labeling manager should allocate 4842 // labeler resource to the urgent task queue to respect this priority level. 4843 Priority string `json:"priority,omitempty"` 4844 // ForceSendFields is a list of field names (e.g. "DocumentSchema") to 4845 // unconditionally include in API requests. By default, fields with empty or 4846 // default values are omitted from API requests. See 4847 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4848 // details. 4849 ForceSendFields []string `json:"-"` 4850 // NullFields is a list of field names (e.g. "DocumentSchema") to include in 4851 // API requests with the JSON null value. By default, fields with empty values 4852 // are omitted from API requests. See 4853 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4854 NullFields []string `json:"-"` 4855 } 4856 4857 func (s *GoogleCloudDocumentaiV1ReviewDocumentRequest) MarshalJSON() ([]byte, error) { 4858 type NoMethod GoogleCloudDocumentaiV1ReviewDocumentRequest 4859 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4860 } 4861 4862 // GoogleCloudDocumentaiV1ReviewDocumentResponse: Response message for the 4863 // ReviewDocument method. 4864 type GoogleCloudDocumentaiV1ReviewDocumentResponse struct { 4865 // GcsDestination: The Cloud Storage uri for the human reviewed document if the 4866 // review is succeeded. 4867 GcsDestination string `json:"gcsDestination,omitempty"` 4868 // RejectionReason: The reason why the review is rejected by reviewer. 4869 RejectionReason string `json:"rejectionReason,omitempty"` 4870 // State: The state of the review operation. 4871 // 4872 // Possible values: 4873 // "STATE_UNSPECIFIED" - The default value. This value is used if the state 4874 // is omitted. 4875 // "REJECTED" - The review operation is rejected by the reviewer. 4876 // "SUCCEEDED" - The review operation is succeeded. 4877 State string `json:"state,omitempty"` 4878 // ForceSendFields is a list of field names (e.g. "GcsDestination") to 4879 // unconditionally include in API requests. By default, fields with empty or 4880 // default values are omitted from API requests. See 4881 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4882 // details. 4883 ForceSendFields []string `json:"-"` 4884 // NullFields is a list of field names (e.g. "GcsDestination") to include in 4885 // API requests with the JSON null value. By default, fields with empty values 4886 // are omitted from API requests. See 4887 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4888 NullFields []string `json:"-"` 4889 } 4890 4891 func (s *GoogleCloudDocumentaiV1ReviewDocumentResponse) MarshalJSON() ([]byte, error) { 4892 type NoMethod GoogleCloudDocumentaiV1ReviewDocumentResponse 4893 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4894 } 4895 4896 // GoogleCloudDocumentaiV1SetDefaultProcessorVersionMetadata: The long-running 4897 // operation metadata for the SetDefaultProcessorVersion method. 4898 type GoogleCloudDocumentaiV1SetDefaultProcessorVersionMetadata struct { 4899 // CommonMetadata: The basic metadata of the long-running operation. 4900 CommonMetadata *GoogleCloudDocumentaiV1CommonOperationMetadata `json:"commonMetadata,omitempty"` 4901 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 4902 // unconditionally include in API requests. By default, fields with empty or 4903 // default values are omitted from API requests. See 4904 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4905 // details. 4906 ForceSendFields []string `json:"-"` 4907 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 4908 // API requests with the JSON null value. By default, fields with empty values 4909 // are omitted from API requests. See 4910 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4911 NullFields []string `json:"-"` 4912 } 4913 4914 func (s *GoogleCloudDocumentaiV1SetDefaultProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 4915 type NoMethod GoogleCloudDocumentaiV1SetDefaultProcessorVersionMetadata 4916 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4917 } 4918 4919 // GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest: Request message 4920 // for the SetDefaultProcessorVersion method. 4921 type GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest struct { 4922 // DefaultProcessorVersion: Required. The resource name of child 4923 // ProcessorVersion to use as default. Format: 4924 // `projects/{project}/locations/{location}/processors/{processor}/processorVers 4925 // ions/{version}` 4926 DefaultProcessorVersion string `json:"defaultProcessorVersion,omitempty"` 4927 // ForceSendFields is a list of field names (e.g. "DefaultProcessorVersion") to 4928 // unconditionally include in API requests. By default, fields with empty or 4929 // default values are omitted from API requests. See 4930 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4931 // details. 4932 ForceSendFields []string `json:"-"` 4933 // NullFields is a list of field names (e.g. "DefaultProcessorVersion") to 4934 // include in API requests with the JSON null value. By default, fields with 4935 // empty values are omitted from API requests. See 4936 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4937 NullFields []string `json:"-"` 4938 } 4939 4940 func (s *GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest) MarshalJSON() ([]byte, error) { 4941 type NoMethod GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest 4942 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4943 } 4944 4945 // GoogleCloudDocumentaiV1SetDefaultProcessorVersionResponse: Response message 4946 // for the SetDefaultProcessorVersion method. 4947 type GoogleCloudDocumentaiV1SetDefaultProcessorVersionResponse struct { 4948 } 4949 4950 // GoogleCloudDocumentaiV1TrainProcessorVersionMetadata: The metadata that 4951 // represents a processor version being created. 4952 type GoogleCloudDocumentaiV1TrainProcessorVersionMetadata struct { 4953 // CommonMetadata: The basic metadata of the long-running operation. 4954 CommonMetadata *GoogleCloudDocumentaiV1CommonOperationMetadata `json:"commonMetadata,omitempty"` 4955 // TestDatasetValidation: The test dataset validation information. 4956 TestDatasetValidation *GoogleCloudDocumentaiV1TrainProcessorVersionMetadataDatasetValidation `json:"testDatasetValidation,omitempty"` 4957 // TrainingDatasetValidation: The training dataset validation information. 4958 TrainingDatasetValidation *GoogleCloudDocumentaiV1TrainProcessorVersionMetadataDatasetValidation `json:"trainingDatasetValidation,omitempty"` 4959 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 4960 // unconditionally include in API requests. By default, fields with empty or 4961 // default values are omitted from API requests. See 4962 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4963 // details. 4964 ForceSendFields []string `json:"-"` 4965 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 4966 // API requests with the JSON null value. By default, fields with empty values 4967 // are omitted from API requests. See 4968 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4969 NullFields []string `json:"-"` 4970 } 4971 4972 func (s *GoogleCloudDocumentaiV1TrainProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 4973 type NoMethod GoogleCloudDocumentaiV1TrainProcessorVersionMetadata 4974 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4975 } 4976 4977 // GoogleCloudDocumentaiV1TrainProcessorVersionMetadataDatasetValidation: The 4978 // dataset validation information. This includes any and all errors with 4979 // documents and the dataset. 4980 type GoogleCloudDocumentaiV1TrainProcessorVersionMetadataDatasetValidation struct { 4981 // DatasetErrorCount: The total number of dataset errors. 4982 DatasetErrorCount int64 `json:"datasetErrorCount,omitempty"` 4983 // DatasetErrors: Error information for the dataset as a whole. A maximum of 10 4984 // dataset errors will be returned. A single dataset error is terminal for 4985 // training. 4986 DatasetErrors []*GoogleRpcStatus `json:"datasetErrors,omitempty"` 4987 // DocumentErrorCount: The total number of document errors. 4988 DocumentErrorCount int64 `json:"documentErrorCount,omitempty"` 4989 // DocumentErrors: Error information pertaining to specific documents. A 4990 // maximum of 10 document errors will be returned. Any document with errors 4991 // will not be used throughout training. 4992 DocumentErrors []*GoogleRpcStatus `json:"documentErrors,omitempty"` 4993 // ForceSendFields is a list of field names (e.g. "DatasetErrorCount") to 4994 // unconditionally include in API requests. By default, fields with empty or 4995 // default values are omitted from API requests. See 4996 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4997 // details. 4998 ForceSendFields []string `json:"-"` 4999 // NullFields is a list of field names (e.g. "DatasetErrorCount") to include in 5000 // API requests with the JSON null value. By default, fields with empty values 5001 // are omitted from API requests. See 5002 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5003 NullFields []string `json:"-"` 5004 } 5005 5006 func (s *GoogleCloudDocumentaiV1TrainProcessorVersionMetadataDatasetValidation) MarshalJSON() ([]byte, error) { 5007 type NoMethod GoogleCloudDocumentaiV1TrainProcessorVersionMetadataDatasetValidation 5008 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5009 } 5010 5011 // GoogleCloudDocumentaiV1TrainProcessorVersionRequest: Request message for the 5012 // TrainProcessorVersion method. 5013 type GoogleCloudDocumentaiV1TrainProcessorVersionRequest struct { 5014 // BaseProcessorVersion: Optional. The processor version to use as a base for 5015 // training. This processor version must be a child of `parent`. Format: 5016 // `projects/{project}/locations/{location}/processors/{processor}/processorVers 5017 // ions/{processorVersion}`. 5018 BaseProcessorVersion string `json:"baseProcessorVersion,omitempty"` 5019 // CustomDocumentExtractionOptions: Options to control Custom Document 5020 // Extraction (CDE) Processor. 5021 CustomDocumentExtractionOptions *GoogleCloudDocumentaiV1TrainProcessorVersionRequestCustomDocumentExtractionOptions `json:"customDocumentExtractionOptions,omitempty"` 5022 // DocumentSchema: Optional. The schema the processor version will be trained 5023 // with. 5024 DocumentSchema *GoogleCloudDocumentaiV1DocumentSchema `json:"documentSchema,omitempty"` 5025 // FoundationModelTuningOptions: Options to control foundation model tuning of 5026 // a processor. 5027 FoundationModelTuningOptions *GoogleCloudDocumentaiV1TrainProcessorVersionRequestFoundationModelTuningOptions `json:"foundationModelTuningOptions,omitempty"` 5028 // InputData: Optional. The input data used to train the ProcessorVersion. 5029 InputData *GoogleCloudDocumentaiV1TrainProcessorVersionRequestInputData `json:"inputData,omitempty"` 5030 // ProcessorVersion: Required. The processor version to be created. 5031 ProcessorVersion *GoogleCloudDocumentaiV1ProcessorVersion `json:"processorVersion,omitempty"` 5032 // ForceSendFields is a list of field names (e.g. "BaseProcessorVersion") to 5033 // unconditionally include in API requests. By default, fields with empty or 5034 // default values are omitted from API requests. See 5035 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5036 // details. 5037 ForceSendFields []string `json:"-"` 5038 // NullFields is a list of field names (e.g. "BaseProcessorVersion") to include 5039 // in API requests with the JSON null value. By default, fields with empty 5040 // values are omitted from API requests. See 5041 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5042 NullFields []string `json:"-"` 5043 } 5044 5045 func (s *GoogleCloudDocumentaiV1TrainProcessorVersionRequest) MarshalJSON() ([]byte, error) { 5046 type NoMethod GoogleCloudDocumentaiV1TrainProcessorVersionRequest 5047 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5048 } 5049 5050 // GoogleCloudDocumentaiV1TrainProcessorVersionRequestCustomDocumentExtractionOp 5051 // tions: Options to control the training of the Custom Document Extraction 5052 // (CDE) Processor. 5053 type GoogleCloudDocumentaiV1TrainProcessorVersionRequestCustomDocumentExtractionOptions struct { 5054 // TrainingMethod: Training method to use for CDE training. 5055 // 5056 // Possible values: 5057 // "TRAINING_METHOD_UNSPECIFIED" 5058 // "MODEL_BASED" 5059 // "TEMPLATE_BASED" 5060 TrainingMethod string `json:"trainingMethod,omitempty"` 5061 // ForceSendFields is a list of field names (e.g. "TrainingMethod") to 5062 // unconditionally include in API requests. By default, fields with empty or 5063 // default values are omitted from API requests. See 5064 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5065 // details. 5066 ForceSendFields []string `json:"-"` 5067 // NullFields is a list of field names (e.g. "TrainingMethod") to include in 5068 // API requests with the JSON null value. By default, fields with empty values 5069 // are omitted from API requests. See 5070 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5071 NullFields []string `json:"-"` 5072 } 5073 5074 func (s *GoogleCloudDocumentaiV1TrainProcessorVersionRequestCustomDocumentExtractionOptions) MarshalJSON() ([]byte, error) { 5075 type NoMethod GoogleCloudDocumentaiV1TrainProcessorVersionRequestCustomDocumentExtractionOptions 5076 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5077 } 5078 5079 // GoogleCloudDocumentaiV1TrainProcessorVersionRequestFoundationModelTuningOptio 5080 // ns: Options to control foundation model tuning of the processor. 5081 type GoogleCloudDocumentaiV1TrainProcessorVersionRequestFoundationModelTuningOptions struct { 5082 // LearningRateMultiplier: Optional. The multiplier to apply to the recommended 5083 // learning rate. Valid values are between 0.1 and 10. If not provided, 5084 // recommended learning rate will be used. 5085 LearningRateMultiplier float64 `json:"learningRateMultiplier,omitempty"` 5086 // TrainSteps: Optional. The number of steps to run for model tuning. Valid 5087 // values are between 1 and 400. If not provided, recommended steps will be 5088 // used. 5089 TrainSteps int64 `json:"trainSteps,omitempty"` 5090 // ForceSendFields is a list of field names (e.g. "LearningRateMultiplier") to 5091 // unconditionally include in API requests. By default, fields with empty or 5092 // default values are omitted from API requests. See 5093 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5094 // details. 5095 ForceSendFields []string `json:"-"` 5096 // NullFields is a list of field names (e.g. "LearningRateMultiplier") to 5097 // include in API requests with the JSON null value. By default, fields with 5098 // empty values are omitted from API requests. See 5099 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5100 NullFields []string `json:"-"` 5101 } 5102 5103 func (s *GoogleCloudDocumentaiV1TrainProcessorVersionRequestFoundationModelTuningOptions) MarshalJSON() ([]byte, error) { 5104 type NoMethod GoogleCloudDocumentaiV1TrainProcessorVersionRequestFoundationModelTuningOptions 5105 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5106 } 5107 5108 func (s *GoogleCloudDocumentaiV1TrainProcessorVersionRequestFoundationModelTuningOptions) UnmarshalJSON(data []byte) error { 5109 type NoMethod GoogleCloudDocumentaiV1TrainProcessorVersionRequestFoundationModelTuningOptions 5110 var s1 struct { 5111 LearningRateMultiplier gensupport.JSONFloat64 `json:"learningRateMultiplier"` 5112 *NoMethod 5113 } 5114 s1.NoMethod = (*NoMethod)(s) 5115 if err := json.Unmarshal(data, &s1); err != nil { 5116 return err 5117 } 5118 s.LearningRateMultiplier = float64(s1.LearningRateMultiplier) 5119 return nil 5120 } 5121 5122 // GoogleCloudDocumentaiV1TrainProcessorVersionRequestInputData: The input data 5123 // used to train a new ProcessorVersion. 5124 type GoogleCloudDocumentaiV1TrainProcessorVersionRequestInputData struct { 5125 // TestDocuments: The documents used for testing the trained version. 5126 TestDocuments *GoogleCloudDocumentaiV1BatchDocumentsInputConfig `json:"testDocuments,omitempty"` 5127 // TrainingDocuments: The documents used for training the new version. 5128 TrainingDocuments *GoogleCloudDocumentaiV1BatchDocumentsInputConfig `json:"trainingDocuments,omitempty"` 5129 // ForceSendFields is a list of field names (e.g. "TestDocuments") to 5130 // unconditionally include in API requests. By default, fields with empty or 5131 // default values are omitted from API requests. See 5132 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5133 // details. 5134 ForceSendFields []string `json:"-"` 5135 // NullFields is a list of field names (e.g. "TestDocuments") to include in API 5136 // requests with the JSON null value. By default, fields with empty values are 5137 // omitted from API requests. See 5138 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5139 NullFields []string `json:"-"` 5140 } 5141 5142 func (s *GoogleCloudDocumentaiV1TrainProcessorVersionRequestInputData) MarshalJSON() ([]byte, error) { 5143 type NoMethod GoogleCloudDocumentaiV1TrainProcessorVersionRequestInputData 5144 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5145 } 5146 5147 // GoogleCloudDocumentaiV1TrainProcessorVersionResponse: The response for 5148 // TrainProcessorVersion. 5149 type GoogleCloudDocumentaiV1TrainProcessorVersionResponse struct { 5150 // ProcessorVersion: The resource name of the processor version produced by 5151 // training. 5152 ProcessorVersion string `json:"processorVersion,omitempty"` 5153 // ForceSendFields is a list of field names (e.g. "ProcessorVersion") to 5154 // unconditionally include in API requests. By default, fields with empty or 5155 // default values are omitted from API requests. See 5156 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5157 // details. 5158 ForceSendFields []string `json:"-"` 5159 // NullFields is a list of field names (e.g. "ProcessorVersion") to include in 5160 // API requests with the JSON null value. By default, fields with empty values 5161 // are omitted from API requests. See 5162 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5163 NullFields []string `json:"-"` 5164 } 5165 5166 func (s *GoogleCloudDocumentaiV1TrainProcessorVersionResponse) MarshalJSON() ([]byte, error) { 5167 type NoMethod GoogleCloudDocumentaiV1TrainProcessorVersionResponse 5168 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5169 } 5170 5171 // GoogleCloudDocumentaiV1UndeployProcessorVersionMetadata: The long-running 5172 // operation metadata for the UndeployProcessorVersion method. 5173 type GoogleCloudDocumentaiV1UndeployProcessorVersionMetadata struct { 5174 // CommonMetadata: The basic metadata of the long-running operation. 5175 CommonMetadata *GoogleCloudDocumentaiV1CommonOperationMetadata `json:"commonMetadata,omitempty"` 5176 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 5177 // unconditionally include in API requests. By default, fields with empty or 5178 // default values are omitted from API requests. See 5179 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5180 // details. 5181 ForceSendFields []string `json:"-"` 5182 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 5183 // API requests with the JSON null value. By default, fields with empty values 5184 // are omitted from API requests. See 5185 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5186 NullFields []string `json:"-"` 5187 } 5188 5189 func (s *GoogleCloudDocumentaiV1UndeployProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 5190 type NoMethod GoogleCloudDocumentaiV1UndeployProcessorVersionMetadata 5191 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5192 } 5193 5194 // GoogleCloudDocumentaiV1UndeployProcessorVersionRequest: Request message for 5195 // the UndeployProcessorVersion method. 5196 type GoogleCloudDocumentaiV1UndeployProcessorVersionRequest struct { 5197 } 5198 5199 // GoogleCloudDocumentaiV1UndeployProcessorVersionResponse: Response message 5200 // for the UndeployProcessorVersion method. 5201 type GoogleCloudDocumentaiV1UndeployProcessorVersionResponse struct { 5202 } 5203 5204 // GoogleCloudDocumentaiV1Vertex: A vertex represents a 2D point in the image. 5205 // NOTE: the vertex coordinates are in the same scale as the original image. 5206 type GoogleCloudDocumentaiV1Vertex struct { 5207 // X: X coordinate. 5208 X int64 `json:"x,omitempty"` 5209 // Y: Y coordinate (starts from the top of the image). 5210 Y int64 `json:"y,omitempty"` 5211 // ForceSendFields is a list of field names (e.g. "X") to unconditionally 5212 // include in API requests. By default, fields with empty or default values are 5213 // omitted from API requests. See 5214 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5215 // details. 5216 ForceSendFields []string `json:"-"` 5217 // NullFields is a list of field names (e.g. "X") to include in API requests 5218 // with the JSON null value. By default, fields with empty values are omitted 5219 // from API requests. See 5220 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5221 NullFields []string `json:"-"` 5222 } 5223 5224 func (s *GoogleCloudDocumentaiV1Vertex) MarshalJSON() ([]byte, error) { 5225 type NoMethod GoogleCloudDocumentaiV1Vertex 5226 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5227 } 5228 5229 // GoogleCloudDocumentaiV1beta1Barcode: Encodes the detailed information of a 5230 // barcode. 5231 type GoogleCloudDocumentaiV1beta1Barcode struct { 5232 // Format: Format of a barcode. The supported formats are: - `CODE_128`: Code 5233 // 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: 5234 // Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - 5235 // `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. 5236 // - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - 5237 // `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type. 5238 Format string `json:"format,omitempty"` 5239 // RawValue: Raw value encoded in the barcode. For example: 5240 // `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. 5241 RawValue string `json:"rawValue,omitempty"` 5242 // ValueFormat: Value format describes the format of the value that a barcode 5243 // encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - 5244 // `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. 5245 // - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: 5246 // URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - 5247 // `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license. 5248 ValueFormat string `json:"valueFormat,omitempty"` 5249 // ForceSendFields is a list of field names (e.g. "Format") to unconditionally 5250 // include in API requests. By default, fields with empty or default values are 5251 // omitted from API requests. See 5252 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5253 // details. 5254 ForceSendFields []string `json:"-"` 5255 // NullFields is a list of field names (e.g. "Format") to include in API 5256 // requests with the JSON null value. By default, fields with empty values are 5257 // omitted from API requests. See 5258 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5259 NullFields []string `json:"-"` 5260 } 5261 5262 func (s *GoogleCloudDocumentaiV1beta1Barcode) MarshalJSON() ([]byte, error) { 5263 type NoMethod GoogleCloudDocumentaiV1beta1Barcode 5264 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5265 } 5266 5267 // GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse: Response to an 5268 // batch document processing request. This is returned in the LRO Operation 5269 // after the operation is complete. 5270 type GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse struct { 5271 // Responses: Responses for each individual document. 5272 Responses []*GoogleCloudDocumentaiV1beta1ProcessDocumentResponse `json:"responses,omitempty"` 5273 // ForceSendFields is a list of field names (e.g. "Responses") to 5274 // unconditionally include in API requests. By default, fields with empty or 5275 // default values are omitted from API requests. See 5276 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5277 // details. 5278 ForceSendFields []string `json:"-"` 5279 // NullFields is a list of field names (e.g. "Responses") to include in API 5280 // requests with the JSON null value. By default, fields with empty values are 5281 // omitted from API requests. See 5282 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5283 NullFields []string `json:"-"` 5284 } 5285 5286 func (s *GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse) MarshalJSON() ([]byte, error) { 5287 type NoMethod GoogleCloudDocumentaiV1beta1BatchProcessDocumentsResponse 5288 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5289 } 5290 5291 // GoogleCloudDocumentaiV1beta1BoundingPoly: A bounding polygon for the 5292 // detected image annotation. 5293 type GoogleCloudDocumentaiV1beta1BoundingPoly struct { 5294 // NormalizedVertices: The bounding polygon normalized vertices. 5295 NormalizedVertices []*GoogleCloudDocumentaiV1beta1NormalizedVertex `json:"normalizedVertices,omitempty"` 5296 // Vertices: The bounding polygon vertices. 5297 Vertices []*GoogleCloudDocumentaiV1beta1Vertex `json:"vertices,omitempty"` 5298 // ForceSendFields is a list of field names (e.g. "NormalizedVertices") to 5299 // unconditionally include in API requests. By default, fields with empty or 5300 // default values are omitted from API requests. See 5301 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5302 // details. 5303 ForceSendFields []string `json:"-"` 5304 // NullFields is a list of field names (e.g. "NormalizedVertices") to include 5305 // in API requests with the JSON null value. By default, fields with empty 5306 // values are omitted from API requests. See 5307 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5308 NullFields []string `json:"-"` 5309 } 5310 5311 func (s *GoogleCloudDocumentaiV1beta1BoundingPoly) MarshalJSON() ([]byte, error) { 5312 type NoMethod GoogleCloudDocumentaiV1beta1BoundingPoly 5313 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5314 } 5315 5316 // GoogleCloudDocumentaiV1beta1Document: Document represents the canonical 5317 // document resource in Document AI. It is an interchange format that provides 5318 // insights into documents and allows for collaboration between users and 5319 // Document AI to iterate and optimize for quality. 5320 type GoogleCloudDocumentaiV1beta1Document struct { 5321 // Content: Optional. Inline document content, represented as a stream of 5322 // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary 5323 // representation, whereas JSON representations use base64. 5324 Content string `json:"content,omitempty"` 5325 // Entities: A list of entities detected on Document.text. For document shards, 5326 // entities in this list may cross shard boundaries. 5327 Entities []*GoogleCloudDocumentaiV1beta1DocumentEntity `json:"entities,omitempty"` 5328 // EntityRelations: Placeholder. Relationship among Document.entities. 5329 EntityRelations []*GoogleCloudDocumentaiV1beta1DocumentEntityRelation `json:"entityRelations,omitempty"` 5330 // Error: Any error that occurred while processing this document. 5331 Error *GoogleRpcStatus `json:"error,omitempty"` 5332 // MimeType: An IANA published media type (MIME type) 5333 // (https://www.iana.org/assignments/media-types/media-types.xhtml). 5334 MimeType string `json:"mimeType,omitempty"` 5335 // Pages: Visual page layout for the Document. 5336 Pages []*GoogleCloudDocumentaiV1beta1DocumentPage `json:"pages,omitempty"` 5337 // Revisions: Placeholder. Revision history of this document. 5338 Revisions []*GoogleCloudDocumentaiV1beta1DocumentRevision `json:"revisions,omitempty"` 5339 // ShardInfo: Information about the sharding if this document is sharded part 5340 // of a larger document. If the document is not sharded, this message is not 5341 // specified. 5342 ShardInfo *GoogleCloudDocumentaiV1beta1DocumentShardInfo `json:"shardInfo,omitempty"` 5343 // Text: Optional. UTF-8 encoded text in reading order from the document. 5344 Text string `json:"text,omitempty"` 5345 // TextChanges: Placeholder. A list of text corrections made to Document.text. 5346 // This is usually used for annotating corrections to OCR mistakes. Text 5347 // changes for a given revision may not overlap with each other. 5348 TextChanges []*GoogleCloudDocumentaiV1beta1DocumentTextChange `json:"textChanges,omitempty"` 5349 // TextStyles: Styles for the Document.text. 5350 TextStyles []*GoogleCloudDocumentaiV1beta1DocumentStyle `json:"textStyles,omitempty"` 5351 // Uri: Optional. Currently supports Google Cloud Storage URI of the form 5352 // `gs://bucket_name/object_name`. Object versioning is not supported. For more 5353 // information, refer to Google Cloud Storage Request URIs 5354 // (https://cloud.google.com/storage/docs/reference-uris). 5355 Uri string `json:"uri,omitempty"` 5356 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 5357 // include in API requests. By default, fields with empty or default values are 5358 // omitted from API requests. See 5359 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5360 // details. 5361 ForceSendFields []string `json:"-"` 5362 // NullFields is a list of field names (e.g. "Content") to include in API 5363 // requests with the JSON null value. By default, fields with empty values are 5364 // omitted from API requests. See 5365 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5366 NullFields []string `json:"-"` 5367 } 5368 5369 func (s *GoogleCloudDocumentaiV1beta1Document) MarshalJSON() ([]byte, error) { 5370 type NoMethod GoogleCloudDocumentaiV1beta1Document 5371 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5372 } 5373 5374 // GoogleCloudDocumentaiV1beta1DocumentEntity: An entity that could be a phrase 5375 // in the text or a property that belongs to the document. It is a known entity 5376 // type, such as a person, an organization, or location. 5377 type GoogleCloudDocumentaiV1beta1DocumentEntity struct { 5378 // Confidence: Optional. Confidence of detected Schema entity. Range `[0, 1]`. 5379 Confidence float64 `json:"confidence,omitempty"` 5380 // Id: Optional. Canonical id. This will be a unique value in the entity list 5381 // for this document. 5382 Id string `json:"id,omitempty"` 5383 // MentionId: Optional. Deprecated. Use `id` field instead. 5384 MentionId string `json:"mentionId,omitempty"` 5385 // MentionText: Optional. Text value of the entity e.g. `1600 Amphitheatre 5386 // Pkwy`. 5387 MentionText string `json:"mentionText,omitempty"` 5388 // NormalizedValue: Optional. Normalized entity value. Absent if the extracted 5389 // value could not be converted or the type (e.g. address) is not supported for 5390 // certain parsers. This field is also only populated for certain supported 5391 // document types. 5392 NormalizedValue *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue `json:"normalizedValue,omitempty"` 5393 // PageAnchor: Optional. Represents the provenance of this entity wrt. the 5394 // location on the page where it was found. 5395 PageAnchor *GoogleCloudDocumentaiV1beta1DocumentPageAnchor `json:"pageAnchor,omitempty"` 5396 // Properties: Optional. Entities can be nested to form a hierarchical data 5397 // structure representing the content in the document. 5398 Properties []*GoogleCloudDocumentaiV1beta1DocumentEntity `json:"properties,omitempty"` 5399 // Provenance: Optional. The history of this annotation. 5400 Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` 5401 // Redacted: Optional. Whether the entity will be redacted for 5402 // de-identification purposes. 5403 Redacted bool `json:"redacted,omitempty"` 5404 // TextAnchor: Optional. Provenance of the entity. Text anchor indexing into 5405 // the Document.text. 5406 TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` 5407 // Type: Required. Entity type from a schema e.g. `Address`. 5408 Type string `json:"type,omitempty"` 5409 // ForceSendFields is a list of field names (e.g. "Confidence") to 5410 // unconditionally include in API requests. By default, fields with empty or 5411 // default values are omitted from API requests. See 5412 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5413 // details. 5414 ForceSendFields []string `json:"-"` 5415 // NullFields is a list of field names (e.g. "Confidence") to include in API 5416 // requests with the JSON null value. By default, fields with empty values are 5417 // omitted from API requests. See 5418 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5419 NullFields []string `json:"-"` 5420 } 5421 5422 func (s *GoogleCloudDocumentaiV1beta1DocumentEntity) MarshalJSON() ([]byte, error) { 5423 type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntity 5424 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5425 } 5426 5427 func (s *GoogleCloudDocumentaiV1beta1DocumentEntity) UnmarshalJSON(data []byte) error { 5428 type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntity 5429 var s1 struct { 5430 Confidence gensupport.JSONFloat64 `json:"confidence"` 5431 *NoMethod 5432 } 5433 s1.NoMethod = (*NoMethod)(s) 5434 if err := json.Unmarshal(data, &s1); err != nil { 5435 return err 5436 } 5437 s.Confidence = float64(s1.Confidence) 5438 return nil 5439 } 5440 5441 // GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue: Parsed and 5442 // normalized entity value. 5443 type GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue struct { 5444 // AddressValue: Postal address. See also: 5445 // https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto 5446 AddressValue *GoogleTypePostalAddress `json:"addressValue,omitempty"` 5447 // BooleanValue: Boolean value. Can be used for entities with binary values, or 5448 // for checkboxes. 5449 BooleanValue bool `json:"booleanValue,omitempty"` 5450 // DateValue: Date value. Includes year, month, day. See also: 5451 // https://github.com/googleapis/googleapis/blob/master/google/type/date.proto 5452 DateValue *GoogleTypeDate `json:"dateValue,omitempty"` 5453 // DatetimeValue: DateTime value. Includes date, time, and timezone. See also: 5454 // https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto 5455 DatetimeValue *GoogleTypeDateTime `json:"datetimeValue,omitempty"` 5456 // FloatValue: Float value. 5457 FloatValue float64 `json:"floatValue,omitempty"` 5458 // IntegerValue: Integer value. 5459 IntegerValue int64 `json:"integerValue,omitempty"` 5460 // MoneyValue: Money value. See also: 5461 // https://github.com/googleapis/googleapis/blob/master/google/type/money.proto 5462 MoneyValue *GoogleTypeMoney `json:"moneyValue,omitempty"` 5463 // Text: Optional. An optional field to store a normalized string. For some 5464 // entity types, one of respective `structured_value` fields may also be 5465 // populated. Also not all the types of `structured_value` will be normalized. 5466 // For example, some processors may not generate `float` or `integer` 5467 // normalized text by default. Below are sample formats mapped to structured 5468 // values. - Money/Currency type (`money_value`) is in the ISO 4217 text 5469 // format. - Date type (`date_value`) is in the ISO 8601 text format. - 5470 // Datetime type (`datetime_value`) is in the ISO 8601 text format. 5471 Text string `json:"text,omitempty"` 5472 // ForceSendFields is a list of field names (e.g. "AddressValue") to 5473 // unconditionally include in API requests. By default, fields with empty or 5474 // default values are omitted from API requests. See 5475 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5476 // details. 5477 ForceSendFields []string `json:"-"` 5478 // NullFields is a list of field names (e.g. "AddressValue") to include in API 5479 // requests with the JSON null value. By default, fields with empty values are 5480 // omitted from API requests. See 5481 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5482 NullFields []string `json:"-"` 5483 } 5484 5485 func (s *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue) MarshalJSON() ([]byte, error) { 5486 type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue 5487 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5488 } 5489 5490 func (s *GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue) UnmarshalJSON(data []byte) error { 5491 type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityNormalizedValue 5492 var s1 struct { 5493 FloatValue gensupport.JSONFloat64 `json:"floatValue"` 5494 *NoMethod 5495 } 5496 s1.NoMethod = (*NoMethod)(s) 5497 if err := json.Unmarshal(data, &s1); err != nil { 5498 return err 5499 } 5500 s.FloatValue = float64(s1.FloatValue) 5501 return nil 5502 } 5503 5504 // GoogleCloudDocumentaiV1beta1DocumentEntityRelation: Relationship between 5505 // Entities. 5506 type GoogleCloudDocumentaiV1beta1DocumentEntityRelation struct { 5507 // ObjectId: Object entity id. 5508 ObjectId string `json:"objectId,omitempty"` 5509 // Relation: Relationship description. 5510 Relation string `json:"relation,omitempty"` 5511 // SubjectId: Subject entity id. 5512 SubjectId string `json:"subjectId,omitempty"` 5513 // ForceSendFields is a list of field names (e.g. "ObjectId") to 5514 // unconditionally include in API requests. By default, fields with empty or 5515 // default values are omitted from API requests. See 5516 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5517 // details. 5518 ForceSendFields []string `json:"-"` 5519 // NullFields is a list of field names (e.g. "ObjectId") to include in API 5520 // requests with the JSON null value. By default, fields with empty values are 5521 // omitted from API requests. See 5522 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5523 NullFields []string `json:"-"` 5524 } 5525 5526 func (s *GoogleCloudDocumentaiV1beta1DocumentEntityRelation) MarshalJSON() ([]byte, error) { 5527 type NoMethod GoogleCloudDocumentaiV1beta1DocumentEntityRelation 5528 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5529 } 5530 5531 // GoogleCloudDocumentaiV1beta1DocumentPage: A page in a Document. 5532 type GoogleCloudDocumentaiV1beta1DocumentPage struct { 5533 // Blocks: A list of visually detected text blocks on the page. A block has a 5534 // set of lines (collected into paragraphs) that have a common line-spacing and 5535 // orientation. 5536 Blocks []*GoogleCloudDocumentaiV1beta1DocumentPageBlock `json:"blocks,omitempty"` 5537 // DetectedBarcodes: A list of detected barcodes. 5538 DetectedBarcodes []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode `json:"detectedBarcodes,omitempty"` 5539 // DetectedLanguages: A list of detected languages together with confidence. 5540 DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 5541 // Dimension: Physical dimension of the page. 5542 Dimension *GoogleCloudDocumentaiV1beta1DocumentPageDimension `json:"dimension,omitempty"` 5543 // FormFields: A list of visually detected form fields on the page. 5544 FormFields []*GoogleCloudDocumentaiV1beta1DocumentPageFormField `json:"formFields,omitempty"` 5545 // Image: Rendered image for this page. This image is preprocessed to remove 5546 // any skew, rotation, and distortions such that the annotation bounding boxes 5547 // can be upright and axis-aligned. 5548 Image *GoogleCloudDocumentaiV1beta1DocumentPageImage `json:"image,omitempty"` 5549 // ImageQualityScores: Image quality scores. 5550 ImageQualityScores *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` 5551 // Layout: Layout for the page. 5552 Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` 5553 // Lines: A list of visually detected text lines on the page. A collection of 5554 // tokens that a human would perceive as a line. 5555 Lines []*GoogleCloudDocumentaiV1beta1DocumentPageLine `json:"lines,omitempty"` 5556 // PageNumber: 1-based index for current Page in a parent Document. Useful when 5557 // a page is taken out of a Document for individual processing. 5558 PageNumber int64 `json:"pageNumber,omitempty"` 5559 // Paragraphs: A list of visually detected text paragraphs on the page. A 5560 // collection of lines that a human would perceive as a paragraph. 5561 Paragraphs []*GoogleCloudDocumentaiV1beta1DocumentPageParagraph `json:"paragraphs,omitempty"` 5562 // Provenance: The history of this page. 5563 Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` 5564 // Symbols: A list of visually detected symbols on the page. 5565 Symbols []*GoogleCloudDocumentaiV1beta1DocumentPageSymbol `json:"symbols,omitempty"` 5566 // Tables: A list of visually detected tables on the page. 5567 Tables []*GoogleCloudDocumentaiV1beta1DocumentPageTable `json:"tables,omitempty"` 5568 // Tokens: A list of visually detected tokens on the page. 5569 Tokens []*GoogleCloudDocumentaiV1beta1DocumentPageToken `json:"tokens,omitempty"` 5570 // Transforms: Transformation matrices that were applied to the original 5571 // document image to produce Page.image. 5572 Transforms []*GoogleCloudDocumentaiV1beta1DocumentPageMatrix `json:"transforms,omitempty"` 5573 // VisualElements: A list of detected non-text visual elements e.g. checkbox, 5574 // signature etc. on the page. 5575 VisualElements []*GoogleCloudDocumentaiV1beta1DocumentPageVisualElement `json:"visualElements,omitempty"` 5576 // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally 5577 // include in API requests. By default, fields with empty or default values are 5578 // omitted from API requests. See 5579 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5580 // details. 5581 ForceSendFields []string `json:"-"` 5582 // NullFields is a list of field names (e.g. "Blocks") to include in API 5583 // requests with the JSON null value. By default, fields with empty values are 5584 // omitted from API requests. See 5585 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5586 NullFields []string `json:"-"` 5587 } 5588 5589 func (s *GoogleCloudDocumentaiV1beta1DocumentPage) MarshalJSON() ([]byte, error) { 5590 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPage 5591 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5592 } 5593 5594 // GoogleCloudDocumentaiV1beta1DocumentPageAnchor: Referencing the visual 5595 // context of the entity in the Document.pages. Page anchors can be cross-page, 5596 // consist of multiple bounding polygons and optionally reference specific 5597 // layout element types. 5598 type GoogleCloudDocumentaiV1beta1DocumentPageAnchor struct { 5599 // PageRefs: One or more references to visual page elements 5600 PageRefs []*GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef `json:"pageRefs,omitempty"` 5601 // ForceSendFields is a list of field names (e.g. "PageRefs") to 5602 // unconditionally include in API requests. By default, fields with empty or 5603 // default values are omitted from API requests. See 5604 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5605 // details. 5606 ForceSendFields []string `json:"-"` 5607 // NullFields is a list of field names (e.g. "PageRefs") to include in API 5608 // requests with the JSON null value. By default, fields with empty values are 5609 // omitted from API requests. See 5610 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5611 NullFields []string `json:"-"` 5612 } 5613 5614 func (s *GoogleCloudDocumentaiV1beta1DocumentPageAnchor) MarshalJSON() ([]byte, error) { 5615 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchor 5616 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5617 } 5618 5619 // GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef: Represents a weak 5620 // reference to a page element within a document. 5621 type GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef struct { 5622 // BoundingPoly: Optional. Identifies the bounding polygon of a layout element 5623 // on the page. If `layout_type` is set, the bounding polygon must be exactly 5624 // the same to the layout element it's referring to. 5625 BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"` 5626 // Confidence: Optional. Confidence of detected page element, if applicable. 5627 // Range `[0, 1]`. 5628 Confidence float64 `json:"confidence,omitempty"` 5629 // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. 5630 LayoutId string `json:"layoutId,omitempty"` 5631 // LayoutType: Optional. The type of the layout element that is being 5632 // referenced if any. 5633 // 5634 // Possible values: 5635 // "LAYOUT_TYPE_UNSPECIFIED" - Layout Unspecified. 5636 // "BLOCK" - References a Page.blocks element. 5637 // "PARAGRAPH" - References a Page.paragraphs element. 5638 // "LINE" - References a Page.lines element. 5639 // "TOKEN" - References a Page.tokens element. 5640 // "VISUAL_ELEMENT" - References a Page.visual_elements element. 5641 // "TABLE" - Refrrences a Page.tables element. 5642 // "FORM_FIELD" - References a Page.form_fields element. 5643 LayoutType string `json:"layoutType,omitempty"` 5644 // Page: Required. Index into the Document.pages element, for example using 5645 // `Document.pages` to locate the related page element. This field is skipped 5646 // when its value is the default `0`. See 5647 // https://developers.google.com/protocol-buffers/docs/proto3#json. 5648 Page int64 `json:"page,omitempty,string"` 5649 // ForceSendFields is a list of field names (e.g. "BoundingPoly") to 5650 // unconditionally include in API requests. By default, fields with empty or 5651 // default values are omitted from API requests. See 5652 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5653 // details. 5654 ForceSendFields []string `json:"-"` 5655 // NullFields is a list of field names (e.g. "BoundingPoly") to include in API 5656 // requests with the JSON null value. By default, fields with empty values are 5657 // omitted from API requests. See 5658 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5659 NullFields []string `json:"-"` 5660 } 5661 5662 func (s *GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef) MarshalJSON() ([]byte, error) { 5663 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef 5664 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5665 } 5666 5667 func (s *GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef) UnmarshalJSON(data []byte) error { 5668 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef 5669 var s1 struct { 5670 Confidence gensupport.JSONFloat64 `json:"confidence"` 5671 *NoMethod 5672 } 5673 s1.NoMethod = (*NoMethod)(s) 5674 if err := json.Unmarshal(data, &s1); err != nil { 5675 return err 5676 } 5677 s.Confidence = float64(s1.Confidence) 5678 return nil 5679 } 5680 5681 // GoogleCloudDocumentaiV1beta1DocumentPageBlock: A block has a set of lines 5682 // (collected into paragraphs) that have a common line-spacing and orientation. 5683 type GoogleCloudDocumentaiV1beta1DocumentPageBlock struct { 5684 // DetectedLanguages: A list of detected languages together with confidence. 5685 DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 5686 // Layout: Layout for Block. 5687 Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` 5688 // Provenance: The history of this annotation. 5689 Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` 5690 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 5691 // unconditionally include in API requests. By default, fields with empty or 5692 // default values are omitted from API requests. See 5693 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5694 // details. 5695 ForceSendFields []string `json:"-"` 5696 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 5697 // API requests with the JSON null value. By default, fields with empty values 5698 // are omitted from API requests. See 5699 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5700 NullFields []string `json:"-"` 5701 } 5702 5703 func (s *GoogleCloudDocumentaiV1beta1DocumentPageBlock) MarshalJSON() ([]byte, error) { 5704 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageBlock 5705 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5706 } 5707 5708 // GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode: A detected barcode. 5709 type GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode struct { 5710 // Barcode: Detailed barcode information of the DetectedBarcode. 5711 Barcode *GoogleCloudDocumentaiV1beta1Barcode `json:"barcode,omitempty"` 5712 // Layout: Layout for DetectedBarcode. 5713 Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` 5714 // ForceSendFields is a list of field names (e.g. "Barcode") to unconditionally 5715 // include in API requests. By default, fields with empty or default values are 5716 // omitted from API requests. See 5717 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5718 // details. 5719 ForceSendFields []string `json:"-"` 5720 // NullFields is a list of field names (e.g. "Barcode") to include in API 5721 // requests with the JSON null value. By default, fields with empty values are 5722 // omitted from API requests. See 5723 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5724 NullFields []string `json:"-"` 5725 } 5726 5727 func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { 5728 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedBarcode 5729 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5730 } 5731 5732 // GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage: Detected language 5733 // for a structural component. 5734 type GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage struct { 5735 // Confidence: Confidence of detected language. Range `[0, 1]`. 5736 Confidence float64 `json:"confidence,omitempty"` 5737 // LanguageCode: The BCP-47 language code 5738 // (https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as 5739 // `en-US` or `sr-Latn`. 5740 LanguageCode string `json:"languageCode,omitempty"` 5741 // ForceSendFields is a list of field names (e.g. "Confidence") to 5742 // unconditionally include in API requests. By default, fields with empty or 5743 // default values are omitted from API requests. See 5744 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5745 // details. 5746 ForceSendFields []string `json:"-"` 5747 // NullFields is a list of field names (e.g. "Confidence") to include in API 5748 // requests with the JSON null value. By default, fields with empty values are 5749 // omitted from API requests. See 5750 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5751 NullFields []string `json:"-"` 5752 } 5753 5754 func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage) MarshalJSON() ([]byte, error) { 5755 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage 5756 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5757 } 5758 5759 func (s *GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage) UnmarshalJSON(data []byte) error { 5760 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage 5761 var s1 struct { 5762 Confidence gensupport.JSONFloat64 `json:"confidence"` 5763 *NoMethod 5764 } 5765 s1.NoMethod = (*NoMethod)(s) 5766 if err := json.Unmarshal(data, &s1); err != nil { 5767 return err 5768 } 5769 s.Confidence = float64(s1.Confidence) 5770 return nil 5771 } 5772 5773 // GoogleCloudDocumentaiV1beta1DocumentPageDimension: Dimension for the page. 5774 type GoogleCloudDocumentaiV1beta1DocumentPageDimension struct { 5775 // Height: Page height. 5776 Height float64 `json:"height,omitempty"` 5777 // Unit: Dimension unit. 5778 Unit string `json:"unit,omitempty"` 5779 // Width: Page width. 5780 Width float64 `json:"width,omitempty"` 5781 // ForceSendFields is a list of field names (e.g. "Height") to unconditionally 5782 // include in API requests. By default, fields with empty or default values are 5783 // omitted from API requests. See 5784 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5785 // details. 5786 ForceSendFields []string `json:"-"` 5787 // NullFields is a list of field names (e.g. "Height") to include in API 5788 // requests with the JSON null value. By default, fields with empty values are 5789 // omitted from API requests. See 5790 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5791 NullFields []string `json:"-"` 5792 } 5793 5794 func (s *GoogleCloudDocumentaiV1beta1DocumentPageDimension) MarshalJSON() ([]byte, error) { 5795 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDimension 5796 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5797 } 5798 5799 func (s *GoogleCloudDocumentaiV1beta1DocumentPageDimension) UnmarshalJSON(data []byte) error { 5800 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageDimension 5801 var s1 struct { 5802 Height gensupport.JSONFloat64 `json:"height"` 5803 Width gensupport.JSONFloat64 `json:"width"` 5804 *NoMethod 5805 } 5806 s1.NoMethod = (*NoMethod)(s) 5807 if err := json.Unmarshal(data, &s1); err != nil { 5808 return err 5809 } 5810 s.Height = float64(s1.Height) 5811 s.Width = float64(s1.Width) 5812 return nil 5813 } 5814 5815 // GoogleCloudDocumentaiV1beta1DocumentPageFormField: A form field detected on 5816 // the page. 5817 type GoogleCloudDocumentaiV1beta1DocumentPageFormField struct { 5818 // CorrectedKeyText: Created for Labeling UI to export key text. If corrections 5819 // were made to the text identified by the `field_name.text_anchor`, this field 5820 // will contain the correction. 5821 CorrectedKeyText string `json:"correctedKeyText,omitempty"` 5822 // CorrectedValueText: Created for Labeling UI to export value text. If 5823 // corrections were made to the text identified by the 5824 // `field_value.text_anchor`, this field will contain the correction. 5825 CorrectedValueText string `json:"correctedValueText,omitempty"` 5826 // FieldName: Layout for the FormField name. e.g. `Address`, `Email`, `Grand 5827 // total`, `Phone number`, etc. 5828 FieldName *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"fieldName,omitempty"` 5829 // FieldValue: Layout for the FormField value. 5830 FieldValue *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"fieldValue,omitempty"` 5831 // NameDetectedLanguages: A list of detected languages for name together with 5832 // confidence. 5833 NameDetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"nameDetectedLanguages,omitempty"` 5834 // Provenance: The history of this annotation. 5835 Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` 5836 // ValueDetectedLanguages: A list of detected languages for value together with 5837 // confidence. 5838 ValueDetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"valueDetectedLanguages,omitempty"` 5839 // ValueType: If the value is non-textual, this field represents the type. 5840 // Current valid values are: - blank (this indicates the `field_value` is 5841 // normal text) - `unfilled_checkbox` - `filled_checkbox` 5842 ValueType string `json:"valueType,omitempty"` 5843 // ForceSendFields is a list of field names (e.g. "CorrectedKeyText") to 5844 // unconditionally include in API requests. By default, fields with empty or 5845 // default values are omitted from API requests. See 5846 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5847 // details. 5848 ForceSendFields []string `json:"-"` 5849 // NullFields is a list of field names (e.g. "CorrectedKeyText") to include in 5850 // API requests with the JSON null value. By default, fields with empty values 5851 // are omitted from API requests. See 5852 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5853 NullFields []string `json:"-"` 5854 } 5855 5856 func (s *GoogleCloudDocumentaiV1beta1DocumentPageFormField) MarshalJSON() ([]byte, error) { 5857 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageFormField 5858 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5859 } 5860 5861 // GoogleCloudDocumentaiV1beta1DocumentPageImage: Rendered image contents for 5862 // this page. 5863 type GoogleCloudDocumentaiV1beta1DocumentPageImage struct { 5864 // Content: Raw byte content of the image. 5865 Content string `json:"content,omitempty"` 5866 // Height: Height of the image in pixels. 5867 Height int64 `json:"height,omitempty"` 5868 // MimeType: Encoding media type (MIME type) 5869 // (https://www.iana.org/assignments/media-types/media-types.xhtml) for the 5870 // image. 5871 MimeType string `json:"mimeType,omitempty"` 5872 // Width: Width of the image in pixels. 5873 Width int64 `json:"width,omitempty"` 5874 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 5875 // include in API requests. By default, fields with empty or default values are 5876 // omitted from API requests. See 5877 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5878 // details. 5879 ForceSendFields []string `json:"-"` 5880 // NullFields is a list of field names (e.g. "Content") to include in API 5881 // requests with the JSON null value. By default, fields with empty values are 5882 // omitted from API requests. See 5883 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5884 NullFields []string `json:"-"` 5885 } 5886 5887 func (s *GoogleCloudDocumentaiV1beta1DocumentPageImage) MarshalJSON() ([]byte, error) { 5888 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImage 5889 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5890 } 5891 5892 // GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores: Image quality 5893 // scores for the page image. 5894 type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores struct { 5895 // DetectedDefects: A list of detected defects. 5896 DetectedDefects []*GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` 5897 // QualityScore: The overall quality score. Range `[0, 1]` where `1` is perfect 5898 // quality. 5899 QualityScore float64 `json:"qualityScore,omitempty"` 5900 // ForceSendFields is a list of field names (e.g. "DetectedDefects") to 5901 // unconditionally include in API requests. By default, fields with empty or 5902 // default values are omitted from API requests. See 5903 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5904 // details. 5905 ForceSendFields []string `json:"-"` 5906 // NullFields is a list of field names (e.g. "DetectedDefects") to include in 5907 // API requests with the JSON null value. By default, fields with empty values 5908 // are omitted from API requests. See 5909 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5910 NullFields []string `json:"-"` 5911 } 5912 5913 func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { 5914 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores 5915 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5916 } 5917 5918 func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { 5919 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores 5920 var s1 struct { 5921 QualityScore gensupport.JSONFloat64 `json:"qualityScore"` 5922 *NoMethod 5923 } 5924 s1.NoMethod = (*NoMethod)(s) 5925 if err := json.Unmarshal(data, &s1); err != nil { 5926 return err 5927 } 5928 s.QualityScore = float64(s1.QualityScore) 5929 return nil 5930 } 5931 5932 // GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect: 5933 // Image Quality Defects 5934 type GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect struct { 5935 // Confidence: Confidence of detected defect. Range `[0, 1]` where `1` 5936 // indicates strong confidence that the defect exists. 5937 Confidence float64 `json:"confidence,omitempty"` 5938 // Type: Name of the defect type. Supported values are: - 5939 // `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - 5940 // `quality/defect_faint` - `quality/defect_text_too_small` - 5941 // `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - 5942 // `quality/defect_glare` 5943 Type string `json:"type,omitempty"` 5944 // ForceSendFields is a list of field names (e.g. "Confidence") to 5945 // unconditionally include in API requests. By default, fields with empty or 5946 // default values are omitted from API requests. See 5947 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5948 // details. 5949 ForceSendFields []string `json:"-"` 5950 // NullFields is a list of field names (e.g. "Confidence") to include in API 5951 // requests with the JSON null value. By default, fields with empty values are 5952 // omitted from API requests. See 5953 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5954 NullFields []string `json:"-"` 5955 } 5956 5957 func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { 5958 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect 5959 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5960 } 5961 5962 func (s *GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { 5963 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect 5964 var s1 struct { 5965 Confidence gensupport.JSONFloat64 `json:"confidence"` 5966 *NoMethod 5967 } 5968 s1.NoMethod = (*NoMethod)(s) 5969 if err := json.Unmarshal(data, &s1); err != nil { 5970 return err 5971 } 5972 s.Confidence = float64(s1.Confidence) 5973 return nil 5974 } 5975 5976 // GoogleCloudDocumentaiV1beta1DocumentPageLayout: Visual element describing a 5977 // layout unit on a page. 5978 type GoogleCloudDocumentaiV1beta1DocumentPageLayout struct { 5979 // BoundingPoly: The bounding polygon for the Layout. 5980 BoundingPoly *GoogleCloudDocumentaiV1beta1BoundingPoly `json:"boundingPoly,omitempty"` 5981 // Confidence: Confidence of the current Layout within context of the object 5982 // this layout is for. e.g. confidence can be for a single token, a table, a 5983 // visual element, etc. depending on context. Range `[0, 1]`. 5984 Confidence float64 `json:"confidence,omitempty"` 5985 // Orientation: Detected orientation for the Layout. 5986 // 5987 // Possible values: 5988 // "ORIENTATION_UNSPECIFIED" - Unspecified orientation. 5989 // "PAGE_UP" - Orientation is aligned with page up. 5990 // "PAGE_RIGHT" - Orientation is aligned with page right. Turn the head 90 5991 // degrees clockwise from upright to read. 5992 // "PAGE_DOWN" - Orientation is aligned with page down. Turn the head 180 5993 // degrees from upright to read. 5994 // "PAGE_LEFT" - Orientation is aligned with page left. Turn the head 90 5995 // degrees counterclockwise from upright to read. 5996 Orientation string `json:"orientation,omitempty"` 5997 // TextAnchor: Text anchor indexing into the Document.text. 5998 TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` 5999 // ForceSendFields is a list of field names (e.g. "BoundingPoly") to 6000 // unconditionally include in API requests. By default, fields with empty or 6001 // default values are omitted from API requests. See 6002 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6003 // details. 6004 ForceSendFields []string `json:"-"` 6005 // NullFields is a list of field names (e.g. "BoundingPoly") to include in API 6006 // requests with the JSON null value. By default, fields with empty values are 6007 // omitted from API requests. See 6008 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6009 NullFields []string `json:"-"` 6010 } 6011 6012 func (s *GoogleCloudDocumentaiV1beta1DocumentPageLayout) MarshalJSON() ([]byte, error) { 6013 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLayout 6014 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6015 } 6016 6017 func (s *GoogleCloudDocumentaiV1beta1DocumentPageLayout) UnmarshalJSON(data []byte) error { 6018 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLayout 6019 var s1 struct { 6020 Confidence gensupport.JSONFloat64 `json:"confidence"` 6021 *NoMethod 6022 } 6023 s1.NoMethod = (*NoMethod)(s) 6024 if err := json.Unmarshal(data, &s1); err != nil { 6025 return err 6026 } 6027 s.Confidence = float64(s1.Confidence) 6028 return nil 6029 } 6030 6031 // GoogleCloudDocumentaiV1beta1DocumentPageLine: A collection of tokens that a 6032 // human would perceive as a line. Does not cross column boundaries, can be 6033 // horizontal, vertical, etc. 6034 type GoogleCloudDocumentaiV1beta1DocumentPageLine struct { 6035 // DetectedLanguages: A list of detected languages together with confidence. 6036 DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 6037 // Layout: Layout for Line. 6038 Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` 6039 // Provenance: The history of this annotation. 6040 Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` 6041 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 6042 // unconditionally include in API requests. By default, fields with empty or 6043 // default values are omitted from API requests. See 6044 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6045 // details. 6046 ForceSendFields []string `json:"-"` 6047 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 6048 // API requests with the JSON null value. By default, fields with empty values 6049 // are omitted from API requests. See 6050 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6051 NullFields []string `json:"-"` 6052 } 6053 6054 func (s *GoogleCloudDocumentaiV1beta1DocumentPageLine) MarshalJSON() ([]byte, error) { 6055 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageLine 6056 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6057 } 6058 6059 // GoogleCloudDocumentaiV1beta1DocumentPageMatrix: Representation for 6060 // transformation matrix, intended to be compatible and used with OpenCV format 6061 // for image manipulation. 6062 type GoogleCloudDocumentaiV1beta1DocumentPageMatrix struct { 6063 // Cols: Number of columns in the matrix. 6064 Cols int64 `json:"cols,omitempty"` 6065 // Data: The matrix data. 6066 Data string `json:"data,omitempty"` 6067 // Rows: Number of rows in the matrix. 6068 Rows int64 `json:"rows,omitempty"` 6069 // Type: This encodes information about what data type the matrix uses. For 6070 // example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV 6071 // primitive data types, please refer to 6072 // https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html 6073 Type int64 `json:"type,omitempty"` 6074 // ForceSendFields is a list of field names (e.g. "Cols") to unconditionally 6075 // include in API requests. By default, fields with empty or default values are 6076 // omitted from API requests. See 6077 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6078 // details. 6079 ForceSendFields []string `json:"-"` 6080 // NullFields is a list of field names (e.g. "Cols") to include in API requests 6081 // with the JSON null value. By default, fields with empty values are omitted 6082 // from API requests. See 6083 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6084 NullFields []string `json:"-"` 6085 } 6086 6087 func (s *GoogleCloudDocumentaiV1beta1DocumentPageMatrix) MarshalJSON() ([]byte, error) { 6088 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageMatrix 6089 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6090 } 6091 6092 // GoogleCloudDocumentaiV1beta1DocumentPageParagraph: A collection of lines 6093 // that a human would perceive as a paragraph. 6094 type GoogleCloudDocumentaiV1beta1DocumentPageParagraph struct { 6095 // DetectedLanguages: A list of detected languages together with confidence. 6096 DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 6097 // Layout: Layout for Paragraph. 6098 Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` 6099 // Provenance: The history of this annotation. 6100 Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` 6101 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 6102 // unconditionally include in API requests. By default, fields with empty or 6103 // default values are omitted from API requests. See 6104 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6105 // details. 6106 ForceSendFields []string `json:"-"` 6107 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 6108 // API requests with the JSON null value. By default, fields with empty values 6109 // are omitted from API requests. See 6110 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6111 NullFields []string `json:"-"` 6112 } 6113 6114 func (s *GoogleCloudDocumentaiV1beta1DocumentPageParagraph) MarshalJSON() ([]byte, error) { 6115 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageParagraph 6116 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6117 } 6118 6119 // GoogleCloudDocumentaiV1beta1DocumentPageSymbol: A detected symbol. 6120 type GoogleCloudDocumentaiV1beta1DocumentPageSymbol struct { 6121 // DetectedLanguages: A list of detected languages together with confidence. 6122 DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 6123 // Layout: Layout for Symbol. 6124 Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` 6125 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 6126 // unconditionally include in API requests. By default, fields with empty or 6127 // default values are omitted from API requests. See 6128 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6129 // details. 6130 ForceSendFields []string `json:"-"` 6131 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 6132 // API requests with the JSON null value. By default, fields with empty values 6133 // are omitted from API requests. See 6134 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6135 NullFields []string `json:"-"` 6136 } 6137 6138 func (s *GoogleCloudDocumentaiV1beta1DocumentPageSymbol) MarshalJSON() ([]byte, error) { 6139 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageSymbol 6140 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6141 } 6142 6143 // GoogleCloudDocumentaiV1beta1DocumentPageTable: A table representation 6144 // similar to HTML table structure. 6145 type GoogleCloudDocumentaiV1beta1DocumentPageTable struct { 6146 // BodyRows: Body rows of the table. 6147 BodyRows []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow `json:"bodyRows,omitempty"` 6148 // DetectedLanguages: A list of detected languages together with confidence. 6149 DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 6150 // HeaderRows: Header rows of the table. 6151 HeaderRows []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow `json:"headerRows,omitempty"` 6152 // Layout: Layout for Table. 6153 Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` 6154 // Provenance: The history of this table. 6155 Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` 6156 // ForceSendFields is a list of field names (e.g. "BodyRows") to 6157 // unconditionally include in API requests. By default, fields with empty or 6158 // default values are omitted from API requests. See 6159 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6160 // details. 6161 ForceSendFields []string `json:"-"` 6162 // NullFields is a list of field names (e.g. "BodyRows") to include in API 6163 // requests with the JSON null value. By default, fields with empty values are 6164 // omitted from API requests. See 6165 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6166 NullFields []string `json:"-"` 6167 } 6168 6169 func (s *GoogleCloudDocumentaiV1beta1DocumentPageTable) MarshalJSON() ([]byte, error) { 6170 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTable 6171 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6172 } 6173 6174 // GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell: A cell 6175 // representation inside the table. 6176 type GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell struct { 6177 // ColSpan: How many columns this cell spans. 6178 ColSpan int64 `json:"colSpan,omitempty"` 6179 // DetectedLanguages: A list of detected languages together with confidence. 6180 DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 6181 // Layout: Layout for TableCell. 6182 Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` 6183 // RowSpan: How many rows this cell spans. 6184 RowSpan int64 `json:"rowSpan,omitempty"` 6185 // ForceSendFields is a list of field names (e.g. "ColSpan") to unconditionally 6186 // include in API requests. By default, fields with empty or default values are 6187 // omitted from API requests. See 6188 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6189 // details. 6190 ForceSendFields []string `json:"-"` 6191 // NullFields is a list of field names (e.g. "ColSpan") to include in API 6192 // requests with the JSON null value. By default, fields with empty values are 6193 // omitted from API requests. See 6194 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6195 NullFields []string `json:"-"` 6196 } 6197 6198 func (s *GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell) MarshalJSON() ([]byte, error) { 6199 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell 6200 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6201 } 6202 6203 // GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow: A row of table cells. 6204 type GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow struct { 6205 // Cells: Cells that make up this row. 6206 Cells []*GoogleCloudDocumentaiV1beta1DocumentPageTableTableCell `json:"cells,omitempty"` 6207 // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally 6208 // include in API requests. By default, fields with empty or default values are 6209 // omitted from API requests. See 6210 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6211 // details. 6212 ForceSendFields []string `json:"-"` 6213 // NullFields is a list of field names (e.g. "Cells") to include in API 6214 // requests with the JSON null value. By default, fields with empty values are 6215 // omitted from API requests. See 6216 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6217 NullFields []string `json:"-"` 6218 } 6219 6220 func (s *GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow) MarshalJSON() ([]byte, error) { 6221 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTableTableRow 6222 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6223 } 6224 6225 // GoogleCloudDocumentaiV1beta1DocumentPageToken: A detected token. 6226 type GoogleCloudDocumentaiV1beta1DocumentPageToken struct { 6227 // DetectedBreak: Detected break at the end of a Token. 6228 DetectedBreak *GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak `json:"detectedBreak,omitempty"` 6229 // DetectedLanguages: A list of detected languages together with confidence. 6230 DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 6231 // Layout: Layout for Token. 6232 Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` 6233 // Provenance: The history of this annotation. 6234 Provenance *GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` 6235 // StyleInfo: Text style attributes. 6236 StyleInfo *GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo `json:"styleInfo,omitempty"` 6237 // ForceSendFields is a list of field names (e.g. "DetectedBreak") to 6238 // unconditionally include in API requests. By default, fields with empty or 6239 // default values are omitted from API requests. See 6240 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6241 // details. 6242 ForceSendFields []string `json:"-"` 6243 // NullFields is a list of field names (e.g. "DetectedBreak") to include in API 6244 // requests with the JSON null value. By default, fields with empty values are 6245 // omitted from API requests. See 6246 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6247 NullFields []string `json:"-"` 6248 } 6249 6250 func (s *GoogleCloudDocumentaiV1beta1DocumentPageToken) MarshalJSON() ([]byte, error) { 6251 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageToken 6252 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6253 } 6254 6255 // GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak: Detected break 6256 // at the end of a Token. 6257 type GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak struct { 6258 // Type: Detected break type. 6259 // 6260 // Possible values: 6261 // "TYPE_UNSPECIFIED" - Unspecified break type. 6262 // "SPACE" - A single whitespace. 6263 // "WIDE_SPACE" - A wider whitespace. 6264 // "HYPHEN" - A hyphen that indicates that a token has been split across 6265 // lines. 6266 Type string `json:"type,omitempty"` 6267 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 6268 // include in API requests. By default, fields with empty or default values are 6269 // omitted from API requests. See 6270 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6271 // details. 6272 ForceSendFields []string `json:"-"` 6273 // NullFields is a list of field names (e.g. "Type") to include in API requests 6274 // with the JSON null value. By default, fields with empty values are omitted 6275 // from API requests. See 6276 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6277 NullFields []string `json:"-"` 6278 } 6279 6280 func (s *GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak) MarshalJSON() ([]byte, error) { 6281 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenDetectedBreak 6282 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6283 } 6284 6285 // GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo: Font and other text 6286 // style attributes. 6287 type GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo struct { 6288 // BackgroundColor: Color of the background. 6289 BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` 6290 // Bold: Whether the text is bold (equivalent to font_weight is at least 6291 // `700`). 6292 Bold bool `json:"bold,omitempty"` 6293 // FontSize: Font size in points (`1` point is `¹⁄₇₂` inches). 6294 FontSize int64 `json:"fontSize,omitempty"` 6295 // FontType: Name or style of the font. 6296 FontType string `json:"fontType,omitempty"` 6297 // FontWeight: TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). 6298 // Normal is `400`, bold is `700`. 6299 FontWeight int64 `json:"fontWeight,omitempty"` 6300 // Handwritten: Whether the text is handwritten. 6301 Handwritten bool `json:"handwritten,omitempty"` 6302 // Italic: Whether the text is italic. 6303 Italic bool `json:"italic,omitempty"` 6304 // LetterSpacing: Letter spacing in points. 6305 LetterSpacing float64 `json:"letterSpacing,omitempty"` 6306 // PixelFontSize: Font size in pixels, equal to _unrounded font_size_ * 6307 // _resolution_ ÷ `72.0`. 6308 PixelFontSize float64 `json:"pixelFontSize,omitempty"` 6309 // Smallcaps: Whether the text is in small caps. This feature is not supported 6310 // yet. 6311 Smallcaps bool `json:"smallcaps,omitempty"` 6312 // Strikeout: Whether the text is strikethrough. This feature is not supported 6313 // yet. 6314 Strikeout bool `json:"strikeout,omitempty"` 6315 // Subscript: Whether the text is a subscript. This feature is not supported 6316 // yet. 6317 Subscript bool `json:"subscript,omitempty"` 6318 // Superscript: Whether the text is a superscript. This feature is not 6319 // supported yet. 6320 Superscript bool `json:"superscript,omitempty"` 6321 // TextColor: Color of the text. 6322 TextColor *GoogleTypeColor `json:"textColor,omitempty"` 6323 // Underlined: Whether the text is underlined. 6324 Underlined bool `json:"underlined,omitempty"` 6325 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to 6326 // unconditionally include in API requests. By default, fields with empty or 6327 // default values are omitted from API requests. See 6328 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6329 // details. 6330 ForceSendFields []string `json:"-"` 6331 // NullFields is a list of field names (e.g. "BackgroundColor") to include in 6332 // API requests with the JSON null value. By default, fields with empty values 6333 // are omitted from API requests. See 6334 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6335 NullFields []string `json:"-"` 6336 } 6337 6338 func (s *GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo) MarshalJSON() ([]byte, error) { 6339 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo 6340 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6341 } 6342 6343 func (s *GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo) UnmarshalJSON(data []byte) error { 6344 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageTokenStyleInfo 6345 var s1 struct { 6346 LetterSpacing gensupport.JSONFloat64 `json:"letterSpacing"` 6347 PixelFontSize gensupport.JSONFloat64 `json:"pixelFontSize"` 6348 *NoMethod 6349 } 6350 s1.NoMethod = (*NoMethod)(s) 6351 if err := json.Unmarshal(data, &s1); err != nil { 6352 return err 6353 } 6354 s.LetterSpacing = float64(s1.LetterSpacing) 6355 s.PixelFontSize = float64(s1.PixelFontSize) 6356 return nil 6357 } 6358 6359 // GoogleCloudDocumentaiV1beta1DocumentPageVisualElement: Detected non-text 6360 // visual elements e.g. checkbox, signature etc. on the page. 6361 type GoogleCloudDocumentaiV1beta1DocumentPageVisualElement struct { 6362 // DetectedLanguages: A list of detected languages together with confidence. 6363 DetectedLanguages []*GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 6364 // Layout: Layout for VisualElement. 6365 Layout *GoogleCloudDocumentaiV1beta1DocumentPageLayout `json:"layout,omitempty"` 6366 // Type: Type of the VisualElement. 6367 Type string `json:"type,omitempty"` 6368 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 6369 // unconditionally include in API requests. By default, fields with empty or 6370 // default values are omitted from API requests. See 6371 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6372 // details. 6373 ForceSendFields []string `json:"-"` 6374 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 6375 // API requests with the JSON null value. By default, fields with empty values 6376 // are omitted from API requests. See 6377 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6378 NullFields []string `json:"-"` 6379 } 6380 6381 func (s *GoogleCloudDocumentaiV1beta1DocumentPageVisualElement) MarshalJSON() ([]byte, error) { 6382 type NoMethod GoogleCloudDocumentaiV1beta1DocumentPageVisualElement 6383 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6384 } 6385 6386 // GoogleCloudDocumentaiV1beta1DocumentProvenance: Structure to identify 6387 // provenance relationships between annotations in different revisions. 6388 type GoogleCloudDocumentaiV1beta1DocumentProvenance struct { 6389 // Id: The Id of this operation. Needs to be unique within the scope of the 6390 // revision. 6391 Id int64 `json:"id,omitempty"` 6392 // Parents: References to the original elements that are replaced. 6393 Parents []*GoogleCloudDocumentaiV1beta1DocumentProvenanceParent `json:"parents,omitempty"` 6394 // Revision: The index of the revision that produced this element. 6395 Revision int64 `json:"revision,omitempty"` 6396 // Type: The type of provenance operation. 6397 // 6398 // Possible values: 6399 // "OPERATION_TYPE_UNSPECIFIED" - Operation type unspecified. If no operation 6400 // is specified a provenance entry is simply used to match against a `parent`. 6401 // "ADD" - Add an element. 6402 // "REMOVE" - Remove an element identified by `parent`. 6403 // "UPDATE" - Updates any fields within the given provenance scope of the 6404 // message. It overwrites the fields rather than replacing them. Use this when 6405 // you want to update a field value of an entity without also updating all the 6406 // child properties. 6407 // "REPLACE" - Currently unused. Replace an element identified by `parent`. 6408 // "EVAL_REQUESTED" - Deprecated. Request human review for the element 6409 // identified by `parent`. 6410 // "EVAL_APPROVED" - Deprecated. Element is reviewed and approved at human 6411 // review, confidence will be set to 1.0. 6412 // "EVAL_SKIPPED" - Deprecated. Element is skipped in the validation process. 6413 Type string `json:"type,omitempty"` 6414 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 6415 // include in API requests. By default, fields with empty or default values are 6416 // omitted from API requests. See 6417 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6418 // details. 6419 ForceSendFields []string `json:"-"` 6420 // NullFields is a list of field names (e.g. "Id") to include in API requests 6421 // with the JSON null value. By default, fields with empty values are omitted 6422 // from API requests. See 6423 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6424 NullFields []string `json:"-"` 6425 } 6426 6427 func (s *GoogleCloudDocumentaiV1beta1DocumentProvenance) MarshalJSON() ([]byte, error) { 6428 type NoMethod GoogleCloudDocumentaiV1beta1DocumentProvenance 6429 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6430 } 6431 6432 // GoogleCloudDocumentaiV1beta1DocumentProvenanceParent: The parent element the 6433 // current element is based on. Used for referencing/aligning, removal and 6434 // replacement operations. 6435 type GoogleCloudDocumentaiV1beta1DocumentProvenanceParent struct { 6436 // Id: The id of the parent provenance. 6437 Id int64 `json:"id,omitempty"` 6438 // Index: The index of the parent item in the corresponding item list (eg. list 6439 // of entities, properties within entities, etc.) in the parent revision. 6440 Index int64 `json:"index,omitempty"` 6441 // Revision: The index of the index into current revision's parent_ids list. 6442 Revision int64 `json:"revision,omitempty"` 6443 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 6444 // include in API requests. By default, fields with empty or default values are 6445 // omitted from API requests. See 6446 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6447 // details. 6448 ForceSendFields []string `json:"-"` 6449 // NullFields is a list of field names (e.g. "Id") to include in API requests 6450 // with the JSON null value. By default, fields with empty values are omitted 6451 // from API requests. See 6452 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6453 NullFields []string `json:"-"` 6454 } 6455 6456 func (s *GoogleCloudDocumentaiV1beta1DocumentProvenanceParent) MarshalJSON() ([]byte, error) { 6457 type NoMethod GoogleCloudDocumentaiV1beta1DocumentProvenanceParent 6458 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6459 } 6460 6461 // GoogleCloudDocumentaiV1beta1DocumentRevision: Contains past or forward 6462 // revisions of this document. 6463 type GoogleCloudDocumentaiV1beta1DocumentRevision struct { 6464 // Agent: If the change was made by a person specify the name or id of that 6465 // person. 6466 Agent string `json:"agent,omitempty"` 6467 // CreateTime: The time that the revision was created, internally generated by 6468 // doc proto storage at the time of create. 6469 CreateTime string `json:"createTime,omitempty"` 6470 // HumanReview: Human Review information of this revision. 6471 HumanReview *GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview `json:"humanReview,omitempty"` 6472 // Id: Id of the revision, internally generated by doc proto storage. Unique 6473 // within the context of the document. 6474 Id string `json:"id,omitempty"` 6475 // Parent: The revisions that this revision is based on. This can include one 6476 // or more parent (when documents are merged.) This field represents the index 6477 // into the `revisions` field. 6478 Parent []int64 `json:"parent,omitempty"` 6479 // ParentIds: The revisions that this revision is based on. Must include all 6480 // the ids that have anything to do with this revision - eg. there are 6481 // `provenance.parent.revision` fields that index into this field. 6482 ParentIds []string `json:"parentIds,omitempty"` 6483 // Processor: If the annotation was made by processor identify the processor by 6484 // its resource name. 6485 Processor string `json:"processor,omitempty"` 6486 // ForceSendFields is a list of field names (e.g. "Agent") to unconditionally 6487 // include in API requests. By default, fields with empty or default values are 6488 // omitted from API requests. See 6489 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6490 // details. 6491 ForceSendFields []string `json:"-"` 6492 // NullFields is a list of field names (e.g. "Agent") to include in API 6493 // requests with the JSON null value. By default, fields with empty values are 6494 // omitted from API requests. See 6495 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6496 NullFields []string `json:"-"` 6497 } 6498 6499 func (s *GoogleCloudDocumentaiV1beta1DocumentRevision) MarshalJSON() ([]byte, error) { 6500 type NoMethod GoogleCloudDocumentaiV1beta1DocumentRevision 6501 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6502 } 6503 6504 // GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview: Human Review 6505 // information of the document. 6506 type GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview struct { 6507 // State: Human review state. e.g. `requested`, `succeeded`, `rejected`. 6508 State string `json:"state,omitempty"` 6509 // StateMessage: A message providing more details about the current state of 6510 // processing. For example, the rejection reason when the state is `rejected`. 6511 StateMessage string `json:"stateMessage,omitempty"` 6512 // ForceSendFields is a list of field names (e.g. "State") to unconditionally 6513 // include in API requests. By default, fields with empty or default values are 6514 // omitted from API requests. See 6515 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6516 // details. 6517 ForceSendFields []string `json:"-"` 6518 // NullFields is a list of field names (e.g. "State") to include in API 6519 // requests with the JSON null value. By default, fields with empty values are 6520 // omitted from API requests. See 6521 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6522 NullFields []string `json:"-"` 6523 } 6524 6525 func (s *GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview) MarshalJSON() ([]byte, error) { 6526 type NoMethod GoogleCloudDocumentaiV1beta1DocumentRevisionHumanReview 6527 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6528 } 6529 6530 // GoogleCloudDocumentaiV1beta1DocumentShardInfo: For a large document, 6531 // sharding may be performed to produce several document shards. Each document 6532 // shard contains this field to detail which shard it is. 6533 type GoogleCloudDocumentaiV1beta1DocumentShardInfo struct { 6534 // ShardCount: Total number of shards. 6535 ShardCount int64 `json:"shardCount,omitempty,string"` 6536 // ShardIndex: The 0-based index of this shard. 6537 ShardIndex int64 `json:"shardIndex,omitempty,string"` 6538 // TextOffset: The index of the first character in Document.text in the overall 6539 // document global text. 6540 TextOffset int64 `json:"textOffset,omitempty,string"` 6541 // ForceSendFields is a list of field names (e.g. "ShardCount") to 6542 // unconditionally include in API requests. By default, fields with empty or 6543 // default values are omitted from API requests. See 6544 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6545 // details. 6546 ForceSendFields []string `json:"-"` 6547 // NullFields is a list of field names (e.g. "ShardCount") to include in API 6548 // requests with the JSON null value. By default, fields with empty values are 6549 // omitted from API requests. See 6550 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6551 NullFields []string `json:"-"` 6552 } 6553 6554 func (s *GoogleCloudDocumentaiV1beta1DocumentShardInfo) MarshalJSON() ([]byte, error) { 6555 type NoMethod GoogleCloudDocumentaiV1beta1DocumentShardInfo 6556 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6557 } 6558 6559 // GoogleCloudDocumentaiV1beta1DocumentStyle: Annotation for common text style 6560 // attributes. This adheres to CSS conventions as much as possible. 6561 type GoogleCloudDocumentaiV1beta1DocumentStyle struct { 6562 // BackgroundColor: Text background color. 6563 BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` 6564 // Color: Text color. 6565 Color *GoogleTypeColor `json:"color,omitempty"` 6566 // FontFamily: Font family such as `Arial`, `Times New Roman`. 6567 // https://www.w3schools.com/cssref/pr_font_font-family.asp 6568 FontFamily string `json:"fontFamily,omitempty"` 6569 // FontSize: Font size. 6570 FontSize *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize `json:"fontSize,omitempty"` 6571 // FontWeight: Font weight 6572 // (https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are 6573 // `normal`, `bold`, `bolder`, and `lighter`. 6574 FontWeight string `json:"fontWeight,omitempty"` 6575 // TextAnchor: Text anchor indexing into the Document.text. 6576 TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` 6577 // TextDecoration: Text decoration 6578 // (https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS 6579 // standard. 6580 TextDecoration string `json:"textDecoration,omitempty"` 6581 // TextStyle: Text style 6582 // (https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values 6583 // are `normal`, `italic`, and `oblique`. 6584 TextStyle string `json:"textStyle,omitempty"` 6585 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to 6586 // unconditionally include in API requests. By default, fields with empty or 6587 // default values are omitted from API requests. See 6588 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6589 // details. 6590 ForceSendFields []string `json:"-"` 6591 // NullFields is a list of field names (e.g. "BackgroundColor") to include in 6592 // API requests with the JSON null value. By default, fields with empty values 6593 // are omitted from API requests. See 6594 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6595 NullFields []string `json:"-"` 6596 } 6597 6598 func (s *GoogleCloudDocumentaiV1beta1DocumentStyle) MarshalJSON() ([]byte, error) { 6599 type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyle 6600 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6601 } 6602 6603 // GoogleCloudDocumentaiV1beta1DocumentStyleFontSize: Font size with unit. 6604 type GoogleCloudDocumentaiV1beta1DocumentStyleFontSize struct { 6605 // Size: Font size for the text. 6606 Size float64 `json:"size,omitempty"` 6607 // Unit: Unit for the font size. Follows CSS naming (such as `in`, `px`, and 6608 // `pt`). 6609 Unit string `json:"unit,omitempty"` 6610 // ForceSendFields is a list of field names (e.g. "Size") to unconditionally 6611 // include in API requests. By default, fields with empty or default values are 6612 // omitted from API requests. See 6613 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6614 // details. 6615 ForceSendFields []string `json:"-"` 6616 // NullFields is a list of field names (e.g. "Size") to include in API requests 6617 // with the JSON null value. By default, fields with empty values are omitted 6618 // from API requests. See 6619 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6620 NullFields []string `json:"-"` 6621 } 6622 6623 func (s *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) MarshalJSON() ([]byte, error) { 6624 type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyleFontSize 6625 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6626 } 6627 6628 func (s *GoogleCloudDocumentaiV1beta1DocumentStyleFontSize) UnmarshalJSON(data []byte) error { 6629 type NoMethod GoogleCloudDocumentaiV1beta1DocumentStyleFontSize 6630 var s1 struct { 6631 Size gensupport.JSONFloat64 `json:"size"` 6632 *NoMethod 6633 } 6634 s1.NoMethod = (*NoMethod)(s) 6635 if err := json.Unmarshal(data, &s1); err != nil { 6636 return err 6637 } 6638 s.Size = float64(s1.Size) 6639 return nil 6640 } 6641 6642 // GoogleCloudDocumentaiV1beta1DocumentTextAnchor: Text reference indexing into 6643 // the Document.text. 6644 type GoogleCloudDocumentaiV1beta1DocumentTextAnchor struct { 6645 // Content: Contains the content of the text span so that users do not have to 6646 // look it up in the text_segments. It is always populated for formFields. 6647 Content string `json:"content,omitempty"` 6648 // TextSegments: The text segments from the Document.text. 6649 TextSegments []*GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment `json:"textSegments,omitempty"` 6650 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 6651 // include in API requests. By default, fields with empty or default values are 6652 // omitted from API requests. See 6653 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6654 // details. 6655 ForceSendFields []string `json:"-"` 6656 // NullFields is a list of field names (e.g. "Content") to include in API 6657 // requests with the JSON null value. By default, fields with empty values are 6658 // omitted from API requests. See 6659 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6660 NullFields []string `json:"-"` 6661 } 6662 6663 func (s *GoogleCloudDocumentaiV1beta1DocumentTextAnchor) MarshalJSON() ([]byte, error) { 6664 type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextAnchor 6665 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6666 } 6667 6668 // GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment: A text segment in 6669 // the Document.text. The indices may be out of bounds which indicate that the 6670 // text extends into another document shard for large sharded documents. See 6671 // ShardInfo.text_offset 6672 type GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment struct { 6673 // EndIndex: TextSegment half open end UTF-8 char index in the Document.text. 6674 EndIndex int64 `json:"endIndex,omitempty,string"` 6675 // StartIndex: TextSegment start UTF-8 char index in the Document.text. 6676 StartIndex int64 `json:"startIndex,omitempty,string"` 6677 // ForceSendFields is a list of field names (e.g. "EndIndex") to 6678 // unconditionally include in API requests. By default, fields with empty or 6679 // default values are omitted from API requests. See 6680 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6681 // details. 6682 ForceSendFields []string `json:"-"` 6683 // NullFields is a list of field names (e.g. "EndIndex") to include in API 6684 // requests with the JSON null value. By default, fields with empty values are 6685 // omitted from API requests. See 6686 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6687 NullFields []string `json:"-"` 6688 } 6689 6690 func (s *GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment) MarshalJSON() ([]byte, error) { 6691 type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextAnchorTextSegment 6692 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6693 } 6694 6695 // GoogleCloudDocumentaiV1beta1DocumentTextChange: This message is used for 6696 // text changes aka. OCR corrections. 6697 type GoogleCloudDocumentaiV1beta1DocumentTextChange struct { 6698 // ChangedText: The text that replaces the text identified in the 6699 // `text_anchor`. 6700 ChangedText string `json:"changedText,omitempty"` 6701 // Provenance: The history of this annotation. 6702 Provenance []*GoogleCloudDocumentaiV1beta1DocumentProvenance `json:"provenance,omitempty"` 6703 // TextAnchor: Provenance of the correction. Text anchor indexing into the 6704 // Document.text. There can only be a single `TextAnchor.text_segments` 6705 // element. If the start and end index of the text segment are the same, the 6706 // text change is inserted before that index. 6707 TextAnchor *GoogleCloudDocumentaiV1beta1DocumentTextAnchor `json:"textAnchor,omitempty"` 6708 // ForceSendFields is a list of field names (e.g. "ChangedText") to 6709 // unconditionally include in API requests. By default, fields with empty or 6710 // default values are omitted from API requests. See 6711 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6712 // details. 6713 ForceSendFields []string `json:"-"` 6714 // NullFields is a list of field names (e.g. "ChangedText") to include in API 6715 // requests with the JSON null value. By default, fields with empty values are 6716 // omitted from API requests. See 6717 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6718 NullFields []string `json:"-"` 6719 } 6720 6721 func (s *GoogleCloudDocumentaiV1beta1DocumentTextChange) MarshalJSON() ([]byte, error) { 6722 type NoMethod GoogleCloudDocumentaiV1beta1DocumentTextChange 6723 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6724 } 6725 6726 // GoogleCloudDocumentaiV1beta1GcsDestination: The Google Cloud Storage 6727 // location where the output file will be written to. 6728 type GoogleCloudDocumentaiV1beta1GcsDestination struct { 6729 Uri string `json:"uri,omitempty"` 6730 // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally 6731 // include in API requests. By default, fields with empty or default values are 6732 // omitted from API requests. See 6733 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6734 // details. 6735 ForceSendFields []string `json:"-"` 6736 // NullFields is a list of field names (e.g. "Uri") to include in API requests 6737 // with the JSON null value. By default, fields with empty values are omitted 6738 // from API requests. See 6739 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6740 NullFields []string `json:"-"` 6741 } 6742 6743 func (s *GoogleCloudDocumentaiV1beta1GcsDestination) MarshalJSON() ([]byte, error) { 6744 type NoMethod GoogleCloudDocumentaiV1beta1GcsDestination 6745 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6746 } 6747 6748 // GoogleCloudDocumentaiV1beta1GcsSource: The Google Cloud Storage location 6749 // where the input file will be read from. 6750 type GoogleCloudDocumentaiV1beta1GcsSource struct { 6751 Uri string `json:"uri,omitempty"` 6752 // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally 6753 // include in API requests. By default, fields with empty or default values are 6754 // omitted from API requests. See 6755 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6756 // details. 6757 ForceSendFields []string `json:"-"` 6758 // NullFields is a list of field names (e.g. "Uri") to include in API requests 6759 // with the JSON null value. By default, fields with empty values are omitted 6760 // from API requests. See 6761 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6762 NullFields []string `json:"-"` 6763 } 6764 6765 func (s *GoogleCloudDocumentaiV1beta1GcsSource) MarshalJSON() ([]byte, error) { 6766 type NoMethod GoogleCloudDocumentaiV1beta1GcsSource 6767 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6768 } 6769 6770 // GoogleCloudDocumentaiV1beta1InputConfig: The desired input location and 6771 // metadata. 6772 type GoogleCloudDocumentaiV1beta1InputConfig struct { 6773 // GcsSource: The Google Cloud Storage location to read the input from. This 6774 // must be a single file. 6775 GcsSource *GoogleCloudDocumentaiV1beta1GcsSource `json:"gcsSource,omitempty"` 6776 // MimeType: Required. Mimetype of the input. Current supported mimetypes are 6777 // application/pdf, image/tiff, and image/gif. In addition, application/json 6778 // type is supported for requests with ProcessDocumentRequest.automl_params 6779 // field set. The JSON file needs to be in Document format. 6780 MimeType string `json:"mimeType,omitempty"` 6781 // ForceSendFields is a list of field names (e.g. "GcsSource") to 6782 // unconditionally include in API requests. By default, fields with empty or 6783 // default values are omitted from API requests. See 6784 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6785 // details. 6786 ForceSendFields []string `json:"-"` 6787 // NullFields is a list of field names (e.g. "GcsSource") to include in API 6788 // requests with the JSON null value. By default, fields with empty values are 6789 // omitted from API requests. See 6790 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6791 NullFields []string `json:"-"` 6792 } 6793 6794 func (s *GoogleCloudDocumentaiV1beta1InputConfig) MarshalJSON() ([]byte, error) { 6795 type NoMethod GoogleCloudDocumentaiV1beta1InputConfig 6796 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6797 } 6798 6799 // GoogleCloudDocumentaiV1beta1NormalizedVertex: A vertex represents a 2D point 6800 // in the image. NOTE: the normalized vertex coordinates are relative to the 6801 // original image and range from 0 to 1. 6802 type GoogleCloudDocumentaiV1beta1NormalizedVertex struct { 6803 // X: X coordinate. 6804 X float64 `json:"x,omitempty"` 6805 // Y: Y coordinate (starts from the top of the image). 6806 Y float64 `json:"y,omitempty"` 6807 // ForceSendFields is a list of field names (e.g. "X") to unconditionally 6808 // include in API requests. By default, fields with empty or default values are 6809 // omitted from API requests. See 6810 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6811 // details. 6812 ForceSendFields []string `json:"-"` 6813 // NullFields is a list of field names (e.g. "X") to include in API requests 6814 // with the JSON null value. By default, fields with empty values are omitted 6815 // from API requests. See 6816 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6817 NullFields []string `json:"-"` 6818 } 6819 6820 func (s *GoogleCloudDocumentaiV1beta1NormalizedVertex) MarshalJSON() ([]byte, error) { 6821 type NoMethod GoogleCloudDocumentaiV1beta1NormalizedVertex 6822 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6823 } 6824 6825 func (s *GoogleCloudDocumentaiV1beta1NormalizedVertex) UnmarshalJSON(data []byte) error { 6826 type NoMethod GoogleCloudDocumentaiV1beta1NormalizedVertex 6827 var s1 struct { 6828 X gensupport.JSONFloat64 `json:"x"` 6829 Y gensupport.JSONFloat64 `json:"y"` 6830 *NoMethod 6831 } 6832 s1.NoMethod = (*NoMethod)(s) 6833 if err := json.Unmarshal(data, &s1); err != nil { 6834 return err 6835 } 6836 s.X = float64(s1.X) 6837 s.Y = float64(s1.Y) 6838 return nil 6839 } 6840 6841 // GoogleCloudDocumentaiV1beta1OperationMetadata: Contains metadata for the 6842 // BatchProcessDocuments operation. 6843 type GoogleCloudDocumentaiV1beta1OperationMetadata struct { 6844 // CreateTime: The creation time of the operation. 6845 CreateTime string `json:"createTime,omitempty"` 6846 // State: The state of the current batch processing. 6847 // 6848 // Possible values: 6849 // "STATE_UNSPECIFIED" - The default value. This value is used if the state 6850 // is omitted. 6851 // "ACCEPTED" - Request is received. 6852 // "WAITING" - Request operation is waiting for scheduling. 6853 // "RUNNING" - Request is being processed. 6854 // "SUCCEEDED" - The batch processing completed successfully. 6855 // "CANCELLED" - The batch processing was cancelled. 6856 // "FAILED" - The batch processing has failed. 6857 State string `json:"state,omitempty"` 6858 // StateMessage: A message providing more details about the current state of 6859 // processing. 6860 StateMessage string `json:"stateMessage,omitempty"` 6861 // UpdateTime: The last update time of the operation. 6862 UpdateTime string `json:"updateTime,omitempty"` 6863 // ForceSendFields is a list of field names (e.g. "CreateTime") to 6864 // unconditionally include in API requests. By default, fields with empty or 6865 // default values are omitted from API requests. See 6866 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6867 // details. 6868 ForceSendFields []string `json:"-"` 6869 // NullFields is a list of field names (e.g. "CreateTime") to include in API 6870 // requests with the JSON null value. By default, fields with empty values are 6871 // omitted from API requests. See 6872 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6873 NullFields []string `json:"-"` 6874 } 6875 6876 func (s *GoogleCloudDocumentaiV1beta1OperationMetadata) MarshalJSON() ([]byte, error) { 6877 type NoMethod GoogleCloudDocumentaiV1beta1OperationMetadata 6878 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6879 } 6880 6881 // GoogleCloudDocumentaiV1beta1OutputConfig: The desired output location and 6882 // metadata. 6883 type GoogleCloudDocumentaiV1beta1OutputConfig struct { 6884 // GcsDestination: The Google Cloud Storage location to write the output to. 6885 GcsDestination *GoogleCloudDocumentaiV1beta1GcsDestination `json:"gcsDestination,omitempty"` 6886 // PagesPerShard: The max number of pages to include into each output Document 6887 // shard JSON on Google Cloud Storage. The valid range is [1, 100]. If not 6888 // specified, the default value is 20. For example, for one pdf file with 100 6889 // pages, 100 parsed pages will be produced. If `pages_per_shard` = 20, then 5 6890 // Document shard JSON files each containing 20 parsed pages will be written 6891 // under the prefix OutputConfig.gcs_destination.uri and suffix 6892 // pages-x-to-y.json where x and y are 1-indexed page numbers. Example GCS 6893 // outputs with 157 pages and pages_per_shard = 50: pages-001-to-050.json 6894 // pages-051-to-100.json pages-101-to-150.json pages-151-to-157.json 6895 PagesPerShard int64 `json:"pagesPerShard,omitempty"` 6896 // ForceSendFields is a list of field names (e.g. "GcsDestination") to 6897 // unconditionally include in API requests. By default, fields with empty or 6898 // default values are omitted from API requests. See 6899 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6900 // details. 6901 ForceSendFields []string `json:"-"` 6902 // NullFields is a list of field names (e.g. "GcsDestination") to include in 6903 // API requests with the JSON null value. By default, fields with empty values 6904 // are omitted from API requests. See 6905 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6906 NullFields []string `json:"-"` 6907 } 6908 6909 func (s *GoogleCloudDocumentaiV1beta1OutputConfig) MarshalJSON() ([]byte, error) { 6910 type NoMethod GoogleCloudDocumentaiV1beta1OutputConfig 6911 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6912 } 6913 6914 // GoogleCloudDocumentaiV1beta1ProcessDocumentResponse: Response to a single 6915 // document processing request. 6916 type GoogleCloudDocumentaiV1beta1ProcessDocumentResponse struct { 6917 // InputConfig: Information about the input file. This is the same as the 6918 // corresponding input config in the request. 6919 InputConfig *GoogleCloudDocumentaiV1beta1InputConfig `json:"inputConfig,omitempty"` 6920 // OutputConfig: The output location of the parsed responses. The responses are 6921 // written to this location as JSON-serialized `Document` objects. 6922 OutputConfig *GoogleCloudDocumentaiV1beta1OutputConfig `json:"outputConfig,omitempty"` 6923 // ForceSendFields is a list of field names (e.g. "InputConfig") to 6924 // unconditionally include in API requests. By default, fields with empty or 6925 // default values are omitted from API requests. See 6926 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6927 // details. 6928 ForceSendFields []string `json:"-"` 6929 // NullFields is a list of field names (e.g. "InputConfig") to include in API 6930 // requests with the JSON null value. By default, fields with empty values are 6931 // omitted from API requests. See 6932 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6933 NullFields []string `json:"-"` 6934 } 6935 6936 func (s *GoogleCloudDocumentaiV1beta1ProcessDocumentResponse) MarshalJSON() ([]byte, error) { 6937 type NoMethod GoogleCloudDocumentaiV1beta1ProcessDocumentResponse 6938 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6939 } 6940 6941 // GoogleCloudDocumentaiV1beta1Vertex: A vertex represents a 2D point in the 6942 // image. NOTE: the vertex coordinates are in the same scale as the original 6943 // image. 6944 type GoogleCloudDocumentaiV1beta1Vertex struct { 6945 // X: X coordinate. 6946 X int64 `json:"x,omitempty"` 6947 // Y: Y coordinate (starts from the top of the image). 6948 Y int64 `json:"y,omitempty"` 6949 // ForceSendFields is a list of field names (e.g. "X") to unconditionally 6950 // include in API requests. By default, fields with empty or default values are 6951 // omitted from API requests. See 6952 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6953 // details. 6954 ForceSendFields []string `json:"-"` 6955 // NullFields is a list of field names (e.g. "X") to include in API requests 6956 // with the JSON null value. By default, fields with empty values are omitted 6957 // from API requests. See 6958 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6959 NullFields []string `json:"-"` 6960 } 6961 6962 func (s *GoogleCloudDocumentaiV1beta1Vertex) MarshalJSON() ([]byte, error) { 6963 type NoMethod GoogleCloudDocumentaiV1beta1Vertex 6964 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6965 } 6966 6967 // GoogleCloudDocumentaiV1beta2Barcode: Encodes the detailed information of a 6968 // barcode. 6969 type GoogleCloudDocumentaiV1beta2Barcode struct { 6970 // Format: Format of a barcode. The supported formats are: - `CODE_128`: Code 6971 // 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: 6972 // Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - 6973 // `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. 6974 // - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - 6975 // `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type. 6976 Format string `json:"format,omitempty"` 6977 // RawValue: Raw value encoded in the barcode. For example: 6978 // `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. 6979 RawValue string `json:"rawValue,omitempty"` 6980 // ValueFormat: Value format describes the format of the value that a barcode 6981 // encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - 6982 // `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. 6983 // - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: 6984 // URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - 6985 // `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license. 6986 ValueFormat string `json:"valueFormat,omitempty"` 6987 // ForceSendFields is a list of field names (e.g. "Format") to unconditionally 6988 // include in API requests. By default, fields with empty or default values are 6989 // omitted from API requests. See 6990 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6991 // details. 6992 ForceSendFields []string `json:"-"` 6993 // NullFields is a list of field names (e.g. "Format") to include in API 6994 // requests with the JSON null value. By default, fields with empty values are 6995 // omitted from API requests. See 6996 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6997 NullFields []string `json:"-"` 6998 } 6999 7000 func (s *GoogleCloudDocumentaiV1beta2Barcode) MarshalJSON() ([]byte, error) { 7001 type NoMethod GoogleCloudDocumentaiV1beta2Barcode 7002 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7003 } 7004 7005 // GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse: Response to an 7006 // batch document processing request. This is returned in the LRO Operation 7007 // after the operation is complete. 7008 type GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse struct { 7009 // Responses: Responses for each individual document. 7010 Responses []*GoogleCloudDocumentaiV1beta2ProcessDocumentResponse `json:"responses,omitempty"` 7011 // ForceSendFields is a list of field names (e.g. "Responses") to 7012 // unconditionally include in API requests. By default, fields with empty or 7013 // default values are omitted from API requests. See 7014 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7015 // details. 7016 ForceSendFields []string `json:"-"` 7017 // NullFields is a list of field names (e.g. "Responses") to include in API 7018 // requests with the JSON null value. By default, fields with empty values are 7019 // omitted from API requests. See 7020 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7021 NullFields []string `json:"-"` 7022 } 7023 7024 func (s *GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse) MarshalJSON() ([]byte, error) { 7025 type NoMethod GoogleCloudDocumentaiV1beta2BatchProcessDocumentsResponse 7026 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7027 } 7028 7029 // GoogleCloudDocumentaiV1beta2BoundingPoly: A bounding polygon for the 7030 // detected image annotation. 7031 type GoogleCloudDocumentaiV1beta2BoundingPoly struct { 7032 // NormalizedVertices: The bounding polygon normalized vertices. 7033 NormalizedVertices []*GoogleCloudDocumentaiV1beta2NormalizedVertex `json:"normalizedVertices,omitempty"` 7034 // Vertices: The bounding polygon vertices. 7035 Vertices []*GoogleCloudDocumentaiV1beta2Vertex `json:"vertices,omitempty"` 7036 // ForceSendFields is a list of field names (e.g. "NormalizedVertices") to 7037 // unconditionally include in API requests. By default, fields with empty or 7038 // default values are omitted from API requests. See 7039 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7040 // details. 7041 ForceSendFields []string `json:"-"` 7042 // NullFields is a list of field names (e.g. "NormalizedVertices") to include 7043 // in API requests with the JSON null value. By default, fields with empty 7044 // values are omitted from API requests. See 7045 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7046 NullFields []string `json:"-"` 7047 } 7048 7049 func (s *GoogleCloudDocumentaiV1beta2BoundingPoly) MarshalJSON() ([]byte, error) { 7050 type NoMethod GoogleCloudDocumentaiV1beta2BoundingPoly 7051 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7052 } 7053 7054 // GoogleCloudDocumentaiV1beta2Document: Document represents the canonical 7055 // document resource in Document AI. It is an interchange format that provides 7056 // insights into documents and allows for collaboration between users and 7057 // Document AI to iterate and optimize for quality. 7058 type GoogleCloudDocumentaiV1beta2Document struct { 7059 // Content: Optional. Inline document content, represented as a stream of 7060 // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary 7061 // representation, whereas JSON representations use base64. 7062 Content string `json:"content,omitempty"` 7063 // Entities: A list of entities detected on Document.text. For document shards, 7064 // entities in this list may cross shard boundaries. 7065 Entities []*GoogleCloudDocumentaiV1beta2DocumentEntity `json:"entities,omitempty"` 7066 // EntityRelations: Placeholder. Relationship among Document.entities. 7067 EntityRelations []*GoogleCloudDocumentaiV1beta2DocumentEntityRelation `json:"entityRelations,omitempty"` 7068 // Error: Any error that occurred while processing this document. 7069 Error *GoogleRpcStatus `json:"error,omitempty"` 7070 // Labels: Labels for this document. 7071 Labels []*GoogleCloudDocumentaiV1beta2DocumentLabel `json:"labels,omitempty"` 7072 // MimeType: An IANA published media type (MIME type) 7073 // (https://www.iana.org/assignments/media-types/media-types.xhtml). 7074 MimeType string `json:"mimeType,omitempty"` 7075 // Pages: Visual page layout for the Document. 7076 Pages []*GoogleCloudDocumentaiV1beta2DocumentPage `json:"pages,omitempty"` 7077 // Revisions: Placeholder. Revision history of this document. 7078 Revisions []*GoogleCloudDocumentaiV1beta2DocumentRevision `json:"revisions,omitempty"` 7079 // ShardInfo: Information about the sharding if this document is sharded part 7080 // of a larger document. If the document is not sharded, this message is not 7081 // specified. 7082 ShardInfo *GoogleCloudDocumentaiV1beta2DocumentShardInfo `json:"shardInfo,omitempty"` 7083 // Text: Optional. UTF-8 encoded text in reading order from the document. 7084 Text string `json:"text,omitempty"` 7085 // TextChanges: Placeholder. A list of text corrections made to Document.text. 7086 // This is usually used for annotating corrections to OCR mistakes. Text 7087 // changes for a given revision may not overlap with each other. 7088 TextChanges []*GoogleCloudDocumentaiV1beta2DocumentTextChange `json:"textChanges,omitempty"` 7089 // TextStyles: Styles for the Document.text. 7090 TextStyles []*GoogleCloudDocumentaiV1beta2DocumentStyle `json:"textStyles,omitempty"` 7091 // Uri: Optional. Currently supports Google Cloud Storage URI of the form 7092 // `gs://bucket_name/object_name`. Object versioning is not supported. For more 7093 // information, refer to Google Cloud Storage Request URIs 7094 // (https://cloud.google.com/storage/docs/reference-uris). 7095 Uri string `json:"uri,omitempty"` 7096 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 7097 // include in API requests. By default, fields with empty or default values are 7098 // omitted from API requests. See 7099 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7100 // details. 7101 ForceSendFields []string `json:"-"` 7102 // NullFields is a list of field names (e.g. "Content") to include in API 7103 // requests with the JSON null value. By default, fields with empty values are 7104 // omitted from API requests. See 7105 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7106 NullFields []string `json:"-"` 7107 } 7108 7109 func (s *GoogleCloudDocumentaiV1beta2Document) MarshalJSON() ([]byte, error) { 7110 type NoMethod GoogleCloudDocumentaiV1beta2Document 7111 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7112 } 7113 7114 // GoogleCloudDocumentaiV1beta2DocumentEntity: An entity that could be a phrase 7115 // in the text or a property that belongs to the document. It is a known entity 7116 // type, such as a person, an organization, or location. 7117 type GoogleCloudDocumentaiV1beta2DocumentEntity struct { 7118 // Confidence: Optional. Confidence of detected Schema entity. Range `[0, 1]`. 7119 Confidence float64 `json:"confidence,omitempty"` 7120 // Id: Optional. Canonical id. This will be a unique value in the entity list 7121 // for this document. 7122 Id string `json:"id,omitempty"` 7123 // MentionId: Optional. Deprecated. Use `id` field instead. 7124 MentionId string `json:"mentionId,omitempty"` 7125 // MentionText: Optional. Text value of the entity e.g. `1600 Amphitheatre 7126 // Pkwy`. 7127 MentionText string `json:"mentionText,omitempty"` 7128 // NormalizedValue: Optional. Normalized entity value. Absent if the extracted 7129 // value could not be converted or the type (e.g. address) is not supported for 7130 // certain parsers. This field is also only populated for certain supported 7131 // document types. 7132 NormalizedValue *GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue `json:"normalizedValue,omitempty"` 7133 // PageAnchor: Optional. Represents the provenance of this entity wrt. the 7134 // location on the page where it was found. 7135 PageAnchor *GoogleCloudDocumentaiV1beta2DocumentPageAnchor `json:"pageAnchor,omitempty"` 7136 // Properties: Optional. Entities can be nested to form a hierarchical data 7137 // structure representing the content in the document. 7138 Properties []*GoogleCloudDocumentaiV1beta2DocumentEntity `json:"properties,omitempty"` 7139 // Provenance: Optional. The history of this annotation. 7140 Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` 7141 // Redacted: Optional. Whether the entity will be redacted for 7142 // de-identification purposes. 7143 Redacted bool `json:"redacted,omitempty"` 7144 // TextAnchor: Optional. Provenance of the entity. Text anchor indexing into 7145 // the Document.text. 7146 TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` 7147 // Type: Required. Entity type from a schema e.g. `Address`. 7148 Type string `json:"type,omitempty"` 7149 // ForceSendFields is a list of field names (e.g. "Confidence") to 7150 // unconditionally include in API requests. By default, fields with empty or 7151 // default values are omitted from API requests. See 7152 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7153 // details. 7154 ForceSendFields []string `json:"-"` 7155 // NullFields is a list of field names (e.g. "Confidence") to include in API 7156 // requests with the JSON null value. By default, fields with empty values are 7157 // omitted from API requests. See 7158 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7159 NullFields []string `json:"-"` 7160 } 7161 7162 func (s *GoogleCloudDocumentaiV1beta2DocumentEntity) MarshalJSON() ([]byte, error) { 7163 type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntity 7164 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7165 } 7166 7167 func (s *GoogleCloudDocumentaiV1beta2DocumentEntity) UnmarshalJSON(data []byte) error { 7168 type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntity 7169 var s1 struct { 7170 Confidence gensupport.JSONFloat64 `json:"confidence"` 7171 *NoMethod 7172 } 7173 s1.NoMethod = (*NoMethod)(s) 7174 if err := json.Unmarshal(data, &s1); err != nil { 7175 return err 7176 } 7177 s.Confidence = float64(s1.Confidence) 7178 return nil 7179 } 7180 7181 // GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue: Parsed and 7182 // normalized entity value. 7183 type GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue struct { 7184 // AddressValue: Postal address. See also: 7185 // https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto 7186 AddressValue *GoogleTypePostalAddress `json:"addressValue,omitempty"` 7187 // BooleanValue: Boolean value. Can be used for entities with binary values, or 7188 // for checkboxes. 7189 BooleanValue bool `json:"booleanValue,omitempty"` 7190 // DateValue: Date value. Includes year, month, day. See also: 7191 // https://github.com/googleapis/googleapis/blob/master/google/type/date.proto 7192 DateValue *GoogleTypeDate `json:"dateValue,omitempty"` 7193 // DatetimeValue: DateTime value. Includes date, time, and timezone. See also: 7194 // https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto 7195 DatetimeValue *GoogleTypeDateTime `json:"datetimeValue,omitempty"` 7196 // FloatValue: Float value. 7197 FloatValue float64 `json:"floatValue,omitempty"` 7198 // IntegerValue: Integer value. 7199 IntegerValue int64 `json:"integerValue,omitempty"` 7200 // MoneyValue: Money value. See also: 7201 // https://github.com/googleapis/googleapis/blob/master/google/type/money.proto 7202 MoneyValue *GoogleTypeMoney `json:"moneyValue,omitempty"` 7203 // Text: Optional. An optional field to store a normalized string. For some 7204 // entity types, one of respective `structured_value` fields may also be 7205 // populated. Also not all the types of `structured_value` will be normalized. 7206 // For example, some processors may not generate `float` or `integer` 7207 // normalized text by default. Below are sample formats mapped to structured 7208 // values. - Money/Currency type (`money_value`) is in the ISO 4217 text 7209 // format. - Date type (`date_value`) is in the ISO 8601 text format. - 7210 // Datetime type (`datetime_value`) is in the ISO 8601 text format. 7211 Text string `json:"text,omitempty"` 7212 // ForceSendFields is a list of field names (e.g. "AddressValue") to 7213 // unconditionally include in API requests. By default, fields with empty or 7214 // default values are omitted from API requests. See 7215 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7216 // details. 7217 ForceSendFields []string `json:"-"` 7218 // NullFields is a list of field names (e.g. "AddressValue") to include in API 7219 // requests with the JSON null value. By default, fields with empty values are 7220 // omitted from API requests. See 7221 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7222 NullFields []string `json:"-"` 7223 } 7224 7225 func (s *GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue) MarshalJSON() ([]byte, error) { 7226 type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue 7227 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7228 } 7229 7230 func (s *GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue) UnmarshalJSON(data []byte) error { 7231 type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntityNormalizedValue 7232 var s1 struct { 7233 FloatValue gensupport.JSONFloat64 `json:"floatValue"` 7234 *NoMethod 7235 } 7236 s1.NoMethod = (*NoMethod)(s) 7237 if err := json.Unmarshal(data, &s1); err != nil { 7238 return err 7239 } 7240 s.FloatValue = float64(s1.FloatValue) 7241 return nil 7242 } 7243 7244 // GoogleCloudDocumentaiV1beta2DocumentEntityRelation: Relationship between 7245 // Entities. 7246 type GoogleCloudDocumentaiV1beta2DocumentEntityRelation struct { 7247 // ObjectId: Object entity id. 7248 ObjectId string `json:"objectId,omitempty"` 7249 // Relation: Relationship description. 7250 Relation string `json:"relation,omitempty"` 7251 // SubjectId: Subject entity id. 7252 SubjectId string `json:"subjectId,omitempty"` 7253 // ForceSendFields is a list of field names (e.g. "ObjectId") to 7254 // unconditionally include in API requests. By default, fields with empty or 7255 // default values are omitted from API requests. See 7256 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7257 // details. 7258 ForceSendFields []string `json:"-"` 7259 // NullFields is a list of field names (e.g. "ObjectId") to include in API 7260 // requests with the JSON null value. By default, fields with empty values are 7261 // omitted from API requests. See 7262 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7263 NullFields []string `json:"-"` 7264 } 7265 7266 func (s *GoogleCloudDocumentaiV1beta2DocumentEntityRelation) MarshalJSON() ([]byte, error) { 7267 type NoMethod GoogleCloudDocumentaiV1beta2DocumentEntityRelation 7268 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7269 } 7270 7271 // GoogleCloudDocumentaiV1beta2DocumentLabel: Label attaches schema information 7272 // and/or other metadata to segments within a Document. Multiple Labels on a 7273 // single field can denote either different labels, different instances of the 7274 // same label created at different times, or some combination of both. 7275 type GoogleCloudDocumentaiV1beta2DocumentLabel struct { 7276 // AutomlModel: Label is generated AutoML model. This field stores the full 7277 // resource name of the AutoML model. Format: 7278 // `projects/{project-id}/locations/{location-id}/models/{model-id}` 7279 AutomlModel string `json:"automlModel,omitempty"` 7280 // Confidence: Confidence score between 0 and 1 for label assignment. 7281 Confidence float64 `json:"confidence,omitempty"` 7282 // Name: Name of the label. When the label is generated from AutoML Text 7283 // Classification model, this field represents the name of the category. 7284 Name string `json:"name,omitempty"` 7285 // ForceSendFields is a list of field names (e.g. "AutomlModel") to 7286 // unconditionally include in API requests. By default, fields with empty or 7287 // default values are omitted from API requests. See 7288 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7289 // details. 7290 ForceSendFields []string `json:"-"` 7291 // NullFields is a list of field names (e.g. "AutomlModel") to include in API 7292 // requests with the JSON null value. By default, fields with empty values are 7293 // omitted from API requests. See 7294 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7295 NullFields []string `json:"-"` 7296 } 7297 7298 func (s *GoogleCloudDocumentaiV1beta2DocumentLabel) MarshalJSON() ([]byte, error) { 7299 type NoMethod GoogleCloudDocumentaiV1beta2DocumentLabel 7300 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7301 } 7302 7303 func (s *GoogleCloudDocumentaiV1beta2DocumentLabel) UnmarshalJSON(data []byte) error { 7304 type NoMethod GoogleCloudDocumentaiV1beta2DocumentLabel 7305 var s1 struct { 7306 Confidence gensupport.JSONFloat64 `json:"confidence"` 7307 *NoMethod 7308 } 7309 s1.NoMethod = (*NoMethod)(s) 7310 if err := json.Unmarshal(data, &s1); err != nil { 7311 return err 7312 } 7313 s.Confidence = float64(s1.Confidence) 7314 return nil 7315 } 7316 7317 // GoogleCloudDocumentaiV1beta2DocumentPage: A page in a Document. 7318 type GoogleCloudDocumentaiV1beta2DocumentPage struct { 7319 // Blocks: A list of visually detected text blocks on the page. A block has a 7320 // set of lines (collected into paragraphs) that have a common line-spacing and 7321 // orientation. 7322 Blocks []*GoogleCloudDocumentaiV1beta2DocumentPageBlock `json:"blocks,omitempty"` 7323 // DetectedBarcodes: A list of detected barcodes. 7324 DetectedBarcodes []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode `json:"detectedBarcodes,omitempty"` 7325 // DetectedLanguages: A list of detected languages together with confidence. 7326 DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 7327 // Dimension: Physical dimension of the page. 7328 Dimension *GoogleCloudDocumentaiV1beta2DocumentPageDimension `json:"dimension,omitempty"` 7329 // FormFields: A list of visually detected form fields on the page. 7330 FormFields []*GoogleCloudDocumentaiV1beta2DocumentPageFormField `json:"formFields,omitempty"` 7331 // Image: Rendered image for this page. This image is preprocessed to remove 7332 // any skew, rotation, and distortions such that the annotation bounding boxes 7333 // can be upright and axis-aligned. 7334 Image *GoogleCloudDocumentaiV1beta2DocumentPageImage `json:"image,omitempty"` 7335 // ImageQualityScores: Image quality scores. 7336 ImageQualityScores *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` 7337 // Layout: Layout for the page. 7338 Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` 7339 // Lines: A list of visually detected text lines on the page. A collection of 7340 // tokens that a human would perceive as a line. 7341 Lines []*GoogleCloudDocumentaiV1beta2DocumentPageLine `json:"lines,omitempty"` 7342 // PageNumber: 1-based index for current Page in a parent Document. Useful when 7343 // a page is taken out of a Document for individual processing. 7344 PageNumber int64 `json:"pageNumber,omitempty"` 7345 // Paragraphs: A list of visually detected text paragraphs on the page. A 7346 // collection of lines that a human would perceive as a paragraph. 7347 Paragraphs []*GoogleCloudDocumentaiV1beta2DocumentPageParagraph `json:"paragraphs,omitempty"` 7348 // Provenance: The history of this page. 7349 Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` 7350 // Symbols: A list of visually detected symbols on the page. 7351 Symbols []*GoogleCloudDocumentaiV1beta2DocumentPageSymbol `json:"symbols,omitempty"` 7352 // Tables: A list of visually detected tables on the page. 7353 Tables []*GoogleCloudDocumentaiV1beta2DocumentPageTable `json:"tables,omitempty"` 7354 // Tokens: A list of visually detected tokens on the page. 7355 Tokens []*GoogleCloudDocumentaiV1beta2DocumentPageToken `json:"tokens,omitempty"` 7356 // Transforms: Transformation matrices that were applied to the original 7357 // document image to produce Page.image. 7358 Transforms []*GoogleCloudDocumentaiV1beta2DocumentPageMatrix `json:"transforms,omitempty"` 7359 // VisualElements: A list of detected non-text visual elements e.g. checkbox, 7360 // signature etc. on the page. 7361 VisualElements []*GoogleCloudDocumentaiV1beta2DocumentPageVisualElement `json:"visualElements,omitempty"` 7362 // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally 7363 // include in API requests. By default, fields with empty or default values are 7364 // omitted from API requests. See 7365 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7366 // details. 7367 ForceSendFields []string `json:"-"` 7368 // NullFields is a list of field names (e.g. "Blocks") to include in API 7369 // requests with the JSON null value. By default, fields with empty values are 7370 // omitted from API requests. See 7371 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7372 NullFields []string `json:"-"` 7373 } 7374 7375 func (s *GoogleCloudDocumentaiV1beta2DocumentPage) MarshalJSON() ([]byte, error) { 7376 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPage 7377 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7378 } 7379 7380 // GoogleCloudDocumentaiV1beta2DocumentPageAnchor: Referencing the visual 7381 // context of the entity in the Document.pages. Page anchors can be cross-page, 7382 // consist of multiple bounding polygons and optionally reference specific 7383 // layout element types. 7384 type GoogleCloudDocumentaiV1beta2DocumentPageAnchor struct { 7385 // PageRefs: One or more references to visual page elements 7386 PageRefs []*GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef `json:"pageRefs,omitempty"` 7387 // ForceSendFields is a list of field names (e.g. "PageRefs") to 7388 // unconditionally include in API requests. By default, fields with empty or 7389 // default values are omitted from API requests. See 7390 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7391 // details. 7392 ForceSendFields []string `json:"-"` 7393 // NullFields is a list of field names (e.g. "PageRefs") to include in API 7394 // requests with the JSON null value. By default, fields with empty values are 7395 // omitted from API requests. See 7396 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7397 NullFields []string `json:"-"` 7398 } 7399 7400 func (s *GoogleCloudDocumentaiV1beta2DocumentPageAnchor) MarshalJSON() ([]byte, error) { 7401 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageAnchor 7402 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7403 } 7404 7405 // GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef: Represents a weak 7406 // reference to a page element within a document. 7407 type GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef struct { 7408 // BoundingPoly: Optional. Identifies the bounding polygon of a layout element 7409 // on the page. If `layout_type` is set, the bounding polygon must be exactly 7410 // the same to the layout element it's referring to. 7411 BoundingPoly *GoogleCloudDocumentaiV1beta2BoundingPoly `json:"boundingPoly,omitempty"` 7412 // Confidence: Optional. Confidence of detected page element, if applicable. 7413 // Range `[0, 1]`. 7414 Confidence float64 `json:"confidence,omitempty"` 7415 // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. 7416 LayoutId string `json:"layoutId,omitempty"` 7417 // LayoutType: Optional. The type of the layout element that is being 7418 // referenced if any. 7419 // 7420 // Possible values: 7421 // "LAYOUT_TYPE_UNSPECIFIED" - Layout Unspecified. 7422 // "BLOCK" - References a Page.blocks element. 7423 // "PARAGRAPH" - References a Page.paragraphs element. 7424 // "LINE" - References a Page.lines element. 7425 // "TOKEN" - References a Page.tokens element. 7426 // "VISUAL_ELEMENT" - References a Page.visual_elements element. 7427 // "TABLE" - Refrrences a Page.tables element. 7428 // "FORM_FIELD" - References a Page.form_fields element. 7429 LayoutType string `json:"layoutType,omitempty"` 7430 // Page: Required. Index into the Document.pages element, for example using 7431 // `Document.pages` to locate the related page element. This field is skipped 7432 // when its value is the default `0`. See 7433 // https://developers.google.com/protocol-buffers/docs/proto3#json. 7434 Page int64 `json:"page,omitempty,string"` 7435 // ForceSendFields is a list of field names (e.g. "BoundingPoly") to 7436 // unconditionally include in API requests. By default, fields with empty or 7437 // default values are omitted from API requests. See 7438 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7439 // details. 7440 ForceSendFields []string `json:"-"` 7441 // NullFields is a list of field names (e.g. "BoundingPoly") to include in API 7442 // requests with the JSON null value. By default, fields with empty values are 7443 // omitted from API requests. See 7444 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7445 NullFields []string `json:"-"` 7446 } 7447 7448 func (s *GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef) MarshalJSON() ([]byte, error) { 7449 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef 7450 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7451 } 7452 7453 func (s *GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef) UnmarshalJSON(data []byte) error { 7454 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef 7455 var s1 struct { 7456 Confidence gensupport.JSONFloat64 `json:"confidence"` 7457 *NoMethod 7458 } 7459 s1.NoMethod = (*NoMethod)(s) 7460 if err := json.Unmarshal(data, &s1); err != nil { 7461 return err 7462 } 7463 s.Confidence = float64(s1.Confidence) 7464 return nil 7465 } 7466 7467 // GoogleCloudDocumentaiV1beta2DocumentPageBlock: A block has a set of lines 7468 // (collected into paragraphs) that have a common line-spacing and orientation. 7469 type GoogleCloudDocumentaiV1beta2DocumentPageBlock struct { 7470 // DetectedLanguages: A list of detected languages together with confidence. 7471 DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 7472 // Layout: Layout for Block. 7473 Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` 7474 // Provenance: The history of this annotation. 7475 Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` 7476 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 7477 // unconditionally include in API requests. By default, fields with empty or 7478 // default values are omitted from API requests. See 7479 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7480 // details. 7481 ForceSendFields []string `json:"-"` 7482 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 7483 // API requests with the JSON null value. By default, fields with empty values 7484 // are omitted from API requests. See 7485 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7486 NullFields []string `json:"-"` 7487 } 7488 7489 func (s *GoogleCloudDocumentaiV1beta2DocumentPageBlock) MarshalJSON() ([]byte, error) { 7490 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageBlock 7491 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7492 } 7493 7494 // GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode: A detected barcode. 7495 type GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode struct { 7496 // Barcode: Detailed barcode information of the DetectedBarcode. 7497 Barcode *GoogleCloudDocumentaiV1beta2Barcode `json:"barcode,omitempty"` 7498 // Layout: Layout for DetectedBarcode. 7499 Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` 7500 // ForceSendFields is a list of field names (e.g. "Barcode") to unconditionally 7501 // include in API requests. By default, fields with empty or default values are 7502 // omitted from API requests. See 7503 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7504 // details. 7505 ForceSendFields []string `json:"-"` 7506 // NullFields is a list of field names (e.g. "Barcode") to include in API 7507 // requests with the JSON null value. By default, fields with empty values are 7508 // omitted from API requests. See 7509 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7510 NullFields []string `json:"-"` 7511 } 7512 7513 func (s *GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { 7514 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDetectedBarcode 7515 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7516 } 7517 7518 // GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage: Detected language 7519 // for a structural component. 7520 type GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage struct { 7521 // Confidence: Confidence of detected language. Range `[0, 1]`. 7522 Confidence float64 `json:"confidence,omitempty"` 7523 // LanguageCode: The BCP-47 language code 7524 // (https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as 7525 // `en-US` or `sr-Latn`. 7526 LanguageCode string `json:"languageCode,omitempty"` 7527 // ForceSendFields is a list of field names (e.g. "Confidence") to 7528 // unconditionally include in API requests. By default, fields with empty or 7529 // default values are omitted from API requests. See 7530 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7531 // details. 7532 ForceSendFields []string `json:"-"` 7533 // NullFields is a list of field names (e.g. "Confidence") to include in API 7534 // requests with the JSON null value. By default, fields with empty values are 7535 // omitted from API requests. See 7536 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7537 NullFields []string `json:"-"` 7538 } 7539 7540 func (s *GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage) MarshalJSON() ([]byte, error) { 7541 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage 7542 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7543 } 7544 7545 func (s *GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage) UnmarshalJSON(data []byte) error { 7546 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage 7547 var s1 struct { 7548 Confidence gensupport.JSONFloat64 `json:"confidence"` 7549 *NoMethod 7550 } 7551 s1.NoMethod = (*NoMethod)(s) 7552 if err := json.Unmarshal(data, &s1); err != nil { 7553 return err 7554 } 7555 s.Confidence = float64(s1.Confidence) 7556 return nil 7557 } 7558 7559 // GoogleCloudDocumentaiV1beta2DocumentPageDimension: Dimension for the page. 7560 type GoogleCloudDocumentaiV1beta2DocumentPageDimension struct { 7561 // Height: Page height. 7562 Height float64 `json:"height,omitempty"` 7563 // Unit: Dimension unit. 7564 Unit string `json:"unit,omitempty"` 7565 // Width: Page width. 7566 Width float64 `json:"width,omitempty"` 7567 // ForceSendFields is a list of field names (e.g. "Height") to unconditionally 7568 // include in API requests. By default, fields with empty or default values are 7569 // omitted from API requests. See 7570 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7571 // details. 7572 ForceSendFields []string `json:"-"` 7573 // NullFields is a list of field names (e.g. "Height") to include in API 7574 // requests with the JSON null value. By default, fields with empty values are 7575 // omitted from API requests. See 7576 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7577 NullFields []string `json:"-"` 7578 } 7579 7580 func (s *GoogleCloudDocumentaiV1beta2DocumentPageDimension) MarshalJSON() ([]byte, error) { 7581 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDimension 7582 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7583 } 7584 7585 func (s *GoogleCloudDocumentaiV1beta2DocumentPageDimension) UnmarshalJSON(data []byte) error { 7586 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageDimension 7587 var s1 struct { 7588 Height gensupport.JSONFloat64 `json:"height"` 7589 Width gensupport.JSONFloat64 `json:"width"` 7590 *NoMethod 7591 } 7592 s1.NoMethod = (*NoMethod)(s) 7593 if err := json.Unmarshal(data, &s1); err != nil { 7594 return err 7595 } 7596 s.Height = float64(s1.Height) 7597 s.Width = float64(s1.Width) 7598 return nil 7599 } 7600 7601 // GoogleCloudDocumentaiV1beta2DocumentPageFormField: A form field detected on 7602 // the page. 7603 type GoogleCloudDocumentaiV1beta2DocumentPageFormField struct { 7604 // CorrectedKeyText: Created for Labeling UI to export key text. If corrections 7605 // were made to the text identified by the `field_name.text_anchor`, this field 7606 // will contain the correction. 7607 CorrectedKeyText string `json:"correctedKeyText,omitempty"` 7608 // CorrectedValueText: Created for Labeling UI to export value text. If 7609 // corrections were made to the text identified by the 7610 // `field_value.text_anchor`, this field will contain the correction. 7611 CorrectedValueText string `json:"correctedValueText,omitempty"` 7612 // FieldName: Layout for the FormField name. e.g. `Address`, `Email`, `Grand 7613 // total`, `Phone number`, etc. 7614 FieldName *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"fieldName,omitempty"` 7615 // FieldValue: Layout for the FormField value. 7616 FieldValue *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"fieldValue,omitempty"` 7617 // NameDetectedLanguages: A list of detected languages for name together with 7618 // confidence. 7619 NameDetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"nameDetectedLanguages,omitempty"` 7620 // Provenance: The history of this annotation. 7621 Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` 7622 // ValueDetectedLanguages: A list of detected languages for value together with 7623 // confidence. 7624 ValueDetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"valueDetectedLanguages,omitempty"` 7625 // ValueType: If the value is non-textual, this field represents the type. 7626 // Current valid values are: - blank (this indicates the `field_value` is 7627 // normal text) - `unfilled_checkbox` - `filled_checkbox` 7628 ValueType string `json:"valueType,omitempty"` 7629 // ForceSendFields is a list of field names (e.g. "CorrectedKeyText") to 7630 // unconditionally include in API requests. By default, fields with empty or 7631 // default values are omitted from API requests. See 7632 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7633 // details. 7634 ForceSendFields []string `json:"-"` 7635 // NullFields is a list of field names (e.g. "CorrectedKeyText") to include in 7636 // API requests with the JSON null value. By default, fields with empty values 7637 // are omitted from API requests. See 7638 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7639 NullFields []string `json:"-"` 7640 } 7641 7642 func (s *GoogleCloudDocumentaiV1beta2DocumentPageFormField) MarshalJSON() ([]byte, error) { 7643 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageFormField 7644 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7645 } 7646 7647 // GoogleCloudDocumentaiV1beta2DocumentPageImage: Rendered image contents for 7648 // this page. 7649 type GoogleCloudDocumentaiV1beta2DocumentPageImage struct { 7650 // Content: Raw byte content of the image. 7651 Content string `json:"content,omitempty"` 7652 // Height: Height of the image in pixels. 7653 Height int64 `json:"height,omitempty"` 7654 // MimeType: Encoding media type (MIME type) 7655 // (https://www.iana.org/assignments/media-types/media-types.xhtml) for the 7656 // image. 7657 MimeType string `json:"mimeType,omitempty"` 7658 // Width: Width of the image in pixels. 7659 Width int64 `json:"width,omitempty"` 7660 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 7661 // include in API requests. By default, fields with empty or default values are 7662 // omitted from API requests. See 7663 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7664 // details. 7665 ForceSendFields []string `json:"-"` 7666 // NullFields is a list of field names (e.g. "Content") to include in API 7667 // requests with the JSON null value. By default, fields with empty values are 7668 // omitted from API requests. See 7669 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7670 NullFields []string `json:"-"` 7671 } 7672 7673 func (s *GoogleCloudDocumentaiV1beta2DocumentPageImage) MarshalJSON() ([]byte, error) { 7674 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImage 7675 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7676 } 7677 7678 // GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores: Image quality 7679 // scores for the page image. 7680 type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores struct { 7681 // DetectedDefects: A list of detected defects. 7682 DetectedDefects []*GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` 7683 // QualityScore: The overall quality score. Range `[0, 1]` where `1` is perfect 7684 // quality. 7685 QualityScore float64 `json:"qualityScore,omitempty"` 7686 // ForceSendFields is a list of field names (e.g. "DetectedDefects") to 7687 // unconditionally include in API requests. By default, fields with empty or 7688 // default values are omitted from API requests. See 7689 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7690 // details. 7691 ForceSendFields []string `json:"-"` 7692 // NullFields is a list of field names (e.g. "DetectedDefects") to include in 7693 // API requests with the JSON null value. By default, fields with empty values 7694 // are omitted from API requests. See 7695 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7696 NullFields []string `json:"-"` 7697 } 7698 7699 func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { 7700 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores 7701 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7702 } 7703 7704 func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { 7705 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores 7706 var s1 struct { 7707 QualityScore gensupport.JSONFloat64 `json:"qualityScore"` 7708 *NoMethod 7709 } 7710 s1.NoMethod = (*NoMethod)(s) 7711 if err := json.Unmarshal(data, &s1); err != nil { 7712 return err 7713 } 7714 s.QualityScore = float64(s1.QualityScore) 7715 return nil 7716 } 7717 7718 // GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect: 7719 // Image Quality Defects 7720 type GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect struct { 7721 // Confidence: Confidence of detected defect. Range `[0, 1]` where `1` 7722 // indicates strong confidence that the defect exists. 7723 Confidence float64 `json:"confidence,omitempty"` 7724 // Type: Name of the defect type. Supported values are: - 7725 // `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - 7726 // `quality/defect_faint` - `quality/defect_text_too_small` - 7727 // `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - 7728 // `quality/defect_glare` 7729 Type string `json:"type,omitempty"` 7730 // ForceSendFields is a list of field names (e.g. "Confidence") to 7731 // unconditionally include in API requests. By default, fields with empty or 7732 // default values are omitted from API requests. See 7733 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7734 // details. 7735 ForceSendFields []string `json:"-"` 7736 // NullFields is a list of field names (e.g. "Confidence") to include in API 7737 // requests with the JSON null value. By default, fields with empty values are 7738 // omitted from API requests. See 7739 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7740 NullFields []string `json:"-"` 7741 } 7742 7743 func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { 7744 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect 7745 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7746 } 7747 7748 func (s *GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { 7749 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect 7750 var s1 struct { 7751 Confidence gensupport.JSONFloat64 `json:"confidence"` 7752 *NoMethod 7753 } 7754 s1.NoMethod = (*NoMethod)(s) 7755 if err := json.Unmarshal(data, &s1); err != nil { 7756 return err 7757 } 7758 s.Confidence = float64(s1.Confidence) 7759 return nil 7760 } 7761 7762 // GoogleCloudDocumentaiV1beta2DocumentPageLayout: Visual element describing a 7763 // layout unit on a page. 7764 type GoogleCloudDocumentaiV1beta2DocumentPageLayout struct { 7765 // BoundingPoly: The bounding polygon for the Layout. 7766 BoundingPoly *GoogleCloudDocumentaiV1beta2BoundingPoly `json:"boundingPoly,omitempty"` 7767 // Confidence: Confidence of the current Layout within context of the object 7768 // this layout is for. e.g. confidence can be for a single token, a table, a 7769 // visual element, etc. depending on context. Range `[0, 1]`. 7770 Confidence float64 `json:"confidence,omitempty"` 7771 // Orientation: Detected orientation for the Layout. 7772 // 7773 // Possible values: 7774 // "ORIENTATION_UNSPECIFIED" - Unspecified orientation. 7775 // "PAGE_UP" - Orientation is aligned with page up. 7776 // "PAGE_RIGHT" - Orientation is aligned with page right. Turn the head 90 7777 // degrees clockwise from upright to read. 7778 // "PAGE_DOWN" - Orientation is aligned with page down. Turn the head 180 7779 // degrees from upright to read. 7780 // "PAGE_LEFT" - Orientation is aligned with page left. Turn the head 90 7781 // degrees counterclockwise from upright to read. 7782 Orientation string `json:"orientation,omitempty"` 7783 // TextAnchor: Text anchor indexing into the Document.text. 7784 TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` 7785 // ForceSendFields is a list of field names (e.g. "BoundingPoly") to 7786 // unconditionally include in API requests. By default, fields with empty or 7787 // default values are omitted from API requests. See 7788 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7789 // details. 7790 ForceSendFields []string `json:"-"` 7791 // NullFields is a list of field names (e.g. "BoundingPoly") to include in API 7792 // requests with the JSON null value. By default, fields with empty values are 7793 // omitted from API requests. See 7794 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7795 NullFields []string `json:"-"` 7796 } 7797 7798 func (s *GoogleCloudDocumentaiV1beta2DocumentPageLayout) MarshalJSON() ([]byte, error) { 7799 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageLayout 7800 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7801 } 7802 7803 func (s *GoogleCloudDocumentaiV1beta2DocumentPageLayout) UnmarshalJSON(data []byte) error { 7804 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageLayout 7805 var s1 struct { 7806 Confidence gensupport.JSONFloat64 `json:"confidence"` 7807 *NoMethod 7808 } 7809 s1.NoMethod = (*NoMethod)(s) 7810 if err := json.Unmarshal(data, &s1); err != nil { 7811 return err 7812 } 7813 s.Confidence = float64(s1.Confidence) 7814 return nil 7815 } 7816 7817 // GoogleCloudDocumentaiV1beta2DocumentPageLine: A collection of tokens that a 7818 // human would perceive as a line. Does not cross column boundaries, can be 7819 // horizontal, vertical, etc. 7820 type GoogleCloudDocumentaiV1beta2DocumentPageLine struct { 7821 // DetectedLanguages: A list of detected languages together with confidence. 7822 DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 7823 // Layout: Layout for Line. 7824 Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` 7825 // Provenance: The history of this annotation. 7826 Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` 7827 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 7828 // unconditionally include in API requests. By default, fields with empty or 7829 // default values are omitted from API requests. See 7830 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7831 // details. 7832 ForceSendFields []string `json:"-"` 7833 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 7834 // API requests with the JSON null value. By default, fields with empty values 7835 // are omitted from API requests. See 7836 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7837 NullFields []string `json:"-"` 7838 } 7839 7840 func (s *GoogleCloudDocumentaiV1beta2DocumentPageLine) MarshalJSON() ([]byte, error) { 7841 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageLine 7842 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7843 } 7844 7845 // GoogleCloudDocumentaiV1beta2DocumentPageMatrix: Representation for 7846 // transformation matrix, intended to be compatible and used with OpenCV format 7847 // for image manipulation. 7848 type GoogleCloudDocumentaiV1beta2DocumentPageMatrix struct { 7849 // Cols: Number of columns in the matrix. 7850 Cols int64 `json:"cols,omitempty"` 7851 // Data: The matrix data. 7852 Data string `json:"data,omitempty"` 7853 // Rows: Number of rows in the matrix. 7854 Rows int64 `json:"rows,omitempty"` 7855 // Type: This encodes information about what data type the matrix uses. For 7856 // example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV 7857 // primitive data types, please refer to 7858 // https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html 7859 Type int64 `json:"type,omitempty"` 7860 // ForceSendFields is a list of field names (e.g. "Cols") to unconditionally 7861 // include in API requests. By default, fields with empty or default values are 7862 // omitted from API requests. See 7863 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7864 // details. 7865 ForceSendFields []string `json:"-"` 7866 // NullFields is a list of field names (e.g. "Cols") to include in API requests 7867 // with the JSON null value. By default, fields with empty values are omitted 7868 // from API requests. See 7869 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7870 NullFields []string `json:"-"` 7871 } 7872 7873 func (s *GoogleCloudDocumentaiV1beta2DocumentPageMatrix) MarshalJSON() ([]byte, error) { 7874 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageMatrix 7875 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7876 } 7877 7878 // GoogleCloudDocumentaiV1beta2DocumentPageParagraph: A collection of lines 7879 // that a human would perceive as a paragraph. 7880 type GoogleCloudDocumentaiV1beta2DocumentPageParagraph struct { 7881 // DetectedLanguages: A list of detected languages together with confidence. 7882 DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 7883 // Layout: Layout for Paragraph. 7884 Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` 7885 // Provenance: The history of this annotation. 7886 Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` 7887 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 7888 // unconditionally include in API requests. By default, fields with empty or 7889 // default values are omitted from API requests. See 7890 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7891 // details. 7892 ForceSendFields []string `json:"-"` 7893 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 7894 // API requests with the JSON null value. By default, fields with empty values 7895 // are omitted from API requests. See 7896 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7897 NullFields []string `json:"-"` 7898 } 7899 7900 func (s *GoogleCloudDocumentaiV1beta2DocumentPageParagraph) MarshalJSON() ([]byte, error) { 7901 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageParagraph 7902 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7903 } 7904 7905 // GoogleCloudDocumentaiV1beta2DocumentPageSymbol: A detected symbol. 7906 type GoogleCloudDocumentaiV1beta2DocumentPageSymbol struct { 7907 // DetectedLanguages: A list of detected languages together with confidence. 7908 DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 7909 // Layout: Layout for Symbol. 7910 Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` 7911 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 7912 // unconditionally include in API requests. By default, fields with empty or 7913 // default values are omitted from API requests. See 7914 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7915 // details. 7916 ForceSendFields []string `json:"-"` 7917 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 7918 // API requests with the JSON null value. By default, fields with empty values 7919 // are omitted from API requests. See 7920 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7921 NullFields []string `json:"-"` 7922 } 7923 7924 func (s *GoogleCloudDocumentaiV1beta2DocumentPageSymbol) MarshalJSON() ([]byte, error) { 7925 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageSymbol 7926 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7927 } 7928 7929 // GoogleCloudDocumentaiV1beta2DocumentPageTable: A table representation 7930 // similar to HTML table structure. 7931 type GoogleCloudDocumentaiV1beta2DocumentPageTable struct { 7932 // BodyRows: Body rows of the table. 7933 BodyRows []*GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow `json:"bodyRows,omitempty"` 7934 // DetectedLanguages: A list of detected languages together with confidence. 7935 DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 7936 // HeaderRows: Header rows of the table. 7937 HeaderRows []*GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow `json:"headerRows,omitempty"` 7938 // Layout: Layout for Table. 7939 Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` 7940 // Provenance: The history of this table. 7941 Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` 7942 // ForceSendFields is a list of field names (e.g. "BodyRows") to 7943 // unconditionally include in API requests. By default, fields with empty or 7944 // default values are omitted from API requests. See 7945 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7946 // details. 7947 ForceSendFields []string `json:"-"` 7948 // NullFields is a list of field names (e.g. "BodyRows") to include in API 7949 // requests with the JSON null value. By default, fields with empty values are 7950 // omitted from API requests. See 7951 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7952 NullFields []string `json:"-"` 7953 } 7954 7955 func (s *GoogleCloudDocumentaiV1beta2DocumentPageTable) MarshalJSON() ([]byte, error) { 7956 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTable 7957 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7958 } 7959 7960 // GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell: A cell 7961 // representation inside the table. 7962 type GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell struct { 7963 // ColSpan: How many columns this cell spans. 7964 ColSpan int64 `json:"colSpan,omitempty"` 7965 // DetectedLanguages: A list of detected languages together with confidence. 7966 DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 7967 // Layout: Layout for TableCell. 7968 Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` 7969 // RowSpan: How many rows this cell spans. 7970 RowSpan int64 `json:"rowSpan,omitempty"` 7971 // ForceSendFields is a list of field names (e.g. "ColSpan") to unconditionally 7972 // include in API requests. By default, fields with empty or default values are 7973 // omitted from API requests. See 7974 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7975 // details. 7976 ForceSendFields []string `json:"-"` 7977 // NullFields is a list of field names (e.g. "ColSpan") to include in API 7978 // requests with the JSON null value. By default, fields with empty values are 7979 // omitted from API requests. See 7980 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 7981 NullFields []string `json:"-"` 7982 } 7983 7984 func (s *GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell) MarshalJSON() ([]byte, error) { 7985 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell 7986 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 7987 } 7988 7989 // GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow: A row of table cells. 7990 type GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow struct { 7991 // Cells: Cells that make up this row. 7992 Cells []*GoogleCloudDocumentaiV1beta2DocumentPageTableTableCell `json:"cells,omitempty"` 7993 // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally 7994 // include in API requests. By default, fields with empty or default values are 7995 // omitted from API requests. See 7996 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 7997 // details. 7998 ForceSendFields []string `json:"-"` 7999 // NullFields is a list of field names (e.g. "Cells") to include in API 8000 // requests with the JSON null value. By default, fields with empty values are 8001 // omitted from API requests. See 8002 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8003 NullFields []string `json:"-"` 8004 } 8005 8006 func (s *GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow) MarshalJSON() ([]byte, error) { 8007 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTableTableRow 8008 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8009 } 8010 8011 // GoogleCloudDocumentaiV1beta2DocumentPageToken: A detected token. 8012 type GoogleCloudDocumentaiV1beta2DocumentPageToken struct { 8013 // DetectedBreak: Detected break at the end of a Token. 8014 DetectedBreak *GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak `json:"detectedBreak,omitempty"` 8015 // DetectedLanguages: A list of detected languages together with confidence. 8016 DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 8017 // Layout: Layout for Token. 8018 Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` 8019 // Provenance: The history of this annotation. 8020 Provenance *GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` 8021 // StyleInfo: Text style attributes. 8022 StyleInfo *GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo `json:"styleInfo,omitempty"` 8023 // ForceSendFields is a list of field names (e.g. "DetectedBreak") to 8024 // unconditionally include in API requests. By default, fields with empty or 8025 // default values are omitted from API requests. See 8026 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8027 // details. 8028 ForceSendFields []string `json:"-"` 8029 // NullFields is a list of field names (e.g. "DetectedBreak") to include in API 8030 // requests with the JSON null value. By default, fields with empty values are 8031 // omitted from API requests. See 8032 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8033 NullFields []string `json:"-"` 8034 } 8035 8036 func (s *GoogleCloudDocumentaiV1beta2DocumentPageToken) MarshalJSON() ([]byte, error) { 8037 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageToken 8038 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8039 } 8040 8041 // GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak: Detected break 8042 // at the end of a Token. 8043 type GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak struct { 8044 // Type: Detected break type. 8045 // 8046 // Possible values: 8047 // "TYPE_UNSPECIFIED" - Unspecified break type. 8048 // "SPACE" - A single whitespace. 8049 // "WIDE_SPACE" - A wider whitespace. 8050 // "HYPHEN" - A hyphen that indicates that a token has been split across 8051 // lines. 8052 Type string `json:"type,omitempty"` 8053 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 8054 // include in API requests. By default, fields with empty or default values are 8055 // omitted from API requests. See 8056 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8057 // details. 8058 ForceSendFields []string `json:"-"` 8059 // NullFields is a list of field names (e.g. "Type") to include in API requests 8060 // with the JSON null value. By default, fields with empty values are omitted 8061 // from API requests. See 8062 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8063 NullFields []string `json:"-"` 8064 } 8065 8066 func (s *GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak) MarshalJSON() ([]byte, error) { 8067 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTokenDetectedBreak 8068 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8069 } 8070 8071 // GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo: Font and other text 8072 // style attributes. 8073 type GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo struct { 8074 // BackgroundColor: Color of the background. 8075 BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` 8076 // Bold: Whether the text is bold (equivalent to font_weight is at least 8077 // `700`). 8078 Bold bool `json:"bold,omitempty"` 8079 // FontSize: Font size in points (`1` point is `¹⁄₇₂` inches). 8080 FontSize int64 `json:"fontSize,omitempty"` 8081 // FontType: Name or style of the font. 8082 FontType string `json:"fontType,omitempty"` 8083 // FontWeight: TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). 8084 // Normal is `400`, bold is `700`. 8085 FontWeight int64 `json:"fontWeight,omitempty"` 8086 // Handwritten: Whether the text is handwritten. 8087 Handwritten bool `json:"handwritten,omitempty"` 8088 // Italic: Whether the text is italic. 8089 Italic bool `json:"italic,omitempty"` 8090 // LetterSpacing: Letter spacing in points. 8091 LetterSpacing float64 `json:"letterSpacing,omitempty"` 8092 // PixelFontSize: Font size in pixels, equal to _unrounded font_size_ * 8093 // _resolution_ ÷ `72.0`. 8094 PixelFontSize float64 `json:"pixelFontSize,omitempty"` 8095 // Smallcaps: Whether the text is in small caps. This feature is not supported 8096 // yet. 8097 Smallcaps bool `json:"smallcaps,omitempty"` 8098 // Strikeout: Whether the text is strikethrough. This feature is not supported 8099 // yet. 8100 Strikeout bool `json:"strikeout,omitempty"` 8101 // Subscript: Whether the text is a subscript. This feature is not supported 8102 // yet. 8103 Subscript bool `json:"subscript,omitempty"` 8104 // Superscript: Whether the text is a superscript. This feature is not 8105 // supported yet. 8106 Superscript bool `json:"superscript,omitempty"` 8107 // TextColor: Color of the text. 8108 TextColor *GoogleTypeColor `json:"textColor,omitempty"` 8109 // Underlined: Whether the text is underlined. 8110 Underlined bool `json:"underlined,omitempty"` 8111 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to 8112 // unconditionally include in API requests. By default, fields with empty or 8113 // default values are omitted from API requests. See 8114 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8115 // details. 8116 ForceSendFields []string `json:"-"` 8117 // NullFields is a list of field names (e.g. "BackgroundColor") to include in 8118 // API requests with the JSON null value. By default, fields with empty values 8119 // are omitted from API requests. See 8120 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8121 NullFields []string `json:"-"` 8122 } 8123 8124 func (s *GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo) MarshalJSON() ([]byte, error) { 8125 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo 8126 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8127 } 8128 8129 func (s *GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo) UnmarshalJSON(data []byte) error { 8130 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageTokenStyleInfo 8131 var s1 struct { 8132 LetterSpacing gensupport.JSONFloat64 `json:"letterSpacing"` 8133 PixelFontSize gensupport.JSONFloat64 `json:"pixelFontSize"` 8134 *NoMethod 8135 } 8136 s1.NoMethod = (*NoMethod)(s) 8137 if err := json.Unmarshal(data, &s1); err != nil { 8138 return err 8139 } 8140 s.LetterSpacing = float64(s1.LetterSpacing) 8141 s.PixelFontSize = float64(s1.PixelFontSize) 8142 return nil 8143 } 8144 8145 // GoogleCloudDocumentaiV1beta2DocumentPageVisualElement: Detected non-text 8146 // visual elements e.g. checkbox, signature etc. on the page. 8147 type GoogleCloudDocumentaiV1beta2DocumentPageVisualElement struct { 8148 // DetectedLanguages: A list of detected languages together with confidence. 8149 DetectedLanguages []*GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 8150 // Layout: Layout for VisualElement. 8151 Layout *GoogleCloudDocumentaiV1beta2DocumentPageLayout `json:"layout,omitempty"` 8152 // Type: Type of the VisualElement. 8153 Type string `json:"type,omitempty"` 8154 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 8155 // unconditionally include in API requests. By default, fields with empty or 8156 // default values are omitted from API requests. See 8157 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8158 // details. 8159 ForceSendFields []string `json:"-"` 8160 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 8161 // API requests with the JSON null value. By default, fields with empty values 8162 // are omitted from API requests. See 8163 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8164 NullFields []string `json:"-"` 8165 } 8166 8167 func (s *GoogleCloudDocumentaiV1beta2DocumentPageVisualElement) MarshalJSON() ([]byte, error) { 8168 type NoMethod GoogleCloudDocumentaiV1beta2DocumentPageVisualElement 8169 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8170 } 8171 8172 // GoogleCloudDocumentaiV1beta2DocumentProvenance: Structure to identify 8173 // provenance relationships between annotations in different revisions. 8174 type GoogleCloudDocumentaiV1beta2DocumentProvenance struct { 8175 // Id: The Id of this operation. Needs to be unique within the scope of the 8176 // revision. 8177 Id int64 `json:"id,omitempty"` 8178 // Parents: References to the original elements that are replaced. 8179 Parents []*GoogleCloudDocumentaiV1beta2DocumentProvenanceParent `json:"parents,omitempty"` 8180 // Revision: The index of the revision that produced this element. 8181 Revision int64 `json:"revision,omitempty"` 8182 // Type: The type of provenance operation. 8183 // 8184 // Possible values: 8185 // "OPERATION_TYPE_UNSPECIFIED" - Operation type unspecified. If no operation 8186 // is specified a provenance entry is simply used to match against a `parent`. 8187 // "ADD" - Add an element. 8188 // "REMOVE" - Remove an element identified by `parent`. 8189 // "UPDATE" - Updates any fields within the given provenance scope of the 8190 // message. It overwrites the fields rather than replacing them. Use this when 8191 // you want to update a field value of an entity without also updating all the 8192 // child properties. 8193 // "REPLACE" - Currently unused. Replace an element identified by `parent`. 8194 // "EVAL_REQUESTED" - Deprecated. Request human review for the element 8195 // identified by `parent`. 8196 // "EVAL_APPROVED" - Deprecated. Element is reviewed and approved at human 8197 // review, confidence will be set to 1.0. 8198 // "EVAL_SKIPPED" - Deprecated. Element is skipped in the validation process. 8199 Type string `json:"type,omitempty"` 8200 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 8201 // include in API requests. By default, fields with empty or default values are 8202 // omitted from API requests. See 8203 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8204 // details. 8205 ForceSendFields []string `json:"-"` 8206 // NullFields is a list of field names (e.g. "Id") to include in API requests 8207 // with the JSON null value. By default, fields with empty values are omitted 8208 // from API requests. See 8209 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8210 NullFields []string `json:"-"` 8211 } 8212 8213 func (s *GoogleCloudDocumentaiV1beta2DocumentProvenance) MarshalJSON() ([]byte, error) { 8214 type NoMethod GoogleCloudDocumentaiV1beta2DocumentProvenance 8215 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8216 } 8217 8218 // GoogleCloudDocumentaiV1beta2DocumentProvenanceParent: The parent element the 8219 // current element is based on. Used for referencing/aligning, removal and 8220 // replacement operations. 8221 type GoogleCloudDocumentaiV1beta2DocumentProvenanceParent struct { 8222 // Id: The id of the parent provenance. 8223 Id int64 `json:"id,omitempty"` 8224 // Index: The index of the parent item in the corresponding item list (eg. list 8225 // of entities, properties within entities, etc.) in the parent revision. 8226 Index int64 `json:"index,omitempty"` 8227 // Revision: The index of the index into current revision's parent_ids list. 8228 Revision int64 `json:"revision,omitempty"` 8229 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 8230 // include in API requests. By default, fields with empty or default values are 8231 // omitted from API requests. See 8232 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8233 // details. 8234 ForceSendFields []string `json:"-"` 8235 // NullFields is a list of field names (e.g. "Id") to include in API requests 8236 // with the JSON null value. By default, fields with empty values are omitted 8237 // from API requests. See 8238 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8239 NullFields []string `json:"-"` 8240 } 8241 8242 func (s *GoogleCloudDocumentaiV1beta2DocumentProvenanceParent) MarshalJSON() ([]byte, error) { 8243 type NoMethod GoogleCloudDocumentaiV1beta2DocumentProvenanceParent 8244 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8245 } 8246 8247 // GoogleCloudDocumentaiV1beta2DocumentRevision: Contains past or forward 8248 // revisions of this document. 8249 type GoogleCloudDocumentaiV1beta2DocumentRevision struct { 8250 // Agent: If the change was made by a person specify the name or id of that 8251 // person. 8252 Agent string `json:"agent,omitempty"` 8253 // CreateTime: The time that the revision was created, internally generated by 8254 // doc proto storage at the time of create. 8255 CreateTime string `json:"createTime,omitempty"` 8256 // HumanReview: Human Review information of this revision. 8257 HumanReview *GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview `json:"humanReview,omitempty"` 8258 // Id: Id of the revision, internally generated by doc proto storage. Unique 8259 // within the context of the document. 8260 Id string `json:"id,omitempty"` 8261 // Parent: The revisions that this revision is based on. This can include one 8262 // or more parent (when documents are merged.) This field represents the index 8263 // into the `revisions` field. 8264 Parent []int64 `json:"parent,omitempty"` 8265 // ParentIds: The revisions that this revision is based on. Must include all 8266 // the ids that have anything to do with this revision - eg. there are 8267 // `provenance.parent.revision` fields that index into this field. 8268 ParentIds []string `json:"parentIds,omitempty"` 8269 // Processor: If the annotation was made by processor identify the processor by 8270 // its resource name. 8271 Processor string `json:"processor,omitempty"` 8272 // ForceSendFields is a list of field names (e.g. "Agent") to unconditionally 8273 // include in API requests. By default, fields with empty or default values are 8274 // omitted from API requests. See 8275 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8276 // details. 8277 ForceSendFields []string `json:"-"` 8278 // NullFields is a list of field names (e.g. "Agent") to include in API 8279 // requests with the JSON null value. By default, fields with empty values are 8280 // omitted from API requests. See 8281 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8282 NullFields []string `json:"-"` 8283 } 8284 8285 func (s *GoogleCloudDocumentaiV1beta2DocumentRevision) MarshalJSON() ([]byte, error) { 8286 type NoMethod GoogleCloudDocumentaiV1beta2DocumentRevision 8287 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8288 } 8289 8290 // GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview: Human Review 8291 // information of the document. 8292 type GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview struct { 8293 // State: Human review state. e.g. `requested`, `succeeded`, `rejected`. 8294 State string `json:"state,omitempty"` 8295 // StateMessage: A message providing more details about the current state of 8296 // processing. For example, the rejection reason when the state is `rejected`. 8297 StateMessage string `json:"stateMessage,omitempty"` 8298 // ForceSendFields is a list of field names (e.g. "State") to unconditionally 8299 // include in API requests. By default, fields with empty or default values are 8300 // omitted from API requests. See 8301 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8302 // details. 8303 ForceSendFields []string `json:"-"` 8304 // NullFields is a list of field names (e.g. "State") to include in API 8305 // requests with the JSON null value. By default, fields with empty values are 8306 // omitted from API requests. See 8307 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8308 NullFields []string `json:"-"` 8309 } 8310 8311 func (s *GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview) MarshalJSON() ([]byte, error) { 8312 type NoMethod GoogleCloudDocumentaiV1beta2DocumentRevisionHumanReview 8313 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8314 } 8315 8316 // GoogleCloudDocumentaiV1beta2DocumentShardInfo: For a large document, 8317 // sharding may be performed to produce several document shards. Each document 8318 // shard contains this field to detail which shard it is. 8319 type GoogleCloudDocumentaiV1beta2DocumentShardInfo struct { 8320 // ShardCount: Total number of shards. 8321 ShardCount int64 `json:"shardCount,omitempty,string"` 8322 // ShardIndex: The 0-based index of this shard. 8323 ShardIndex int64 `json:"shardIndex,omitempty,string"` 8324 // TextOffset: The index of the first character in Document.text in the overall 8325 // document global text. 8326 TextOffset int64 `json:"textOffset,omitempty,string"` 8327 // ForceSendFields is a list of field names (e.g. "ShardCount") to 8328 // unconditionally include in API requests. By default, fields with empty or 8329 // default values are omitted from API requests. See 8330 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8331 // details. 8332 ForceSendFields []string `json:"-"` 8333 // NullFields is a list of field names (e.g. "ShardCount") to include in API 8334 // requests with the JSON null value. By default, fields with empty values are 8335 // omitted from API requests. See 8336 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8337 NullFields []string `json:"-"` 8338 } 8339 8340 func (s *GoogleCloudDocumentaiV1beta2DocumentShardInfo) MarshalJSON() ([]byte, error) { 8341 type NoMethod GoogleCloudDocumentaiV1beta2DocumentShardInfo 8342 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8343 } 8344 8345 // GoogleCloudDocumentaiV1beta2DocumentStyle: Annotation for common text style 8346 // attributes. This adheres to CSS conventions as much as possible. 8347 type GoogleCloudDocumentaiV1beta2DocumentStyle struct { 8348 // BackgroundColor: Text background color. 8349 BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` 8350 // Color: Text color. 8351 Color *GoogleTypeColor `json:"color,omitempty"` 8352 // FontFamily: Font family such as `Arial`, `Times New Roman`. 8353 // https://www.w3schools.com/cssref/pr_font_font-family.asp 8354 FontFamily string `json:"fontFamily,omitempty"` 8355 // FontSize: Font size. 8356 FontSize *GoogleCloudDocumentaiV1beta2DocumentStyleFontSize `json:"fontSize,omitempty"` 8357 // FontWeight: Font weight 8358 // (https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are 8359 // `normal`, `bold`, `bolder`, and `lighter`. 8360 FontWeight string `json:"fontWeight,omitempty"` 8361 // TextAnchor: Text anchor indexing into the Document.text. 8362 TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` 8363 // TextDecoration: Text decoration 8364 // (https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS 8365 // standard. 8366 TextDecoration string `json:"textDecoration,omitempty"` 8367 // TextStyle: Text style 8368 // (https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values 8369 // are `normal`, `italic`, and `oblique`. 8370 TextStyle string `json:"textStyle,omitempty"` 8371 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to 8372 // unconditionally include in API requests. By default, fields with empty or 8373 // default values are omitted from API requests. See 8374 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8375 // details. 8376 ForceSendFields []string `json:"-"` 8377 // NullFields is a list of field names (e.g. "BackgroundColor") to include in 8378 // API requests with the JSON null value. By default, fields with empty values 8379 // are omitted from API requests. See 8380 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8381 NullFields []string `json:"-"` 8382 } 8383 8384 func (s *GoogleCloudDocumentaiV1beta2DocumentStyle) MarshalJSON() ([]byte, error) { 8385 type NoMethod GoogleCloudDocumentaiV1beta2DocumentStyle 8386 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8387 } 8388 8389 // GoogleCloudDocumentaiV1beta2DocumentStyleFontSize: Font size with unit. 8390 type GoogleCloudDocumentaiV1beta2DocumentStyleFontSize struct { 8391 // Size: Font size for the text. 8392 Size float64 `json:"size,omitempty"` 8393 // Unit: Unit for the font size. Follows CSS naming (such as `in`, `px`, and 8394 // `pt`). 8395 Unit string `json:"unit,omitempty"` 8396 // ForceSendFields is a list of field names (e.g. "Size") to unconditionally 8397 // include in API requests. By default, fields with empty or default values are 8398 // omitted from API requests. See 8399 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8400 // details. 8401 ForceSendFields []string `json:"-"` 8402 // NullFields is a list of field names (e.g. "Size") to include in API requests 8403 // with the JSON null value. By default, fields with empty values are omitted 8404 // from API requests. See 8405 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8406 NullFields []string `json:"-"` 8407 } 8408 8409 func (s *GoogleCloudDocumentaiV1beta2DocumentStyleFontSize) MarshalJSON() ([]byte, error) { 8410 type NoMethod GoogleCloudDocumentaiV1beta2DocumentStyleFontSize 8411 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8412 } 8413 8414 func (s *GoogleCloudDocumentaiV1beta2DocumentStyleFontSize) UnmarshalJSON(data []byte) error { 8415 type NoMethod GoogleCloudDocumentaiV1beta2DocumentStyleFontSize 8416 var s1 struct { 8417 Size gensupport.JSONFloat64 `json:"size"` 8418 *NoMethod 8419 } 8420 s1.NoMethod = (*NoMethod)(s) 8421 if err := json.Unmarshal(data, &s1); err != nil { 8422 return err 8423 } 8424 s.Size = float64(s1.Size) 8425 return nil 8426 } 8427 8428 // GoogleCloudDocumentaiV1beta2DocumentTextAnchor: Text reference indexing into 8429 // the Document.text. 8430 type GoogleCloudDocumentaiV1beta2DocumentTextAnchor struct { 8431 // Content: Contains the content of the text span so that users do not have to 8432 // look it up in the text_segments. It is always populated for formFields. 8433 Content string `json:"content,omitempty"` 8434 // TextSegments: The text segments from the Document.text. 8435 TextSegments []*GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment `json:"textSegments,omitempty"` 8436 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 8437 // include in API requests. By default, fields with empty or default values are 8438 // omitted from API requests. See 8439 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8440 // details. 8441 ForceSendFields []string `json:"-"` 8442 // NullFields is a list of field names (e.g. "Content") to include in API 8443 // requests with the JSON null value. By default, fields with empty values are 8444 // omitted from API requests. See 8445 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8446 NullFields []string `json:"-"` 8447 } 8448 8449 func (s *GoogleCloudDocumentaiV1beta2DocumentTextAnchor) MarshalJSON() ([]byte, error) { 8450 type NoMethod GoogleCloudDocumentaiV1beta2DocumentTextAnchor 8451 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8452 } 8453 8454 // GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment: A text segment in 8455 // the Document.text. The indices may be out of bounds which indicate that the 8456 // text extends into another document shard for large sharded documents. See 8457 // ShardInfo.text_offset 8458 type GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment struct { 8459 // EndIndex: TextSegment half open end UTF-8 char index in the Document.text. 8460 EndIndex int64 `json:"endIndex,omitempty,string"` 8461 // StartIndex: TextSegment start UTF-8 char index in the Document.text. 8462 StartIndex int64 `json:"startIndex,omitempty,string"` 8463 // ForceSendFields is a list of field names (e.g. "EndIndex") to 8464 // unconditionally include in API requests. By default, fields with empty or 8465 // default values are omitted from API requests. See 8466 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8467 // details. 8468 ForceSendFields []string `json:"-"` 8469 // NullFields is a list of field names (e.g. "EndIndex") to include in API 8470 // requests with the JSON null value. By default, fields with empty values are 8471 // omitted from API requests. See 8472 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8473 NullFields []string `json:"-"` 8474 } 8475 8476 func (s *GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment) MarshalJSON() ([]byte, error) { 8477 type NoMethod GoogleCloudDocumentaiV1beta2DocumentTextAnchorTextSegment 8478 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8479 } 8480 8481 // GoogleCloudDocumentaiV1beta2DocumentTextChange: This message is used for 8482 // text changes aka. OCR corrections. 8483 type GoogleCloudDocumentaiV1beta2DocumentTextChange struct { 8484 // ChangedText: The text that replaces the text identified in the 8485 // `text_anchor`. 8486 ChangedText string `json:"changedText,omitempty"` 8487 // Provenance: The history of this annotation. 8488 Provenance []*GoogleCloudDocumentaiV1beta2DocumentProvenance `json:"provenance,omitempty"` 8489 // TextAnchor: Provenance of the correction. Text anchor indexing into the 8490 // Document.text. There can only be a single `TextAnchor.text_segments` 8491 // element. If the start and end index of the text segment are the same, the 8492 // text change is inserted before that index. 8493 TextAnchor *GoogleCloudDocumentaiV1beta2DocumentTextAnchor `json:"textAnchor,omitempty"` 8494 // ForceSendFields is a list of field names (e.g. "ChangedText") to 8495 // unconditionally include in API requests. By default, fields with empty or 8496 // default values are omitted from API requests. See 8497 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8498 // details. 8499 ForceSendFields []string `json:"-"` 8500 // NullFields is a list of field names (e.g. "ChangedText") to include in API 8501 // requests with the JSON null value. By default, fields with empty values are 8502 // omitted from API requests. See 8503 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8504 NullFields []string `json:"-"` 8505 } 8506 8507 func (s *GoogleCloudDocumentaiV1beta2DocumentTextChange) MarshalJSON() ([]byte, error) { 8508 type NoMethod GoogleCloudDocumentaiV1beta2DocumentTextChange 8509 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8510 } 8511 8512 // GoogleCloudDocumentaiV1beta2GcsDestination: The Google Cloud Storage 8513 // location where the output file will be written to. 8514 type GoogleCloudDocumentaiV1beta2GcsDestination struct { 8515 Uri string `json:"uri,omitempty"` 8516 // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally 8517 // include in API requests. By default, fields with empty or default values are 8518 // omitted from API requests. See 8519 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8520 // details. 8521 ForceSendFields []string `json:"-"` 8522 // NullFields is a list of field names (e.g. "Uri") to include in API requests 8523 // with the JSON null value. By default, fields with empty values are omitted 8524 // from API requests. See 8525 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8526 NullFields []string `json:"-"` 8527 } 8528 8529 func (s *GoogleCloudDocumentaiV1beta2GcsDestination) MarshalJSON() ([]byte, error) { 8530 type NoMethod GoogleCloudDocumentaiV1beta2GcsDestination 8531 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8532 } 8533 8534 // GoogleCloudDocumentaiV1beta2GcsSource: The Google Cloud Storage location 8535 // where the input file will be read from. 8536 type GoogleCloudDocumentaiV1beta2GcsSource struct { 8537 Uri string `json:"uri,omitempty"` 8538 // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally 8539 // include in API requests. By default, fields with empty or default values are 8540 // omitted from API requests. See 8541 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8542 // details. 8543 ForceSendFields []string `json:"-"` 8544 // NullFields is a list of field names (e.g. "Uri") to include in API requests 8545 // with the JSON null value. By default, fields with empty values are omitted 8546 // from API requests. See 8547 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8548 NullFields []string `json:"-"` 8549 } 8550 8551 func (s *GoogleCloudDocumentaiV1beta2GcsSource) MarshalJSON() ([]byte, error) { 8552 type NoMethod GoogleCloudDocumentaiV1beta2GcsSource 8553 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8554 } 8555 8556 // GoogleCloudDocumentaiV1beta2InputConfig: The desired input location and 8557 // metadata. 8558 type GoogleCloudDocumentaiV1beta2InputConfig struct { 8559 // Contents: Content in bytes, represented as a stream of bytes. Note: As with 8560 // all `bytes` fields, proto buffer messages use a pure binary representation, 8561 // whereas JSON representations use base64. This field only works for 8562 // synchronous ProcessDocument method. 8563 Contents string `json:"contents,omitempty"` 8564 // GcsSource: The Google Cloud Storage location to read the input from. This 8565 // must be a single file. 8566 GcsSource *GoogleCloudDocumentaiV1beta2GcsSource `json:"gcsSource,omitempty"` 8567 // MimeType: Required. Mimetype of the input. Current supported mimetypes are 8568 // application/pdf, image/tiff, and image/gif. In addition, application/json 8569 // type is supported for requests with ProcessDocumentRequest.automl_params 8570 // field set. The JSON file needs to be in Document format. 8571 MimeType string `json:"mimeType,omitempty"` 8572 // ForceSendFields is a list of field names (e.g. "Contents") to 8573 // unconditionally include in API requests. By default, fields with empty or 8574 // default values are omitted from API requests. See 8575 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8576 // details. 8577 ForceSendFields []string `json:"-"` 8578 // NullFields is a list of field names (e.g. "Contents") to include in API 8579 // requests with the JSON null value. By default, fields with empty values are 8580 // omitted from API requests. See 8581 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8582 NullFields []string `json:"-"` 8583 } 8584 8585 func (s *GoogleCloudDocumentaiV1beta2InputConfig) MarshalJSON() ([]byte, error) { 8586 type NoMethod GoogleCloudDocumentaiV1beta2InputConfig 8587 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8588 } 8589 8590 // GoogleCloudDocumentaiV1beta2NormalizedVertex: A vertex represents a 2D point 8591 // in the image. NOTE: the normalized vertex coordinates are relative to the 8592 // original image and range from 0 to 1. 8593 type GoogleCloudDocumentaiV1beta2NormalizedVertex struct { 8594 // X: X coordinate. 8595 X float64 `json:"x,omitempty"` 8596 // Y: Y coordinate (starts from the top of the image). 8597 Y float64 `json:"y,omitempty"` 8598 // ForceSendFields is a list of field names (e.g. "X") to unconditionally 8599 // include in API requests. By default, fields with empty or default values are 8600 // omitted from API requests. See 8601 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8602 // details. 8603 ForceSendFields []string `json:"-"` 8604 // NullFields is a list of field names (e.g. "X") to include in API requests 8605 // with the JSON null value. By default, fields with empty values are omitted 8606 // from API requests. See 8607 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8608 NullFields []string `json:"-"` 8609 } 8610 8611 func (s *GoogleCloudDocumentaiV1beta2NormalizedVertex) MarshalJSON() ([]byte, error) { 8612 type NoMethod GoogleCloudDocumentaiV1beta2NormalizedVertex 8613 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8614 } 8615 8616 func (s *GoogleCloudDocumentaiV1beta2NormalizedVertex) UnmarshalJSON(data []byte) error { 8617 type NoMethod GoogleCloudDocumentaiV1beta2NormalizedVertex 8618 var s1 struct { 8619 X gensupport.JSONFloat64 `json:"x"` 8620 Y gensupport.JSONFloat64 `json:"y"` 8621 *NoMethod 8622 } 8623 s1.NoMethod = (*NoMethod)(s) 8624 if err := json.Unmarshal(data, &s1); err != nil { 8625 return err 8626 } 8627 s.X = float64(s1.X) 8628 s.Y = float64(s1.Y) 8629 return nil 8630 } 8631 8632 // GoogleCloudDocumentaiV1beta2OperationMetadata: Contains metadata for the 8633 // BatchProcessDocuments operation. 8634 type GoogleCloudDocumentaiV1beta2OperationMetadata struct { 8635 // CreateTime: The creation time of the operation. 8636 CreateTime string `json:"createTime,omitempty"` 8637 // State: The state of the current batch processing. 8638 // 8639 // Possible values: 8640 // "STATE_UNSPECIFIED" - The default value. This value is used if the state 8641 // is omitted. 8642 // "ACCEPTED" - Request is received. 8643 // "WAITING" - Request operation is waiting for scheduling. 8644 // "RUNNING" - Request is being processed. 8645 // "SUCCEEDED" - The batch processing completed successfully. 8646 // "CANCELLED" - The batch processing was cancelled. 8647 // "FAILED" - The batch processing has failed. 8648 State string `json:"state,omitempty"` 8649 // StateMessage: A message providing more details about the current state of 8650 // processing. 8651 StateMessage string `json:"stateMessage,omitempty"` 8652 // UpdateTime: The last update time of the operation. 8653 UpdateTime string `json:"updateTime,omitempty"` 8654 // ForceSendFields is a list of field names (e.g. "CreateTime") to 8655 // unconditionally include in API requests. By default, fields with empty or 8656 // default values are omitted from API requests. See 8657 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8658 // details. 8659 ForceSendFields []string `json:"-"` 8660 // NullFields is a list of field names (e.g. "CreateTime") to include in API 8661 // requests with the JSON null value. By default, fields with empty values are 8662 // omitted from API requests. See 8663 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8664 NullFields []string `json:"-"` 8665 } 8666 8667 func (s *GoogleCloudDocumentaiV1beta2OperationMetadata) MarshalJSON() ([]byte, error) { 8668 type NoMethod GoogleCloudDocumentaiV1beta2OperationMetadata 8669 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8670 } 8671 8672 // GoogleCloudDocumentaiV1beta2OutputConfig: The desired output location and 8673 // metadata. 8674 type GoogleCloudDocumentaiV1beta2OutputConfig struct { 8675 // GcsDestination: The Google Cloud Storage location to write the output to. 8676 GcsDestination *GoogleCloudDocumentaiV1beta2GcsDestination `json:"gcsDestination,omitempty"` 8677 // PagesPerShard: The max number of pages to include into each output Document 8678 // shard JSON on Google Cloud Storage. The valid range is [1, 100]. If not 8679 // specified, the default value is 20. For example, for one pdf file with 100 8680 // pages, 100 parsed pages will be produced. If `pages_per_shard` = 20, then 5 8681 // Document shard JSON files each containing 20 parsed pages will be written 8682 // under the prefix OutputConfig.gcs_destination.uri and suffix 8683 // pages-x-to-y.json where x and y are 1-indexed page numbers. Example GCS 8684 // outputs with 157 pages and pages_per_shard = 50: pages-001-to-050.json 8685 // pages-051-to-100.json pages-101-to-150.json pages-151-to-157.json 8686 PagesPerShard int64 `json:"pagesPerShard,omitempty"` 8687 // ForceSendFields is a list of field names (e.g. "GcsDestination") to 8688 // unconditionally include in API requests. By default, fields with empty or 8689 // default values are omitted from API requests. See 8690 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8691 // details. 8692 ForceSendFields []string `json:"-"` 8693 // NullFields is a list of field names (e.g. "GcsDestination") to include in 8694 // API requests with the JSON null value. By default, fields with empty values 8695 // are omitted from API requests. See 8696 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8697 NullFields []string `json:"-"` 8698 } 8699 8700 func (s *GoogleCloudDocumentaiV1beta2OutputConfig) MarshalJSON() ([]byte, error) { 8701 type NoMethod GoogleCloudDocumentaiV1beta2OutputConfig 8702 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8703 } 8704 8705 // GoogleCloudDocumentaiV1beta2ProcessDocumentResponse: Response to a single 8706 // document processing request. 8707 type GoogleCloudDocumentaiV1beta2ProcessDocumentResponse struct { 8708 // InputConfig: Information about the input file. This is the same as the 8709 // corresponding input config in the request. 8710 InputConfig *GoogleCloudDocumentaiV1beta2InputConfig `json:"inputConfig,omitempty"` 8711 // OutputConfig: The output location of the parsed responses. The responses are 8712 // written to this location as JSON-serialized `Document` objects. 8713 OutputConfig *GoogleCloudDocumentaiV1beta2OutputConfig `json:"outputConfig,omitempty"` 8714 // ForceSendFields is a list of field names (e.g. "InputConfig") to 8715 // unconditionally include in API requests. By default, fields with empty or 8716 // default values are omitted from API requests. See 8717 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8718 // details. 8719 ForceSendFields []string `json:"-"` 8720 // NullFields is a list of field names (e.g. "InputConfig") to include in API 8721 // requests with the JSON null value. By default, fields with empty values are 8722 // omitted from API requests. See 8723 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8724 NullFields []string `json:"-"` 8725 } 8726 8727 func (s *GoogleCloudDocumentaiV1beta2ProcessDocumentResponse) MarshalJSON() ([]byte, error) { 8728 type NoMethod GoogleCloudDocumentaiV1beta2ProcessDocumentResponse 8729 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8730 } 8731 8732 // GoogleCloudDocumentaiV1beta2Vertex: A vertex represents a 2D point in the 8733 // image. NOTE: the vertex coordinates are in the same scale as the original 8734 // image. 8735 type GoogleCloudDocumentaiV1beta2Vertex struct { 8736 // X: X coordinate. 8737 X int64 `json:"x,omitempty"` 8738 // Y: Y coordinate (starts from the top of the image). 8739 Y int64 `json:"y,omitempty"` 8740 // ForceSendFields is a list of field names (e.g. "X") to unconditionally 8741 // include in API requests. By default, fields with empty or default values are 8742 // omitted from API requests. See 8743 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8744 // details. 8745 ForceSendFields []string `json:"-"` 8746 // NullFields is a list of field names (e.g. "X") to include in API requests 8747 // with the JSON null value. By default, fields with empty values are omitted 8748 // from API requests. See 8749 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8750 NullFields []string `json:"-"` 8751 } 8752 8753 func (s *GoogleCloudDocumentaiV1beta2Vertex) MarshalJSON() ([]byte, error) { 8754 type NoMethod GoogleCloudDocumentaiV1beta2Vertex 8755 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8756 } 8757 8758 type GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsMetadata struct { 8759 // CommonMetadata: The basic metadata of the long-running operation. 8760 CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 8761 // ErrorDocumentCount: Total number of documents that failed to be deleted in 8762 // storage. 8763 ErrorDocumentCount int64 `json:"errorDocumentCount,omitempty"` 8764 // IndividualBatchDeleteStatuses: The list of response details of each 8765 // document. 8766 IndividualBatchDeleteStatuses []*GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus `json:"individualBatchDeleteStatuses,omitempty"` 8767 // TotalDocumentCount: Total number of documents deleting from dataset. 8768 TotalDocumentCount int64 `json:"totalDocumentCount,omitempty"` 8769 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 8770 // unconditionally include in API requests. By default, fields with empty or 8771 // default values are omitted from API requests. See 8772 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8773 // details. 8774 ForceSendFields []string `json:"-"` 8775 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 8776 // API requests with the JSON null value. By default, fields with empty values 8777 // are omitted from API requests. See 8778 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8779 NullFields []string `json:"-"` 8780 } 8781 8782 func (s *GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsMetadata) MarshalJSON() ([]byte, error) { 8783 type NoMethod GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsMetadata 8784 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8785 } 8786 8787 // GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsMetadataIndividualBatchDelete 8788 // Status: The status of each individual document in the batch delete process. 8789 type GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus struct { 8790 // DocumentId: The document id of the document. 8791 DocumentId *GoogleCloudDocumentaiV1beta3DocumentId `json:"documentId,omitempty"` 8792 // Status: The status of deleting the document in storage. 8793 Status *GoogleRpcStatus `json:"status,omitempty"` 8794 // ForceSendFields is a list of field names (e.g. "DocumentId") to 8795 // unconditionally include in API requests. By default, fields with empty or 8796 // default values are omitted from API requests. See 8797 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8798 // details. 8799 ForceSendFields []string `json:"-"` 8800 // NullFields is a list of field names (e.g. "DocumentId") to include in API 8801 // requests with the JSON null value. By default, fields with empty values are 8802 // omitted from API requests. See 8803 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8804 NullFields []string `json:"-"` 8805 } 8806 8807 func (s *GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus) MarshalJSON() ([]byte, error) { 8808 type NoMethod GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus 8809 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8810 } 8811 8812 // GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsResponse: Response of the 8813 // delete documents operation. 8814 type GoogleCloudDocumentaiV1beta3BatchDeleteDocumentsResponse struct { 8815 } 8816 8817 // GoogleCloudDocumentaiV1beta3BatchProcessMetadata: The long-running operation 8818 // metadata for BatchProcessDocuments. 8819 type GoogleCloudDocumentaiV1beta3BatchProcessMetadata struct { 8820 // CreateTime: The creation time of the operation. 8821 CreateTime string `json:"createTime,omitempty"` 8822 // IndividualProcessStatuses: The list of response details of each document. 8823 IndividualProcessStatuses []*GoogleCloudDocumentaiV1beta3BatchProcessMetadataIndividualProcessStatus `json:"individualProcessStatuses,omitempty"` 8824 // State: The state of the current batch processing. 8825 // 8826 // Possible values: 8827 // "STATE_UNSPECIFIED" - The default value. This value is used if the state 8828 // is omitted. 8829 // "WAITING" - Request operation is waiting for scheduling. 8830 // "RUNNING" - Request is being processed. 8831 // "SUCCEEDED" - The batch processing completed successfully. 8832 // "CANCELLING" - The batch processing was being cancelled. 8833 // "CANCELLED" - The batch processing was cancelled. 8834 // "FAILED" - The batch processing has failed. 8835 State string `json:"state,omitempty"` 8836 // StateMessage: A message providing more details about the current state of 8837 // processing. For example, the error message if the operation is failed. 8838 StateMessage string `json:"stateMessage,omitempty"` 8839 // UpdateTime: The last update time of the operation. 8840 UpdateTime string `json:"updateTime,omitempty"` 8841 // ForceSendFields is a list of field names (e.g. "CreateTime") to 8842 // unconditionally include in API requests. By default, fields with empty or 8843 // default values are omitted from API requests. See 8844 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8845 // details. 8846 ForceSendFields []string `json:"-"` 8847 // NullFields is a list of field names (e.g. "CreateTime") to include in API 8848 // requests with the JSON null value. By default, fields with empty values are 8849 // omitted from API requests. See 8850 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8851 NullFields []string `json:"-"` 8852 } 8853 8854 func (s *GoogleCloudDocumentaiV1beta3BatchProcessMetadata) MarshalJSON() ([]byte, error) { 8855 type NoMethod GoogleCloudDocumentaiV1beta3BatchProcessMetadata 8856 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8857 } 8858 8859 // GoogleCloudDocumentaiV1beta3BatchProcessMetadataIndividualProcessStatus: The 8860 // status of a each individual document in the batch process. 8861 type GoogleCloudDocumentaiV1beta3BatchProcessMetadataIndividualProcessStatus struct { 8862 // HumanReviewOperation: The name of the operation triggered by the processed 8863 // document. If the human review process isn't triggered, this field will be 8864 // empty. It has the same response type and metadata as the long-running 8865 // operation returned by the ReviewDocument method. 8866 HumanReviewOperation string `json:"humanReviewOperation,omitempty"` 8867 // HumanReviewStatus: The status of human review on the processed document. 8868 HumanReviewStatus *GoogleCloudDocumentaiV1beta3HumanReviewStatus `json:"humanReviewStatus,omitempty"` 8869 // InputGcsSource: The source of the document, same as the input_gcs_source 8870 // field in the request when the batch process started. 8871 InputGcsSource string `json:"inputGcsSource,omitempty"` 8872 // OutputGcsDestination: The Cloud Storage output destination (in the request 8873 // as DocumentOutputConfig.GcsOutputConfig.gcs_uri) of the processed document 8874 // if it was successful, otherwise empty. 8875 OutputGcsDestination string `json:"outputGcsDestination,omitempty"` 8876 // Status: The status processing the document. 8877 Status *GoogleRpcStatus `json:"status,omitempty"` 8878 // ForceSendFields is a list of field names (e.g. "HumanReviewOperation") to 8879 // unconditionally include in API requests. By default, fields with empty or 8880 // default values are omitted from API requests. See 8881 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8882 // details. 8883 ForceSendFields []string `json:"-"` 8884 // NullFields is a list of field names (e.g. "HumanReviewOperation") to include 8885 // in API requests with the JSON null value. By default, fields with empty 8886 // values are omitted from API requests. See 8887 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8888 NullFields []string `json:"-"` 8889 } 8890 8891 func (s *GoogleCloudDocumentaiV1beta3BatchProcessMetadataIndividualProcessStatus) MarshalJSON() ([]byte, error) { 8892 type NoMethod GoogleCloudDocumentaiV1beta3BatchProcessMetadataIndividualProcessStatus 8893 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8894 } 8895 8896 // GoogleCloudDocumentaiV1beta3BatchProcessResponse: Response message for 8897 // BatchProcessDocuments. 8898 type GoogleCloudDocumentaiV1beta3BatchProcessResponse struct { 8899 } 8900 8901 // GoogleCloudDocumentaiV1beta3CommonOperationMetadata: The common metadata for 8902 // long running operations. 8903 type GoogleCloudDocumentaiV1beta3CommonOperationMetadata struct { 8904 // CreateTime: The creation time of the operation. 8905 CreateTime string `json:"createTime,omitempty"` 8906 // Resource: A related resource to this operation. 8907 Resource string `json:"resource,omitempty"` 8908 // State: The state of the operation. 8909 // 8910 // Possible values: 8911 // "STATE_UNSPECIFIED" - Unspecified state. 8912 // "RUNNING" - Operation is still running. 8913 // "CANCELLING" - Operation is being cancelled. 8914 // "SUCCEEDED" - Operation succeeded. 8915 // "FAILED" - Operation failed. 8916 // "CANCELLED" - Operation is cancelled. 8917 State string `json:"state,omitempty"` 8918 // StateMessage: A message providing more details about the current state of 8919 // processing. 8920 StateMessage string `json:"stateMessage,omitempty"` 8921 // UpdateTime: The last update time of the operation. 8922 UpdateTime string `json:"updateTime,omitempty"` 8923 // ForceSendFields is a list of field names (e.g. "CreateTime") to 8924 // unconditionally include in API requests. By default, fields with empty or 8925 // default values are omitted from API requests. See 8926 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8927 // details. 8928 ForceSendFields []string `json:"-"` 8929 // NullFields is a list of field names (e.g. "CreateTime") to include in API 8930 // requests with the JSON null value. By default, fields with empty values are 8931 // omitted from API requests. See 8932 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8933 NullFields []string `json:"-"` 8934 } 8935 8936 func (s *GoogleCloudDocumentaiV1beta3CommonOperationMetadata) MarshalJSON() ([]byte, error) { 8937 type NoMethod GoogleCloudDocumentaiV1beta3CommonOperationMetadata 8938 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8939 } 8940 8941 // GoogleCloudDocumentaiV1beta3Dataset: A singleton resource under a Processor 8942 // which configures a collection of documents. 8943 type GoogleCloudDocumentaiV1beta3Dataset struct { 8944 // DocumentWarehouseConfig: Optional. Deprecated. Warehouse-based dataset 8945 // configuration is not supported. 8946 DocumentWarehouseConfig *GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig `json:"documentWarehouseConfig,omitempty"` 8947 // GcsManagedConfig: Optional. User-managed Cloud Storage dataset 8948 // configuration. Use this configuration if the dataset documents are stored 8949 // under a user-managed Cloud Storage location. 8950 GcsManagedConfig *GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig `json:"gcsManagedConfig,omitempty"` 8951 // Name: Dataset resource name. Format: 8952 // `projects/{project}/locations/{location}/processors/{processor}/dataset` 8953 Name string `json:"name,omitempty"` 8954 // SpannerIndexingConfig: Optional. A lightweight indexing source with low 8955 // latency and high reliability, but lacking advanced features like CMEK and 8956 // content-based search. 8957 SpannerIndexingConfig *GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig `json:"spannerIndexingConfig,omitempty"` 8958 // State: Required. State of the dataset. Ignored when updating dataset. 8959 // 8960 // Possible values: 8961 // "STATE_UNSPECIFIED" - Default unspecified enum, should not be used. 8962 // "UNINITIALIZED" - Dataset has not been initialized. 8963 // "INITIALIZING" - Dataset is being initialized. 8964 // "INITIALIZED" - Dataset has been initialized. 8965 State string `json:"state,omitempty"` 8966 // UnmanagedDatasetConfig: Optional. Unmanaged dataset configuration. Use this 8967 // configuration if the dataset documents are managed by the document service 8968 // internally (not user-managed). 8969 UnmanagedDatasetConfig *GoogleCloudDocumentaiV1beta3DatasetUnmanagedDatasetConfig `json:"unmanagedDatasetConfig,omitempty"` 8970 // ForceSendFields is a list of field names (e.g. "DocumentWarehouseConfig") to 8971 // unconditionally include in API requests. By default, fields with empty or 8972 // default values are omitted from API requests. See 8973 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 8974 // details. 8975 ForceSendFields []string `json:"-"` 8976 // NullFields is a list of field names (e.g. "DocumentWarehouseConfig") to 8977 // include in API requests with the JSON null value. By default, fields with 8978 // empty values are omitted from API requests. See 8979 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 8980 NullFields []string `json:"-"` 8981 } 8982 8983 func (s *GoogleCloudDocumentaiV1beta3Dataset) MarshalJSON() ([]byte, error) { 8984 type NoMethod GoogleCloudDocumentaiV1beta3Dataset 8985 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 8986 } 8987 8988 // GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig: Configuration 8989 // specific to the Document AI Warehouse-based implementation. 8990 type GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig struct { 8991 // Collection: Output only. The collection in Document AI Warehouse associated 8992 // with the dataset. 8993 Collection string `json:"collection,omitempty"` 8994 // Schema: Output only. The schema in Document AI Warehouse associated with the 8995 // dataset. 8996 Schema string `json:"schema,omitempty"` 8997 // ForceSendFields is a list of field names (e.g. "Collection") to 8998 // unconditionally include in API requests. By default, fields with empty or 8999 // default values are omitted from API requests. See 9000 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9001 // details. 9002 ForceSendFields []string `json:"-"` 9003 // NullFields is a list of field names (e.g. "Collection") to include in API 9004 // requests with the JSON null value. By default, fields with empty values are 9005 // omitted from API requests. See 9006 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9007 NullFields []string `json:"-"` 9008 } 9009 9010 func (s *GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig) MarshalJSON() ([]byte, error) { 9011 type NoMethod GoogleCloudDocumentaiV1beta3DatasetDocumentWarehouseConfig 9012 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9013 } 9014 9015 // GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig: Configuration specific 9016 // to the Cloud Storage-based implementation. 9017 type GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig struct { 9018 // GcsPrefix: Required. The Cloud Storage URI (a directory) where the documents 9019 // belonging to the dataset must be stored. 9020 GcsPrefix *GoogleCloudDocumentaiV1beta3GcsPrefix `json:"gcsPrefix,omitempty"` 9021 // ForceSendFields is a list of field names (e.g. "GcsPrefix") to 9022 // unconditionally include in API requests. By default, fields with empty or 9023 // default values are omitted from API requests. See 9024 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9025 // details. 9026 ForceSendFields []string `json:"-"` 9027 // NullFields is a list of field names (e.g. "GcsPrefix") to include in API 9028 // requests with the JSON null value. By default, fields with empty values are 9029 // omitted from API requests. See 9030 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9031 NullFields []string `json:"-"` 9032 } 9033 9034 func (s *GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig) MarshalJSON() ([]byte, error) { 9035 type NoMethod GoogleCloudDocumentaiV1beta3DatasetGCSManagedConfig 9036 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9037 } 9038 9039 // GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig: Configuration 9040 // specific to spanner-based indexing. 9041 type GoogleCloudDocumentaiV1beta3DatasetSpannerIndexingConfig struct { 9042 } 9043 9044 // GoogleCloudDocumentaiV1beta3DatasetUnmanagedDatasetConfig: Configuration 9045 // specific to an unmanaged dataset. 9046 type GoogleCloudDocumentaiV1beta3DatasetUnmanagedDatasetConfig struct { 9047 } 9048 9049 // GoogleCloudDocumentaiV1beta3DeleteProcessorMetadata: The long-running 9050 // operation metadata for the DeleteProcessor method. 9051 type GoogleCloudDocumentaiV1beta3DeleteProcessorMetadata struct { 9052 // CommonMetadata: The basic metadata of the long-running operation. 9053 CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 9054 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 9055 // unconditionally include in API requests. By default, fields with empty or 9056 // default values are omitted from API requests. See 9057 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9058 // details. 9059 ForceSendFields []string `json:"-"` 9060 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 9061 // API requests with the JSON null value. By default, fields with empty values 9062 // are omitted from API requests. See 9063 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9064 NullFields []string `json:"-"` 9065 } 9066 9067 func (s *GoogleCloudDocumentaiV1beta3DeleteProcessorMetadata) MarshalJSON() ([]byte, error) { 9068 type NoMethod GoogleCloudDocumentaiV1beta3DeleteProcessorMetadata 9069 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9070 } 9071 9072 // GoogleCloudDocumentaiV1beta3DeleteProcessorVersionMetadata: The long-running 9073 // operation metadata for the DeleteProcessorVersion method. 9074 type GoogleCloudDocumentaiV1beta3DeleteProcessorVersionMetadata struct { 9075 // CommonMetadata: The basic metadata of the long-running operation. 9076 CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 9077 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 9078 // unconditionally include in API requests. By default, fields with empty or 9079 // default values are omitted from API requests. See 9080 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9081 // details. 9082 ForceSendFields []string `json:"-"` 9083 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 9084 // API requests with the JSON null value. By default, fields with empty values 9085 // are omitted from API requests. See 9086 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9087 NullFields []string `json:"-"` 9088 } 9089 9090 func (s *GoogleCloudDocumentaiV1beta3DeleteProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 9091 type NoMethod GoogleCloudDocumentaiV1beta3DeleteProcessorVersionMetadata 9092 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9093 } 9094 9095 // GoogleCloudDocumentaiV1beta3DeployProcessorVersionMetadata: The long-running 9096 // operation metadata for the DeployProcessorVersion method. 9097 type GoogleCloudDocumentaiV1beta3DeployProcessorVersionMetadata struct { 9098 // CommonMetadata: The basic metadata of the long-running operation. 9099 CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 9100 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 9101 // unconditionally include in API requests. By default, fields with empty or 9102 // default values are omitted from API requests. See 9103 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9104 // details. 9105 ForceSendFields []string `json:"-"` 9106 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 9107 // API requests with the JSON null value. By default, fields with empty values 9108 // are omitted from API requests. See 9109 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9110 NullFields []string `json:"-"` 9111 } 9112 9113 func (s *GoogleCloudDocumentaiV1beta3DeployProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 9114 type NoMethod GoogleCloudDocumentaiV1beta3DeployProcessorVersionMetadata 9115 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9116 } 9117 9118 // GoogleCloudDocumentaiV1beta3DeployProcessorVersionResponse: Response message 9119 // for the DeployProcessorVersion method. 9120 type GoogleCloudDocumentaiV1beta3DeployProcessorVersionResponse struct { 9121 } 9122 9123 // GoogleCloudDocumentaiV1beta3DisableProcessorMetadata: The long-running 9124 // operation metadata for the DisableProcessor method. 9125 type GoogleCloudDocumentaiV1beta3DisableProcessorMetadata struct { 9126 // CommonMetadata: The basic metadata of the long-running operation. 9127 CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 9128 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 9129 // unconditionally include in API requests. By default, fields with empty or 9130 // default values are omitted from API requests. See 9131 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9132 // details. 9133 ForceSendFields []string `json:"-"` 9134 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 9135 // API requests with the JSON null value. By default, fields with empty values 9136 // are omitted from API requests. See 9137 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9138 NullFields []string `json:"-"` 9139 } 9140 9141 func (s *GoogleCloudDocumentaiV1beta3DisableProcessorMetadata) MarshalJSON() ([]byte, error) { 9142 type NoMethod GoogleCloudDocumentaiV1beta3DisableProcessorMetadata 9143 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9144 } 9145 9146 // GoogleCloudDocumentaiV1beta3DisableProcessorResponse: Response message for 9147 // the DisableProcessor method. Intentionally empty proto for adding fields in 9148 // future. 9149 type GoogleCloudDocumentaiV1beta3DisableProcessorResponse struct { 9150 } 9151 9152 // GoogleCloudDocumentaiV1beta3DocumentId: Document Identifier. 9153 type GoogleCloudDocumentaiV1beta3DocumentId struct { 9154 // GcsManagedDocId: A document id within user-managed Cloud Storage. 9155 GcsManagedDocId *GoogleCloudDocumentaiV1beta3DocumentIdGCSManagedDocumentId `json:"gcsManagedDocId,omitempty"` 9156 // RevisionRef: Points to a specific revision of the document if set. 9157 RevisionRef *GoogleCloudDocumentaiV1beta3RevisionRef `json:"revisionRef,omitempty"` 9158 // UnmanagedDocId: A document id within unmanaged dataset. 9159 UnmanagedDocId *GoogleCloudDocumentaiV1beta3DocumentIdUnmanagedDocumentId `json:"unmanagedDocId,omitempty"` 9160 // ForceSendFields is a list of field names (e.g. "GcsManagedDocId") to 9161 // unconditionally include in API requests. By default, fields with empty or 9162 // default values are omitted from API requests. See 9163 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9164 // details. 9165 ForceSendFields []string `json:"-"` 9166 // NullFields is a list of field names (e.g. "GcsManagedDocId") to include in 9167 // API requests with the JSON null value. By default, fields with empty values 9168 // are omitted from API requests. See 9169 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9170 NullFields []string `json:"-"` 9171 } 9172 9173 func (s *GoogleCloudDocumentaiV1beta3DocumentId) MarshalJSON() ([]byte, error) { 9174 type NoMethod GoogleCloudDocumentaiV1beta3DocumentId 9175 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9176 } 9177 9178 // GoogleCloudDocumentaiV1beta3DocumentIdGCSManagedDocumentId: Identifies a 9179 // document uniquely within the scope of a dataset in the user-managed Cloud 9180 // Storage option. 9181 type GoogleCloudDocumentaiV1beta3DocumentIdGCSManagedDocumentId struct { 9182 // CwDocId: Id of the document (indexed) managed by Content Warehouse. 9183 CwDocId string `json:"cwDocId,omitempty"` 9184 // GcsUri: Required. The Cloud Storage URI where the actual document is stored. 9185 GcsUri string `json:"gcsUri,omitempty"` 9186 // ForceSendFields is a list of field names (e.g. "CwDocId") to unconditionally 9187 // include in API requests. By default, fields with empty or default values are 9188 // omitted from API requests. See 9189 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9190 // details. 9191 ForceSendFields []string `json:"-"` 9192 // NullFields is a list of field names (e.g. "CwDocId") to include in API 9193 // requests with the JSON null value. By default, fields with empty values are 9194 // omitted from API requests. See 9195 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9196 NullFields []string `json:"-"` 9197 } 9198 9199 func (s *GoogleCloudDocumentaiV1beta3DocumentIdGCSManagedDocumentId) MarshalJSON() ([]byte, error) { 9200 type NoMethod GoogleCloudDocumentaiV1beta3DocumentIdGCSManagedDocumentId 9201 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9202 } 9203 9204 // GoogleCloudDocumentaiV1beta3DocumentIdUnmanagedDocumentId: Identifies a 9205 // document uniquely within the scope of a dataset in unmanaged option. 9206 type GoogleCloudDocumentaiV1beta3DocumentIdUnmanagedDocumentId struct { 9207 // DocId: Required. The id of the document. 9208 DocId string `json:"docId,omitempty"` 9209 // ForceSendFields is a list of field names (e.g. "DocId") to unconditionally 9210 // include in API requests. By default, fields with empty or default values are 9211 // omitted from API requests. See 9212 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9213 // details. 9214 ForceSendFields []string `json:"-"` 9215 // NullFields is a list of field names (e.g. "DocId") to include in API 9216 // requests with the JSON null value. By default, fields with empty values are 9217 // omitted from API requests. See 9218 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9219 NullFields []string `json:"-"` 9220 } 9221 9222 func (s *GoogleCloudDocumentaiV1beta3DocumentIdUnmanagedDocumentId) MarshalJSON() ([]byte, error) { 9223 type NoMethod GoogleCloudDocumentaiV1beta3DocumentIdUnmanagedDocumentId 9224 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9225 } 9226 9227 // GoogleCloudDocumentaiV1beta3EnableProcessorMetadata: The long-running 9228 // operation metadata for the EnableProcessor method. 9229 type GoogleCloudDocumentaiV1beta3EnableProcessorMetadata struct { 9230 // CommonMetadata: The basic metadata of the long-running operation. 9231 CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 9232 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 9233 // unconditionally include in API requests. By default, fields with empty or 9234 // default values are omitted from API requests. See 9235 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9236 // details. 9237 ForceSendFields []string `json:"-"` 9238 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 9239 // API requests with the JSON null value. By default, fields with empty values 9240 // are omitted from API requests. See 9241 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9242 NullFields []string `json:"-"` 9243 } 9244 9245 func (s *GoogleCloudDocumentaiV1beta3EnableProcessorMetadata) MarshalJSON() ([]byte, error) { 9246 type NoMethod GoogleCloudDocumentaiV1beta3EnableProcessorMetadata 9247 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9248 } 9249 9250 // GoogleCloudDocumentaiV1beta3EnableProcessorResponse: Response message for 9251 // the EnableProcessor method. Intentionally empty proto for adding fields in 9252 // future. 9253 type GoogleCloudDocumentaiV1beta3EnableProcessorResponse struct { 9254 } 9255 9256 // GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata: Metadata of 9257 // the EvaluateProcessorVersion method. 9258 type GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata struct { 9259 // CommonMetadata: The basic metadata of the long-running operation. 9260 CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 9261 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 9262 // unconditionally include in API requests. By default, fields with empty or 9263 // default values are omitted from API requests. See 9264 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9265 // details. 9266 ForceSendFields []string `json:"-"` 9267 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 9268 // API requests with the JSON null value. By default, fields with empty values 9269 // are omitted from API requests. See 9270 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9271 NullFields []string `json:"-"` 9272 } 9273 9274 func (s *GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 9275 type NoMethod GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata 9276 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9277 } 9278 9279 // GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse: Response of 9280 // the EvaluateProcessorVersion method. 9281 type GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse struct { 9282 // Evaluation: The resource name of the created evaluation. 9283 Evaluation string `json:"evaluation,omitempty"` 9284 // ForceSendFields is a list of field names (e.g. "Evaluation") to 9285 // unconditionally include in API requests. By default, fields with empty or 9286 // default values are omitted from API requests. See 9287 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9288 // details. 9289 ForceSendFields []string `json:"-"` 9290 // NullFields is a list of field names (e.g. "Evaluation") to include in API 9291 // requests with the JSON null value. By default, fields with empty values are 9292 // omitted from API requests. See 9293 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9294 NullFields []string `json:"-"` 9295 } 9296 9297 func (s *GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse) MarshalJSON() ([]byte, error) { 9298 type NoMethod GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse 9299 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9300 } 9301 9302 // GoogleCloudDocumentaiV1beta3GcsPrefix: Specifies all documents on Cloud 9303 // Storage with a common prefix. 9304 type GoogleCloudDocumentaiV1beta3GcsPrefix struct { 9305 // GcsUriPrefix: The URI prefix. 9306 GcsUriPrefix string `json:"gcsUriPrefix,omitempty"` 9307 // ForceSendFields is a list of field names (e.g. "GcsUriPrefix") to 9308 // unconditionally include in API requests. By default, fields with empty or 9309 // default values are omitted from API requests. See 9310 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9311 // details. 9312 ForceSendFields []string `json:"-"` 9313 // NullFields is a list of field names (e.g. "GcsUriPrefix") to include in API 9314 // requests with the JSON null value. By default, fields with empty values are 9315 // omitted from API requests. See 9316 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9317 NullFields []string `json:"-"` 9318 } 9319 9320 func (s *GoogleCloudDocumentaiV1beta3GcsPrefix) MarshalJSON() ([]byte, error) { 9321 type NoMethod GoogleCloudDocumentaiV1beta3GcsPrefix 9322 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9323 } 9324 9325 // GoogleCloudDocumentaiV1beta3HumanReviewStatus: The status of human review on 9326 // a processed document. 9327 type GoogleCloudDocumentaiV1beta3HumanReviewStatus struct { 9328 // HumanReviewOperation: The name of the operation triggered by the processed 9329 // document. This field is populated only when the state is 9330 // `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as 9331 // the long-running operation returned by ReviewDocument. 9332 HumanReviewOperation string `json:"humanReviewOperation,omitempty"` 9333 // State: The state of human review on the processing request. 9334 // 9335 // Possible values: 9336 // "STATE_UNSPECIFIED" - Human review state is unspecified. Most likely due 9337 // to an internal error. 9338 // "SKIPPED" - Human review is skipped for the document. This can happen 9339 // because human review isn't enabled on the processor or the processing 9340 // request has been set to skip this document. 9341 // "VALIDATION_PASSED" - Human review validation is triggered and passed, so 9342 // no review is needed. 9343 // "IN_PROGRESS" - Human review validation is triggered and the document is 9344 // under review. 9345 // "ERROR" - Some error happened during triggering human review, see the 9346 // state_message for details. 9347 State string `json:"state,omitempty"` 9348 // StateMessage: A message providing more details about the human review state. 9349 StateMessage string `json:"stateMessage,omitempty"` 9350 // ForceSendFields is a list of field names (e.g. "HumanReviewOperation") to 9351 // unconditionally include in API requests. By default, fields with empty or 9352 // default values are omitted from API requests. See 9353 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9354 // details. 9355 ForceSendFields []string `json:"-"` 9356 // NullFields is a list of field names (e.g. "HumanReviewOperation") to include 9357 // in API requests with the JSON null value. By default, fields with empty 9358 // values are omitted from API requests. See 9359 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9360 NullFields []string `json:"-"` 9361 } 9362 9363 func (s *GoogleCloudDocumentaiV1beta3HumanReviewStatus) MarshalJSON() ([]byte, error) { 9364 type NoMethod GoogleCloudDocumentaiV1beta3HumanReviewStatus 9365 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9366 } 9367 9368 // GoogleCloudDocumentaiV1beta3ImportDocumentsMetadata: Metadata of the import 9369 // document operation. 9370 type GoogleCloudDocumentaiV1beta3ImportDocumentsMetadata struct { 9371 // CommonMetadata: The basic metadata of the long-running operation. 9372 CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 9373 // ImportConfigValidationResults: Validation statuses of the batch documents 9374 // import config. 9375 ImportConfigValidationResults []*GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidationResult `json:"importConfigValidationResults,omitempty"` 9376 // IndividualImportStatuses: The list of response details of each document. 9377 IndividualImportStatuses []*GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataIndividualImportStatus `json:"individualImportStatuses,omitempty"` 9378 // TotalDocumentCount: Total number of the documents that are qualified for 9379 // importing. 9380 TotalDocumentCount int64 `json:"totalDocumentCount,omitempty"` 9381 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 9382 // unconditionally include in API requests. By default, fields with empty or 9383 // default values are omitted from API requests. See 9384 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9385 // details. 9386 ForceSendFields []string `json:"-"` 9387 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 9388 // API requests with the JSON null value. By default, fields with empty values 9389 // are omitted from API requests. See 9390 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9391 NullFields []string `json:"-"` 9392 } 9393 9394 func (s *GoogleCloudDocumentaiV1beta3ImportDocumentsMetadata) MarshalJSON() ([]byte, error) { 9395 type NoMethod GoogleCloudDocumentaiV1beta3ImportDocumentsMetadata 9396 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9397 } 9398 9399 // GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidationResu 9400 // lt: The validation status of each import config. Status is set to an error 9401 // if there are no documents to import in the `import_config`, or `OK` if the 9402 // operation will try to proceed with at least one document. 9403 type GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidationResult struct { 9404 // InputGcsSource: The source Cloud Storage URI specified in the import config. 9405 InputGcsSource string `json:"inputGcsSource,omitempty"` 9406 // Status: The validation status of import config. 9407 Status *GoogleRpcStatus `json:"status,omitempty"` 9408 // ForceSendFields is a list of field names (e.g. "InputGcsSource") to 9409 // unconditionally include in API requests. By default, fields with empty or 9410 // default values are omitted from API requests. See 9411 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9412 // details. 9413 ForceSendFields []string `json:"-"` 9414 // NullFields is a list of field names (e.g. "InputGcsSource") to include in 9415 // API requests with the JSON null value. By default, fields with empty values 9416 // are omitted from API requests. See 9417 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9418 NullFields []string `json:"-"` 9419 } 9420 9421 func (s *GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidationResult) MarshalJSON() ([]byte, error) { 9422 type NoMethod GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataImportConfigValidationResult 9423 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9424 } 9425 9426 // GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataIndividualImportStatus: 9427 // The status of each individual document in the import process. 9428 type GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataIndividualImportStatus struct { 9429 // InputGcsSource: The source Cloud Storage URI of the document. 9430 InputGcsSource string `json:"inputGcsSource,omitempty"` 9431 // OutputDocumentId: The document id of imported document if it was successful, 9432 // otherwise empty. 9433 OutputDocumentId *GoogleCloudDocumentaiV1beta3DocumentId `json:"outputDocumentId,omitempty"` 9434 // Status: The status of the importing of the document. 9435 Status *GoogleRpcStatus `json:"status,omitempty"` 9436 // ForceSendFields is a list of field names (e.g. "InputGcsSource") to 9437 // unconditionally include in API requests. By default, fields with empty or 9438 // default values are omitted from API requests. See 9439 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9440 // details. 9441 ForceSendFields []string `json:"-"` 9442 // NullFields is a list of field names (e.g. "InputGcsSource") to include in 9443 // API requests with the JSON null value. By default, fields with empty values 9444 // are omitted from API requests. See 9445 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9446 NullFields []string `json:"-"` 9447 } 9448 9449 func (s *GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataIndividualImportStatus) MarshalJSON() ([]byte, error) { 9450 type NoMethod GoogleCloudDocumentaiV1beta3ImportDocumentsMetadataIndividualImportStatus 9451 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9452 } 9453 9454 // GoogleCloudDocumentaiV1beta3ImportDocumentsResponse: Response of the import 9455 // document operation. 9456 type GoogleCloudDocumentaiV1beta3ImportDocumentsResponse struct { 9457 } 9458 9459 // GoogleCloudDocumentaiV1beta3ImportProcessorVersionMetadata: The long-running 9460 // operation metadata for the ImportProcessorVersion method. 9461 type GoogleCloudDocumentaiV1beta3ImportProcessorVersionMetadata struct { 9462 // CommonMetadata: The basic metadata for the long-running operation. 9463 CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 9464 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 9465 // unconditionally include in API requests. By default, fields with empty or 9466 // default values are omitted from API requests. See 9467 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9468 // details. 9469 ForceSendFields []string `json:"-"` 9470 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 9471 // API requests with the JSON null value. By default, fields with empty values 9472 // are omitted from API requests. See 9473 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9474 NullFields []string `json:"-"` 9475 } 9476 9477 func (s *GoogleCloudDocumentaiV1beta3ImportProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 9478 type NoMethod GoogleCloudDocumentaiV1beta3ImportProcessorVersionMetadata 9479 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9480 } 9481 9482 // GoogleCloudDocumentaiV1beta3ImportProcessorVersionResponse: The response 9483 // message for the ImportProcessorVersion method. 9484 type GoogleCloudDocumentaiV1beta3ImportProcessorVersionResponse struct { 9485 // ProcessorVersion: The destination processor version name. 9486 ProcessorVersion string `json:"processorVersion,omitempty"` 9487 // ForceSendFields is a list of field names (e.g. "ProcessorVersion") to 9488 // unconditionally include in API requests. By default, fields with empty or 9489 // default values are omitted from API requests. See 9490 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9491 // details. 9492 ForceSendFields []string `json:"-"` 9493 // NullFields is a list of field names (e.g. "ProcessorVersion") to include in 9494 // API requests with the JSON null value. By default, fields with empty values 9495 // are omitted from API requests. See 9496 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9497 NullFields []string `json:"-"` 9498 } 9499 9500 func (s *GoogleCloudDocumentaiV1beta3ImportProcessorVersionResponse) MarshalJSON() ([]byte, error) { 9501 type NoMethod GoogleCloudDocumentaiV1beta3ImportProcessorVersionResponse 9502 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9503 } 9504 9505 // GoogleCloudDocumentaiV1beta3ReviewDocumentOperationMetadata: The 9506 // long-running operation metadata for the ReviewDocument method. 9507 type GoogleCloudDocumentaiV1beta3ReviewDocumentOperationMetadata struct { 9508 // CommonMetadata: The basic metadata of the long-running operation. 9509 CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 9510 // CreateTime: The creation time of the operation. 9511 CreateTime string `json:"createTime,omitempty"` 9512 // QuestionId: The Crowd Compute question ID. 9513 QuestionId string `json:"questionId,omitempty"` 9514 // State: Used only when Operation.done is false. 9515 // 9516 // Possible values: 9517 // "STATE_UNSPECIFIED" - Unspecified state. 9518 // "RUNNING" - Operation is still running. 9519 // "CANCELLING" - Operation is being cancelled. 9520 // "SUCCEEDED" - Operation succeeded. 9521 // "FAILED" - Operation failed. 9522 // "CANCELLED" - Operation is cancelled. 9523 State string `json:"state,omitempty"` 9524 // StateMessage: A message providing more details about the current state of 9525 // processing. For example, the error message if the operation is failed. 9526 StateMessage string `json:"stateMessage,omitempty"` 9527 // UpdateTime: The last update time of the operation. 9528 UpdateTime string `json:"updateTime,omitempty"` 9529 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 9530 // unconditionally include in API requests. By default, fields with empty or 9531 // default values are omitted from API requests. See 9532 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9533 // details. 9534 ForceSendFields []string `json:"-"` 9535 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 9536 // API requests with the JSON null value. By default, fields with empty values 9537 // are omitted from API requests. See 9538 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9539 NullFields []string `json:"-"` 9540 } 9541 9542 func (s *GoogleCloudDocumentaiV1beta3ReviewDocumentOperationMetadata) MarshalJSON() ([]byte, error) { 9543 type NoMethod GoogleCloudDocumentaiV1beta3ReviewDocumentOperationMetadata 9544 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9545 } 9546 9547 // GoogleCloudDocumentaiV1beta3ReviewDocumentResponse: Response message for the 9548 // ReviewDocument method. 9549 type GoogleCloudDocumentaiV1beta3ReviewDocumentResponse struct { 9550 // GcsDestination: The Cloud Storage uri for the human reviewed document if the 9551 // review is succeeded. 9552 GcsDestination string `json:"gcsDestination,omitempty"` 9553 // RejectionReason: The reason why the review is rejected by reviewer. 9554 RejectionReason string `json:"rejectionReason,omitempty"` 9555 // State: The state of the review operation. 9556 // 9557 // Possible values: 9558 // "STATE_UNSPECIFIED" - The default value. This value is used if the state 9559 // is omitted. 9560 // "REJECTED" - The review operation is rejected by the reviewer. 9561 // "SUCCEEDED" - The review operation is succeeded. 9562 State string `json:"state,omitempty"` 9563 // ForceSendFields is a list of field names (e.g. "GcsDestination") to 9564 // unconditionally include in API requests. By default, fields with empty or 9565 // default values are omitted from API requests. See 9566 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9567 // details. 9568 ForceSendFields []string `json:"-"` 9569 // NullFields is a list of field names (e.g. "GcsDestination") to include in 9570 // API requests with the JSON null value. By default, fields with empty values 9571 // are omitted from API requests. See 9572 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9573 NullFields []string `json:"-"` 9574 } 9575 9576 func (s *GoogleCloudDocumentaiV1beta3ReviewDocumentResponse) MarshalJSON() ([]byte, error) { 9577 type NoMethod GoogleCloudDocumentaiV1beta3ReviewDocumentResponse 9578 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9579 } 9580 9581 // GoogleCloudDocumentaiV1beta3RevisionRef: The revision reference specifies 9582 // which revision on the document to read. 9583 type GoogleCloudDocumentaiV1beta3RevisionRef struct { 9584 // LatestProcessorVersion: Reads the revision generated by the processor 9585 // version. The format takes the full resource name of processor version. 9586 // `projects/{project}/locations/{location}/processors/{processor}/processorVers 9587 // ions/{processorVersion}` 9588 LatestProcessorVersion string `json:"latestProcessorVersion,omitempty"` 9589 // RevisionCase: Reads the revision by the predefined case. 9590 // 9591 // Possible values: 9592 // "REVISION_CASE_UNSPECIFIED" - Unspecified case, fall back to read the 9593 // `LATEST_HUMAN_REVIEW`. 9594 // "LATEST_HUMAN_REVIEW" - The latest revision made by a human. 9595 // "LATEST_TIMESTAMP" - The latest revision based on timestamp. 9596 // "BASE_OCR_REVISION" - The first (OCR) revision. 9597 RevisionCase string `json:"revisionCase,omitempty"` 9598 // RevisionId: Reads the revision given by the id. 9599 RevisionId string `json:"revisionId,omitempty"` 9600 // ForceSendFields is a list of field names (e.g. "LatestProcessorVersion") to 9601 // unconditionally include in API requests. By default, fields with empty or 9602 // default values are omitted from API requests. See 9603 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9604 // details. 9605 ForceSendFields []string `json:"-"` 9606 // NullFields is a list of field names (e.g. "LatestProcessorVersion") to 9607 // include in API requests with the JSON null value. By default, fields with 9608 // empty values are omitted from API requests. See 9609 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9610 NullFields []string `json:"-"` 9611 } 9612 9613 func (s *GoogleCloudDocumentaiV1beta3RevisionRef) MarshalJSON() ([]byte, error) { 9614 type NoMethod GoogleCloudDocumentaiV1beta3RevisionRef 9615 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9616 } 9617 9618 // GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionMetadata: The 9619 // long-running operation metadata for the SetDefaultProcessorVersion method. 9620 type GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionMetadata struct { 9621 // CommonMetadata: The basic metadata of the long-running operation. 9622 CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 9623 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 9624 // unconditionally include in API requests. By default, fields with empty or 9625 // default values are omitted from API requests. See 9626 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9627 // details. 9628 ForceSendFields []string `json:"-"` 9629 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 9630 // API requests with the JSON null value. By default, fields with empty values 9631 // are omitted from API requests. See 9632 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9633 NullFields []string `json:"-"` 9634 } 9635 9636 func (s *GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 9637 type NoMethod GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionMetadata 9638 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9639 } 9640 9641 // GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionResponse: Response 9642 // message for the SetDefaultProcessorVersion method. 9643 type GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionResponse struct { 9644 } 9645 9646 // GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata: The metadata that 9647 // represents a processor version being created. 9648 type GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata struct { 9649 // CommonMetadata: The basic metadata of the long-running operation. 9650 CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 9651 // TestDatasetValidation: The test dataset validation information. 9652 TestDatasetValidation *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation `json:"testDatasetValidation,omitempty"` 9653 // TrainingDatasetValidation: The training dataset validation information. 9654 TrainingDatasetValidation *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation `json:"trainingDatasetValidation,omitempty"` 9655 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 9656 // unconditionally include in API requests. By default, fields with empty or 9657 // default values are omitted from API requests. See 9658 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9659 // details. 9660 ForceSendFields []string `json:"-"` 9661 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 9662 // API requests with the JSON null value. By default, fields with empty values 9663 // are omitted from API requests. See 9664 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9665 NullFields []string `json:"-"` 9666 } 9667 9668 func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 9669 type NoMethod GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata 9670 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9671 } 9672 9673 // GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation: 9674 // The dataset validation information. This includes any and all errors with 9675 // documents and the dataset. 9676 type GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation struct { 9677 // DatasetErrorCount: The total number of dataset errors. 9678 DatasetErrorCount int64 `json:"datasetErrorCount,omitempty"` 9679 // DatasetErrors: Error information for the dataset as a whole. A maximum of 10 9680 // dataset errors will be returned. A single dataset error is terminal for 9681 // training. 9682 DatasetErrors []*GoogleRpcStatus `json:"datasetErrors,omitempty"` 9683 // DocumentErrorCount: The total number of document errors. 9684 DocumentErrorCount int64 `json:"documentErrorCount,omitempty"` 9685 // DocumentErrors: Error information pertaining to specific documents. A 9686 // maximum of 10 document errors will be returned. Any document with errors 9687 // will not be used throughout training. 9688 DocumentErrors []*GoogleRpcStatus `json:"documentErrors,omitempty"` 9689 // ForceSendFields is a list of field names (e.g. "DatasetErrorCount") to 9690 // unconditionally include in API requests. By default, fields with empty or 9691 // default values are omitted from API requests. See 9692 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9693 // details. 9694 ForceSendFields []string `json:"-"` 9695 // NullFields is a list of field names (e.g. "DatasetErrorCount") to include in 9696 // API requests with the JSON null value. By default, fields with empty values 9697 // are omitted from API requests. See 9698 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9699 NullFields []string `json:"-"` 9700 } 9701 9702 func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation) MarshalJSON() ([]byte, error) { 9703 type NoMethod GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation 9704 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9705 } 9706 9707 // GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse: The response for 9708 // TrainProcessorVersion. 9709 type GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse struct { 9710 // ProcessorVersion: The resource name of the processor version produced by 9711 // training. 9712 ProcessorVersion string `json:"processorVersion,omitempty"` 9713 // ForceSendFields is a list of field names (e.g. "ProcessorVersion") to 9714 // unconditionally include in API requests. By default, fields with empty or 9715 // default values are omitted from API requests. See 9716 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9717 // details. 9718 ForceSendFields []string `json:"-"` 9719 // NullFields is a list of field names (e.g. "ProcessorVersion") to include in 9720 // API requests with the JSON null value. By default, fields with empty values 9721 // are omitted from API requests. See 9722 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9723 NullFields []string `json:"-"` 9724 } 9725 9726 func (s *GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse) MarshalJSON() ([]byte, error) { 9727 type NoMethod GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse 9728 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9729 } 9730 9731 // GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata: The 9732 // long-running operation metadata for the UndeployProcessorVersion method. 9733 type GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata struct { 9734 // CommonMetadata: The basic metadata of the long-running operation. 9735 CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 9736 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 9737 // unconditionally include in API requests. By default, fields with empty or 9738 // default values are omitted from API requests. See 9739 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9740 // details. 9741 ForceSendFields []string `json:"-"` 9742 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 9743 // API requests with the JSON null value. By default, fields with empty values 9744 // are omitted from API requests. See 9745 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9746 NullFields []string `json:"-"` 9747 } 9748 9749 func (s *GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata) MarshalJSON() ([]byte, error) { 9750 type NoMethod GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata 9751 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9752 } 9753 9754 // GoogleCloudDocumentaiV1beta3UndeployProcessorVersionResponse: Response 9755 // message for the UndeployProcessorVersion method. 9756 type GoogleCloudDocumentaiV1beta3UndeployProcessorVersionResponse struct { 9757 } 9758 9759 type GoogleCloudDocumentaiV1beta3UpdateDatasetOperationMetadata struct { 9760 // CommonMetadata: The basic metadata of the long-running operation. 9761 CommonMetadata *GoogleCloudDocumentaiV1beta3CommonOperationMetadata `json:"commonMetadata,omitempty"` 9762 // ForceSendFields is a list of field names (e.g. "CommonMetadata") to 9763 // unconditionally include in API requests. By default, fields with empty or 9764 // default values are omitted from API requests. See 9765 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9766 // details. 9767 ForceSendFields []string `json:"-"` 9768 // NullFields is a list of field names (e.g. "CommonMetadata") to include in 9769 // API requests with the JSON null value. By default, fields with empty values 9770 // are omitted from API requests. See 9771 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9772 NullFields []string `json:"-"` 9773 } 9774 9775 func (s *GoogleCloudDocumentaiV1beta3UpdateDatasetOperationMetadata) MarshalJSON() ([]byte, error) { 9776 type NoMethod GoogleCloudDocumentaiV1beta3UpdateDatasetOperationMetadata 9777 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9778 } 9779 9780 // GoogleCloudLocationListLocationsResponse: The response message for 9781 // Locations.ListLocations. 9782 type GoogleCloudLocationListLocationsResponse struct { 9783 // Locations: A list of locations that matches the specified filter in the 9784 // request. 9785 Locations []*GoogleCloudLocationLocation `json:"locations,omitempty"` 9786 // NextPageToken: The standard List next-page token. 9787 NextPageToken string `json:"nextPageToken,omitempty"` 9788 9789 // ServerResponse contains the HTTP response code and headers from the server. 9790 googleapi.ServerResponse `json:"-"` 9791 // ForceSendFields is a list of field names (e.g. "Locations") to 9792 // unconditionally include in API requests. By default, fields with empty or 9793 // default values are omitted from API requests. See 9794 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9795 // details. 9796 ForceSendFields []string `json:"-"` 9797 // NullFields is a list of field names (e.g. "Locations") to include in API 9798 // requests with the JSON null value. By default, fields with empty values are 9799 // omitted from API requests. See 9800 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9801 NullFields []string `json:"-"` 9802 } 9803 9804 func (s *GoogleCloudLocationListLocationsResponse) MarshalJSON() ([]byte, error) { 9805 type NoMethod GoogleCloudLocationListLocationsResponse 9806 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9807 } 9808 9809 // GoogleCloudLocationLocation: A resource that represents a Google Cloud 9810 // location. 9811 type GoogleCloudLocationLocation struct { 9812 // DisplayName: The friendly name for this location, typically a nearby city 9813 // name. For example, "Tokyo". 9814 DisplayName string `json:"displayName,omitempty"` 9815 // Labels: Cross-service attributes for the location. For example 9816 // {"cloud.googleapis.com/region": "us-east1"} 9817 Labels map[string]string `json:"labels,omitempty"` 9818 // LocationId: The canonical id for this location. For example: "us-east1". 9819 LocationId string `json:"locationId,omitempty"` 9820 // Metadata: Service-specific metadata. For example the available capacity at 9821 // the given location. 9822 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 9823 // Name: Resource name for the location, which may vary between 9824 // implementations. For example: 9825 // "projects/example-project/locations/us-east1" 9826 Name string `json:"name,omitempty"` 9827 9828 // ServerResponse contains the HTTP response code and headers from the server. 9829 googleapi.ServerResponse `json:"-"` 9830 // ForceSendFields is a list of field names (e.g. "DisplayName") to 9831 // unconditionally include in API requests. By default, fields with empty or 9832 // default values are omitted from API requests. See 9833 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9834 // details. 9835 ForceSendFields []string `json:"-"` 9836 // NullFields is a list of field names (e.g. "DisplayName") to include in API 9837 // requests with the JSON null value. By default, fields with empty values are 9838 // omitted from API requests. See 9839 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9840 NullFields []string `json:"-"` 9841 } 9842 9843 func (s *GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) { 9844 type NoMethod GoogleCloudLocationLocation 9845 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9846 } 9847 9848 // GoogleLongrunningListOperationsResponse: The response message for 9849 // Operations.ListOperations. 9850 type GoogleLongrunningListOperationsResponse struct { 9851 // NextPageToken: The standard List next-page token. 9852 NextPageToken string `json:"nextPageToken,omitempty"` 9853 // Operations: A list of operations that matches the specified filter in the 9854 // request. 9855 Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` 9856 9857 // ServerResponse contains the HTTP response code and headers from the server. 9858 googleapi.ServerResponse `json:"-"` 9859 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 9860 // unconditionally include in API requests. By default, fields with empty or 9861 // default values are omitted from API requests. See 9862 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9863 // details. 9864 ForceSendFields []string `json:"-"` 9865 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 9866 // requests with the JSON null value. By default, fields with empty values are 9867 // omitted from API requests. See 9868 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9869 NullFields []string `json:"-"` 9870 } 9871 9872 func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { 9873 type NoMethod GoogleLongrunningListOperationsResponse 9874 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9875 } 9876 9877 // GoogleLongrunningOperation: This resource represents a long-running 9878 // operation that is the result of a network API call. 9879 type GoogleLongrunningOperation struct { 9880 // Done: If the value is `false`, it means the operation is still in progress. 9881 // If `true`, the operation is completed, and either `error` or `response` is 9882 // available. 9883 Done bool `json:"done,omitempty"` 9884 // Error: The error result of the operation in case of failure or cancellation. 9885 Error *GoogleRpcStatus `json:"error,omitempty"` 9886 // Metadata: Service-specific metadata associated with the operation. It 9887 // typically contains progress information and common metadata such as create 9888 // time. Some services might not provide such metadata. Any method that returns 9889 // a long-running operation should document the metadata type, if any. 9890 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 9891 // Name: The server-assigned name, which is only unique within the same service 9892 // that originally returns it. If you use the default HTTP mapping, the `name` 9893 // should be a resource name ending with `operations/{unique_id}`. 9894 Name string `json:"name,omitempty"` 9895 // Response: The normal, successful response of the operation. If the original 9896 // method returns no data on success, such as `Delete`, the response is 9897 // `google.protobuf.Empty`. If the original method is standard 9898 // `Get`/`Create`/`Update`, the response should be the resource. For other 9899 // methods, the response should have the type `XxxResponse`, where `Xxx` is the 9900 // original method name. For example, if the original method name is 9901 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. 9902 Response googleapi.RawMessage `json:"response,omitempty"` 9903 9904 // ServerResponse contains the HTTP response code and headers from the server. 9905 googleapi.ServerResponse `json:"-"` 9906 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally 9907 // include in API requests. By default, fields with empty or default values are 9908 // omitted from API requests. See 9909 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9910 // details. 9911 ForceSendFields []string `json:"-"` 9912 // NullFields is a list of field names (e.g. "Done") to include in API requests 9913 // with the JSON null value. By default, fields with empty values are omitted 9914 // from API requests. See 9915 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9916 NullFields []string `json:"-"` 9917 } 9918 9919 func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { 9920 type NoMethod GoogleLongrunningOperation 9921 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9922 } 9923 9924 // GoogleProtobufEmpty: A generic empty message that you can re-use to avoid 9925 // defining duplicated empty messages in your APIs. A typical example is to use 9926 // it as the request or the response type of an API method. For instance: 9927 // service Foo { rpc Bar(google.protobuf.Empty) returns 9928 // (google.protobuf.Empty); } 9929 type GoogleProtobufEmpty struct { 9930 // ServerResponse contains the HTTP response code and headers from the server. 9931 googleapi.ServerResponse `json:"-"` 9932 } 9933 9934 // GoogleRpcStatus: The `Status` type defines a logical error model that is 9935 // suitable for different programming environments, including REST APIs and RPC 9936 // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message 9937 // contains three pieces of data: error code, error message, and error details. 9938 // You can find out more about this error model and how to work with it in the 9939 // API Design Guide (https://cloud.google.com/apis/design/errors). 9940 type GoogleRpcStatus struct { 9941 // Code: The status code, which should be an enum value of google.rpc.Code. 9942 Code int64 `json:"code,omitempty"` 9943 // Details: A list of messages that carry the error details. There is a common 9944 // set of message types for APIs to use. 9945 Details []googleapi.RawMessage `json:"details,omitempty"` 9946 // Message: A developer-facing error message, which should be in English. Any 9947 // user-facing error message should be localized and sent in the 9948 // google.rpc.Status.details field, or localized by the client. 9949 Message string `json:"message,omitempty"` 9950 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 9951 // include in API requests. By default, fields with empty or default values are 9952 // omitted from API requests. See 9953 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 9954 // details. 9955 ForceSendFields []string `json:"-"` 9956 // NullFields is a list of field names (e.g. "Code") to include in API requests 9957 // with the JSON null value. By default, fields with empty values are omitted 9958 // from API requests. See 9959 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 9960 NullFields []string `json:"-"` 9961 } 9962 9963 func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { 9964 type NoMethod GoogleRpcStatus 9965 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 9966 } 9967 9968 // GoogleTypeColor: Represents a color in the RGBA color space. This 9969 // representation is designed for simplicity of conversion to and from color 9970 // representations in various languages over compactness. For example, the 9971 // fields of this representation can be trivially provided to the constructor 9972 // of `java.awt.Color` in Java; it can also be trivially provided to UIColor's 9973 // `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little 9974 // work, it can be easily formatted into a CSS `rgba()` string in JavaScript. 9975 // This reference page doesn't have information about the absolute color space 9976 // that should be used to interpret the RGB value—for example, sRGB, Adobe 9977 // RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB 9978 // color space. When color equality needs to be decided, implementations, 9979 // unless documented otherwise, treat two colors as equal if all their red, 9980 // green, blue, and alpha values each differ by at most `1e-5`. Example (Java): 9981 // import com.google.type.Color; // ... public static java.awt.Color 9982 // fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? 9983 // protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( 9984 // protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } 9985 // public static Color toProto(java.awt.Color color) { float red = (float) 9986 // color.getRed(); float green = (float) color.getGreen(); float blue = (float) 9987 // color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = 9988 // Color .newBuilder() .setRed(red / denominator) .setGreen(green / 9989 // denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if 9990 // (alpha != 255) { result.setAlpha( FloatValue .newBuilder() 9991 // .setValue(((float) alpha) / denominator) .build()); } return 9992 // resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static 9993 // UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float 9994 // green = [protocolor green]; float blue = [protocolor blue]; FloatValue* 9995 // alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != 9996 // nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red 9997 // green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) 9998 // { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green 9999 // blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] 10000 // init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; 10001 // if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } 10002 // [result autorelease]; return result; } // ... Example (JavaScript): // ... 10003 // var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 10004 // 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue 10005 // || 0.0; var red = Math.floor(redFrac * 255); var green = 10006 // Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if 10007 // (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var 10008 // alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, 10009 // blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(”); 10010 // }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new 10011 // Number((red << 16) | (green << 8) | blue); var hexString = 10012 // rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var 10013 // resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { 10014 // resultBuilder.push('0'); } resultBuilder.push(hexString); return 10015 // resultBuilder.join(”); }; // ... 10016 type GoogleTypeColor struct { 10017 // Alpha: The fraction of this color that should be applied to the pixel. That 10018 // is, the final pixel color is defined by the equation: `pixel color = alpha * 10019 // (this color) + (1.0 - alpha) * (background color)` This means that a value 10020 // of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a 10021 // completely transparent color. This uses a wrapper message rather than a 10022 // simple float scalar so that it is possible to distinguish between a default 10023 // value and the value being unset. If omitted, this color object is rendered 10024 // as a solid color (as if the alpha value had been explicitly given a value of 10025 // 1.0). 10026 Alpha float64 `json:"alpha,omitempty"` 10027 // Blue: The amount of blue in the color as a value in the interval [0, 1]. 10028 Blue float64 `json:"blue,omitempty"` 10029 // Green: The amount of green in the color as a value in the interval [0, 1]. 10030 Green float64 `json:"green,omitempty"` 10031 // Red: The amount of red in the color as a value in the interval [0, 1]. 10032 Red float64 `json:"red,omitempty"` 10033 // ForceSendFields is a list of field names (e.g. "Alpha") to unconditionally 10034 // include in API requests. By default, fields with empty or default values are 10035 // omitted from API requests. See 10036 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 10037 // details. 10038 ForceSendFields []string `json:"-"` 10039 // NullFields is a list of field names (e.g. "Alpha") to include in API 10040 // requests with the JSON null value. By default, fields with empty values are 10041 // omitted from API requests. See 10042 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 10043 NullFields []string `json:"-"` 10044 } 10045 10046 func (s *GoogleTypeColor) MarshalJSON() ([]byte, error) { 10047 type NoMethod GoogleTypeColor 10048 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 10049 } 10050 10051 func (s *GoogleTypeColor) UnmarshalJSON(data []byte) error { 10052 type NoMethod GoogleTypeColor 10053 var s1 struct { 10054 Alpha gensupport.JSONFloat64 `json:"alpha"` 10055 Blue gensupport.JSONFloat64 `json:"blue"` 10056 Green gensupport.JSONFloat64 `json:"green"` 10057 Red gensupport.JSONFloat64 `json:"red"` 10058 *NoMethod 10059 } 10060 s1.NoMethod = (*NoMethod)(s) 10061 if err := json.Unmarshal(data, &s1); err != nil { 10062 return err 10063 } 10064 s.Alpha = float64(s1.Alpha) 10065 s.Blue = float64(s1.Blue) 10066 s.Green = float64(s1.Green) 10067 s.Red = float64(s1.Red) 10068 return nil 10069 } 10070 10071 // GoogleTypeDate: Represents a whole or partial calendar date, such as a 10072 // birthday. The time of day and time zone are either specified elsewhere or 10073 // are insignificant. The date is relative to the Gregorian Calendar. This can 10074 // represent one of the following: * A full date, with non-zero year, month, 10075 // and day values. * A month and day, with a zero year (for example, an 10076 // anniversary). * A year on its own, with a zero month and a zero day. * A 10077 // year and month, with a zero day (for example, a credit card expiration 10078 // date). Related types: * google.type.TimeOfDay * google.type.DateTime * 10079 // google.protobuf.Timestamp 10080 type GoogleTypeDate struct { 10081 // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, 10082 // or 0 to specify a year by itself or a year and month where the day isn't 10083 // significant. 10084 Day int64 `json:"day,omitempty"` 10085 // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without 10086 // a month and day. 10087 Month int64 `json:"month,omitempty"` 10088 // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date 10089 // without a year. 10090 Year int64 `json:"year,omitempty"` 10091 // ForceSendFields is a list of field names (e.g. "Day") to unconditionally 10092 // include in API requests. By default, fields with empty or default values are 10093 // omitted from API requests. See 10094 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 10095 // details. 10096 ForceSendFields []string `json:"-"` 10097 // NullFields is a list of field names (e.g. "Day") to include in API requests 10098 // with the JSON null value. By default, fields with empty values are omitted 10099 // from API requests. See 10100 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 10101 NullFields []string `json:"-"` 10102 } 10103 10104 func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { 10105 type NoMethod GoogleTypeDate 10106 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 10107 } 10108 10109 // GoogleTypeDateTime: Represents civil time (or occasionally physical time). 10110 // This type can represent a civil time in one of a few possible ways: * When 10111 // utc_offset is set and time_zone is unset: a civil time on a calendar day 10112 // with a particular offset from UTC. * When time_zone is set and utc_offset is 10113 // unset: a civil time on a calendar day in a particular time zone. * When 10114 // neither time_zone nor utc_offset is set: a civil time on a calendar day in 10115 // local time. The date is relative to the Proleptic Gregorian Calendar. If 10116 // year, month, or day are 0, the DateTime is considered not to have a specific 10117 // year, month, or day respectively. This type may also be used to represent a 10118 // physical time if all the date and time fields are set and either case of the 10119 // `time_offset` oneof is set. Consider using `Timestamp` message for physical 10120 // time instead. If your use case also would like to store the user's timezone, 10121 // that can be done in another field. This type is more flexible than some 10122 // applications may want. Make sure to document and validate your application's 10123 // limitations. 10124 type GoogleTypeDateTime struct { 10125 // Day: Optional. Day of month. Must be from 1 to 31 and valid for the year and 10126 // month, or 0 if specifying a datetime without a day. 10127 Day int64 `json:"day,omitempty"` 10128 // Hours: Optional. Hours of day in 24 hour format. Should be from 0 to 23, 10129 // defaults to 0 (midnight). An API may choose to allow the value "24:00:00" 10130 // for scenarios like business closing time. 10131 Hours int64 `json:"hours,omitempty"` 10132 // Minutes: Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 10133 // 0. 10134 Minutes int64 `json:"minutes,omitempty"` 10135 // Month: Optional. Month of year. Must be from 1 to 12, or 0 if specifying a 10136 // datetime without a month. 10137 Month int64 `json:"month,omitempty"` 10138 // Nanos: Optional. Fractions of seconds in nanoseconds. Must be from 0 to 10139 // 999,999,999, defaults to 0. 10140 Nanos int64 `json:"nanos,omitempty"` 10141 // Seconds: Optional. Seconds of minutes of the time. Must normally be from 0 10142 // to 59, defaults to 0. An API may allow the value 60 if it allows 10143 // leap-seconds. 10144 Seconds int64 `json:"seconds,omitempty"` 10145 // TimeZone: Time zone. 10146 TimeZone *GoogleTypeTimeZone `json:"timeZone,omitempty"` 10147 // UtcOffset: UTC offset. Must be whole seconds, between -18 hours and +18 10148 // hours. For example, a UTC offset of -4:00 would be represented as { seconds: 10149 // -14400 }. 10150 UtcOffset string `json:"utcOffset,omitempty"` 10151 // Year: Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a 10152 // datetime without a year. 10153 Year int64 `json:"year,omitempty"` 10154 // ForceSendFields is a list of field names (e.g. "Day") to unconditionally 10155 // include in API requests. By default, fields with empty or default values are 10156 // omitted from API requests. See 10157 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 10158 // details. 10159 ForceSendFields []string `json:"-"` 10160 // NullFields is a list of field names (e.g. "Day") to include in API requests 10161 // with the JSON null value. By default, fields with empty values are omitted 10162 // from API requests. See 10163 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 10164 NullFields []string `json:"-"` 10165 } 10166 10167 func (s *GoogleTypeDateTime) MarshalJSON() ([]byte, error) { 10168 type NoMethod GoogleTypeDateTime 10169 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 10170 } 10171 10172 // GoogleTypeMoney: Represents an amount of money with its currency type. 10173 type GoogleTypeMoney struct { 10174 // CurrencyCode: The three-letter currency code defined in ISO 4217. 10175 CurrencyCode string `json:"currencyCode,omitempty"` 10176 // Nanos: Number of nano (10^-9) units of the amount. The value must be between 10177 // -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` 10178 // must be positive or zero. If `units` is zero, `nanos` can be positive, zero, 10179 // or negative. If `units` is negative, `nanos` must be negative or zero. For 10180 // example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. 10181 Nanos int64 `json:"nanos,omitempty"` 10182 // Units: The whole units of the amount. For example if `currencyCode` is 10183 // "USD", then 1 unit is one US dollar. 10184 Units int64 `json:"units,omitempty,string"` 10185 // ForceSendFields is a list of field names (e.g. "CurrencyCode") to 10186 // unconditionally include in API requests. By default, fields with empty or 10187 // default values are omitted from API requests. See 10188 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 10189 // details. 10190 ForceSendFields []string `json:"-"` 10191 // NullFields is a list of field names (e.g. "CurrencyCode") to include in API 10192 // requests with the JSON null value. By default, fields with empty values are 10193 // omitted from API requests. See 10194 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 10195 NullFields []string `json:"-"` 10196 } 10197 10198 func (s *GoogleTypeMoney) MarshalJSON() ([]byte, error) { 10199 type NoMethod GoogleTypeMoney 10200 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 10201 } 10202 10203 // GoogleTypePostalAddress: Represents a postal address, e.g. for postal 10204 // delivery or payments addresses. Given a postal address, a postal service can 10205 // deliver items to a premise, P.O. Box or similar. It is not intended to model 10206 // geographical locations (roads, towns, mountains). In typical usage an 10207 // address would be created via user input or from importing existing data, 10208 // depending on the type of process. Advice on address input / editing: - Use 10209 // an internationalization-ready address widget such as 10210 // https://github.com/google/libaddressinput) - Users should not be presented 10211 // with UI elements for input or editing of fields outside countries where that 10212 // field is used. For more guidance on how to use this schema, please see: 10213 // https://support.google.com/business/answer/6397478 10214 type GoogleTypePostalAddress struct { 10215 // AddressLines: Unstructured address lines describing the lower levels of an 10216 // address. Because values in address_lines do not have type information and 10217 // may sometimes contain multiple values in a single field (e.g. "Austin, TX"), 10218 // it is important that the line order is clear. The order of address lines 10219 // should be "envelope order" for the country/region of the address. In places 10220 // where this can vary (e.g. Japan), address_language is used to make it 10221 // explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for 10222 // small-to-large). This way, the most specific line of an address can be 10223 // selected based on the language. The minimum permitted structural 10224 // representation of an address consists of a region_code with all remaining 10225 // information placed in the address_lines. It would be possible to format such 10226 // an address very approximately without geocoding, but no semantic reasoning 10227 // could be made about any of the address components until it was at least 10228 // partially resolved. Creating an address only containing a region_code and 10229 // address_lines, and then geocoding is the recommended way to handle 10230 // completely unstructured addresses (as opposed to guessing which parts of the 10231 // address should be localities or administrative areas). 10232 AddressLines []string `json:"addressLines,omitempty"` 10233 // AdministrativeArea: Optional. Highest administrative subdivision which is 10234 // used for postal addresses of a country or region. For example, this can be a 10235 // state, a province, an oblast, or a prefecture. Specifically, for Spain this 10236 // is the province and not the autonomous community (e.g. "Barcelona" and not 10237 // "Catalonia"). Many countries don't use an administrative area in postal 10238 // addresses. E.g. in Switzerland this should be left unpopulated. 10239 AdministrativeArea string `json:"administrativeArea,omitempty"` 10240 // LanguageCode: Optional. BCP-47 language code of the contents of this address 10241 // (if known). This is often the UI language of the input form or is expected 10242 // to match one of the languages used in the address' country/region, or their 10243 // transliterated equivalents. This can affect formatting in certain countries, 10244 // but is not critical to the correctness of the data and will never affect any 10245 // validation or other non-formatting related operations. If this value is not 10246 // known, it should be omitted (rather than specifying a possibly incorrect 10247 // default). Examples: "zh-Hant", "ja", "ja-Latn", "en". 10248 LanguageCode string `json:"languageCode,omitempty"` 10249 // Locality: Optional. Generally refers to the city/town portion of the 10250 // address. Examples: US city, IT comune, UK post town. In regions of the world 10251 // where localities are not well defined or do not fit into this structure 10252 // well, leave locality empty and use address_lines. 10253 Locality string `json:"locality,omitempty"` 10254 // Organization: Optional. The name of the organization at the address. 10255 Organization string `json:"organization,omitempty"` 10256 // PostalCode: Optional. Postal code of the address. Not all countries use or 10257 // require postal codes to be present, but where they are used, they may 10258 // trigger additional validation with other parts of the address (e.g. 10259 // state/zip validation in the U.S.A.). 10260 PostalCode string `json:"postalCode,omitempty"` 10261 // Recipients: Optional. The recipient at the address. This field may, under 10262 // certain circumstances, contain multiline information. For example, it might 10263 // contain "care of" information. 10264 Recipients []string `json:"recipients,omitempty"` 10265 // RegionCode: Required. CLDR region code of the country/region of the address. 10266 // This is never inferred and it is up to the user to ensure the value is 10267 // correct. See https://cldr.unicode.org/ and 10268 // https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html 10269 // for details. Example: "CH" for Switzerland. 10270 RegionCode string `json:"regionCode,omitempty"` 10271 // Revision: The schema revision of the `PostalAddress`. This must be set to 0, 10272 // which is the latest revision. All new revisions **must** be backward 10273 // compatible with old revisions. 10274 Revision int64 `json:"revision,omitempty"` 10275 // SortingCode: Optional. Additional, country-specific, sorting code. This is 10276 // not used in most regions. Where it is used, the value is either a string 10277 // like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a 10278 // number alone, representing the "sector code" (Jamaica), "delivery area 10279 // indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). 10280 SortingCode string `json:"sortingCode,omitempty"` 10281 // Sublocality: Optional. Sublocality of the address. For example, this can be 10282 // neighborhoods, boroughs, districts. 10283 Sublocality string `json:"sublocality,omitempty"` 10284 // ForceSendFields is a list of field names (e.g. "AddressLines") to 10285 // unconditionally include in API requests. By default, fields with empty or 10286 // default values are omitted from API requests. See 10287 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 10288 // details. 10289 ForceSendFields []string `json:"-"` 10290 // NullFields is a list of field names (e.g. "AddressLines") to include in API 10291 // requests with the JSON null value. By default, fields with empty values are 10292 // omitted from API requests. See 10293 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 10294 NullFields []string `json:"-"` 10295 } 10296 10297 func (s *GoogleTypePostalAddress) MarshalJSON() ([]byte, error) { 10298 type NoMethod GoogleTypePostalAddress 10299 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 10300 } 10301 10302 // GoogleTypeTimeZone: Represents a time zone from the IANA Time Zone Database 10303 // (https://www.iana.org/time-zones). 10304 type GoogleTypeTimeZone struct { 10305 // Id: IANA Time Zone Database time zone, e.g. "America/New_York". 10306 Id string `json:"id,omitempty"` 10307 // Version: Optional. IANA Time Zone Database version number, e.g. "2019a". 10308 Version string `json:"version,omitempty"` 10309 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 10310 // include in API requests. By default, fields with empty or default values are 10311 // omitted from API requests. See 10312 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 10313 // details. 10314 ForceSendFields []string `json:"-"` 10315 // NullFields is a list of field names (e.g. "Id") to include in API requests 10316 // with the JSON null value. By default, fields with empty values are omitted 10317 // from API requests. See 10318 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 10319 NullFields []string `json:"-"` 10320 } 10321 10322 func (s *GoogleTypeTimeZone) MarshalJSON() ([]byte, error) { 10323 type NoMethod GoogleTypeTimeZone 10324 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 10325 } 10326 10327 type OperationsDeleteCall struct { 10328 s *Service 10329 name string 10330 urlParams_ gensupport.URLParams 10331 ctx_ context.Context 10332 header_ http.Header 10333 } 10334 10335 // Delete: Deletes a long-running operation. This method indicates that the 10336 // client is no longer interested in the operation result. It does not cancel 10337 // the operation. If the server doesn't support this method, it returns 10338 // `google.rpc.Code.UNIMPLEMENTED`. 10339 // 10340 // - name: The name of the operation resource to be deleted. 10341 func (r *OperationsService) Delete(name string) *OperationsDeleteCall { 10342 c := &OperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10343 c.name = name 10344 return c 10345 } 10346 10347 // Fields allows partial responses to be retrieved. See 10348 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10349 // details. 10350 func (c *OperationsDeleteCall) Fields(s ...googleapi.Field) *OperationsDeleteCall { 10351 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10352 return c 10353 } 10354 10355 // Context sets the context to be used in this call's Do method. 10356 func (c *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall { 10357 c.ctx_ = ctx 10358 return c 10359 } 10360 10361 // Header returns a http.Header that can be modified by the caller to add 10362 // headers to the request. 10363 func (c *OperationsDeleteCall) Header() http.Header { 10364 if c.header_ == nil { 10365 c.header_ = make(http.Header) 10366 } 10367 return c.header_ 10368 } 10369 10370 func (c *OperationsDeleteCall) doRequest(alt string) (*http.Response, error) { 10371 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10372 var body io.Reader = nil 10373 c.urlParams_.Set("alt", alt) 10374 c.urlParams_.Set("prettyPrint", "false") 10375 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 10376 urls += "?" + c.urlParams_.Encode() 10377 req, err := http.NewRequest("DELETE", urls, body) 10378 if err != nil { 10379 return nil, err 10380 } 10381 req.Header = reqHeaders 10382 googleapi.Expand(req.URL, map[string]string{ 10383 "name": c.name, 10384 }) 10385 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10386 } 10387 10388 // Do executes the "documentai.operations.delete" call. 10389 // Any non-2xx status code is an error. Response headers are in either 10390 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at 10391 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10392 // check whether the returned error was because http.StatusNotModified was 10393 // returned. 10394 func (c *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 10395 gensupport.SetOptions(c.urlParams_, opts...) 10396 res, err := c.doRequest("json") 10397 if res != nil && res.StatusCode == http.StatusNotModified { 10398 if res.Body != nil { 10399 res.Body.Close() 10400 } 10401 return nil, gensupport.WrapError(&googleapi.Error{ 10402 Code: res.StatusCode, 10403 Header: res.Header, 10404 }) 10405 } 10406 if err != nil { 10407 return nil, err 10408 } 10409 defer googleapi.CloseBody(res) 10410 if err := googleapi.CheckResponse(res); err != nil { 10411 return nil, gensupport.WrapError(err) 10412 } 10413 ret := &GoogleProtobufEmpty{ 10414 ServerResponse: googleapi.ServerResponse{ 10415 Header: res.Header, 10416 HTTPStatusCode: res.StatusCode, 10417 }, 10418 } 10419 target := &ret 10420 if err := gensupport.DecodeResponse(target, res); err != nil { 10421 return nil, err 10422 } 10423 return ret, nil 10424 } 10425 10426 type ProjectsLocationsFetchProcessorTypesCall struct { 10427 s *Service 10428 parent string 10429 urlParams_ gensupport.URLParams 10430 ifNoneMatch_ string 10431 ctx_ context.Context 10432 header_ http.Header 10433 } 10434 10435 // FetchProcessorTypes: Fetches processor types. Note that we don't use 10436 // ListProcessorTypes here, because it isn't paginated. 10437 // 10438 // - parent: The location of processor types to list. Format: 10439 // `projects/{project}/locations/{location}`. 10440 func (r *ProjectsLocationsService) FetchProcessorTypes(parent string) *ProjectsLocationsFetchProcessorTypesCall { 10441 c := &ProjectsLocationsFetchProcessorTypesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10442 c.parent = parent 10443 return c 10444 } 10445 10446 // Fields allows partial responses to be retrieved. See 10447 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10448 // details. 10449 func (c *ProjectsLocationsFetchProcessorTypesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFetchProcessorTypesCall { 10450 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10451 return c 10452 } 10453 10454 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10455 // object's ETag matches the given value. This is useful for getting updates 10456 // only after the object has changed since the last request. 10457 func (c *ProjectsLocationsFetchProcessorTypesCall) IfNoneMatch(entityTag string) *ProjectsLocationsFetchProcessorTypesCall { 10458 c.ifNoneMatch_ = entityTag 10459 return c 10460 } 10461 10462 // Context sets the context to be used in this call's Do method. 10463 func (c *ProjectsLocationsFetchProcessorTypesCall) Context(ctx context.Context) *ProjectsLocationsFetchProcessorTypesCall { 10464 c.ctx_ = ctx 10465 return c 10466 } 10467 10468 // Header returns a http.Header that can be modified by the caller to add 10469 // headers to the request. 10470 func (c *ProjectsLocationsFetchProcessorTypesCall) Header() http.Header { 10471 if c.header_ == nil { 10472 c.header_ = make(http.Header) 10473 } 10474 return c.header_ 10475 } 10476 10477 func (c *ProjectsLocationsFetchProcessorTypesCall) doRequest(alt string) (*http.Response, error) { 10478 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10479 if c.ifNoneMatch_ != "" { 10480 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10481 } 10482 var body io.Reader = nil 10483 c.urlParams_.Set("alt", alt) 10484 c.urlParams_.Set("prettyPrint", "false") 10485 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:fetchProcessorTypes") 10486 urls += "?" + c.urlParams_.Encode() 10487 req, err := http.NewRequest("GET", urls, body) 10488 if err != nil { 10489 return nil, err 10490 } 10491 req.Header = reqHeaders 10492 googleapi.Expand(req.URL, map[string]string{ 10493 "parent": c.parent, 10494 }) 10495 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10496 } 10497 10498 // Do executes the "documentai.projects.locations.fetchProcessorTypes" call. 10499 // Any non-2xx status code is an error. Response headers are in either 10500 // *GoogleCloudDocumentaiV1FetchProcessorTypesResponse.ServerResponse.Header or 10501 // (if a response was returned at all) in error.(*googleapi.Error).Header. Use 10502 // googleapi.IsNotModified to check whether the returned error was because 10503 // http.StatusNotModified was returned. 10504 func (c *ProjectsLocationsFetchProcessorTypesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1FetchProcessorTypesResponse, error) { 10505 gensupport.SetOptions(c.urlParams_, opts...) 10506 res, err := c.doRequest("json") 10507 if res != nil && res.StatusCode == http.StatusNotModified { 10508 if res.Body != nil { 10509 res.Body.Close() 10510 } 10511 return nil, gensupport.WrapError(&googleapi.Error{ 10512 Code: res.StatusCode, 10513 Header: res.Header, 10514 }) 10515 } 10516 if err != nil { 10517 return nil, err 10518 } 10519 defer googleapi.CloseBody(res) 10520 if err := googleapi.CheckResponse(res); err != nil { 10521 return nil, gensupport.WrapError(err) 10522 } 10523 ret := &GoogleCloudDocumentaiV1FetchProcessorTypesResponse{ 10524 ServerResponse: googleapi.ServerResponse{ 10525 Header: res.Header, 10526 HTTPStatusCode: res.StatusCode, 10527 }, 10528 } 10529 target := &ret 10530 if err := gensupport.DecodeResponse(target, res); err != nil { 10531 return nil, err 10532 } 10533 return ret, nil 10534 } 10535 10536 type ProjectsLocationsGetCall struct { 10537 s *Service 10538 name string 10539 urlParams_ gensupport.URLParams 10540 ifNoneMatch_ string 10541 ctx_ context.Context 10542 header_ http.Header 10543 } 10544 10545 // Get: Gets information about a location. 10546 // 10547 // - name: Resource name for the location. 10548 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { 10549 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10550 c.name = name 10551 return c 10552 } 10553 10554 // Fields allows partial responses to be retrieved. See 10555 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10556 // details. 10557 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { 10558 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10559 return c 10560 } 10561 10562 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10563 // object's ETag matches the given value. This is useful for getting updates 10564 // only after the object has changed since the last request. 10565 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { 10566 c.ifNoneMatch_ = entityTag 10567 return c 10568 } 10569 10570 // Context sets the context to be used in this call's Do method. 10571 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { 10572 c.ctx_ = ctx 10573 return c 10574 } 10575 10576 // Header returns a http.Header that can be modified by the caller to add 10577 // headers to the request. 10578 func (c *ProjectsLocationsGetCall) Header() http.Header { 10579 if c.header_ == nil { 10580 c.header_ = make(http.Header) 10581 } 10582 return c.header_ 10583 } 10584 10585 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 10586 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10587 if c.ifNoneMatch_ != "" { 10588 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10589 } 10590 var body io.Reader = nil 10591 c.urlParams_.Set("alt", alt) 10592 c.urlParams_.Set("prettyPrint", "false") 10593 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 10594 urls += "?" + c.urlParams_.Encode() 10595 req, err := http.NewRequest("GET", urls, body) 10596 if err != nil { 10597 return nil, err 10598 } 10599 req.Header = reqHeaders 10600 googleapi.Expand(req.URL, map[string]string{ 10601 "name": c.name, 10602 }) 10603 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10604 } 10605 10606 // Do executes the "documentai.projects.locations.get" call. 10607 // Any non-2xx status code is an error. Response headers are in either 10608 // *GoogleCloudLocationLocation.ServerResponse.Header or (if a response was 10609 // returned at all) in error.(*googleapi.Error).Header. Use 10610 // googleapi.IsNotModified to check whether the returned error was because 10611 // http.StatusNotModified was returned. 10612 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { 10613 gensupport.SetOptions(c.urlParams_, opts...) 10614 res, err := c.doRequest("json") 10615 if res != nil && res.StatusCode == http.StatusNotModified { 10616 if res.Body != nil { 10617 res.Body.Close() 10618 } 10619 return nil, gensupport.WrapError(&googleapi.Error{ 10620 Code: res.StatusCode, 10621 Header: res.Header, 10622 }) 10623 } 10624 if err != nil { 10625 return nil, err 10626 } 10627 defer googleapi.CloseBody(res) 10628 if err := googleapi.CheckResponse(res); err != nil { 10629 return nil, gensupport.WrapError(err) 10630 } 10631 ret := &GoogleCloudLocationLocation{ 10632 ServerResponse: googleapi.ServerResponse{ 10633 Header: res.Header, 10634 HTTPStatusCode: res.StatusCode, 10635 }, 10636 } 10637 target := &ret 10638 if err := gensupport.DecodeResponse(target, res); err != nil { 10639 return nil, err 10640 } 10641 return ret, nil 10642 } 10643 10644 type ProjectsLocationsListCall struct { 10645 s *Service 10646 name string 10647 urlParams_ gensupport.URLParams 10648 ifNoneMatch_ string 10649 ctx_ context.Context 10650 header_ http.Header 10651 } 10652 10653 // List: Lists information about the supported locations for this service. 10654 // 10655 // - name: The resource that owns the locations collection, if applicable. 10656 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { 10657 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10658 c.name = name 10659 return c 10660 } 10661 10662 // Filter sets the optional parameter "filter": A filter to narrow down results 10663 // to a preferred subset. The filtering language accepts strings like 10664 // "displayName=tokyo", and is documented in more detail in AIP-160 10665 // (https://google.aip.dev/160). 10666 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { 10667 c.urlParams_.Set("filter", filter) 10668 return c 10669 } 10670 10671 // PageSize sets the optional parameter "pageSize": The maximum number of 10672 // results to return. If not set, the service selects a default. 10673 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { 10674 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10675 return c 10676 } 10677 10678 // PageToken sets the optional parameter "pageToken": A page token received 10679 // from the `next_page_token` field in the response. Send that page token to 10680 // receive the subsequent page. 10681 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { 10682 c.urlParams_.Set("pageToken", pageToken) 10683 return c 10684 } 10685 10686 // Fields allows partial responses to be retrieved. See 10687 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10688 // details. 10689 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 10690 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10691 return c 10692 } 10693 10694 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10695 // object's ETag matches the given value. This is useful for getting updates 10696 // only after the object has changed since the last request. 10697 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 10698 c.ifNoneMatch_ = entityTag 10699 return c 10700 } 10701 10702 // Context sets the context to be used in this call's Do method. 10703 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 10704 c.ctx_ = ctx 10705 return c 10706 } 10707 10708 // Header returns a http.Header that can be modified by the caller to add 10709 // headers to the request. 10710 func (c *ProjectsLocationsListCall) Header() http.Header { 10711 if c.header_ == nil { 10712 c.header_ = make(http.Header) 10713 } 10714 return c.header_ 10715 } 10716 10717 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 10718 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10719 if c.ifNoneMatch_ != "" { 10720 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10721 } 10722 var body io.Reader = nil 10723 c.urlParams_.Set("alt", alt) 10724 c.urlParams_.Set("prettyPrint", "false") 10725 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") 10726 urls += "?" + c.urlParams_.Encode() 10727 req, err := http.NewRequest("GET", urls, body) 10728 if err != nil { 10729 return nil, err 10730 } 10731 req.Header = reqHeaders 10732 googleapi.Expand(req.URL, map[string]string{ 10733 "name": c.name, 10734 }) 10735 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10736 } 10737 10738 // Do executes the "documentai.projects.locations.list" call. 10739 // Any non-2xx status code is an error. Response headers are in either 10740 // *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or (if a 10741 // response was returned at all) in error.(*googleapi.Error).Header. Use 10742 // googleapi.IsNotModified to check whether the returned error was because 10743 // http.StatusNotModified was returned. 10744 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationListLocationsResponse, error) { 10745 gensupport.SetOptions(c.urlParams_, opts...) 10746 res, err := c.doRequest("json") 10747 if res != nil && res.StatusCode == http.StatusNotModified { 10748 if res.Body != nil { 10749 res.Body.Close() 10750 } 10751 return nil, gensupport.WrapError(&googleapi.Error{ 10752 Code: res.StatusCode, 10753 Header: res.Header, 10754 }) 10755 } 10756 if err != nil { 10757 return nil, err 10758 } 10759 defer googleapi.CloseBody(res) 10760 if err := googleapi.CheckResponse(res); err != nil { 10761 return nil, gensupport.WrapError(err) 10762 } 10763 ret := &GoogleCloudLocationListLocationsResponse{ 10764 ServerResponse: googleapi.ServerResponse{ 10765 Header: res.Header, 10766 HTTPStatusCode: res.StatusCode, 10767 }, 10768 } 10769 target := &ret 10770 if err := gensupport.DecodeResponse(target, res); err != nil { 10771 return nil, err 10772 } 10773 return ret, nil 10774 } 10775 10776 // Pages invokes f for each page of results. 10777 // A non-nil error returned from f will halt the iteration. 10778 // The provided context supersedes any context provided to the Context method. 10779 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) error) error { 10780 c.ctx_ = ctx 10781 defer c.PageToken(c.urlParams_.Get("pageToken")) 10782 for { 10783 x, err := c.Do() 10784 if err != nil { 10785 return err 10786 } 10787 if err := f(x); err != nil { 10788 return err 10789 } 10790 if x.NextPageToken == "" { 10791 return nil 10792 } 10793 c.PageToken(x.NextPageToken) 10794 } 10795 } 10796 10797 type ProjectsLocationsOperationsCancelCall struct { 10798 s *Service 10799 name string 10800 urlParams_ gensupport.URLParams 10801 ctx_ context.Context 10802 header_ http.Header 10803 } 10804 10805 // Cancel: Starts asynchronous cancellation on a long-running operation. The 10806 // server makes a best effort to cancel the operation, but success is not 10807 // guaranteed. If the server doesn't support this method, it returns 10808 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or 10809 // other methods to check whether the cancellation succeeded or whether the 10810 // operation completed despite cancellation. On successful cancellation, the 10811 // operation is not deleted; instead, it becomes an operation with an 10812 // Operation.error value with a google.rpc.Status.code of 1, corresponding to 10813 // `Code.CANCELLED`. 10814 // 10815 // - name: The name of the operation resource to be cancelled. 10816 func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall { 10817 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10818 c.name = name 10819 return c 10820 } 10821 10822 // Fields allows partial responses to be retrieved. See 10823 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10824 // details. 10825 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { 10826 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10827 return c 10828 } 10829 10830 // Context sets the context to be used in this call's Do method. 10831 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { 10832 c.ctx_ = ctx 10833 return c 10834 } 10835 10836 // Header returns a http.Header that can be modified by the caller to add 10837 // headers to the request. 10838 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { 10839 if c.header_ == nil { 10840 c.header_ = make(http.Header) 10841 } 10842 return c.header_ 10843 } 10844 10845 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 10846 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10847 var body io.Reader = nil 10848 c.urlParams_.Set("alt", alt) 10849 c.urlParams_.Set("prettyPrint", "false") 10850 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") 10851 urls += "?" + c.urlParams_.Encode() 10852 req, err := http.NewRequest("POST", urls, body) 10853 if err != nil { 10854 return nil, err 10855 } 10856 req.Header = reqHeaders 10857 googleapi.Expand(req.URL, map[string]string{ 10858 "name": c.name, 10859 }) 10860 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10861 } 10862 10863 // Do executes the "documentai.projects.locations.operations.cancel" call. 10864 // Any non-2xx status code is an error. Response headers are in either 10865 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at 10866 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 10867 // check whether the returned error was because http.StatusNotModified was 10868 // returned. 10869 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 10870 gensupport.SetOptions(c.urlParams_, opts...) 10871 res, err := c.doRequest("json") 10872 if res != nil && res.StatusCode == http.StatusNotModified { 10873 if res.Body != nil { 10874 res.Body.Close() 10875 } 10876 return nil, gensupport.WrapError(&googleapi.Error{ 10877 Code: res.StatusCode, 10878 Header: res.Header, 10879 }) 10880 } 10881 if err != nil { 10882 return nil, err 10883 } 10884 defer googleapi.CloseBody(res) 10885 if err := googleapi.CheckResponse(res); err != nil { 10886 return nil, gensupport.WrapError(err) 10887 } 10888 ret := &GoogleProtobufEmpty{ 10889 ServerResponse: googleapi.ServerResponse{ 10890 Header: res.Header, 10891 HTTPStatusCode: res.StatusCode, 10892 }, 10893 } 10894 target := &ret 10895 if err := gensupport.DecodeResponse(target, res); err != nil { 10896 return nil, err 10897 } 10898 return ret, nil 10899 } 10900 10901 type ProjectsLocationsOperationsGetCall struct { 10902 s *Service 10903 name string 10904 urlParams_ gensupport.URLParams 10905 ifNoneMatch_ string 10906 ctx_ context.Context 10907 header_ http.Header 10908 } 10909 10910 // Get: Gets the latest state of a long-running operation. Clients can use this 10911 // method to poll the operation result at intervals as recommended by the API 10912 // service. 10913 // 10914 // - name: The name of the operation resource. 10915 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { 10916 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10917 c.name = name 10918 return c 10919 } 10920 10921 // Fields allows partial responses to be retrieved. See 10922 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10923 // details. 10924 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 10925 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10926 return c 10927 } 10928 10929 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10930 // object's ETag matches the given value. This is useful for getting updates 10931 // only after the object has changed since the last request. 10932 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { 10933 c.ifNoneMatch_ = entityTag 10934 return c 10935 } 10936 10937 // Context sets the context to be used in this call's Do method. 10938 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 10939 c.ctx_ = ctx 10940 return c 10941 } 10942 10943 // Header returns a http.Header that can be modified by the caller to add 10944 // headers to the request. 10945 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { 10946 if c.header_ == nil { 10947 c.header_ = make(http.Header) 10948 } 10949 return c.header_ 10950 } 10951 10952 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 10953 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10954 if c.ifNoneMatch_ != "" { 10955 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10956 } 10957 var body io.Reader = nil 10958 c.urlParams_.Set("alt", alt) 10959 c.urlParams_.Set("prettyPrint", "false") 10960 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 10961 urls += "?" + c.urlParams_.Encode() 10962 req, err := http.NewRequest("GET", urls, body) 10963 if err != nil { 10964 return nil, err 10965 } 10966 req.Header = reqHeaders 10967 googleapi.Expand(req.URL, map[string]string{ 10968 "name": c.name, 10969 }) 10970 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10971 } 10972 10973 // Do executes the "documentai.projects.locations.operations.get" call. 10974 // Any non-2xx status code is an error. Response headers are in either 10975 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 10976 // returned at all) in error.(*googleapi.Error).Header. Use 10977 // googleapi.IsNotModified to check whether the returned error was because 10978 // http.StatusNotModified was returned. 10979 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 10980 gensupport.SetOptions(c.urlParams_, opts...) 10981 res, err := c.doRequest("json") 10982 if res != nil && res.StatusCode == http.StatusNotModified { 10983 if res.Body != nil { 10984 res.Body.Close() 10985 } 10986 return nil, gensupport.WrapError(&googleapi.Error{ 10987 Code: res.StatusCode, 10988 Header: res.Header, 10989 }) 10990 } 10991 if err != nil { 10992 return nil, err 10993 } 10994 defer googleapi.CloseBody(res) 10995 if err := googleapi.CheckResponse(res); err != nil { 10996 return nil, gensupport.WrapError(err) 10997 } 10998 ret := &GoogleLongrunningOperation{ 10999 ServerResponse: googleapi.ServerResponse{ 11000 Header: res.Header, 11001 HTTPStatusCode: res.StatusCode, 11002 }, 11003 } 11004 target := &ret 11005 if err := gensupport.DecodeResponse(target, res); err != nil { 11006 return nil, err 11007 } 11008 return ret, nil 11009 } 11010 11011 type ProjectsLocationsOperationsListCall struct { 11012 s *Service 11013 name string 11014 urlParams_ gensupport.URLParams 11015 ifNoneMatch_ string 11016 ctx_ context.Context 11017 header_ http.Header 11018 } 11019 11020 // List: Lists operations that match the specified filter in the request. If 11021 // the server doesn't support this method, it returns `UNIMPLEMENTED`. 11022 // 11023 // - name: The name of the operation's parent resource. 11024 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { 11025 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11026 c.name = name 11027 return c 11028 } 11029 11030 // Filter sets the optional parameter "filter": The standard list filter. 11031 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { 11032 c.urlParams_.Set("filter", filter) 11033 return c 11034 } 11035 11036 // PageSize sets the optional parameter "pageSize": The standard list page 11037 // size. 11038 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { 11039 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11040 return c 11041 } 11042 11043 // PageToken sets the optional parameter "pageToken": The standard list page 11044 // token. 11045 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { 11046 c.urlParams_.Set("pageToken", pageToken) 11047 return c 11048 } 11049 11050 // Fields allows partial responses to be retrieved. See 11051 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11052 // details. 11053 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { 11054 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11055 return c 11056 } 11057 11058 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11059 // object's ETag matches the given value. This is useful for getting updates 11060 // only after the object has changed since the last request. 11061 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { 11062 c.ifNoneMatch_ = entityTag 11063 return c 11064 } 11065 11066 // Context sets the context to be used in this call's Do method. 11067 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { 11068 c.ctx_ = ctx 11069 return c 11070 } 11071 11072 // Header returns a http.Header that can be modified by the caller to add 11073 // headers to the request. 11074 func (c *ProjectsLocationsOperationsListCall) Header() http.Header { 11075 if c.header_ == nil { 11076 c.header_ = make(http.Header) 11077 } 11078 return c.header_ 11079 } 11080 11081 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { 11082 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11083 if c.ifNoneMatch_ != "" { 11084 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11085 } 11086 var body io.Reader = nil 11087 c.urlParams_.Set("alt", alt) 11088 c.urlParams_.Set("prettyPrint", "false") 11089 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 11090 urls += "?" + c.urlParams_.Encode() 11091 req, err := http.NewRequest("GET", urls, body) 11092 if err != nil { 11093 return nil, err 11094 } 11095 req.Header = reqHeaders 11096 googleapi.Expand(req.URL, map[string]string{ 11097 "name": c.name, 11098 }) 11099 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11100 } 11101 11102 // Do executes the "documentai.projects.locations.operations.list" call. 11103 // Any non-2xx status code is an error. Response headers are in either 11104 // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a 11105 // response was returned at all) in error.(*googleapi.Error).Header. Use 11106 // googleapi.IsNotModified to check whether the returned error was because 11107 // http.StatusNotModified was returned. 11108 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { 11109 gensupport.SetOptions(c.urlParams_, opts...) 11110 res, err := c.doRequest("json") 11111 if res != nil && res.StatusCode == http.StatusNotModified { 11112 if res.Body != nil { 11113 res.Body.Close() 11114 } 11115 return nil, gensupport.WrapError(&googleapi.Error{ 11116 Code: res.StatusCode, 11117 Header: res.Header, 11118 }) 11119 } 11120 if err != nil { 11121 return nil, err 11122 } 11123 defer googleapi.CloseBody(res) 11124 if err := googleapi.CheckResponse(res); err != nil { 11125 return nil, gensupport.WrapError(err) 11126 } 11127 ret := &GoogleLongrunningListOperationsResponse{ 11128 ServerResponse: googleapi.ServerResponse{ 11129 Header: res.Header, 11130 HTTPStatusCode: res.StatusCode, 11131 }, 11132 } 11133 target := &ret 11134 if err := gensupport.DecodeResponse(target, res); err != nil { 11135 return nil, err 11136 } 11137 return ret, nil 11138 } 11139 11140 // Pages invokes f for each page of results. 11141 // A non-nil error returned from f will halt the iteration. 11142 // The provided context supersedes any context provided to the Context method. 11143 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { 11144 c.ctx_ = ctx 11145 defer c.PageToken(c.urlParams_.Get("pageToken")) 11146 for { 11147 x, err := c.Do() 11148 if err != nil { 11149 return err 11150 } 11151 if err := f(x); err != nil { 11152 return err 11153 } 11154 if x.NextPageToken == "" { 11155 return nil 11156 } 11157 c.PageToken(x.NextPageToken) 11158 } 11159 } 11160 11161 type ProjectsLocationsProcessorTypesGetCall struct { 11162 s *Service 11163 name string 11164 urlParams_ gensupport.URLParams 11165 ifNoneMatch_ string 11166 ctx_ context.Context 11167 header_ http.Header 11168 } 11169 11170 // Get: Gets a processor type detail. 11171 // 11172 // - name: The processor type resource name. 11173 func (r *ProjectsLocationsProcessorTypesService) Get(name string) *ProjectsLocationsProcessorTypesGetCall { 11174 c := &ProjectsLocationsProcessorTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11175 c.name = name 11176 return c 11177 } 11178 11179 // Fields allows partial responses to be retrieved. See 11180 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11181 // details. 11182 func (c *ProjectsLocationsProcessorTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorTypesGetCall { 11183 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11184 return c 11185 } 11186 11187 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11188 // object's ETag matches the given value. This is useful for getting updates 11189 // only after the object has changed since the last request. 11190 func (c *ProjectsLocationsProcessorTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsProcessorTypesGetCall { 11191 c.ifNoneMatch_ = entityTag 11192 return c 11193 } 11194 11195 // Context sets the context to be used in this call's Do method. 11196 func (c *ProjectsLocationsProcessorTypesGetCall) Context(ctx context.Context) *ProjectsLocationsProcessorTypesGetCall { 11197 c.ctx_ = ctx 11198 return c 11199 } 11200 11201 // Header returns a http.Header that can be modified by the caller to add 11202 // headers to the request. 11203 func (c *ProjectsLocationsProcessorTypesGetCall) Header() http.Header { 11204 if c.header_ == nil { 11205 c.header_ = make(http.Header) 11206 } 11207 return c.header_ 11208 } 11209 11210 func (c *ProjectsLocationsProcessorTypesGetCall) doRequest(alt string) (*http.Response, error) { 11211 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11212 if c.ifNoneMatch_ != "" { 11213 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11214 } 11215 var body io.Reader = nil 11216 c.urlParams_.Set("alt", alt) 11217 c.urlParams_.Set("prettyPrint", "false") 11218 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 11219 urls += "?" + c.urlParams_.Encode() 11220 req, err := http.NewRequest("GET", urls, body) 11221 if err != nil { 11222 return nil, err 11223 } 11224 req.Header = reqHeaders 11225 googleapi.Expand(req.URL, map[string]string{ 11226 "name": c.name, 11227 }) 11228 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11229 } 11230 11231 // Do executes the "documentai.projects.locations.processorTypes.get" call. 11232 // Any non-2xx status code is an error. Response headers are in either 11233 // *GoogleCloudDocumentaiV1ProcessorType.ServerResponse.Header or (if a 11234 // response was returned at all) in error.(*googleapi.Error).Header. Use 11235 // googleapi.IsNotModified to check whether the returned error was because 11236 // http.StatusNotModified was returned. 11237 func (c *ProjectsLocationsProcessorTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1ProcessorType, error) { 11238 gensupport.SetOptions(c.urlParams_, opts...) 11239 res, err := c.doRequest("json") 11240 if res != nil && res.StatusCode == http.StatusNotModified { 11241 if res.Body != nil { 11242 res.Body.Close() 11243 } 11244 return nil, gensupport.WrapError(&googleapi.Error{ 11245 Code: res.StatusCode, 11246 Header: res.Header, 11247 }) 11248 } 11249 if err != nil { 11250 return nil, err 11251 } 11252 defer googleapi.CloseBody(res) 11253 if err := googleapi.CheckResponse(res); err != nil { 11254 return nil, gensupport.WrapError(err) 11255 } 11256 ret := &GoogleCloudDocumentaiV1ProcessorType{ 11257 ServerResponse: googleapi.ServerResponse{ 11258 Header: res.Header, 11259 HTTPStatusCode: res.StatusCode, 11260 }, 11261 } 11262 target := &ret 11263 if err := gensupport.DecodeResponse(target, res); err != nil { 11264 return nil, err 11265 } 11266 return ret, nil 11267 } 11268 11269 type ProjectsLocationsProcessorTypesListCall struct { 11270 s *Service 11271 parent string 11272 urlParams_ gensupport.URLParams 11273 ifNoneMatch_ string 11274 ctx_ context.Context 11275 header_ http.Header 11276 } 11277 11278 // List: Lists the processor types that exist. 11279 // 11280 // - parent: The location of processor types to list. Format: 11281 // `projects/{project}/locations/{location}`. 11282 func (r *ProjectsLocationsProcessorTypesService) List(parent string) *ProjectsLocationsProcessorTypesListCall { 11283 c := &ProjectsLocationsProcessorTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11284 c.parent = parent 11285 return c 11286 } 11287 11288 // PageSize sets the optional parameter "pageSize": The maximum number of 11289 // processor types to return. If unspecified, at most `100` processor types 11290 // will be returned. The maximum value is `500`. Values above `500` will be 11291 // coerced to `500`. 11292 func (c *ProjectsLocationsProcessorTypesListCall) PageSize(pageSize int64) *ProjectsLocationsProcessorTypesListCall { 11293 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 11294 return c 11295 } 11296 11297 // PageToken sets the optional parameter "pageToken": Used to retrieve the next 11298 // page of results, empty if at the end of the list. 11299 func (c *ProjectsLocationsProcessorTypesListCall) PageToken(pageToken string) *ProjectsLocationsProcessorTypesListCall { 11300 c.urlParams_.Set("pageToken", pageToken) 11301 return c 11302 } 11303 11304 // Fields allows partial responses to be retrieved. See 11305 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11306 // details. 11307 func (c *ProjectsLocationsProcessorTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorTypesListCall { 11308 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11309 return c 11310 } 11311 11312 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11313 // object's ETag matches the given value. This is useful for getting updates 11314 // only after the object has changed since the last request. 11315 func (c *ProjectsLocationsProcessorTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProcessorTypesListCall { 11316 c.ifNoneMatch_ = entityTag 11317 return c 11318 } 11319 11320 // Context sets the context to be used in this call's Do method. 11321 func (c *ProjectsLocationsProcessorTypesListCall) Context(ctx context.Context) *ProjectsLocationsProcessorTypesListCall { 11322 c.ctx_ = ctx 11323 return c 11324 } 11325 11326 // Header returns a http.Header that can be modified by the caller to add 11327 // headers to the request. 11328 func (c *ProjectsLocationsProcessorTypesListCall) Header() http.Header { 11329 if c.header_ == nil { 11330 c.header_ = make(http.Header) 11331 } 11332 return c.header_ 11333 } 11334 11335 func (c *ProjectsLocationsProcessorTypesListCall) doRequest(alt string) (*http.Response, error) { 11336 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11337 if c.ifNoneMatch_ != "" { 11338 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11339 } 11340 var body io.Reader = nil 11341 c.urlParams_.Set("alt", alt) 11342 c.urlParams_.Set("prettyPrint", "false") 11343 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/processorTypes") 11344 urls += "?" + c.urlParams_.Encode() 11345 req, err := http.NewRequest("GET", urls, body) 11346 if err != nil { 11347 return nil, err 11348 } 11349 req.Header = reqHeaders 11350 googleapi.Expand(req.URL, map[string]string{ 11351 "parent": c.parent, 11352 }) 11353 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11354 } 11355 11356 // Do executes the "documentai.projects.locations.processorTypes.list" call. 11357 // Any non-2xx status code is an error. Response headers are in either 11358 // *GoogleCloudDocumentaiV1ListProcessorTypesResponse.ServerResponse.Header or 11359 // (if a response was returned at all) in error.(*googleapi.Error).Header. Use 11360 // googleapi.IsNotModified to check whether the returned error was because 11361 // http.StatusNotModified was returned. 11362 func (c *ProjectsLocationsProcessorTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1ListProcessorTypesResponse, error) { 11363 gensupport.SetOptions(c.urlParams_, opts...) 11364 res, err := c.doRequest("json") 11365 if res != nil && res.StatusCode == http.StatusNotModified { 11366 if res.Body != nil { 11367 res.Body.Close() 11368 } 11369 return nil, gensupport.WrapError(&googleapi.Error{ 11370 Code: res.StatusCode, 11371 Header: res.Header, 11372 }) 11373 } 11374 if err != nil { 11375 return nil, err 11376 } 11377 defer googleapi.CloseBody(res) 11378 if err := googleapi.CheckResponse(res); err != nil { 11379 return nil, gensupport.WrapError(err) 11380 } 11381 ret := &GoogleCloudDocumentaiV1ListProcessorTypesResponse{ 11382 ServerResponse: googleapi.ServerResponse{ 11383 Header: res.Header, 11384 HTTPStatusCode: res.StatusCode, 11385 }, 11386 } 11387 target := &ret 11388 if err := gensupport.DecodeResponse(target, res); err != nil { 11389 return nil, err 11390 } 11391 return ret, nil 11392 } 11393 11394 // Pages invokes f for each page of results. 11395 // A non-nil error returned from f will halt the iteration. 11396 // The provided context supersedes any context provided to the Context method. 11397 func (c *ProjectsLocationsProcessorTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudDocumentaiV1ListProcessorTypesResponse) error) error { 11398 c.ctx_ = ctx 11399 defer c.PageToken(c.urlParams_.Get("pageToken")) 11400 for { 11401 x, err := c.Do() 11402 if err != nil { 11403 return err 11404 } 11405 if err := f(x); err != nil { 11406 return err 11407 } 11408 if x.NextPageToken == "" { 11409 return nil 11410 } 11411 c.PageToken(x.NextPageToken) 11412 } 11413 } 11414 11415 type ProjectsLocationsProcessorsBatchProcessCall struct { 11416 s *Service 11417 name string 11418 googleclouddocumentaiv1batchprocessrequest *GoogleCloudDocumentaiV1BatchProcessRequest 11419 urlParams_ gensupport.URLParams 11420 ctx_ context.Context 11421 header_ http.Header 11422 } 11423 11424 // BatchProcess: LRO endpoint to batch process many documents. The output is 11425 // written to Cloud Storage as JSON in the [Document] format. 11426 // 11427 // - name: The resource name of Processor or ProcessorVersion. Format: 11428 // `projects/{project}/locations/{location}/processors/{processor}`, or 11429 // `projects/{project}/locations/{location}/processors/{processor}/processorVe 11430 // rsions/{processorVersion}`. 11431 func (r *ProjectsLocationsProcessorsService) BatchProcess(name string, googleclouddocumentaiv1batchprocessrequest *GoogleCloudDocumentaiV1BatchProcessRequest) *ProjectsLocationsProcessorsBatchProcessCall { 11432 c := &ProjectsLocationsProcessorsBatchProcessCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11433 c.name = name 11434 c.googleclouddocumentaiv1batchprocessrequest = googleclouddocumentaiv1batchprocessrequest 11435 return c 11436 } 11437 11438 // Fields allows partial responses to be retrieved. See 11439 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11440 // details. 11441 func (c *ProjectsLocationsProcessorsBatchProcessCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsBatchProcessCall { 11442 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11443 return c 11444 } 11445 11446 // Context sets the context to be used in this call's Do method. 11447 func (c *ProjectsLocationsProcessorsBatchProcessCall) Context(ctx context.Context) *ProjectsLocationsProcessorsBatchProcessCall { 11448 c.ctx_ = ctx 11449 return c 11450 } 11451 11452 // Header returns a http.Header that can be modified by the caller to add 11453 // headers to the request. 11454 func (c *ProjectsLocationsProcessorsBatchProcessCall) Header() http.Header { 11455 if c.header_ == nil { 11456 c.header_ = make(http.Header) 11457 } 11458 return c.header_ 11459 } 11460 11461 func (c *ProjectsLocationsProcessorsBatchProcessCall) doRequest(alt string) (*http.Response, error) { 11462 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11463 var body io.Reader = nil 11464 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1batchprocessrequest) 11465 if err != nil { 11466 return nil, err 11467 } 11468 c.urlParams_.Set("alt", alt) 11469 c.urlParams_.Set("prettyPrint", "false") 11470 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:batchProcess") 11471 urls += "?" + c.urlParams_.Encode() 11472 req, err := http.NewRequest("POST", urls, body) 11473 if err != nil { 11474 return nil, err 11475 } 11476 req.Header = reqHeaders 11477 googleapi.Expand(req.URL, map[string]string{ 11478 "name": c.name, 11479 }) 11480 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11481 } 11482 11483 // Do executes the "documentai.projects.locations.processors.batchProcess" call. 11484 // Any non-2xx status code is an error. Response headers are in either 11485 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 11486 // returned at all) in error.(*googleapi.Error).Header. Use 11487 // googleapi.IsNotModified to check whether the returned error was because 11488 // http.StatusNotModified was returned. 11489 func (c *ProjectsLocationsProcessorsBatchProcessCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 11490 gensupport.SetOptions(c.urlParams_, opts...) 11491 res, err := c.doRequest("json") 11492 if res != nil && res.StatusCode == http.StatusNotModified { 11493 if res.Body != nil { 11494 res.Body.Close() 11495 } 11496 return nil, gensupport.WrapError(&googleapi.Error{ 11497 Code: res.StatusCode, 11498 Header: res.Header, 11499 }) 11500 } 11501 if err != nil { 11502 return nil, err 11503 } 11504 defer googleapi.CloseBody(res) 11505 if err := googleapi.CheckResponse(res); err != nil { 11506 return nil, gensupport.WrapError(err) 11507 } 11508 ret := &GoogleLongrunningOperation{ 11509 ServerResponse: googleapi.ServerResponse{ 11510 Header: res.Header, 11511 HTTPStatusCode: res.StatusCode, 11512 }, 11513 } 11514 target := &ret 11515 if err := gensupport.DecodeResponse(target, res); err != nil { 11516 return nil, err 11517 } 11518 return ret, nil 11519 } 11520 11521 type ProjectsLocationsProcessorsCreateCall struct { 11522 s *Service 11523 parent string 11524 googleclouddocumentaiv1processor *GoogleCloudDocumentaiV1Processor 11525 urlParams_ gensupport.URLParams 11526 ctx_ context.Context 11527 header_ http.Header 11528 } 11529 11530 // Create: Creates a processor from the ProcessorType provided. The processor 11531 // will be at `ENABLED` state by default after its creation. 11532 // 11533 // - parent: The parent (project and location) under which to create the 11534 // processor. Format: `projects/{project}/locations/{location}`. 11535 func (r *ProjectsLocationsProcessorsService) Create(parent string, googleclouddocumentaiv1processor *GoogleCloudDocumentaiV1Processor) *ProjectsLocationsProcessorsCreateCall { 11536 c := &ProjectsLocationsProcessorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11537 c.parent = parent 11538 c.googleclouddocumentaiv1processor = googleclouddocumentaiv1processor 11539 return c 11540 } 11541 11542 // Fields allows partial responses to be retrieved. See 11543 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11544 // details. 11545 func (c *ProjectsLocationsProcessorsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsCreateCall { 11546 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11547 return c 11548 } 11549 11550 // Context sets the context to be used in this call's Do method. 11551 func (c *ProjectsLocationsProcessorsCreateCall) Context(ctx context.Context) *ProjectsLocationsProcessorsCreateCall { 11552 c.ctx_ = ctx 11553 return c 11554 } 11555 11556 // Header returns a http.Header that can be modified by the caller to add 11557 // headers to the request. 11558 func (c *ProjectsLocationsProcessorsCreateCall) Header() http.Header { 11559 if c.header_ == nil { 11560 c.header_ = make(http.Header) 11561 } 11562 return c.header_ 11563 } 11564 11565 func (c *ProjectsLocationsProcessorsCreateCall) doRequest(alt string) (*http.Response, error) { 11566 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11567 var body io.Reader = nil 11568 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1processor) 11569 if err != nil { 11570 return nil, err 11571 } 11572 c.urlParams_.Set("alt", alt) 11573 c.urlParams_.Set("prettyPrint", "false") 11574 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/processors") 11575 urls += "?" + c.urlParams_.Encode() 11576 req, err := http.NewRequest("POST", urls, body) 11577 if err != nil { 11578 return nil, err 11579 } 11580 req.Header = reqHeaders 11581 googleapi.Expand(req.URL, map[string]string{ 11582 "parent": c.parent, 11583 }) 11584 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11585 } 11586 11587 // Do executes the "documentai.projects.locations.processors.create" call. 11588 // Any non-2xx status code is an error. Response headers are in either 11589 // *GoogleCloudDocumentaiV1Processor.ServerResponse.Header or (if a response 11590 // was returned at all) in error.(*googleapi.Error).Header. Use 11591 // googleapi.IsNotModified to check whether the returned error was because 11592 // http.StatusNotModified was returned. 11593 func (c *ProjectsLocationsProcessorsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1Processor, error) { 11594 gensupport.SetOptions(c.urlParams_, opts...) 11595 res, err := c.doRequest("json") 11596 if res != nil && res.StatusCode == http.StatusNotModified { 11597 if res.Body != nil { 11598 res.Body.Close() 11599 } 11600 return nil, gensupport.WrapError(&googleapi.Error{ 11601 Code: res.StatusCode, 11602 Header: res.Header, 11603 }) 11604 } 11605 if err != nil { 11606 return nil, err 11607 } 11608 defer googleapi.CloseBody(res) 11609 if err := googleapi.CheckResponse(res); err != nil { 11610 return nil, gensupport.WrapError(err) 11611 } 11612 ret := &GoogleCloudDocumentaiV1Processor{ 11613 ServerResponse: googleapi.ServerResponse{ 11614 Header: res.Header, 11615 HTTPStatusCode: res.StatusCode, 11616 }, 11617 } 11618 target := &ret 11619 if err := gensupport.DecodeResponse(target, res); err != nil { 11620 return nil, err 11621 } 11622 return ret, nil 11623 } 11624 11625 type ProjectsLocationsProcessorsDeleteCall struct { 11626 s *Service 11627 name string 11628 urlParams_ gensupport.URLParams 11629 ctx_ context.Context 11630 header_ http.Header 11631 } 11632 11633 // Delete: Deletes the processor, unloads all deployed model artifacts if it 11634 // was enabled and then deletes all artifacts associated with this processor. 11635 // 11636 // - name: The processor resource name to be deleted. 11637 func (r *ProjectsLocationsProcessorsService) Delete(name string) *ProjectsLocationsProcessorsDeleteCall { 11638 c := &ProjectsLocationsProcessorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11639 c.name = name 11640 return c 11641 } 11642 11643 // Fields allows partial responses to be retrieved. See 11644 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11645 // details. 11646 func (c *ProjectsLocationsProcessorsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsDeleteCall { 11647 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11648 return c 11649 } 11650 11651 // Context sets the context to be used in this call's Do method. 11652 func (c *ProjectsLocationsProcessorsDeleteCall) Context(ctx context.Context) *ProjectsLocationsProcessorsDeleteCall { 11653 c.ctx_ = ctx 11654 return c 11655 } 11656 11657 // Header returns a http.Header that can be modified by the caller to add 11658 // headers to the request. 11659 func (c *ProjectsLocationsProcessorsDeleteCall) Header() http.Header { 11660 if c.header_ == nil { 11661 c.header_ = make(http.Header) 11662 } 11663 return c.header_ 11664 } 11665 11666 func (c *ProjectsLocationsProcessorsDeleteCall) doRequest(alt string) (*http.Response, error) { 11667 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11668 var body io.Reader = nil 11669 c.urlParams_.Set("alt", alt) 11670 c.urlParams_.Set("prettyPrint", "false") 11671 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 11672 urls += "?" + c.urlParams_.Encode() 11673 req, err := http.NewRequest("DELETE", urls, body) 11674 if err != nil { 11675 return nil, err 11676 } 11677 req.Header = reqHeaders 11678 googleapi.Expand(req.URL, map[string]string{ 11679 "name": c.name, 11680 }) 11681 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11682 } 11683 11684 // Do executes the "documentai.projects.locations.processors.delete" call. 11685 // Any non-2xx status code is an error. Response headers are in either 11686 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 11687 // returned at all) in error.(*googleapi.Error).Header. Use 11688 // googleapi.IsNotModified to check whether the returned error was because 11689 // http.StatusNotModified was returned. 11690 func (c *ProjectsLocationsProcessorsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 11691 gensupport.SetOptions(c.urlParams_, opts...) 11692 res, err := c.doRequest("json") 11693 if res != nil && res.StatusCode == http.StatusNotModified { 11694 if res.Body != nil { 11695 res.Body.Close() 11696 } 11697 return nil, gensupport.WrapError(&googleapi.Error{ 11698 Code: res.StatusCode, 11699 Header: res.Header, 11700 }) 11701 } 11702 if err != nil { 11703 return nil, err 11704 } 11705 defer googleapi.CloseBody(res) 11706 if err := googleapi.CheckResponse(res); err != nil { 11707 return nil, gensupport.WrapError(err) 11708 } 11709 ret := &GoogleLongrunningOperation{ 11710 ServerResponse: googleapi.ServerResponse{ 11711 Header: res.Header, 11712 HTTPStatusCode: res.StatusCode, 11713 }, 11714 } 11715 target := &ret 11716 if err := gensupport.DecodeResponse(target, res); err != nil { 11717 return nil, err 11718 } 11719 return ret, nil 11720 } 11721 11722 type ProjectsLocationsProcessorsDisableCall struct { 11723 s *Service 11724 name string 11725 googleclouddocumentaiv1disableprocessorrequest *GoogleCloudDocumentaiV1DisableProcessorRequest 11726 urlParams_ gensupport.URLParams 11727 ctx_ context.Context 11728 header_ http.Header 11729 } 11730 11731 // Disable: Disables a processor 11732 // 11733 // - name: The processor resource name to be disabled. 11734 func (r *ProjectsLocationsProcessorsService) Disable(name string, googleclouddocumentaiv1disableprocessorrequest *GoogleCloudDocumentaiV1DisableProcessorRequest) *ProjectsLocationsProcessorsDisableCall { 11735 c := &ProjectsLocationsProcessorsDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11736 c.name = name 11737 c.googleclouddocumentaiv1disableprocessorrequest = googleclouddocumentaiv1disableprocessorrequest 11738 return c 11739 } 11740 11741 // Fields allows partial responses to be retrieved. See 11742 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11743 // details. 11744 func (c *ProjectsLocationsProcessorsDisableCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsDisableCall { 11745 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11746 return c 11747 } 11748 11749 // Context sets the context to be used in this call's Do method. 11750 func (c *ProjectsLocationsProcessorsDisableCall) Context(ctx context.Context) *ProjectsLocationsProcessorsDisableCall { 11751 c.ctx_ = ctx 11752 return c 11753 } 11754 11755 // Header returns a http.Header that can be modified by the caller to add 11756 // headers to the request. 11757 func (c *ProjectsLocationsProcessorsDisableCall) Header() http.Header { 11758 if c.header_ == nil { 11759 c.header_ = make(http.Header) 11760 } 11761 return c.header_ 11762 } 11763 11764 func (c *ProjectsLocationsProcessorsDisableCall) doRequest(alt string) (*http.Response, error) { 11765 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11766 var body io.Reader = nil 11767 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1disableprocessorrequest) 11768 if err != nil { 11769 return nil, err 11770 } 11771 c.urlParams_.Set("alt", alt) 11772 c.urlParams_.Set("prettyPrint", "false") 11773 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:disable") 11774 urls += "?" + c.urlParams_.Encode() 11775 req, err := http.NewRequest("POST", urls, body) 11776 if err != nil { 11777 return nil, err 11778 } 11779 req.Header = reqHeaders 11780 googleapi.Expand(req.URL, map[string]string{ 11781 "name": c.name, 11782 }) 11783 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11784 } 11785 11786 // Do executes the "documentai.projects.locations.processors.disable" call. 11787 // Any non-2xx status code is an error. Response headers are in either 11788 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 11789 // returned at all) in error.(*googleapi.Error).Header. Use 11790 // googleapi.IsNotModified to check whether the returned error was because 11791 // http.StatusNotModified was returned. 11792 func (c *ProjectsLocationsProcessorsDisableCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 11793 gensupport.SetOptions(c.urlParams_, opts...) 11794 res, err := c.doRequest("json") 11795 if res != nil && res.StatusCode == http.StatusNotModified { 11796 if res.Body != nil { 11797 res.Body.Close() 11798 } 11799 return nil, gensupport.WrapError(&googleapi.Error{ 11800 Code: res.StatusCode, 11801 Header: res.Header, 11802 }) 11803 } 11804 if err != nil { 11805 return nil, err 11806 } 11807 defer googleapi.CloseBody(res) 11808 if err := googleapi.CheckResponse(res); err != nil { 11809 return nil, gensupport.WrapError(err) 11810 } 11811 ret := &GoogleLongrunningOperation{ 11812 ServerResponse: googleapi.ServerResponse{ 11813 Header: res.Header, 11814 HTTPStatusCode: res.StatusCode, 11815 }, 11816 } 11817 target := &ret 11818 if err := gensupport.DecodeResponse(target, res); err != nil { 11819 return nil, err 11820 } 11821 return ret, nil 11822 } 11823 11824 type ProjectsLocationsProcessorsEnableCall struct { 11825 s *Service 11826 name string 11827 googleclouddocumentaiv1enableprocessorrequest *GoogleCloudDocumentaiV1EnableProcessorRequest 11828 urlParams_ gensupport.URLParams 11829 ctx_ context.Context 11830 header_ http.Header 11831 } 11832 11833 // Enable: Enables a processor 11834 // 11835 // - name: The processor resource name to be enabled. 11836 func (r *ProjectsLocationsProcessorsService) Enable(name string, googleclouddocumentaiv1enableprocessorrequest *GoogleCloudDocumentaiV1EnableProcessorRequest) *ProjectsLocationsProcessorsEnableCall { 11837 c := &ProjectsLocationsProcessorsEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11838 c.name = name 11839 c.googleclouddocumentaiv1enableprocessorrequest = googleclouddocumentaiv1enableprocessorrequest 11840 return c 11841 } 11842 11843 // Fields allows partial responses to be retrieved. See 11844 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11845 // details. 11846 func (c *ProjectsLocationsProcessorsEnableCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsEnableCall { 11847 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11848 return c 11849 } 11850 11851 // Context sets the context to be used in this call's Do method. 11852 func (c *ProjectsLocationsProcessorsEnableCall) Context(ctx context.Context) *ProjectsLocationsProcessorsEnableCall { 11853 c.ctx_ = ctx 11854 return c 11855 } 11856 11857 // Header returns a http.Header that can be modified by the caller to add 11858 // headers to the request. 11859 func (c *ProjectsLocationsProcessorsEnableCall) Header() http.Header { 11860 if c.header_ == nil { 11861 c.header_ = make(http.Header) 11862 } 11863 return c.header_ 11864 } 11865 11866 func (c *ProjectsLocationsProcessorsEnableCall) doRequest(alt string) (*http.Response, error) { 11867 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 11868 var body io.Reader = nil 11869 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1enableprocessorrequest) 11870 if err != nil { 11871 return nil, err 11872 } 11873 c.urlParams_.Set("alt", alt) 11874 c.urlParams_.Set("prettyPrint", "false") 11875 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:enable") 11876 urls += "?" + c.urlParams_.Encode() 11877 req, err := http.NewRequest("POST", urls, body) 11878 if err != nil { 11879 return nil, err 11880 } 11881 req.Header = reqHeaders 11882 googleapi.Expand(req.URL, map[string]string{ 11883 "name": c.name, 11884 }) 11885 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11886 } 11887 11888 // Do executes the "documentai.projects.locations.processors.enable" call. 11889 // Any non-2xx status code is an error. Response headers are in either 11890 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 11891 // returned at all) in error.(*googleapi.Error).Header. Use 11892 // googleapi.IsNotModified to check whether the returned error was because 11893 // http.StatusNotModified was returned. 11894 func (c *ProjectsLocationsProcessorsEnableCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 11895 gensupport.SetOptions(c.urlParams_, opts...) 11896 res, err := c.doRequest("json") 11897 if res != nil && res.StatusCode == http.StatusNotModified { 11898 if res.Body != nil { 11899 res.Body.Close() 11900 } 11901 return nil, gensupport.WrapError(&googleapi.Error{ 11902 Code: res.StatusCode, 11903 Header: res.Header, 11904 }) 11905 } 11906 if err != nil { 11907 return nil, err 11908 } 11909 defer googleapi.CloseBody(res) 11910 if err := googleapi.CheckResponse(res); err != nil { 11911 return nil, gensupport.WrapError(err) 11912 } 11913 ret := &GoogleLongrunningOperation{ 11914 ServerResponse: googleapi.ServerResponse{ 11915 Header: res.Header, 11916 HTTPStatusCode: res.StatusCode, 11917 }, 11918 } 11919 target := &ret 11920 if err := gensupport.DecodeResponse(target, res); err != nil { 11921 return nil, err 11922 } 11923 return ret, nil 11924 } 11925 11926 type ProjectsLocationsProcessorsGetCall struct { 11927 s *Service 11928 name string 11929 urlParams_ gensupport.URLParams 11930 ifNoneMatch_ string 11931 ctx_ context.Context 11932 header_ http.Header 11933 } 11934 11935 // Get: Gets a processor detail. 11936 // 11937 // - name: The processor resource name. 11938 func (r *ProjectsLocationsProcessorsService) Get(name string) *ProjectsLocationsProcessorsGetCall { 11939 c := &ProjectsLocationsProcessorsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11940 c.name = name 11941 return c 11942 } 11943 11944 // Fields allows partial responses to be retrieved. See 11945 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 11946 // details. 11947 func (c *ProjectsLocationsProcessorsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsGetCall { 11948 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11949 return c 11950 } 11951 11952 // IfNoneMatch sets an optional parameter which makes the operation fail if the 11953 // object's ETag matches the given value. This is useful for getting updates 11954 // only after the object has changed since the last request. 11955 func (c *ProjectsLocationsProcessorsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsProcessorsGetCall { 11956 c.ifNoneMatch_ = entityTag 11957 return c 11958 } 11959 11960 // Context sets the context to be used in this call's Do method. 11961 func (c *ProjectsLocationsProcessorsGetCall) Context(ctx context.Context) *ProjectsLocationsProcessorsGetCall { 11962 c.ctx_ = ctx 11963 return c 11964 } 11965 11966 // Header returns a http.Header that can be modified by the caller to add 11967 // headers to the request. 11968 func (c *ProjectsLocationsProcessorsGetCall) Header() http.Header { 11969 if c.header_ == nil { 11970 c.header_ = make(http.Header) 11971 } 11972 return c.header_ 11973 } 11974 11975 func (c *ProjectsLocationsProcessorsGetCall) doRequest(alt string) (*http.Response, error) { 11976 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 11977 if c.ifNoneMatch_ != "" { 11978 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11979 } 11980 var body io.Reader = nil 11981 c.urlParams_.Set("alt", alt) 11982 c.urlParams_.Set("prettyPrint", "false") 11983 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 11984 urls += "?" + c.urlParams_.Encode() 11985 req, err := http.NewRequest("GET", urls, body) 11986 if err != nil { 11987 return nil, err 11988 } 11989 req.Header = reqHeaders 11990 googleapi.Expand(req.URL, map[string]string{ 11991 "name": c.name, 11992 }) 11993 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11994 } 11995 11996 // Do executes the "documentai.projects.locations.processors.get" call. 11997 // Any non-2xx status code is an error. Response headers are in either 11998 // *GoogleCloudDocumentaiV1Processor.ServerResponse.Header or (if a response 11999 // was returned at all) in error.(*googleapi.Error).Header. Use 12000 // googleapi.IsNotModified to check whether the returned error was because 12001 // http.StatusNotModified was returned. 12002 func (c *ProjectsLocationsProcessorsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1Processor, error) { 12003 gensupport.SetOptions(c.urlParams_, opts...) 12004 res, err := c.doRequest("json") 12005 if res != nil && res.StatusCode == http.StatusNotModified { 12006 if res.Body != nil { 12007 res.Body.Close() 12008 } 12009 return nil, gensupport.WrapError(&googleapi.Error{ 12010 Code: res.StatusCode, 12011 Header: res.Header, 12012 }) 12013 } 12014 if err != nil { 12015 return nil, err 12016 } 12017 defer googleapi.CloseBody(res) 12018 if err := googleapi.CheckResponse(res); err != nil { 12019 return nil, gensupport.WrapError(err) 12020 } 12021 ret := &GoogleCloudDocumentaiV1Processor{ 12022 ServerResponse: googleapi.ServerResponse{ 12023 Header: res.Header, 12024 HTTPStatusCode: res.StatusCode, 12025 }, 12026 } 12027 target := &ret 12028 if err := gensupport.DecodeResponse(target, res); err != nil { 12029 return nil, err 12030 } 12031 return ret, nil 12032 } 12033 12034 type ProjectsLocationsProcessorsListCall struct { 12035 s *Service 12036 parent string 12037 urlParams_ gensupport.URLParams 12038 ifNoneMatch_ string 12039 ctx_ context.Context 12040 header_ http.Header 12041 } 12042 12043 // List: Lists all processors which belong to this project. 12044 // 12045 // - parent: The parent (project and location) which owns this collection of 12046 // Processors. Format: `projects/{project}/locations/{location}`. 12047 func (r *ProjectsLocationsProcessorsService) List(parent string) *ProjectsLocationsProcessorsListCall { 12048 c := &ProjectsLocationsProcessorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12049 c.parent = parent 12050 return c 12051 } 12052 12053 // PageSize sets the optional parameter "pageSize": The maximum number of 12054 // processors to return. If unspecified, at most `50` processors will be 12055 // returned. The maximum value is `100`. Values above `100` will be coerced to 12056 // `100`. 12057 func (c *ProjectsLocationsProcessorsListCall) PageSize(pageSize int64) *ProjectsLocationsProcessorsListCall { 12058 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 12059 return c 12060 } 12061 12062 // PageToken sets the optional parameter "pageToken": We will return the 12063 // processors sorted by creation time. The page token will point to the next 12064 // processor. 12065 func (c *ProjectsLocationsProcessorsListCall) PageToken(pageToken string) *ProjectsLocationsProcessorsListCall { 12066 c.urlParams_.Set("pageToken", pageToken) 12067 return c 12068 } 12069 12070 // Fields allows partial responses to be retrieved. See 12071 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12072 // details. 12073 func (c *ProjectsLocationsProcessorsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsListCall { 12074 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12075 return c 12076 } 12077 12078 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12079 // object's ETag matches the given value. This is useful for getting updates 12080 // only after the object has changed since the last request. 12081 func (c *ProjectsLocationsProcessorsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProcessorsListCall { 12082 c.ifNoneMatch_ = entityTag 12083 return c 12084 } 12085 12086 // Context sets the context to be used in this call's Do method. 12087 func (c *ProjectsLocationsProcessorsListCall) Context(ctx context.Context) *ProjectsLocationsProcessorsListCall { 12088 c.ctx_ = ctx 12089 return c 12090 } 12091 12092 // Header returns a http.Header that can be modified by the caller to add 12093 // headers to the request. 12094 func (c *ProjectsLocationsProcessorsListCall) Header() http.Header { 12095 if c.header_ == nil { 12096 c.header_ = make(http.Header) 12097 } 12098 return c.header_ 12099 } 12100 12101 func (c *ProjectsLocationsProcessorsListCall) doRequest(alt string) (*http.Response, error) { 12102 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12103 if c.ifNoneMatch_ != "" { 12104 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12105 } 12106 var body io.Reader = nil 12107 c.urlParams_.Set("alt", alt) 12108 c.urlParams_.Set("prettyPrint", "false") 12109 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/processors") 12110 urls += "?" + c.urlParams_.Encode() 12111 req, err := http.NewRequest("GET", urls, body) 12112 if err != nil { 12113 return nil, err 12114 } 12115 req.Header = reqHeaders 12116 googleapi.Expand(req.URL, map[string]string{ 12117 "parent": c.parent, 12118 }) 12119 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12120 } 12121 12122 // Do executes the "documentai.projects.locations.processors.list" call. 12123 // Any non-2xx status code is an error. Response headers are in either 12124 // *GoogleCloudDocumentaiV1ListProcessorsResponse.ServerResponse.Header or (if 12125 // a response was returned at all) in error.(*googleapi.Error).Header. Use 12126 // googleapi.IsNotModified to check whether the returned error was because 12127 // http.StatusNotModified was returned. 12128 func (c *ProjectsLocationsProcessorsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1ListProcessorsResponse, error) { 12129 gensupport.SetOptions(c.urlParams_, opts...) 12130 res, err := c.doRequest("json") 12131 if res != nil && res.StatusCode == http.StatusNotModified { 12132 if res.Body != nil { 12133 res.Body.Close() 12134 } 12135 return nil, gensupport.WrapError(&googleapi.Error{ 12136 Code: res.StatusCode, 12137 Header: res.Header, 12138 }) 12139 } 12140 if err != nil { 12141 return nil, err 12142 } 12143 defer googleapi.CloseBody(res) 12144 if err := googleapi.CheckResponse(res); err != nil { 12145 return nil, gensupport.WrapError(err) 12146 } 12147 ret := &GoogleCloudDocumentaiV1ListProcessorsResponse{ 12148 ServerResponse: googleapi.ServerResponse{ 12149 Header: res.Header, 12150 HTTPStatusCode: res.StatusCode, 12151 }, 12152 } 12153 target := &ret 12154 if err := gensupport.DecodeResponse(target, res); err != nil { 12155 return nil, err 12156 } 12157 return ret, nil 12158 } 12159 12160 // Pages invokes f for each page of results. 12161 // A non-nil error returned from f will halt the iteration. 12162 // The provided context supersedes any context provided to the Context method. 12163 func (c *ProjectsLocationsProcessorsListCall) Pages(ctx context.Context, f func(*GoogleCloudDocumentaiV1ListProcessorsResponse) error) error { 12164 c.ctx_ = ctx 12165 defer c.PageToken(c.urlParams_.Get("pageToken")) 12166 for { 12167 x, err := c.Do() 12168 if err != nil { 12169 return err 12170 } 12171 if err := f(x); err != nil { 12172 return err 12173 } 12174 if x.NextPageToken == "" { 12175 return nil 12176 } 12177 c.PageToken(x.NextPageToken) 12178 } 12179 } 12180 12181 type ProjectsLocationsProcessorsProcessCall struct { 12182 s *Service 12183 name string 12184 googleclouddocumentaiv1processrequest *GoogleCloudDocumentaiV1ProcessRequest 12185 urlParams_ gensupport.URLParams 12186 ctx_ context.Context 12187 header_ http.Header 12188 } 12189 12190 // Process: Processes a single document. 12191 // 12192 // - name: The resource name of the Processor or ProcessorVersion to use for 12193 // processing. If a Processor is specified, the server will use its default 12194 // version. Format: 12195 // `projects/{project}/locations/{location}/processors/{processor}`, or 12196 // `projects/{project}/locations/{location}/processors/{processor}/processorVe 12197 // rsions/{processorVersion}`. 12198 func (r *ProjectsLocationsProcessorsService) Process(name string, googleclouddocumentaiv1processrequest *GoogleCloudDocumentaiV1ProcessRequest) *ProjectsLocationsProcessorsProcessCall { 12199 c := &ProjectsLocationsProcessorsProcessCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12200 c.name = name 12201 c.googleclouddocumentaiv1processrequest = googleclouddocumentaiv1processrequest 12202 return c 12203 } 12204 12205 // Fields allows partial responses to be retrieved. See 12206 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12207 // details. 12208 func (c *ProjectsLocationsProcessorsProcessCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsProcessCall { 12209 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12210 return c 12211 } 12212 12213 // Context sets the context to be used in this call's Do method. 12214 func (c *ProjectsLocationsProcessorsProcessCall) Context(ctx context.Context) *ProjectsLocationsProcessorsProcessCall { 12215 c.ctx_ = ctx 12216 return c 12217 } 12218 12219 // Header returns a http.Header that can be modified by the caller to add 12220 // headers to the request. 12221 func (c *ProjectsLocationsProcessorsProcessCall) Header() http.Header { 12222 if c.header_ == nil { 12223 c.header_ = make(http.Header) 12224 } 12225 return c.header_ 12226 } 12227 12228 func (c *ProjectsLocationsProcessorsProcessCall) doRequest(alt string) (*http.Response, error) { 12229 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12230 var body io.Reader = nil 12231 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1processrequest) 12232 if err != nil { 12233 return nil, err 12234 } 12235 c.urlParams_.Set("alt", alt) 12236 c.urlParams_.Set("prettyPrint", "false") 12237 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:process") 12238 urls += "?" + c.urlParams_.Encode() 12239 req, err := http.NewRequest("POST", urls, body) 12240 if err != nil { 12241 return nil, err 12242 } 12243 req.Header = reqHeaders 12244 googleapi.Expand(req.URL, map[string]string{ 12245 "name": c.name, 12246 }) 12247 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12248 } 12249 12250 // Do executes the "documentai.projects.locations.processors.process" call. 12251 // Any non-2xx status code is an error. Response headers are in either 12252 // *GoogleCloudDocumentaiV1ProcessResponse.ServerResponse.Header or (if a 12253 // response was returned at all) in error.(*googleapi.Error).Header. Use 12254 // googleapi.IsNotModified to check whether the returned error was because 12255 // http.StatusNotModified was returned. 12256 func (c *ProjectsLocationsProcessorsProcessCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1ProcessResponse, error) { 12257 gensupport.SetOptions(c.urlParams_, opts...) 12258 res, err := c.doRequest("json") 12259 if res != nil && res.StatusCode == http.StatusNotModified { 12260 if res.Body != nil { 12261 res.Body.Close() 12262 } 12263 return nil, gensupport.WrapError(&googleapi.Error{ 12264 Code: res.StatusCode, 12265 Header: res.Header, 12266 }) 12267 } 12268 if err != nil { 12269 return nil, err 12270 } 12271 defer googleapi.CloseBody(res) 12272 if err := googleapi.CheckResponse(res); err != nil { 12273 return nil, gensupport.WrapError(err) 12274 } 12275 ret := &GoogleCloudDocumentaiV1ProcessResponse{ 12276 ServerResponse: googleapi.ServerResponse{ 12277 Header: res.Header, 12278 HTTPStatusCode: res.StatusCode, 12279 }, 12280 } 12281 target := &ret 12282 if err := gensupport.DecodeResponse(target, res); err != nil { 12283 return nil, err 12284 } 12285 return ret, nil 12286 } 12287 12288 type ProjectsLocationsProcessorsSetDefaultProcessorVersionCall struct { 12289 s *Service 12290 processor string 12291 googleclouddocumentaiv1setdefaultprocessorversionrequest *GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest 12292 urlParams_ gensupport.URLParams 12293 ctx_ context.Context 12294 header_ http.Header 12295 } 12296 12297 // SetDefaultProcessorVersion: Set the default (active) version of a Processor 12298 // that will be used in ProcessDocument and BatchProcessDocuments. 12299 // 12300 // - processor: The resource name of the Processor to change default version. 12301 func (r *ProjectsLocationsProcessorsService) SetDefaultProcessorVersion(processor string, googleclouddocumentaiv1setdefaultprocessorversionrequest *GoogleCloudDocumentaiV1SetDefaultProcessorVersionRequest) *ProjectsLocationsProcessorsSetDefaultProcessorVersionCall { 12302 c := &ProjectsLocationsProcessorsSetDefaultProcessorVersionCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12303 c.processor = processor 12304 c.googleclouddocumentaiv1setdefaultprocessorversionrequest = googleclouddocumentaiv1setdefaultprocessorversionrequest 12305 return c 12306 } 12307 12308 // Fields allows partial responses to be retrieved. See 12309 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12310 // details. 12311 func (c *ProjectsLocationsProcessorsSetDefaultProcessorVersionCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsSetDefaultProcessorVersionCall { 12312 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12313 return c 12314 } 12315 12316 // Context sets the context to be used in this call's Do method. 12317 func (c *ProjectsLocationsProcessorsSetDefaultProcessorVersionCall) Context(ctx context.Context) *ProjectsLocationsProcessorsSetDefaultProcessorVersionCall { 12318 c.ctx_ = ctx 12319 return c 12320 } 12321 12322 // Header returns a http.Header that can be modified by the caller to add 12323 // headers to the request. 12324 func (c *ProjectsLocationsProcessorsSetDefaultProcessorVersionCall) Header() http.Header { 12325 if c.header_ == nil { 12326 c.header_ = make(http.Header) 12327 } 12328 return c.header_ 12329 } 12330 12331 func (c *ProjectsLocationsProcessorsSetDefaultProcessorVersionCall) doRequest(alt string) (*http.Response, error) { 12332 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12333 var body io.Reader = nil 12334 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1setdefaultprocessorversionrequest) 12335 if err != nil { 12336 return nil, err 12337 } 12338 c.urlParams_.Set("alt", alt) 12339 c.urlParams_.Set("prettyPrint", "false") 12340 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+processor}:setDefaultProcessorVersion") 12341 urls += "?" + c.urlParams_.Encode() 12342 req, err := http.NewRequest("POST", urls, body) 12343 if err != nil { 12344 return nil, err 12345 } 12346 req.Header = reqHeaders 12347 googleapi.Expand(req.URL, map[string]string{ 12348 "processor": c.processor, 12349 }) 12350 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12351 } 12352 12353 // Do executes the "documentai.projects.locations.processors.setDefaultProcessorVersion" call. 12354 // Any non-2xx status code is an error. Response headers are in either 12355 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 12356 // returned at all) in error.(*googleapi.Error).Header. Use 12357 // googleapi.IsNotModified to check whether the returned error was because 12358 // http.StatusNotModified was returned. 12359 func (c *ProjectsLocationsProcessorsSetDefaultProcessorVersionCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 12360 gensupport.SetOptions(c.urlParams_, opts...) 12361 res, err := c.doRequest("json") 12362 if res != nil && res.StatusCode == http.StatusNotModified { 12363 if res.Body != nil { 12364 res.Body.Close() 12365 } 12366 return nil, gensupport.WrapError(&googleapi.Error{ 12367 Code: res.StatusCode, 12368 Header: res.Header, 12369 }) 12370 } 12371 if err != nil { 12372 return nil, err 12373 } 12374 defer googleapi.CloseBody(res) 12375 if err := googleapi.CheckResponse(res); err != nil { 12376 return nil, gensupport.WrapError(err) 12377 } 12378 ret := &GoogleLongrunningOperation{ 12379 ServerResponse: googleapi.ServerResponse{ 12380 Header: res.Header, 12381 HTTPStatusCode: res.StatusCode, 12382 }, 12383 } 12384 target := &ret 12385 if err := gensupport.DecodeResponse(target, res); err != nil { 12386 return nil, err 12387 } 12388 return ret, nil 12389 } 12390 12391 type ProjectsLocationsProcessorsHumanReviewConfigReviewDocumentCall struct { 12392 s *Service 12393 humanReviewConfig string 12394 googleclouddocumentaiv1reviewdocumentrequest *GoogleCloudDocumentaiV1ReviewDocumentRequest 12395 urlParams_ gensupport.URLParams 12396 ctx_ context.Context 12397 header_ http.Header 12398 } 12399 12400 // ReviewDocument: Send a document for Human Review. The input document should 12401 // be processed by the specified processor. 12402 // 12403 // - humanReviewConfig: The resource name of the HumanReviewConfig that the 12404 // document will be reviewed with. 12405 func (r *ProjectsLocationsProcessorsHumanReviewConfigService) ReviewDocument(humanReviewConfig string, googleclouddocumentaiv1reviewdocumentrequest *GoogleCloudDocumentaiV1ReviewDocumentRequest) *ProjectsLocationsProcessorsHumanReviewConfigReviewDocumentCall { 12406 c := &ProjectsLocationsProcessorsHumanReviewConfigReviewDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12407 c.humanReviewConfig = humanReviewConfig 12408 c.googleclouddocumentaiv1reviewdocumentrequest = googleclouddocumentaiv1reviewdocumentrequest 12409 return c 12410 } 12411 12412 // Fields allows partial responses to be retrieved. See 12413 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12414 // details. 12415 func (c *ProjectsLocationsProcessorsHumanReviewConfigReviewDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsHumanReviewConfigReviewDocumentCall { 12416 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12417 return c 12418 } 12419 12420 // Context sets the context to be used in this call's Do method. 12421 func (c *ProjectsLocationsProcessorsHumanReviewConfigReviewDocumentCall) Context(ctx context.Context) *ProjectsLocationsProcessorsHumanReviewConfigReviewDocumentCall { 12422 c.ctx_ = ctx 12423 return c 12424 } 12425 12426 // Header returns a http.Header that can be modified by the caller to add 12427 // headers to the request. 12428 func (c *ProjectsLocationsProcessorsHumanReviewConfigReviewDocumentCall) Header() http.Header { 12429 if c.header_ == nil { 12430 c.header_ = make(http.Header) 12431 } 12432 return c.header_ 12433 } 12434 12435 func (c *ProjectsLocationsProcessorsHumanReviewConfigReviewDocumentCall) doRequest(alt string) (*http.Response, error) { 12436 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12437 var body io.Reader = nil 12438 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1reviewdocumentrequest) 12439 if err != nil { 12440 return nil, err 12441 } 12442 c.urlParams_.Set("alt", alt) 12443 c.urlParams_.Set("prettyPrint", "false") 12444 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+humanReviewConfig}:reviewDocument") 12445 urls += "?" + c.urlParams_.Encode() 12446 req, err := http.NewRequest("POST", urls, body) 12447 if err != nil { 12448 return nil, err 12449 } 12450 req.Header = reqHeaders 12451 googleapi.Expand(req.URL, map[string]string{ 12452 "humanReviewConfig": c.humanReviewConfig, 12453 }) 12454 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12455 } 12456 12457 // Do executes the "documentai.projects.locations.processors.humanReviewConfig.reviewDocument" call. 12458 // Any non-2xx status code is an error. Response headers are in either 12459 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 12460 // returned at all) in error.(*googleapi.Error).Header. Use 12461 // googleapi.IsNotModified to check whether the returned error was because 12462 // http.StatusNotModified was returned. 12463 func (c *ProjectsLocationsProcessorsHumanReviewConfigReviewDocumentCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 12464 gensupport.SetOptions(c.urlParams_, opts...) 12465 res, err := c.doRequest("json") 12466 if res != nil && res.StatusCode == http.StatusNotModified { 12467 if res.Body != nil { 12468 res.Body.Close() 12469 } 12470 return nil, gensupport.WrapError(&googleapi.Error{ 12471 Code: res.StatusCode, 12472 Header: res.Header, 12473 }) 12474 } 12475 if err != nil { 12476 return nil, err 12477 } 12478 defer googleapi.CloseBody(res) 12479 if err := googleapi.CheckResponse(res); err != nil { 12480 return nil, gensupport.WrapError(err) 12481 } 12482 ret := &GoogleLongrunningOperation{ 12483 ServerResponse: googleapi.ServerResponse{ 12484 Header: res.Header, 12485 HTTPStatusCode: res.StatusCode, 12486 }, 12487 } 12488 target := &ret 12489 if err := gensupport.DecodeResponse(target, res); err != nil { 12490 return nil, err 12491 } 12492 return ret, nil 12493 } 12494 12495 type ProjectsLocationsProcessorsProcessorVersionsBatchProcessCall struct { 12496 s *Service 12497 name string 12498 googleclouddocumentaiv1batchprocessrequest *GoogleCloudDocumentaiV1BatchProcessRequest 12499 urlParams_ gensupport.URLParams 12500 ctx_ context.Context 12501 header_ http.Header 12502 } 12503 12504 // BatchProcess: LRO endpoint to batch process many documents. The output is 12505 // written to Cloud Storage as JSON in the [Document] format. 12506 // 12507 // - name: The resource name of Processor or ProcessorVersion. Format: 12508 // `projects/{project}/locations/{location}/processors/{processor}`, or 12509 // `projects/{project}/locations/{location}/processors/{processor}/processorVe 12510 // rsions/{processorVersion}`. 12511 func (r *ProjectsLocationsProcessorsProcessorVersionsService) BatchProcess(name string, googleclouddocumentaiv1batchprocessrequest *GoogleCloudDocumentaiV1BatchProcessRequest) *ProjectsLocationsProcessorsProcessorVersionsBatchProcessCall { 12512 c := &ProjectsLocationsProcessorsProcessorVersionsBatchProcessCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12513 c.name = name 12514 c.googleclouddocumentaiv1batchprocessrequest = googleclouddocumentaiv1batchprocessrequest 12515 return c 12516 } 12517 12518 // Fields allows partial responses to be retrieved. See 12519 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12520 // details. 12521 func (c *ProjectsLocationsProcessorsProcessorVersionsBatchProcessCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsProcessorVersionsBatchProcessCall { 12522 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12523 return c 12524 } 12525 12526 // Context sets the context to be used in this call's Do method. 12527 func (c *ProjectsLocationsProcessorsProcessorVersionsBatchProcessCall) Context(ctx context.Context) *ProjectsLocationsProcessorsProcessorVersionsBatchProcessCall { 12528 c.ctx_ = ctx 12529 return c 12530 } 12531 12532 // Header returns a http.Header that can be modified by the caller to add 12533 // headers to the request. 12534 func (c *ProjectsLocationsProcessorsProcessorVersionsBatchProcessCall) Header() http.Header { 12535 if c.header_ == nil { 12536 c.header_ = make(http.Header) 12537 } 12538 return c.header_ 12539 } 12540 12541 func (c *ProjectsLocationsProcessorsProcessorVersionsBatchProcessCall) doRequest(alt string) (*http.Response, error) { 12542 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12543 var body io.Reader = nil 12544 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1batchprocessrequest) 12545 if err != nil { 12546 return nil, err 12547 } 12548 c.urlParams_.Set("alt", alt) 12549 c.urlParams_.Set("prettyPrint", "false") 12550 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:batchProcess") 12551 urls += "?" + c.urlParams_.Encode() 12552 req, err := http.NewRequest("POST", urls, body) 12553 if err != nil { 12554 return nil, err 12555 } 12556 req.Header = reqHeaders 12557 googleapi.Expand(req.URL, map[string]string{ 12558 "name": c.name, 12559 }) 12560 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12561 } 12562 12563 // Do executes the "documentai.projects.locations.processors.processorVersions.batchProcess" call. 12564 // Any non-2xx status code is an error. Response headers are in either 12565 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 12566 // returned at all) in error.(*googleapi.Error).Header. Use 12567 // googleapi.IsNotModified to check whether the returned error was because 12568 // http.StatusNotModified was returned. 12569 func (c *ProjectsLocationsProcessorsProcessorVersionsBatchProcessCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 12570 gensupport.SetOptions(c.urlParams_, opts...) 12571 res, err := c.doRequest("json") 12572 if res != nil && res.StatusCode == http.StatusNotModified { 12573 if res.Body != nil { 12574 res.Body.Close() 12575 } 12576 return nil, gensupport.WrapError(&googleapi.Error{ 12577 Code: res.StatusCode, 12578 Header: res.Header, 12579 }) 12580 } 12581 if err != nil { 12582 return nil, err 12583 } 12584 defer googleapi.CloseBody(res) 12585 if err := googleapi.CheckResponse(res); err != nil { 12586 return nil, gensupport.WrapError(err) 12587 } 12588 ret := &GoogleLongrunningOperation{ 12589 ServerResponse: googleapi.ServerResponse{ 12590 Header: res.Header, 12591 HTTPStatusCode: res.StatusCode, 12592 }, 12593 } 12594 target := &ret 12595 if err := gensupport.DecodeResponse(target, res); err != nil { 12596 return nil, err 12597 } 12598 return ret, nil 12599 } 12600 12601 type ProjectsLocationsProcessorsProcessorVersionsDeleteCall struct { 12602 s *Service 12603 name string 12604 urlParams_ gensupport.URLParams 12605 ctx_ context.Context 12606 header_ http.Header 12607 } 12608 12609 // Delete: Deletes the processor version, all artifacts under the processor 12610 // version will be deleted. 12611 // 12612 // - name: The processor version resource name to be deleted. 12613 func (r *ProjectsLocationsProcessorsProcessorVersionsService) Delete(name string) *ProjectsLocationsProcessorsProcessorVersionsDeleteCall { 12614 c := &ProjectsLocationsProcessorsProcessorVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12615 c.name = name 12616 return c 12617 } 12618 12619 // Fields allows partial responses to be retrieved. See 12620 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12621 // details. 12622 func (c *ProjectsLocationsProcessorsProcessorVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsProcessorVersionsDeleteCall { 12623 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12624 return c 12625 } 12626 12627 // Context sets the context to be used in this call's Do method. 12628 func (c *ProjectsLocationsProcessorsProcessorVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsProcessorsProcessorVersionsDeleteCall { 12629 c.ctx_ = ctx 12630 return c 12631 } 12632 12633 // Header returns a http.Header that can be modified by the caller to add 12634 // headers to the request. 12635 func (c *ProjectsLocationsProcessorsProcessorVersionsDeleteCall) Header() http.Header { 12636 if c.header_ == nil { 12637 c.header_ = make(http.Header) 12638 } 12639 return c.header_ 12640 } 12641 12642 func (c *ProjectsLocationsProcessorsProcessorVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { 12643 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12644 var body io.Reader = nil 12645 c.urlParams_.Set("alt", alt) 12646 c.urlParams_.Set("prettyPrint", "false") 12647 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 12648 urls += "?" + c.urlParams_.Encode() 12649 req, err := http.NewRequest("DELETE", urls, body) 12650 if err != nil { 12651 return nil, err 12652 } 12653 req.Header = reqHeaders 12654 googleapi.Expand(req.URL, map[string]string{ 12655 "name": c.name, 12656 }) 12657 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12658 } 12659 12660 // Do executes the "documentai.projects.locations.processors.processorVersions.delete" call. 12661 // Any non-2xx status code is an error. Response headers are in either 12662 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 12663 // returned at all) in error.(*googleapi.Error).Header. Use 12664 // googleapi.IsNotModified to check whether the returned error was because 12665 // http.StatusNotModified was returned. 12666 func (c *ProjectsLocationsProcessorsProcessorVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 12667 gensupport.SetOptions(c.urlParams_, opts...) 12668 res, err := c.doRequest("json") 12669 if res != nil && res.StatusCode == http.StatusNotModified { 12670 if res.Body != nil { 12671 res.Body.Close() 12672 } 12673 return nil, gensupport.WrapError(&googleapi.Error{ 12674 Code: res.StatusCode, 12675 Header: res.Header, 12676 }) 12677 } 12678 if err != nil { 12679 return nil, err 12680 } 12681 defer googleapi.CloseBody(res) 12682 if err := googleapi.CheckResponse(res); err != nil { 12683 return nil, gensupport.WrapError(err) 12684 } 12685 ret := &GoogleLongrunningOperation{ 12686 ServerResponse: googleapi.ServerResponse{ 12687 Header: res.Header, 12688 HTTPStatusCode: res.StatusCode, 12689 }, 12690 } 12691 target := &ret 12692 if err := gensupport.DecodeResponse(target, res); err != nil { 12693 return nil, err 12694 } 12695 return ret, nil 12696 } 12697 12698 type ProjectsLocationsProcessorsProcessorVersionsDeployCall struct { 12699 s *Service 12700 name string 12701 googleclouddocumentaiv1deployprocessorversionrequest *GoogleCloudDocumentaiV1DeployProcessorVersionRequest 12702 urlParams_ gensupport.URLParams 12703 ctx_ context.Context 12704 header_ http.Header 12705 } 12706 12707 // Deploy: Deploys the processor version. 12708 // 12709 // - name: The processor version resource name to be deployed. 12710 func (r *ProjectsLocationsProcessorsProcessorVersionsService) Deploy(name string, googleclouddocumentaiv1deployprocessorversionrequest *GoogleCloudDocumentaiV1DeployProcessorVersionRequest) *ProjectsLocationsProcessorsProcessorVersionsDeployCall { 12711 c := &ProjectsLocationsProcessorsProcessorVersionsDeployCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12712 c.name = name 12713 c.googleclouddocumentaiv1deployprocessorversionrequest = googleclouddocumentaiv1deployprocessorversionrequest 12714 return c 12715 } 12716 12717 // Fields allows partial responses to be retrieved. See 12718 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12719 // details. 12720 func (c *ProjectsLocationsProcessorsProcessorVersionsDeployCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsProcessorVersionsDeployCall { 12721 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12722 return c 12723 } 12724 12725 // Context sets the context to be used in this call's Do method. 12726 func (c *ProjectsLocationsProcessorsProcessorVersionsDeployCall) Context(ctx context.Context) *ProjectsLocationsProcessorsProcessorVersionsDeployCall { 12727 c.ctx_ = ctx 12728 return c 12729 } 12730 12731 // Header returns a http.Header that can be modified by the caller to add 12732 // headers to the request. 12733 func (c *ProjectsLocationsProcessorsProcessorVersionsDeployCall) Header() http.Header { 12734 if c.header_ == nil { 12735 c.header_ = make(http.Header) 12736 } 12737 return c.header_ 12738 } 12739 12740 func (c *ProjectsLocationsProcessorsProcessorVersionsDeployCall) doRequest(alt string) (*http.Response, error) { 12741 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12742 var body io.Reader = nil 12743 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1deployprocessorversionrequest) 12744 if err != nil { 12745 return nil, err 12746 } 12747 c.urlParams_.Set("alt", alt) 12748 c.urlParams_.Set("prettyPrint", "false") 12749 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deploy") 12750 urls += "?" + c.urlParams_.Encode() 12751 req, err := http.NewRequest("POST", urls, body) 12752 if err != nil { 12753 return nil, err 12754 } 12755 req.Header = reqHeaders 12756 googleapi.Expand(req.URL, map[string]string{ 12757 "name": c.name, 12758 }) 12759 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12760 } 12761 12762 // Do executes the "documentai.projects.locations.processors.processorVersions.deploy" call. 12763 // Any non-2xx status code is an error. Response headers are in either 12764 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 12765 // returned at all) in error.(*googleapi.Error).Header. Use 12766 // googleapi.IsNotModified to check whether the returned error was because 12767 // http.StatusNotModified was returned. 12768 func (c *ProjectsLocationsProcessorsProcessorVersionsDeployCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 12769 gensupport.SetOptions(c.urlParams_, opts...) 12770 res, err := c.doRequest("json") 12771 if res != nil && res.StatusCode == http.StatusNotModified { 12772 if res.Body != nil { 12773 res.Body.Close() 12774 } 12775 return nil, gensupport.WrapError(&googleapi.Error{ 12776 Code: res.StatusCode, 12777 Header: res.Header, 12778 }) 12779 } 12780 if err != nil { 12781 return nil, err 12782 } 12783 defer googleapi.CloseBody(res) 12784 if err := googleapi.CheckResponse(res); err != nil { 12785 return nil, gensupport.WrapError(err) 12786 } 12787 ret := &GoogleLongrunningOperation{ 12788 ServerResponse: googleapi.ServerResponse{ 12789 Header: res.Header, 12790 HTTPStatusCode: res.StatusCode, 12791 }, 12792 } 12793 target := &ret 12794 if err := gensupport.DecodeResponse(target, res); err != nil { 12795 return nil, err 12796 } 12797 return ret, nil 12798 } 12799 12800 type ProjectsLocationsProcessorsProcessorVersionsEvaluateProcessorVersionCall struct { 12801 s *Service 12802 processorVersion string 12803 googleclouddocumentaiv1evaluateprocessorversionrequest *GoogleCloudDocumentaiV1EvaluateProcessorVersionRequest 12804 urlParams_ gensupport.URLParams 12805 ctx_ context.Context 12806 header_ http.Header 12807 } 12808 12809 // EvaluateProcessorVersion: Evaluates a ProcessorVersion against annotated 12810 // documents, producing an Evaluation. 12811 // 12812 // - processorVersion: The resource name of the ProcessorVersion to evaluate. 12813 // `projects/{project}/locations/{location}/processors/{processor}/processorVe 12814 // rsions/{processorVersion}`. 12815 func (r *ProjectsLocationsProcessorsProcessorVersionsService) EvaluateProcessorVersion(processorVersion string, googleclouddocumentaiv1evaluateprocessorversionrequest *GoogleCloudDocumentaiV1EvaluateProcessorVersionRequest) *ProjectsLocationsProcessorsProcessorVersionsEvaluateProcessorVersionCall { 12816 c := &ProjectsLocationsProcessorsProcessorVersionsEvaluateProcessorVersionCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12817 c.processorVersion = processorVersion 12818 c.googleclouddocumentaiv1evaluateprocessorversionrequest = googleclouddocumentaiv1evaluateprocessorversionrequest 12819 return c 12820 } 12821 12822 // Fields allows partial responses to be retrieved. See 12823 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12824 // details. 12825 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluateProcessorVersionCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsProcessorVersionsEvaluateProcessorVersionCall { 12826 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12827 return c 12828 } 12829 12830 // Context sets the context to be used in this call's Do method. 12831 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluateProcessorVersionCall) Context(ctx context.Context) *ProjectsLocationsProcessorsProcessorVersionsEvaluateProcessorVersionCall { 12832 c.ctx_ = ctx 12833 return c 12834 } 12835 12836 // Header returns a http.Header that can be modified by the caller to add 12837 // headers to the request. 12838 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluateProcessorVersionCall) Header() http.Header { 12839 if c.header_ == nil { 12840 c.header_ = make(http.Header) 12841 } 12842 return c.header_ 12843 } 12844 12845 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluateProcessorVersionCall) doRequest(alt string) (*http.Response, error) { 12846 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 12847 var body io.Reader = nil 12848 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1evaluateprocessorversionrequest) 12849 if err != nil { 12850 return nil, err 12851 } 12852 c.urlParams_.Set("alt", alt) 12853 c.urlParams_.Set("prettyPrint", "false") 12854 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+processorVersion}:evaluateProcessorVersion") 12855 urls += "?" + c.urlParams_.Encode() 12856 req, err := http.NewRequest("POST", urls, body) 12857 if err != nil { 12858 return nil, err 12859 } 12860 req.Header = reqHeaders 12861 googleapi.Expand(req.URL, map[string]string{ 12862 "processorVersion": c.processorVersion, 12863 }) 12864 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12865 } 12866 12867 // Do executes the "documentai.projects.locations.processors.processorVersions.evaluateProcessorVersion" call. 12868 // Any non-2xx status code is an error. Response headers are in either 12869 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 12870 // returned at all) in error.(*googleapi.Error).Header. Use 12871 // googleapi.IsNotModified to check whether the returned error was because 12872 // http.StatusNotModified was returned. 12873 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluateProcessorVersionCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 12874 gensupport.SetOptions(c.urlParams_, opts...) 12875 res, err := c.doRequest("json") 12876 if res != nil && res.StatusCode == http.StatusNotModified { 12877 if res.Body != nil { 12878 res.Body.Close() 12879 } 12880 return nil, gensupport.WrapError(&googleapi.Error{ 12881 Code: res.StatusCode, 12882 Header: res.Header, 12883 }) 12884 } 12885 if err != nil { 12886 return nil, err 12887 } 12888 defer googleapi.CloseBody(res) 12889 if err := googleapi.CheckResponse(res); err != nil { 12890 return nil, gensupport.WrapError(err) 12891 } 12892 ret := &GoogleLongrunningOperation{ 12893 ServerResponse: googleapi.ServerResponse{ 12894 Header: res.Header, 12895 HTTPStatusCode: res.StatusCode, 12896 }, 12897 } 12898 target := &ret 12899 if err := gensupport.DecodeResponse(target, res); err != nil { 12900 return nil, err 12901 } 12902 return ret, nil 12903 } 12904 12905 type ProjectsLocationsProcessorsProcessorVersionsGetCall struct { 12906 s *Service 12907 name string 12908 urlParams_ gensupport.URLParams 12909 ifNoneMatch_ string 12910 ctx_ context.Context 12911 header_ http.Header 12912 } 12913 12914 // Get: Gets a processor version detail. 12915 // 12916 // - name: The processor resource name. 12917 func (r *ProjectsLocationsProcessorsProcessorVersionsService) Get(name string) *ProjectsLocationsProcessorsProcessorVersionsGetCall { 12918 c := &ProjectsLocationsProcessorsProcessorVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12919 c.name = name 12920 return c 12921 } 12922 12923 // Fields allows partial responses to be retrieved. See 12924 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 12925 // details. 12926 func (c *ProjectsLocationsProcessorsProcessorVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsProcessorVersionsGetCall { 12927 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12928 return c 12929 } 12930 12931 // IfNoneMatch sets an optional parameter which makes the operation fail if the 12932 // object's ETag matches the given value. This is useful for getting updates 12933 // only after the object has changed since the last request. 12934 func (c *ProjectsLocationsProcessorsProcessorVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsProcessorsProcessorVersionsGetCall { 12935 c.ifNoneMatch_ = entityTag 12936 return c 12937 } 12938 12939 // Context sets the context to be used in this call's Do method. 12940 func (c *ProjectsLocationsProcessorsProcessorVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsProcessorsProcessorVersionsGetCall { 12941 c.ctx_ = ctx 12942 return c 12943 } 12944 12945 // Header returns a http.Header that can be modified by the caller to add 12946 // headers to the request. 12947 func (c *ProjectsLocationsProcessorsProcessorVersionsGetCall) Header() http.Header { 12948 if c.header_ == nil { 12949 c.header_ = make(http.Header) 12950 } 12951 return c.header_ 12952 } 12953 12954 func (c *ProjectsLocationsProcessorsProcessorVersionsGetCall) doRequest(alt string) (*http.Response, error) { 12955 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 12956 if c.ifNoneMatch_ != "" { 12957 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12958 } 12959 var body io.Reader = nil 12960 c.urlParams_.Set("alt", alt) 12961 c.urlParams_.Set("prettyPrint", "false") 12962 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 12963 urls += "?" + c.urlParams_.Encode() 12964 req, err := http.NewRequest("GET", urls, body) 12965 if err != nil { 12966 return nil, err 12967 } 12968 req.Header = reqHeaders 12969 googleapi.Expand(req.URL, map[string]string{ 12970 "name": c.name, 12971 }) 12972 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12973 } 12974 12975 // Do executes the "documentai.projects.locations.processors.processorVersions.get" call. 12976 // Any non-2xx status code is an error. Response headers are in either 12977 // *GoogleCloudDocumentaiV1ProcessorVersion.ServerResponse.Header or (if a 12978 // response was returned at all) in error.(*googleapi.Error).Header. Use 12979 // googleapi.IsNotModified to check whether the returned error was because 12980 // http.StatusNotModified was returned. 12981 func (c *ProjectsLocationsProcessorsProcessorVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1ProcessorVersion, error) { 12982 gensupport.SetOptions(c.urlParams_, opts...) 12983 res, err := c.doRequest("json") 12984 if res != nil && res.StatusCode == http.StatusNotModified { 12985 if res.Body != nil { 12986 res.Body.Close() 12987 } 12988 return nil, gensupport.WrapError(&googleapi.Error{ 12989 Code: res.StatusCode, 12990 Header: res.Header, 12991 }) 12992 } 12993 if err != nil { 12994 return nil, err 12995 } 12996 defer googleapi.CloseBody(res) 12997 if err := googleapi.CheckResponse(res); err != nil { 12998 return nil, gensupport.WrapError(err) 12999 } 13000 ret := &GoogleCloudDocumentaiV1ProcessorVersion{ 13001 ServerResponse: googleapi.ServerResponse{ 13002 Header: res.Header, 13003 HTTPStatusCode: res.StatusCode, 13004 }, 13005 } 13006 target := &ret 13007 if err := gensupport.DecodeResponse(target, res); err != nil { 13008 return nil, err 13009 } 13010 return ret, nil 13011 } 13012 13013 type ProjectsLocationsProcessorsProcessorVersionsListCall struct { 13014 s *Service 13015 parent string 13016 urlParams_ gensupport.URLParams 13017 ifNoneMatch_ string 13018 ctx_ context.Context 13019 header_ http.Header 13020 } 13021 13022 // List: Lists all versions of a processor. 13023 // 13024 // - parent: The parent (project, location and processor) to list all versions. 13025 // Format: `projects/{project}/locations/{location}/processors/{processor}`. 13026 func (r *ProjectsLocationsProcessorsProcessorVersionsService) List(parent string) *ProjectsLocationsProcessorsProcessorVersionsListCall { 13027 c := &ProjectsLocationsProcessorsProcessorVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13028 c.parent = parent 13029 return c 13030 } 13031 13032 // PageSize sets the optional parameter "pageSize": The maximum number of 13033 // processor versions to return. If unspecified, at most `10` processor 13034 // versions will be returned. The maximum value is `20`. Values above `20` will 13035 // be coerced to `20`. 13036 func (c *ProjectsLocationsProcessorsProcessorVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsProcessorsProcessorVersionsListCall { 13037 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13038 return c 13039 } 13040 13041 // PageToken sets the optional parameter "pageToken": We will return the 13042 // processor versions sorted by creation time. The page token will point to the 13043 // next processor version. 13044 func (c *ProjectsLocationsProcessorsProcessorVersionsListCall) PageToken(pageToken string) *ProjectsLocationsProcessorsProcessorVersionsListCall { 13045 c.urlParams_.Set("pageToken", pageToken) 13046 return c 13047 } 13048 13049 // Fields allows partial responses to be retrieved. See 13050 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13051 // details. 13052 func (c *ProjectsLocationsProcessorsProcessorVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsProcessorVersionsListCall { 13053 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13054 return c 13055 } 13056 13057 // IfNoneMatch sets an optional parameter which makes the operation fail if the 13058 // object's ETag matches the given value. This is useful for getting updates 13059 // only after the object has changed since the last request. 13060 func (c *ProjectsLocationsProcessorsProcessorVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProcessorsProcessorVersionsListCall { 13061 c.ifNoneMatch_ = entityTag 13062 return c 13063 } 13064 13065 // Context sets the context to be used in this call's Do method. 13066 func (c *ProjectsLocationsProcessorsProcessorVersionsListCall) Context(ctx context.Context) *ProjectsLocationsProcessorsProcessorVersionsListCall { 13067 c.ctx_ = ctx 13068 return c 13069 } 13070 13071 // Header returns a http.Header that can be modified by the caller to add 13072 // headers to the request. 13073 func (c *ProjectsLocationsProcessorsProcessorVersionsListCall) Header() http.Header { 13074 if c.header_ == nil { 13075 c.header_ = make(http.Header) 13076 } 13077 return c.header_ 13078 } 13079 13080 func (c *ProjectsLocationsProcessorsProcessorVersionsListCall) doRequest(alt string) (*http.Response, error) { 13081 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 13082 if c.ifNoneMatch_ != "" { 13083 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13084 } 13085 var body io.Reader = nil 13086 c.urlParams_.Set("alt", alt) 13087 c.urlParams_.Set("prettyPrint", "false") 13088 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/processorVersions") 13089 urls += "?" + c.urlParams_.Encode() 13090 req, err := http.NewRequest("GET", urls, body) 13091 if err != nil { 13092 return nil, err 13093 } 13094 req.Header = reqHeaders 13095 googleapi.Expand(req.URL, map[string]string{ 13096 "parent": c.parent, 13097 }) 13098 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13099 } 13100 13101 // Do executes the "documentai.projects.locations.processors.processorVersions.list" call. 13102 // Any non-2xx status code is an error. Response headers are in either 13103 // *GoogleCloudDocumentaiV1ListProcessorVersionsResponse.ServerResponse.Header 13104 // or (if a response was returned at all) in error.(*googleapi.Error).Header. 13105 // Use googleapi.IsNotModified to check whether the returned error was because 13106 // http.StatusNotModified was returned. 13107 func (c *ProjectsLocationsProcessorsProcessorVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1ListProcessorVersionsResponse, error) { 13108 gensupport.SetOptions(c.urlParams_, opts...) 13109 res, err := c.doRequest("json") 13110 if res != nil && res.StatusCode == http.StatusNotModified { 13111 if res.Body != nil { 13112 res.Body.Close() 13113 } 13114 return nil, gensupport.WrapError(&googleapi.Error{ 13115 Code: res.StatusCode, 13116 Header: res.Header, 13117 }) 13118 } 13119 if err != nil { 13120 return nil, err 13121 } 13122 defer googleapi.CloseBody(res) 13123 if err := googleapi.CheckResponse(res); err != nil { 13124 return nil, gensupport.WrapError(err) 13125 } 13126 ret := &GoogleCloudDocumentaiV1ListProcessorVersionsResponse{ 13127 ServerResponse: googleapi.ServerResponse{ 13128 Header: res.Header, 13129 HTTPStatusCode: res.StatusCode, 13130 }, 13131 } 13132 target := &ret 13133 if err := gensupport.DecodeResponse(target, res); err != nil { 13134 return nil, err 13135 } 13136 return ret, nil 13137 } 13138 13139 // Pages invokes f for each page of results. 13140 // A non-nil error returned from f will halt the iteration. 13141 // The provided context supersedes any context provided to the Context method. 13142 func (c *ProjectsLocationsProcessorsProcessorVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDocumentaiV1ListProcessorVersionsResponse) error) error { 13143 c.ctx_ = ctx 13144 defer c.PageToken(c.urlParams_.Get("pageToken")) 13145 for { 13146 x, err := c.Do() 13147 if err != nil { 13148 return err 13149 } 13150 if err := f(x); err != nil { 13151 return err 13152 } 13153 if x.NextPageToken == "" { 13154 return nil 13155 } 13156 c.PageToken(x.NextPageToken) 13157 } 13158 } 13159 13160 type ProjectsLocationsProcessorsProcessorVersionsProcessCall struct { 13161 s *Service 13162 name string 13163 googleclouddocumentaiv1processrequest *GoogleCloudDocumentaiV1ProcessRequest 13164 urlParams_ gensupport.URLParams 13165 ctx_ context.Context 13166 header_ http.Header 13167 } 13168 13169 // Process: Processes a single document. 13170 // 13171 // - name: The resource name of the Processor or ProcessorVersion to use for 13172 // processing. If a Processor is specified, the server will use its default 13173 // version. Format: 13174 // `projects/{project}/locations/{location}/processors/{processor}`, or 13175 // `projects/{project}/locations/{location}/processors/{processor}/processorVe 13176 // rsions/{processorVersion}`. 13177 func (r *ProjectsLocationsProcessorsProcessorVersionsService) Process(name string, googleclouddocumentaiv1processrequest *GoogleCloudDocumentaiV1ProcessRequest) *ProjectsLocationsProcessorsProcessorVersionsProcessCall { 13178 c := &ProjectsLocationsProcessorsProcessorVersionsProcessCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13179 c.name = name 13180 c.googleclouddocumentaiv1processrequest = googleclouddocumentaiv1processrequest 13181 return c 13182 } 13183 13184 // Fields allows partial responses to be retrieved. See 13185 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13186 // details. 13187 func (c *ProjectsLocationsProcessorsProcessorVersionsProcessCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsProcessorVersionsProcessCall { 13188 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13189 return c 13190 } 13191 13192 // Context sets the context to be used in this call's Do method. 13193 func (c *ProjectsLocationsProcessorsProcessorVersionsProcessCall) Context(ctx context.Context) *ProjectsLocationsProcessorsProcessorVersionsProcessCall { 13194 c.ctx_ = ctx 13195 return c 13196 } 13197 13198 // Header returns a http.Header that can be modified by the caller to add 13199 // headers to the request. 13200 func (c *ProjectsLocationsProcessorsProcessorVersionsProcessCall) Header() http.Header { 13201 if c.header_ == nil { 13202 c.header_ = make(http.Header) 13203 } 13204 return c.header_ 13205 } 13206 13207 func (c *ProjectsLocationsProcessorsProcessorVersionsProcessCall) doRequest(alt string) (*http.Response, error) { 13208 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13209 var body io.Reader = nil 13210 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1processrequest) 13211 if err != nil { 13212 return nil, err 13213 } 13214 c.urlParams_.Set("alt", alt) 13215 c.urlParams_.Set("prettyPrint", "false") 13216 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:process") 13217 urls += "?" + c.urlParams_.Encode() 13218 req, err := http.NewRequest("POST", urls, body) 13219 if err != nil { 13220 return nil, err 13221 } 13222 req.Header = reqHeaders 13223 googleapi.Expand(req.URL, map[string]string{ 13224 "name": c.name, 13225 }) 13226 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13227 } 13228 13229 // Do executes the "documentai.projects.locations.processors.processorVersions.process" call. 13230 // Any non-2xx status code is an error. Response headers are in either 13231 // *GoogleCloudDocumentaiV1ProcessResponse.ServerResponse.Header or (if a 13232 // response was returned at all) in error.(*googleapi.Error).Header. Use 13233 // googleapi.IsNotModified to check whether the returned error was because 13234 // http.StatusNotModified was returned. 13235 func (c *ProjectsLocationsProcessorsProcessorVersionsProcessCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1ProcessResponse, error) { 13236 gensupport.SetOptions(c.urlParams_, opts...) 13237 res, err := c.doRequest("json") 13238 if res != nil && res.StatusCode == http.StatusNotModified { 13239 if res.Body != nil { 13240 res.Body.Close() 13241 } 13242 return nil, gensupport.WrapError(&googleapi.Error{ 13243 Code: res.StatusCode, 13244 Header: res.Header, 13245 }) 13246 } 13247 if err != nil { 13248 return nil, err 13249 } 13250 defer googleapi.CloseBody(res) 13251 if err := googleapi.CheckResponse(res); err != nil { 13252 return nil, gensupport.WrapError(err) 13253 } 13254 ret := &GoogleCloudDocumentaiV1ProcessResponse{ 13255 ServerResponse: googleapi.ServerResponse{ 13256 Header: res.Header, 13257 HTTPStatusCode: res.StatusCode, 13258 }, 13259 } 13260 target := &ret 13261 if err := gensupport.DecodeResponse(target, res); err != nil { 13262 return nil, err 13263 } 13264 return ret, nil 13265 } 13266 13267 type ProjectsLocationsProcessorsProcessorVersionsTrainCall struct { 13268 s *Service 13269 parent string 13270 googleclouddocumentaiv1trainprocessorversionrequest *GoogleCloudDocumentaiV1TrainProcessorVersionRequest 13271 urlParams_ gensupport.URLParams 13272 ctx_ context.Context 13273 header_ http.Header 13274 } 13275 13276 // Train: Trains a new processor version. Operation metadata is returned as 13277 // TrainProcessorVersionMetadata. 13278 // 13279 // - parent: The parent (project, location and processor) to create the new 13280 // version for. Format: 13281 // `projects/{project}/locations/{location}/processors/{processor}`. 13282 func (r *ProjectsLocationsProcessorsProcessorVersionsService) Train(parent string, googleclouddocumentaiv1trainprocessorversionrequest *GoogleCloudDocumentaiV1TrainProcessorVersionRequest) *ProjectsLocationsProcessorsProcessorVersionsTrainCall { 13283 c := &ProjectsLocationsProcessorsProcessorVersionsTrainCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13284 c.parent = parent 13285 c.googleclouddocumentaiv1trainprocessorversionrequest = googleclouddocumentaiv1trainprocessorversionrequest 13286 return c 13287 } 13288 13289 // Fields allows partial responses to be retrieved. See 13290 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13291 // details. 13292 func (c *ProjectsLocationsProcessorsProcessorVersionsTrainCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsProcessorVersionsTrainCall { 13293 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13294 return c 13295 } 13296 13297 // Context sets the context to be used in this call's Do method. 13298 func (c *ProjectsLocationsProcessorsProcessorVersionsTrainCall) Context(ctx context.Context) *ProjectsLocationsProcessorsProcessorVersionsTrainCall { 13299 c.ctx_ = ctx 13300 return c 13301 } 13302 13303 // Header returns a http.Header that can be modified by the caller to add 13304 // headers to the request. 13305 func (c *ProjectsLocationsProcessorsProcessorVersionsTrainCall) Header() http.Header { 13306 if c.header_ == nil { 13307 c.header_ = make(http.Header) 13308 } 13309 return c.header_ 13310 } 13311 13312 func (c *ProjectsLocationsProcessorsProcessorVersionsTrainCall) doRequest(alt string) (*http.Response, error) { 13313 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13314 var body io.Reader = nil 13315 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1trainprocessorversionrequest) 13316 if err != nil { 13317 return nil, err 13318 } 13319 c.urlParams_.Set("alt", alt) 13320 c.urlParams_.Set("prettyPrint", "false") 13321 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/processorVersions:train") 13322 urls += "?" + c.urlParams_.Encode() 13323 req, err := http.NewRequest("POST", urls, body) 13324 if err != nil { 13325 return nil, err 13326 } 13327 req.Header = reqHeaders 13328 googleapi.Expand(req.URL, map[string]string{ 13329 "parent": c.parent, 13330 }) 13331 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13332 } 13333 13334 // Do executes the "documentai.projects.locations.processors.processorVersions.train" call. 13335 // Any non-2xx status code is an error. Response headers are in either 13336 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 13337 // returned at all) in error.(*googleapi.Error).Header. Use 13338 // googleapi.IsNotModified to check whether the returned error was because 13339 // http.StatusNotModified was returned. 13340 func (c *ProjectsLocationsProcessorsProcessorVersionsTrainCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 13341 gensupport.SetOptions(c.urlParams_, opts...) 13342 res, err := c.doRequest("json") 13343 if res != nil && res.StatusCode == http.StatusNotModified { 13344 if res.Body != nil { 13345 res.Body.Close() 13346 } 13347 return nil, gensupport.WrapError(&googleapi.Error{ 13348 Code: res.StatusCode, 13349 Header: res.Header, 13350 }) 13351 } 13352 if err != nil { 13353 return nil, err 13354 } 13355 defer googleapi.CloseBody(res) 13356 if err := googleapi.CheckResponse(res); err != nil { 13357 return nil, gensupport.WrapError(err) 13358 } 13359 ret := &GoogleLongrunningOperation{ 13360 ServerResponse: googleapi.ServerResponse{ 13361 Header: res.Header, 13362 HTTPStatusCode: res.StatusCode, 13363 }, 13364 } 13365 target := &ret 13366 if err := gensupport.DecodeResponse(target, res); err != nil { 13367 return nil, err 13368 } 13369 return ret, nil 13370 } 13371 13372 type ProjectsLocationsProcessorsProcessorVersionsUndeployCall struct { 13373 s *Service 13374 name string 13375 googleclouddocumentaiv1undeployprocessorversionrequest *GoogleCloudDocumentaiV1UndeployProcessorVersionRequest 13376 urlParams_ gensupport.URLParams 13377 ctx_ context.Context 13378 header_ http.Header 13379 } 13380 13381 // Undeploy: Undeploys the processor version. 13382 // 13383 // - name: The processor version resource name to be undeployed. 13384 func (r *ProjectsLocationsProcessorsProcessorVersionsService) Undeploy(name string, googleclouddocumentaiv1undeployprocessorversionrequest *GoogleCloudDocumentaiV1UndeployProcessorVersionRequest) *ProjectsLocationsProcessorsProcessorVersionsUndeployCall { 13385 c := &ProjectsLocationsProcessorsProcessorVersionsUndeployCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13386 c.name = name 13387 c.googleclouddocumentaiv1undeployprocessorversionrequest = googleclouddocumentaiv1undeployprocessorversionrequest 13388 return c 13389 } 13390 13391 // Fields allows partial responses to be retrieved. See 13392 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13393 // details. 13394 func (c *ProjectsLocationsProcessorsProcessorVersionsUndeployCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsProcessorVersionsUndeployCall { 13395 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13396 return c 13397 } 13398 13399 // Context sets the context to be used in this call's Do method. 13400 func (c *ProjectsLocationsProcessorsProcessorVersionsUndeployCall) Context(ctx context.Context) *ProjectsLocationsProcessorsProcessorVersionsUndeployCall { 13401 c.ctx_ = ctx 13402 return c 13403 } 13404 13405 // Header returns a http.Header that can be modified by the caller to add 13406 // headers to the request. 13407 func (c *ProjectsLocationsProcessorsProcessorVersionsUndeployCall) Header() http.Header { 13408 if c.header_ == nil { 13409 c.header_ = make(http.Header) 13410 } 13411 return c.header_ 13412 } 13413 13414 func (c *ProjectsLocationsProcessorsProcessorVersionsUndeployCall) doRequest(alt string) (*http.Response, error) { 13415 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 13416 var body io.Reader = nil 13417 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddocumentaiv1undeployprocessorversionrequest) 13418 if err != nil { 13419 return nil, err 13420 } 13421 c.urlParams_.Set("alt", alt) 13422 c.urlParams_.Set("prettyPrint", "false") 13423 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:undeploy") 13424 urls += "?" + c.urlParams_.Encode() 13425 req, err := http.NewRequest("POST", urls, body) 13426 if err != nil { 13427 return nil, err 13428 } 13429 req.Header = reqHeaders 13430 googleapi.Expand(req.URL, map[string]string{ 13431 "name": c.name, 13432 }) 13433 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13434 } 13435 13436 // Do executes the "documentai.projects.locations.processors.processorVersions.undeploy" call. 13437 // Any non-2xx status code is an error. Response headers are in either 13438 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 13439 // returned at all) in error.(*googleapi.Error).Header. Use 13440 // googleapi.IsNotModified to check whether the returned error was because 13441 // http.StatusNotModified was returned. 13442 func (c *ProjectsLocationsProcessorsProcessorVersionsUndeployCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 13443 gensupport.SetOptions(c.urlParams_, opts...) 13444 res, err := c.doRequest("json") 13445 if res != nil && res.StatusCode == http.StatusNotModified { 13446 if res.Body != nil { 13447 res.Body.Close() 13448 } 13449 return nil, gensupport.WrapError(&googleapi.Error{ 13450 Code: res.StatusCode, 13451 Header: res.Header, 13452 }) 13453 } 13454 if err != nil { 13455 return nil, err 13456 } 13457 defer googleapi.CloseBody(res) 13458 if err := googleapi.CheckResponse(res); err != nil { 13459 return nil, gensupport.WrapError(err) 13460 } 13461 ret := &GoogleLongrunningOperation{ 13462 ServerResponse: googleapi.ServerResponse{ 13463 Header: res.Header, 13464 HTTPStatusCode: res.StatusCode, 13465 }, 13466 } 13467 target := &ret 13468 if err := gensupport.DecodeResponse(target, res); err != nil { 13469 return nil, err 13470 } 13471 return ret, nil 13472 } 13473 13474 type ProjectsLocationsProcessorsProcessorVersionsEvaluationsGetCall struct { 13475 s *Service 13476 name string 13477 urlParams_ gensupport.URLParams 13478 ifNoneMatch_ string 13479 ctx_ context.Context 13480 header_ http.Header 13481 } 13482 13483 // Get: Retrieves a specific evaluation. 13484 // 13485 // - name: The resource name of the Evaluation to get. 13486 // `projects/{project}/locations/{location}/processors/{processor}/processorVe 13487 // rsions/{processorVersion}/evaluations/{evaluation}`. 13488 func (r *ProjectsLocationsProcessorsProcessorVersionsEvaluationsService) Get(name string) *ProjectsLocationsProcessorsProcessorVersionsEvaluationsGetCall { 13489 c := &ProjectsLocationsProcessorsProcessorVersionsEvaluationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13490 c.name = name 13491 return c 13492 } 13493 13494 // Fields allows partial responses to be retrieved. See 13495 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13496 // details. 13497 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsProcessorVersionsEvaluationsGetCall { 13498 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13499 return c 13500 } 13501 13502 // IfNoneMatch sets an optional parameter which makes the operation fail if the 13503 // object's ETag matches the given value. This is useful for getting updates 13504 // only after the object has changed since the last request. 13505 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsProcessorsProcessorVersionsEvaluationsGetCall { 13506 c.ifNoneMatch_ = entityTag 13507 return c 13508 } 13509 13510 // Context sets the context to be used in this call's Do method. 13511 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsGetCall) Context(ctx context.Context) *ProjectsLocationsProcessorsProcessorVersionsEvaluationsGetCall { 13512 c.ctx_ = ctx 13513 return c 13514 } 13515 13516 // Header returns a http.Header that can be modified by the caller to add 13517 // headers to the request. 13518 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsGetCall) Header() http.Header { 13519 if c.header_ == nil { 13520 c.header_ = make(http.Header) 13521 } 13522 return c.header_ 13523 } 13524 13525 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsGetCall) doRequest(alt string) (*http.Response, error) { 13526 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 13527 if c.ifNoneMatch_ != "" { 13528 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13529 } 13530 var body io.Reader = nil 13531 c.urlParams_.Set("alt", alt) 13532 c.urlParams_.Set("prettyPrint", "false") 13533 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 13534 urls += "?" + c.urlParams_.Encode() 13535 req, err := http.NewRequest("GET", urls, body) 13536 if err != nil { 13537 return nil, err 13538 } 13539 req.Header = reqHeaders 13540 googleapi.Expand(req.URL, map[string]string{ 13541 "name": c.name, 13542 }) 13543 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13544 } 13545 13546 // Do executes the "documentai.projects.locations.processors.processorVersions.evaluations.get" call. 13547 // Any non-2xx status code is an error. Response headers are in either 13548 // *GoogleCloudDocumentaiV1Evaluation.ServerResponse.Header or (if a response 13549 // was returned at all) in error.(*googleapi.Error).Header. Use 13550 // googleapi.IsNotModified to check whether the returned error was because 13551 // http.StatusNotModified was returned. 13552 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1Evaluation, error) { 13553 gensupport.SetOptions(c.urlParams_, opts...) 13554 res, err := c.doRequest("json") 13555 if res != nil && res.StatusCode == http.StatusNotModified { 13556 if res.Body != nil { 13557 res.Body.Close() 13558 } 13559 return nil, gensupport.WrapError(&googleapi.Error{ 13560 Code: res.StatusCode, 13561 Header: res.Header, 13562 }) 13563 } 13564 if err != nil { 13565 return nil, err 13566 } 13567 defer googleapi.CloseBody(res) 13568 if err := googleapi.CheckResponse(res); err != nil { 13569 return nil, gensupport.WrapError(err) 13570 } 13571 ret := &GoogleCloudDocumentaiV1Evaluation{ 13572 ServerResponse: googleapi.ServerResponse{ 13573 Header: res.Header, 13574 HTTPStatusCode: res.StatusCode, 13575 }, 13576 } 13577 target := &ret 13578 if err := gensupport.DecodeResponse(target, res); err != nil { 13579 return nil, err 13580 } 13581 return ret, nil 13582 } 13583 13584 type ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall struct { 13585 s *Service 13586 parent string 13587 urlParams_ gensupport.URLParams 13588 ifNoneMatch_ string 13589 ctx_ context.Context 13590 header_ http.Header 13591 } 13592 13593 // List: Retrieves a set of evaluations for a given processor version. 13594 // 13595 // - parent: The resource name of the ProcessorVersion to list evaluations for. 13596 // `projects/{project}/locations/{location}/processors/{processor}/processorVe 13597 // rsions/{processorVersion}`. 13598 func (r *ProjectsLocationsProcessorsProcessorVersionsEvaluationsService) List(parent string) *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall { 13599 c := &ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13600 c.parent = parent 13601 return c 13602 } 13603 13604 // PageSize sets the optional parameter "pageSize": The standard list page 13605 // size. If unspecified, at most `5` evaluations are returned. The maximum 13606 // value is `100`. Values above `100` are coerced to `100`. 13607 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall) PageSize(pageSize int64) *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall { 13608 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 13609 return c 13610 } 13611 13612 // PageToken sets the optional parameter "pageToken": A page token, received 13613 // from a previous `ListEvaluations` call. Provide this to retrieve the 13614 // subsequent page. 13615 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall) PageToken(pageToken string) *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall { 13616 c.urlParams_.Set("pageToken", pageToken) 13617 return c 13618 } 13619 13620 // Fields allows partial responses to be retrieved. See 13621 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13622 // details. 13623 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall { 13624 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13625 return c 13626 } 13627 13628 // IfNoneMatch sets an optional parameter which makes the operation fail if the 13629 // object's ETag matches the given value. This is useful for getting updates 13630 // only after the object has changed since the last request. 13631 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall { 13632 c.ifNoneMatch_ = entityTag 13633 return c 13634 } 13635 13636 // Context sets the context to be used in this call's Do method. 13637 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall) Context(ctx context.Context) *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall { 13638 c.ctx_ = ctx 13639 return c 13640 } 13641 13642 // Header returns a http.Header that can be modified by the caller to add 13643 // headers to the request. 13644 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall) Header() http.Header { 13645 if c.header_ == nil { 13646 c.header_ = make(http.Header) 13647 } 13648 return c.header_ 13649 } 13650 13651 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall) doRequest(alt string) (*http.Response, error) { 13652 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 13653 if c.ifNoneMatch_ != "" { 13654 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13655 } 13656 var body io.Reader = nil 13657 c.urlParams_.Set("alt", alt) 13658 c.urlParams_.Set("prettyPrint", "false") 13659 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations") 13660 urls += "?" + c.urlParams_.Encode() 13661 req, err := http.NewRequest("GET", urls, body) 13662 if err != nil { 13663 return nil, err 13664 } 13665 req.Header = reqHeaders 13666 googleapi.Expand(req.URL, map[string]string{ 13667 "parent": c.parent, 13668 }) 13669 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13670 } 13671 13672 // Do executes the "documentai.projects.locations.processors.processorVersions.evaluations.list" call. 13673 // Any non-2xx status code is an error. Response headers are in either 13674 // *GoogleCloudDocumentaiV1ListEvaluationsResponse.ServerResponse.Header or (if 13675 // a response was returned at all) in error.(*googleapi.Error).Header. Use 13676 // googleapi.IsNotModified to check whether the returned error was because 13677 // http.StatusNotModified was returned. 13678 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDocumentaiV1ListEvaluationsResponse, error) { 13679 gensupport.SetOptions(c.urlParams_, opts...) 13680 res, err := c.doRequest("json") 13681 if res != nil && res.StatusCode == http.StatusNotModified { 13682 if res.Body != nil { 13683 res.Body.Close() 13684 } 13685 return nil, gensupport.WrapError(&googleapi.Error{ 13686 Code: res.StatusCode, 13687 Header: res.Header, 13688 }) 13689 } 13690 if err != nil { 13691 return nil, err 13692 } 13693 defer googleapi.CloseBody(res) 13694 if err := googleapi.CheckResponse(res); err != nil { 13695 return nil, gensupport.WrapError(err) 13696 } 13697 ret := &GoogleCloudDocumentaiV1ListEvaluationsResponse{ 13698 ServerResponse: googleapi.ServerResponse{ 13699 Header: res.Header, 13700 HTTPStatusCode: res.StatusCode, 13701 }, 13702 } 13703 target := &ret 13704 if err := gensupport.DecodeResponse(target, res); err != nil { 13705 return nil, err 13706 } 13707 return ret, nil 13708 } 13709 13710 // Pages invokes f for each page of results. 13711 // A non-nil error returned from f will halt the iteration. 13712 // The provided context supersedes any context provided to the Context method. 13713 func (c *ProjectsLocationsProcessorsProcessorVersionsEvaluationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDocumentaiV1ListEvaluationsResponse) error) error { 13714 c.ctx_ = ctx 13715 defer c.PageToken(c.urlParams_.Get("pageToken")) 13716 for { 13717 x, err := c.Do() 13718 if err != nil { 13719 return err 13720 } 13721 if err := f(x); err != nil { 13722 return err 13723 } 13724 if x.NextPageToken == "" { 13725 return nil 13726 } 13727 c.PageToken(x.NextPageToken) 13728 } 13729 } 13730 13731 type ProjectsOperationsGetCall struct { 13732 s *Service 13733 name string 13734 urlParams_ gensupport.URLParams 13735 ifNoneMatch_ string 13736 ctx_ context.Context 13737 header_ http.Header 13738 } 13739 13740 // Get: Gets the latest state of a long-running operation. Clients can use this 13741 // method to poll the operation result at intervals as recommended by the API 13742 // service. 13743 // 13744 // - name: The name of the operation resource. 13745 func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall { 13746 c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13747 c.name = name 13748 return c 13749 } 13750 13751 // Fields allows partial responses to be retrieved. See 13752 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 13753 // details. 13754 func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall { 13755 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13756 return c 13757 } 13758 13759 // IfNoneMatch sets an optional parameter which makes the operation fail if the 13760 // object's ETag matches the given value. This is useful for getting updates 13761 // only after the object has changed since the last request. 13762 func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall { 13763 c.ifNoneMatch_ = entityTag 13764 return c 13765 } 13766 13767 // Context sets the context to be used in this call's Do method. 13768 func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall { 13769 c.ctx_ = ctx 13770 return c 13771 } 13772 13773 // Header returns a http.Header that can be modified by the caller to add 13774 // headers to the request. 13775 func (c *ProjectsOperationsGetCall) Header() http.Header { 13776 if c.header_ == nil { 13777 c.header_ = make(http.Header) 13778 } 13779 return c.header_ 13780 } 13781 13782 func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 13783 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 13784 if c.ifNoneMatch_ != "" { 13785 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13786 } 13787 var body io.Reader = nil 13788 c.urlParams_.Set("alt", alt) 13789 c.urlParams_.Set("prettyPrint", "false") 13790 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 13791 urls += "?" + c.urlParams_.Encode() 13792 req, err := http.NewRequest("GET", urls, body) 13793 if err != nil { 13794 return nil, err 13795 } 13796 req.Header = reqHeaders 13797 googleapi.Expand(req.URL, map[string]string{ 13798 "name": c.name, 13799 }) 13800 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13801 } 13802 13803 // Do executes the "documentai.projects.operations.get" call. 13804 // Any non-2xx status code is an error. Response headers are in either 13805 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 13806 // returned at all) in error.(*googleapi.Error).Header. Use 13807 // googleapi.IsNotModified to check whether the returned error was because 13808 // http.StatusNotModified was returned. 13809 func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 13810 gensupport.SetOptions(c.urlParams_, opts...) 13811 res, err := c.doRequest("json") 13812 if res != nil && res.StatusCode == http.StatusNotModified { 13813 if res.Body != nil { 13814 res.Body.Close() 13815 } 13816 return nil, gensupport.WrapError(&googleapi.Error{ 13817 Code: res.StatusCode, 13818 Header: res.Header, 13819 }) 13820 } 13821 if err != nil { 13822 return nil, err 13823 } 13824 defer googleapi.CloseBody(res) 13825 if err := googleapi.CheckResponse(res); err != nil { 13826 return nil, gensupport.WrapError(err) 13827 } 13828 ret := &GoogleLongrunningOperation{ 13829 ServerResponse: googleapi.ServerResponse{ 13830 Header: res.Header, 13831 HTTPStatusCode: res.StatusCode, 13832 }, 13833 } 13834 target := &ret 13835 if err := gensupport.DecodeResponse(target, res); err != nil { 13836 return nil, err 13837 } 13838 return ret, nil 13839 } 13840