1// Copyright 2021 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 vision provides access to the Cloud Vision API.
8//
9// This package is DEPRECATED. Use package cloud.google.com/go/vision/apiv1 instead.
10//
11// For product documentation, see: https://cloud.google.com/vision/
12//
13// Creating a client
14//
15// Usage example:
16//
17//   import "google.golang.org/api/vision/v1"
18//   ...
19//   ctx := context.Background()
20//   visionService, err := vision.NewService(ctx)
21//
22// In this example, Google Application Default Credentials are used for authentication.
23//
24// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
25//
26// Other authentication options
27//
28// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
29//
30//   visionService, err := vision.NewService(ctx, option.WithScopes(vision.CloudVisionScope))
31//
32// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
33//
34//   visionService, err := vision.NewService(ctx, option.WithAPIKey("AIza..."))
35//
36// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
37//
38//   config := &oauth2.Config{...}
39//   // ...
40//   token, err := config.Exchange(ctx, ...)
41//   visionService, err := vision.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
42//
43// See https://godoc.org/google.golang.org/api/option/ for details on options.
44package vision // import "google.golang.org/api/vision/v1"
45
46import (
47	"bytes"
48	"context"
49	"encoding/json"
50	"errors"
51	"fmt"
52	"io"
53	"net/http"
54	"net/url"
55	"strconv"
56	"strings"
57
58	googleapi "google.golang.org/api/googleapi"
59	gensupport "google.golang.org/api/internal/gensupport"
60	option "google.golang.org/api/option"
61	internaloption "google.golang.org/api/option/internaloption"
62	htransport "google.golang.org/api/transport/http"
63)
64
65// Always reference these packages, just in case the auto-generated code
66// below doesn't.
67var _ = bytes.NewBuffer
68var _ = strconv.Itoa
69var _ = fmt.Sprintf
70var _ = json.NewDecoder
71var _ = io.Copy
72var _ = url.Parse
73var _ = gensupport.MarshalJSON
74var _ = googleapi.Version
75var _ = errors.New
76var _ = strings.Replace
77var _ = context.Canceled
78var _ = internaloption.WithDefaultEndpoint
79
80const apiId = "vision:v1"
81const apiName = "vision"
82const apiVersion = "v1"
83const basePath = "https://vision.googleapis.com/"
84const mtlsBasePath = "https://vision.mtls.googleapis.com/"
85
86// OAuth2 scopes used by this API.
87const (
88	// See, edit, configure, and delete your Google Cloud Platform data
89	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
90
91	// Apply machine learning models to understand and label images
92	CloudVisionScope = "https://www.googleapis.com/auth/cloud-vision"
93)
94
95// NewService creates a new Service.
96func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
97	scopesOption := option.WithScopes(
98		"https://www.googleapis.com/auth/cloud-platform",
99		"https://www.googleapis.com/auth/cloud-vision",
100	)
101	// NOTE: prepend, so we don't override user-specified scopes.
102	opts = append([]option.ClientOption{scopesOption}, opts...)
103	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
104	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
105	client, endpoint, err := htransport.NewClient(ctx, opts...)
106	if err != nil {
107		return nil, err
108	}
109	s, err := New(client)
110	if err != nil {
111		return nil, err
112	}
113	if endpoint != "" {
114		s.BasePath = endpoint
115	}
116	return s, nil
117}
118
119// New creates a new Service. It uses the provided http.Client for requests.
120//
121// Deprecated: please use NewService instead.
122// To provide a custom HTTP client, use option.WithHTTPClient.
123// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
124func New(client *http.Client) (*Service, error) {
125	if client == nil {
126		return nil, errors.New("client is nil")
127	}
128	s := &Service{client: client, BasePath: basePath}
129	s.Files = NewFilesService(s)
130	s.Images = NewImagesService(s)
131	s.Locations = NewLocationsService(s)
132	s.Operations = NewOperationsService(s)
133	s.Projects = NewProjectsService(s)
134	return s, nil
135}
136
137type Service struct {
138	client    *http.Client
139	BasePath  string // API endpoint base URL
140	UserAgent string // optional additional User-Agent fragment
141
142	Files *FilesService
143
144	Images *ImagesService
145
146	Locations *LocationsService
147
148	Operations *OperationsService
149
150	Projects *ProjectsService
151}
152
153func (s *Service) userAgent() string {
154	if s.UserAgent == "" {
155		return googleapi.UserAgent
156	}
157	return googleapi.UserAgent + " " + s.UserAgent
158}
159
160func NewFilesService(s *Service) *FilesService {
161	rs := &FilesService{s: s}
162	return rs
163}
164
165type FilesService struct {
166	s *Service
167}
168
169func NewImagesService(s *Service) *ImagesService {
170	rs := &ImagesService{s: s}
171	return rs
172}
173
174type ImagesService struct {
175	s *Service
176}
177
178func NewLocationsService(s *Service) *LocationsService {
179	rs := &LocationsService{s: s}
180	rs.Operations = NewLocationsOperationsService(s)
181	return rs
182}
183
184type LocationsService struct {
185	s *Service
186
187	Operations *LocationsOperationsService
188}
189
190func NewLocationsOperationsService(s *Service) *LocationsOperationsService {
191	rs := &LocationsOperationsService{s: s}
192	return rs
193}
194
195type LocationsOperationsService struct {
196	s *Service
197}
198
199func NewOperationsService(s *Service) *OperationsService {
200	rs := &OperationsService{s: s}
201	return rs
202}
203
204type OperationsService struct {
205	s *Service
206}
207
208func NewProjectsService(s *Service) *ProjectsService {
209	rs := &ProjectsService{s: s}
210	rs.Files = NewProjectsFilesService(s)
211	rs.Images = NewProjectsImagesService(s)
212	rs.Locations = NewProjectsLocationsService(s)
213	rs.Operations = NewProjectsOperationsService(s)
214	return rs
215}
216
217type ProjectsService struct {
218	s *Service
219
220	Files *ProjectsFilesService
221
222	Images *ProjectsImagesService
223
224	Locations *ProjectsLocationsService
225
226	Operations *ProjectsOperationsService
227}
228
229func NewProjectsFilesService(s *Service) *ProjectsFilesService {
230	rs := &ProjectsFilesService{s: s}
231	return rs
232}
233
234type ProjectsFilesService struct {
235	s *Service
236}
237
238func NewProjectsImagesService(s *Service) *ProjectsImagesService {
239	rs := &ProjectsImagesService{s: s}
240	return rs
241}
242
243type ProjectsImagesService struct {
244	s *Service
245}
246
247func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
248	rs := &ProjectsLocationsService{s: s}
249	rs.Files = NewProjectsLocationsFilesService(s)
250	rs.Images = NewProjectsLocationsImagesService(s)
251	rs.Operations = NewProjectsLocationsOperationsService(s)
252	rs.ProductSets = NewProjectsLocationsProductSetsService(s)
253	rs.Products = NewProjectsLocationsProductsService(s)
254	return rs
255}
256
257type ProjectsLocationsService struct {
258	s *Service
259
260	Files *ProjectsLocationsFilesService
261
262	Images *ProjectsLocationsImagesService
263
264	Operations *ProjectsLocationsOperationsService
265
266	ProductSets *ProjectsLocationsProductSetsService
267
268	Products *ProjectsLocationsProductsService
269}
270
271func NewProjectsLocationsFilesService(s *Service) *ProjectsLocationsFilesService {
272	rs := &ProjectsLocationsFilesService{s: s}
273	return rs
274}
275
276type ProjectsLocationsFilesService struct {
277	s *Service
278}
279
280func NewProjectsLocationsImagesService(s *Service) *ProjectsLocationsImagesService {
281	rs := &ProjectsLocationsImagesService{s: s}
282	return rs
283}
284
285type ProjectsLocationsImagesService struct {
286	s *Service
287}
288
289func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
290	rs := &ProjectsLocationsOperationsService{s: s}
291	return rs
292}
293
294type ProjectsLocationsOperationsService struct {
295	s *Service
296}
297
298func NewProjectsLocationsProductSetsService(s *Service) *ProjectsLocationsProductSetsService {
299	rs := &ProjectsLocationsProductSetsService{s: s}
300	rs.Products = NewProjectsLocationsProductSetsProductsService(s)
301	return rs
302}
303
304type ProjectsLocationsProductSetsService struct {
305	s *Service
306
307	Products *ProjectsLocationsProductSetsProductsService
308}
309
310func NewProjectsLocationsProductSetsProductsService(s *Service) *ProjectsLocationsProductSetsProductsService {
311	rs := &ProjectsLocationsProductSetsProductsService{s: s}
312	return rs
313}
314
315type ProjectsLocationsProductSetsProductsService struct {
316	s *Service
317}
318
319func NewProjectsLocationsProductsService(s *Service) *ProjectsLocationsProductsService {
320	rs := &ProjectsLocationsProductsService{s: s}
321	rs.ReferenceImages = NewProjectsLocationsProductsReferenceImagesService(s)
322	return rs
323}
324
325type ProjectsLocationsProductsService struct {
326	s *Service
327
328	ReferenceImages *ProjectsLocationsProductsReferenceImagesService
329}
330
331func NewProjectsLocationsProductsReferenceImagesService(s *Service) *ProjectsLocationsProductsReferenceImagesService {
332	rs := &ProjectsLocationsProductsReferenceImagesService{s: s}
333	return rs
334}
335
336type ProjectsLocationsProductsReferenceImagesService struct {
337	s *Service
338}
339
340func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
341	rs := &ProjectsOperationsService{s: s}
342	return rs
343}
344
345type ProjectsOperationsService struct {
346	s *Service
347}
348
349// AddProductToProductSetRequest: Request message for the
350// `AddProductToProductSet` method.
351type AddProductToProductSetRequest struct {
352	// Product: Required. The resource name for the Product to be added to
353	// this ProductSet. Format is:
354	// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
355	Product string `json:"product,omitempty"`
356
357	// ForceSendFields is a list of field names (e.g. "Product") to
358	// unconditionally include in API requests. By default, fields with
359	// empty values are omitted from API requests. However, any non-pointer,
360	// non-interface field appearing in ForceSendFields will be sent to the
361	// server regardless of whether the field is empty or not. This may be
362	// used to include empty fields in Patch requests.
363	ForceSendFields []string `json:"-"`
364
365	// NullFields is a list of field names (e.g. "Product") to include in
366	// API requests with the JSON null value. By default, fields with empty
367	// values are omitted from API requests. However, any field with an
368	// empty value appearing in NullFields will be sent to the server as
369	// null. It is an error if a field in this list has a non-empty value.
370	// This may be used to include null fields in Patch requests.
371	NullFields []string `json:"-"`
372}
373
374func (s *AddProductToProductSetRequest) MarshalJSON() ([]byte, error) {
375	type NoMethod AddProductToProductSetRequest
376	raw := NoMethod(*s)
377	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
378}
379
380// AnnotateFileRequest: A request to annotate one single file, e.g. a
381// PDF, TIFF or GIF file.
382type AnnotateFileRequest struct {
383	// Features: Required. Requested features.
384	Features []*Feature `json:"features,omitempty"`
385
386	// ImageContext: Additional context that may accompany the image(s) in
387	// the file.
388	ImageContext *ImageContext `json:"imageContext,omitempty"`
389
390	// InputConfig: Required. Information about the input file.
391	InputConfig *InputConfig `json:"inputConfig,omitempty"`
392
393	// Pages: Pages of the file to perform image annotation. Pages starts
394	// from 1, we assume the first page of the file is page 1. At most 5
395	// pages are supported per request. Pages can be negative. Page 1 means
396	// the first page. Page 2 means the second page. Page -1 means the last
397	// page. Page -2 means the second to the last page. If the file is GIF
398	// instead of PDF or TIFF, page refers to GIF frames. If this field is
399	// empty, by default the service performs image annotation for the first
400	// 5 pages of the file.
401	Pages []int64 `json:"pages,omitempty"`
402
403	// ForceSendFields is a list of field names (e.g. "Features") to
404	// unconditionally include in API requests. By default, fields with
405	// empty values are omitted from API requests. However, any non-pointer,
406	// non-interface field appearing in ForceSendFields will be sent to the
407	// server regardless of whether the field is empty or not. This may be
408	// used to include empty fields in Patch requests.
409	ForceSendFields []string `json:"-"`
410
411	// NullFields is a list of field names (e.g. "Features") to include in
412	// API requests with the JSON null value. By default, fields with empty
413	// values are omitted from API requests. However, any field with an
414	// empty value appearing in NullFields will be sent to the server as
415	// null. It is an error if a field in this list has a non-empty value.
416	// This may be used to include null fields in Patch requests.
417	NullFields []string `json:"-"`
418}
419
420func (s *AnnotateFileRequest) MarshalJSON() ([]byte, error) {
421	type NoMethod AnnotateFileRequest
422	raw := NoMethod(*s)
423	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
424}
425
426// AnnotateFileResponse: Response to a single file annotation request. A
427// file may contain one or more images, which individually have their
428// own responses.
429type AnnotateFileResponse struct {
430	// Error: If set, represents the error message for the failed request.
431	// The `responses` field will not be set in this case.
432	Error *Status `json:"error,omitempty"`
433
434	// InputConfig: Information about the file for which this response is
435	// generated.
436	InputConfig *InputConfig `json:"inputConfig,omitempty"`
437
438	// Responses: Individual responses to images found within the file. This
439	// field will be empty if the `error` field is set.
440	Responses []*AnnotateImageResponse `json:"responses,omitempty"`
441
442	// TotalPages: This field gives the total number of pages in the file.
443	TotalPages int64 `json:"totalPages,omitempty"`
444
445	// ForceSendFields is a list of field names (e.g. "Error") to
446	// unconditionally include in API requests. By default, fields with
447	// empty values are omitted from API requests. However, any non-pointer,
448	// non-interface field appearing in ForceSendFields will be sent to the
449	// server regardless of whether the field is empty or not. This may be
450	// used to include empty fields in Patch requests.
451	ForceSendFields []string `json:"-"`
452
453	// NullFields is a list of field names (e.g. "Error") to include in API
454	// requests with the JSON null value. By default, fields with empty
455	// values are omitted from API requests. However, any field with an
456	// empty value appearing in NullFields will be sent to the server as
457	// null. It is an error if a field in this list has a non-empty value.
458	// This may be used to include null fields in Patch requests.
459	NullFields []string `json:"-"`
460}
461
462func (s *AnnotateFileResponse) MarshalJSON() ([]byte, error) {
463	type NoMethod AnnotateFileResponse
464	raw := NoMethod(*s)
465	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
466}
467
468// AnnotateImageRequest: Request for performing Google Cloud Vision API
469// tasks over a user-provided image, with user-requested features, and
470// with context information.
471type AnnotateImageRequest struct {
472	// Features: Requested features.
473	Features []*Feature `json:"features,omitempty"`
474
475	// Image: The image to be processed.
476	Image *Image `json:"image,omitempty"`
477
478	// ImageContext: Additional context that may accompany the image.
479	ImageContext *ImageContext `json:"imageContext,omitempty"`
480
481	// ForceSendFields is a list of field names (e.g. "Features") to
482	// unconditionally include in API requests. By default, fields with
483	// empty values are omitted from API requests. However, any non-pointer,
484	// non-interface field appearing in ForceSendFields will be sent to the
485	// server regardless of whether the field is empty or not. This may be
486	// used to include empty fields in Patch requests.
487	ForceSendFields []string `json:"-"`
488
489	// NullFields is a list of field names (e.g. "Features") to include in
490	// API requests with the JSON null value. By default, fields with empty
491	// values are omitted from API requests. However, any field with an
492	// empty value appearing in NullFields will be sent to the server as
493	// null. It is an error if a field in this list has a non-empty value.
494	// This may be used to include null fields in Patch requests.
495	NullFields []string `json:"-"`
496}
497
498func (s *AnnotateImageRequest) MarshalJSON() ([]byte, error) {
499	type NoMethod AnnotateImageRequest
500	raw := NoMethod(*s)
501	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
502}
503
504// AnnotateImageResponse: Response to an image annotation request.
505type AnnotateImageResponse struct {
506	// Context: If present, contextual information is needed to understand
507	// where this image comes from.
508	Context *ImageAnnotationContext `json:"context,omitempty"`
509
510	// CropHintsAnnotation: If present, crop hints have completed
511	// successfully.
512	CropHintsAnnotation *CropHintsAnnotation `json:"cropHintsAnnotation,omitempty"`
513
514	// Error: If set, represents the error message for the operation. Note
515	// that filled-in image annotations are guaranteed to be correct, even
516	// when `error` is set.
517	Error *Status `json:"error,omitempty"`
518
519	// FaceAnnotations: If present, face detection has completed
520	// successfully.
521	FaceAnnotations []*FaceAnnotation `json:"faceAnnotations,omitempty"`
522
523	// FullTextAnnotation: If present, text (OCR) detection or document
524	// (OCR) text detection has completed successfully. This annotation
525	// provides the structural hierarchy for the OCR detected text.
526	FullTextAnnotation *TextAnnotation `json:"fullTextAnnotation,omitempty"`
527
528	// ImagePropertiesAnnotation: If present, image properties were
529	// extracted successfully.
530	ImagePropertiesAnnotation *ImageProperties `json:"imagePropertiesAnnotation,omitempty"`
531
532	// LabelAnnotations: If present, label detection has completed
533	// successfully.
534	LabelAnnotations []*EntityAnnotation `json:"labelAnnotations,omitempty"`
535
536	// LandmarkAnnotations: If present, landmark detection has completed
537	// successfully.
538	LandmarkAnnotations []*EntityAnnotation `json:"landmarkAnnotations,omitempty"`
539
540	// LocalizedObjectAnnotations: If present, localized object detection
541	// has completed successfully. This will be sorted descending by
542	// confidence score.
543	LocalizedObjectAnnotations []*LocalizedObjectAnnotation `json:"localizedObjectAnnotations,omitempty"`
544
545	// LogoAnnotations: If present, logo detection has completed
546	// successfully.
547	LogoAnnotations []*EntityAnnotation `json:"logoAnnotations,omitempty"`
548
549	// ProductSearchResults: If present, product search has completed
550	// successfully.
551	ProductSearchResults *ProductSearchResults `json:"productSearchResults,omitempty"`
552
553	// SafeSearchAnnotation: If present, safe-search annotation has
554	// completed successfully.
555	SafeSearchAnnotation *SafeSearchAnnotation `json:"safeSearchAnnotation,omitempty"`
556
557	// TextAnnotations: If present, text (OCR) detection has completed
558	// successfully.
559	TextAnnotations []*EntityAnnotation `json:"textAnnotations,omitempty"`
560
561	// WebDetection: If present, web detection has completed successfully.
562	WebDetection *WebDetection `json:"webDetection,omitempty"`
563
564	// ForceSendFields is a list of field names (e.g. "Context") to
565	// unconditionally include in API requests. By default, fields with
566	// empty values are omitted from API requests. However, any non-pointer,
567	// non-interface field appearing in ForceSendFields will be sent to the
568	// server regardless of whether the field is empty or not. This may be
569	// used to include empty fields in Patch requests.
570	ForceSendFields []string `json:"-"`
571
572	// NullFields is a list of field names (e.g. "Context") to include in
573	// API requests with the JSON null value. By default, fields with empty
574	// values are omitted from API requests. However, any field with an
575	// empty value appearing in NullFields will be sent to the server as
576	// null. It is an error if a field in this list has a non-empty value.
577	// This may be used to include null fields in Patch requests.
578	NullFields []string `json:"-"`
579}
580
581func (s *AnnotateImageResponse) MarshalJSON() ([]byte, error) {
582	type NoMethod AnnotateImageResponse
583	raw := NoMethod(*s)
584	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
585}
586
587// AsyncAnnotateFileRequest: An offline file annotation request.
588type AsyncAnnotateFileRequest struct {
589	// Features: Required. Requested features.
590	Features []*Feature `json:"features,omitempty"`
591
592	// ImageContext: Additional context that may accompany the image(s) in
593	// the file.
594	ImageContext *ImageContext `json:"imageContext,omitempty"`
595
596	// InputConfig: Required. Information about the input file.
597	InputConfig *InputConfig `json:"inputConfig,omitempty"`
598
599	// OutputConfig: Required. The desired output location and metadata
600	// (e.g. format).
601	OutputConfig *OutputConfig `json:"outputConfig,omitempty"`
602
603	// ForceSendFields is a list of field names (e.g. "Features") to
604	// unconditionally include in API requests. By default, fields with
605	// empty values are omitted from API requests. However, any non-pointer,
606	// non-interface field appearing in ForceSendFields will be sent to the
607	// server regardless of whether the field is empty or not. This may be
608	// used to include empty fields in Patch requests.
609	ForceSendFields []string `json:"-"`
610
611	// NullFields is a list of field names (e.g. "Features") to include in
612	// API requests with the JSON null value. By default, fields with empty
613	// values are omitted from API requests. However, any field with an
614	// empty value appearing in NullFields will be sent to the server as
615	// null. It is an error if a field in this list has a non-empty value.
616	// This may be used to include null fields in Patch requests.
617	NullFields []string `json:"-"`
618}
619
620func (s *AsyncAnnotateFileRequest) MarshalJSON() ([]byte, error) {
621	type NoMethod AsyncAnnotateFileRequest
622	raw := NoMethod(*s)
623	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
624}
625
626// AsyncAnnotateFileResponse: The response for a single offline file
627// annotation request.
628type AsyncAnnotateFileResponse struct {
629	// OutputConfig: The output location and metadata from
630	// AsyncAnnotateFileRequest.
631	OutputConfig *OutputConfig `json:"outputConfig,omitempty"`
632
633	// ForceSendFields is a list of field names (e.g. "OutputConfig") to
634	// unconditionally include in API requests. By default, fields with
635	// empty values are omitted from API requests. However, any non-pointer,
636	// non-interface field appearing in ForceSendFields will be sent to the
637	// server regardless of whether the field is empty or not. This may be
638	// used to include empty fields in Patch requests.
639	ForceSendFields []string `json:"-"`
640
641	// NullFields is a list of field names (e.g. "OutputConfig") to include
642	// in API requests with the JSON null value. By default, fields with
643	// empty values are omitted from API requests. However, any field with
644	// an empty value appearing in NullFields will be sent to the server as
645	// null. It is an error if a field in this list has a non-empty value.
646	// This may be used to include null fields in Patch requests.
647	NullFields []string `json:"-"`
648}
649
650func (s *AsyncAnnotateFileResponse) MarshalJSON() ([]byte, error) {
651	type NoMethod AsyncAnnotateFileResponse
652	raw := NoMethod(*s)
653	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
654}
655
656// AsyncBatchAnnotateFilesRequest: Multiple async file annotation
657// requests are batched into a single service call.
658type AsyncBatchAnnotateFilesRequest struct {
659	// Parent: Optional. Target project and location to make a call. Format:
660	// `projects/{project-id}/locations/{location-id}`. If no parent is
661	// specified, a region will be chosen automatically. Supported
662	// location-ids: `us`: USA country only, `asia`: East asia areas, like
663	// Japan, Taiwan, `eu`: The European Union. Example:
664	// `projects/project-A/locations/eu`.
665	Parent string `json:"parent,omitempty"`
666
667	// Requests: Required. Individual async file annotation requests for
668	// this batch.
669	Requests []*AsyncAnnotateFileRequest `json:"requests,omitempty"`
670
671	// ForceSendFields is a list of field names (e.g. "Parent") to
672	// unconditionally include in API requests. By default, fields with
673	// empty values are omitted from API requests. However, any non-pointer,
674	// non-interface field appearing in ForceSendFields will be sent to the
675	// server regardless of whether the field is empty or not. This may be
676	// used to include empty fields in Patch requests.
677	ForceSendFields []string `json:"-"`
678
679	// NullFields is a list of field names (e.g. "Parent") to include in API
680	// requests with the JSON null value. By default, fields with empty
681	// values are omitted from API requests. However, any field with an
682	// empty value appearing in NullFields will be sent to the server as
683	// null. It is an error if a field in this list has a non-empty value.
684	// This may be used to include null fields in Patch requests.
685	NullFields []string `json:"-"`
686}
687
688func (s *AsyncBatchAnnotateFilesRequest) MarshalJSON() ([]byte, error) {
689	type NoMethod AsyncBatchAnnotateFilesRequest
690	raw := NoMethod(*s)
691	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
692}
693
694// AsyncBatchAnnotateFilesResponse: Response to an async batch file
695// annotation request.
696type AsyncBatchAnnotateFilesResponse struct {
697	// Responses: The list of file annotation responses, one for each
698	// request in AsyncBatchAnnotateFilesRequest.
699	Responses []*AsyncAnnotateFileResponse `json:"responses,omitempty"`
700
701	// ForceSendFields is a list of field names (e.g. "Responses") to
702	// unconditionally include in API requests. By default, fields with
703	// empty values are omitted from API requests. However, any non-pointer,
704	// non-interface field appearing in ForceSendFields will be sent to the
705	// server regardless of whether the field is empty or not. This may be
706	// used to include empty fields in Patch requests.
707	ForceSendFields []string `json:"-"`
708
709	// NullFields is a list of field names (e.g. "Responses") to include in
710	// API requests with the JSON null value. By default, fields with empty
711	// values are omitted from API requests. However, any field with an
712	// empty value appearing in NullFields will be sent to the server as
713	// null. It is an error if a field in this list has a non-empty value.
714	// This may be used to include null fields in Patch requests.
715	NullFields []string `json:"-"`
716}
717
718func (s *AsyncBatchAnnotateFilesResponse) MarshalJSON() ([]byte, error) {
719	type NoMethod AsyncBatchAnnotateFilesResponse
720	raw := NoMethod(*s)
721	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
722}
723
724// AsyncBatchAnnotateImagesRequest: Request for async image annotation
725// for a list of images.
726type AsyncBatchAnnotateImagesRequest struct {
727	// OutputConfig: Required. The desired output location and metadata
728	// (e.g. format).
729	OutputConfig *OutputConfig `json:"outputConfig,omitempty"`
730
731	// Parent: Optional. Target project and location to make a call. Format:
732	// `projects/{project-id}/locations/{location-id}`. If no parent is
733	// specified, a region will be chosen automatically. Supported
734	// location-ids: `us`: USA country only, `asia`: East asia areas, like
735	// Japan, Taiwan, `eu`: The European Union. Example:
736	// `projects/project-A/locations/eu`.
737	Parent string `json:"parent,omitempty"`
738
739	// Requests: Required. Individual image annotation requests for this
740	// batch.
741	Requests []*AnnotateImageRequest `json:"requests,omitempty"`
742
743	// ForceSendFields is a list of field names (e.g. "OutputConfig") to
744	// unconditionally include in API requests. By default, fields with
745	// empty values are omitted from API requests. However, any non-pointer,
746	// non-interface field appearing in ForceSendFields will be sent to the
747	// server regardless of whether the field is empty or not. This may be
748	// used to include empty fields in Patch requests.
749	ForceSendFields []string `json:"-"`
750
751	// NullFields is a list of field names (e.g. "OutputConfig") to include
752	// in API requests with the JSON null value. By default, fields with
753	// empty values are omitted from API requests. However, any field with
754	// an empty value appearing in NullFields will be sent to the server as
755	// null. It is an error if a field in this list has a non-empty value.
756	// This may be used to include null fields in Patch requests.
757	NullFields []string `json:"-"`
758}
759
760func (s *AsyncBatchAnnotateImagesRequest) MarshalJSON() ([]byte, error) {
761	type NoMethod AsyncBatchAnnotateImagesRequest
762	raw := NoMethod(*s)
763	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
764}
765
766// AsyncBatchAnnotateImagesResponse: Response to an async batch image
767// annotation request.
768type AsyncBatchAnnotateImagesResponse struct {
769	// OutputConfig: The output location and metadata from
770	// AsyncBatchAnnotateImagesRequest.
771	OutputConfig *OutputConfig `json:"outputConfig,omitempty"`
772
773	// ForceSendFields is a list of field names (e.g. "OutputConfig") to
774	// unconditionally include in API requests. By default, fields with
775	// empty values are omitted from API requests. However, any non-pointer,
776	// non-interface field appearing in ForceSendFields will be sent to the
777	// server regardless of whether the field is empty or not. This may be
778	// used to include empty fields in Patch requests.
779	ForceSendFields []string `json:"-"`
780
781	// NullFields is a list of field names (e.g. "OutputConfig") to include
782	// in API requests with the JSON null value. By default, fields with
783	// empty values are omitted from API requests. However, any field with
784	// an empty value appearing in NullFields will be sent to the server as
785	// null. It is an error if a field in this list has a non-empty value.
786	// This may be used to include null fields in Patch requests.
787	NullFields []string `json:"-"`
788}
789
790func (s *AsyncBatchAnnotateImagesResponse) MarshalJSON() ([]byte, error) {
791	type NoMethod AsyncBatchAnnotateImagesResponse
792	raw := NoMethod(*s)
793	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
794}
795
796// BatchAnnotateFilesRequest: A list of requests to annotate files using
797// the BatchAnnotateFiles API.
798type BatchAnnotateFilesRequest struct {
799	// Parent: Optional. Target project and location to make a call. Format:
800	// `projects/{project-id}/locations/{location-id}`. If no parent is
801	// specified, a region will be chosen automatically. Supported
802	// location-ids: `us`: USA country only, `asia`: East asia areas, like
803	// Japan, Taiwan, `eu`: The European Union. Example:
804	// `projects/project-A/locations/eu`.
805	Parent string `json:"parent,omitempty"`
806
807	// Requests: Required. The list of file annotation requests. Right now
808	// we support only one AnnotateFileRequest in BatchAnnotateFilesRequest.
809	Requests []*AnnotateFileRequest `json:"requests,omitempty"`
810
811	// ForceSendFields is a list of field names (e.g. "Parent") to
812	// unconditionally include in API requests. By default, fields with
813	// empty values are omitted from API requests. However, any non-pointer,
814	// non-interface field appearing in ForceSendFields will be sent to the
815	// server regardless of whether the field is empty or not. This may be
816	// used to include empty fields in Patch requests.
817	ForceSendFields []string `json:"-"`
818
819	// NullFields is a list of field names (e.g. "Parent") to include in API
820	// requests with the JSON null value. By default, fields with empty
821	// values are omitted from API requests. However, any field with an
822	// empty value appearing in NullFields will be sent to the server as
823	// null. It is an error if a field in this list has a non-empty value.
824	// This may be used to include null fields in Patch requests.
825	NullFields []string `json:"-"`
826}
827
828func (s *BatchAnnotateFilesRequest) MarshalJSON() ([]byte, error) {
829	type NoMethod BatchAnnotateFilesRequest
830	raw := NoMethod(*s)
831	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
832}
833
834// BatchAnnotateFilesResponse: A list of file annotation responses.
835type BatchAnnotateFilesResponse struct {
836	// Responses: The list of file annotation responses, each response
837	// corresponding to each AnnotateFileRequest in
838	// BatchAnnotateFilesRequest.
839	Responses []*AnnotateFileResponse `json:"responses,omitempty"`
840
841	// ServerResponse contains the HTTP response code and headers from the
842	// server.
843	googleapi.ServerResponse `json:"-"`
844
845	// ForceSendFields is a list of field names (e.g. "Responses") to
846	// unconditionally include in API requests. By default, fields with
847	// empty values are omitted from API requests. However, any non-pointer,
848	// non-interface field appearing in ForceSendFields will be sent to the
849	// server regardless of whether the field is empty or not. This may be
850	// used to include empty fields in Patch requests.
851	ForceSendFields []string `json:"-"`
852
853	// NullFields is a list of field names (e.g. "Responses") to include in
854	// API requests with the JSON null value. By default, fields with empty
855	// values are omitted from API requests. However, any field with an
856	// empty value appearing in NullFields will be sent to the server as
857	// null. It is an error if a field in this list has a non-empty value.
858	// This may be used to include null fields in Patch requests.
859	NullFields []string `json:"-"`
860}
861
862func (s *BatchAnnotateFilesResponse) MarshalJSON() ([]byte, error) {
863	type NoMethod BatchAnnotateFilesResponse
864	raw := NoMethod(*s)
865	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
866}
867
868// BatchAnnotateImagesRequest: Multiple image annotation requests are
869// batched into a single service call.
870type BatchAnnotateImagesRequest struct {
871	// Parent: Optional. Target project and location to make a call. Format:
872	// `projects/{project-id}/locations/{location-id}`. If no parent is
873	// specified, a region will be chosen automatically. Supported
874	// location-ids: `us`: USA country only, `asia`: East asia areas, like
875	// Japan, Taiwan, `eu`: The European Union. Example:
876	// `projects/project-A/locations/eu`.
877	Parent string `json:"parent,omitempty"`
878
879	// Requests: Required. Individual image annotation requests for this
880	// batch.
881	Requests []*AnnotateImageRequest `json:"requests,omitempty"`
882
883	// ForceSendFields is a list of field names (e.g. "Parent") to
884	// unconditionally include in API requests. By default, fields with
885	// empty values are omitted from API requests. However, any non-pointer,
886	// non-interface field appearing in ForceSendFields will be sent to the
887	// server regardless of whether the field is empty or not. This may be
888	// used to include empty fields in Patch requests.
889	ForceSendFields []string `json:"-"`
890
891	// NullFields is a list of field names (e.g. "Parent") to include in API
892	// requests with the JSON null value. By default, fields with empty
893	// values are omitted from API requests. However, any field with an
894	// empty value appearing in NullFields will be sent to the server as
895	// null. It is an error if a field in this list has a non-empty value.
896	// This may be used to include null fields in Patch requests.
897	NullFields []string `json:"-"`
898}
899
900func (s *BatchAnnotateImagesRequest) MarshalJSON() ([]byte, error) {
901	type NoMethod BatchAnnotateImagesRequest
902	raw := NoMethod(*s)
903	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
904}
905
906// BatchAnnotateImagesResponse: Response to a batch image annotation
907// request.
908type BatchAnnotateImagesResponse struct {
909	// Responses: Individual responses to image annotation requests within
910	// the batch.
911	Responses []*AnnotateImageResponse `json:"responses,omitempty"`
912
913	// ServerResponse contains the HTTP response code and headers from the
914	// server.
915	googleapi.ServerResponse `json:"-"`
916
917	// ForceSendFields is a list of field names (e.g. "Responses") to
918	// unconditionally include in API requests. By default, fields with
919	// empty values are omitted from API requests. However, any non-pointer,
920	// non-interface field appearing in ForceSendFields will be sent to the
921	// server regardless of whether the field is empty or not. This may be
922	// used to include empty fields in Patch requests.
923	ForceSendFields []string `json:"-"`
924
925	// NullFields is a list of field names (e.g. "Responses") to include in
926	// API requests with the JSON null value. By default, fields with empty
927	// values are omitted from API requests. However, any field with an
928	// empty value appearing in NullFields will be sent to the server as
929	// null. It is an error if a field in this list has a non-empty value.
930	// This may be used to include null fields in Patch requests.
931	NullFields []string `json:"-"`
932}
933
934func (s *BatchAnnotateImagesResponse) MarshalJSON() ([]byte, error) {
935	type NoMethod BatchAnnotateImagesResponse
936	raw := NoMethod(*s)
937	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
938}
939
940// BatchOperationMetadata: Metadata for the batch operations such as the
941// current state. This is included in the `metadata` field of the
942// `Operation` returned by the `GetOperation` call of the
943// `google::longrunning::Operations` service.
944type BatchOperationMetadata struct {
945	// EndTime: The time when the batch request is finished and
946	// google.longrunning.Operation.done is set to true.
947	EndTime string `json:"endTime,omitempty"`
948
949	// State: The current state of the batch operation.
950	//
951	// Possible values:
952	//   "STATE_UNSPECIFIED" - Invalid.
953	//   "PROCESSING" - Request is actively being processed.
954	//   "SUCCESSFUL" - The request is done and at least one item has been
955	// successfully processed.
956	//   "FAILED" - The request is done and no item has been successfully
957	// processed.
958	//   "CANCELLED" - The request is done after the
959	// longrunning.Operations.CancelOperation has been called by the user.
960	// Any records that were processed before the cancel command are output
961	// as specified in the request.
962	State string `json:"state,omitempty"`
963
964	// SubmitTime: The time when the batch request was submitted to the
965	// server.
966	SubmitTime string `json:"submitTime,omitempty"`
967
968	// ForceSendFields is a list of field names (e.g. "EndTime") to
969	// unconditionally include in API requests. By default, fields with
970	// empty values are omitted from API requests. However, any non-pointer,
971	// non-interface field appearing in ForceSendFields will be sent to the
972	// server regardless of whether the field is empty or not. This may be
973	// used to include empty fields in Patch requests.
974	ForceSendFields []string `json:"-"`
975
976	// NullFields is a list of field names (e.g. "EndTime") to include in
977	// API requests with the JSON null value. By default, fields with empty
978	// values are omitted from API requests. However, any field with an
979	// empty value appearing in NullFields will be sent to the server as
980	// null. It is an error if a field in this list has a non-empty value.
981	// This may be used to include null fields in Patch requests.
982	NullFields []string `json:"-"`
983}
984
985func (s *BatchOperationMetadata) MarshalJSON() ([]byte, error) {
986	type NoMethod BatchOperationMetadata
987	raw := NoMethod(*s)
988	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
989}
990
991// Block: Logical element on the page.
992type Block struct {
993	// BlockType: Detected block type (text, image etc) for this block.
994	//
995	// Possible values:
996	//   "UNKNOWN" - Unknown block type.
997	//   "TEXT" - Regular text block.
998	//   "TABLE" - Table block.
999	//   "PICTURE" - Image block.
1000	//   "RULER" - Horizontal/vertical line box.
1001	//   "BARCODE" - Barcode block.
1002	BlockType string `json:"blockType,omitempty"`
1003
1004	// BoundingBox: The bounding box for the block. The vertices are in the
1005	// order of top-left, top-right, bottom-right, bottom-left. When a
1006	// rotation of the bounding box is detected the rotation is represented
1007	// as around the top-left corner as defined when the text is read in the
1008	// 'natural' orientation. For example: * when the text is horizontal it
1009	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
1010	// around the top-left corner it becomes: 2----3 | | 1----0 and the
1011	// vertex order will still be (0, 1, 2, 3).
1012	BoundingBox *BoundingPoly `json:"boundingBox,omitempty"`
1013
1014	// Confidence: Confidence of the OCR results on the block. Range [0, 1].
1015	Confidence float64 `json:"confidence,omitempty"`
1016
1017	// Paragraphs: List of paragraphs in this block (if this blocks is of
1018	// type text).
1019	Paragraphs []*Paragraph `json:"paragraphs,omitempty"`
1020
1021	// Property: Additional information detected for the block.
1022	Property *TextProperty `json:"property,omitempty"`
1023
1024	// ForceSendFields is a list of field names (e.g. "BlockType") to
1025	// unconditionally include in API requests. By default, fields with
1026	// empty values are omitted from API requests. However, any non-pointer,
1027	// non-interface field appearing in ForceSendFields will be sent to the
1028	// server regardless of whether the field is empty or not. This may be
1029	// used to include empty fields in Patch requests.
1030	ForceSendFields []string `json:"-"`
1031
1032	// NullFields is a list of field names (e.g. "BlockType") to include in
1033	// API requests with the JSON null value. By default, fields with empty
1034	// values are omitted from API requests. However, any field with an
1035	// empty value appearing in NullFields will be sent to the server as
1036	// null. It is an error if a field in this list has a non-empty value.
1037	// This may be used to include null fields in Patch requests.
1038	NullFields []string `json:"-"`
1039}
1040
1041func (s *Block) MarshalJSON() ([]byte, error) {
1042	type NoMethod Block
1043	raw := NoMethod(*s)
1044	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1045}
1046
1047func (s *Block) UnmarshalJSON(data []byte) error {
1048	type NoMethod Block
1049	var s1 struct {
1050		Confidence gensupport.JSONFloat64 `json:"confidence"`
1051		*NoMethod
1052	}
1053	s1.NoMethod = (*NoMethod)(s)
1054	if err := json.Unmarshal(data, &s1); err != nil {
1055		return err
1056	}
1057	s.Confidence = float64(s1.Confidence)
1058	return nil
1059}
1060
1061// BoundingPoly: A bounding polygon for the detected image annotation.
1062type BoundingPoly struct {
1063	// NormalizedVertices: The bounding polygon normalized vertices.
1064	NormalizedVertices []*NormalizedVertex `json:"normalizedVertices,omitempty"`
1065
1066	// Vertices: The bounding polygon vertices.
1067	Vertices []*Vertex `json:"vertices,omitempty"`
1068
1069	// ForceSendFields is a list of field names (e.g. "NormalizedVertices")
1070	// to unconditionally include in API requests. By default, fields with
1071	// empty values are omitted from API requests. However, any non-pointer,
1072	// non-interface field appearing in ForceSendFields will be sent to the
1073	// server regardless of whether the field is empty or not. This may be
1074	// used to include empty fields in Patch requests.
1075	ForceSendFields []string `json:"-"`
1076
1077	// NullFields is a list of field names (e.g. "NormalizedVertices") to
1078	// include in API requests with the JSON null value. By default, fields
1079	// with empty values are omitted from API requests. However, any field
1080	// with an empty value appearing in NullFields will be sent to the
1081	// server as null. It is an error if a field in this list has a
1082	// non-empty value. This may be used to include null fields in Patch
1083	// requests.
1084	NullFields []string `json:"-"`
1085}
1086
1087func (s *BoundingPoly) MarshalJSON() ([]byte, error) {
1088	type NoMethod BoundingPoly
1089	raw := NoMethod(*s)
1090	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1091}
1092
1093// CancelOperationRequest: The request message for
1094// Operations.CancelOperation.
1095type CancelOperationRequest struct {
1096}
1097
1098// Color: Represents a color in the RGBA color space. This
1099// representation is designed for simplicity of conversion to/from color
1100// representations in various languages over compactness. For example,
1101// the fields of this representation can be trivially provided to the
1102// constructor of `java.awt.Color` in Java; it can also be trivially
1103// provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS;
1104// and, with just a little work, it can be easily formatted into a CSS
1105// `rgba()` string in JavaScript. This reference page doesn't carry
1106// information about the absolute color space that should be used to
1107// interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020,
1108// etc.). By default, applications should assume the sRGB color space.
1109// When color equality needs to be decided, implementations, unless
1110// documented otherwise, treat two colors as equal if all their red,
1111// green, blue, and alpha values each differ by at most 1e-5. Example
1112// (Java): import com.google.type.Color; // ... public static
1113// java.awt.Color fromProto(Color protocolor) { float alpha =
1114// protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0;
1115// return new java.awt.Color( protocolor.getRed(),
1116// protocolor.getGreen(), protocolor.getBlue(), alpha); } public static
1117// Color toProto(java.awt.Color color) { float red = (float)
1118// color.getRed(); float green = (float) color.getGreen(); float blue =
1119// (float) color.getBlue(); float denominator = 255.0; Color.Builder
1120// resultBuilder = Color .newBuilder() .setRed(red / denominator)
1121// .setGreen(green / denominator) .setBlue(blue / denominator); int
1122// alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha(
1123// FloatValue .newBuilder() .setValue(((float) alpha) / denominator)
1124// .build()); } return resultBuilder.build(); } // ... Example (iOS /
1125// Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float
1126// red = [protocolor red]; float green = [protocolor green]; float blue
1127// = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha];
1128// float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper
1129// value]; } return [UIColor colorWithRed:red green:green blue:blue
1130// alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red,
1131// green, blue, alpha; if (![color getRed:&red green:&green blue:&blue
1132// alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init];
1133// [result setRed:red]; [result setGreen:green]; [result setBlue:blue];
1134// if (alpha <= 0.9999) { [result
1135// setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease];
1136// return result; } // ... Example (JavaScript): // ... var
1137// protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red
1138// || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac =
1139// rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green
1140// = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255);
1141// if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green,
1142// blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams
1143// = [red, green, blue].join(','); return ['rgba(', rgbParams, ',',
1144// alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green,
1145// blue) { var rgbNumber = new Number((red << 16) | (green << 8) |
1146// blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 -
1147// hexString.length; var resultBuilder = ['#']; for (var i = 0; i <
1148// missingZeros; i++) { resultBuilder.push('0'); }
1149// resultBuilder.push(hexString); return resultBuilder.join(''); }; //
1150// ...
1151type Color struct {
1152	// Alpha: The fraction of this color that should be applied to the
1153	// pixel. That is, the final pixel color is defined by the equation:
1154	// `pixel color = alpha * (this color) + (1.0 - alpha) * (background
1155	// color)` This means that a value of 1.0 corresponds to a solid color,
1156	// whereas a value of 0.0 corresponds to a completely transparent color.
1157	// This uses a wrapper message rather than a simple float scalar so that
1158	// it is possible to distinguish between a default value and the value
1159	// being unset. If omitted, this color object is rendered as a solid
1160	// color (as if the alpha value had been explicitly given a value of
1161	// 1.0).
1162	Alpha float64 `json:"alpha,omitempty"`
1163
1164	// Blue: The amount of blue in the color as a value in the interval [0,
1165	// 1].
1166	Blue float64 `json:"blue,omitempty"`
1167
1168	// Green: The amount of green in the color as a value in the interval
1169	// [0, 1].
1170	Green float64 `json:"green,omitempty"`
1171
1172	// Red: The amount of red in the color as a value in the interval [0,
1173	// 1].
1174	Red float64 `json:"red,omitempty"`
1175
1176	// ForceSendFields is a list of field names (e.g. "Alpha") to
1177	// unconditionally include in API requests. By default, fields with
1178	// empty values are omitted from API requests. However, any non-pointer,
1179	// non-interface field appearing in ForceSendFields will be sent to the
1180	// server regardless of whether the field is empty or not. This may be
1181	// used to include empty fields in Patch requests.
1182	ForceSendFields []string `json:"-"`
1183
1184	// NullFields is a list of field names (e.g. "Alpha") to include in API
1185	// requests with the JSON null value. By default, fields with empty
1186	// values are omitted from API requests. However, any field with an
1187	// empty value appearing in NullFields will be sent to the server as
1188	// null. It is an error if a field in this list has a non-empty value.
1189	// This may be used to include null fields in Patch requests.
1190	NullFields []string `json:"-"`
1191}
1192
1193func (s *Color) MarshalJSON() ([]byte, error) {
1194	type NoMethod Color
1195	raw := NoMethod(*s)
1196	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1197}
1198
1199func (s *Color) UnmarshalJSON(data []byte) error {
1200	type NoMethod Color
1201	var s1 struct {
1202		Alpha gensupport.JSONFloat64 `json:"alpha"`
1203		Blue  gensupport.JSONFloat64 `json:"blue"`
1204		Green gensupport.JSONFloat64 `json:"green"`
1205		Red   gensupport.JSONFloat64 `json:"red"`
1206		*NoMethod
1207	}
1208	s1.NoMethod = (*NoMethod)(s)
1209	if err := json.Unmarshal(data, &s1); err != nil {
1210		return err
1211	}
1212	s.Alpha = float64(s1.Alpha)
1213	s.Blue = float64(s1.Blue)
1214	s.Green = float64(s1.Green)
1215	s.Red = float64(s1.Red)
1216	return nil
1217}
1218
1219// ColorInfo: Color information consists of RGB channels, score, and the
1220// fraction of the image that the color occupies in the image.
1221type ColorInfo struct {
1222	// Color: RGB components of the color.
1223	Color *Color `json:"color,omitempty"`
1224
1225	// PixelFraction: The fraction of pixels the color occupies in the
1226	// image. Value in range [0, 1].
1227	PixelFraction float64 `json:"pixelFraction,omitempty"`
1228
1229	// Score: Image-specific score for this color. Value in range [0, 1].
1230	Score float64 `json:"score,omitempty"`
1231
1232	// ForceSendFields is a list of field names (e.g. "Color") to
1233	// unconditionally include in API requests. By default, fields with
1234	// empty values are omitted from API requests. However, any non-pointer,
1235	// non-interface field appearing in ForceSendFields will be sent to the
1236	// server regardless of whether the field is empty or not. This may be
1237	// used to include empty fields in Patch requests.
1238	ForceSendFields []string `json:"-"`
1239
1240	// NullFields is a list of field names (e.g. "Color") to include in API
1241	// requests with the JSON null value. By default, fields with empty
1242	// values are omitted from API requests. However, any field with an
1243	// empty value appearing in NullFields will be sent to the server as
1244	// null. It is an error if a field in this list has a non-empty value.
1245	// This may be used to include null fields in Patch requests.
1246	NullFields []string `json:"-"`
1247}
1248
1249func (s *ColorInfo) MarshalJSON() ([]byte, error) {
1250	type NoMethod ColorInfo
1251	raw := NoMethod(*s)
1252	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1253}
1254
1255func (s *ColorInfo) UnmarshalJSON(data []byte) error {
1256	type NoMethod ColorInfo
1257	var s1 struct {
1258		PixelFraction gensupport.JSONFloat64 `json:"pixelFraction"`
1259		Score         gensupport.JSONFloat64 `json:"score"`
1260		*NoMethod
1261	}
1262	s1.NoMethod = (*NoMethod)(s)
1263	if err := json.Unmarshal(data, &s1); err != nil {
1264		return err
1265	}
1266	s.PixelFraction = float64(s1.PixelFraction)
1267	s.Score = float64(s1.Score)
1268	return nil
1269}
1270
1271// CropHint: Single crop hint that is used to generate a new crop when
1272// serving an image.
1273type CropHint struct {
1274	// BoundingPoly: The bounding polygon for the crop region. The
1275	// coordinates of the bounding box are in the original image's scale.
1276	BoundingPoly *BoundingPoly `json:"boundingPoly,omitempty"`
1277
1278	// Confidence: Confidence of this being a salient region. Range [0, 1].
1279	Confidence float64 `json:"confidence,omitempty"`
1280
1281	// ImportanceFraction: Fraction of importance of this salient region
1282	// with respect to the original image.
1283	ImportanceFraction float64 `json:"importanceFraction,omitempty"`
1284
1285	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
1286	// unconditionally include in API requests. By default, fields with
1287	// empty values are omitted from API requests. However, any non-pointer,
1288	// non-interface field appearing in ForceSendFields will be sent to the
1289	// server regardless of whether the field is empty or not. This may be
1290	// used to include empty fields in Patch requests.
1291	ForceSendFields []string `json:"-"`
1292
1293	// NullFields is a list of field names (e.g. "BoundingPoly") to include
1294	// in API requests with the JSON null value. By default, fields with
1295	// empty values are omitted from API requests. However, any field with
1296	// an empty value appearing in NullFields will be sent to the server as
1297	// null. It is an error if a field in this list has a non-empty value.
1298	// This may be used to include null fields in Patch requests.
1299	NullFields []string `json:"-"`
1300}
1301
1302func (s *CropHint) MarshalJSON() ([]byte, error) {
1303	type NoMethod CropHint
1304	raw := NoMethod(*s)
1305	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1306}
1307
1308func (s *CropHint) UnmarshalJSON(data []byte) error {
1309	type NoMethod CropHint
1310	var s1 struct {
1311		Confidence         gensupport.JSONFloat64 `json:"confidence"`
1312		ImportanceFraction gensupport.JSONFloat64 `json:"importanceFraction"`
1313		*NoMethod
1314	}
1315	s1.NoMethod = (*NoMethod)(s)
1316	if err := json.Unmarshal(data, &s1); err != nil {
1317		return err
1318	}
1319	s.Confidence = float64(s1.Confidence)
1320	s.ImportanceFraction = float64(s1.ImportanceFraction)
1321	return nil
1322}
1323
1324// CropHintsAnnotation: Set of crop hints that are used to generate new
1325// crops when serving images.
1326type CropHintsAnnotation struct {
1327	// CropHints: Crop hint results.
1328	CropHints []*CropHint `json:"cropHints,omitempty"`
1329
1330	// ForceSendFields is a list of field names (e.g. "CropHints") to
1331	// unconditionally include in API requests. By default, fields with
1332	// empty values are omitted from API requests. However, any non-pointer,
1333	// non-interface field appearing in ForceSendFields will be sent to the
1334	// server regardless of whether the field is empty or not. This may be
1335	// used to include empty fields in Patch requests.
1336	ForceSendFields []string `json:"-"`
1337
1338	// NullFields is a list of field names (e.g. "CropHints") to include in
1339	// API requests with the JSON null value. By default, fields with empty
1340	// values are omitted from API requests. However, any field with an
1341	// empty value appearing in NullFields will be sent to the server as
1342	// null. It is an error if a field in this list has a non-empty value.
1343	// This may be used to include null fields in Patch requests.
1344	NullFields []string `json:"-"`
1345}
1346
1347func (s *CropHintsAnnotation) MarshalJSON() ([]byte, error) {
1348	type NoMethod CropHintsAnnotation
1349	raw := NoMethod(*s)
1350	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1351}
1352
1353// CropHintsParams: Parameters for crop hints annotation request.
1354type CropHintsParams struct {
1355	// AspectRatios: Aspect ratios in floats, representing the ratio of the
1356	// width to the height of the image. For example, if the desired aspect
1357	// ratio is 4/3, the corresponding float value should be 1.33333. If not
1358	// specified, the best possible crop is returned. The number of provided
1359	// aspect ratios is limited to a maximum of 16; any aspect ratios
1360	// provided after the 16th are ignored.
1361	AspectRatios []float64 `json:"aspectRatios,omitempty"`
1362
1363	// ForceSendFields is a list of field names (e.g. "AspectRatios") to
1364	// unconditionally include in API requests. By default, fields with
1365	// empty values are omitted from API requests. However, any non-pointer,
1366	// non-interface field appearing in ForceSendFields will be sent to the
1367	// server regardless of whether the field is empty or not. This may be
1368	// used to include empty fields in Patch requests.
1369	ForceSendFields []string `json:"-"`
1370
1371	// NullFields is a list of field names (e.g. "AspectRatios") to include
1372	// in API requests with the JSON null value. By default, fields with
1373	// empty values are omitted from API requests. However, any field with
1374	// an empty value appearing in NullFields will be sent to the server as
1375	// null. It is an error if a field in this list has a non-empty value.
1376	// This may be used to include null fields in Patch requests.
1377	NullFields []string `json:"-"`
1378}
1379
1380func (s *CropHintsParams) MarshalJSON() ([]byte, error) {
1381	type NoMethod CropHintsParams
1382	raw := NoMethod(*s)
1383	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1384}
1385
1386// DetectedBreak: Detected start or end of a structural component.
1387type DetectedBreak struct {
1388	// IsPrefix: True if break prepends the element.
1389	IsPrefix bool `json:"isPrefix,omitempty"`
1390
1391	// Type: Detected break type.
1392	//
1393	// Possible values:
1394	//   "UNKNOWN" - Unknown break label type.
1395	//   "SPACE" - Regular space.
1396	//   "SURE_SPACE" - Sure space (very wide).
1397	//   "EOL_SURE_SPACE" - Line-wrapping break.
1398	//   "HYPHEN" - End-line hyphen that is not present in text; does not
1399	// co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
1400	//   "LINE_BREAK" - Line break that ends a paragraph.
1401	Type string `json:"type,omitempty"`
1402
1403	// ForceSendFields is a list of field names (e.g. "IsPrefix") to
1404	// unconditionally include in API requests. By default, fields with
1405	// empty values are omitted from API requests. However, any non-pointer,
1406	// non-interface field appearing in ForceSendFields will be sent to the
1407	// server regardless of whether the field is empty or not. This may be
1408	// used to include empty fields in Patch requests.
1409	ForceSendFields []string `json:"-"`
1410
1411	// NullFields is a list of field names (e.g. "IsPrefix") to include in
1412	// API requests with the JSON null value. By default, fields with empty
1413	// values are omitted from API requests. However, any field with an
1414	// empty value appearing in NullFields will be sent to the server as
1415	// null. It is an error if a field in this list has a non-empty value.
1416	// This may be used to include null fields in Patch requests.
1417	NullFields []string `json:"-"`
1418}
1419
1420func (s *DetectedBreak) MarshalJSON() ([]byte, error) {
1421	type NoMethod DetectedBreak
1422	raw := NoMethod(*s)
1423	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1424}
1425
1426// DetectedLanguage: Detected language for a structural component.
1427type DetectedLanguage struct {
1428	// Confidence: Confidence of detected language. Range [0, 1].
1429	Confidence float64 `json:"confidence,omitempty"`
1430
1431	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
1432	// For more information, see
1433	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
1434	LanguageCode string `json:"languageCode,omitempty"`
1435
1436	// ForceSendFields is a list of field names (e.g. "Confidence") to
1437	// unconditionally include in API requests. By default, fields with
1438	// empty values are omitted from API requests. However, any non-pointer,
1439	// non-interface field appearing in ForceSendFields will be sent to the
1440	// server regardless of whether the field is empty or not. This may be
1441	// used to include empty fields in Patch requests.
1442	ForceSendFields []string `json:"-"`
1443
1444	// NullFields is a list of field names (e.g. "Confidence") to include in
1445	// API requests with the JSON null value. By default, fields with empty
1446	// values are omitted from API requests. However, any field with an
1447	// empty value appearing in NullFields will be sent to the server as
1448	// null. It is an error if a field in this list has a non-empty value.
1449	// This may be used to include null fields in Patch requests.
1450	NullFields []string `json:"-"`
1451}
1452
1453func (s *DetectedLanguage) MarshalJSON() ([]byte, error) {
1454	type NoMethod DetectedLanguage
1455	raw := NoMethod(*s)
1456	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1457}
1458
1459func (s *DetectedLanguage) UnmarshalJSON(data []byte) error {
1460	type NoMethod DetectedLanguage
1461	var s1 struct {
1462		Confidence gensupport.JSONFloat64 `json:"confidence"`
1463		*NoMethod
1464	}
1465	s1.NoMethod = (*NoMethod)(s)
1466	if err := json.Unmarshal(data, &s1); err != nil {
1467		return err
1468	}
1469	s.Confidence = float64(s1.Confidence)
1470	return nil
1471}
1472
1473// DominantColorsAnnotation: Set of dominant colors and their
1474// corresponding scores.
1475type DominantColorsAnnotation struct {
1476	// Colors: RGB color values with their score and pixel fraction.
1477	Colors []*ColorInfo `json:"colors,omitempty"`
1478
1479	// ForceSendFields is a list of field names (e.g. "Colors") to
1480	// unconditionally include in API requests. By default, fields with
1481	// empty values are omitted from API requests. However, any non-pointer,
1482	// non-interface field appearing in ForceSendFields will be sent to the
1483	// server regardless of whether the field is empty or not. This may be
1484	// used to include empty fields in Patch requests.
1485	ForceSendFields []string `json:"-"`
1486
1487	// NullFields is a list of field names (e.g. "Colors") to include in API
1488	// requests with the JSON null value. By default, fields with empty
1489	// values are omitted from API requests. However, any field with an
1490	// empty value appearing in NullFields will be sent to the server as
1491	// null. It is an error if a field in this list has a non-empty value.
1492	// This may be used to include null fields in Patch requests.
1493	NullFields []string `json:"-"`
1494}
1495
1496func (s *DominantColorsAnnotation) MarshalJSON() ([]byte, error) {
1497	type NoMethod DominantColorsAnnotation
1498	raw := NoMethod(*s)
1499	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1500}
1501
1502// Empty: A generic empty message that you can re-use to avoid defining
1503// duplicated empty messages in your APIs. A typical example is to use
1504// it as the request or the response type of an API method. For
1505// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
1506// (google.protobuf.Empty); } The JSON representation for `Empty` is
1507// empty JSON object `{}`.
1508type Empty struct {
1509	// ServerResponse contains the HTTP response code and headers from the
1510	// server.
1511	googleapi.ServerResponse `json:"-"`
1512}
1513
1514// EntityAnnotation: Set of detected entity features.
1515type EntityAnnotation struct {
1516	// BoundingPoly: Image region to which this entity belongs. Not produced
1517	// for `LABEL_DETECTION` features.
1518	BoundingPoly *BoundingPoly `json:"boundingPoly,omitempty"`
1519
1520	// Confidence: **Deprecated. Use `score` instead.** The accuracy of the
1521	// entity detection in an image. For example, for an image in which the
1522	// "Eiffel Tower" entity is detected, this field represents the
1523	// confidence that there is a tower in the query image. Range [0, 1].
1524	Confidence float64 `json:"confidence,omitempty"`
1525
1526	// Description: Entity textual description, expressed in its `locale`
1527	// language.
1528	Description string `json:"description,omitempty"`
1529
1530	// Locale: The language code for the locale in which the entity textual
1531	// `description` is expressed.
1532	Locale string `json:"locale,omitempty"`
1533
1534	// Locations: The location information for the detected entity. Multiple
1535	// `LocationInfo` elements can be present because one location may
1536	// indicate the location of the scene in the image, and another location
1537	// may indicate the location of the place where the image was taken.
1538	// Location information is usually present for landmarks.
1539	Locations []*LocationInfo `json:"locations,omitempty"`
1540
1541	// Mid: Opaque entity ID. Some IDs may be available in Google Knowledge
1542	// Graph Search API (https://developers.google.com/knowledge-graph/).
1543	Mid string `json:"mid,omitempty"`
1544
1545	// Properties: Some entities may have optional user-supplied `Property`
1546	// (name/value) fields, such a score or string that qualifies the
1547	// entity.
1548	Properties []*Property `json:"properties,omitempty"`
1549
1550	// Score: Overall score of the result. Range [0, 1].
1551	Score float64 `json:"score,omitempty"`
1552
1553	// Topicality: The relevancy of the ICA (Image Content Annotation) label
1554	// to the image. For example, the relevancy of "tower" is likely higher
1555	// to an image containing the detected "Eiffel Tower" than to an image
1556	// containing a detected distant towering building, even though the
1557	// confidence that there is a tower in each image may be the same. Range
1558	// [0, 1].
1559	Topicality float64 `json:"topicality,omitempty"`
1560
1561	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
1562	// unconditionally include in API requests. By default, fields with
1563	// empty values are omitted from API requests. However, any non-pointer,
1564	// non-interface field appearing in ForceSendFields will be sent to the
1565	// server regardless of whether the field is empty or not. This may be
1566	// used to include empty fields in Patch requests.
1567	ForceSendFields []string `json:"-"`
1568
1569	// NullFields is a list of field names (e.g. "BoundingPoly") to include
1570	// in API requests with the JSON null value. By default, fields with
1571	// empty values are omitted from API requests. However, any field with
1572	// an empty value appearing in NullFields will be sent to the server as
1573	// null. It is an error if a field in this list has a non-empty value.
1574	// This may be used to include null fields in Patch requests.
1575	NullFields []string `json:"-"`
1576}
1577
1578func (s *EntityAnnotation) MarshalJSON() ([]byte, error) {
1579	type NoMethod EntityAnnotation
1580	raw := NoMethod(*s)
1581	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1582}
1583
1584func (s *EntityAnnotation) UnmarshalJSON(data []byte) error {
1585	type NoMethod EntityAnnotation
1586	var s1 struct {
1587		Confidence gensupport.JSONFloat64 `json:"confidence"`
1588		Score      gensupport.JSONFloat64 `json:"score"`
1589		Topicality gensupport.JSONFloat64 `json:"topicality"`
1590		*NoMethod
1591	}
1592	s1.NoMethod = (*NoMethod)(s)
1593	if err := json.Unmarshal(data, &s1); err != nil {
1594		return err
1595	}
1596	s.Confidence = float64(s1.Confidence)
1597	s.Score = float64(s1.Score)
1598	s.Topicality = float64(s1.Topicality)
1599	return nil
1600}
1601
1602// FaceAnnotation: A face annotation object contains the results of face
1603// detection.
1604type FaceAnnotation struct {
1605	// AngerLikelihood: Anger likelihood.
1606	//
1607	// Possible values:
1608	//   "UNKNOWN" - Unknown likelihood.
1609	//   "VERY_UNLIKELY" - It is very unlikely.
1610	//   "UNLIKELY" - It is unlikely.
1611	//   "POSSIBLE" - It is possible.
1612	//   "LIKELY" - It is likely.
1613	//   "VERY_LIKELY" - It is very likely.
1614	AngerLikelihood string `json:"angerLikelihood,omitempty"`
1615
1616	// BlurredLikelihood: Blurred likelihood.
1617	//
1618	// Possible values:
1619	//   "UNKNOWN" - Unknown likelihood.
1620	//   "VERY_UNLIKELY" - It is very unlikely.
1621	//   "UNLIKELY" - It is unlikely.
1622	//   "POSSIBLE" - It is possible.
1623	//   "LIKELY" - It is likely.
1624	//   "VERY_LIKELY" - It is very likely.
1625	BlurredLikelihood string `json:"blurredLikelihood,omitempty"`
1626
1627	// BoundingPoly: The bounding polygon around the face. The coordinates
1628	// of the bounding box are in the original image's scale. The bounding
1629	// box is computed to "frame" the face in accordance with human
1630	// expectations. It is based on the landmarker results. Note that one or
1631	// more x and/or y coordinates may not be generated in the
1632	// `BoundingPoly` (the polygon will be unbounded) if only a partial face
1633	// appears in the image to be annotated.
1634	BoundingPoly *BoundingPoly `json:"boundingPoly,omitempty"`
1635
1636	// DetectionConfidence: Detection confidence. Range [0, 1].
1637	DetectionConfidence float64 `json:"detectionConfidence,omitempty"`
1638
1639	// FdBoundingPoly: The `fd_bounding_poly` bounding polygon is tighter
1640	// than the `boundingPoly`, and encloses only the skin part of the face.
1641	// Typically, it is used to eliminate the face from any image analysis
1642	// that detects the "amount of skin" visible in an image. It is not
1643	// based on the landmarker results, only on the initial face detection,
1644	// hence the fd (face detection) prefix.
1645	FdBoundingPoly *BoundingPoly `json:"fdBoundingPoly,omitempty"`
1646
1647	// HeadwearLikelihood: Headwear likelihood.
1648	//
1649	// Possible values:
1650	//   "UNKNOWN" - Unknown likelihood.
1651	//   "VERY_UNLIKELY" - It is very unlikely.
1652	//   "UNLIKELY" - It is unlikely.
1653	//   "POSSIBLE" - It is possible.
1654	//   "LIKELY" - It is likely.
1655	//   "VERY_LIKELY" - It is very likely.
1656	HeadwearLikelihood string `json:"headwearLikelihood,omitempty"`
1657
1658	// JoyLikelihood: Joy likelihood.
1659	//
1660	// Possible values:
1661	//   "UNKNOWN" - Unknown likelihood.
1662	//   "VERY_UNLIKELY" - It is very unlikely.
1663	//   "UNLIKELY" - It is unlikely.
1664	//   "POSSIBLE" - It is possible.
1665	//   "LIKELY" - It is likely.
1666	//   "VERY_LIKELY" - It is very likely.
1667	JoyLikelihood string `json:"joyLikelihood,omitempty"`
1668
1669	// LandmarkingConfidence: Face landmarking confidence. Range [0, 1].
1670	LandmarkingConfidence float64 `json:"landmarkingConfidence,omitempty"`
1671
1672	// Landmarks: Detected face landmarks.
1673	Landmarks []*Landmark `json:"landmarks,omitempty"`
1674
1675	// PanAngle: Yaw angle, which indicates the leftward/rightward angle
1676	// that the face is pointing relative to the vertical plane
1677	// perpendicular to the image. Range [-180,180].
1678	PanAngle float64 `json:"panAngle,omitempty"`
1679
1680	// RollAngle: Roll angle, which indicates the amount of
1681	// clockwise/anti-clockwise rotation of the face relative to the image
1682	// vertical about the axis perpendicular to the face. Range [-180,180].
1683	RollAngle float64 `json:"rollAngle,omitempty"`
1684
1685	// SorrowLikelihood: Sorrow likelihood.
1686	//
1687	// Possible values:
1688	//   "UNKNOWN" - Unknown likelihood.
1689	//   "VERY_UNLIKELY" - It is very unlikely.
1690	//   "UNLIKELY" - It is unlikely.
1691	//   "POSSIBLE" - It is possible.
1692	//   "LIKELY" - It is likely.
1693	//   "VERY_LIKELY" - It is very likely.
1694	SorrowLikelihood string `json:"sorrowLikelihood,omitempty"`
1695
1696	// SurpriseLikelihood: Surprise likelihood.
1697	//
1698	// Possible values:
1699	//   "UNKNOWN" - Unknown likelihood.
1700	//   "VERY_UNLIKELY" - It is very unlikely.
1701	//   "UNLIKELY" - It is unlikely.
1702	//   "POSSIBLE" - It is possible.
1703	//   "LIKELY" - It is likely.
1704	//   "VERY_LIKELY" - It is very likely.
1705	SurpriseLikelihood string `json:"surpriseLikelihood,omitempty"`
1706
1707	// TiltAngle: Pitch angle, which indicates the upwards/downwards angle
1708	// that the face is pointing relative to the image's horizontal plane.
1709	// Range [-180,180].
1710	TiltAngle float64 `json:"tiltAngle,omitempty"`
1711
1712	// UnderExposedLikelihood: Under-exposed likelihood.
1713	//
1714	// Possible values:
1715	//   "UNKNOWN" - Unknown likelihood.
1716	//   "VERY_UNLIKELY" - It is very unlikely.
1717	//   "UNLIKELY" - It is unlikely.
1718	//   "POSSIBLE" - It is possible.
1719	//   "LIKELY" - It is likely.
1720	//   "VERY_LIKELY" - It is very likely.
1721	UnderExposedLikelihood string `json:"underExposedLikelihood,omitempty"`
1722
1723	// ForceSendFields is a list of field names (e.g. "AngerLikelihood") to
1724	// unconditionally include in API requests. By default, fields with
1725	// empty values are omitted from API requests. However, any non-pointer,
1726	// non-interface field appearing in ForceSendFields will be sent to the
1727	// server regardless of whether the field is empty or not. This may be
1728	// used to include empty fields in Patch requests.
1729	ForceSendFields []string `json:"-"`
1730
1731	// NullFields is a list of field names (e.g. "AngerLikelihood") to
1732	// include in API requests with the JSON null value. By default, fields
1733	// with empty values are omitted from API requests. However, any field
1734	// with an empty value appearing in NullFields will be sent to the
1735	// server as null. It is an error if a field in this list has a
1736	// non-empty value. This may be used to include null fields in Patch
1737	// requests.
1738	NullFields []string `json:"-"`
1739}
1740
1741func (s *FaceAnnotation) MarshalJSON() ([]byte, error) {
1742	type NoMethod FaceAnnotation
1743	raw := NoMethod(*s)
1744	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1745}
1746
1747func (s *FaceAnnotation) UnmarshalJSON(data []byte) error {
1748	type NoMethod FaceAnnotation
1749	var s1 struct {
1750		DetectionConfidence   gensupport.JSONFloat64 `json:"detectionConfidence"`
1751		LandmarkingConfidence gensupport.JSONFloat64 `json:"landmarkingConfidence"`
1752		PanAngle              gensupport.JSONFloat64 `json:"panAngle"`
1753		RollAngle             gensupport.JSONFloat64 `json:"rollAngle"`
1754		TiltAngle             gensupport.JSONFloat64 `json:"tiltAngle"`
1755		*NoMethod
1756	}
1757	s1.NoMethod = (*NoMethod)(s)
1758	if err := json.Unmarshal(data, &s1); err != nil {
1759		return err
1760	}
1761	s.DetectionConfidence = float64(s1.DetectionConfidence)
1762	s.LandmarkingConfidence = float64(s1.LandmarkingConfidence)
1763	s.PanAngle = float64(s1.PanAngle)
1764	s.RollAngle = float64(s1.RollAngle)
1765	s.TiltAngle = float64(s1.TiltAngle)
1766	return nil
1767}
1768
1769// Feature: The type of Google Cloud Vision API detection to perform,
1770// and the maximum number of results to return for that type. Multiple
1771// `Feature` objects can be specified in the `features` list.
1772type Feature struct {
1773	// MaxResults: Maximum number of results of this type. Does not apply to
1774	// `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
1775	MaxResults int64 `json:"maxResults,omitempty"`
1776
1777	// Model: Model to use for the feature. Supported values:
1778	// "builtin/stable" (the default if unset) and "builtin/latest".
1779	Model string `json:"model,omitempty"`
1780
1781	// Type: The feature type.
1782	//
1783	// Possible values:
1784	//   "TYPE_UNSPECIFIED" - Unspecified feature type.
1785	//   "FACE_DETECTION" - Run face detection.
1786	//   "LANDMARK_DETECTION" - Run landmark detection.
1787	//   "LOGO_DETECTION" - Run logo detection.
1788	//   "LABEL_DETECTION" - Run label detection.
1789	//   "TEXT_DETECTION" - Run text detection / optical character
1790	// recognition (OCR). Text detection is optimized for areas of text
1791	// within a larger image; if the image is a document, use
1792	// `DOCUMENT_TEXT_DETECTION` instead.
1793	//   "DOCUMENT_TEXT_DETECTION" - Run dense text document OCR. Takes
1794	// precedence when both `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION`
1795	// are present.
1796	//   "SAFE_SEARCH_DETECTION" - Run Safe Search to detect potentially
1797	// unsafe or undesirable content.
1798	//   "IMAGE_PROPERTIES" - Compute a set of image properties, such as the
1799	// image's dominant colors.
1800	//   "CROP_HINTS" - Run crop hints.
1801	//   "WEB_DETECTION" - Run web detection.
1802	//   "PRODUCT_SEARCH" - Run Product Search.
1803	//   "OBJECT_LOCALIZATION" - Run localizer for object detection.
1804	Type string `json:"type,omitempty"`
1805
1806	// ForceSendFields is a list of field names (e.g. "MaxResults") to
1807	// unconditionally include in API requests. By default, fields with
1808	// empty values are omitted from API requests. However, any non-pointer,
1809	// non-interface field appearing in ForceSendFields will be sent to the
1810	// server regardless of whether the field is empty or not. This may be
1811	// used to include empty fields in Patch requests.
1812	ForceSendFields []string `json:"-"`
1813
1814	// NullFields is a list of field names (e.g. "MaxResults") to include in
1815	// API requests with the JSON null value. By default, fields with empty
1816	// values are omitted from API requests. However, any field with an
1817	// empty value appearing in NullFields will be sent to the server as
1818	// null. It is an error if a field in this list has a non-empty value.
1819	// This may be used to include null fields in Patch requests.
1820	NullFields []string `json:"-"`
1821}
1822
1823func (s *Feature) MarshalJSON() ([]byte, error) {
1824	type NoMethod Feature
1825	raw := NoMethod(*s)
1826	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1827}
1828
1829// GcsDestination: The Google Cloud Storage location where the output
1830// will be written to.
1831type GcsDestination struct {
1832	// Uri: Google Cloud Storage URI prefix where the results will be
1833	// stored. Results will be in JSON format and preceded by its
1834	// corresponding input URI prefix. This field can either represent a gcs
1835	// file prefix or gcs directory. In either case, the uri should be
1836	// unique because in order to get all of the output files, you will need
1837	// to do a wildcard gcs search on the uri prefix you provide. Examples:
1838	// * File Prefix: gs://bucket-name/here/filenameprefix The output files
1839	// will be created in gs://bucket-name/here/ and the names of the output
1840	// files will begin with "filenameprefix". * Directory Prefix:
1841	// gs://bucket-name/some/location/ The output files will be created in
1842	// gs://bucket-name/some/location/ and the names of the output files
1843	// could be anything because there was no filename prefix specified. If
1844	// multiple outputs, each response is still AnnotateFileResponse, each
1845	// of which contains some subset of the full list of
1846	// AnnotateImageResponse. Multiple outputs can happen if, for example,
1847	// the output JSON is too large and overflows into multiple sharded
1848	// files.
1849	Uri string `json:"uri,omitempty"`
1850
1851	// ForceSendFields is a list of field names (e.g. "Uri") to
1852	// unconditionally include in API requests. By default, fields with
1853	// empty values are omitted from API requests. However, any non-pointer,
1854	// non-interface field appearing in ForceSendFields will be sent to the
1855	// server regardless of whether the field is empty or not. This may be
1856	// used to include empty fields in Patch requests.
1857	ForceSendFields []string `json:"-"`
1858
1859	// NullFields is a list of field names (e.g. "Uri") to include in API
1860	// requests with the JSON null value. By default, fields with empty
1861	// values are omitted from API requests. However, any field with an
1862	// empty value appearing in NullFields will be sent to the server as
1863	// null. It is an error if a field in this list has a non-empty value.
1864	// This may be used to include null fields in Patch requests.
1865	NullFields []string `json:"-"`
1866}
1867
1868func (s *GcsDestination) MarshalJSON() ([]byte, error) {
1869	type NoMethod GcsDestination
1870	raw := NoMethod(*s)
1871	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1872}
1873
1874// GcsSource: The Google Cloud Storage location where the input will be
1875// read from.
1876type GcsSource struct {
1877	// Uri: Google Cloud Storage URI for the input file. This must only be a
1878	// Google Cloud Storage object. Wildcards are not currently supported.
1879	Uri string `json:"uri,omitempty"`
1880
1881	// ForceSendFields is a list of field names (e.g. "Uri") to
1882	// unconditionally include in API requests. By default, fields with
1883	// empty values are omitted from API requests. However, any non-pointer,
1884	// non-interface field appearing in ForceSendFields will be sent to the
1885	// server regardless of whether the field is empty or not. This may be
1886	// used to include empty fields in Patch requests.
1887	ForceSendFields []string `json:"-"`
1888
1889	// NullFields is a list of field names (e.g. "Uri") to include in API
1890	// requests with the JSON null value. By default, fields with empty
1891	// values are omitted from API requests. However, any field with an
1892	// empty value appearing in NullFields will be sent to the server as
1893	// null. It is an error if a field in this list has a non-empty value.
1894	// This may be used to include null fields in Patch requests.
1895	NullFields []string `json:"-"`
1896}
1897
1898func (s *GcsSource) MarshalJSON() ([]byte, error) {
1899	type NoMethod GcsSource
1900	raw := NoMethod(*s)
1901	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1902}
1903
1904// GoogleCloudVisionV1p1beta1AnnotateFileResponse: Response to a single
1905// file annotation request. A file may contain one or more images, which
1906// individually have their own responses.
1907type GoogleCloudVisionV1p1beta1AnnotateFileResponse struct {
1908	// Error: If set, represents the error message for the failed request.
1909	// The `responses` field will not be set in this case.
1910	Error *Status `json:"error,omitempty"`
1911
1912	// InputConfig: Information about the file for which this response is
1913	// generated.
1914	InputConfig *GoogleCloudVisionV1p1beta1InputConfig `json:"inputConfig,omitempty"`
1915
1916	// Responses: Individual responses to images found within the file. This
1917	// field will be empty if the `error` field is set.
1918	Responses []*GoogleCloudVisionV1p1beta1AnnotateImageResponse `json:"responses,omitempty"`
1919
1920	// TotalPages: This field gives the total number of pages in the file.
1921	TotalPages int64 `json:"totalPages,omitempty"`
1922
1923	// ForceSendFields is a list of field names (e.g. "Error") to
1924	// unconditionally include in API requests. By default, fields with
1925	// empty values are omitted from API requests. However, any non-pointer,
1926	// non-interface field appearing in ForceSendFields will be sent to the
1927	// server regardless of whether the field is empty or not. This may be
1928	// used to include empty fields in Patch requests.
1929	ForceSendFields []string `json:"-"`
1930
1931	// NullFields is a list of field names (e.g. "Error") to include in API
1932	// requests with the JSON null value. By default, fields with empty
1933	// values are omitted from API requests. However, any field with an
1934	// empty value appearing in NullFields will be sent to the server as
1935	// null. It is an error if a field in this list has a non-empty value.
1936	// This may be used to include null fields in Patch requests.
1937	NullFields []string `json:"-"`
1938}
1939
1940func (s *GoogleCloudVisionV1p1beta1AnnotateFileResponse) MarshalJSON() ([]byte, error) {
1941	type NoMethod GoogleCloudVisionV1p1beta1AnnotateFileResponse
1942	raw := NoMethod(*s)
1943	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1944}
1945
1946// GoogleCloudVisionV1p1beta1AnnotateImageResponse: Response to an image
1947// annotation request.
1948type GoogleCloudVisionV1p1beta1AnnotateImageResponse struct {
1949	// Context: If present, contextual information is needed to understand
1950	// where this image comes from.
1951	Context *GoogleCloudVisionV1p1beta1ImageAnnotationContext `json:"context,omitempty"`
1952
1953	// CropHintsAnnotation: If present, crop hints have completed
1954	// successfully.
1955	CropHintsAnnotation *GoogleCloudVisionV1p1beta1CropHintsAnnotation `json:"cropHintsAnnotation,omitempty"`
1956
1957	// Error: If set, represents the error message for the operation. Note
1958	// that filled-in image annotations are guaranteed to be correct, even
1959	// when `error` is set.
1960	Error *Status `json:"error,omitempty"`
1961
1962	// FaceAnnotations: If present, face detection has completed
1963	// successfully.
1964	FaceAnnotations []*GoogleCloudVisionV1p1beta1FaceAnnotation `json:"faceAnnotations,omitempty"`
1965
1966	// FullTextAnnotation: If present, text (OCR) detection or document
1967	// (OCR) text detection has completed successfully. This annotation
1968	// provides the structural hierarchy for the OCR detected text.
1969	FullTextAnnotation *GoogleCloudVisionV1p1beta1TextAnnotation `json:"fullTextAnnotation,omitempty"`
1970
1971	// ImagePropertiesAnnotation: If present, image properties were
1972	// extracted successfully.
1973	ImagePropertiesAnnotation *GoogleCloudVisionV1p1beta1ImageProperties `json:"imagePropertiesAnnotation,omitempty"`
1974
1975	// LabelAnnotations: If present, label detection has completed
1976	// successfully.
1977	LabelAnnotations []*GoogleCloudVisionV1p1beta1EntityAnnotation `json:"labelAnnotations,omitempty"`
1978
1979	// LandmarkAnnotations: If present, landmark detection has completed
1980	// successfully.
1981	LandmarkAnnotations []*GoogleCloudVisionV1p1beta1EntityAnnotation `json:"landmarkAnnotations,omitempty"`
1982
1983	// LocalizedObjectAnnotations: If present, localized object detection
1984	// has completed successfully. This will be sorted descending by
1985	// confidence score.
1986	LocalizedObjectAnnotations []*GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation `json:"localizedObjectAnnotations,omitempty"`
1987
1988	// LogoAnnotations: If present, logo detection has completed
1989	// successfully.
1990	LogoAnnotations []*GoogleCloudVisionV1p1beta1EntityAnnotation `json:"logoAnnotations,omitempty"`
1991
1992	// ProductSearchResults: If present, product search has completed
1993	// successfully.
1994	ProductSearchResults *GoogleCloudVisionV1p1beta1ProductSearchResults `json:"productSearchResults,omitempty"`
1995
1996	// SafeSearchAnnotation: If present, safe-search annotation has
1997	// completed successfully.
1998	SafeSearchAnnotation *GoogleCloudVisionV1p1beta1SafeSearchAnnotation `json:"safeSearchAnnotation,omitempty"`
1999
2000	// TextAnnotations: If present, text (OCR) detection has completed
2001	// successfully.
2002	TextAnnotations []*GoogleCloudVisionV1p1beta1EntityAnnotation `json:"textAnnotations,omitempty"`
2003
2004	// WebDetection: If present, web detection has completed successfully.
2005	WebDetection *GoogleCloudVisionV1p1beta1WebDetection `json:"webDetection,omitempty"`
2006
2007	// ForceSendFields is a list of field names (e.g. "Context") to
2008	// unconditionally include in API requests. By default, fields with
2009	// empty values are omitted from API requests. However, any non-pointer,
2010	// non-interface field appearing in ForceSendFields will be sent to the
2011	// server regardless of whether the field is empty or not. This may be
2012	// used to include empty fields in Patch requests.
2013	ForceSendFields []string `json:"-"`
2014
2015	// NullFields is a list of field names (e.g. "Context") to include in
2016	// API requests with the JSON null value. By default, fields with empty
2017	// values are omitted from API requests. However, any field with an
2018	// empty value appearing in NullFields will be sent to the server as
2019	// null. It is an error if a field in this list has a non-empty value.
2020	// This may be used to include null fields in Patch requests.
2021	NullFields []string `json:"-"`
2022}
2023
2024func (s *GoogleCloudVisionV1p1beta1AnnotateImageResponse) MarshalJSON() ([]byte, error) {
2025	type NoMethod GoogleCloudVisionV1p1beta1AnnotateImageResponse
2026	raw := NoMethod(*s)
2027	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2028}
2029
2030// GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse: The response for
2031// a single offline file annotation request.
2032type GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse struct {
2033	// OutputConfig: The output location and metadata from
2034	// AsyncAnnotateFileRequest.
2035	OutputConfig *GoogleCloudVisionV1p1beta1OutputConfig `json:"outputConfig,omitempty"`
2036
2037	// ForceSendFields is a list of field names (e.g. "OutputConfig") to
2038	// unconditionally include in API requests. By default, fields with
2039	// empty values are omitted from API requests. However, any non-pointer,
2040	// non-interface field appearing in ForceSendFields will be sent to the
2041	// server regardless of whether the field is empty or not. This may be
2042	// used to include empty fields in Patch requests.
2043	ForceSendFields []string `json:"-"`
2044
2045	// NullFields is a list of field names (e.g. "OutputConfig") to include
2046	// in API requests with the JSON null value. By default, fields with
2047	// empty values are omitted from API requests. However, any field with
2048	// an empty value appearing in NullFields will be sent to the server as
2049	// null. It is an error if a field in this list has a non-empty value.
2050	// This may be used to include null fields in Patch requests.
2051	NullFields []string `json:"-"`
2052}
2053
2054func (s *GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse) MarshalJSON() ([]byte, error) {
2055	type NoMethod GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse
2056	raw := NoMethod(*s)
2057	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2058}
2059
2060// GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse: Response
2061// to an async batch file annotation request.
2062type GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse struct {
2063	// Responses: The list of file annotation responses, one for each
2064	// request in AsyncBatchAnnotateFilesRequest.
2065	Responses []*GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse `json:"responses,omitempty"`
2066
2067	// ForceSendFields is a list of field names (e.g. "Responses") to
2068	// unconditionally include in API requests. By default, fields with
2069	// empty values are omitted from API requests. However, any non-pointer,
2070	// non-interface field appearing in ForceSendFields will be sent to the
2071	// server regardless of whether the field is empty or not. This may be
2072	// used to include empty fields in Patch requests.
2073	ForceSendFields []string `json:"-"`
2074
2075	// NullFields is a list of field names (e.g. "Responses") to include in
2076	// API requests with the JSON null value. By default, fields with empty
2077	// values are omitted from API requests. However, any field with an
2078	// empty value appearing in NullFields will be sent to the server as
2079	// null. It is an error if a field in this list has a non-empty value.
2080	// This may be used to include null fields in Patch requests.
2081	NullFields []string `json:"-"`
2082}
2083
2084func (s *GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse) MarshalJSON() ([]byte, error) {
2085	type NoMethod GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse
2086	raw := NoMethod(*s)
2087	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2088}
2089
2090// GoogleCloudVisionV1p1beta1Block: Logical element on the page.
2091type GoogleCloudVisionV1p1beta1Block struct {
2092	// BlockType: Detected block type (text, image etc) for this block.
2093	//
2094	// Possible values:
2095	//   "UNKNOWN" - Unknown block type.
2096	//   "TEXT" - Regular text block.
2097	//   "TABLE" - Table block.
2098	//   "PICTURE" - Image block.
2099	//   "RULER" - Horizontal/vertical line box.
2100	//   "BARCODE" - Barcode block.
2101	BlockType string `json:"blockType,omitempty"`
2102
2103	// BoundingBox: The bounding box for the block. The vertices are in the
2104	// order of top-left, top-right, bottom-right, bottom-left. When a
2105	// rotation of the bounding box is detected the rotation is represented
2106	// as around the top-left corner as defined when the text is read in the
2107	// 'natural' orientation. For example: * when the text is horizontal it
2108	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
2109	// around the top-left corner it becomes: 2----3 | | 1----0 and the
2110	// vertex order will still be (0, 1, 2, 3).
2111	BoundingBox *GoogleCloudVisionV1p1beta1BoundingPoly `json:"boundingBox,omitempty"`
2112
2113	// Confidence: Confidence of the OCR results on the block. Range [0, 1].
2114	Confidence float64 `json:"confidence,omitempty"`
2115
2116	// Paragraphs: List of paragraphs in this block (if this blocks is of
2117	// type text).
2118	Paragraphs []*GoogleCloudVisionV1p1beta1Paragraph `json:"paragraphs,omitempty"`
2119
2120	// Property: Additional information detected for the block.
2121	Property *GoogleCloudVisionV1p1beta1TextAnnotationTextProperty `json:"property,omitempty"`
2122
2123	// ForceSendFields is a list of field names (e.g. "BlockType") to
2124	// unconditionally include in API requests. By default, fields with
2125	// empty values are omitted from API requests. However, any non-pointer,
2126	// non-interface field appearing in ForceSendFields will be sent to the
2127	// server regardless of whether the field is empty or not. This may be
2128	// used to include empty fields in Patch requests.
2129	ForceSendFields []string `json:"-"`
2130
2131	// NullFields is a list of field names (e.g. "BlockType") to include in
2132	// API requests with the JSON null value. By default, fields with empty
2133	// values are omitted from API requests. However, any field with an
2134	// empty value appearing in NullFields will be sent to the server as
2135	// null. It is an error if a field in this list has a non-empty value.
2136	// This may be used to include null fields in Patch requests.
2137	NullFields []string `json:"-"`
2138}
2139
2140func (s *GoogleCloudVisionV1p1beta1Block) MarshalJSON() ([]byte, error) {
2141	type NoMethod GoogleCloudVisionV1p1beta1Block
2142	raw := NoMethod(*s)
2143	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2144}
2145
2146func (s *GoogleCloudVisionV1p1beta1Block) UnmarshalJSON(data []byte) error {
2147	type NoMethod GoogleCloudVisionV1p1beta1Block
2148	var s1 struct {
2149		Confidence gensupport.JSONFloat64 `json:"confidence"`
2150		*NoMethod
2151	}
2152	s1.NoMethod = (*NoMethod)(s)
2153	if err := json.Unmarshal(data, &s1); err != nil {
2154		return err
2155	}
2156	s.Confidence = float64(s1.Confidence)
2157	return nil
2158}
2159
2160// GoogleCloudVisionV1p1beta1BoundingPoly: A bounding polygon for the
2161// detected image annotation.
2162type GoogleCloudVisionV1p1beta1BoundingPoly struct {
2163	// NormalizedVertices: The bounding polygon normalized vertices.
2164	NormalizedVertices []*GoogleCloudVisionV1p1beta1NormalizedVertex `json:"normalizedVertices,omitempty"`
2165
2166	// Vertices: The bounding polygon vertices.
2167	Vertices []*GoogleCloudVisionV1p1beta1Vertex `json:"vertices,omitempty"`
2168
2169	// ForceSendFields is a list of field names (e.g. "NormalizedVertices")
2170	// to unconditionally include in API requests. By default, fields with
2171	// empty values are omitted from API requests. However, any non-pointer,
2172	// non-interface field appearing in ForceSendFields will be sent to the
2173	// server regardless of whether the field is empty or not. This may be
2174	// used to include empty fields in Patch requests.
2175	ForceSendFields []string `json:"-"`
2176
2177	// NullFields is a list of field names (e.g. "NormalizedVertices") to
2178	// include in API requests with the JSON null value. By default, fields
2179	// with empty values are omitted from API requests. However, any field
2180	// with an empty value appearing in NullFields will be sent to the
2181	// server as null. It is an error if a field in this list has a
2182	// non-empty value. This may be used to include null fields in Patch
2183	// requests.
2184	NullFields []string `json:"-"`
2185}
2186
2187func (s *GoogleCloudVisionV1p1beta1BoundingPoly) MarshalJSON() ([]byte, error) {
2188	type NoMethod GoogleCloudVisionV1p1beta1BoundingPoly
2189	raw := NoMethod(*s)
2190	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2191}
2192
2193// GoogleCloudVisionV1p1beta1ColorInfo: Color information consists of
2194// RGB channels, score, and the fraction of the image that the color
2195// occupies in the image.
2196type GoogleCloudVisionV1p1beta1ColorInfo struct {
2197	// Color: RGB components of the color.
2198	Color *Color `json:"color,omitempty"`
2199
2200	// PixelFraction: The fraction of pixels the color occupies in the
2201	// image. Value in range [0, 1].
2202	PixelFraction float64 `json:"pixelFraction,omitempty"`
2203
2204	// Score: Image-specific score for this color. Value in range [0, 1].
2205	Score float64 `json:"score,omitempty"`
2206
2207	// ForceSendFields is a list of field names (e.g. "Color") to
2208	// unconditionally include in API requests. By default, fields with
2209	// empty values are omitted from API requests. However, any non-pointer,
2210	// non-interface field appearing in ForceSendFields will be sent to the
2211	// server regardless of whether the field is empty or not. This may be
2212	// used to include empty fields in Patch requests.
2213	ForceSendFields []string `json:"-"`
2214
2215	// NullFields is a list of field names (e.g. "Color") to include in API
2216	// requests with the JSON null value. By default, fields with empty
2217	// values are omitted from API requests. However, any field with an
2218	// empty value appearing in NullFields will be sent to the server as
2219	// null. It is an error if a field in this list has a non-empty value.
2220	// This may be used to include null fields in Patch requests.
2221	NullFields []string `json:"-"`
2222}
2223
2224func (s *GoogleCloudVisionV1p1beta1ColorInfo) MarshalJSON() ([]byte, error) {
2225	type NoMethod GoogleCloudVisionV1p1beta1ColorInfo
2226	raw := NoMethod(*s)
2227	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2228}
2229
2230func (s *GoogleCloudVisionV1p1beta1ColorInfo) UnmarshalJSON(data []byte) error {
2231	type NoMethod GoogleCloudVisionV1p1beta1ColorInfo
2232	var s1 struct {
2233		PixelFraction gensupport.JSONFloat64 `json:"pixelFraction"`
2234		Score         gensupport.JSONFloat64 `json:"score"`
2235		*NoMethod
2236	}
2237	s1.NoMethod = (*NoMethod)(s)
2238	if err := json.Unmarshal(data, &s1); err != nil {
2239		return err
2240	}
2241	s.PixelFraction = float64(s1.PixelFraction)
2242	s.Score = float64(s1.Score)
2243	return nil
2244}
2245
2246// GoogleCloudVisionV1p1beta1CropHint: Single crop hint that is used to
2247// generate a new crop when serving an image.
2248type GoogleCloudVisionV1p1beta1CropHint struct {
2249	// BoundingPoly: The bounding polygon for the crop region. The
2250	// coordinates of the bounding box are in the original image's scale.
2251	BoundingPoly *GoogleCloudVisionV1p1beta1BoundingPoly `json:"boundingPoly,omitempty"`
2252
2253	// Confidence: Confidence of this being a salient region. Range [0, 1].
2254	Confidence float64 `json:"confidence,omitempty"`
2255
2256	// ImportanceFraction: Fraction of importance of this salient region
2257	// with respect to the original image.
2258	ImportanceFraction float64 `json:"importanceFraction,omitempty"`
2259
2260	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
2261	// unconditionally include in API requests. By default, fields with
2262	// empty values are omitted from API requests. However, any non-pointer,
2263	// non-interface field appearing in ForceSendFields will be sent to the
2264	// server regardless of whether the field is empty or not. This may be
2265	// used to include empty fields in Patch requests.
2266	ForceSendFields []string `json:"-"`
2267
2268	// NullFields is a list of field names (e.g. "BoundingPoly") to include
2269	// in API requests with the JSON null value. By default, fields with
2270	// empty values are omitted from API requests. However, any field with
2271	// an empty value appearing in NullFields will be sent to the server as
2272	// null. It is an error if a field in this list has a non-empty value.
2273	// This may be used to include null fields in Patch requests.
2274	NullFields []string `json:"-"`
2275}
2276
2277func (s *GoogleCloudVisionV1p1beta1CropHint) MarshalJSON() ([]byte, error) {
2278	type NoMethod GoogleCloudVisionV1p1beta1CropHint
2279	raw := NoMethod(*s)
2280	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2281}
2282
2283func (s *GoogleCloudVisionV1p1beta1CropHint) UnmarshalJSON(data []byte) error {
2284	type NoMethod GoogleCloudVisionV1p1beta1CropHint
2285	var s1 struct {
2286		Confidence         gensupport.JSONFloat64 `json:"confidence"`
2287		ImportanceFraction gensupport.JSONFloat64 `json:"importanceFraction"`
2288		*NoMethod
2289	}
2290	s1.NoMethod = (*NoMethod)(s)
2291	if err := json.Unmarshal(data, &s1); err != nil {
2292		return err
2293	}
2294	s.Confidence = float64(s1.Confidence)
2295	s.ImportanceFraction = float64(s1.ImportanceFraction)
2296	return nil
2297}
2298
2299// GoogleCloudVisionV1p1beta1CropHintsAnnotation: Set of crop hints that
2300// are used to generate new crops when serving images.
2301type GoogleCloudVisionV1p1beta1CropHintsAnnotation struct {
2302	// CropHints: Crop hint results.
2303	CropHints []*GoogleCloudVisionV1p1beta1CropHint `json:"cropHints,omitempty"`
2304
2305	// ForceSendFields is a list of field names (e.g. "CropHints") to
2306	// unconditionally include in API requests. By default, fields with
2307	// empty values are omitted from API requests. However, any non-pointer,
2308	// non-interface field appearing in ForceSendFields will be sent to the
2309	// server regardless of whether the field is empty or not. This may be
2310	// used to include empty fields in Patch requests.
2311	ForceSendFields []string `json:"-"`
2312
2313	// NullFields is a list of field names (e.g. "CropHints") to include in
2314	// API requests with the JSON null value. By default, fields with empty
2315	// values are omitted from API requests. However, any field with an
2316	// empty value appearing in NullFields will be sent to the server as
2317	// null. It is an error if a field in this list has a non-empty value.
2318	// This may be used to include null fields in Patch requests.
2319	NullFields []string `json:"-"`
2320}
2321
2322func (s *GoogleCloudVisionV1p1beta1CropHintsAnnotation) MarshalJSON() ([]byte, error) {
2323	type NoMethod GoogleCloudVisionV1p1beta1CropHintsAnnotation
2324	raw := NoMethod(*s)
2325	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2326}
2327
2328// GoogleCloudVisionV1p1beta1DominantColorsAnnotation: Set of dominant
2329// colors and their corresponding scores.
2330type GoogleCloudVisionV1p1beta1DominantColorsAnnotation struct {
2331	// Colors: RGB color values with their score and pixel fraction.
2332	Colors []*GoogleCloudVisionV1p1beta1ColorInfo `json:"colors,omitempty"`
2333
2334	// ForceSendFields is a list of field names (e.g. "Colors") to
2335	// unconditionally include in API requests. By default, fields with
2336	// empty values are omitted from API requests. However, any non-pointer,
2337	// non-interface field appearing in ForceSendFields will be sent to the
2338	// server regardless of whether the field is empty or not. This may be
2339	// used to include empty fields in Patch requests.
2340	ForceSendFields []string `json:"-"`
2341
2342	// NullFields is a list of field names (e.g. "Colors") to include in API
2343	// requests with the JSON null value. By default, fields with empty
2344	// values are omitted from API requests. However, any field with an
2345	// empty value appearing in NullFields will be sent to the server as
2346	// null. It is an error if a field in this list has a non-empty value.
2347	// This may be used to include null fields in Patch requests.
2348	NullFields []string `json:"-"`
2349}
2350
2351func (s *GoogleCloudVisionV1p1beta1DominantColorsAnnotation) MarshalJSON() ([]byte, error) {
2352	type NoMethod GoogleCloudVisionV1p1beta1DominantColorsAnnotation
2353	raw := NoMethod(*s)
2354	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2355}
2356
2357// GoogleCloudVisionV1p1beta1EntityAnnotation: Set of detected entity
2358// features.
2359type GoogleCloudVisionV1p1beta1EntityAnnotation struct {
2360	// BoundingPoly: Image region to which this entity belongs. Not produced
2361	// for `LABEL_DETECTION` features.
2362	BoundingPoly *GoogleCloudVisionV1p1beta1BoundingPoly `json:"boundingPoly,omitempty"`
2363
2364	// Confidence: **Deprecated. Use `score` instead.** The accuracy of the
2365	// entity detection in an image. For example, for an image in which the
2366	// "Eiffel Tower" entity is detected, this field represents the
2367	// confidence that there is a tower in the query image. Range [0, 1].
2368	Confidence float64 `json:"confidence,omitempty"`
2369
2370	// Description: Entity textual description, expressed in its `locale`
2371	// language.
2372	Description string `json:"description,omitempty"`
2373
2374	// Locale: The language code for the locale in which the entity textual
2375	// `description` is expressed.
2376	Locale string `json:"locale,omitempty"`
2377
2378	// Locations: The location information for the detected entity. Multiple
2379	// `LocationInfo` elements can be present because one location may
2380	// indicate the location of the scene in the image, and another location
2381	// may indicate the location of the place where the image was taken.
2382	// Location information is usually present for landmarks.
2383	Locations []*GoogleCloudVisionV1p1beta1LocationInfo `json:"locations,omitempty"`
2384
2385	// Mid: Opaque entity ID. Some IDs may be available in Google Knowledge
2386	// Graph Search API (https://developers.google.com/knowledge-graph/).
2387	Mid string `json:"mid,omitempty"`
2388
2389	// Properties: Some entities may have optional user-supplied `Property`
2390	// (name/value) fields, such a score or string that qualifies the
2391	// entity.
2392	Properties []*GoogleCloudVisionV1p1beta1Property `json:"properties,omitempty"`
2393
2394	// Score: Overall score of the result. Range [0, 1].
2395	Score float64 `json:"score,omitempty"`
2396
2397	// Topicality: The relevancy of the ICA (Image Content Annotation) label
2398	// to the image. For example, the relevancy of "tower" is likely higher
2399	// to an image containing the detected "Eiffel Tower" than to an image
2400	// containing a detected distant towering building, even though the
2401	// confidence that there is a tower in each image may be the same. Range
2402	// [0, 1].
2403	Topicality float64 `json:"topicality,omitempty"`
2404
2405	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
2406	// unconditionally include in API requests. By default, fields with
2407	// empty values are omitted from API requests. However, any non-pointer,
2408	// non-interface field appearing in ForceSendFields will be sent to the
2409	// server regardless of whether the field is empty or not. This may be
2410	// used to include empty fields in Patch requests.
2411	ForceSendFields []string `json:"-"`
2412
2413	// NullFields is a list of field names (e.g. "BoundingPoly") to include
2414	// in API requests with the JSON null value. By default, fields with
2415	// empty values are omitted from API requests. However, any field with
2416	// an empty value appearing in NullFields will be sent to the server as
2417	// null. It is an error if a field in this list has a non-empty value.
2418	// This may be used to include null fields in Patch requests.
2419	NullFields []string `json:"-"`
2420}
2421
2422func (s *GoogleCloudVisionV1p1beta1EntityAnnotation) MarshalJSON() ([]byte, error) {
2423	type NoMethod GoogleCloudVisionV1p1beta1EntityAnnotation
2424	raw := NoMethod(*s)
2425	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2426}
2427
2428func (s *GoogleCloudVisionV1p1beta1EntityAnnotation) UnmarshalJSON(data []byte) error {
2429	type NoMethod GoogleCloudVisionV1p1beta1EntityAnnotation
2430	var s1 struct {
2431		Confidence gensupport.JSONFloat64 `json:"confidence"`
2432		Score      gensupport.JSONFloat64 `json:"score"`
2433		Topicality gensupport.JSONFloat64 `json:"topicality"`
2434		*NoMethod
2435	}
2436	s1.NoMethod = (*NoMethod)(s)
2437	if err := json.Unmarshal(data, &s1); err != nil {
2438		return err
2439	}
2440	s.Confidence = float64(s1.Confidence)
2441	s.Score = float64(s1.Score)
2442	s.Topicality = float64(s1.Topicality)
2443	return nil
2444}
2445
2446// GoogleCloudVisionV1p1beta1FaceAnnotation: A face annotation object
2447// contains the results of face detection.
2448type GoogleCloudVisionV1p1beta1FaceAnnotation struct {
2449	// AngerLikelihood: Anger likelihood.
2450	//
2451	// Possible values:
2452	//   "UNKNOWN" - Unknown likelihood.
2453	//   "VERY_UNLIKELY" - It is very unlikely.
2454	//   "UNLIKELY" - It is unlikely.
2455	//   "POSSIBLE" - It is possible.
2456	//   "LIKELY" - It is likely.
2457	//   "VERY_LIKELY" - It is very likely.
2458	AngerLikelihood string `json:"angerLikelihood,omitempty"`
2459
2460	// BlurredLikelihood: Blurred likelihood.
2461	//
2462	// Possible values:
2463	//   "UNKNOWN" - Unknown likelihood.
2464	//   "VERY_UNLIKELY" - It is very unlikely.
2465	//   "UNLIKELY" - It is unlikely.
2466	//   "POSSIBLE" - It is possible.
2467	//   "LIKELY" - It is likely.
2468	//   "VERY_LIKELY" - It is very likely.
2469	BlurredLikelihood string `json:"blurredLikelihood,omitempty"`
2470
2471	// BoundingPoly: The bounding polygon around the face. The coordinates
2472	// of the bounding box are in the original image's scale. The bounding
2473	// box is computed to "frame" the face in accordance with human
2474	// expectations. It is based on the landmarker results. Note that one or
2475	// more x and/or y coordinates may not be generated in the
2476	// `BoundingPoly` (the polygon will be unbounded) if only a partial face
2477	// appears in the image to be annotated.
2478	BoundingPoly *GoogleCloudVisionV1p1beta1BoundingPoly `json:"boundingPoly,omitempty"`
2479
2480	// DetectionConfidence: Detection confidence. Range [0, 1].
2481	DetectionConfidence float64 `json:"detectionConfidence,omitempty"`
2482
2483	// FdBoundingPoly: The `fd_bounding_poly` bounding polygon is tighter
2484	// than the `boundingPoly`, and encloses only the skin part of the face.
2485	// Typically, it is used to eliminate the face from any image analysis
2486	// that detects the "amount of skin" visible in an image. It is not
2487	// based on the landmarker results, only on the initial face detection,
2488	// hence the fd (face detection) prefix.
2489	FdBoundingPoly *GoogleCloudVisionV1p1beta1BoundingPoly `json:"fdBoundingPoly,omitempty"`
2490
2491	// HeadwearLikelihood: Headwear likelihood.
2492	//
2493	// Possible values:
2494	//   "UNKNOWN" - Unknown likelihood.
2495	//   "VERY_UNLIKELY" - It is very unlikely.
2496	//   "UNLIKELY" - It is unlikely.
2497	//   "POSSIBLE" - It is possible.
2498	//   "LIKELY" - It is likely.
2499	//   "VERY_LIKELY" - It is very likely.
2500	HeadwearLikelihood string `json:"headwearLikelihood,omitempty"`
2501
2502	// JoyLikelihood: Joy likelihood.
2503	//
2504	// Possible values:
2505	//   "UNKNOWN" - Unknown likelihood.
2506	//   "VERY_UNLIKELY" - It is very unlikely.
2507	//   "UNLIKELY" - It is unlikely.
2508	//   "POSSIBLE" - It is possible.
2509	//   "LIKELY" - It is likely.
2510	//   "VERY_LIKELY" - It is very likely.
2511	JoyLikelihood string `json:"joyLikelihood,omitempty"`
2512
2513	// LandmarkingConfidence: Face landmarking confidence. Range [0, 1].
2514	LandmarkingConfidence float64 `json:"landmarkingConfidence,omitempty"`
2515
2516	// Landmarks: Detected face landmarks.
2517	Landmarks []*GoogleCloudVisionV1p1beta1FaceAnnotationLandmark `json:"landmarks,omitempty"`
2518
2519	// PanAngle: Yaw angle, which indicates the leftward/rightward angle
2520	// that the face is pointing relative to the vertical plane
2521	// perpendicular to the image. Range [-180,180].
2522	PanAngle float64 `json:"panAngle,omitempty"`
2523
2524	// RollAngle: Roll angle, which indicates the amount of
2525	// clockwise/anti-clockwise rotation of the face relative to the image
2526	// vertical about the axis perpendicular to the face. Range [-180,180].
2527	RollAngle float64 `json:"rollAngle,omitempty"`
2528
2529	// SorrowLikelihood: Sorrow likelihood.
2530	//
2531	// Possible values:
2532	//   "UNKNOWN" - Unknown likelihood.
2533	//   "VERY_UNLIKELY" - It is very unlikely.
2534	//   "UNLIKELY" - It is unlikely.
2535	//   "POSSIBLE" - It is possible.
2536	//   "LIKELY" - It is likely.
2537	//   "VERY_LIKELY" - It is very likely.
2538	SorrowLikelihood string `json:"sorrowLikelihood,omitempty"`
2539
2540	// SurpriseLikelihood: Surprise likelihood.
2541	//
2542	// Possible values:
2543	//   "UNKNOWN" - Unknown likelihood.
2544	//   "VERY_UNLIKELY" - It is very unlikely.
2545	//   "UNLIKELY" - It is unlikely.
2546	//   "POSSIBLE" - It is possible.
2547	//   "LIKELY" - It is likely.
2548	//   "VERY_LIKELY" - It is very likely.
2549	SurpriseLikelihood string `json:"surpriseLikelihood,omitempty"`
2550
2551	// TiltAngle: Pitch angle, which indicates the upwards/downwards angle
2552	// that the face is pointing relative to the image's horizontal plane.
2553	// Range [-180,180].
2554	TiltAngle float64 `json:"tiltAngle,omitempty"`
2555
2556	// UnderExposedLikelihood: Under-exposed likelihood.
2557	//
2558	// Possible values:
2559	//   "UNKNOWN" - Unknown likelihood.
2560	//   "VERY_UNLIKELY" - It is very unlikely.
2561	//   "UNLIKELY" - It is unlikely.
2562	//   "POSSIBLE" - It is possible.
2563	//   "LIKELY" - It is likely.
2564	//   "VERY_LIKELY" - It is very likely.
2565	UnderExposedLikelihood string `json:"underExposedLikelihood,omitempty"`
2566
2567	// ForceSendFields is a list of field names (e.g. "AngerLikelihood") to
2568	// unconditionally include in API requests. By default, fields with
2569	// empty values are omitted from API requests. However, any non-pointer,
2570	// non-interface field appearing in ForceSendFields will be sent to the
2571	// server regardless of whether the field is empty or not. This may be
2572	// used to include empty fields in Patch requests.
2573	ForceSendFields []string `json:"-"`
2574
2575	// NullFields is a list of field names (e.g. "AngerLikelihood") to
2576	// include in API requests with the JSON null value. By default, fields
2577	// with empty values are omitted from API requests. However, any field
2578	// with an empty value appearing in NullFields will be sent to the
2579	// server as null. It is an error if a field in this list has a
2580	// non-empty value. This may be used to include null fields in Patch
2581	// requests.
2582	NullFields []string `json:"-"`
2583}
2584
2585func (s *GoogleCloudVisionV1p1beta1FaceAnnotation) MarshalJSON() ([]byte, error) {
2586	type NoMethod GoogleCloudVisionV1p1beta1FaceAnnotation
2587	raw := NoMethod(*s)
2588	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2589}
2590
2591func (s *GoogleCloudVisionV1p1beta1FaceAnnotation) UnmarshalJSON(data []byte) error {
2592	type NoMethod GoogleCloudVisionV1p1beta1FaceAnnotation
2593	var s1 struct {
2594		DetectionConfidence   gensupport.JSONFloat64 `json:"detectionConfidence"`
2595		LandmarkingConfidence gensupport.JSONFloat64 `json:"landmarkingConfidence"`
2596		PanAngle              gensupport.JSONFloat64 `json:"panAngle"`
2597		RollAngle             gensupport.JSONFloat64 `json:"rollAngle"`
2598		TiltAngle             gensupport.JSONFloat64 `json:"tiltAngle"`
2599		*NoMethod
2600	}
2601	s1.NoMethod = (*NoMethod)(s)
2602	if err := json.Unmarshal(data, &s1); err != nil {
2603		return err
2604	}
2605	s.DetectionConfidence = float64(s1.DetectionConfidence)
2606	s.LandmarkingConfidence = float64(s1.LandmarkingConfidence)
2607	s.PanAngle = float64(s1.PanAngle)
2608	s.RollAngle = float64(s1.RollAngle)
2609	s.TiltAngle = float64(s1.TiltAngle)
2610	return nil
2611}
2612
2613// GoogleCloudVisionV1p1beta1FaceAnnotationLandmark: A face-specific
2614// landmark (for example, a face feature).
2615type GoogleCloudVisionV1p1beta1FaceAnnotationLandmark struct {
2616	// Position: Face landmark position.
2617	Position *GoogleCloudVisionV1p1beta1Position `json:"position,omitempty"`
2618
2619	// Type: Face landmark type.
2620	//
2621	// Possible values:
2622	//   "UNKNOWN_LANDMARK" - Unknown face landmark detected. Should not be
2623	// filled.
2624	//   "LEFT_EYE" - Left eye.
2625	//   "RIGHT_EYE" - Right eye.
2626	//   "LEFT_OF_LEFT_EYEBROW" - Left of left eyebrow.
2627	//   "RIGHT_OF_LEFT_EYEBROW" - Right of left eyebrow.
2628	//   "LEFT_OF_RIGHT_EYEBROW" - Left of right eyebrow.
2629	//   "RIGHT_OF_RIGHT_EYEBROW" - Right of right eyebrow.
2630	//   "MIDPOINT_BETWEEN_EYES" - Midpoint between eyes.
2631	//   "NOSE_TIP" - Nose tip.
2632	//   "UPPER_LIP" - Upper lip.
2633	//   "LOWER_LIP" - Lower lip.
2634	//   "MOUTH_LEFT" - Mouth left.
2635	//   "MOUTH_RIGHT" - Mouth right.
2636	//   "MOUTH_CENTER" - Mouth center.
2637	//   "NOSE_BOTTOM_RIGHT" - Nose, bottom right.
2638	//   "NOSE_BOTTOM_LEFT" - Nose, bottom left.
2639	//   "NOSE_BOTTOM_CENTER" - Nose, bottom center.
2640	//   "LEFT_EYE_TOP_BOUNDARY" - Left eye, top boundary.
2641	//   "LEFT_EYE_RIGHT_CORNER" - Left eye, right corner.
2642	//   "LEFT_EYE_BOTTOM_BOUNDARY" - Left eye, bottom boundary.
2643	//   "LEFT_EYE_LEFT_CORNER" - Left eye, left corner.
2644	//   "RIGHT_EYE_TOP_BOUNDARY" - Right eye, top boundary.
2645	//   "RIGHT_EYE_RIGHT_CORNER" - Right eye, right corner.
2646	//   "RIGHT_EYE_BOTTOM_BOUNDARY" - Right eye, bottom boundary.
2647	//   "RIGHT_EYE_LEFT_CORNER" - Right eye, left corner.
2648	//   "LEFT_EYEBROW_UPPER_MIDPOINT" - Left eyebrow, upper midpoint.
2649	//   "RIGHT_EYEBROW_UPPER_MIDPOINT" - Right eyebrow, upper midpoint.
2650	//   "LEFT_EAR_TRAGION" - Left ear tragion.
2651	//   "RIGHT_EAR_TRAGION" - Right ear tragion.
2652	//   "LEFT_EYE_PUPIL" - Left eye pupil.
2653	//   "RIGHT_EYE_PUPIL" - Right eye pupil.
2654	//   "FOREHEAD_GLABELLA" - Forehead glabella.
2655	//   "CHIN_GNATHION" - Chin gnathion.
2656	//   "CHIN_LEFT_GONION" - Chin left gonion.
2657	//   "CHIN_RIGHT_GONION" - Chin right gonion.
2658	//   "LEFT_CHEEK_CENTER" - Left cheek center.
2659	//   "RIGHT_CHEEK_CENTER" - Right cheek center.
2660	Type string `json:"type,omitempty"`
2661
2662	// ForceSendFields is a list of field names (e.g. "Position") to
2663	// unconditionally include in API requests. By default, fields with
2664	// empty values are omitted from API requests. However, any non-pointer,
2665	// non-interface field appearing in ForceSendFields will be sent to the
2666	// server regardless of whether the field is empty or not. This may be
2667	// used to include empty fields in Patch requests.
2668	ForceSendFields []string `json:"-"`
2669
2670	// NullFields is a list of field names (e.g. "Position") to include in
2671	// API requests with the JSON null value. By default, fields with empty
2672	// values are omitted from API requests. However, any field with an
2673	// empty value appearing in NullFields will be sent to the server as
2674	// null. It is an error if a field in this list has a non-empty value.
2675	// This may be used to include null fields in Patch requests.
2676	NullFields []string `json:"-"`
2677}
2678
2679func (s *GoogleCloudVisionV1p1beta1FaceAnnotationLandmark) MarshalJSON() ([]byte, error) {
2680	type NoMethod GoogleCloudVisionV1p1beta1FaceAnnotationLandmark
2681	raw := NoMethod(*s)
2682	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2683}
2684
2685// GoogleCloudVisionV1p1beta1GcsDestination: The Google Cloud Storage
2686// location where the output will be written to.
2687type GoogleCloudVisionV1p1beta1GcsDestination struct {
2688	// Uri: Google Cloud Storage URI prefix where the results will be
2689	// stored. Results will be in JSON format and preceded by its
2690	// corresponding input URI prefix. This field can either represent a gcs
2691	// file prefix or gcs directory. In either case, the uri should be
2692	// unique because in order to get all of the output files, you will need
2693	// to do a wildcard gcs search on the uri prefix you provide. Examples:
2694	// * File Prefix: gs://bucket-name/here/filenameprefix The output files
2695	// will be created in gs://bucket-name/here/ and the names of the output
2696	// files will begin with "filenameprefix". * Directory Prefix:
2697	// gs://bucket-name/some/location/ The output files will be created in
2698	// gs://bucket-name/some/location/ and the names of the output files
2699	// could be anything because there was no filename prefix specified. If
2700	// multiple outputs, each response is still AnnotateFileResponse, each
2701	// of which contains some subset of the full list of
2702	// AnnotateImageResponse. Multiple outputs can happen if, for example,
2703	// the output JSON is too large and overflows into multiple sharded
2704	// files.
2705	Uri string `json:"uri,omitempty"`
2706
2707	// ForceSendFields is a list of field names (e.g. "Uri") to
2708	// unconditionally include in API requests. By default, fields with
2709	// empty values are omitted from API requests. However, any non-pointer,
2710	// non-interface field appearing in ForceSendFields will be sent to the
2711	// server regardless of whether the field is empty or not. This may be
2712	// used to include empty fields in Patch requests.
2713	ForceSendFields []string `json:"-"`
2714
2715	// NullFields is a list of field names (e.g. "Uri") to include in API
2716	// requests with the JSON null value. By default, fields with empty
2717	// values are omitted from API requests. However, any field with an
2718	// empty value appearing in NullFields will be sent to the server as
2719	// null. It is an error if a field in this list has a non-empty value.
2720	// This may be used to include null fields in Patch requests.
2721	NullFields []string `json:"-"`
2722}
2723
2724func (s *GoogleCloudVisionV1p1beta1GcsDestination) MarshalJSON() ([]byte, error) {
2725	type NoMethod GoogleCloudVisionV1p1beta1GcsDestination
2726	raw := NoMethod(*s)
2727	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2728}
2729
2730// GoogleCloudVisionV1p1beta1GcsSource: The Google Cloud Storage
2731// location where the input will be read from.
2732type GoogleCloudVisionV1p1beta1GcsSource struct {
2733	// Uri: Google Cloud Storage URI for the input file. This must only be a
2734	// Google Cloud Storage object. Wildcards are not currently supported.
2735	Uri string `json:"uri,omitempty"`
2736
2737	// ForceSendFields is a list of field names (e.g. "Uri") to
2738	// unconditionally include in API requests. By default, fields with
2739	// empty values are omitted from API requests. However, any non-pointer,
2740	// non-interface field appearing in ForceSendFields will be sent to the
2741	// server regardless of whether the field is empty or not. This may be
2742	// used to include empty fields in Patch requests.
2743	ForceSendFields []string `json:"-"`
2744
2745	// NullFields is a list of field names (e.g. "Uri") to include in API
2746	// requests with the JSON null value. By default, fields with empty
2747	// values are omitted from API requests. However, any field with an
2748	// empty value appearing in NullFields will be sent to the server as
2749	// null. It is an error if a field in this list has a non-empty value.
2750	// This may be used to include null fields in Patch requests.
2751	NullFields []string `json:"-"`
2752}
2753
2754func (s *GoogleCloudVisionV1p1beta1GcsSource) MarshalJSON() ([]byte, error) {
2755	type NoMethod GoogleCloudVisionV1p1beta1GcsSource
2756	raw := NoMethod(*s)
2757	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2758}
2759
2760// GoogleCloudVisionV1p1beta1ImageAnnotationContext: If an image was
2761// produced from a file (e.g. a PDF), this message gives information
2762// about the source of that image.
2763type GoogleCloudVisionV1p1beta1ImageAnnotationContext struct {
2764	// PageNumber: If the file was a PDF or TIFF, this field gives the page
2765	// number within the file used to produce the image.
2766	PageNumber int64 `json:"pageNumber,omitempty"`
2767
2768	// Uri: The URI of the file used to produce the image.
2769	Uri string `json:"uri,omitempty"`
2770
2771	// ForceSendFields is a list of field names (e.g. "PageNumber") to
2772	// unconditionally include in API requests. By default, fields with
2773	// empty values are omitted from API requests. However, any non-pointer,
2774	// non-interface field appearing in ForceSendFields will be sent to the
2775	// server regardless of whether the field is empty or not. This may be
2776	// used to include empty fields in Patch requests.
2777	ForceSendFields []string `json:"-"`
2778
2779	// NullFields is a list of field names (e.g. "PageNumber") to include in
2780	// API requests with the JSON null value. By default, fields with empty
2781	// values are omitted from API requests. However, any field with an
2782	// empty value appearing in NullFields will be sent to the server as
2783	// null. It is an error if a field in this list has a non-empty value.
2784	// This may be used to include null fields in Patch requests.
2785	NullFields []string `json:"-"`
2786}
2787
2788func (s *GoogleCloudVisionV1p1beta1ImageAnnotationContext) MarshalJSON() ([]byte, error) {
2789	type NoMethod GoogleCloudVisionV1p1beta1ImageAnnotationContext
2790	raw := NoMethod(*s)
2791	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2792}
2793
2794// GoogleCloudVisionV1p1beta1ImageProperties: Stores image properties,
2795// such as dominant colors.
2796type GoogleCloudVisionV1p1beta1ImageProperties struct {
2797	// DominantColors: If present, dominant colors completed successfully.
2798	DominantColors *GoogleCloudVisionV1p1beta1DominantColorsAnnotation `json:"dominantColors,omitempty"`
2799
2800	// ForceSendFields is a list of field names (e.g. "DominantColors") to
2801	// unconditionally include in API requests. By default, fields with
2802	// empty values are omitted from API requests. However, any non-pointer,
2803	// non-interface field appearing in ForceSendFields will be sent to the
2804	// server regardless of whether the field is empty or not. This may be
2805	// used to include empty fields in Patch requests.
2806	ForceSendFields []string `json:"-"`
2807
2808	// NullFields is a list of field names (e.g. "DominantColors") to
2809	// include in API requests with the JSON null value. By default, fields
2810	// with empty values are omitted from API requests. However, any field
2811	// with an empty value appearing in NullFields will be sent to the
2812	// server as null. It is an error if a field in this list has a
2813	// non-empty value. This may be used to include null fields in Patch
2814	// requests.
2815	NullFields []string `json:"-"`
2816}
2817
2818func (s *GoogleCloudVisionV1p1beta1ImageProperties) MarshalJSON() ([]byte, error) {
2819	type NoMethod GoogleCloudVisionV1p1beta1ImageProperties
2820	raw := NoMethod(*s)
2821	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2822}
2823
2824// GoogleCloudVisionV1p1beta1InputConfig: The desired input location and
2825// metadata.
2826type GoogleCloudVisionV1p1beta1InputConfig struct {
2827	// Content: File content, represented as a stream of bytes. Note: As
2828	// with all `bytes` fields, protobuffers use a pure binary
2829	// representation, whereas JSON representations use base64. Currently,
2830	// this field only works for BatchAnnotateFiles requests. It does not
2831	// work for AsyncBatchAnnotateFiles requests.
2832	Content string `json:"content,omitempty"`
2833
2834	// GcsSource: The Google Cloud Storage location to read the input from.
2835	GcsSource *GoogleCloudVisionV1p1beta1GcsSource `json:"gcsSource,omitempty"`
2836
2837	// MimeType: The type of the file. Currently only "application/pdf",
2838	// "image/tiff" and "image/gif" are supported. Wildcards are not
2839	// supported.
2840	MimeType string `json:"mimeType,omitempty"`
2841
2842	// ForceSendFields is a list of field names (e.g. "Content") to
2843	// unconditionally include in API requests. By default, fields with
2844	// empty values are omitted from API requests. However, any non-pointer,
2845	// non-interface field appearing in ForceSendFields will be sent to the
2846	// server regardless of whether the field is empty or not. This may be
2847	// used to include empty fields in Patch requests.
2848	ForceSendFields []string `json:"-"`
2849
2850	// NullFields is a list of field names (e.g. "Content") to include in
2851	// API requests with the JSON null value. By default, fields with empty
2852	// values are omitted from API requests. However, any field with an
2853	// empty value appearing in NullFields will be sent to the server as
2854	// null. It is an error if a field in this list has a non-empty value.
2855	// This may be used to include null fields in Patch requests.
2856	NullFields []string `json:"-"`
2857}
2858
2859func (s *GoogleCloudVisionV1p1beta1InputConfig) MarshalJSON() ([]byte, error) {
2860	type NoMethod GoogleCloudVisionV1p1beta1InputConfig
2861	raw := NoMethod(*s)
2862	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2863}
2864
2865// GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation: Set of detected
2866// objects with bounding boxes.
2867type GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation struct {
2868	// BoundingPoly: Image region to which this object belongs. This must be
2869	// populated.
2870	BoundingPoly *GoogleCloudVisionV1p1beta1BoundingPoly `json:"boundingPoly,omitempty"`
2871
2872	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
2873	// For more information, see
2874	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
2875	LanguageCode string `json:"languageCode,omitempty"`
2876
2877	// Mid: Object ID that should align with EntityAnnotation mid.
2878	Mid string `json:"mid,omitempty"`
2879
2880	// Name: Object name, expressed in its `language_code` language.
2881	Name string `json:"name,omitempty"`
2882
2883	// Score: Score of the result. Range [0, 1].
2884	Score float64 `json:"score,omitempty"`
2885
2886	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
2887	// unconditionally include in API requests. By default, fields with
2888	// empty values are omitted from API requests. However, any non-pointer,
2889	// non-interface field appearing in ForceSendFields will be sent to the
2890	// server regardless of whether the field is empty or not. This may be
2891	// used to include empty fields in Patch requests.
2892	ForceSendFields []string `json:"-"`
2893
2894	// NullFields is a list of field names (e.g. "BoundingPoly") to include
2895	// in API requests with the JSON null value. By default, fields with
2896	// empty values are omitted from API requests. However, any field with
2897	// an empty value appearing in NullFields will be sent to the server as
2898	// null. It is an error if a field in this list has a non-empty value.
2899	// This may be used to include null fields in Patch requests.
2900	NullFields []string `json:"-"`
2901}
2902
2903func (s *GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation) MarshalJSON() ([]byte, error) {
2904	type NoMethod GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation
2905	raw := NoMethod(*s)
2906	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2907}
2908
2909func (s *GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation) UnmarshalJSON(data []byte) error {
2910	type NoMethod GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation
2911	var s1 struct {
2912		Score gensupport.JSONFloat64 `json:"score"`
2913		*NoMethod
2914	}
2915	s1.NoMethod = (*NoMethod)(s)
2916	if err := json.Unmarshal(data, &s1); err != nil {
2917		return err
2918	}
2919	s.Score = float64(s1.Score)
2920	return nil
2921}
2922
2923// GoogleCloudVisionV1p1beta1LocationInfo: Detected entity location
2924// information.
2925type GoogleCloudVisionV1p1beta1LocationInfo struct {
2926	// LatLng: lat/long location coordinates.
2927	LatLng *LatLng `json:"latLng,omitempty"`
2928
2929	// ForceSendFields is a list of field names (e.g. "LatLng") to
2930	// unconditionally include in API requests. By default, fields with
2931	// empty values are omitted from API requests. However, any non-pointer,
2932	// non-interface field appearing in ForceSendFields will be sent to the
2933	// server regardless of whether the field is empty or not. This may be
2934	// used to include empty fields in Patch requests.
2935	ForceSendFields []string `json:"-"`
2936
2937	// NullFields is a list of field names (e.g. "LatLng") to include in API
2938	// requests with the JSON null value. By default, fields with empty
2939	// values are omitted from API requests. However, any field with an
2940	// empty value appearing in NullFields will be sent to the server as
2941	// null. It is an error if a field in this list has a non-empty value.
2942	// This may be used to include null fields in Patch requests.
2943	NullFields []string `json:"-"`
2944}
2945
2946func (s *GoogleCloudVisionV1p1beta1LocationInfo) MarshalJSON() ([]byte, error) {
2947	type NoMethod GoogleCloudVisionV1p1beta1LocationInfo
2948	raw := NoMethod(*s)
2949	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2950}
2951
2952// GoogleCloudVisionV1p1beta1NormalizedVertex: A vertex represents a 2D
2953// point in the image. NOTE: the normalized vertex coordinates are
2954// relative to the original image and range from 0 to 1.
2955type GoogleCloudVisionV1p1beta1NormalizedVertex struct {
2956	// X: X coordinate.
2957	X float64 `json:"x,omitempty"`
2958
2959	// Y: Y coordinate.
2960	Y float64 `json:"y,omitempty"`
2961
2962	// ForceSendFields is a list of field names (e.g. "X") to
2963	// unconditionally include in API requests. By default, fields with
2964	// empty values are omitted from API requests. However, any non-pointer,
2965	// non-interface field appearing in ForceSendFields will be sent to the
2966	// server regardless of whether the field is empty or not. This may be
2967	// used to include empty fields in Patch requests.
2968	ForceSendFields []string `json:"-"`
2969
2970	// NullFields is a list of field names (e.g. "X") to include in API
2971	// requests with the JSON null value. By default, fields with empty
2972	// values are omitted from API requests. However, any field with an
2973	// empty value appearing in NullFields will be sent to the server as
2974	// null. It is an error if a field in this list has a non-empty value.
2975	// This may be used to include null fields in Patch requests.
2976	NullFields []string `json:"-"`
2977}
2978
2979func (s *GoogleCloudVisionV1p1beta1NormalizedVertex) MarshalJSON() ([]byte, error) {
2980	type NoMethod GoogleCloudVisionV1p1beta1NormalizedVertex
2981	raw := NoMethod(*s)
2982	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2983}
2984
2985func (s *GoogleCloudVisionV1p1beta1NormalizedVertex) UnmarshalJSON(data []byte) error {
2986	type NoMethod GoogleCloudVisionV1p1beta1NormalizedVertex
2987	var s1 struct {
2988		X gensupport.JSONFloat64 `json:"x"`
2989		Y gensupport.JSONFloat64 `json:"y"`
2990		*NoMethod
2991	}
2992	s1.NoMethod = (*NoMethod)(s)
2993	if err := json.Unmarshal(data, &s1); err != nil {
2994		return err
2995	}
2996	s.X = float64(s1.X)
2997	s.Y = float64(s1.Y)
2998	return nil
2999}
3000
3001// GoogleCloudVisionV1p1beta1OperationMetadata: Contains metadata for
3002// the BatchAnnotateImages operation.
3003type GoogleCloudVisionV1p1beta1OperationMetadata struct {
3004	// CreateTime: The time when the batch request was received.
3005	CreateTime string `json:"createTime,omitempty"`
3006
3007	// State: Current state of the batch operation.
3008	//
3009	// Possible values:
3010	//   "STATE_UNSPECIFIED" - Invalid.
3011	//   "CREATED" - Request is received.
3012	//   "RUNNING" - Request is actively being processed.
3013	//   "DONE" - The batch processing is done.
3014	//   "CANCELLED" - The batch processing was cancelled.
3015	State string `json:"state,omitempty"`
3016
3017	// UpdateTime: The time when the operation result was last updated.
3018	UpdateTime string `json:"updateTime,omitempty"`
3019
3020	// ForceSendFields is a list of field names (e.g. "CreateTime") to
3021	// unconditionally include in API requests. By default, fields with
3022	// empty values are omitted from API requests. However, any non-pointer,
3023	// non-interface field appearing in ForceSendFields will be sent to the
3024	// server regardless of whether the field is empty or not. This may be
3025	// used to include empty fields in Patch requests.
3026	ForceSendFields []string `json:"-"`
3027
3028	// NullFields is a list of field names (e.g. "CreateTime") to include in
3029	// API requests with the JSON null value. By default, fields with empty
3030	// values are omitted from API requests. However, any field with an
3031	// empty value appearing in NullFields will be sent to the server as
3032	// null. It is an error if a field in this list has a non-empty value.
3033	// This may be used to include null fields in Patch requests.
3034	NullFields []string `json:"-"`
3035}
3036
3037func (s *GoogleCloudVisionV1p1beta1OperationMetadata) MarshalJSON() ([]byte, error) {
3038	type NoMethod GoogleCloudVisionV1p1beta1OperationMetadata
3039	raw := NoMethod(*s)
3040	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3041}
3042
3043// GoogleCloudVisionV1p1beta1OutputConfig: The desired output location
3044// and metadata.
3045type GoogleCloudVisionV1p1beta1OutputConfig struct {
3046	// BatchSize: The max number of response protos to put into each output
3047	// JSON file on Google Cloud Storage. The valid range is [1, 100]. If
3048	// not specified, the default value is 20. For example, for one pdf file
3049	// with 100 pages, 100 response protos will be generated. If
3050	// `batch_size` = 20, then 5 json files each containing 20 response
3051	// protos will be written under the prefix `gcs_destination`.`uri`.
3052	// Currently, batch_size only applies to GcsDestination, with potential
3053	// future support for other output configurations.
3054	BatchSize int64 `json:"batchSize,omitempty"`
3055
3056	// GcsDestination: The Google Cloud Storage location to write the
3057	// output(s) to.
3058	GcsDestination *GoogleCloudVisionV1p1beta1GcsDestination `json:"gcsDestination,omitempty"`
3059
3060	// ForceSendFields is a list of field names (e.g. "BatchSize") to
3061	// unconditionally include in API requests. By default, fields with
3062	// empty values are omitted from API requests. However, any non-pointer,
3063	// non-interface field appearing in ForceSendFields will be sent to the
3064	// server regardless of whether the field is empty or not. This may be
3065	// used to include empty fields in Patch requests.
3066	ForceSendFields []string `json:"-"`
3067
3068	// NullFields is a list of field names (e.g. "BatchSize") to include in
3069	// API requests with the JSON null value. By default, fields with empty
3070	// values are omitted from API requests. However, any field with an
3071	// empty value appearing in NullFields will be sent to the server as
3072	// null. It is an error if a field in this list has a non-empty value.
3073	// This may be used to include null fields in Patch requests.
3074	NullFields []string `json:"-"`
3075}
3076
3077func (s *GoogleCloudVisionV1p1beta1OutputConfig) MarshalJSON() ([]byte, error) {
3078	type NoMethod GoogleCloudVisionV1p1beta1OutputConfig
3079	raw := NoMethod(*s)
3080	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3081}
3082
3083// GoogleCloudVisionV1p1beta1Page: Detected page from OCR.
3084type GoogleCloudVisionV1p1beta1Page struct {
3085	// Blocks: List of blocks of text, images etc on this page.
3086	Blocks []*GoogleCloudVisionV1p1beta1Block `json:"blocks,omitempty"`
3087
3088	// Confidence: Confidence of the OCR results on the page. Range [0, 1].
3089	Confidence float64 `json:"confidence,omitempty"`
3090
3091	// Height: Page height. For PDFs the unit is points. For images
3092	// (including TIFFs) the unit is pixels.
3093	Height int64 `json:"height,omitempty"`
3094
3095	// Property: Additional information detected on the page.
3096	Property *GoogleCloudVisionV1p1beta1TextAnnotationTextProperty `json:"property,omitempty"`
3097
3098	// Width: Page width. For PDFs the unit is points. For images (including
3099	// TIFFs) the unit is pixels.
3100	Width int64 `json:"width,omitempty"`
3101
3102	// ForceSendFields is a list of field names (e.g. "Blocks") to
3103	// unconditionally include in API requests. By default, fields with
3104	// empty values are omitted from API requests. However, any non-pointer,
3105	// non-interface field appearing in ForceSendFields will be sent to the
3106	// server regardless of whether the field is empty or not. This may be
3107	// used to include empty fields in Patch requests.
3108	ForceSendFields []string `json:"-"`
3109
3110	// NullFields is a list of field names (e.g. "Blocks") to include in API
3111	// requests with the JSON null value. By default, fields with empty
3112	// values are omitted from API requests. However, any field with an
3113	// empty value appearing in NullFields will be sent to the server as
3114	// null. It is an error if a field in this list has a non-empty value.
3115	// This may be used to include null fields in Patch requests.
3116	NullFields []string `json:"-"`
3117}
3118
3119func (s *GoogleCloudVisionV1p1beta1Page) MarshalJSON() ([]byte, error) {
3120	type NoMethod GoogleCloudVisionV1p1beta1Page
3121	raw := NoMethod(*s)
3122	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3123}
3124
3125func (s *GoogleCloudVisionV1p1beta1Page) UnmarshalJSON(data []byte) error {
3126	type NoMethod GoogleCloudVisionV1p1beta1Page
3127	var s1 struct {
3128		Confidence gensupport.JSONFloat64 `json:"confidence"`
3129		*NoMethod
3130	}
3131	s1.NoMethod = (*NoMethod)(s)
3132	if err := json.Unmarshal(data, &s1); err != nil {
3133		return err
3134	}
3135	s.Confidence = float64(s1.Confidence)
3136	return nil
3137}
3138
3139// GoogleCloudVisionV1p1beta1Paragraph: Structural unit of text
3140// representing a number of words in certain order.
3141type GoogleCloudVisionV1p1beta1Paragraph struct {
3142	// BoundingBox: The bounding box for the paragraph. The vertices are in
3143	// the order of top-left, top-right, bottom-right, bottom-left. When a
3144	// rotation of the bounding box is detected the rotation is represented
3145	// as around the top-left corner as defined when the text is read in the
3146	// 'natural' orientation. For example: * when the text is horizontal it
3147	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
3148	// around the top-left corner it becomes: 2----3 | | 1----0 and the
3149	// vertex order will still be (0, 1, 2, 3).
3150	BoundingBox *GoogleCloudVisionV1p1beta1BoundingPoly `json:"boundingBox,omitempty"`
3151
3152	// Confidence: Confidence of the OCR results for the paragraph. Range
3153	// [0, 1].
3154	Confidence float64 `json:"confidence,omitempty"`
3155
3156	// Property: Additional information detected for the paragraph.
3157	Property *GoogleCloudVisionV1p1beta1TextAnnotationTextProperty `json:"property,omitempty"`
3158
3159	// Words: List of all words in this paragraph.
3160	Words []*GoogleCloudVisionV1p1beta1Word `json:"words,omitempty"`
3161
3162	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
3163	// unconditionally include in API requests. By default, fields with
3164	// empty values are omitted from API requests. However, any non-pointer,
3165	// non-interface field appearing in ForceSendFields will be sent to the
3166	// server regardless of whether the field is empty or not. This may be
3167	// used to include empty fields in Patch requests.
3168	ForceSendFields []string `json:"-"`
3169
3170	// NullFields is a list of field names (e.g. "BoundingBox") to include
3171	// in API requests with the JSON null value. By default, fields with
3172	// empty values are omitted from API requests. However, any field with
3173	// an empty value appearing in NullFields will be sent to the server as
3174	// null. It is an error if a field in this list has a non-empty value.
3175	// This may be used to include null fields in Patch requests.
3176	NullFields []string `json:"-"`
3177}
3178
3179func (s *GoogleCloudVisionV1p1beta1Paragraph) MarshalJSON() ([]byte, error) {
3180	type NoMethod GoogleCloudVisionV1p1beta1Paragraph
3181	raw := NoMethod(*s)
3182	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3183}
3184
3185func (s *GoogleCloudVisionV1p1beta1Paragraph) UnmarshalJSON(data []byte) error {
3186	type NoMethod GoogleCloudVisionV1p1beta1Paragraph
3187	var s1 struct {
3188		Confidence gensupport.JSONFloat64 `json:"confidence"`
3189		*NoMethod
3190	}
3191	s1.NoMethod = (*NoMethod)(s)
3192	if err := json.Unmarshal(data, &s1); err != nil {
3193		return err
3194	}
3195	s.Confidence = float64(s1.Confidence)
3196	return nil
3197}
3198
3199// GoogleCloudVisionV1p1beta1Position: A 3D position in the image, used
3200// primarily for Face detection landmarks. A valid Position must have
3201// both x and y coordinates. The position coordinates are in the same
3202// scale as the original image.
3203type GoogleCloudVisionV1p1beta1Position struct {
3204	// X: X coordinate.
3205	X float64 `json:"x,omitempty"`
3206
3207	// Y: Y coordinate.
3208	Y float64 `json:"y,omitempty"`
3209
3210	// Z: Z coordinate (or depth).
3211	Z float64 `json:"z,omitempty"`
3212
3213	// ForceSendFields is a list of field names (e.g. "X") to
3214	// unconditionally include in API requests. By default, fields with
3215	// empty values are omitted from API requests. However, any non-pointer,
3216	// non-interface field appearing in ForceSendFields will be sent to the
3217	// server regardless of whether the field is empty or not. This may be
3218	// used to include empty fields in Patch requests.
3219	ForceSendFields []string `json:"-"`
3220
3221	// NullFields is a list of field names (e.g. "X") to include in API
3222	// requests with the JSON null value. By default, fields with empty
3223	// values are omitted from API requests. However, any field with an
3224	// empty value appearing in NullFields will be sent to the server as
3225	// null. It is an error if a field in this list has a non-empty value.
3226	// This may be used to include null fields in Patch requests.
3227	NullFields []string `json:"-"`
3228}
3229
3230func (s *GoogleCloudVisionV1p1beta1Position) MarshalJSON() ([]byte, error) {
3231	type NoMethod GoogleCloudVisionV1p1beta1Position
3232	raw := NoMethod(*s)
3233	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3234}
3235
3236func (s *GoogleCloudVisionV1p1beta1Position) UnmarshalJSON(data []byte) error {
3237	type NoMethod GoogleCloudVisionV1p1beta1Position
3238	var s1 struct {
3239		X gensupport.JSONFloat64 `json:"x"`
3240		Y gensupport.JSONFloat64 `json:"y"`
3241		Z gensupport.JSONFloat64 `json:"z"`
3242		*NoMethod
3243	}
3244	s1.NoMethod = (*NoMethod)(s)
3245	if err := json.Unmarshal(data, &s1); err != nil {
3246		return err
3247	}
3248	s.X = float64(s1.X)
3249	s.Y = float64(s1.Y)
3250	s.Z = float64(s1.Z)
3251	return nil
3252}
3253
3254// GoogleCloudVisionV1p1beta1Product: A Product contains
3255// ReferenceImages.
3256type GoogleCloudVisionV1p1beta1Product struct {
3257	// Description: User-provided metadata to be stored with this product.
3258	// Must be at most 4096 characters long.
3259	Description string `json:"description,omitempty"`
3260
3261	// DisplayName: The user-provided name for this Product. Must not be
3262	// empty. Must be at most 4096 characters long.
3263	DisplayName string `json:"displayName,omitempty"`
3264
3265	// Name: The resource name of the product. Format is:
3266	// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This
3267	// field is ignored when creating a product.
3268	Name string `json:"name,omitempty"`
3269
3270	// ProductCategory: Immutable. The category for the product identified
3271	// by the reference image. This should be one of "homegoods-v2",
3272	// "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The
3273	// legacy categories "homegoods", "apparel", and "toys" are still
3274	// supported, but these should not be used for new products.
3275	ProductCategory string `json:"productCategory,omitempty"`
3276
3277	// ProductLabels: Key-value pairs that can be attached to a product. At
3278	// query time, constraints can be specified based on the product_labels.
3279	// Note that integer values can be provided as strings, e.g. "1199".
3280	// Only strings with integer values can match a range-based restriction
3281	// which is to be supported soon. Multiple values can be assigned to the
3282	// same key. One product may have up to 500 product_labels. Notice that
3283	// the total number of distinct product_labels over all products in one
3284	// ProductSet cannot exceed 1M, otherwise the product search pipeline
3285	// will refuse to work for that ProductSet.
3286	ProductLabels []*GoogleCloudVisionV1p1beta1ProductKeyValue `json:"productLabels,omitempty"`
3287
3288	// ForceSendFields is a list of field names (e.g. "Description") to
3289	// unconditionally include in API requests. By default, fields with
3290	// empty values are omitted from API requests. However, any non-pointer,
3291	// non-interface field appearing in ForceSendFields will be sent to the
3292	// server regardless of whether the field is empty or not. This may be
3293	// used to include empty fields in Patch requests.
3294	ForceSendFields []string `json:"-"`
3295
3296	// NullFields is a list of field names (e.g. "Description") to include
3297	// in API requests with the JSON null value. By default, fields with
3298	// empty values are omitted from API requests. However, any field with
3299	// an empty value appearing in NullFields will be sent to the server as
3300	// null. It is an error if a field in this list has a non-empty value.
3301	// This may be used to include null fields in Patch requests.
3302	NullFields []string `json:"-"`
3303}
3304
3305func (s *GoogleCloudVisionV1p1beta1Product) MarshalJSON() ([]byte, error) {
3306	type NoMethod GoogleCloudVisionV1p1beta1Product
3307	raw := NoMethod(*s)
3308	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3309}
3310
3311// GoogleCloudVisionV1p1beta1ProductKeyValue: A product label
3312// represented as a key-value pair.
3313type GoogleCloudVisionV1p1beta1ProductKeyValue struct {
3314	// Key: The key of the label attached to the product. Cannot be empty
3315	// and cannot exceed 128 bytes.
3316	Key string `json:"key,omitempty"`
3317
3318	// Value: The value of the label attached to the product. Cannot be
3319	// empty and cannot exceed 128 bytes.
3320	Value string `json:"value,omitempty"`
3321
3322	// ForceSendFields is a list of field names (e.g. "Key") to
3323	// unconditionally include in API requests. By default, fields with
3324	// empty values are omitted from API requests. However, any non-pointer,
3325	// non-interface field appearing in ForceSendFields will be sent to the
3326	// server regardless of whether the field is empty or not. This may be
3327	// used to include empty fields in Patch requests.
3328	ForceSendFields []string `json:"-"`
3329
3330	// NullFields is a list of field names (e.g. "Key") to include in API
3331	// requests with the JSON null value. By default, fields with empty
3332	// values are omitted from API requests. However, any field with an
3333	// empty value appearing in NullFields will be sent to the server as
3334	// null. It is an error if a field in this list has a non-empty value.
3335	// This may be used to include null fields in Patch requests.
3336	NullFields []string `json:"-"`
3337}
3338
3339func (s *GoogleCloudVisionV1p1beta1ProductKeyValue) MarshalJSON() ([]byte, error) {
3340	type NoMethod GoogleCloudVisionV1p1beta1ProductKeyValue
3341	raw := NoMethod(*s)
3342	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3343}
3344
3345// GoogleCloudVisionV1p1beta1ProductSearchResults: Results for a product
3346// search request.
3347type GoogleCloudVisionV1p1beta1ProductSearchResults struct {
3348	// IndexTime: Timestamp of the index which provided these results.
3349	// Products added to the product set and products removed from the
3350	// product set after this time are not reflected in the current results.
3351	IndexTime string `json:"indexTime,omitempty"`
3352
3353	// ProductGroupedResults: List of results grouped by products detected
3354	// in the query image. Each entry corresponds to one bounding polygon in
3355	// the query image, and contains the matching products specific to that
3356	// region. There may be duplicate product matches in the union of all
3357	// the per-product results.
3358	ProductGroupedResults []*GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult `json:"productGroupedResults,omitempty"`
3359
3360	// Results: List of results, one for each product match.
3361	Results []*GoogleCloudVisionV1p1beta1ProductSearchResultsResult `json:"results,omitempty"`
3362
3363	// ForceSendFields is a list of field names (e.g. "IndexTime") to
3364	// unconditionally include in API requests. By default, fields with
3365	// empty values are omitted from API requests. However, any non-pointer,
3366	// non-interface field appearing in ForceSendFields will be sent to the
3367	// server regardless of whether the field is empty or not. This may be
3368	// used to include empty fields in Patch requests.
3369	ForceSendFields []string `json:"-"`
3370
3371	// NullFields is a list of field names (e.g. "IndexTime") to include in
3372	// API requests with the JSON null value. By default, fields with empty
3373	// values are omitted from API requests. However, any field with an
3374	// empty value appearing in NullFields will be sent to the server as
3375	// null. It is an error if a field in this list has a non-empty value.
3376	// This may be used to include null fields in Patch requests.
3377	NullFields []string `json:"-"`
3378}
3379
3380func (s *GoogleCloudVisionV1p1beta1ProductSearchResults) MarshalJSON() ([]byte, error) {
3381	type NoMethod GoogleCloudVisionV1p1beta1ProductSearchResults
3382	raw := NoMethod(*s)
3383	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3384}
3385
3386// GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult:
3387// Information about the products similar to a single product in a query
3388// image.
3389type GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult struct {
3390	// BoundingPoly: The bounding polygon around the product detected in the
3391	// query image.
3392	BoundingPoly *GoogleCloudVisionV1p1beta1BoundingPoly `json:"boundingPoly,omitempty"`
3393
3394	// ObjectAnnotations: List of generic predictions for the object in the
3395	// bounding box.
3396	ObjectAnnotations []*GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation `json:"objectAnnotations,omitempty"`
3397
3398	// Results: List of results, one for each product match.
3399	Results []*GoogleCloudVisionV1p1beta1ProductSearchResultsResult `json:"results,omitempty"`
3400
3401	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
3402	// unconditionally include in API requests. By default, fields with
3403	// empty values are omitted from API requests. However, any non-pointer,
3404	// non-interface field appearing in ForceSendFields will be sent to the
3405	// server regardless of whether the field is empty or not. This may be
3406	// used to include empty fields in Patch requests.
3407	ForceSendFields []string `json:"-"`
3408
3409	// NullFields is a list of field names (e.g. "BoundingPoly") to include
3410	// in API requests with the JSON null value. By default, fields with
3411	// empty values are omitted from API requests. However, any field with
3412	// an empty value appearing in NullFields will be sent to the server as
3413	// null. It is an error if a field in this list has a non-empty value.
3414	// This may be used to include null fields in Patch requests.
3415	NullFields []string `json:"-"`
3416}
3417
3418func (s *GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult) MarshalJSON() ([]byte, error) {
3419	type NoMethod GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult
3420	raw := NoMethod(*s)
3421	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3422}
3423
3424// GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation:
3425// Prediction for what the object in the bounding box is.
3426type GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation struct {
3427	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
3428	// For more information, see
3429	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
3430	LanguageCode string `json:"languageCode,omitempty"`
3431
3432	// Mid: Object ID that should align with EntityAnnotation mid.
3433	Mid string `json:"mid,omitempty"`
3434
3435	// Name: Object name, expressed in its `language_code` language.
3436	Name string `json:"name,omitempty"`
3437
3438	// Score: Score of the result. Range [0, 1].
3439	Score float64 `json:"score,omitempty"`
3440
3441	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
3442	// unconditionally include in API requests. By default, fields with
3443	// empty values are omitted from API requests. However, any non-pointer,
3444	// non-interface field appearing in ForceSendFields will be sent to the
3445	// server regardless of whether the field is empty or not. This may be
3446	// used to include empty fields in Patch requests.
3447	ForceSendFields []string `json:"-"`
3448
3449	// NullFields is a list of field names (e.g. "LanguageCode") to include
3450	// in API requests with the JSON null value. By default, fields with
3451	// empty values are omitted from API requests. However, any field with
3452	// an empty value appearing in NullFields will be sent to the server as
3453	// null. It is an error if a field in this list has a non-empty value.
3454	// This may be used to include null fields in Patch requests.
3455	NullFields []string `json:"-"`
3456}
3457
3458func (s *GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation) MarshalJSON() ([]byte, error) {
3459	type NoMethod GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation
3460	raw := NoMethod(*s)
3461	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3462}
3463
3464func (s *GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation) UnmarshalJSON(data []byte) error {
3465	type NoMethod GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation
3466	var s1 struct {
3467		Score gensupport.JSONFloat64 `json:"score"`
3468		*NoMethod
3469	}
3470	s1.NoMethod = (*NoMethod)(s)
3471	if err := json.Unmarshal(data, &s1); err != nil {
3472		return err
3473	}
3474	s.Score = float64(s1.Score)
3475	return nil
3476}
3477
3478// GoogleCloudVisionV1p1beta1ProductSearchResultsResult: Information
3479// about a product.
3480type GoogleCloudVisionV1p1beta1ProductSearchResultsResult struct {
3481	// Image: The resource name of the image from the product that is the
3482	// closest match to the query.
3483	Image string `json:"image,omitempty"`
3484
3485	// Product: The Product.
3486	Product *GoogleCloudVisionV1p1beta1Product `json:"product,omitempty"`
3487
3488	// Score: A confidence level on the match, ranging from 0 (no
3489	// confidence) to 1 (full confidence).
3490	Score float64 `json:"score,omitempty"`
3491
3492	// ForceSendFields is a list of field names (e.g. "Image") to
3493	// unconditionally include in API requests. By default, fields with
3494	// empty values are omitted from API requests. However, any non-pointer,
3495	// non-interface field appearing in ForceSendFields will be sent to the
3496	// server regardless of whether the field is empty or not. This may be
3497	// used to include empty fields in Patch requests.
3498	ForceSendFields []string `json:"-"`
3499
3500	// NullFields is a list of field names (e.g. "Image") to include in API
3501	// requests with the JSON null value. By default, fields with empty
3502	// values are omitted from API requests. However, any field with an
3503	// empty value appearing in NullFields will be sent to the server as
3504	// null. It is an error if a field in this list has a non-empty value.
3505	// This may be used to include null fields in Patch requests.
3506	NullFields []string `json:"-"`
3507}
3508
3509func (s *GoogleCloudVisionV1p1beta1ProductSearchResultsResult) MarshalJSON() ([]byte, error) {
3510	type NoMethod GoogleCloudVisionV1p1beta1ProductSearchResultsResult
3511	raw := NoMethod(*s)
3512	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3513}
3514
3515func (s *GoogleCloudVisionV1p1beta1ProductSearchResultsResult) UnmarshalJSON(data []byte) error {
3516	type NoMethod GoogleCloudVisionV1p1beta1ProductSearchResultsResult
3517	var s1 struct {
3518		Score gensupport.JSONFloat64 `json:"score"`
3519		*NoMethod
3520	}
3521	s1.NoMethod = (*NoMethod)(s)
3522	if err := json.Unmarshal(data, &s1); err != nil {
3523		return err
3524	}
3525	s.Score = float64(s1.Score)
3526	return nil
3527}
3528
3529// GoogleCloudVisionV1p1beta1Property: A `Property` consists of a
3530// user-supplied name/value pair.
3531type GoogleCloudVisionV1p1beta1Property struct {
3532	// Name: Name of the property.
3533	Name string `json:"name,omitempty"`
3534
3535	// Uint64Value: Value of numeric properties.
3536	Uint64Value uint64 `json:"uint64Value,omitempty,string"`
3537
3538	// Value: Value of the property.
3539	Value string `json:"value,omitempty"`
3540
3541	// ForceSendFields is a list of field names (e.g. "Name") to
3542	// unconditionally include in API requests. By default, fields with
3543	// empty values are omitted from API requests. However, any non-pointer,
3544	// non-interface field appearing in ForceSendFields will be sent to the
3545	// server regardless of whether the field is empty or not. This may be
3546	// used to include empty fields in Patch requests.
3547	ForceSendFields []string `json:"-"`
3548
3549	// NullFields is a list of field names (e.g. "Name") to include in API
3550	// requests with the JSON null value. By default, fields with empty
3551	// values are omitted from API requests. However, any field with an
3552	// empty value appearing in NullFields will be sent to the server as
3553	// null. It is an error if a field in this list has a non-empty value.
3554	// This may be used to include null fields in Patch requests.
3555	NullFields []string `json:"-"`
3556}
3557
3558func (s *GoogleCloudVisionV1p1beta1Property) MarshalJSON() ([]byte, error) {
3559	type NoMethod GoogleCloudVisionV1p1beta1Property
3560	raw := NoMethod(*s)
3561	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3562}
3563
3564// GoogleCloudVisionV1p1beta1SafeSearchAnnotation: Set of features
3565// pertaining to the image, computed by computer vision methods over
3566// safe-search verticals (for example, adult, spoof, medical, violence).
3567type GoogleCloudVisionV1p1beta1SafeSearchAnnotation struct {
3568	// Adult: Represents the adult content likelihood for the image. Adult
3569	// content may contain elements such as nudity, pornographic images or
3570	// cartoons, or sexual activities.
3571	//
3572	// Possible values:
3573	//   "UNKNOWN" - Unknown likelihood.
3574	//   "VERY_UNLIKELY" - It is very unlikely.
3575	//   "UNLIKELY" - It is unlikely.
3576	//   "POSSIBLE" - It is possible.
3577	//   "LIKELY" - It is likely.
3578	//   "VERY_LIKELY" - It is very likely.
3579	Adult string `json:"adult,omitempty"`
3580
3581	// Medical: Likelihood that this is a medical image.
3582	//
3583	// Possible values:
3584	//   "UNKNOWN" - Unknown likelihood.
3585	//   "VERY_UNLIKELY" - It is very unlikely.
3586	//   "UNLIKELY" - It is unlikely.
3587	//   "POSSIBLE" - It is possible.
3588	//   "LIKELY" - It is likely.
3589	//   "VERY_LIKELY" - It is very likely.
3590	Medical string `json:"medical,omitempty"`
3591
3592	// Racy: Likelihood that the request image contains racy content. Racy
3593	// content may include (but is not limited to) skimpy or sheer clothing,
3594	// strategically covered nudity, lewd or provocative poses, or close-ups
3595	// of sensitive body areas.
3596	//
3597	// Possible values:
3598	//   "UNKNOWN" - Unknown likelihood.
3599	//   "VERY_UNLIKELY" - It is very unlikely.
3600	//   "UNLIKELY" - It is unlikely.
3601	//   "POSSIBLE" - It is possible.
3602	//   "LIKELY" - It is likely.
3603	//   "VERY_LIKELY" - It is very likely.
3604	Racy string `json:"racy,omitempty"`
3605
3606	// Spoof: Spoof likelihood. The likelihood that an modification was made
3607	// to the image's canonical version to make it appear funny or
3608	// offensive.
3609	//
3610	// Possible values:
3611	//   "UNKNOWN" - Unknown likelihood.
3612	//   "VERY_UNLIKELY" - It is very unlikely.
3613	//   "UNLIKELY" - It is unlikely.
3614	//   "POSSIBLE" - It is possible.
3615	//   "LIKELY" - It is likely.
3616	//   "VERY_LIKELY" - It is very likely.
3617	Spoof string `json:"spoof,omitempty"`
3618
3619	// Violence: Likelihood that this image contains violent content.
3620	//
3621	// Possible values:
3622	//   "UNKNOWN" - Unknown likelihood.
3623	//   "VERY_UNLIKELY" - It is very unlikely.
3624	//   "UNLIKELY" - It is unlikely.
3625	//   "POSSIBLE" - It is possible.
3626	//   "LIKELY" - It is likely.
3627	//   "VERY_LIKELY" - It is very likely.
3628	Violence string `json:"violence,omitempty"`
3629
3630	// ForceSendFields is a list of field names (e.g. "Adult") to
3631	// unconditionally include in API requests. By default, fields with
3632	// empty values are omitted from API requests. However, any non-pointer,
3633	// non-interface field appearing in ForceSendFields will be sent to the
3634	// server regardless of whether the field is empty or not. This may be
3635	// used to include empty fields in Patch requests.
3636	ForceSendFields []string `json:"-"`
3637
3638	// NullFields is a list of field names (e.g. "Adult") to include in API
3639	// requests with the JSON null value. By default, fields with empty
3640	// values are omitted from API requests. However, any field with an
3641	// empty value appearing in NullFields will be sent to the server as
3642	// null. It is an error if a field in this list has a non-empty value.
3643	// This may be used to include null fields in Patch requests.
3644	NullFields []string `json:"-"`
3645}
3646
3647func (s *GoogleCloudVisionV1p1beta1SafeSearchAnnotation) MarshalJSON() ([]byte, error) {
3648	type NoMethod GoogleCloudVisionV1p1beta1SafeSearchAnnotation
3649	raw := NoMethod(*s)
3650	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3651}
3652
3653// GoogleCloudVisionV1p1beta1Symbol: A single symbol representation.
3654type GoogleCloudVisionV1p1beta1Symbol struct {
3655	// BoundingBox: The bounding box for the symbol. The vertices are in the
3656	// order of top-left, top-right, bottom-right, bottom-left. When a
3657	// rotation of the bounding box is detected the rotation is represented
3658	// as around the top-left corner as defined when the text is read in the
3659	// 'natural' orientation. For example: * when the text is horizontal it
3660	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
3661	// around the top-left corner it becomes: 2----3 | | 1----0 and the
3662	// vertex order will still be (0, 1, 2, 3).
3663	BoundingBox *GoogleCloudVisionV1p1beta1BoundingPoly `json:"boundingBox,omitempty"`
3664
3665	// Confidence: Confidence of the OCR results for the symbol. Range [0,
3666	// 1].
3667	Confidence float64 `json:"confidence,omitempty"`
3668
3669	// Property: Additional information detected for the symbol.
3670	Property *GoogleCloudVisionV1p1beta1TextAnnotationTextProperty `json:"property,omitempty"`
3671
3672	// Text: The actual UTF-8 representation of the symbol.
3673	Text string `json:"text,omitempty"`
3674
3675	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
3676	// unconditionally include in API requests. By default, fields with
3677	// empty values are omitted from API requests. However, any non-pointer,
3678	// non-interface field appearing in ForceSendFields will be sent to the
3679	// server regardless of whether the field is empty or not. This may be
3680	// used to include empty fields in Patch requests.
3681	ForceSendFields []string `json:"-"`
3682
3683	// NullFields is a list of field names (e.g. "BoundingBox") to include
3684	// in API requests with the JSON null value. By default, fields with
3685	// empty values are omitted from API requests. However, any field with
3686	// an empty value appearing in NullFields will be sent to the server as
3687	// null. It is an error if a field in this list has a non-empty value.
3688	// This may be used to include null fields in Patch requests.
3689	NullFields []string `json:"-"`
3690}
3691
3692func (s *GoogleCloudVisionV1p1beta1Symbol) MarshalJSON() ([]byte, error) {
3693	type NoMethod GoogleCloudVisionV1p1beta1Symbol
3694	raw := NoMethod(*s)
3695	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3696}
3697
3698func (s *GoogleCloudVisionV1p1beta1Symbol) UnmarshalJSON(data []byte) error {
3699	type NoMethod GoogleCloudVisionV1p1beta1Symbol
3700	var s1 struct {
3701		Confidence gensupport.JSONFloat64 `json:"confidence"`
3702		*NoMethod
3703	}
3704	s1.NoMethod = (*NoMethod)(s)
3705	if err := json.Unmarshal(data, &s1); err != nil {
3706		return err
3707	}
3708	s.Confidence = float64(s1.Confidence)
3709	return nil
3710}
3711
3712// GoogleCloudVisionV1p1beta1TextAnnotation: TextAnnotation contains a
3713// structured representation of OCR extracted text. The hierarchy of an
3714// OCR extracted text structure is like this: TextAnnotation -> Page ->
3715// Block -> Paragraph -> Word -> Symbol Each structural component,
3716// starting from Page, may further have their own properties. Properties
3717// describe detected languages, breaks etc.. Please refer to the
3718// TextAnnotation.TextProperty message definition below for more detail.
3719type GoogleCloudVisionV1p1beta1TextAnnotation struct {
3720	// Pages: List of pages detected by OCR.
3721	Pages []*GoogleCloudVisionV1p1beta1Page `json:"pages,omitempty"`
3722
3723	// Text: UTF-8 text detected on the pages.
3724	Text string `json:"text,omitempty"`
3725
3726	// ForceSendFields is a list of field names (e.g. "Pages") to
3727	// unconditionally include in API requests. By default, fields with
3728	// empty values are omitted from API requests. However, any non-pointer,
3729	// non-interface field appearing in ForceSendFields will be sent to the
3730	// server regardless of whether the field is empty or not. This may be
3731	// used to include empty fields in Patch requests.
3732	ForceSendFields []string `json:"-"`
3733
3734	// NullFields is a list of field names (e.g. "Pages") to include in API
3735	// requests with the JSON null value. By default, fields with empty
3736	// values are omitted from API requests. However, any field with an
3737	// empty value appearing in NullFields will be sent to the server as
3738	// null. It is an error if a field in this list has a non-empty value.
3739	// This may be used to include null fields in Patch requests.
3740	NullFields []string `json:"-"`
3741}
3742
3743func (s *GoogleCloudVisionV1p1beta1TextAnnotation) MarshalJSON() ([]byte, error) {
3744	type NoMethod GoogleCloudVisionV1p1beta1TextAnnotation
3745	raw := NoMethod(*s)
3746	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3747}
3748
3749// GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak: Detected start
3750// or end of a structural component.
3751type GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak struct {
3752	// IsPrefix: True if break prepends the element.
3753	IsPrefix bool `json:"isPrefix,omitempty"`
3754
3755	// Type: Detected break type.
3756	//
3757	// Possible values:
3758	//   "UNKNOWN" - Unknown break label type.
3759	//   "SPACE" - Regular space.
3760	//   "SURE_SPACE" - Sure space (very wide).
3761	//   "EOL_SURE_SPACE" - Line-wrapping break.
3762	//   "HYPHEN" - End-line hyphen that is not present in text; does not
3763	// co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
3764	//   "LINE_BREAK" - Line break that ends a paragraph.
3765	Type string `json:"type,omitempty"`
3766
3767	// ForceSendFields is a list of field names (e.g. "IsPrefix") to
3768	// unconditionally include in API requests. By default, fields with
3769	// empty values are omitted from API requests. However, any non-pointer,
3770	// non-interface field appearing in ForceSendFields will be sent to the
3771	// server regardless of whether the field is empty or not. This may be
3772	// used to include empty fields in Patch requests.
3773	ForceSendFields []string `json:"-"`
3774
3775	// NullFields is a list of field names (e.g. "IsPrefix") to include in
3776	// API requests with the JSON null value. By default, fields with empty
3777	// values are omitted from API requests. However, any field with an
3778	// empty value appearing in NullFields will be sent to the server as
3779	// null. It is an error if a field in this list has a non-empty value.
3780	// This may be used to include null fields in Patch requests.
3781	NullFields []string `json:"-"`
3782}
3783
3784func (s *GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak) MarshalJSON() ([]byte, error) {
3785	type NoMethod GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak
3786	raw := NoMethod(*s)
3787	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3788}
3789
3790// GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage: Detected
3791// language for a structural component.
3792type GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage struct {
3793	// Confidence: Confidence of detected language. Range [0, 1].
3794	Confidence float64 `json:"confidence,omitempty"`
3795
3796	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
3797	// For more information, see
3798	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
3799	LanguageCode string `json:"languageCode,omitempty"`
3800
3801	// ForceSendFields is a list of field names (e.g. "Confidence") to
3802	// unconditionally include in API requests. By default, fields with
3803	// empty values are omitted from API requests. However, any non-pointer,
3804	// non-interface field appearing in ForceSendFields will be sent to the
3805	// server regardless of whether the field is empty or not. This may be
3806	// used to include empty fields in Patch requests.
3807	ForceSendFields []string `json:"-"`
3808
3809	// NullFields is a list of field names (e.g. "Confidence") to include in
3810	// API requests with the JSON null value. By default, fields with empty
3811	// values are omitted from API requests. However, any field with an
3812	// empty value appearing in NullFields will be sent to the server as
3813	// null. It is an error if a field in this list has a non-empty value.
3814	// This may be used to include null fields in Patch requests.
3815	NullFields []string `json:"-"`
3816}
3817
3818func (s *GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage) MarshalJSON() ([]byte, error) {
3819	type NoMethod GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage
3820	raw := NoMethod(*s)
3821	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3822}
3823
3824func (s *GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage) UnmarshalJSON(data []byte) error {
3825	type NoMethod GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage
3826	var s1 struct {
3827		Confidence gensupport.JSONFloat64 `json:"confidence"`
3828		*NoMethod
3829	}
3830	s1.NoMethod = (*NoMethod)(s)
3831	if err := json.Unmarshal(data, &s1); err != nil {
3832		return err
3833	}
3834	s.Confidence = float64(s1.Confidence)
3835	return nil
3836}
3837
3838// GoogleCloudVisionV1p1beta1TextAnnotationTextProperty: Additional
3839// information detected on the structural component.
3840type GoogleCloudVisionV1p1beta1TextAnnotationTextProperty struct {
3841	// DetectedBreak: Detected start or end of a text segment.
3842	DetectedBreak *GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak `json:"detectedBreak,omitempty"`
3843
3844	// DetectedLanguages: A list of detected languages together with
3845	// confidence.
3846	DetectedLanguages []*GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage `json:"detectedLanguages,omitempty"`
3847
3848	// ForceSendFields is a list of field names (e.g. "DetectedBreak") to
3849	// unconditionally include in API requests. By default, fields with
3850	// empty values are omitted from API requests. However, any non-pointer,
3851	// non-interface field appearing in ForceSendFields will be sent to the
3852	// server regardless of whether the field is empty or not. This may be
3853	// used to include empty fields in Patch requests.
3854	ForceSendFields []string `json:"-"`
3855
3856	// NullFields is a list of field names (e.g. "DetectedBreak") to include
3857	// in API requests with the JSON null value. By default, fields with
3858	// empty values are omitted from API requests. However, any field with
3859	// an empty value appearing in NullFields will be sent to the server as
3860	// null. It is an error if a field in this list has a non-empty value.
3861	// This may be used to include null fields in Patch requests.
3862	NullFields []string `json:"-"`
3863}
3864
3865func (s *GoogleCloudVisionV1p1beta1TextAnnotationTextProperty) MarshalJSON() ([]byte, error) {
3866	type NoMethod GoogleCloudVisionV1p1beta1TextAnnotationTextProperty
3867	raw := NoMethod(*s)
3868	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3869}
3870
3871// GoogleCloudVisionV1p1beta1Vertex: A vertex represents a 2D point in
3872// the image. NOTE: the vertex coordinates are in the same scale as the
3873// original image.
3874type GoogleCloudVisionV1p1beta1Vertex struct {
3875	// X: X coordinate.
3876	X int64 `json:"x,omitempty"`
3877
3878	// Y: Y coordinate.
3879	Y int64 `json:"y,omitempty"`
3880
3881	// ForceSendFields is a list of field names (e.g. "X") to
3882	// unconditionally include in API requests. By default, fields with
3883	// empty values are omitted from API requests. However, any non-pointer,
3884	// non-interface field appearing in ForceSendFields will be sent to the
3885	// server regardless of whether the field is empty or not. This may be
3886	// used to include empty fields in Patch requests.
3887	ForceSendFields []string `json:"-"`
3888
3889	// NullFields is a list of field names (e.g. "X") to include in API
3890	// requests with the JSON null value. By default, fields with empty
3891	// values are omitted from API requests. However, any field with an
3892	// empty value appearing in NullFields will be sent to the server as
3893	// null. It is an error if a field in this list has a non-empty value.
3894	// This may be used to include null fields in Patch requests.
3895	NullFields []string `json:"-"`
3896}
3897
3898func (s *GoogleCloudVisionV1p1beta1Vertex) MarshalJSON() ([]byte, error) {
3899	type NoMethod GoogleCloudVisionV1p1beta1Vertex
3900	raw := NoMethod(*s)
3901	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3902}
3903
3904// GoogleCloudVisionV1p1beta1WebDetection: Relevant information for the
3905// image from the Internet.
3906type GoogleCloudVisionV1p1beta1WebDetection struct {
3907	// BestGuessLabels: The service's best guess as to the topic of the
3908	// request image. Inferred from similar images on the open web.
3909	BestGuessLabels []*GoogleCloudVisionV1p1beta1WebDetectionWebLabel `json:"bestGuessLabels,omitempty"`
3910
3911	// FullMatchingImages: Fully matching images from the Internet. Can
3912	// include resized copies of the query image.
3913	FullMatchingImages []*GoogleCloudVisionV1p1beta1WebDetectionWebImage `json:"fullMatchingImages,omitempty"`
3914
3915	// PagesWithMatchingImages: Web pages containing the matching images
3916	// from the Internet.
3917	PagesWithMatchingImages []*GoogleCloudVisionV1p1beta1WebDetectionWebPage `json:"pagesWithMatchingImages,omitempty"`
3918
3919	// PartialMatchingImages: Partial matching images from the Internet.
3920	// Those images are similar enough to share some key-point features. For
3921	// example an original image will likely have partial matching for its
3922	// crops.
3923	PartialMatchingImages []*GoogleCloudVisionV1p1beta1WebDetectionWebImage `json:"partialMatchingImages,omitempty"`
3924
3925	// VisuallySimilarImages: The visually similar image results.
3926	VisuallySimilarImages []*GoogleCloudVisionV1p1beta1WebDetectionWebImage `json:"visuallySimilarImages,omitempty"`
3927
3928	// WebEntities: Deduced entities from similar images on the Internet.
3929	WebEntities []*GoogleCloudVisionV1p1beta1WebDetectionWebEntity `json:"webEntities,omitempty"`
3930
3931	// ForceSendFields is a list of field names (e.g. "BestGuessLabels") to
3932	// unconditionally include in API requests. By default, fields with
3933	// empty values are omitted from API requests. However, any non-pointer,
3934	// non-interface field appearing in ForceSendFields will be sent to the
3935	// server regardless of whether the field is empty or not. This may be
3936	// used to include empty fields in Patch requests.
3937	ForceSendFields []string `json:"-"`
3938
3939	// NullFields is a list of field names (e.g. "BestGuessLabels") to
3940	// include in API requests with the JSON null value. By default, fields
3941	// with empty values are omitted from API requests. However, any field
3942	// with an empty value appearing in NullFields will be sent to the
3943	// server as null. It is an error if a field in this list has a
3944	// non-empty value. This may be used to include null fields in Patch
3945	// requests.
3946	NullFields []string `json:"-"`
3947}
3948
3949func (s *GoogleCloudVisionV1p1beta1WebDetection) MarshalJSON() ([]byte, error) {
3950	type NoMethod GoogleCloudVisionV1p1beta1WebDetection
3951	raw := NoMethod(*s)
3952	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3953}
3954
3955// GoogleCloudVisionV1p1beta1WebDetectionWebEntity: Entity deduced from
3956// similar images on the Internet.
3957type GoogleCloudVisionV1p1beta1WebDetectionWebEntity struct {
3958	// Description: Canonical description of the entity, in English.
3959	Description string `json:"description,omitempty"`
3960
3961	// EntityId: Opaque entity ID.
3962	EntityId string `json:"entityId,omitempty"`
3963
3964	// Score: Overall relevancy score for the entity. Not normalized and not
3965	// comparable across different image queries.
3966	Score float64 `json:"score,omitempty"`
3967
3968	// ForceSendFields is a list of field names (e.g. "Description") to
3969	// unconditionally include in API requests. By default, fields with
3970	// empty values are omitted from API requests. However, any non-pointer,
3971	// non-interface field appearing in ForceSendFields will be sent to the
3972	// server regardless of whether the field is empty or not. This may be
3973	// used to include empty fields in Patch requests.
3974	ForceSendFields []string `json:"-"`
3975
3976	// NullFields is a list of field names (e.g. "Description") to include
3977	// in API requests with the JSON null value. By default, fields with
3978	// empty values are omitted from API requests. However, any field with
3979	// an empty value appearing in NullFields will be sent to the server as
3980	// null. It is an error if a field in this list has a non-empty value.
3981	// This may be used to include null fields in Patch requests.
3982	NullFields []string `json:"-"`
3983}
3984
3985func (s *GoogleCloudVisionV1p1beta1WebDetectionWebEntity) MarshalJSON() ([]byte, error) {
3986	type NoMethod GoogleCloudVisionV1p1beta1WebDetectionWebEntity
3987	raw := NoMethod(*s)
3988	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3989}
3990
3991func (s *GoogleCloudVisionV1p1beta1WebDetectionWebEntity) UnmarshalJSON(data []byte) error {
3992	type NoMethod GoogleCloudVisionV1p1beta1WebDetectionWebEntity
3993	var s1 struct {
3994		Score gensupport.JSONFloat64 `json:"score"`
3995		*NoMethod
3996	}
3997	s1.NoMethod = (*NoMethod)(s)
3998	if err := json.Unmarshal(data, &s1); err != nil {
3999		return err
4000	}
4001	s.Score = float64(s1.Score)
4002	return nil
4003}
4004
4005// GoogleCloudVisionV1p1beta1WebDetectionWebImage: Metadata for online
4006// images.
4007type GoogleCloudVisionV1p1beta1WebDetectionWebImage struct {
4008	// Score: (Deprecated) Overall relevancy score for the image.
4009	Score float64 `json:"score,omitempty"`
4010
4011	// Url: The result image URL.
4012	Url string `json:"url,omitempty"`
4013
4014	// ForceSendFields is a list of field names (e.g. "Score") to
4015	// unconditionally include in API requests. By default, fields with
4016	// empty values are omitted from API requests. However, any non-pointer,
4017	// non-interface field appearing in ForceSendFields will be sent to the
4018	// server regardless of whether the field is empty or not. This may be
4019	// used to include empty fields in Patch requests.
4020	ForceSendFields []string `json:"-"`
4021
4022	// NullFields is a list of field names (e.g. "Score") to include in API
4023	// requests with the JSON null value. By default, fields with empty
4024	// values are omitted from API requests. However, any field with an
4025	// empty value appearing in NullFields will be sent to the server as
4026	// null. It is an error if a field in this list has a non-empty value.
4027	// This may be used to include null fields in Patch requests.
4028	NullFields []string `json:"-"`
4029}
4030
4031func (s *GoogleCloudVisionV1p1beta1WebDetectionWebImage) MarshalJSON() ([]byte, error) {
4032	type NoMethod GoogleCloudVisionV1p1beta1WebDetectionWebImage
4033	raw := NoMethod(*s)
4034	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4035}
4036
4037func (s *GoogleCloudVisionV1p1beta1WebDetectionWebImage) UnmarshalJSON(data []byte) error {
4038	type NoMethod GoogleCloudVisionV1p1beta1WebDetectionWebImage
4039	var s1 struct {
4040		Score gensupport.JSONFloat64 `json:"score"`
4041		*NoMethod
4042	}
4043	s1.NoMethod = (*NoMethod)(s)
4044	if err := json.Unmarshal(data, &s1); err != nil {
4045		return err
4046	}
4047	s.Score = float64(s1.Score)
4048	return nil
4049}
4050
4051// GoogleCloudVisionV1p1beta1WebDetectionWebLabel: Label to provide
4052// extra metadata for the web detection.
4053type GoogleCloudVisionV1p1beta1WebDetectionWebLabel struct {
4054	// Label: Label for extra metadata.
4055	Label string `json:"label,omitempty"`
4056
4057	// LanguageCode: The BCP-47 language code for `label`, such as "en-US"
4058	// or "sr-Latn". For more information, see
4059	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
4060	LanguageCode string `json:"languageCode,omitempty"`
4061
4062	// ForceSendFields is a list of field names (e.g. "Label") to
4063	// unconditionally include in API requests. By default, fields with
4064	// empty values are omitted from API requests. However, any non-pointer,
4065	// non-interface field appearing in ForceSendFields will be sent to the
4066	// server regardless of whether the field is empty or not. This may be
4067	// used to include empty fields in Patch requests.
4068	ForceSendFields []string `json:"-"`
4069
4070	// NullFields is a list of field names (e.g. "Label") to include in API
4071	// requests with the JSON null value. By default, fields with empty
4072	// values are omitted from API requests. However, any field with an
4073	// empty value appearing in NullFields will be sent to the server as
4074	// null. It is an error if a field in this list has a non-empty value.
4075	// This may be used to include null fields in Patch requests.
4076	NullFields []string `json:"-"`
4077}
4078
4079func (s *GoogleCloudVisionV1p1beta1WebDetectionWebLabel) MarshalJSON() ([]byte, error) {
4080	type NoMethod GoogleCloudVisionV1p1beta1WebDetectionWebLabel
4081	raw := NoMethod(*s)
4082	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4083}
4084
4085// GoogleCloudVisionV1p1beta1WebDetectionWebPage: Metadata for web
4086// pages.
4087type GoogleCloudVisionV1p1beta1WebDetectionWebPage struct {
4088	// FullMatchingImages: Fully matching images on the page. Can include
4089	// resized copies of the query image.
4090	FullMatchingImages []*GoogleCloudVisionV1p1beta1WebDetectionWebImage `json:"fullMatchingImages,omitempty"`
4091
4092	// PageTitle: Title for the web page, may contain HTML markups.
4093	PageTitle string `json:"pageTitle,omitempty"`
4094
4095	// PartialMatchingImages: Partial matching images on the page. Those
4096	// images are similar enough to share some key-point features. For
4097	// example an original image will likely have partial matching for its
4098	// crops.
4099	PartialMatchingImages []*GoogleCloudVisionV1p1beta1WebDetectionWebImage `json:"partialMatchingImages,omitempty"`
4100
4101	// Score: (Deprecated) Overall relevancy score for the web page.
4102	Score float64 `json:"score,omitempty"`
4103
4104	// Url: The result web page URL.
4105	Url string `json:"url,omitempty"`
4106
4107	// ForceSendFields is a list of field names (e.g. "FullMatchingImages")
4108	// to unconditionally include in API requests. By default, fields with
4109	// empty values are omitted from API requests. However, any non-pointer,
4110	// non-interface field appearing in ForceSendFields will be sent to the
4111	// server regardless of whether the field is empty or not. This may be
4112	// used to include empty fields in Patch requests.
4113	ForceSendFields []string `json:"-"`
4114
4115	// NullFields is a list of field names (e.g. "FullMatchingImages") to
4116	// include in API requests with the JSON null value. By default, fields
4117	// with empty values are omitted from API requests. However, any field
4118	// with an empty value appearing in NullFields will be sent to the
4119	// server as null. It is an error if a field in this list has a
4120	// non-empty value. This may be used to include null fields in Patch
4121	// requests.
4122	NullFields []string `json:"-"`
4123}
4124
4125func (s *GoogleCloudVisionV1p1beta1WebDetectionWebPage) MarshalJSON() ([]byte, error) {
4126	type NoMethod GoogleCloudVisionV1p1beta1WebDetectionWebPage
4127	raw := NoMethod(*s)
4128	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4129}
4130
4131func (s *GoogleCloudVisionV1p1beta1WebDetectionWebPage) UnmarshalJSON(data []byte) error {
4132	type NoMethod GoogleCloudVisionV1p1beta1WebDetectionWebPage
4133	var s1 struct {
4134		Score gensupport.JSONFloat64 `json:"score"`
4135		*NoMethod
4136	}
4137	s1.NoMethod = (*NoMethod)(s)
4138	if err := json.Unmarshal(data, &s1); err != nil {
4139		return err
4140	}
4141	s.Score = float64(s1.Score)
4142	return nil
4143}
4144
4145// GoogleCloudVisionV1p1beta1Word: A word representation.
4146type GoogleCloudVisionV1p1beta1Word struct {
4147	// BoundingBox: The bounding box for the word. The vertices are in the
4148	// order of top-left, top-right, bottom-right, bottom-left. When a
4149	// rotation of the bounding box is detected the rotation is represented
4150	// as around the top-left corner as defined when the text is read in the
4151	// 'natural' orientation. For example: * when the text is horizontal it
4152	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
4153	// around the top-left corner it becomes: 2----3 | | 1----0 and the
4154	// vertex order will still be (0, 1, 2, 3).
4155	BoundingBox *GoogleCloudVisionV1p1beta1BoundingPoly `json:"boundingBox,omitempty"`
4156
4157	// Confidence: Confidence of the OCR results for the word. Range [0, 1].
4158	Confidence float64 `json:"confidence,omitempty"`
4159
4160	// Property: Additional information detected for the word.
4161	Property *GoogleCloudVisionV1p1beta1TextAnnotationTextProperty `json:"property,omitempty"`
4162
4163	// Symbols: List of symbols in the word. The order of the symbols
4164	// follows the natural reading order.
4165	Symbols []*GoogleCloudVisionV1p1beta1Symbol `json:"symbols,omitempty"`
4166
4167	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
4168	// unconditionally include in API requests. By default, fields with
4169	// empty values are omitted from API requests. However, any non-pointer,
4170	// non-interface field appearing in ForceSendFields will be sent to the
4171	// server regardless of whether the field is empty or not. This may be
4172	// used to include empty fields in Patch requests.
4173	ForceSendFields []string `json:"-"`
4174
4175	// NullFields is a list of field names (e.g. "BoundingBox") to include
4176	// in API requests with the JSON null value. By default, fields with
4177	// empty values are omitted from API requests. However, any field with
4178	// an empty value appearing in NullFields will be sent to the server as
4179	// null. It is an error if a field in this list has a non-empty value.
4180	// This may be used to include null fields in Patch requests.
4181	NullFields []string `json:"-"`
4182}
4183
4184func (s *GoogleCloudVisionV1p1beta1Word) MarshalJSON() ([]byte, error) {
4185	type NoMethod GoogleCloudVisionV1p1beta1Word
4186	raw := NoMethod(*s)
4187	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4188}
4189
4190func (s *GoogleCloudVisionV1p1beta1Word) UnmarshalJSON(data []byte) error {
4191	type NoMethod GoogleCloudVisionV1p1beta1Word
4192	var s1 struct {
4193		Confidence gensupport.JSONFloat64 `json:"confidence"`
4194		*NoMethod
4195	}
4196	s1.NoMethod = (*NoMethod)(s)
4197	if err := json.Unmarshal(data, &s1); err != nil {
4198		return err
4199	}
4200	s.Confidence = float64(s1.Confidence)
4201	return nil
4202}
4203
4204// GoogleCloudVisionV1p2beta1AnnotateFileResponse: Response to a single
4205// file annotation request. A file may contain one or more images, which
4206// individually have their own responses.
4207type GoogleCloudVisionV1p2beta1AnnotateFileResponse struct {
4208	// Error: If set, represents the error message for the failed request.
4209	// The `responses` field will not be set in this case.
4210	Error *Status `json:"error,omitempty"`
4211
4212	// InputConfig: Information about the file for which this response is
4213	// generated.
4214	InputConfig *GoogleCloudVisionV1p2beta1InputConfig `json:"inputConfig,omitempty"`
4215
4216	// Responses: Individual responses to images found within the file. This
4217	// field will be empty if the `error` field is set.
4218	Responses []*GoogleCloudVisionV1p2beta1AnnotateImageResponse `json:"responses,omitempty"`
4219
4220	// TotalPages: This field gives the total number of pages in the file.
4221	TotalPages int64 `json:"totalPages,omitempty"`
4222
4223	// ForceSendFields is a list of field names (e.g. "Error") to
4224	// unconditionally include in API requests. By default, fields with
4225	// empty values are omitted from API requests. However, any non-pointer,
4226	// non-interface field appearing in ForceSendFields will be sent to the
4227	// server regardless of whether the field is empty or not. This may be
4228	// used to include empty fields in Patch requests.
4229	ForceSendFields []string `json:"-"`
4230
4231	// NullFields is a list of field names (e.g. "Error") to include in API
4232	// requests with the JSON null value. By default, fields with empty
4233	// values are omitted from API requests. However, any field with an
4234	// empty value appearing in NullFields will be sent to the server as
4235	// null. It is an error if a field in this list has a non-empty value.
4236	// This may be used to include null fields in Patch requests.
4237	NullFields []string `json:"-"`
4238}
4239
4240func (s *GoogleCloudVisionV1p2beta1AnnotateFileResponse) MarshalJSON() ([]byte, error) {
4241	type NoMethod GoogleCloudVisionV1p2beta1AnnotateFileResponse
4242	raw := NoMethod(*s)
4243	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4244}
4245
4246// GoogleCloudVisionV1p2beta1AnnotateImageResponse: Response to an image
4247// annotation request.
4248type GoogleCloudVisionV1p2beta1AnnotateImageResponse struct {
4249	// Context: If present, contextual information is needed to understand
4250	// where this image comes from.
4251	Context *GoogleCloudVisionV1p2beta1ImageAnnotationContext `json:"context,omitempty"`
4252
4253	// CropHintsAnnotation: If present, crop hints have completed
4254	// successfully.
4255	CropHintsAnnotation *GoogleCloudVisionV1p2beta1CropHintsAnnotation `json:"cropHintsAnnotation,omitempty"`
4256
4257	// Error: If set, represents the error message for the operation. Note
4258	// that filled-in image annotations are guaranteed to be correct, even
4259	// when `error` is set.
4260	Error *Status `json:"error,omitempty"`
4261
4262	// FaceAnnotations: If present, face detection has completed
4263	// successfully.
4264	FaceAnnotations []*GoogleCloudVisionV1p2beta1FaceAnnotation `json:"faceAnnotations,omitempty"`
4265
4266	// FullTextAnnotation: If present, text (OCR) detection or document
4267	// (OCR) text detection has completed successfully. This annotation
4268	// provides the structural hierarchy for the OCR detected text.
4269	FullTextAnnotation *GoogleCloudVisionV1p2beta1TextAnnotation `json:"fullTextAnnotation,omitempty"`
4270
4271	// ImagePropertiesAnnotation: If present, image properties were
4272	// extracted successfully.
4273	ImagePropertiesAnnotation *GoogleCloudVisionV1p2beta1ImageProperties `json:"imagePropertiesAnnotation,omitempty"`
4274
4275	// LabelAnnotations: If present, label detection has completed
4276	// successfully.
4277	LabelAnnotations []*GoogleCloudVisionV1p2beta1EntityAnnotation `json:"labelAnnotations,omitempty"`
4278
4279	// LandmarkAnnotations: If present, landmark detection has completed
4280	// successfully.
4281	LandmarkAnnotations []*GoogleCloudVisionV1p2beta1EntityAnnotation `json:"landmarkAnnotations,omitempty"`
4282
4283	// LocalizedObjectAnnotations: If present, localized object detection
4284	// has completed successfully. This will be sorted descending by
4285	// confidence score.
4286	LocalizedObjectAnnotations []*GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation `json:"localizedObjectAnnotations,omitempty"`
4287
4288	// LogoAnnotations: If present, logo detection has completed
4289	// successfully.
4290	LogoAnnotations []*GoogleCloudVisionV1p2beta1EntityAnnotation `json:"logoAnnotations,omitempty"`
4291
4292	// ProductSearchResults: If present, product search has completed
4293	// successfully.
4294	ProductSearchResults *GoogleCloudVisionV1p2beta1ProductSearchResults `json:"productSearchResults,omitempty"`
4295
4296	// SafeSearchAnnotation: If present, safe-search annotation has
4297	// completed successfully.
4298	SafeSearchAnnotation *GoogleCloudVisionV1p2beta1SafeSearchAnnotation `json:"safeSearchAnnotation,omitempty"`
4299
4300	// TextAnnotations: If present, text (OCR) detection has completed
4301	// successfully.
4302	TextAnnotations []*GoogleCloudVisionV1p2beta1EntityAnnotation `json:"textAnnotations,omitempty"`
4303
4304	// WebDetection: If present, web detection has completed successfully.
4305	WebDetection *GoogleCloudVisionV1p2beta1WebDetection `json:"webDetection,omitempty"`
4306
4307	// ForceSendFields is a list of field names (e.g. "Context") to
4308	// unconditionally include in API requests. By default, fields with
4309	// empty values are omitted from API requests. However, any non-pointer,
4310	// non-interface field appearing in ForceSendFields will be sent to the
4311	// server regardless of whether the field is empty or not. This may be
4312	// used to include empty fields in Patch requests.
4313	ForceSendFields []string `json:"-"`
4314
4315	// NullFields is a list of field names (e.g. "Context") to include in
4316	// API requests with the JSON null value. By default, fields with empty
4317	// values are omitted from API requests. However, any field with an
4318	// empty value appearing in NullFields will be sent to the server as
4319	// null. It is an error if a field in this list has a non-empty value.
4320	// This may be used to include null fields in Patch requests.
4321	NullFields []string `json:"-"`
4322}
4323
4324func (s *GoogleCloudVisionV1p2beta1AnnotateImageResponse) MarshalJSON() ([]byte, error) {
4325	type NoMethod GoogleCloudVisionV1p2beta1AnnotateImageResponse
4326	raw := NoMethod(*s)
4327	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4328}
4329
4330// GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse: The response for
4331// a single offline file annotation request.
4332type GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse struct {
4333	// OutputConfig: The output location and metadata from
4334	// AsyncAnnotateFileRequest.
4335	OutputConfig *GoogleCloudVisionV1p2beta1OutputConfig `json:"outputConfig,omitempty"`
4336
4337	// ForceSendFields is a list of field names (e.g. "OutputConfig") to
4338	// unconditionally include in API requests. By default, fields with
4339	// empty values are omitted from API requests. However, any non-pointer,
4340	// non-interface field appearing in ForceSendFields will be sent to the
4341	// server regardless of whether the field is empty or not. This may be
4342	// used to include empty fields in Patch requests.
4343	ForceSendFields []string `json:"-"`
4344
4345	// NullFields is a list of field names (e.g. "OutputConfig") to include
4346	// in API requests with the JSON null value. By default, fields with
4347	// empty values are omitted from API requests. However, any field with
4348	// an empty value appearing in NullFields will be sent to the server as
4349	// null. It is an error if a field in this list has a non-empty value.
4350	// This may be used to include null fields in Patch requests.
4351	NullFields []string `json:"-"`
4352}
4353
4354func (s *GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse) MarshalJSON() ([]byte, error) {
4355	type NoMethod GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
4356	raw := NoMethod(*s)
4357	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4358}
4359
4360// GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse: Response
4361// to an async batch file annotation request.
4362type GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse struct {
4363	// Responses: The list of file annotation responses, one for each
4364	// request in AsyncBatchAnnotateFilesRequest.
4365	Responses []*GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse `json:"responses,omitempty"`
4366
4367	// ForceSendFields is a list of field names (e.g. "Responses") to
4368	// unconditionally include in API requests. By default, fields with
4369	// empty values are omitted from API requests. However, any non-pointer,
4370	// non-interface field appearing in ForceSendFields will be sent to the
4371	// server regardless of whether the field is empty or not. This may be
4372	// used to include empty fields in Patch requests.
4373	ForceSendFields []string `json:"-"`
4374
4375	// NullFields is a list of field names (e.g. "Responses") to include in
4376	// API requests with the JSON null value. By default, fields with empty
4377	// values are omitted from API requests. However, any field with an
4378	// empty value appearing in NullFields will be sent to the server as
4379	// null. It is an error if a field in this list has a non-empty value.
4380	// This may be used to include null fields in Patch requests.
4381	NullFields []string `json:"-"`
4382}
4383
4384func (s *GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse) MarshalJSON() ([]byte, error) {
4385	type NoMethod GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
4386	raw := NoMethod(*s)
4387	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4388}
4389
4390// GoogleCloudVisionV1p2beta1Block: Logical element on the page.
4391type GoogleCloudVisionV1p2beta1Block struct {
4392	// BlockType: Detected block type (text, image etc) for this block.
4393	//
4394	// Possible values:
4395	//   "UNKNOWN" - Unknown block type.
4396	//   "TEXT" - Regular text block.
4397	//   "TABLE" - Table block.
4398	//   "PICTURE" - Image block.
4399	//   "RULER" - Horizontal/vertical line box.
4400	//   "BARCODE" - Barcode block.
4401	BlockType string `json:"blockType,omitempty"`
4402
4403	// BoundingBox: The bounding box for the block. The vertices are in the
4404	// order of top-left, top-right, bottom-right, bottom-left. When a
4405	// rotation of the bounding box is detected the rotation is represented
4406	// as around the top-left corner as defined when the text is read in the
4407	// 'natural' orientation. For example: * when the text is horizontal it
4408	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
4409	// around the top-left corner it becomes: 2----3 | | 1----0 and the
4410	// vertex order will still be (0, 1, 2, 3).
4411	BoundingBox *GoogleCloudVisionV1p2beta1BoundingPoly `json:"boundingBox,omitempty"`
4412
4413	// Confidence: Confidence of the OCR results on the block. Range [0, 1].
4414	Confidence float64 `json:"confidence,omitempty"`
4415
4416	// Paragraphs: List of paragraphs in this block (if this blocks is of
4417	// type text).
4418	Paragraphs []*GoogleCloudVisionV1p2beta1Paragraph `json:"paragraphs,omitempty"`
4419
4420	// Property: Additional information detected for the block.
4421	Property *GoogleCloudVisionV1p2beta1TextAnnotationTextProperty `json:"property,omitempty"`
4422
4423	// ForceSendFields is a list of field names (e.g. "BlockType") to
4424	// unconditionally include in API requests. By default, fields with
4425	// empty values are omitted from API requests. However, any non-pointer,
4426	// non-interface field appearing in ForceSendFields will be sent to the
4427	// server regardless of whether the field is empty or not. This may be
4428	// used to include empty fields in Patch requests.
4429	ForceSendFields []string `json:"-"`
4430
4431	// NullFields is a list of field names (e.g. "BlockType") to include in
4432	// API requests with the JSON null value. By default, fields with empty
4433	// values are omitted from API requests. However, any field with an
4434	// empty value appearing in NullFields will be sent to the server as
4435	// null. It is an error if a field in this list has a non-empty value.
4436	// This may be used to include null fields in Patch requests.
4437	NullFields []string `json:"-"`
4438}
4439
4440func (s *GoogleCloudVisionV1p2beta1Block) MarshalJSON() ([]byte, error) {
4441	type NoMethod GoogleCloudVisionV1p2beta1Block
4442	raw := NoMethod(*s)
4443	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4444}
4445
4446func (s *GoogleCloudVisionV1p2beta1Block) UnmarshalJSON(data []byte) error {
4447	type NoMethod GoogleCloudVisionV1p2beta1Block
4448	var s1 struct {
4449		Confidence gensupport.JSONFloat64 `json:"confidence"`
4450		*NoMethod
4451	}
4452	s1.NoMethod = (*NoMethod)(s)
4453	if err := json.Unmarshal(data, &s1); err != nil {
4454		return err
4455	}
4456	s.Confidence = float64(s1.Confidence)
4457	return nil
4458}
4459
4460// GoogleCloudVisionV1p2beta1BoundingPoly: A bounding polygon for the
4461// detected image annotation.
4462type GoogleCloudVisionV1p2beta1BoundingPoly struct {
4463	// NormalizedVertices: The bounding polygon normalized vertices.
4464	NormalizedVertices []*GoogleCloudVisionV1p2beta1NormalizedVertex `json:"normalizedVertices,omitempty"`
4465
4466	// Vertices: The bounding polygon vertices.
4467	Vertices []*GoogleCloudVisionV1p2beta1Vertex `json:"vertices,omitempty"`
4468
4469	// ForceSendFields is a list of field names (e.g. "NormalizedVertices")
4470	// to unconditionally include in API requests. By default, fields with
4471	// empty values are omitted from API requests. However, any non-pointer,
4472	// non-interface field appearing in ForceSendFields will be sent to the
4473	// server regardless of whether the field is empty or not. This may be
4474	// used to include empty fields in Patch requests.
4475	ForceSendFields []string `json:"-"`
4476
4477	// NullFields is a list of field names (e.g. "NormalizedVertices") to
4478	// include in API requests with the JSON null value. By default, fields
4479	// with empty values are omitted from API requests. However, any field
4480	// with an empty value appearing in NullFields will be sent to the
4481	// server as null. It is an error if a field in this list has a
4482	// non-empty value. This may be used to include null fields in Patch
4483	// requests.
4484	NullFields []string `json:"-"`
4485}
4486
4487func (s *GoogleCloudVisionV1p2beta1BoundingPoly) MarshalJSON() ([]byte, error) {
4488	type NoMethod GoogleCloudVisionV1p2beta1BoundingPoly
4489	raw := NoMethod(*s)
4490	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4491}
4492
4493// GoogleCloudVisionV1p2beta1ColorInfo: Color information consists of
4494// RGB channels, score, and the fraction of the image that the color
4495// occupies in the image.
4496type GoogleCloudVisionV1p2beta1ColorInfo struct {
4497	// Color: RGB components of the color.
4498	Color *Color `json:"color,omitempty"`
4499
4500	// PixelFraction: The fraction of pixels the color occupies in the
4501	// image. Value in range [0, 1].
4502	PixelFraction float64 `json:"pixelFraction,omitempty"`
4503
4504	// Score: Image-specific score for this color. Value in range [0, 1].
4505	Score float64 `json:"score,omitempty"`
4506
4507	// ForceSendFields is a list of field names (e.g. "Color") to
4508	// unconditionally include in API requests. By default, fields with
4509	// empty values are omitted from API requests. However, any non-pointer,
4510	// non-interface field appearing in ForceSendFields will be sent to the
4511	// server regardless of whether the field is empty or not. This may be
4512	// used to include empty fields in Patch requests.
4513	ForceSendFields []string `json:"-"`
4514
4515	// NullFields is a list of field names (e.g. "Color") to include in API
4516	// requests with the JSON null value. By default, fields with empty
4517	// values are omitted from API requests. However, any field with an
4518	// empty value appearing in NullFields will be sent to the server as
4519	// null. It is an error if a field in this list has a non-empty value.
4520	// This may be used to include null fields in Patch requests.
4521	NullFields []string `json:"-"`
4522}
4523
4524func (s *GoogleCloudVisionV1p2beta1ColorInfo) MarshalJSON() ([]byte, error) {
4525	type NoMethod GoogleCloudVisionV1p2beta1ColorInfo
4526	raw := NoMethod(*s)
4527	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4528}
4529
4530func (s *GoogleCloudVisionV1p2beta1ColorInfo) UnmarshalJSON(data []byte) error {
4531	type NoMethod GoogleCloudVisionV1p2beta1ColorInfo
4532	var s1 struct {
4533		PixelFraction gensupport.JSONFloat64 `json:"pixelFraction"`
4534		Score         gensupport.JSONFloat64 `json:"score"`
4535		*NoMethod
4536	}
4537	s1.NoMethod = (*NoMethod)(s)
4538	if err := json.Unmarshal(data, &s1); err != nil {
4539		return err
4540	}
4541	s.PixelFraction = float64(s1.PixelFraction)
4542	s.Score = float64(s1.Score)
4543	return nil
4544}
4545
4546// GoogleCloudVisionV1p2beta1CropHint: Single crop hint that is used to
4547// generate a new crop when serving an image.
4548type GoogleCloudVisionV1p2beta1CropHint struct {
4549	// BoundingPoly: The bounding polygon for the crop region. The
4550	// coordinates of the bounding box are in the original image's scale.
4551	BoundingPoly *GoogleCloudVisionV1p2beta1BoundingPoly `json:"boundingPoly,omitempty"`
4552
4553	// Confidence: Confidence of this being a salient region. Range [0, 1].
4554	Confidence float64 `json:"confidence,omitempty"`
4555
4556	// ImportanceFraction: Fraction of importance of this salient region
4557	// with respect to the original image.
4558	ImportanceFraction float64 `json:"importanceFraction,omitempty"`
4559
4560	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
4561	// unconditionally include in API requests. By default, fields with
4562	// empty values are omitted from API requests. However, any non-pointer,
4563	// non-interface field appearing in ForceSendFields will be sent to the
4564	// server regardless of whether the field is empty or not. This may be
4565	// used to include empty fields in Patch requests.
4566	ForceSendFields []string `json:"-"`
4567
4568	// NullFields is a list of field names (e.g. "BoundingPoly") to include
4569	// in API requests with the JSON null value. By default, fields with
4570	// empty values are omitted from API requests. However, any field with
4571	// an empty value appearing in NullFields will be sent to the server as
4572	// null. It is an error if a field in this list has a non-empty value.
4573	// This may be used to include null fields in Patch requests.
4574	NullFields []string `json:"-"`
4575}
4576
4577func (s *GoogleCloudVisionV1p2beta1CropHint) MarshalJSON() ([]byte, error) {
4578	type NoMethod GoogleCloudVisionV1p2beta1CropHint
4579	raw := NoMethod(*s)
4580	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4581}
4582
4583func (s *GoogleCloudVisionV1p2beta1CropHint) UnmarshalJSON(data []byte) error {
4584	type NoMethod GoogleCloudVisionV1p2beta1CropHint
4585	var s1 struct {
4586		Confidence         gensupport.JSONFloat64 `json:"confidence"`
4587		ImportanceFraction gensupport.JSONFloat64 `json:"importanceFraction"`
4588		*NoMethod
4589	}
4590	s1.NoMethod = (*NoMethod)(s)
4591	if err := json.Unmarshal(data, &s1); err != nil {
4592		return err
4593	}
4594	s.Confidence = float64(s1.Confidence)
4595	s.ImportanceFraction = float64(s1.ImportanceFraction)
4596	return nil
4597}
4598
4599// GoogleCloudVisionV1p2beta1CropHintsAnnotation: Set of crop hints that
4600// are used to generate new crops when serving images.
4601type GoogleCloudVisionV1p2beta1CropHintsAnnotation struct {
4602	// CropHints: Crop hint results.
4603	CropHints []*GoogleCloudVisionV1p2beta1CropHint `json:"cropHints,omitempty"`
4604
4605	// ForceSendFields is a list of field names (e.g. "CropHints") to
4606	// unconditionally include in API requests. By default, fields with
4607	// empty values are omitted from API requests. However, any non-pointer,
4608	// non-interface field appearing in ForceSendFields will be sent to the
4609	// server regardless of whether the field is empty or not. This may be
4610	// used to include empty fields in Patch requests.
4611	ForceSendFields []string `json:"-"`
4612
4613	// NullFields is a list of field names (e.g. "CropHints") to include in
4614	// API requests with the JSON null value. By default, fields with empty
4615	// values are omitted from API requests. However, any field with an
4616	// empty value appearing in NullFields will be sent to the server as
4617	// null. It is an error if a field in this list has a non-empty value.
4618	// This may be used to include null fields in Patch requests.
4619	NullFields []string `json:"-"`
4620}
4621
4622func (s *GoogleCloudVisionV1p2beta1CropHintsAnnotation) MarshalJSON() ([]byte, error) {
4623	type NoMethod GoogleCloudVisionV1p2beta1CropHintsAnnotation
4624	raw := NoMethod(*s)
4625	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4626}
4627
4628// GoogleCloudVisionV1p2beta1DominantColorsAnnotation: Set of dominant
4629// colors and their corresponding scores.
4630type GoogleCloudVisionV1p2beta1DominantColorsAnnotation struct {
4631	// Colors: RGB color values with their score and pixel fraction.
4632	Colors []*GoogleCloudVisionV1p2beta1ColorInfo `json:"colors,omitempty"`
4633
4634	// ForceSendFields is a list of field names (e.g. "Colors") to
4635	// unconditionally include in API requests. By default, fields with
4636	// empty values are omitted from API requests. However, any non-pointer,
4637	// non-interface field appearing in ForceSendFields will be sent to the
4638	// server regardless of whether the field is empty or not. This may be
4639	// used to include empty fields in Patch requests.
4640	ForceSendFields []string `json:"-"`
4641
4642	// NullFields is a list of field names (e.g. "Colors") to include in API
4643	// requests with the JSON null value. By default, fields with empty
4644	// values are omitted from API requests. However, any field with an
4645	// empty value appearing in NullFields will be sent to the server as
4646	// null. It is an error if a field in this list has a non-empty value.
4647	// This may be used to include null fields in Patch requests.
4648	NullFields []string `json:"-"`
4649}
4650
4651func (s *GoogleCloudVisionV1p2beta1DominantColorsAnnotation) MarshalJSON() ([]byte, error) {
4652	type NoMethod GoogleCloudVisionV1p2beta1DominantColorsAnnotation
4653	raw := NoMethod(*s)
4654	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4655}
4656
4657// GoogleCloudVisionV1p2beta1EntityAnnotation: Set of detected entity
4658// features.
4659type GoogleCloudVisionV1p2beta1EntityAnnotation struct {
4660	// BoundingPoly: Image region to which this entity belongs. Not produced
4661	// for `LABEL_DETECTION` features.
4662	BoundingPoly *GoogleCloudVisionV1p2beta1BoundingPoly `json:"boundingPoly,omitempty"`
4663
4664	// Confidence: **Deprecated. Use `score` instead.** The accuracy of the
4665	// entity detection in an image. For example, for an image in which the
4666	// "Eiffel Tower" entity is detected, this field represents the
4667	// confidence that there is a tower in the query image. Range [0, 1].
4668	Confidence float64 `json:"confidence,omitempty"`
4669
4670	// Description: Entity textual description, expressed in its `locale`
4671	// language.
4672	Description string `json:"description,omitempty"`
4673
4674	// Locale: The language code for the locale in which the entity textual
4675	// `description` is expressed.
4676	Locale string `json:"locale,omitempty"`
4677
4678	// Locations: The location information for the detected entity. Multiple
4679	// `LocationInfo` elements can be present because one location may
4680	// indicate the location of the scene in the image, and another location
4681	// may indicate the location of the place where the image was taken.
4682	// Location information is usually present for landmarks.
4683	Locations []*GoogleCloudVisionV1p2beta1LocationInfo `json:"locations,omitempty"`
4684
4685	// Mid: Opaque entity ID. Some IDs may be available in Google Knowledge
4686	// Graph Search API (https://developers.google.com/knowledge-graph/).
4687	Mid string `json:"mid,omitempty"`
4688
4689	// Properties: Some entities may have optional user-supplied `Property`
4690	// (name/value) fields, such a score or string that qualifies the
4691	// entity.
4692	Properties []*GoogleCloudVisionV1p2beta1Property `json:"properties,omitempty"`
4693
4694	// Score: Overall score of the result. Range [0, 1].
4695	Score float64 `json:"score,omitempty"`
4696
4697	// Topicality: The relevancy of the ICA (Image Content Annotation) label
4698	// to the image. For example, the relevancy of "tower" is likely higher
4699	// to an image containing the detected "Eiffel Tower" than to an image
4700	// containing a detected distant towering building, even though the
4701	// confidence that there is a tower in each image may be the same. Range
4702	// [0, 1].
4703	Topicality float64 `json:"topicality,omitempty"`
4704
4705	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
4706	// unconditionally include in API requests. By default, fields with
4707	// empty values are omitted from API requests. However, any non-pointer,
4708	// non-interface field appearing in ForceSendFields will be sent to the
4709	// server regardless of whether the field is empty or not. This may be
4710	// used to include empty fields in Patch requests.
4711	ForceSendFields []string `json:"-"`
4712
4713	// NullFields is a list of field names (e.g. "BoundingPoly") to include
4714	// in API requests with the JSON null value. By default, fields with
4715	// empty values are omitted from API requests. However, any field with
4716	// an empty value appearing in NullFields will be sent to the server as
4717	// null. It is an error if a field in this list has a non-empty value.
4718	// This may be used to include null fields in Patch requests.
4719	NullFields []string `json:"-"`
4720}
4721
4722func (s *GoogleCloudVisionV1p2beta1EntityAnnotation) MarshalJSON() ([]byte, error) {
4723	type NoMethod GoogleCloudVisionV1p2beta1EntityAnnotation
4724	raw := NoMethod(*s)
4725	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4726}
4727
4728func (s *GoogleCloudVisionV1p2beta1EntityAnnotation) UnmarshalJSON(data []byte) error {
4729	type NoMethod GoogleCloudVisionV1p2beta1EntityAnnotation
4730	var s1 struct {
4731		Confidence gensupport.JSONFloat64 `json:"confidence"`
4732		Score      gensupport.JSONFloat64 `json:"score"`
4733		Topicality gensupport.JSONFloat64 `json:"topicality"`
4734		*NoMethod
4735	}
4736	s1.NoMethod = (*NoMethod)(s)
4737	if err := json.Unmarshal(data, &s1); err != nil {
4738		return err
4739	}
4740	s.Confidence = float64(s1.Confidence)
4741	s.Score = float64(s1.Score)
4742	s.Topicality = float64(s1.Topicality)
4743	return nil
4744}
4745
4746// GoogleCloudVisionV1p2beta1FaceAnnotation: A face annotation object
4747// contains the results of face detection.
4748type GoogleCloudVisionV1p2beta1FaceAnnotation struct {
4749	// AngerLikelihood: Anger likelihood.
4750	//
4751	// Possible values:
4752	//   "UNKNOWN" - Unknown likelihood.
4753	//   "VERY_UNLIKELY" - It is very unlikely.
4754	//   "UNLIKELY" - It is unlikely.
4755	//   "POSSIBLE" - It is possible.
4756	//   "LIKELY" - It is likely.
4757	//   "VERY_LIKELY" - It is very likely.
4758	AngerLikelihood string `json:"angerLikelihood,omitempty"`
4759
4760	// BlurredLikelihood: Blurred likelihood.
4761	//
4762	// Possible values:
4763	//   "UNKNOWN" - Unknown likelihood.
4764	//   "VERY_UNLIKELY" - It is very unlikely.
4765	//   "UNLIKELY" - It is unlikely.
4766	//   "POSSIBLE" - It is possible.
4767	//   "LIKELY" - It is likely.
4768	//   "VERY_LIKELY" - It is very likely.
4769	BlurredLikelihood string `json:"blurredLikelihood,omitempty"`
4770
4771	// BoundingPoly: The bounding polygon around the face. The coordinates
4772	// of the bounding box are in the original image's scale. The bounding
4773	// box is computed to "frame" the face in accordance with human
4774	// expectations. It is based on the landmarker results. Note that one or
4775	// more x and/or y coordinates may not be generated in the
4776	// `BoundingPoly` (the polygon will be unbounded) if only a partial face
4777	// appears in the image to be annotated.
4778	BoundingPoly *GoogleCloudVisionV1p2beta1BoundingPoly `json:"boundingPoly,omitempty"`
4779
4780	// DetectionConfidence: Detection confidence. Range [0, 1].
4781	DetectionConfidence float64 `json:"detectionConfidence,omitempty"`
4782
4783	// FdBoundingPoly: The `fd_bounding_poly` bounding polygon is tighter
4784	// than the `boundingPoly`, and encloses only the skin part of the face.
4785	// Typically, it is used to eliminate the face from any image analysis
4786	// that detects the "amount of skin" visible in an image. It is not
4787	// based on the landmarker results, only on the initial face detection,
4788	// hence the fd (face detection) prefix.
4789	FdBoundingPoly *GoogleCloudVisionV1p2beta1BoundingPoly `json:"fdBoundingPoly,omitempty"`
4790
4791	// HeadwearLikelihood: Headwear likelihood.
4792	//
4793	// Possible values:
4794	//   "UNKNOWN" - Unknown likelihood.
4795	//   "VERY_UNLIKELY" - It is very unlikely.
4796	//   "UNLIKELY" - It is unlikely.
4797	//   "POSSIBLE" - It is possible.
4798	//   "LIKELY" - It is likely.
4799	//   "VERY_LIKELY" - It is very likely.
4800	HeadwearLikelihood string `json:"headwearLikelihood,omitempty"`
4801
4802	// JoyLikelihood: Joy likelihood.
4803	//
4804	// Possible values:
4805	//   "UNKNOWN" - Unknown likelihood.
4806	//   "VERY_UNLIKELY" - It is very unlikely.
4807	//   "UNLIKELY" - It is unlikely.
4808	//   "POSSIBLE" - It is possible.
4809	//   "LIKELY" - It is likely.
4810	//   "VERY_LIKELY" - It is very likely.
4811	JoyLikelihood string `json:"joyLikelihood,omitempty"`
4812
4813	// LandmarkingConfidence: Face landmarking confidence. Range [0, 1].
4814	LandmarkingConfidence float64 `json:"landmarkingConfidence,omitempty"`
4815
4816	// Landmarks: Detected face landmarks.
4817	Landmarks []*GoogleCloudVisionV1p2beta1FaceAnnotationLandmark `json:"landmarks,omitempty"`
4818
4819	// PanAngle: Yaw angle, which indicates the leftward/rightward angle
4820	// that the face is pointing relative to the vertical plane
4821	// perpendicular to the image. Range [-180,180].
4822	PanAngle float64 `json:"panAngle,omitempty"`
4823
4824	// RollAngle: Roll angle, which indicates the amount of
4825	// clockwise/anti-clockwise rotation of the face relative to the image
4826	// vertical about the axis perpendicular to the face. Range [-180,180].
4827	RollAngle float64 `json:"rollAngle,omitempty"`
4828
4829	// SorrowLikelihood: Sorrow likelihood.
4830	//
4831	// Possible values:
4832	//   "UNKNOWN" - Unknown likelihood.
4833	//   "VERY_UNLIKELY" - It is very unlikely.
4834	//   "UNLIKELY" - It is unlikely.
4835	//   "POSSIBLE" - It is possible.
4836	//   "LIKELY" - It is likely.
4837	//   "VERY_LIKELY" - It is very likely.
4838	SorrowLikelihood string `json:"sorrowLikelihood,omitempty"`
4839
4840	// SurpriseLikelihood: Surprise likelihood.
4841	//
4842	// Possible values:
4843	//   "UNKNOWN" - Unknown likelihood.
4844	//   "VERY_UNLIKELY" - It is very unlikely.
4845	//   "UNLIKELY" - It is unlikely.
4846	//   "POSSIBLE" - It is possible.
4847	//   "LIKELY" - It is likely.
4848	//   "VERY_LIKELY" - It is very likely.
4849	SurpriseLikelihood string `json:"surpriseLikelihood,omitempty"`
4850
4851	// TiltAngle: Pitch angle, which indicates the upwards/downwards angle
4852	// that the face is pointing relative to the image's horizontal plane.
4853	// Range [-180,180].
4854	TiltAngle float64 `json:"tiltAngle,omitempty"`
4855
4856	// UnderExposedLikelihood: Under-exposed likelihood.
4857	//
4858	// Possible values:
4859	//   "UNKNOWN" - Unknown likelihood.
4860	//   "VERY_UNLIKELY" - It is very unlikely.
4861	//   "UNLIKELY" - It is unlikely.
4862	//   "POSSIBLE" - It is possible.
4863	//   "LIKELY" - It is likely.
4864	//   "VERY_LIKELY" - It is very likely.
4865	UnderExposedLikelihood string `json:"underExposedLikelihood,omitempty"`
4866
4867	// ForceSendFields is a list of field names (e.g. "AngerLikelihood") to
4868	// unconditionally include in API requests. By default, fields with
4869	// empty values are omitted from API requests. However, any non-pointer,
4870	// non-interface field appearing in ForceSendFields will be sent to the
4871	// server regardless of whether the field is empty or not. This may be
4872	// used to include empty fields in Patch requests.
4873	ForceSendFields []string `json:"-"`
4874
4875	// NullFields is a list of field names (e.g. "AngerLikelihood") to
4876	// include in API requests with the JSON null value. By default, fields
4877	// with empty values are omitted from API requests. However, any field
4878	// with an empty value appearing in NullFields will be sent to the
4879	// server as null. It is an error if a field in this list has a
4880	// non-empty value. This may be used to include null fields in Patch
4881	// requests.
4882	NullFields []string `json:"-"`
4883}
4884
4885func (s *GoogleCloudVisionV1p2beta1FaceAnnotation) MarshalJSON() ([]byte, error) {
4886	type NoMethod GoogleCloudVisionV1p2beta1FaceAnnotation
4887	raw := NoMethod(*s)
4888	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4889}
4890
4891func (s *GoogleCloudVisionV1p2beta1FaceAnnotation) UnmarshalJSON(data []byte) error {
4892	type NoMethod GoogleCloudVisionV1p2beta1FaceAnnotation
4893	var s1 struct {
4894		DetectionConfidence   gensupport.JSONFloat64 `json:"detectionConfidence"`
4895		LandmarkingConfidence gensupport.JSONFloat64 `json:"landmarkingConfidence"`
4896		PanAngle              gensupport.JSONFloat64 `json:"panAngle"`
4897		RollAngle             gensupport.JSONFloat64 `json:"rollAngle"`
4898		TiltAngle             gensupport.JSONFloat64 `json:"tiltAngle"`
4899		*NoMethod
4900	}
4901	s1.NoMethod = (*NoMethod)(s)
4902	if err := json.Unmarshal(data, &s1); err != nil {
4903		return err
4904	}
4905	s.DetectionConfidence = float64(s1.DetectionConfidence)
4906	s.LandmarkingConfidence = float64(s1.LandmarkingConfidence)
4907	s.PanAngle = float64(s1.PanAngle)
4908	s.RollAngle = float64(s1.RollAngle)
4909	s.TiltAngle = float64(s1.TiltAngle)
4910	return nil
4911}
4912
4913// GoogleCloudVisionV1p2beta1FaceAnnotationLandmark: A face-specific
4914// landmark (for example, a face feature).
4915type GoogleCloudVisionV1p2beta1FaceAnnotationLandmark struct {
4916	// Position: Face landmark position.
4917	Position *GoogleCloudVisionV1p2beta1Position `json:"position,omitempty"`
4918
4919	// Type: Face landmark type.
4920	//
4921	// Possible values:
4922	//   "UNKNOWN_LANDMARK" - Unknown face landmark detected. Should not be
4923	// filled.
4924	//   "LEFT_EYE" - Left eye.
4925	//   "RIGHT_EYE" - Right eye.
4926	//   "LEFT_OF_LEFT_EYEBROW" - Left of left eyebrow.
4927	//   "RIGHT_OF_LEFT_EYEBROW" - Right of left eyebrow.
4928	//   "LEFT_OF_RIGHT_EYEBROW" - Left of right eyebrow.
4929	//   "RIGHT_OF_RIGHT_EYEBROW" - Right of right eyebrow.
4930	//   "MIDPOINT_BETWEEN_EYES" - Midpoint between eyes.
4931	//   "NOSE_TIP" - Nose tip.
4932	//   "UPPER_LIP" - Upper lip.
4933	//   "LOWER_LIP" - Lower lip.
4934	//   "MOUTH_LEFT" - Mouth left.
4935	//   "MOUTH_RIGHT" - Mouth right.
4936	//   "MOUTH_CENTER" - Mouth center.
4937	//   "NOSE_BOTTOM_RIGHT" - Nose, bottom right.
4938	//   "NOSE_BOTTOM_LEFT" - Nose, bottom left.
4939	//   "NOSE_BOTTOM_CENTER" - Nose, bottom center.
4940	//   "LEFT_EYE_TOP_BOUNDARY" - Left eye, top boundary.
4941	//   "LEFT_EYE_RIGHT_CORNER" - Left eye, right corner.
4942	//   "LEFT_EYE_BOTTOM_BOUNDARY" - Left eye, bottom boundary.
4943	//   "LEFT_EYE_LEFT_CORNER" - Left eye, left corner.
4944	//   "RIGHT_EYE_TOP_BOUNDARY" - Right eye, top boundary.
4945	//   "RIGHT_EYE_RIGHT_CORNER" - Right eye, right corner.
4946	//   "RIGHT_EYE_BOTTOM_BOUNDARY" - Right eye, bottom boundary.
4947	//   "RIGHT_EYE_LEFT_CORNER" - Right eye, left corner.
4948	//   "LEFT_EYEBROW_UPPER_MIDPOINT" - Left eyebrow, upper midpoint.
4949	//   "RIGHT_EYEBROW_UPPER_MIDPOINT" - Right eyebrow, upper midpoint.
4950	//   "LEFT_EAR_TRAGION" - Left ear tragion.
4951	//   "RIGHT_EAR_TRAGION" - Right ear tragion.
4952	//   "LEFT_EYE_PUPIL" - Left eye pupil.
4953	//   "RIGHT_EYE_PUPIL" - Right eye pupil.
4954	//   "FOREHEAD_GLABELLA" - Forehead glabella.
4955	//   "CHIN_GNATHION" - Chin gnathion.
4956	//   "CHIN_LEFT_GONION" - Chin left gonion.
4957	//   "CHIN_RIGHT_GONION" - Chin right gonion.
4958	//   "LEFT_CHEEK_CENTER" - Left cheek center.
4959	//   "RIGHT_CHEEK_CENTER" - Right cheek center.
4960	Type string `json:"type,omitempty"`
4961
4962	// ForceSendFields is a list of field names (e.g. "Position") to
4963	// unconditionally include in API requests. By default, fields with
4964	// empty values are omitted from API requests. However, any non-pointer,
4965	// non-interface field appearing in ForceSendFields will be sent to the
4966	// server regardless of whether the field is empty or not. This may be
4967	// used to include empty fields in Patch requests.
4968	ForceSendFields []string `json:"-"`
4969
4970	// NullFields is a list of field names (e.g. "Position") to include in
4971	// API requests with the JSON null value. By default, fields with empty
4972	// values are omitted from API requests. However, any field with an
4973	// empty value appearing in NullFields will be sent to the server as
4974	// null. It is an error if a field in this list has a non-empty value.
4975	// This may be used to include null fields in Patch requests.
4976	NullFields []string `json:"-"`
4977}
4978
4979func (s *GoogleCloudVisionV1p2beta1FaceAnnotationLandmark) MarshalJSON() ([]byte, error) {
4980	type NoMethod GoogleCloudVisionV1p2beta1FaceAnnotationLandmark
4981	raw := NoMethod(*s)
4982	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4983}
4984
4985// GoogleCloudVisionV1p2beta1GcsDestination: The Google Cloud Storage
4986// location where the output will be written to.
4987type GoogleCloudVisionV1p2beta1GcsDestination struct {
4988	// Uri: Google Cloud Storage URI prefix where the results will be
4989	// stored. Results will be in JSON format and preceded by its
4990	// corresponding input URI prefix. This field can either represent a gcs
4991	// file prefix or gcs directory. In either case, the uri should be
4992	// unique because in order to get all of the output files, you will need
4993	// to do a wildcard gcs search on the uri prefix you provide. Examples:
4994	// * File Prefix: gs://bucket-name/here/filenameprefix The output files
4995	// will be created in gs://bucket-name/here/ and the names of the output
4996	// files will begin with "filenameprefix". * Directory Prefix:
4997	// gs://bucket-name/some/location/ The output files will be created in
4998	// gs://bucket-name/some/location/ and the names of the output files
4999	// could be anything because there was no filename prefix specified. If
5000	// multiple outputs, each response is still AnnotateFileResponse, each
5001	// of which contains some subset of the full list of
5002	// AnnotateImageResponse. Multiple outputs can happen if, for example,
5003	// the output JSON is too large and overflows into multiple sharded
5004	// files.
5005	Uri string `json:"uri,omitempty"`
5006
5007	// ForceSendFields is a list of field names (e.g. "Uri") to
5008	// unconditionally include in API requests. By default, fields with
5009	// empty values are omitted from API requests. However, any non-pointer,
5010	// non-interface field appearing in ForceSendFields will be sent to the
5011	// server regardless of whether the field is empty or not. This may be
5012	// used to include empty fields in Patch requests.
5013	ForceSendFields []string `json:"-"`
5014
5015	// NullFields is a list of field names (e.g. "Uri") to include in API
5016	// requests with the JSON null value. By default, fields with empty
5017	// values are omitted from API requests. However, any field with an
5018	// empty value appearing in NullFields will be sent to the server as
5019	// null. It is an error if a field in this list has a non-empty value.
5020	// This may be used to include null fields in Patch requests.
5021	NullFields []string `json:"-"`
5022}
5023
5024func (s *GoogleCloudVisionV1p2beta1GcsDestination) MarshalJSON() ([]byte, error) {
5025	type NoMethod GoogleCloudVisionV1p2beta1GcsDestination
5026	raw := NoMethod(*s)
5027	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5028}
5029
5030// GoogleCloudVisionV1p2beta1GcsSource: The Google Cloud Storage
5031// location where the input will be read from.
5032type GoogleCloudVisionV1p2beta1GcsSource struct {
5033	// Uri: Google Cloud Storage URI for the input file. This must only be a
5034	// Google Cloud Storage object. Wildcards are not currently supported.
5035	Uri string `json:"uri,omitempty"`
5036
5037	// ForceSendFields is a list of field names (e.g. "Uri") to
5038	// unconditionally include in API requests. By default, fields with
5039	// empty values are omitted from API requests. However, any non-pointer,
5040	// non-interface field appearing in ForceSendFields will be sent to the
5041	// server regardless of whether the field is empty or not. This may be
5042	// used to include empty fields in Patch requests.
5043	ForceSendFields []string `json:"-"`
5044
5045	// NullFields is a list of field names (e.g. "Uri") to include in API
5046	// requests with the JSON null value. By default, fields with empty
5047	// values are omitted from API requests. However, any field with an
5048	// empty value appearing in NullFields will be sent to the server as
5049	// null. It is an error if a field in this list has a non-empty value.
5050	// This may be used to include null fields in Patch requests.
5051	NullFields []string `json:"-"`
5052}
5053
5054func (s *GoogleCloudVisionV1p2beta1GcsSource) MarshalJSON() ([]byte, error) {
5055	type NoMethod GoogleCloudVisionV1p2beta1GcsSource
5056	raw := NoMethod(*s)
5057	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5058}
5059
5060// GoogleCloudVisionV1p2beta1ImageAnnotationContext: If an image was
5061// produced from a file (e.g. a PDF), this message gives information
5062// about the source of that image.
5063type GoogleCloudVisionV1p2beta1ImageAnnotationContext struct {
5064	// PageNumber: If the file was a PDF or TIFF, this field gives the page
5065	// number within the file used to produce the image.
5066	PageNumber int64 `json:"pageNumber,omitempty"`
5067
5068	// Uri: The URI of the file used to produce the image.
5069	Uri string `json:"uri,omitempty"`
5070
5071	// ForceSendFields is a list of field names (e.g. "PageNumber") to
5072	// unconditionally include in API requests. By default, fields with
5073	// empty values are omitted from API requests. However, any non-pointer,
5074	// non-interface field appearing in ForceSendFields will be sent to the
5075	// server regardless of whether the field is empty or not. This may be
5076	// used to include empty fields in Patch requests.
5077	ForceSendFields []string `json:"-"`
5078
5079	// NullFields is a list of field names (e.g. "PageNumber") to include in
5080	// API requests with the JSON null value. By default, fields with empty
5081	// values are omitted from API requests. However, any field with an
5082	// empty value appearing in NullFields will be sent to the server as
5083	// null. It is an error if a field in this list has a non-empty value.
5084	// This may be used to include null fields in Patch requests.
5085	NullFields []string `json:"-"`
5086}
5087
5088func (s *GoogleCloudVisionV1p2beta1ImageAnnotationContext) MarshalJSON() ([]byte, error) {
5089	type NoMethod GoogleCloudVisionV1p2beta1ImageAnnotationContext
5090	raw := NoMethod(*s)
5091	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5092}
5093
5094// GoogleCloudVisionV1p2beta1ImageProperties: Stores image properties,
5095// such as dominant colors.
5096type GoogleCloudVisionV1p2beta1ImageProperties struct {
5097	// DominantColors: If present, dominant colors completed successfully.
5098	DominantColors *GoogleCloudVisionV1p2beta1DominantColorsAnnotation `json:"dominantColors,omitempty"`
5099
5100	// ForceSendFields is a list of field names (e.g. "DominantColors") to
5101	// unconditionally include in API requests. By default, fields with
5102	// empty values are omitted from API requests. However, any non-pointer,
5103	// non-interface field appearing in ForceSendFields will be sent to the
5104	// server regardless of whether the field is empty or not. This may be
5105	// used to include empty fields in Patch requests.
5106	ForceSendFields []string `json:"-"`
5107
5108	// NullFields is a list of field names (e.g. "DominantColors") to
5109	// include in API requests with the JSON null value. By default, fields
5110	// with empty values are omitted from API requests. However, any field
5111	// with an empty value appearing in NullFields will be sent to the
5112	// server as null. It is an error if a field in this list has a
5113	// non-empty value. This may be used to include null fields in Patch
5114	// requests.
5115	NullFields []string `json:"-"`
5116}
5117
5118func (s *GoogleCloudVisionV1p2beta1ImageProperties) MarshalJSON() ([]byte, error) {
5119	type NoMethod GoogleCloudVisionV1p2beta1ImageProperties
5120	raw := NoMethod(*s)
5121	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5122}
5123
5124// GoogleCloudVisionV1p2beta1InputConfig: The desired input location and
5125// metadata.
5126type GoogleCloudVisionV1p2beta1InputConfig struct {
5127	// Content: File content, represented as a stream of bytes. Note: As
5128	// with all `bytes` fields, protobuffers use a pure binary
5129	// representation, whereas JSON representations use base64. Currently,
5130	// this field only works for BatchAnnotateFiles requests. It does not
5131	// work for AsyncBatchAnnotateFiles requests.
5132	Content string `json:"content,omitempty"`
5133
5134	// GcsSource: The Google Cloud Storage location to read the input from.
5135	GcsSource *GoogleCloudVisionV1p2beta1GcsSource `json:"gcsSource,omitempty"`
5136
5137	// MimeType: The type of the file. Currently only "application/pdf",
5138	// "image/tiff" and "image/gif" are supported. Wildcards are not
5139	// supported.
5140	MimeType string `json:"mimeType,omitempty"`
5141
5142	// ForceSendFields is a list of field names (e.g. "Content") to
5143	// unconditionally include in API requests. By default, fields with
5144	// empty values are omitted from API requests. However, any non-pointer,
5145	// non-interface field appearing in ForceSendFields will be sent to the
5146	// server regardless of whether the field is empty or not. This may be
5147	// used to include empty fields in Patch requests.
5148	ForceSendFields []string `json:"-"`
5149
5150	// NullFields is a list of field names (e.g. "Content") to include in
5151	// API requests with the JSON null value. By default, fields with empty
5152	// values are omitted from API requests. However, any field with an
5153	// empty value appearing in NullFields will be sent to the server as
5154	// null. It is an error if a field in this list has a non-empty value.
5155	// This may be used to include null fields in Patch requests.
5156	NullFields []string `json:"-"`
5157}
5158
5159func (s *GoogleCloudVisionV1p2beta1InputConfig) MarshalJSON() ([]byte, error) {
5160	type NoMethod GoogleCloudVisionV1p2beta1InputConfig
5161	raw := NoMethod(*s)
5162	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5163}
5164
5165// GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation: Set of detected
5166// objects with bounding boxes.
5167type GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation struct {
5168	// BoundingPoly: Image region to which this object belongs. This must be
5169	// populated.
5170	BoundingPoly *GoogleCloudVisionV1p2beta1BoundingPoly `json:"boundingPoly,omitempty"`
5171
5172	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
5173	// For more information, see
5174	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
5175	LanguageCode string `json:"languageCode,omitempty"`
5176
5177	// Mid: Object ID that should align with EntityAnnotation mid.
5178	Mid string `json:"mid,omitempty"`
5179
5180	// Name: Object name, expressed in its `language_code` language.
5181	Name string `json:"name,omitempty"`
5182
5183	// Score: Score of the result. Range [0, 1].
5184	Score float64 `json:"score,omitempty"`
5185
5186	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
5187	// unconditionally include in API requests. By default, fields with
5188	// empty values are omitted from API requests. However, any non-pointer,
5189	// non-interface field appearing in ForceSendFields will be sent to the
5190	// server regardless of whether the field is empty or not. This may be
5191	// used to include empty fields in Patch requests.
5192	ForceSendFields []string `json:"-"`
5193
5194	// NullFields is a list of field names (e.g. "BoundingPoly") to include
5195	// in API requests with the JSON null value. By default, fields with
5196	// empty values are omitted from API requests. However, any field with
5197	// an empty value appearing in NullFields will be sent to the server as
5198	// null. It is an error if a field in this list has a non-empty value.
5199	// This may be used to include null fields in Patch requests.
5200	NullFields []string `json:"-"`
5201}
5202
5203func (s *GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation) MarshalJSON() ([]byte, error) {
5204	type NoMethod GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation
5205	raw := NoMethod(*s)
5206	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5207}
5208
5209func (s *GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation) UnmarshalJSON(data []byte) error {
5210	type NoMethod GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation
5211	var s1 struct {
5212		Score gensupport.JSONFloat64 `json:"score"`
5213		*NoMethod
5214	}
5215	s1.NoMethod = (*NoMethod)(s)
5216	if err := json.Unmarshal(data, &s1); err != nil {
5217		return err
5218	}
5219	s.Score = float64(s1.Score)
5220	return nil
5221}
5222
5223// GoogleCloudVisionV1p2beta1LocationInfo: Detected entity location
5224// information.
5225type GoogleCloudVisionV1p2beta1LocationInfo struct {
5226	// LatLng: lat/long location coordinates.
5227	LatLng *LatLng `json:"latLng,omitempty"`
5228
5229	// ForceSendFields is a list of field names (e.g. "LatLng") to
5230	// unconditionally include in API requests. By default, fields with
5231	// empty values are omitted from API requests. However, any non-pointer,
5232	// non-interface field appearing in ForceSendFields will be sent to the
5233	// server regardless of whether the field is empty or not. This may be
5234	// used to include empty fields in Patch requests.
5235	ForceSendFields []string `json:"-"`
5236
5237	// NullFields is a list of field names (e.g. "LatLng") to include in API
5238	// requests with the JSON null value. By default, fields with empty
5239	// values are omitted from API requests. However, any field with an
5240	// empty value appearing in NullFields will be sent to the server as
5241	// null. It is an error if a field in this list has a non-empty value.
5242	// This may be used to include null fields in Patch requests.
5243	NullFields []string `json:"-"`
5244}
5245
5246func (s *GoogleCloudVisionV1p2beta1LocationInfo) MarshalJSON() ([]byte, error) {
5247	type NoMethod GoogleCloudVisionV1p2beta1LocationInfo
5248	raw := NoMethod(*s)
5249	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5250}
5251
5252// GoogleCloudVisionV1p2beta1NormalizedVertex: A vertex represents a 2D
5253// point in the image. NOTE: the normalized vertex coordinates are
5254// relative to the original image and range from 0 to 1.
5255type GoogleCloudVisionV1p2beta1NormalizedVertex struct {
5256	// X: X coordinate.
5257	X float64 `json:"x,omitempty"`
5258
5259	// Y: Y coordinate.
5260	Y float64 `json:"y,omitempty"`
5261
5262	// ForceSendFields is a list of field names (e.g. "X") to
5263	// unconditionally include in API requests. By default, fields with
5264	// empty values are omitted from API requests. However, any non-pointer,
5265	// non-interface field appearing in ForceSendFields will be sent to the
5266	// server regardless of whether the field is empty or not. This may be
5267	// used to include empty fields in Patch requests.
5268	ForceSendFields []string `json:"-"`
5269
5270	// NullFields is a list of field names (e.g. "X") to include in API
5271	// requests with the JSON null value. By default, fields with empty
5272	// values are omitted from API requests. However, any field with an
5273	// empty value appearing in NullFields will be sent to the server as
5274	// null. It is an error if a field in this list has a non-empty value.
5275	// This may be used to include null fields in Patch requests.
5276	NullFields []string `json:"-"`
5277}
5278
5279func (s *GoogleCloudVisionV1p2beta1NormalizedVertex) MarshalJSON() ([]byte, error) {
5280	type NoMethod GoogleCloudVisionV1p2beta1NormalizedVertex
5281	raw := NoMethod(*s)
5282	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5283}
5284
5285func (s *GoogleCloudVisionV1p2beta1NormalizedVertex) UnmarshalJSON(data []byte) error {
5286	type NoMethod GoogleCloudVisionV1p2beta1NormalizedVertex
5287	var s1 struct {
5288		X gensupport.JSONFloat64 `json:"x"`
5289		Y gensupport.JSONFloat64 `json:"y"`
5290		*NoMethod
5291	}
5292	s1.NoMethod = (*NoMethod)(s)
5293	if err := json.Unmarshal(data, &s1); err != nil {
5294		return err
5295	}
5296	s.X = float64(s1.X)
5297	s.Y = float64(s1.Y)
5298	return nil
5299}
5300
5301// GoogleCloudVisionV1p2beta1OperationMetadata: Contains metadata for
5302// the BatchAnnotateImages operation.
5303type GoogleCloudVisionV1p2beta1OperationMetadata struct {
5304	// CreateTime: The time when the batch request was received.
5305	CreateTime string `json:"createTime,omitempty"`
5306
5307	// State: Current state of the batch operation.
5308	//
5309	// Possible values:
5310	//   "STATE_UNSPECIFIED" - Invalid.
5311	//   "CREATED" - Request is received.
5312	//   "RUNNING" - Request is actively being processed.
5313	//   "DONE" - The batch processing is done.
5314	//   "CANCELLED" - The batch processing was cancelled.
5315	State string `json:"state,omitempty"`
5316
5317	// UpdateTime: The time when the operation result was last updated.
5318	UpdateTime string `json:"updateTime,omitempty"`
5319
5320	// ForceSendFields is a list of field names (e.g. "CreateTime") to
5321	// unconditionally include in API requests. By default, fields with
5322	// empty values are omitted from API requests. However, any non-pointer,
5323	// non-interface field appearing in ForceSendFields will be sent to the
5324	// server regardless of whether the field is empty or not. This may be
5325	// used to include empty fields in Patch requests.
5326	ForceSendFields []string `json:"-"`
5327
5328	// NullFields is a list of field names (e.g. "CreateTime") to include in
5329	// API requests with the JSON null value. By default, fields with empty
5330	// values are omitted from API requests. However, any field with an
5331	// empty value appearing in NullFields will be sent to the server as
5332	// null. It is an error if a field in this list has a non-empty value.
5333	// This may be used to include null fields in Patch requests.
5334	NullFields []string `json:"-"`
5335}
5336
5337func (s *GoogleCloudVisionV1p2beta1OperationMetadata) MarshalJSON() ([]byte, error) {
5338	type NoMethod GoogleCloudVisionV1p2beta1OperationMetadata
5339	raw := NoMethod(*s)
5340	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5341}
5342
5343// GoogleCloudVisionV1p2beta1OutputConfig: The desired output location
5344// and metadata.
5345type GoogleCloudVisionV1p2beta1OutputConfig struct {
5346	// BatchSize: The max number of response protos to put into each output
5347	// JSON file on Google Cloud Storage. The valid range is [1, 100]. If
5348	// not specified, the default value is 20. For example, for one pdf file
5349	// with 100 pages, 100 response protos will be generated. If
5350	// `batch_size` = 20, then 5 json files each containing 20 response
5351	// protos will be written under the prefix `gcs_destination`.`uri`.
5352	// Currently, batch_size only applies to GcsDestination, with potential
5353	// future support for other output configurations.
5354	BatchSize int64 `json:"batchSize,omitempty"`
5355
5356	// GcsDestination: The Google Cloud Storage location to write the
5357	// output(s) to.
5358	GcsDestination *GoogleCloudVisionV1p2beta1GcsDestination `json:"gcsDestination,omitempty"`
5359
5360	// ForceSendFields is a list of field names (e.g. "BatchSize") to
5361	// unconditionally include in API requests. By default, fields with
5362	// empty values are omitted from API requests. However, any non-pointer,
5363	// non-interface field appearing in ForceSendFields will be sent to the
5364	// server regardless of whether the field is empty or not. This may be
5365	// used to include empty fields in Patch requests.
5366	ForceSendFields []string `json:"-"`
5367
5368	// NullFields is a list of field names (e.g. "BatchSize") to include in
5369	// API requests with the JSON null value. By default, fields with empty
5370	// values are omitted from API requests. However, any field with an
5371	// empty value appearing in NullFields will be sent to the server as
5372	// null. It is an error if a field in this list has a non-empty value.
5373	// This may be used to include null fields in Patch requests.
5374	NullFields []string `json:"-"`
5375}
5376
5377func (s *GoogleCloudVisionV1p2beta1OutputConfig) MarshalJSON() ([]byte, error) {
5378	type NoMethod GoogleCloudVisionV1p2beta1OutputConfig
5379	raw := NoMethod(*s)
5380	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5381}
5382
5383// GoogleCloudVisionV1p2beta1Page: Detected page from OCR.
5384type GoogleCloudVisionV1p2beta1Page struct {
5385	// Blocks: List of blocks of text, images etc on this page.
5386	Blocks []*GoogleCloudVisionV1p2beta1Block `json:"blocks,omitempty"`
5387
5388	// Confidence: Confidence of the OCR results on the page. Range [0, 1].
5389	Confidence float64 `json:"confidence,omitempty"`
5390
5391	// Height: Page height. For PDFs the unit is points. For images
5392	// (including TIFFs) the unit is pixels.
5393	Height int64 `json:"height,omitempty"`
5394
5395	// Property: Additional information detected on the page.
5396	Property *GoogleCloudVisionV1p2beta1TextAnnotationTextProperty `json:"property,omitempty"`
5397
5398	// Width: Page width. For PDFs the unit is points. For images (including
5399	// TIFFs) the unit is pixels.
5400	Width int64 `json:"width,omitempty"`
5401
5402	// ForceSendFields is a list of field names (e.g. "Blocks") to
5403	// unconditionally include in API requests. By default, fields with
5404	// empty values are omitted from API requests. However, any non-pointer,
5405	// non-interface field appearing in ForceSendFields will be sent to the
5406	// server regardless of whether the field is empty or not. This may be
5407	// used to include empty fields in Patch requests.
5408	ForceSendFields []string `json:"-"`
5409
5410	// NullFields is a list of field names (e.g. "Blocks") to include in API
5411	// requests with the JSON null value. By default, fields with empty
5412	// values are omitted from API requests. However, any field with an
5413	// empty value appearing in NullFields will be sent to the server as
5414	// null. It is an error if a field in this list has a non-empty value.
5415	// This may be used to include null fields in Patch requests.
5416	NullFields []string `json:"-"`
5417}
5418
5419func (s *GoogleCloudVisionV1p2beta1Page) MarshalJSON() ([]byte, error) {
5420	type NoMethod GoogleCloudVisionV1p2beta1Page
5421	raw := NoMethod(*s)
5422	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5423}
5424
5425func (s *GoogleCloudVisionV1p2beta1Page) UnmarshalJSON(data []byte) error {
5426	type NoMethod GoogleCloudVisionV1p2beta1Page
5427	var s1 struct {
5428		Confidence gensupport.JSONFloat64 `json:"confidence"`
5429		*NoMethod
5430	}
5431	s1.NoMethod = (*NoMethod)(s)
5432	if err := json.Unmarshal(data, &s1); err != nil {
5433		return err
5434	}
5435	s.Confidence = float64(s1.Confidence)
5436	return nil
5437}
5438
5439// GoogleCloudVisionV1p2beta1Paragraph: Structural unit of text
5440// representing a number of words in certain order.
5441type GoogleCloudVisionV1p2beta1Paragraph struct {
5442	// BoundingBox: The bounding box for the paragraph. The vertices are in
5443	// the order of top-left, top-right, bottom-right, bottom-left. When a
5444	// rotation of the bounding box is detected the rotation is represented
5445	// as around the top-left corner as defined when the text is read in the
5446	// 'natural' orientation. For example: * when the text is horizontal it
5447	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
5448	// around the top-left corner it becomes: 2----3 | | 1----0 and the
5449	// vertex order will still be (0, 1, 2, 3).
5450	BoundingBox *GoogleCloudVisionV1p2beta1BoundingPoly `json:"boundingBox,omitempty"`
5451
5452	// Confidence: Confidence of the OCR results for the paragraph. Range
5453	// [0, 1].
5454	Confidence float64 `json:"confidence,omitempty"`
5455
5456	// Property: Additional information detected for the paragraph.
5457	Property *GoogleCloudVisionV1p2beta1TextAnnotationTextProperty `json:"property,omitempty"`
5458
5459	// Words: List of all words in this paragraph.
5460	Words []*GoogleCloudVisionV1p2beta1Word `json:"words,omitempty"`
5461
5462	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
5463	// unconditionally include in API requests. By default, fields with
5464	// empty values are omitted from API requests. However, any non-pointer,
5465	// non-interface field appearing in ForceSendFields will be sent to the
5466	// server regardless of whether the field is empty or not. This may be
5467	// used to include empty fields in Patch requests.
5468	ForceSendFields []string `json:"-"`
5469
5470	// NullFields is a list of field names (e.g. "BoundingBox") to include
5471	// in API requests with the JSON null value. By default, fields with
5472	// empty values are omitted from API requests. However, any field with
5473	// an empty value appearing in NullFields will be sent to the server as
5474	// null. It is an error if a field in this list has a non-empty value.
5475	// This may be used to include null fields in Patch requests.
5476	NullFields []string `json:"-"`
5477}
5478
5479func (s *GoogleCloudVisionV1p2beta1Paragraph) MarshalJSON() ([]byte, error) {
5480	type NoMethod GoogleCloudVisionV1p2beta1Paragraph
5481	raw := NoMethod(*s)
5482	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5483}
5484
5485func (s *GoogleCloudVisionV1p2beta1Paragraph) UnmarshalJSON(data []byte) error {
5486	type NoMethod GoogleCloudVisionV1p2beta1Paragraph
5487	var s1 struct {
5488		Confidence gensupport.JSONFloat64 `json:"confidence"`
5489		*NoMethod
5490	}
5491	s1.NoMethod = (*NoMethod)(s)
5492	if err := json.Unmarshal(data, &s1); err != nil {
5493		return err
5494	}
5495	s.Confidence = float64(s1.Confidence)
5496	return nil
5497}
5498
5499// GoogleCloudVisionV1p2beta1Position: A 3D position in the image, used
5500// primarily for Face detection landmarks. A valid Position must have
5501// both x and y coordinates. The position coordinates are in the same
5502// scale as the original image.
5503type GoogleCloudVisionV1p2beta1Position struct {
5504	// X: X coordinate.
5505	X float64 `json:"x,omitempty"`
5506
5507	// Y: Y coordinate.
5508	Y float64 `json:"y,omitempty"`
5509
5510	// Z: Z coordinate (or depth).
5511	Z float64 `json:"z,omitempty"`
5512
5513	// ForceSendFields is a list of field names (e.g. "X") to
5514	// unconditionally include in API requests. By default, fields with
5515	// empty values are omitted from API requests. However, any non-pointer,
5516	// non-interface field appearing in ForceSendFields will be sent to the
5517	// server regardless of whether the field is empty or not. This may be
5518	// used to include empty fields in Patch requests.
5519	ForceSendFields []string `json:"-"`
5520
5521	// NullFields is a list of field names (e.g. "X") to include in API
5522	// requests with the JSON null value. By default, fields with empty
5523	// values are omitted from API requests. However, any field with an
5524	// empty value appearing in NullFields will be sent to the server as
5525	// null. It is an error if a field in this list has a non-empty value.
5526	// This may be used to include null fields in Patch requests.
5527	NullFields []string `json:"-"`
5528}
5529
5530func (s *GoogleCloudVisionV1p2beta1Position) MarshalJSON() ([]byte, error) {
5531	type NoMethod GoogleCloudVisionV1p2beta1Position
5532	raw := NoMethod(*s)
5533	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5534}
5535
5536func (s *GoogleCloudVisionV1p2beta1Position) UnmarshalJSON(data []byte) error {
5537	type NoMethod GoogleCloudVisionV1p2beta1Position
5538	var s1 struct {
5539		X gensupport.JSONFloat64 `json:"x"`
5540		Y gensupport.JSONFloat64 `json:"y"`
5541		Z gensupport.JSONFloat64 `json:"z"`
5542		*NoMethod
5543	}
5544	s1.NoMethod = (*NoMethod)(s)
5545	if err := json.Unmarshal(data, &s1); err != nil {
5546		return err
5547	}
5548	s.X = float64(s1.X)
5549	s.Y = float64(s1.Y)
5550	s.Z = float64(s1.Z)
5551	return nil
5552}
5553
5554// GoogleCloudVisionV1p2beta1Product: A Product contains
5555// ReferenceImages.
5556type GoogleCloudVisionV1p2beta1Product struct {
5557	// Description: User-provided metadata to be stored with this product.
5558	// Must be at most 4096 characters long.
5559	Description string `json:"description,omitempty"`
5560
5561	// DisplayName: The user-provided name for this Product. Must not be
5562	// empty. Must be at most 4096 characters long.
5563	DisplayName string `json:"displayName,omitempty"`
5564
5565	// Name: The resource name of the product. Format is:
5566	// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This
5567	// field is ignored when creating a product.
5568	Name string `json:"name,omitempty"`
5569
5570	// ProductCategory: Immutable. The category for the product identified
5571	// by the reference image. This should be one of "homegoods-v2",
5572	// "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The
5573	// legacy categories "homegoods", "apparel", and "toys" are still
5574	// supported, but these should not be used for new products.
5575	ProductCategory string `json:"productCategory,omitempty"`
5576
5577	// ProductLabels: Key-value pairs that can be attached to a product. At
5578	// query time, constraints can be specified based on the product_labels.
5579	// Note that integer values can be provided as strings, e.g. "1199".
5580	// Only strings with integer values can match a range-based restriction
5581	// which is to be supported soon. Multiple values can be assigned to the
5582	// same key. One product may have up to 500 product_labels. Notice that
5583	// the total number of distinct product_labels over all products in one
5584	// ProductSet cannot exceed 1M, otherwise the product search pipeline
5585	// will refuse to work for that ProductSet.
5586	ProductLabels []*GoogleCloudVisionV1p2beta1ProductKeyValue `json:"productLabels,omitempty"`
5587
5588	// ForceSendFields is a list of field names (e.g. "Description") to
5589	// unconditionally include in API requests. By default, fields with
5590	// empty values are omitted from API requests. However, any non-pointer,
5591	// non-interface field appearing in ForceSendFields will be sent to the
5592	// server regardless of whether the field is empty or not. This may be
5593	// used to include empty fields in Patch requests.
5594	ForceSendFields []string `json:"-"`
5595
5596	// NullFields is a list of field names (e.g. "Description") to include
5597	// in API requests with the JSON null value. By default, fields with
5598	// empty values are omitted from API requests. However, any field with
5599	// an empty value appearing in NullFields will be sent to the server as
5600	// null. It is an error if a field in this list has a non-empty value.
5601	// This may be used to include null fields in Patch requests.
5602	NullFields []string `json:"-"`
5603}
5604
5605func (s *GoogleCloudVisionV1p2beta1Product) MarshalJSON() ([]byte, error) {
5606	type NoMethod GoogleCloudVisionV1p2beta1Product
5607	raw := NoMethod(*s)
5608	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5609}
5610
5611// GoogleCloudVisionV1p2beta1ProductKeyValue: A product label
5612// represented as a key-value pair.
5613type GoogleCloudVisionV1p2beta1ProductKeyValue struct {
5614	// Key: The key of the label attached to the product. Cannot be empty
5615	// and cannot exceed 128 bytes.
5616	Key string `json:"key,omitempty"`
5617
5618	// Value: The value of the label attached to the product. Cannot be
5619	// empty and cannot exceed 128 bytes.
5620	Value string `json:"value,omitempty"`
5621
5622	// ForceSendFields is a list of field names (e.g. "Key") to
5623	// unconditionally include in API requests. By default, fields with
5624	// empty values are omitted from API requests. However, any non-pointer,
5625	// non-interface field appearing in ForceSendFields will be sent to the
5626	// server regardless of whether the field is empty or not. This may be
5627	// used to include empty fields in Patch requests.
5628	ForceSendFields []string `json:"-"`
5629
5630	// NullFields is a list of field names (e.g. "Key") to include in API
5631	// requests with the JSON null value. By default, fields with empty
5632	// values are omitted from API requests. However, any field with an
5633	// empty value appearing in NullFields will be sent to the server as
5634	// null. It is an error if a field in this list has a non-empty value.
5635	// This may be used to include null fields in Patch requests.
5636	NullFields []string `json:"-"`
5637}
5638
5639func (s *GoogleCloudVisionV1p2beta1ProductKeyValue) MarshalJSON() ([]byte, error) {
5640	type NoMethod GoogleCloudVisionV1p2beta1ProductKeyValue
5641	raw := NoMethod(*s)
5642	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5643}
5644
5645// GoogleCloudVisionV1p2beta1ProductSearchResults: Results for a product
5646// search request.
5647type GoogleCloudVisionV1p2beta1ProductSearchResults struct {
5648	// IndexTime: Timestamp of the index which provided these results.
5649	// Products added to the product set and products removed from the
5650	// product set after this time are not reflected in the current results.
5651	IndexTime string `json:"indexTime,omitempty"`
5652
5653	// ProductGroupedResults: List of results grouped by products detected
5654	// in the query image. Each entry corresponds to one bounding polygon in
5655	// the query image, and contains the matching products specific to that
5656	// region. There may be duplicate product matches in the union of all
5657	// the per-product results.
5658	ProductGroupedResults []*GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult `json:"productGroupedResults,omitempty"`
5659
5660	// Results: List of results, one for each product match.
5661	Results []*GoogleCloudVisionV1p2beta1ProductSearchResultsResult `json:"results,omitempty"`
5662
5663	// ForceSendFields is a list of field names (e.g. "IndexTime") to
5664	// unconditionally include in API requests. By default, fields with
5665	// empty values are omitted from API requests. However, any non-pointer,
5666	// non-interface field appearing in ForceSendFields will be sent to the
5667	// server regardless of whether the field is empty or not. This may be
5668	// used to include empty fields in Patch requests.
5669	ForceSendFields []string `json:"-"`
5670
5671	// NullFields is a list of field names (e.g. "IndexTime") to include in
5672	// API requests with the JSON null value. By default, fields with empty
5673	// values are omitted from API requests. However, any field with an
5674	// empty value appearing in NullFields will be sent to the server as
5675	// null. It is an error if a field in this list has a non-empty value.
5676	// This may be used to include null fields in Patch requests.
5677	NullFields []string `json:"-"`
5678}
5679
5680func (s *GoogleCloudVisionV1p2beta1ProductSearchResults) MarshalJSON() ([]byte, error) {
5681	type NoMethod GoogleCloudVisionV1p2beta1ProductSearchResults
5682	raw := NoMethod(*s)
5683	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5684}
5685
5686// GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult:
5687// Information about the products similar to a single product in a query
5688// image.
5689type GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult struct {
5690	// BoundingPoly: The bounding polygon around the product detected in the
5691	// query image.
5692	BoundingPoly *GoogleCloudVisionV1p2beta1BoundingPoly `json:"boundingPoly,omitempty"`
5693
5694	// ObjectAnnotations: List of generic predictions for the object in the
5695	// bounding box.
5696	ObjectAnnotations []*GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation `json:"objectAnnotations,omitempty"`
5697
5698	// Results: List of results, one for each product match.
5699	Results []*GoogleCloudVisionV1p2beta1ProductSearchResultsResult `json:"results,omitempty"`
5700
5701	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
5702	// unconditionally include in API requests. By default, fields with
5703	// empty values are omitted from API requests. However, any non-pointer,
5704	// non-interface field appearing in ForceSendFields will be sent to the
5705	// server regardless of whether the field is empty or not. This may be
5706	// used to include empty fields in Patch requests.
5707	ForceSendFields []string `json:"-"`
5708
5709	// NullFields is a list of field names (e.g. "BoundingPoly") to include
5710	// in API requests with the JSON null value. By default, fields with
5711	// empty values are omitted from API requests. However, any field with
5712	// an empty value appearing in NullFields will be sent to the server as
5713	// null. It is an error if a field in this list has a non-empty value.
5714	// This may be used to include null fields in Patch requests.
5715	NullFields []string `json:"-"`
5716}
5717
5718func (s *GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult) MarshalJSON() ([]byte, error) {
5719	type NoMethod GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult
5720	raw := NoMethod(*s)
5721	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5722}
5723
5724// GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation:
5725// Prediction for what the object in the bounding box is.
5726type GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation struct {
5727	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
5728	// For more information, see
5729	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
5730	LanguageCode string `json:"languageCode,omitempty"`
5731
5732	// Mid: Object ID that should align with EntityAnnotation mid.
5733	Mid string `json:"mid,omitempty"`
5734
5735	// Name: Object name, expressed in its `language_code` language.
5736	Name string `json:"name,omitempty"`
5737
5738	// Score: Score of the result. Range [0, 1].
5739	Score float64 `json:"score,omitempty"`
5740
5741	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
5742	// unconditionally include in API requests. By default, fields with
5743	// empty values are omitted from API requests. However, any non-pointer,
5744	// non-interface field appearing in ForceSendFields will be sent to the
5745	// server regardless of whether the field is empty or not. This may be
5746	// used to include empty fields in Patch requests.
5747	ForceSendFields []string `json:"-"`
5748
5749	// NullFields is a list of field names (e.g. "LanguageCode") to include
5750	// in API requests with the JSON null value. By default, fields with
5751	// empty values are omitted from API requests. However, any field with
5752	// an empty value appearing in NullFields will be sent to the server as
5753	// null. It is an error if a field in this list has a non-empty value.
5754	// This may be used to include null fields in Patch requests.
5755	NullFields []string `json:"-"`
5756}
5757
5758func (s *GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation) MarshalJSON() ([]byte, error) {
5759	type NoMethod GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation
5760	raw := NoMethod(*s)
5761	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5762}
5763
5764func (s *GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation) UnmarshalJSON(data []byte) error {
5765	type NoMethod GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation
5766	var s1 struct {
5767		Score gensupport.JSONFloat64 `json:"score"`
5768		*NoMethod
5769	}
5770	s1.NoMethod = (*NoMethod)(s)
5771	if err := json.Unmarshal(data, &s1); err != nil {
5772		return err
5773	}
5774	s.Score = float64(s1.Score)
5775	return nil
5776}
5777
5778// GoogleCloudVisionV1p2beta1ProductSearchResultsResult: Information
5779// about a product.
5780type GoogleCloudVisionV1p2beta1ProductSearchResultsResult struct {
5781	// Image: The resource name of the image from the product that is the
5782	// closest match to the query.
5783	Image string `json:"image,omitempty"`
5784
5785	// Product: The Product.
5786	Product *GoogleCloudVisionV1p2beta1Product `json:"product,omitempty"`
5787
5788	// Score: A confidence level on the match, ranging from 0 (no
5789	// confidence) to 1 (full confidence).
5790	Score float64 `json:"score,omitempty"`
5791
5792	// ForceSendFields is a list of field names (e.g. "Image") to
5793	// unconditionally include in API requests. By default, fields with
5794	// empty values are omitted from API requests. However, any non-pointer,
5795	// non-interface field appearing in ForceSendFields will be sent to the
5796	// server regardless of whether the field is empty or not. This may be
5797	// used to include empty fields in Patch requests.
5798	ForceSendFields []string `json:"-"`
5799
5800	// NullFields is a list of field names (e.g. "Image") to include in API
5801	// requests with the JSON null value. By default, fields with empty
5802	// values are omitted from API requests. However, any field with an
5803	// empty value appearing in NullFields will be sent to the server as
5804	// null. It is an error if a field in this list has a non-empty value.
5805	// This may be used to include null fields in Patch requests.
5806	NullFields []string `json:"-"`
5807}
5808
5809func (s *GoogleCloudVisionV1p2beta1ProductSearchResultsResult) MarshalJSON() ([]byte, error) {
5810	type NoMethod GoogleCloudVisionV1p2beta1ProductSearchResultsResult
5811	raw := NoMethod(*s)
5812	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5813}
5814
5815func (s *GoogleCloudVisionV1p2beta1ProductSearchResultsResult) UnmarshalJSON(data []byte) error {
5816	type NoMethod GoogleCloudVisionV1p2beta1ProductSearchResultsResult
5817	var s1 struct {
5818		Score gensupport.JSONFloat64 `json:"score"`
5819		*NoMethod
5820	}
5821	s1.NoMethod = (*NoMethod)(s)
5822	if err := json.Unmarshal(data, &s1); err != nil {
5823		return err
5824	}
5825	s.Score = float64(s1.Score)
5826	return nil
5827}
5828
5829// GoogleCloudVisionV1p2beta1Property: A `Property` consists of a
5830// user-supplied name/value pair.
5831type GoogleCloudVisionV1p2beta1Property struct {
5832	// Name: Name of the property.
5833	Name string `json:"name,omitempty"`
5834
5835	// Uint64Value: Value of numeric properties.
5836	Uint64Value uint64 `json:"uint64Value,omitempty,string"`
5837
5838	// Value: Value of the property.
5839	Value string `json:"value,omitempty"`
5840
5841	// ForceSendFields is a list of field names (e.g. "Name") to
5842	// unconditionally include in API requests. By default, fields with
5843	// empty values are omitted from API requests. However, any non-pointer,
5844	// non-interface field appearing in ForceSendFields will be sent to the
5845	// server regardless of whether the field is empty or not. This may be
5846	// used to include empty fields in Patch requests.
5847	ForceSendFields []string `json:"-"`
5848
5849	// NullFields is a list of field names (e.g. "Name") to include in API
5850	// requests with the JSON null value. By default, fields with empty
5851	// values are omitted from API requests. However, any field with an
5852	// empty value appearing in NullFields will be sent to the server as
5853	// null. It is an error if a field in this list has a non-empty value.
5854	// This may be used to include null fields in Patch requests.
5855	NullFields []string `json:"-"`
5856}
5857
5858func (s *GoogleCloudVisionV1p2beta1Property) MarshalJSON() ([]byte, error) {
5859	type NoMethod GoogleCloudVisionV1p2beta1Property
5860	raw := NoMethod(*s)
5861	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5862}
5863
5864// GoogleCloudVisionV1p2beta1SafeSearchAnnotation: Set of features
5865// pertaining to the image, computed by computer vision methods over
5866// safe-search verticals (for example, adult, spoof, medical, violence).
5867type GoogleCloudVisionV1p2beta1SafeSearchAnnotation struct {
5868	// Adult: Represents the adult content likelihood for the image. Adult
5869	// content may contain elements such as nudity, pornographic images or
5870	// cartoons, or sexual activities.
5871	//
5872	// Possible values:
5873	//   "UNKNOWN" - Unknown likelihood.
5874	//   "VERY_UNLIKELY" - It is very unlikely.
5875	//   "UNLIKELY" - It is unlikely.
5876	//   "POSSIBLE" - It is possible.
5877	//   "LIKELY" - It is likely.
5878	//   "VERY_LIKELY" - It is very likely.
5879	Adult string `json:"adult,omitempty"`
5880
5881	// Medical: Likelihood that this is a medical image.
5882	//
5883	// Possible values:
5884	//   "UNKNOWN" - Unknown likelihood.
5885	//   "VERY_UNLIKELY" - It is very unlikely.
5886	//   "UNLIKELY" - It is unlikely.
5887	//   "POSSIBLE" - It is possible.
5888	//   "LIKELY" - It is likely.
5889	//   "VERY_LIKELY" - It is very likely.
5890	Medical string `json:"medical,omitempty"`
5891
5892	// Racy: Likelihood that the request image contains racy content. Racy
5893	// content may include (but is not limited to) skimpy or sheer clothing,
5894	// strategically covered nudity, lewd or provocative poses, or close-ups
5895	// of sensitive body areas.
5896	//
5897	// Possible values:
5898	//   "UNKNOWN" - Unknown likelihood.
5899	//   "VERY_UNLIKELY" - It is very unlikely.
5900	//   "UNLIKELY" - It is unlikely.
5901	//   "POSSIBLE" - It is possible.
5902	//   "LIKELY" - It is likely.
5903	//   "VERY_LIKELY" - It is very likely.
5904	Racy string `json:"racy,omitempty"`
5905
5906	// Spoof: Spoof likelihood. The likelihood that an modification was made
5907	// to the image's canonical version to make it appear funny or
5908	// offensive.
5909	//
5910	// Possible values:
5911	//   "UNKNOWN" - Unknown likelihood.
5912	//   "VERY_UNLIKELY" - It is very unlikely.
5913	//   "UNLIKELY" - It is unlikely.
5914	//   "POSSIBLE" - It is possible.
5915	//   "LIKELY" - It is likely.
5916	//   "VERY_LIKELY" - It is very likely.
5917	Spoof string `json:"spoof,omitempty"`
5918
5919	// Violence: Likelihood that this image contains violent content.
5920	//
5921	// Possible values:
5922	//   "UNKNOWN" - Unknown likelihood.
5923	//   "VERY_UNLIKELY" - It is very unlikely.
5924	//   "UNLIKELY" - It is unlikely.
5925	//   "POSSIBLE" - It is possible.
5926	//   "LIKELY" - It is likely.
5927	//   "VERY_LIKELY" - It is very likely.
5928	Violence string `json:"violence,omitempty"`
5929
5930	// ForceSendFields is a list of field names (e.g. "Adult") to
5931	// unconditionally include in API requests. By default, fields with
5932	// empty values are omitted from API requests. However, any non-pointer,
5933	// non-interface field appearing in ForceSendFields will be sent to the
5934	// server regardless of whether the field is empty or not. This may be
5935	// used to include empty fields in Patch requests.
5936	ForceSendFields []string `json:"-"`
5937
5938	// NullFields is a list of field names (e.g. "Adult") to include in API
5939	// requests with the JSON null value. By default, fields with empty
5940	// values are omitted from API requests. However, any field with an
5941	// empty value appearing in NullFields will be sent to the server as
5942	// null. It is an error if a field in this list has a non-empty value.
5943	// This may be used to include null fields in Patch requests.
5944	NullFields []string `json:"-"`
5945}
5946
5947func (s *GoogleCloudVisionV1p2beta1SafeSearchAnnotation) MarshalJSON() ([]byte, error) {
5948	type NoMethod GoogleCloudVisionV1p2beta1SafeSearchAnnotation
5949	raw := NoMethod(*s)
5950	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5951}
5952
5953// GoogleCloudVisionV1p2beta1Symbol: A single symbol representation.
5954type GoogleCloudVisionV1p2beta1Symbol struct {
5955	// BoundingBox: The bounding box for the symbol. The vertices are in the
5956	// order of top-left, top-right, bottom-right, bottom-left. When a
5957	// rotation of the bounding box is detected the rotation is represented
5958	// as around the top-left corner as defined when the text is read in the
5959	// 'natural' orientation. For example: * when the text is horizontal it
5960	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
5961	// around the top-left corner it becomes: 2----3 | | 1----0 and the
5962	// vertex order will still be (0, 1, 2, 3).
5963	BoundingBox *GoogleCloudVisionV1p2beta1BoundingPoly `json:"boundingBox,omitempty"`
5964
5965	// Confidence: Confidence of the OCR results for the symbol. Range [0,
5966	// 1].
5967	Confidence float64 `json:"confidence,omitempty"`
5968
5969	// Property: Additional information detected for the symbol.
5970	Property *GoogleCloudVisionV1p2beta1TextAnnotationTextProperty `json:"property,omitempty"`
5971
5972	// Text: The actual UTF-8 representation of the symbol.
5973	Text string `json:"text,omitempty"`
5974
5975	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
5976	// unconditionally include in API requests. By default, fields with
5977	// empty values are omitted from API requests. However, any non-pointer,
5978	// non-interface field appearing in ForceSendFields will be sent to the
5979	// server regardless of whether the field is empty or not. This may be
5980	// used to include empty fields in Patch requests.
5981	ForceSendFields []string `json:"-"`
5982
5983	// NullFields is a list of field names (e.g. "BoundingBox") to include
5984	// in API requests with the JSON null value. By default, fields with
5985	// empty values are omitted from API requests. However, any field with
5986	// an empty value appearing in NullFields will be sent to the server as
5987	// null. It is an error if a field in this list has a non-empty value.
5988	// This may be used to include null fields in Patch requests.
5989	NullFields []string `json:"-"`
5990}
5991
5992func (s *GoogleCloudVisionV1p2beta1Symbol) MarshalJSON() ([]byte, error) {
5993	type NoMethod GoogleCloudVisionV1p2beta1Symbol
5994	raw := NoMethod(*s)
5995	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
5996}
5997
5998func (s *GoogleCloudVisionV1p2beta1Symbol) UnmarshalJSON(data []byte) error {
5999	type NoMethod GoogleCloudVisionV1p2beta1Symbol
6000	var s1 struct {
6001		Confidence gensupport.JSONFloat64 `json:"confidence"`
6002		*NoMethod
6003	}
6004	s1.NoMethod = (*NoMethod)(s)
6005	if err := json.Unmarshal(data, &s1); err != nil {
6006		return err
6007	}
6008	s.Confidence = float64(s1.Confidence)
6009	return nil
6010}
6011
6012// GoogleCloudVisionV1p2beta1TextAnnotation: TextAnnotation contains a
6013// structured representation of OCR extracted text. The hierarchy of an
6014// OCR extracted text structure is like this: TextAnnotation -> Page ->
6015// Block -> Paragraph -> Word -> Symbol Each structural component,
6016// starting from Page, may further have their own properties. Properties
6017// describe detected languages, breaks etc.. Please refer to the
6018// TextAnnotation.TextProperty message definition below for more detail.
6019type GoogleCloudVisionV1p2beta1TextAnnotation struct {
6020	// Pages: List of pages detected by OCR.
6021	Pages []*GoogleCloudVisionV1p2beta1Page `json:"pages,omitempty"`
6022
6023	// Text: UTF-8 text detected on the pages.
6024	Text string `json:"text,omitempty"`
6025
6026	// ForceSendFields is a list of field names (e.g. "Pages") to
6027	// unconditionally include in API requests. By default, fields with
6028	// empty values are omitted from API requests. However, any non-pointer,
6029	// non-interface field appearing in ForceSendFields will be sent to the
6030	// server regardless of whether the field is empty or not. This may be
6031	// used to include empty fields in Patch requests.
6032	ForceSendFields []string `json:"-"`
6033
6034	// NullFields is a list of field names (e.g. "Pages") to include in API
6035	// requests with the JSON null value. By default, fields with empty
6036	// values are omitted from API requests. However, any field with an
6037	// empty value appearing in NullFields will be sent to the server as
6038	// null. It is an error if a field in this list has a non-empty value.
6039	// This may be used to include null fields in Patch requests.
6040	NullFields []string `json:"-"`
6041}
6042
6043func (s *GoogleCloudVisionV1p2beta1TextAnnotation) MarshalJSON() ([]byte, error) {
6044	type NoMethod GoogleCloudVisionV1p2beta1TextAnnotation
6045	raw := NoMethod(*s)
6046	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6047}
6048
6049// GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak: Detected start
6050// or end of a structural component.
6051type GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak struct {
6052	// IsPrefix: True if break prepends the element.
6053	IsPrefix bool `json:"isPrefix,omitempty"`
6054
6055	// Type: Detected break type.
6056	//
6057	// Possible values:
6058	//   "UNKNOWN" - Unknown break label type.
6059	//   "SPACE" - Regular space.
6060	//   "SURE_SPACE" - Sure space (very wide).
6061	//   "EOL_SURE_SPACE" - Line-wrapping break.
6062	//   "HYPHEN" - End-line hyphen that is not present in text; does not
6063	// co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
6064	//   "LINE_BREAK" - Line break that ends a paragraph.
6065	Type string `json:"type,omitempty"`
6066
6067	// ForceSendFields is a list of field names (e.g. "IsPrefix") to
6068	// unconditionally include in API requests. By default, fields with
6069	// empty values are omitted from API requests. However, any non-pointer,
6070	// non-interface field appearing in ForceSendFields will be sent to the
6071	// server regardless of whether the field is empty or not. This may be
6072	// used to include empty fields in Patch requests.
6073	ForceSendFields []string `json:"-"`
6074
6075	// NullFields is a list of field names (e.g. "IsPrefix") to include in
6076	// API requests with the JSON null value. By default, fields with empty
6077	// values are omitted from API requests. However, any field with an
6078	// empty value appearing in NullFields will be sent to the server as
6079	// null. It is an error if a field in this list has a non-empty value.
6080	// This may be used to include null fields in Patch requests.
6081	NullFields []string `json:"-"`
6082}
6083
6084func (s *GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak) MarshalJSON() ([]byte, error) {
6085	type NoMethod GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak
6086	raw := NoMethod(*s)
6087	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6088}
6089
6090// GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage: Detected
6091// language for a structural component.
6092type GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage struct {
6093	// Confidence: Confidence of detected language. Range [0, 1].
6094	Confidence float64 `json:"confidence,omitempty"`
6095
6096	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
6097	// For more information, see
6098	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
6099	LanguageCode string `json:"languageCode,omitempty"`
6100
6101	// ForceSendFields is a list of field names (e.g. "Confidence") to
6102	// unconditionally include in API requests. By default, fields with
6103	// empty values are omitted from API requests. However, any non-pointer,
6104	// non-interface field appearing in ForceSendFields will be sent to the
6105	// server regardless of whether the field is empty or not. This may be
6106	// used to include empty fields in Patch requests.
6107	ForceSendFields []string `json:"-"`
6108
6109	// NullFields is a list of field names (e.g. "Confidence") to include in
6110	// API requests with the JSON null value. By default, fields with empty
6111	// values are omitted from API requests. However, any field with an
6112	// empty value appearing in NullFields will be sent to the server as
6113	// null. It is an error if a field in this list has a non-empty value.
6114	// This may be used to include null fields in Patch requests.
6115	NullFields []string `json:"-"`
6116}
6117
6118func (s *GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage) MarshalJSON() ([]byte, error) {
6119	type NoMethod GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage
6120	raw := NoMethod(*s)
6121	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6122}
6123
6124func (s *GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage) UnmarshalJSON(data []byte) error {
6125	type NoMethod GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage
6126	var s1 struct {
6127		Confidence gensupport.JSONFloat64 `json:"confidence"`
6128		*NoMethod
6129	}
6130	s1.NoMethod = (*NoMethod)(s)
6131	if err := json.Unmarshal(data, &s1); err != nil {
6132		return err
6133	}
6134	s.Confidence = float64(s1.Confidence)
6135	return nil
6136}
6137
6138// GoogleCloudVisionV1p2beta1TextAnnotationTextProperty: Additional
6139// information detected on the structural component.
6140type GoogleCloudVisionV1p2beta1TextAnnotationTextProperty struct {
6141	// DetectedBreak: Detected start or end of a text segment.
6142	DetectedBreak *GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak `json:"detectedBreak,omitempty"`
6143
6144	// DetectedLanguages: A list of detected languages together with
6145	// confidence.
6146	DetectedLanguages []*GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage `json:"detectedLanguages,omitempty"`
6147
6148	// ForceSendFields is a list of field names (e.g. "DetectedBreak") to
6149	// unconditionally include in API requests. By default, fields with
6150	// empty values are omitted from API requests. However, any non-pointer,
6151	// non-interface field appearing in ForceSendFields will be sent to the
6152	// server regardless of whether the field is empty or not. This may be
6153	// used to include empty fields in Patch requests.
6154	ForceSendFields []string `json:"-"`
6155
6156	// NullFields is a list of field names (e.g. "DetectedBreak") to include
6157	// in API requests with the JSON null value. By default, fields with
6158	// empty values are omitted from API requests. However, any field with
6159	// an empty value appearing in NullFields will be sent to the server as
6160	// null. It is an error if a field in this list has a non-empty value.
6161	// This may be used to include null fields in Patch requests.
6162	NullFields []string `json:"-"`
6163}
6164
6165func (s *GoogleCloudVisionV1p2beta1TextAnnotationTextProperty) MarshalJSON() ([]byte, error) {
6166	type NoMethod GoogleCloudVisionV1p2beta1TextAnnotationTextProperty
6167	raw := NoMethod(*s)
6168	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6169}
6170
6171// GoogleCloudVisionV1p2beta1Vertex: A vertex represents a 2D point in
6172// the image. NOTE: the vertex coordinates are in the same scale as the
6173// original image.
6174type GoogleCloudVisionV1p2beta1Vertex struct {
6175	// X: X coordinate.
6176	X int64 `json:"x,omitempty"`
6177
6178	// Y: Y coordinate.
6179	Y int64 `json:"y,omitempty"`
6180
6181	// ForceSendFields is a list of field names (e.g. "X") to
6182	// unconditionally include in API requests. By default, fields with
6183	// empty values are omitted from API requests. However, any non-pointer,
6184	// non-interface field appearing in ForceSendFields will be sent to the
6185	// server regardless of whether the field is empty or not. This may be
6186	// used to include empty fields in Patch requests.
6187	ForceSendFields []string `json:"-"`
6188
6189	// NullFields is a list of field names (e.g. "X") to include in API
6190	// requests with the JSON null value. By default, fields with empty
6191	// values are omitted from API requests. However, any field with an
6192	// empty value appearing in NullFields will be sent to the server as
6193	// null. It is an error if a field in this list has a non-empty value.
6194	// This may be used to include null fields in Patch requests.
6195	NullFields []string `json:"-"`
6196}
6197
6198func (s *GoogleCloudVisionV1p2beta1Vertex) MarshalJSON() ([]byte, error) {
6199	type NoMethod GoogleCloudVisionV1p2beta1Vertex
6200	raw := NoMethod(*s)
6201	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6202}
6203
6204// GoogleCloudVisionV1p2beta1WebDetection: Relevant information for the
6205// image from the Internet.
6206type GoogleCloudVisionV1p2beta1WebDetection struct {
6207	// BestGuessLabels: The service's best guess as to the topic of the
6208	// request image. Inferred from similar images on the open web.
6209	BestGuessLabels []*GoogleCloudVisionV1p2beta1WebDetectionWebLabel `json:"bestGuessLabels,omitempty"`
6210
6211	// FullMatchingImages: Fully matching images from the Internet. Can
6212	// include resized copies of the query image.
6213	FullMatchingImages []*GoogleCloudVisionV1p2beta1WebDetectionWebImage `json:"fullMatchingImages,omitempty"`
6214
6215	// PagesWithMatchingImages: Web pages containing the matching images
6216	// from the Internet.
6217	PagesWithMatchingImages []*GoogleCloudVisionV1p2beta1WebDetectionWebPage `json:"pagesWithMatchingImages,omitempty"`
6218
6219	// PartialMatchingImages: Partial matching images from the Internet.
6220	// Those images are similar enough to share some key-point features. For
6221	// example an original image will likely have partial matching for its
6222	// crops.
6223	PartialMatchingImages []*GoogleCloudVisionV1p2beta1WebDetectionWebImage `json:"partialMatchingImages,omitempty"`
6224
6225	// VisuallySimilarImages: The visually similar image results.
6226	VisuallySimilarImages []*GoogleCloudVisionV1p2beta1WebDetectionWebImage `json:"visuallySimilarImages,omitempty"`
6227
6228	// WebEntities: Deduced entities from similar images on the Internet.
6229	WebEntities []*GoogleCloudVisionV1p2beta1WebDetectionWebEntity `json:"webEntities,omitempty"`
6230
6231	// ForceSendFields is a list of field names (e.g. "BestGuessLabels") to
6232	// unconditionally include in API requests. By default, fields with
6233	// empty values are omitted from API requests. However, any non-pointer,
6234	// non-interface field appearing in ForceSendFields will be sent to the
6235	// server regardless of whether the field is empty or not. This may be
6236	// used to include empty fields in Patch requests.
6237	ForceSendFields []string `json:"-"`
6238
6239	// NullFields is a list of field names (e.g. "BestGuessLabels") to
6240	// include in API requests with the JSON null value. By default, fields
6241	// with empty values are omitted from API requests. However, any field
6242	// with an empty value appearing in NullFields will be sent to the
6243	// server as null. It is an error if a field in this list has a
6244	// non-empty value. This may be used to include null fields in Patch
6245	// requests.
6246	NullFields []string `json:"-"`
6247}
6248
6249func (s *GoogleCloudVisionV1p2beta1WebDetection) MarshalJSON() ([]byte, error) {
6250	type NoMethod GoogleCloudVisionV1p2beta1WebDetection
6251	raw := NoMethod(*s)
6252	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6253}
6254
6255// GoogleCloudVisionV1p2beta1WebDetectionWebEntity: Entity deduced from
6256// similar images on the Internet.
6257type GoogleCloudVisionV1p2beta1WebDetectionWebEntity struct {
6258	// Description: Canonical description of the entity, in English.
6259	Description string `json:"description,omitempty"`
6260
6261	// EntityId: Opaque entity ID.
6262	EntityId string `json:"entityId,omitempty"`
6263
6264	// Score: Overall relevancy score for the entity. Not normalized and not
6265	// comparable across different image queries.
6266	Score float64 `json:"score,omitempty"`
6267
6268	// ForceSendFields is a list of field names (e.g. "Description") to
6269	// unconditionally include in API requests. By default, fields with
6270	// empty values are omitted from API requests. However, any non-pointer,
6271	// non-interface field appearing in ForceSendFields will be sent to the
6272	// server regardless of whether the field is empty or not. This may be
6273	// used to include empty fields in Patch requests.
6274	ForceSendFields []string `json:"-"`
6275
6276	// NullFields is a list of field names (e.g. "Description") to include
6277	// in API requests with the JSON null value. By default, fields with
6278	// empty values are omitted from API requests. However, any field with
6279	// an empty value appearing in NullFields will be sent to the server as
6280	// null. It is an error if a field in this list has a non-empty value.
6281	// This may be used to include null fields in Patch requests.
6282	NullFields []string `json:"-"`
6283}
6284
6285func (s *GoogleCloudVisionV1p2beta1WebDetectionWebEntity) MarshalJSON() ([]byte, error) {
6286	type NoMethod GoogleCloudVisionV1p2beta1WebDetectionWebEntity
6287	raw := NoMethod(*s)
6288	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6289}
6290
6291func (s *GoogleCloudVisionV1p2beta1WebDetectionWebEntity) UnmarshalJSON(data []byte) error {
6292	type NoMethod GoogleCloudVisionV1p2beta1WebDetectionWebEntity
6293	var s1 struct {
6294		Score gensupport.JSONFloat64 `json:"score"`
6295		*NoMethod
6296	}
6297	s1.NoMethod = (*NoMethod)(s)
6298	if err := json.Unmarshal(data, &s1); err != nil {
6299		return err
6300	}
6301	s.Score = float64(s1.Score)
6302	return nil
6303}
6304
6305// GoogleCloudVisionV1p2beta1WebDetectionWebImage: Metadata for online
6306// images.
6307type GoogleCloudVisionV1p2beta1WebDetectionWebImage struct {
6308	// Score: (Deprecated) Overall relevancy score for the image.
6309	Score float64 `json:"score,omitempty"`
6310
6311	// Url: The result image URL.
6312	Url string `json:"url,omitempty"`
6313
6314	// ForceSendFields is a list of field names (e.g. "Score") to
6315	// unconditionally include in API requests. By default, fields with
6316	// empty values are omitted from API requests. However, any non-pointer,
6317	// non-interface field appearing in ForceSendFields will be sent to the
6318	// server regardless of whether the field is empty or not. This may be
6319	// used to include empty fields in Patch requests.
6320	ForceSendFields []string `json:"-"`
6321
6322	// NullFields is a list of field names (e.g. "Score") to include in API
6323	// requests with the JSON null value. By default, fields with empty
6324	// values are omitted from API requests. However, any field with an
6325	// empty value appearing in NullFields will be sent to the server as
6326	// null. It is an error if a field in this list has a non-empty value.
6327	// This may be used to include null fields in Patch requests.
6328	NullFields []string `json:"-"`
6329}
6330
6331func (s *GoogleCloudVisionV1p2beta1WebDetectionWebImage) MarshalJSON() ([]byte, error) {
6332	type NoMethod GoogleCloudVisionV1p2beta1WebDetectionWebImage
6333	raw := NoMethod(*s)
6334	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6335}
6336
6337func (s *GoogleCloudVisionV1p2beta1WebDetectionWebImage) UnmarshalJSON(data []byte) error {
6338	type NoMethod GoogleCloudVisionV1p2beta1WebDetectionWebImage
6339	var s1 struct {
6340		Score gensupport.JSONFloat64 `json:"score"`
6341		*NoMethod
6342	}
6343	s1.NoMethod = (*NoMethod)(s)
6344	if err := json.Unmarshal(data, &s1); err != nil {
6345		return err
6346	}
6347	s.Score = float64(s1.Score)
6348	return nil
6349}
6350
6351// GoogleCloudVisionV1p2beta1WebDetectionWebLabel: Label to provide
6352// extra metadata for the web detection.
6353type GoogleCloudVisionV1p2beta1WebDetectionWebLabel struct {
6354	// Label: Label for extra metadata.
6355	Label string `json:"label,omitempty"`
6356
6357	// LanguageCode: The BCP-47 language code for `label`, such as "en-US"
6358	// or "sr-Latn". For more information, see
6359	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
6360	LanguageCode string `json:"languageCode,omitempty"`
6361
6362	// ForceSendFields is a list of field names (e.g. "Label") to
6363	// unconditionally include in API requests. By default, fields with
6364	// empty values are omitted from API requests. However, any non-pointer,
6365	// non-interface field appearing in ForceSendFields will be sent to the
6366	// server regardless of whether the field is empty or not. This may be
6367	// used to include empty fields in Patch requests.
6368	ForceSendFields []string `json:"-"`
6369
6370	// NullFields is a list of field names (e.g. "Label") to include in API
6371	// requests with the JSON null value. By default, fields with empty
6372	// values are omitted from API requests. However, any field with an
6373	// empty value appearing in NullFields will be sent to the server as
6374	// null. It is an error if a field in this list has a non-empty value.
6375	// This may be used to include null fields in Patch requests.
6376	NullFields []string `json:"-"`
6377}
6378
6379func (s *GoogleCloudVisionV1p2beta1WebDetectionWebLabel) MarshalJSON() ([]byte, error) {
6380	type NoMethod GoogleCloudVisionV1p2beta1WebDetectionWebLabel
6381	raw := NoMethod(*s)
6382	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6383}
6384
6385// GoogleCloudVisionV1p2beta1WebDetectionWebPage: Metadata for web
6386// pages.
6387type GoogleCloudVisionV1p2beta1WebDetectionWebPage struct {
6388	// FullMatchingImages: Fully matching images on the page. Can include
6389	// resized copies of the query image.
6390	FullMatchingImages []*GoogleCloudVisionV1p2beta1WebDetectionWebImage `json:"fullMatchingImages,omitempty"`
6391
6392	// PageTitle: Title for the web page, may contain HTML markups.
6393	PageTitle string `json:"pageTitle,omitempty"`
6394
6395	// PartialMatchingImages: Partial matching images on the page. Those
6396	// images are similar enough to share some key-point features. For
6397	// example an original image will likely have partial matching for its
6398	// crops.
6399	PartialMatchingImages []*GoogleCloudVisionV1p2beta1WebDetectionWebImage `json:"partialMatchingImages,omitempty"`
6400
6401	// Score: (Deprecated) Overall relevancy score for the web page.
6402	Score float64 `json:"score,omitempty"`
6403
6404	// Url: The result web page URL.
6405	Url string `json:"url,omitempty"`
6406
6407	// ForceSendFields is a list of field names (e.g. "FullMatchingImages")
6408	// to unconditionally include in API requests. By default, fields with
6409	// empty values are omitted from API requests. However, any non-pointer,
6410	// non-interface field appearing in ForceSendFields will be sent to the
6411	// server regardless of whether the field is empty or not. This may be
6412	// used to include empty fields in Patch requests.
6413	ForceSendFields []string `json:"-"`
6414
6415	// NullFields is a list of field names (e.g. "FullMatchingImages") to
6416	// include in API requests with the JSON null value. By default, fields
6417	// with empty values are omitted from API requests. However, any field
6418	// with an empty value appearing in NullFields will be sent to the
6419	// server as null. It is an error if a field in this list has a
6420	// non-empty value. This may be used to include null fields in Patch
6421	// requests.
6422	NullFields []string `json:"-"`
6423}
6424
6425func (s *GoogleCloudVisionV1p2beta1WebDetectionWebPage) MarshalJSON() ([]byte, error) {
6426	type NoMethod GoogleCloudVisionV1p2beta1WebDetectionWebPage
6427	raw := NoMethod(*s)
6428	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6429}
6430
6431func (s *GoogleCloudVisionV1p2beta1WebDetectionWebPage) UnmarshalJSON(data []byte) error {
6432	type NoMethod GoogleCloudVisionV1p2beta1WebDetectionWebPage
6433	var s1 struct {
6434		Score gensupport.JSONFloat64 `json:"score"`
6435		*NoMethod
6436	}
6437	s1.NoMethod = (*NoMethod)(s)
6438	if err := json.Unmarshal(data, &s1); err != nil {
6439		return err
6440	}
6441	s.Score = float64(s1.Score)
6442	return nil
6443}
6444
6445// GoogleCloudVisionV1p2beta1Word: A word representation.
6446type GoogleCloudVisionV1p2beta1Word struct {
6447	// BoundingBox: The bounding box for the word. The vertices are in the
6448	// order of top-left, top-right, bottom-right, bottom-left. When a
6449	// rotation of the bounding box is detected the rotation is represented
6450	// as around the top-left corner as defined when the text is read in the
6451	// 'natural' orientation. For example: * when the text is horizontal it
6452	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
6453	// around the top-left corner it becomes: 2----3 | | 1----0 and the
6454	// vertex order will still be (0, 1, 2, 3).
6455	BoundingBox *GoogleCloudVisionV1p2beta1BoundingPoly `json:"boundingBox,omitempty"`
6456
6457	// Confidence: Confidence of the OCR results for the word. Range [0, 1].
6458	Confidence float64 `json:"confidence,omitempty"`
6459
6460	// Property: Additional information detected for the word.
6461	Property *GoogleCloudVisionV1p2beta1TextAnnotationTextProperty `json:"property,omitempty"`
6462
6463	// Symbols: List of symbols in the word. The order of the symbols
6464	// follows the natural reading order.
6465	Symbols []*GoogleCloudVisionV1p2beta1Symbol `json:"symbols,omitempty"`
6466
6467	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
6468	// unconditionally include in API requests. By default, fields with
6469	// empty values are omitted from API requests. However, any non-pointer,
6470	// non-interface field appearing in ForceSendFields will be sent to the
6471	// server regardless of whether the field is empty or not. This may be
6472	// used to include empty fields in Patch requests.
6473	ForceSendFields []string `json:"-"`
6474
6475	// NullFields is a list of field names (e.g. "BoundingBox") to include
6476	// in API requests with the JSON null value. By default, fields with
6477	// empty values are omitted from API requests. However, any field with
6478	// an empty value appearing in NullFields will be sent to the server as
6479	// null. It is an error if a field in this list has a non-empty value.
6480	// This may be used to include null fields in Patch requests.
6481	NullFields []string `json:"-"`
6482}
6483
6484func (s *GoogleCloudVisionV1p2beta1Word) MarshalJSON() ([]byte, error) {
6485	type NoMethod GoogleCloudVisionV1p2beta1Word
6486	raw := NoMethod(*s)
6487	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6488}
6489
6490func (s *GoogleCloudVisionV1p2beta1Word) UnmarshalJSON(data []byte) error {
6491	type NoMethod GoogleCloudVisionV1p2beta1Word
6492	var s1 struct {
6493		Confidence gensupport.JSONFloat64 `json:"confidence"`
6494		*NoMethod
6495	}
6496	s1.NoMethod = (*NoMethod)(s)
6497	if err := json.Unmarshal(data, &s1); err != nil {
6498		return err
6499	}
6500	s.Confidence = float64(s1.Confidence)
6501	return nil
6502}
6503
6504// GoogleCloudVisionV1p3beta1AnnotateFileResponse: Response to a single
6505// file annotation request. A file may contain one or more images, which
6506// individually have their own responses.
6507type GoogleCloudVisionV1p3beta1AnnotateFileResponse struct {
6508	// Error: If set, represents the error message for the failed request.
6509	// The `responses` field will not be set in this case.
6510	Error *Status `json:"error,omitempty"`
6511
6512	// InputConfig: Information about the file for which this response is
6513	// generated.
6514	InputConfig *GoogleCloudVisionV1p3beta1InputConfig `json:"inputConfig,omitempty"`
6515
6516	// Responses: Individual responses to images found within the file. This
6517	// field will be empty if the `error` field is set.
6518	Responses []*GoogleCloudVisionV1p3beta1AnnotateImageResponse `json:"responses,omitempty"`
6519
6520	// TotalPages: This field gives the total number of pages in the file.
6521	TotalPages int64 `json:"totalPages,omitempty"`
6522
6523	// ForceSendFields is a list of field names (e.g. "Error") to
6524	// unconditionally include in API requests. By default, fields with
6525	// empty values are omitted from API requests. However, any non-pointer,
6526	// non-interface field appearing in ForceSendFields will be sent to the
6527	// server regardless of whether the field is empty or not. This may be
6528	// used to include empty fields in Patch requests.
6529	ForceSendFields []string `json:"-"`
6530
6531	// NullFields is a list of field names (e.g. "Error") to include in API
6532	// requests with the JSON null value. By default, fields with empty
6533	// values are omitted from API requests. However, any field with an
6534	// empty value appearing in NullFields will be sent to the server as
6535	// null. It is an error if a field in this list has a non-empty value.
6536	// This may be used to include null fields in Patch requests.
6537	NullFields []string `json:"-"`
6538}
6539
6540func (s *GoogleCloudVisionV1p3beta1AnnotateFileResponse) MarshalJSON() ([]byte, error) {
6541	type NoMethod GoogleCloudVisionV1p3beta1AnnotateFileResponse
6542	raw := NoMethod(*s)
6543	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6544}
6545
6546// GoogleCloudVisionV1p3beta1AnnotateImageResponse: Response to an image
6547// annotation request.
6548type GoogleCloudVisionV1p3beta1AnnotateImageResponse struct {
6549	// Context: If present, contextual information is needed to understand
6550	// where this image comes from.
6551	Context *GoogleCloudVisionV1p3beta1ImageAnnotationContext `json:"context,omitempty"`
6552
6553	// CropHintsAnnotation: If present, crop hints have completed
6554	// successfully.
6555	CropHintsAnnotation *GoogleCloudVisionV1p3beta1CropHintsAnnotation `json:"cropHintsAnnotation,omitempty"`
6556
6557	// Error: If set, represents the error message for the operation. Note
6558	// that filled-in image annotations are guaranteed to be correct, even
6559	// when `error` is set.
6560	Error *Status `json:"error,omitempty"`
6561
6562	// FaceAnnotations: If present, face detection has completed
6563	// successfully.
6564	FaceAnnotations []*GoogleCloudVisionV1p3beta1FaceAnnotation `json:"faceAnnotations,omitempty"`
6565
6566	// FullTextAnnotation: If present, text (OCR) detection or document
6567	// (OCR) text detection has completed successfully. This annotation
6568	// provides the structural hierarchy for the OCR detected text.
6569	FullTextAnnotation *GoogleCloudVisionV1p3beta1TextAnnotation `json:"fullTextAnnotation,omitempty"`
6570
6571	// ImagePropertiesAnnotation: If present, image properties were
6572	// extracted successfully.
6573	ImagePropertiesAnnotation *GoogleCloudVisionV1p3beta1ImageProperties `json:"imagePropertiesAnnotation,omitempty"`
6574
6575	// LabelAnnotations: If present, label detection has completed
6576	// successfully.
6577	LabelAnnotations []*GoogleCloudVisionV1p3beta1EntityAnnotation `json:"labelAnnotations,omitempty"`
6578
6579	// LandmarkAnnotations: If present, landmark detection has completed
6580	// successfully.
6581	LandmarkAnnotations []*GoogleCloudVisionV1p3beta1EntityAnnotation `json:"landmarkAnnotations,omitempty"`
6582
6583	// LocalizedObjectAnnotations: If present, localized object detection
6584	// has completed successfully. This will be sorted descending by
6585	// confidence score.
6586	LocalizedObjectAnnotations []*GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation `json:"localizedObjectAnnotations,omitempty"`
6587
6588	// LogoAnnotations: If present, logo detection has completed
6589	// successfully.
6590	LogoAnnotations []*GoogleCloudVisionV1p3beta1EntityAnnotation `json:"logoAnnotations,omitempty"`
6591
6592	// ProductSearchResults: If present, product search has completed
6593	// successfully.
6594	ProductSearchResults *GoogleCloudVisionV1p3beta1ProductSearchResults `json:"productSearchResults,omitempty"`
6595
6596	// SafeSearchAnnotation: If present, safe-search annotation has
6597	// completed successfully.
6598	SafeSearchAnnotation *GoogleCloudVisionV1p3beta1SafeSearchAnnotation `json:"safeSearchAnnotation,omitempty"`
6599
6600	// TextAnnotations: If present, text (OCR) detection has completed
6601	// successfully.
6602	TextAnnotations []*GoogleCloudVisionV1p3beta1EntityAnnotation `json:"textAnnotations,omitempty"`
6603
6604	// WebDetection: If present, web detection has completed successfully.
6605	WebDetection *GoogleCloudVisionV1p3beta1WebDetection `json:"webDetection,omitempty"`
6606
6607	// ForceSendFields is a list of field names (e.g. "Context") to
6608	// unconditionally include in API requests. By default, fields with
6609	// empty values are omitted from API requests. However, any non-pointer,
6610	// non-interface field appearing in ForceSendFields will be sent to the
6611	// server regardless of whether the field is empty or not. This may be
6612	// used to include empty fields in Patch requests.
6613	ForceSendFields []string `json:"-"`
6614
6615	// NullFields is a list of field names (e.g. "Context") to include in
6616	// API requests with the JSON null value. By default, fields with empty
6617	// values are omitted from API requests. However, any field with an
6618	// empty value appearing in NullFields will be sent to the server as
6619	// null. It is an error if a field in this list has a non-empty value.
6620	// This may be used to include null fields in Patch requests.
6621	NullFields []string `json:"-"`
6622}
6623
6624func (s *GoogleCloudVisionV1p3beta1AnnotateImageResponse) MarshalJSON() ([]byte, error) {
6625	type NoMethod GoogleCloudVisionV1p3beta1AnnotateImageResponse
6626	raw := NoMethod(*s)
6627	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6628}
6629
6630// GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse: The response for
6631// a single offline file annotation request.
6632type GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse struct {
6633	// OutputConfig: The output location and metadata from
6634	// AsyncAnnotateFileRequest.
6635	OutputConfig *GoogleCloudVisionV1p3beta1OutputConfig `json:"outputConfig,omitempty"`
6636
6637	// ForceSendFields is a list of field names (e.g. "OutputConfig") to
6638	// unconditionally include in API requests. By default, fields with
6639	// empty values are omitted from API requests. However, any non-pointer,
6640	// non-interface field appearing in ForceSendFields will be sent to the
6641	// server regardless of whether the field is empty or not. This may be
6642	// used to include empty fields in Patch requests.
6643	ForceSendFields []string `json:"-"`
6644
6645	// NullFields is a list of field names (e.g. "OutputConfig") to include
6646	// in API requests with the JSON null value. By default, fields with
6647	// empty values are omitted from API requests. However, any field with
6648	// an empty value appearing in NullFields will be sent to the server as
6649	// null. It is an error if a field in this list has a non-empty value.
6650	// This may be used to include null fields in Patch requests.
6651	NullFields []string `json:"-"`
6652}
6653
6654func (s *GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse) MarshalJSON() ([]byte, error) {
6655	type NoMethod GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse
6656	raw := NoMethod(*s)
6657	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6658}
6659
6660// GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse: Response
6661// to an async batch file annotation request.
6662type GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse struct {
6663	// Responses: The list of file annotation responses, one for each
6664	// request in AsyncBatchAnnotateFilesRequest.
6665	Responses []*GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse `json:"responses,omitempty"`
6666
6667	// ForceSendFields is a list of field names (e.g. "Responses") to
6668	// unconditionally include in API requests. By default, fields with
6669	// empty values are omitted from API requests. However, any non-pointer,
6670	// non-interface field appearing in ForceSendFields will be sent to the
6671	// server regardless of whether the field is empty or not. This may be
6672	// used to include empty fields in Patch requests.
6673	ForceSendFields []string `json:"-"`
6674
6675	// NullFields is a list of field names (e.g. "Responses") to include in
6676	// API requests with the JSON null value. By default, fields with empty
6677	// values are omitted from API requests. However, any field with an
6678	// empty value appearing in NullFields will be sent to the server as
6679	// null. It is an error if a field in this list has a non-empty value.
6680	// This may be used to include null fields in Patch requests.
6681	NullFields []string `json:"-"`
6682}
6683
6684func (s *GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse) MarshalJSON() ([]byte, error) {
6685	type NoMethod GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse
6686	raw := NoMethod(*s)
6687	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6688}
6689
6690// GoogleCloudVisionV1p3beta1BatchOperationMetadata: Metadata for the
6691// batch operations such as the current state. This is included in the
6692// `metadata` field of the `Operation` returned by the `GetOperation`
6693// call of the `google::longrunning::Operations` service.
6694type GoogleCloudVisionV1p3beta1BatchOperationMetadata struct {
6695	// EndTime: The time when the batch request is finished and
6696	// google.longrunning.Operation.done is set to true.
6697	EndTime string `json:"endTime,omitempty"`
6698
6699	// State: The current state of the batch operation.
6700	//
6701	// Possible values:
6702	//   "STATE_UNSPECIFIED" - Invalid.
6703	//   "PROCESSING" - Request is actively being processed.
6704	//   "SUCCESSFUL" - The request is done and at least one item has been
6705	// successfully processed.
6706	//   "FAILED" - The request is done and no item has been successfully
6707	// processed.
6708	//   "CANCELLED" - The request is done after the
6709	// longrunning.Operations.CancelOperation has been called by the user.
6710	// Any records that were processed before the cancel command are output
6711	// as specified in the request.
6712	State string `json:"state,omitempty"`
6713
6714	// SubmitTime: The time when the batch request was submitted to the
6715	// server.
6716	SubmitTime string `json:"submitTime,omitempty"`
6717
6718	// ForceSendFields is a list of field names (e.g. "EndTime") to
6719	// unconditionally include in API requests. By default, fields with
6720	// empty values are omitted from API requests. However, any non-pointer,
6721	// non-interface field appearing in ForceSendFields will be sent to the
6722	// server regardless of whether the field is empty or not. This may be
6723	// used to include empty fields in Patch requests.
6724	ForceSendFields []string `json:"-"`
6725
6726	// NullFields is a list of field names (e.g. "EndTime") to include in
6727	// API requests with the JSON null value. By default, fields with empty
6728	// values are omitted from API requests. However, any field with an
6729	// empty value appearing in NullFields will be sent to the server as
6730	// null. It is an error if a field in this list has a non-empty value.
6731	// This may be used to include null fields in Patch requests.
6732	NullFields []string `json:"-"`
6733}
6734
6735func (s *GoogleCloudVisionV1p3beta1BatchOperationMetadata) MarshalJSON() ([]byte, error) {
6736	type NoMethod GoogleCloudVisionV1p3beta1BatchOperationMetadata
6737	raw := NoMethod(*s)
6738	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6739}
6740
6741// GoogleCloudVisionV1p3beta1Block: Logical element on the page.
6742type GoogleCloudVisionV1p3beta1Block struct {
6743	// BlockType: Detected block type (text, image etc) for this block.
6744	//
6745	// Possible values:
6746	//   "UNKNOWN" - Unknown block type.
6747	//   "TEXT" - Regular text block.
6748	//   "TABLE" - Table block.
6749	//   "PICTURE" - Image block.
6750	//   "RULER" - Horizontal/vertical line box.
6751	//   "BARCODE" - Barcode block.
6752	BlockType string `json:"blockType,omitempty"`
6753
6754	// BoundingBox: The bounding box for the block. The vertices are in the
6755	// order of top-left, top-right, bottom-right, bottom-left. When a
6756	// rotation of the bounding box is detected the rotation is represented
6757	// as around the top-left corner as defined when the text is read in the
6758	// 'natural' orientation. For example: * when the text is horizontal it
6759	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
6760	// around the top-left corner it becomes: 2----3 | | 1----0 and the
6761	// vertex order will still be (0, 1, 2, 3).
6762	BoundingBox *GoogleCloudVisionV1p3beta1BoundingPoly `json:"boundingBox,omitempty"`
6763
6764	// Confidence: Confidence of the OCR results on the block. Range [0, 1].
6765	Confidence float64 `json:"confidence,omitempty"`
6766
6767	// Paragraphs: List of paragraphs in this block (if this blocks is of
6768	// type text).
6769	Paragraphs []*GoogleCloudVisionV1p3beta1Paragraph `json:"paragraphs,omitempty"`
6770
6771	// Property: Additional information detected for the block.
6772	Property *GoogleCloudVisionV1p3beta1TextAnnotationTextProperty `json:"property,omitempty"`
6773
6774	// ForceSendFields is a list of field names (e.g. "BlockType") to
6775	// unconditionally include in API requests. By default, fields with
6776	// empty values are omitted from API requests. However, any non-pointer,
6777	// non-interface field appearing in ForceSendFields will be sent to the
6778	// server regardless of whether the field is empty or not. This may be
6779	// used to include empty fields in Patch requests.
6780	ForceSendFields []string `json:"-"`
6781
6782	// NullFields is a list of field names (e.g. "BlockType") to include in
6783	// API requests with the JSON null value. By default, fields with empty
6784	// values are omitted from API requests. However, any field with an
6785	// empty value appearing in NullFields will be sent to the server as
6786	// null. It is an error if a field in this list has a non-empty value.
6787	// This may be used to include null fields in Patch requests.
6788	NullFields []string `json:"-"`
6789}
6790
6791func (s *GoogleCloudVisionV1p3beta1Block) MarshalJSON() ([]byte, error) {
6792	type NoMethod GoogleCloudVisionV1p3beta1Block
6793	raw := NoMethod(*s)
6794	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6795}
6796
6797func (s *GoogleCloudVisionV1p3beta1Block) UnmarshalJSON(data []byte) error {
6798	type NoMethod GoogleCloudVisionV1p3beta1Block
6799	var s1 struct {
6800		Confidence gensupport.JSONFloat64 `json:"confidence"`
6801		*NoMethod
6802	}
6803	s1.NoMethod = (*NoMethod)(s)
6804	if err := json.Unmarshal(data, &s1); err != nil {
6805		return err
6806	}
6807	s.Confidence = float64(s1.Confidence)
6808	return nil
6809}
6810
6811// GoogleCloudVisionV1p3beta1BoundingPoly: A bounding polygon for the
6812// detected image annotation.
6813type GoogleCloudVisionV1p3beta1BoundingPoly struct {
6814	// NormalizedVertices: The bounding polygon normalized vertices.
6815	NormalizedVertices []*GoogleCloudVisionV1p3beta1NormalizedVertex `json:"normalizedVertices,omitempty"`
6816
6817	// Vertices: The bounding polygon vertices.
6818	Vertices []*GoogleCloudVisionV1p3beta1Vertex `json:"vertices,omitempty"`
6819
6820	// ForceSendFields is a list of field names (e.g. "NormalizedVertices")
6821	// to unconditionally include in API requests. By default, fields with
6822	// empty values are omitted from API requests. However, any non-pointer,
6823	// non-interface field appearing in ForceSendFields will be sent to the
6824	// server regardless of whether the field is empty or not. This may be
6825	// used to include empty fields in Patch requests.
6826	ForceSendFields []string `json:"-"`
6827
6828	// NullFields is a list of field names (e.g. "NormalizedVertices") to
6829	// include in API requests with the JSON null value. By default, fields
6830	// with empty values are omitted from API requests. However, any field
6831	// with an empty value appearing in NullFields will be sent to the
6832	// server as null. It is an error if a field in this list has a
6833	// non-empty value. This may be used to include null fields in Patch
6834	// requests.
6835	NullFields []string `json:"-"`
6836}
6837
6838func (s *GoogleCloudVisionV1p3beta1BoundingPoly) MarshalJSON() ([]byte, error) {
6839	type NoMethod GoogleCloudVisionV1p3beta1BoundingPoly
6840	raw := NoMethod(*s)
6841	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6842}
6843
6844// GoogleCloudVisionV1p3beta1ColorInfo: Color information consists of
6845// RGB channels, score, and the fraction of the image that the color
6846// occupies in the image.
6847type GoogleCloudVisionV1p3beta1ColorInfo struct {
6848	// Color: RGB components of the color.
6849	Color *Color `json:"color,omitempty"`
6850
6851	// PixelFraction: The fraction of pixels the color occupies in the
6852	// image. Value in range [0, 1].
6853	PixelFraction float64 `json:"pixelFraction,omitempty"`
6854
6855	// Score: Image-specific score for this color. Value in range [0, 1].
6856	Score float64 `json:"score,omitempty"`
6857
6858	// ForceSendFields is a list of field names (e.g. "Color") to
6859	// unconditionally include in API requests. By default, fields with
6860	// empty values are omitted from API requests. However, any non-pointer,
6861	// non-interface field appearing in ForceSendFields will be sent to the
6862	// server regardless of whether the field is empty or not. This may be
6863	// used to include empty fields in Patch requests.
6864	ForceSendFields []string `json:"-"`
6865
6866	// NullFields is a list of field names (e.g. "Color") to include in API
6867	// requests with the JSON null value. By default, fields with empty
6868	// values are omitted from API requests. However, any field with an
6869	// empty value appearing in NullFields will be sent to the server as
6870	// null. It is an error if a field in this list has a non-empty value.
6871	// This may be used to include null fields in Patch requests.
6872	NullFields []string `json:"-"`
6873}
6874
6875func (s *GoogleCloudVisionV1p3beta1ColorInfo) MarshalJSON() ([]byte, error) {
6876	type NoMethod GoogleCloudVisionV1p3beta1ColorInfo
6877	raw := NoMethod(*s)
6878	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6879}
6880
6881func (s *GoogleCloudVisionV1p3beta1ColorInfo) UnmarshalJSON(data []byte) error {
6882	type NoMethod GoogleCloudVisionV1p3beta1ColorInfo
6883	var s1 struct {
6884		PixelFraction gensupport.JSONFloat64 `json:"pixelFraction"`
6885		Score         gensupport.JSONFloat64 `json:"score"`
6886		*NoMethod
6887	}
6888	s1.NoMethod = (*NoMethod)(s)
6889	if err := json.Unmarshal(data, &s1); err != nil {
6890		return err
6891	}
6892	s.PixelFraction = float64(s1.PixelFraction)
6893	s.Score = float64(s1.Score)
6894	return nil
6895}
6896
6897// GoogleCloudVisionV1p3beta1CropHint: Single crop hint that is used to
6898// generate a new crop when serving an image.
6899type GoogleCloudVisionV1p3beta1CropHint struct {
6900	// BoundingPoly: The bounding polygon for the crop region. The
6901	// coordinates of the bounding box are in the original image's scale.
6902	BoundingPoly *GoogleCloudVisionV1p3beta1BoundingPoly `json:"boundingPoly,omitempty"`
6903
6904	// Confidence: Confidence of this being a salient region. Range [0, 1].
6905	Confidence float64 `json:"confidence,omitempty"`
6906
6907	// ImportanceFraction: Fraction of importance of this salient region
6908	// with respect to the original image.
6909	ImportanceFraction float64 `json:"importanceFraction,omitempty"`
6910
6911	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
6912	// unconditionally include in API requests. By default, fields with
6913	// empty values are omitted from API requests. However, any non-pointer,
6914	// non-interface field appearing in ForceSendFields will be sent to the
6915	// server regardless of whether the field is empty or not. This may be
6916	// used to include empty fields in Patch requests.
6917	ForceSendFields []string `json:"-"`
6918
6919	// NullFields is a list of field names (e.g. "BoundingPoly") to include
6920	// in API requests with the JSON null value. By default, fields with
6921	// empty values are omitted from API requests. However, any field with
6922	// an empty value appearing in NullFields will be sent to the server as
6923	// null. It is an error if a field in this list has a non-empty value.
6924	// This may be used to include null fields in Patch requests.
6925	NullFields []string `json:"-"`
6926}
6927
6928func (s *GoogleCloudVisionV1p3beta1CropHint) MarshalJSON() ([]byte, error) {
6929	type NoMethod GoogleCloudVisionV1p3beta1CropHint
6930	raw := NoMethod(*s)
6931	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6932}
6933
6934func (s *GoogleCloudVisionV1p3beta1CropHint) UnmarshalJSON(data []byte) error {
6935	type NoMethod GoogleCloudVisionV1p3beta1CropHint
6936	var s1 struct {
6937		Confidence         gensupport.JSONFloat64 `json:"confidence"`
6938		ImportanceFraction gensupport.JSONFloat64 `json:"importanceFraction"`
6939		*NoMethod
6940	}
6941	s1.NoMethod = (*NoMethod)(s)
6942	if err := json.Unmarshal(data, &s1); err != nil {
6943		return err
6944	}
6945	s.Confidence = float64(s1.Confidence)
6946	s.ImportanceFraction = float64(s1.ImportanceFraction)
6947	return nil
6948}
6949
6950// GoogleCloudVisionV1p3beta1CropHintsAnnotation: Set of crop hints that
6951// are used to generate new crops when serving images.
6952type GoogleCloudVisionV1p3beta1CropHintsAnnotation struct {
6953	// CropHints: Crop hint results.
6954	CropHints []*GoogleCloudVisionV1p3beta1CropHint `json:"cropHints,omitempty"`
6955
6956	// ForceSendFields is a list of field names (e.g. "CropHints") to
6957	// unconditionally include in API requests. By default, fields with
6958	// empty values are omitted from API requests. However, any non-pointer,
6959	// non-interface field appearing in ForceSendFields will be sent to the
6960	// server regardless of whether the field is empty or not. This may be
6961	// used to include empty fields in Patch requests.
6962	ForceSendFields []string `json:"-"`
6963
6964	// NullFields is a list of field names (e.g. "CropHints") to include in
6965	// API requests with the JSON null value. By default, fields with empty
6966	// values are omitted from API requests. However, any field with an
6967	// empty value appearing in NullFields will be sent to the server as
6968	// null. It is an error if a field in this list has a non-empty value.
6969	// This may be used to include null fields in Patch requests.
6970	NullFields []string `json:"-"`
6971}
6972
6973func (s *GoogleCloudVisionV1p3beta1CropHintsAnnotation) MarshalJSON() ([]byte, error) {
6974	type NoMethod GoogleCloudVisionV1p3beta1CropHintsAnnotation
6975	raw := NoMethod(*s)
6976	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
6977}
6978
6979// GoogleCloudVisionV1p3beta1DominantColorsAnnotation: Set of dominant
6980// colors and their corresponding scores.
6981type GoogleCloudVisionV1p3beta1DominantColorsAnnotation struct {
6982	// Colors: RGB color values with their score and pixel fraction.
6983	Colors []*GoogleCloudVisionV1p3beta1ColorInfo `json:"colors,omitempty"`
6984
6985	// ForceSendFields is a list of field names (e.g. "Colors") to
6986	// unconditionally include in API requests. By default, fields with
6987	// empty values are omitted from API requests. However, any non-pointer,
6988	// non-interface field appearing in ForceSendFields will be sent to the
6989	// server regardless of whether the field is empty or not. This may be
6990	// used to include empty fields in Patch requests.
6991	ForceSendFields []string `json:"-"`
6992
6993	// NullFields is a list of field names (e.g. "Colors") to include in API
6994	// requests with the JSON null value. By default, fields with empty
6995	// values are omitted from API requests. However, any field with an
6996	// empty value appearing in NullFields will be sent to the server as
6997	// null. It is an error if a field in this list has a non-empty value.
6998	// This may be used to include null fields in Patch requests.
6999	NullFields []string `json:"-"`
7000}
7001
7002func (s *GoogleCloudVisionV1p3beta1DominantColorsAnnotation) MarshalJSON() ([]byte, error) {
7003	type NoMethod GoogleCloudVisionV1p3beta1DominantColorsAnnotation
7004	raw := NoMethod(*s)
7005	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7006}
7007
7008// GoogleCloudVisionV1p3beta1EntityAnnotation: Set of detected entity
7009// features.
7010type GoogleCloudVisionV1p3beta1EntityAnnotation struct {
7011	// BoundingPoly: Image region to which this entity belongs. Not produced
7012	// for `LABEL_DETECTION` features.
7013	BoundingPoly *GoogleCloudVisionV1p3beta1BoundingPoly `json:"boundingPoly,omitempty"`
7014
7015	// Confidence: **Deprecated. Use `score` instead.** The accuracy of the
7016	// entity detection in an image. For example, for an image in which the
7017	// "Eiffel Tower" entity is detected, this field represents the
7018	// confidence that there is a tower in the query image. Range [0, 1].
7019	Confidence float64 `json:"confidence,omitempty"`
7020
7021	// Description: Entity textual description, expressed in its `locale`
7022	// language.
7023	Description string `json:"description,omitempty"`
7024
7025	// Locale: The language code for the locale in which the entity textual
7026	// `description` is expressed.
7027	Locale string `json:"locale,omitempty"`
7028
7029	// Locations: The location information for the detected entity. Multiple
7030	// `LocationInfo` elements can be present because one location may
7031	// indicate the location of the scene in the image, and another location
7032	// may indicate the location of the place where the image was taken.
7033	// Location information is usually present for landmarks.
7034	Locations []*GoogleCloudVisionV1p3beta1LocationInfo `json:"locations,omitempty"`
7035
7036	// Mid: Opaque entity ID. Some IDs may be available in Google Knowledge
7037	// Graph Search API (https://developers.google.com/knowledge-graph/).
7038	Mid string `json:"mid,omitempty"`
7039
7040	// Properties: Some entities may have optional user-supplied `Property`
7041	// (name/value) fields, such a score or string that qualifies the
7042	// entity.
7043	Properties []*GoogleCloudVisionV1p3beta1Property `json:"properties,omitempty"`
7044
7045	// Score: Overall score of the result. Range [0, 1].
7046	Score float64 `json:"score,omitempty"`
7047
7048	// Topicality: The relevancy of the ICA (Image Content Annotation) label
7049	// to the image. For example, the relevancy of "tower" is likely higher
7050	// to an image containing the detected "Eiffel Tower" than to an image
7051	// containing a detected distant towering building, even though the
7052	// confidence that there is a tower in each image may be the same. Range
7053	// [0, 1].
7054	Topicality float64 `json:"topicality,omitempty"`
7055
7056	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
7057	// unconditionally include in API requests. By default, fields with
7058	// empty values are omitted from API requests. However, any non-pointer,
7059	// non-interface field appearing in ForceSendFields will be sent to the
7060	// server regardless of whether the field is empty or not. This may be
7061	// used to include empty fields in Patch requests.
7062	ForceSendFields []string `json:"-"`
7063
7064	// NullFields is a list of field names (e.g. "BoundingPoly") to include
7065	// in API requests with the JSON null value. By default, fields with
7066	// empty values are omitted from API requests. However, any field with
7067	// an empty value appearing in NullFields will be sent to the server as
7068	// null. It is an error if a field in this list has a non-empty value.
7069	// This may be used to include null fields in Patch requests.
7070	NullFields []string `json:"-"`
7071}
7072
7073func (s *GoogleCloudVisionV1p3beta1EntityAnnotation) MarshalJSON() ([]byte, error) {
7074	type NoMethod GoogleCloudVisionV1p3beta1EntityAnnotation
7075	raw := NoMethod(*s)
7076	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7077}
7078
7079func (s *GoogleCloudVisionV1p3beta1EntityAnnotation) UnmarshalJSON(data []byte) error {
7080	type NoMethod GoogleCloudVisionV1p3beta1EntityAnnotation
7081	var s1 struct {
7082		Confidence gensupport.JSONFloat64 `json:"confidence"`
7083		Score      gensupport.JSONFloat64 `json:"score"`
7084		Topicality gensupport.JSONFloat64 `json:"topicality"`
7085		*NoMethod
7086	}
7087	s1.NoMethod = (*NoMethod)(s)
7088	if err := json.Unmarshal(data, &s1); err != nil {
7089		return err
7090	}
7091	s.Confidence = float64(s1.Confidence)
7092	s.Score = float64(s1.Score)
7093	s.Topicality = float64(s1.Topicality)
7094	return nil
7095}
7096
7097// GoogleCloudVisionV1p3beta1FaceAnnotation: A face annotation object
7098// contains the results of face detection.
7099type GoogleCloudVisionV1p3beta1FaceAnnotation struct {
7100	// AngerLikelihood: Anger likelihood.
7101	//
7102	// Possible values:
7103	//   "UNKNOWN" - Unknown likelihood.
7104	//   "VERY_UNLIKELY" - It is very unlikely.
7105	//   "UNLIKELY" - It is unlikely.
7106	//   "POSSIBLE" - It is possible.
7107	//   "LIKELY" - It is likely.
7108	//   "VERY_LIKELY" - It is very likely.
7109	AngerLikelihood string `json:"angerLikelihood,omitempty"`
7110
7111	// BlurredLikelihood: Blurred likelihood.
7112	//
7113	// Possible values:
7114	//   "UNKNOWN" - Unknown likelihood.
7115	//   "VERY_UNLIKELY" - It is very unlikely.
7116	//   "UNLIKELY" - It is unlikely.
7117	//   "POSSIBLE" - It is possible.
7118	//   "LIKELY" - It is likely.
7119	//   "VERY_LIKELY" - It is very likely.
7120	BlurredLikelihood string `json:"blurredLikelihood,omitempty"`
7121
7122	// BoundingPoly: The bounding polygon around the face. The coordinates
7123	// of the bounding box are in the original image's scale. The bounding
7124	// box is computed to "frame" the face in accordance with human
7125	// expectations. It is based on the landmarker results. Note that one or
7126	// more x and/or y coordinates may not be generated in the
7127	// `BoundingPoly` (the polygon will be unbounded) if only a partial face
7128	// appears in the image to be annotated.
7129	BoundingPoly *GoogleCloudVisionV1p3beta1BoundingPoly `json:"boundingPoly,omitempty"`
7130
7131	// DetectionConfidence: Detection confidence. Range [0, 1].
7132	DetectionConfidence float64 `json:"detectionConfidence,omitempty"`
7133
7134	// FdBoundingPoly: The `fd_bounding_poly` bounding polygon is tighter
7135	// than the `boundingPoly`, and encloses only the skin part of the face.
7136	// Typically, it is used to eliminate the face from any image analysis
7137	// that detects the "amount of skin" visible in an image. It is not
7138	// based on the landmarker results, only on the initial face detection,
7139	// hence the fd (face detection) prefix.
7140	FdBoundingPoly *GoogleCloudVisionV1p3beta1BoundingPoly `json:"fdBoundingPoly,omitempty"`
7141
7142	// HeadwearLikelihood: Headwear likelihood.
7143	//
7144	// Possible values:
7145	//   "UNKNOWN" - Unknown likelihood.
7146	//   "VERY_UNLIKELY" - It is very unlikely.
7147	//   "UNLIKELY" - It is unlikely.
7148	//   "POSSIBLE" - It is possible.
7149	//   "LIKELY" - It is likely.
7150	//   "VERY_LIKELY" - It is very likely.
7151	HeadwearLikelihood string `json:"headwearLikelihood,omitempty"`
7152
7153	// JoyLikelihood: Joy likelihood.
7154	//
7155	// Possible values:
7156	//   "UNKNOWN" - Unknown likelihood.
7157	//   "VERY_UNLIKELY" - It is very unlikely.
7158	//   "UNLIKELY" - It is unlikely.
7159	//   "POSSIBLE" - It is possible.
7160	//   "LIKELY" - It is likely.
7161	//   "VERY_LIKELY" - It is very likely.
7162	JoyLikelihood string `json:"joyLikelihood,omitempty"`
7163
7164	// LandmarkingConfidence: Face landmarking confidence. Range [0, 1].
7165	LandmarkingConfidence float64 `json:"landmarkingConfidence,omitempty"`
7166
7167	// Landmarks: Detected face landmarks.
7168	Landmarks []*GoogleCloudVisionV1p3beta1FaceAnnotationLandmark `json:"landmarks,omitempty"`
7169
7170	// PanAngle: Yaw angle, which indicates the leftward/rightward angle
7171	// that the face is pointing relative to the vertical plane
7172	// perpendicular to the image. Range [-180,180].
7173	PanAngle float64 `json:"panAngle,omitempty"`
7174
7175	// RollAngle: Roll angle, which indicates the amount of
7176	// clockwise/anti-clockwise rotation of the face relative to the image
7177	// vertical about the axis perpendicular to the face. Range [-180,180].
7178	RollAngle float64 `json:"rollAngle,omitempty"`
7179
7180	// SorrowLikelihood: Sorrow likelihood.
7181	//
7182	// Possible values:
7183	//   "UNKNOWN" - Unknown likelihood.
7184	//   "VERY_UNLIKELY" - It is very unlikely.
7185	//   "UNLIKELY" - It is unlikely.
7186	//   "POSSIBLE" - It is possible.
7187	//   "LIKELY" - It is likely.
7188	//   "VERY_LIKELY" - It is very likely.
7189	SorrowLikelihood string `json:"sorrowLikelihood,omitempty"`
7190
7191	// SurpriseLikelihood: Surprise likelihood.
7192	//
7193	// Possible values:
7194	//   "UNKNOWN" - Unknown likelihood.
7195	//   "VERY_UNLIKELY" - It is very unlikely.
7196	//   "UNLIKELY" - It is unlikely.
7197	//   "POSSIBLE" - It is possible.
7198	//   "LIKELY" - It is likely.
7199	//   "VERY_LIKELY" - It is very likely.
7200	SurpriseLikelihood string `json:"surpriseLikelihood,omitempty"`
7201
7202	// TiltAngle: Pitch angle, which indicates the upwards/downwards angle
7203	// that the face is pointing relative to the image's horizontal plane.
7204	// Range [-180,180].
7205	TiltAngle float64 `json:"tiltAngle,omitempty"`
7206
7207	// UnderExposedLikelihood: Under-exposed likelihood.
7208	//
7209	// Possible values:
7210	//   "UNKNOWN" - Unknown likelihood.
7211	//   "VERY_UNLIKELY" - It is very unlikely.
7212	//   "UNLIKELY" - It is unlikely.
7213	//   "POSSIBLE" - It is possible.
7214	//   "LIKELY" - It is likely.
7215	//   "VERY_LIKELY" - It is very likely.
7216	UnderExposedLikelihood string `json:"underExposedLikelihood,omitempty"`
7217
7218	// ForceSendFields is a list of field names (e.g. "AngerLikelihood") to
7219	// unconditionally include in API requests. By default, fields with
7220	// empty values are omitted from API requests. However, any non-pointer,
7221	// non-interface field appearing in ForceSendFields will be sent to the
7222	// server regardless of whether the field is empty or not. This may be
7223	// used to include empty fields in Patch requests.
7224	ForceSendFields []string `json:"-"`
7225
7226	// NullFields is a list of field names (e.g. "AngerLikelihood") to
7227	// include in API requests with the JSON null value. By default, fields
7228	// with empty values are omitted from API requests. However, any field
7229	// with an empty value appearing in NullFields will be sent to the
7230	// server as null. It is an error if a field in this list has a
7231	// non-empty value. This may be used to include null fields in Patch
7232	// requests.
7233	NullFields []string `json:"-"`
7234}
7235
7236func (s *GoogleCloudVisionV1p3beta1FaceAnnotation) MarshalJSON() ([]byte, error) {
7237	type NoMethod GoogleCloudVisionV1p3beta1FaceAnnotation
7238	raw := NoMethod(*s)
7239	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7240}
7241
7242func (s *GoogleCloudVisionV1p3beta1FaceAnnotation) UnmarshalJSON(data []byte) error {
7243	type NoMethod GoogleCloudVisionV1p3beta1FaceAnnotation
7244	var s1 struct {
7245		DetectionConfidence   gensupport.JSONFloat64 `json:"detectionConfidence"`
7246		LandmarkingConfidence gensupport.JSONFloat64 `json:"landmarkingConfidence"`
7247		PanAngle              gensupport.JSONFloat64 `json:"panAngle"`
7248		RollAngle             gensupport.JSONFloat64 `json:"rollAngle"`
7249		TiltAngle             gensupport.JSONFloat64 `json:"tiltAngle"`
7250		*NoMethod
7251	}
7252	s1.NoMethod = (*NoMethod)(s)
7253	if err := json.Unmarshal(data, &s1); err != nil {
7254		return err
7255	}
7256	s.DetectionConfidence = float64(s1.DetectionConfidence)
7257	s.LandmarkingConfidence = float64(s1.LandmarkingConfidence)
7258	s.PanAngle = float64(s1.PanAngle)
7259	s.RollAngle = float64(s1.RollAngle)
7260	s.TiltAngle = float64(s1.TiltAngle)
7261	return nil
7262}
7263
7264// GoogleCloudVisionV1p3beta1FaceAnnotationLandmark: A face-specific
7265// landmark (for example, a face feature).
7266type GoogleCloudVisionV1p3beta1FaceAnnotationLandmark struct {
7267	// Position: Face landmark position.
7268	Position *GoogleCloudVisionV1p3beta1Position `json:"position,omitempty"`
7269
7270	// Type: Face landmark type.
7271	//
7272	// Possible values:
7273	//   "UNKNOWN_LANDMARK" - Unknown face landmark detected. Should not be
7274	// filled.
7275	//   "LEFT_EYE" - Left eye.
7276	//   "RIGHT_EYE" - Right eye.
7277	//   "LEFT_OF_LEFT_EYEBROW" - Left of left eyebrow.
7278	//   "RIGHT_OF_LEFT_EYEBROW" - Right of left eyebrow.
7279	//   "LEFT_OF_RIGHT_EYEBROW" - Left of right eyebrow.
7280	//   "RIGHT_OF_RIGHT_EYEBROW" - Right of right eyebrow.
7281	//   "MIDPOINT_BETWEEN_EYES" - Midpoint between eyes.
7282	//   "NOSE_TIP" - Nose tip.
7283	//   "UPPER_LIP" - Upper lip.
7284	//   "LOWER_LIP" - Lower lip.
7285	//   "MOUTH_LEFT" - Mouth left.
7286	//   "MOUTH_RIGHT" - Mouth right.
7287	//   "MOUTH_CENTER" - Mouth center.
7288	//   "NOSE_BOTTOM_RIGHT" - Nose, bottom right.
7289	//   "NOSE_BOTTOM_LEFT" - Nose, bottom left.
7290	//   "NOSE_BOTTOM_CENTER" - Nose, bottom center.
7291	//   "LEFT_EYE_TOP_BOUNDARY" - Left eye, top boundary.
7292	//   "LEFT_EYE_RIGHT_CORNER" - Left eye, right corner.
7293	//   "LEFT_EYE_BOTTOM_BOUNDARY" - Left eye, bottom boundary.
7294	//   "LEFT_EYE_LEFT_CORNER" - Left eye, left corner.
7295	//   "RIGHT_EYE_TOP_BOUNDARY" - Right eye, top boundary.
7296	//   "RIGHT_EYE_RIGHT_CORNER" - Right eye, right corner.
7297	//   "RIGHT_EYE_BOTTOM_BOUNDARY" - Right eye, bottom boundary.
7298	//   "RIGHT_EYE_LEFT_CORNER" - Right eye, left corner.
7299	//   "LEFT_EYEBROW_UPPER_MIDPOINT" - Left eyebrow, upper midpoint.
7300	//   "RIGHT_EYEBROW_UPPER_MIDPOINT" - Right eyebrow, upper midpoint.
7301	//   "LEFT_EAR_TRAGION" - Left ear tragion.
7302	//   "RIGHT_EAR_TRAGION" - Right ear tragion.
7303	//   "LEFT_EYE_PUPIL" - Left eye pupil.
7304	//   "RIGHT_EYE_PUPIL" - Right eye pupil.
7305	//   "FOREHEAD_GLABELLA" - Forehead glabella.
7306	//   "CHIN_GNATHION" - Chin gnathion.
7307	//   "CHIN_LEFT_GONION" - Chin left gonion.
7308	//   "CHIN_RIGHT_GONION" - Chin right gonion.
7309	//   "LEFT_CHEEK_CENTER" - Left cheek center.
7310	//   "RIGHT_CHEEK_CENTER" - Right cheek center.
7311	Type string `json:"type,omitempty"`
7312
7313	// ForceSendFields is a list of field names (e.g. "Position") to
7314	// unconditionally include in API requests. By default, fields with
7315	// empty values are omitted from API requests. However, any non-pointer,
7316	// non-interface field appearing in ForceSendFields will be sent to the
7317	// server regardless of whether the field is empty or not. This may be
7318	// used to include empty fields in Patch requests.
7319	ForceSendFields []string `json:"-"`
7320
7321	// NullFields is a list of field names (e.g. "Position") to include in
7322	// API requests with the JSON null value. By default, fields with empty
7323	// values are omitted from API requests. However, any field with an
7324	// empty value appearing in NullFields will be sent to the server as
7325	// null. It is an error if a field in this list has a non-empty value.
7326	// This may be used to include null fields in Patch requests.
7327	NullFields []string `json:"-"`
7328}
7329
7330func (s *GoogleCloudVisionV1p3beta1FaceAnnotationLandmark) MarshalJSON() ([]byte, error) {
7331	type NoMethod GoogleCloudVisionV1p3beta1FaceAnnotationLandmark
7332	raw := NoMethod(*s)
7333	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7334}
7335
7336// GoogleCloudVisionV1p3beta1GcsDestination: The Google Cloud Storage
7337// location where the output will be written to.
7338type GoogleCloudVisionV1p3beta1GcsDestination struct {
7339	// Uri: Google Cloud Storage URI prefix where the results will be
7340	// stored. Results will be in JSON format and preceded by its
7341	// corresponding input URI prefix. This field can either represent a gcs
7342	// file prefix or gcs directory. In either case, the uri should be
7343	// unique because in order to get all of the output files, you will need
7344	// to do a wildcard gcs search on the uri prefix you provide. Examples:
7345	// * File Prefix: gs://bucket-name/here/filenameprefix The output files
7346	// will be created in gs://bucket-name/here/ and the names of the output
7347	// files will begin with "filenameprefix". * Directory Prefix:
7348	// gs://bucket-name/some/location/ The output files will be created in
7349	// gs://bucket-name/some/location/ and the names of the output files
7350	// could be anything because there was no filename prefix specified. If
7351	// multiple outputs, each response is still AnnotateFileResponse, each
7352	// of which contains some subset of the full list of
7353	// AnnotateImageResponse. Multiple outputs can happen if, for example,
7354	// the output JSON is too large and overflows into multiple sharded
7355	// files.
7356	Uri string `json:"uri,omitempty"`
7357
7358	// ForceSendFields is a list of field names (e.g. "Uri") to
7359	// unconditionally include in API requests. By default, fields with
7360	// empty values are omitted from API requests. However, any non-pointer,
7361	// non-interface field appearing in ForceSendFields will be sent to the
7362	// server regardless of whether the field is empty or not. This may be
7363	// used to include empty fields in Patch requests.
7364	ForceSendFields []string `json:"-"`
7365
7366	// NullFields is a list of field names (e.g. "Uri") to include in API
7367	// requests with the JSON null value. By default, fields with empty
7368	// values are omitted from API requests. However, any field with an
7369	// empty value appearing in NullFields will be sent to the server as
7370	// null. It is an error if a field in this list has a non-empty value.
7371	// This may be used to include null fields in Patch requests.
7372	NullFields []string `json:"-"`
7373}
7374
7375func (s *GoogleCloudVisionV1p3beta1GcsDestination) MarshalJSON() ([]byte, error) {
7376	type NoMethod GoogleCloudVisionV1p3beta1GcsDestination
7377	raw := NoMethod(*s)
7378	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7379}
7380
7381// GoogleCloudVisionV1p3beta1GcsSource: The Google Cloud Storage
7382// location where the input will be read from.
7383type GoogleCloudVisionV1p3beta1GcsSource struct {
7384	// Uri: Google Cloud Storage URI for the input file. This must only be a
7385	// Google Cloud Storage object. Wildcards are not currently supported.
7386	Uri string `json:"uri,omitempty"`
7387
7388	// ForceSendFields is a list of field names (e.g. "Uri") to
7389	// unconditionally include in API requests. By default, fields with
7390	// empty values are omitted from API requests. However, any non-pointer,
7391	// non-interface field appearing in ForceSendFields will be sent to the
7392	// server regardless of whether the field is empty or not. This may be
7393	// used to include empty fields in Patch requests.
7394	ForceSendFields []string `json:"-"`
7395
7396	// NullFields is a list of field names (e.g. "Uri") to include in API
7397	// requests with the JSON null value. By default, fields with empty
7398	// values are omitted from API requests. However, any field with an
7399	// empty value appearing in NullFields will be sent to the server as
7400	// null. It is an error if a field in this list has a non-empty value.
7401	// This may be used to include null fields in Patch requests.
7402	NullFields []string `json:"-"`
7403}
7404
7405func (s *GoogleCloudVisionV1p3beta1GcsSource) MarshalJSON() ([]byte, error) {
7406	type NoMethod GoogleCloudVisionV1p3beta1GcsSource
7407	raw := NoMethod(*s)
7408	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7409}
7410
7411// GoogleCloudVisionV1p3beta1ImageAnnotationContext: If an image was
7412// produced from a file (e.g. a PDF), this message gives information
7413// about the source of that image.
7414type GoogleCloudVisionV1p3beta1ImageAnnotationContext struct {
7415	// PageNumber: If the file was a PDF or TIFF, this field gives the page
7416	// number within the file used to produce the image.
7417	PageNumber int64 `json:"pageNumber,omitempty"`
7418
7419	// Uri: The URI of the file used to produce the image.
7420	Uri string `json:"uri,omitempty"`
7421
7422	// ForceSendFields is a list of field names (e.g. "PageNumber") to
7423	// unconditionally include in API requests. By default, fields with
7424	// empty values are omitted from API requests. However, any non-pointer,
7425	// non-interface field appearing in ForceSendFields will be sent to the
7426	// server regardless of whether the field is empty or not. This may be
7427	// used to include empty fields in Patch requests.
7428	ForceSendFields []string `json:"-"`
7429
7430	// NullFields is a list of field names (e.g. "PageNumber") to include in
7431	// API requests with the JSON null value. By default, fields with empty
7432	// values are omitted from API requests. However, any field with an
7433	// empty value appearing in NullFields will be sent to the server as
7434	// null. It is an error if a field in this list has a non-empty value.
7435	// This may be used to include null fields in Patch requests.
7436	NullFields []string `json:"-"`
7437}
7438
7439func (s *GoogleCloudVisionV1p3beta1ImageAnnotationContext) MarshalJSON() ([]byte, error) {
7440	type NoMethod GoogleCloudVisionV1p3beta1ImageAnnotationContext
7441	raw := NoMethod(*s)
7442	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7443}
7444
7445// GoogleCloudVisionV1p3beta1ImageProperties: Stores image properties,
7446// such as dominant colors.
7447type GoogleCloudVisionV1p3beta1ImageProperties struct {
7448	// DominantColors: If present, dominant colors completed successfully.
7449	DominantColors *GoogleCloudVisionV1p3beta1DominantColorsAnnotation `json:"dominantColors,omitempty"`
7450
7451	// ForceSendFields is a list of field names (e.g. "DominantColors") to
7452	// unconditionally include in API requests. By default, fields with
7453	// empty values are omitted from API requests. However, any non-pointer,
7454	// non-interface field appearing in ForceSendFields will be sent to the
7455	// server regardless of whether the field is empty or not. This may be
7456	// used to include empty fields in Patch requests.
7457	ForceSendFields []string `json:"-"`
7458
7459	// NullFields is a list of field names (e.g. "DominantColors") to
7460	// include in API requests with the JSON null value. By default, fields
7461	// with empty values are omitted from API requests. However, any field
7462	// with an empty value appearing in NullFields will be sent to the
7463	// server as null. It is an error if a field in this list has a
7464	// non-empty value. This may be used to include null fields in Patch
7465	// requests.
7466	NullFields []string `json:"-"`
7467}
7468
7469func (s *GoogleCloudVisionV1p3beta1ImageProperties) MarshalJSON() ([]byte, error) {
7470	type NoMethod GoogleCloudVisionV1p3beta1ImageProperties
7471	raw := NoMethod(*s)
7472	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7473}
7474
7475// GoogleCloudVisionV1p3beta1ImportProductSetsResponse: Response message
7476// for the `ImportProductSets` method. This message is returned by the
7477// google.longrunning.Operations.GetOperation method in the returned
7478// google.longrunning.Operation.response field.
7479type GoogleCloudVisionV1p3beta1ImportProductSetsResponse struct {
7480	// ReferenceImages: The list of reference_images that are imported
7481	// successfully.
7482	ReferenceImages []*GoogleCloudVisionV1p3beta1ReferenceImage `json:"referenceImages,omitempty"`
7483
7484	// Statuses: The rpc status for each ImportProductSet request, including
7485	// both successes and errors. The number of statuses here matches the
7486	// number of lines in the csv file, and statuses[i] stores the success
7487	// or failure status of processing the i-th line of the csv, starting
7488	// from line 0.
7489	Statuses []*Status `json:"statuses,omitempty"`
7490
7491	// ForceSendFields is a list of field names (e.g. "ReferenceImages") to
7492	// unconditionally include in API requests. By default, fields with
7493	// empty values are omitted from API requests. However, any non-pointer,
7494	// non-interface field appearing in ForceSendFields will be sent to the
7495	// server regardless of whether the field is empty or not. This may be
7496	// used to include empty fields in Patch requests.
7497	ForceSendFields []string `json:"-"`
7498
7499	// NullFields is a list of field names (e.g. "ReferenceImages") to
7500	// include in API requests with the JSON null value. By default, fields
7501	// with empty values are omitted from API requests. However, any field
7502	// with an empty value appearing in NullFields will be sent to the
7503	// server as null. It is an error if a field in this list has a
7504	// non-empty value. This may be used to include null fields in Patch
7505	// requests.
7506	NullFields []string `json:"-"`
7507}
7508
7509func (s *GoogleCloudVisionV1p3beta1ImportProductSetsResponse) MarshalJSON() ([]byte, error) {
7510	type NoMethod GoogleCloudVisionV1p3beta1ImportProductSetsResponse
7511	raw := NoMethod(*s)
7512	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7513}
7514
7515// GoogleCloudVisionV1p3beta1InputConfig: The desired input location and
7516// metadata.
7517type GoogleCloudVisionV1p3beta1InputConfig struct {
7518	// Content: File content, represented as a stream of bytes. Note: As
7519	// with all `bytes` fields, protobuffers use a pure binary
7520	// representation, whereas JSON representations use base64. Currently,
7521	// this field only works for BatchAnnotateFiles requests. It does not
7522	// work for AsyncBatchAnnotateFiles requests.
7523	Content string `json:"content,omitempty"`
7524
7525	// GcsSource: The Google Cloud Storage location to read the input from.
7526	GcsSource *GoogleCloudVisionV1p3beta1GcsSource `json:"gcsSource,omitempty"`
7527
7528	// MimeType: The type of the file. Currently only "application/pdf",
7529	// "image/tiff" and "image/gif" are supported. Wildcards are not
7530	// supported.
7531	MimeType string `json:"mimeType,omitempty"`
7532
7533	// ForceSendFields is a list of field names (e.g. "Content") to
7534	// unconditionally include in API requests. By default, fields with
7535	// empty values are omitted from API requests. However, any non-pointer,
7536	// non-interface field appearing in ForceSendFields will be sent to the
7537	// server regardless of whether the field is empty or not. This may be
7538	// used to include empty fields in Patch requests.
7539	ForceSendFields []string `json:"-"`
7540
7541	// NullFields is a list of field names (e.g. "Content") to include in
7542	// API requests with the JSON null value. By default, fields with empty
7543	// values are omitted from API requests. However, any field with an
7544	// empty value appearing in NullFields will be sent to the server as
7545	// null. It is an error if a field in this list has a non-empty value.
7546	// This may be used to include null fields in Patch requests.
7547	NullFields []string `json:"-"`
7548}
7549
7550func (s *GoogleCloudVisionV1p3beta1InputConfig) MarshalJSON() ([]byte, error) {
7551	type NoMethod GoogleCloudVisionV1p3beta1InputConfig
7552	raw := NoMethod(*s)
7553	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7554}
7555
7556// GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation: Set of detected
7557// objects with bounding boxes.
7558type GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation struct {
7559	// BoundingPoly: Image region to which this object belongs. This must be
7560	// populated.
7561	BoundingPoly *GoogleCloudVisionV1p3beta1BoundingPoly `json:"boundingPoly,omitempty"`
7562
7563	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
7564	// For more information, see
7565	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
7566	LanguageCode string `json:"languageCode,omitempty"`
7567
7568	// Mid: Object ID that should align with EntityAnnotation mid.
7569	Mid string `json:"mid,omitempty"`
7570
7571	// Name: Object name, expressed in its `language_code` language.
7572	Name string `json:"name,omitempty"`
7573
7574	// Score: Score of the result. Range [0, 1].
7575	Score float64 `json:"score,omitempty"`
7576
7577	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
7578	// unconditionally include in API requests. By default, fields with
7579	// empty values are omitted from API requests. However, any non-pointer,
7580	// non-interface field appearing in ForceSendFields will be sent to the
7581	// server regardless of whether the field is empty or not. This may be
7582	// used to include empty fields in Patch requests.
7583	ForceSendFields []string `json:"-"`
7584
7585	// NullFields is a list of field names (e.g. "BoundingPoly") to include
7586	// in API requests with the JSON null value. By default, fields with
7587	// empty values are omitted from API requests. However, any field with
7588	// an empty value appearing in NullFields will be sent to the server as
7589	// null. It is an error if a field in this list has a non-empty value.
7590	// This may be used to include null fields in Patch requests.
7591	NullFields []string `json:"-"`
7592}
7593
7594func (s *GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation) MarshalJSON() ([]byte, error) {
7595	type NoMethod GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation
7596	raw := NoMethod(*s)
7597	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7598}
7599
7600func (s *GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation) UnmarshalJSON(data []byte) error {
7601	type NoMethod GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation
7602	var s1 struct {
7603		Score gensupport.JSONFloat64 `json:"score"`
7604		*NoMethod
7605	}
7606	s1.NoMethod = (*NoMethod)(s)
7607	if err := json.Unmarshal(data, &s1); err != nil {
7608		return err
7609	}
7610	s.Score = float64(s1.Score)
7611	return nil
7612}
7613
7614// GoogleCloudVisionV1p3beta1LocationInfo: Detected entity location
7615// information.
7616type GoogleCloudVisionV1p3beta1LocationInfo struct {
7617	// LatLng: lat/long location coordinates.
7618	LatLng *LatLng `json:"latLng,omitempty"`
7619
7620	// ForceSendFields is a list of field names (e.g. "LatLng") to
7621	// unconditionally include in API requests. By default, fields with
7622	// empty values are omitted from API requests. However, any non-pointer,
7623	// non-interface field appearing in ForceSendFields will be sent to the
7624	// server regardless of whether the field is empty or not. This may be
7625	// used to include empty fields in Patch requests.
7626	ForceSendFields []string `json:"-"`
7627
7628	// NullFields is a list of field names (e.g. "LatLng") to include in API
7629	// requests with the JSON null value. By default, fields with empty
7630	// values are omitted from API requests. However, any field with an
7631	// empty value appearing in NullFields will be sent to the server as
7632	// null. It is an error if a field in this list has a non-empty value.
7633	// This may be used to include null fields in Patch requests.
7634	NullFields []string `json:"-"`
7635}
7636
7637func (s *GoogleCloudVisionV1p3beta1LocationInfo) MarshalJSON() ([]byte, error) {
7638	type NoMethod GoogleCloudVisionV1p3beta1LocationInfo
7639	raw := NoMethod(*s)
7640	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7641}
7642
7643// GoogleCloudVisionV1p3beta1NormalizedVertex: A vertex represents a 2D
7644// point in the image. NOTE: the normalized vertex coordinates are
7645// relative to the original image and range from 0 to 1.
7646type GoogleCloudVisionV1p3beta1NormalizedVertex struct {
7647	// X: X coordinate.
7648	X float64 `json:"x,omitempty"`
7649
7650	// Y: Y coordinate.
7651	Y float64 `json:"y,omitempty"`
7652
7653	// ForceSendFields is a list of field names (e.g. "X") to
7654	// unconditionally include in API requests. By default, fields with
7655	// empty values are omitted from API requests. However, any non-pointer,
7656	// non-interface field appearing in ForceSendFields will be sent to the
7657	// server regardless of whether the field is empty or not. This may be
7658	// used to include empty fields in Patch requests.
7659	ForceSendFields []string `json:"-"`
7660
7661	// NullFields is a list of field names (e.g. "X") to include in API
7662	// requests with the JSON null value. By default, fields with empty
7663	// values are omitted from API requests. However, any field with an
7664	// empty value appearing in NullFields will be sent to the server as
7665	// null. It is an error if a field in this list has a non-empty value.
7666	// This may be used to include null fields in Patch requests.
7667	NullFields []string `json:"-"`
7668}
7669
7670func (s *GoogleCloudVisionV1p3beta1NormalizedVertex) MarshalJSON() ([]byte, error) {
7671	type NoMethod GoogleCloudVisionV1p3beta1NormalizedVertex
7672	raw := NoMethod(*s)
7673	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7674}
7675
7676func (s *GoogleCloudVisionV1p3beta1NormalizedVertex) UnmarshalJSON(data []byte) error {
7677	type NoMethod GoogleCloudVisionV1p3beta1NormalizedVertex
7678	var s1 struct {
7679		X gensupport.JSONFloat64 `json:"x"`
7680		Y gensupport.JSONFloat64 `json:"y"`
7681		*NoMethod
7682	}
7683	s1.NoMethod = (*NoMethod)(s)
7684	if err := json.Unmarshal(data, &s1); err != nil {
7685		return err
7686	}
7687	s.X = float64(s1.X)
7688	s.Y = float64(s1.Y)
7689	return nil
7690}
7691
7692// GoogleCloudVisionV1p3beta1OperationMetadata: Contains metadata for
7693// the BatchAnnotateImages operation.
7694type GoogleCloudVisionV1p3beta1OperationMetadata struct {
7695	// CreateTime: The time when the batch request was received.
7696	CreateTime string `json:"createTime,omitempty"`
7697
7698	// State: Current state of the batch operation.
7699	//
7700	// Possible values:
7701	//   "STATE_UNSPECIFIED" - Invalid.
7702	//   "CREATED" - Request is received.
7703	//   "RUNNING" - Request is actively being processed.
7704	//   "DONE" - The batch processing is done.
7705	//   "CANCELLED" - The batch processing was cancelled.
7706	State string `json:"state,omitempty"`
7707
7708	// UpdateTime: The time when the operation result was last updated.
7709	UpdateTime string `json:"updateTime,omitempty"`
7710
7711	// ForceSendFields is a list of field names (e.g. "CreateTime") to
7712	// unconditionally include in API requests. By default, fields with
7713	// empty values are omitted from API requests. However, any non-pointer,
7714	// non-interface field appearing in ForceSendFields will be sent to the
7715	// server regardless of whether the field is empty or not. This may be
7716	// used to include empty fields in Patch requests.
7717	ForceSendFields []string `json:"-"`
7718
7719	// NullFields is a list of field names (e.g. "CreateTime") to include in
7720	// API requests with the JSON null value. By default, fields with empty
7721	// values are omitted from API requests. However, any field with an
7722	// empty value appearing in NullFields will be sent to the server as
7723	// null. It is an error if a field in this list has a non-empty value.
7724	// This may be used to include null fields in Patch requests.
7725	NullFields []string `json:"-"`
7726}
7727
7728func (s *GoogleCloudVisionV1p3beta1OperationMetadata) MarshalJSON() ([]byte, error) {
7729	type NoMethod GoogleCloudVisionV1p3beta1OperationMetadata
7730	raw := NoMethod(*s)
7731	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7732}
7733
7734// GoogleCloudVisionV1p3beta1OutputConfig: The desired output location
7735// and metadata.
7736type GoogleCloudVisionV1p3beta1OutputConfig struct {
7737	// BatchSize: The max number of response protos to put into each output
7738	// JSON file on Google Cloud Storage. The valid range is [1, 100]. If
7739	// not specified, the default value is 20. For example, for one pdf file
7740	// with 100 pages, 100 response protos will be generated. If
7741	// `batch_size` = 20, then 5 json files each containing 20 response
7742	// protos will be written under the prefix `gcs_destination`.`uri`.
7743	// Currently, batch_size only applies to GcsDestination, with potential
7744	// future support for other output configurations.
7745	BatchSize int64 `json:"batchSize,omitempty"`
7746
7747	// GcsDestination: The Google Cloud Storage location to write the
7748	// output(s) to.
7749	GcsDestination *GoogleCloudVisionV1p3beta1GcsDestination `json:"gcsDestination,omitempty"`
7750
7751	// ForceSendFields is a list of field names (e.g. "BatchSize") to
7752	// unconditionally include in API requests. By default, fields with
7753	// empty values are omitted from API requests. However, any non-pointer,
7754	// non-interface field appearing in ForceSendFields will be sent to the
7755	// server regardless of whether the field is empty or not. This may be
7756	// used to include empty fields in Patch requests.
7757	ForceSendFields []string `json:"-"`
7758
7759	// NullFields is a list of field names (e.g. "BatchSize") to include in
7760	// API requests with the JSON null value. By default, fields with empty
7761	// values are omitted from API requests. However, any field with an
7762	// empty value appearing in NullFields will be sent to the server as
7763	// null. It is an error if a field in this list has a non-empty value.
7764	// This may be used to include null fields in Patch requests.
7765	NullFields []string `json:"-"`
7766}
7767
7768func (s *GoogleCloudVisionV1p3beta1OutputConfig) MarshalJSON() ([]byte, error) {
7769	type NoMethod GoogleCloudVisionV1p3beta1OutputConfig
7770	raw := NoMethod(*s)
7771	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7772}
7773
7774// GoogleCloudVisionV1p3beta1Page: Detected page from OCR.
7775type GoogleCloudVisionV1p3beta1Page struct {
7776	// Blocks: List of blocks of text, images etc on this page.
7777	Blocks []*GoogleCloudVisionV1p3beta1Block `json:"blocks,omitempty"`
7778
7779	// Confidence: Confidence of the OCR results on the page. Range [0, 1].
7780	Confidence float64 `json:"confidence,omitempty"`
7781
7782	// Height: Page height. For PDFs the unit is points. For images
7783	// (including TIFFs) the unit is pixels.
7784	Height int64 `json:"height,omitempty"`
7785
7786	// Property: Additional information detected on the page.
7787	Property *GoogleCloudVisionV1p3beta1TextAnnotationTextProperty `json:"property,omitempty"`
7788
7789	// Width: Page width. For PDFs the unit is points. For images (including
7790	// TIFFs) the unit is pixels.
7791	Width int64 `json:"width,omitempty"`
7792
7793	// ForceSendFields is a list of field names (e.g. "Blocks") to
7794	// unconditionally include in API requests. By default, fields with
7795	// empty values are omitted from API requests. However, any non-pointer,
7796	// non-interface field appearing in ForceSendFields will be sent to the
7797	// server regardless of whether the field is empty or not. This may be
7798	// used to include empty fields in Patch requests.
7799	ForceSendFields []string `json:"-"`
7800
7801	// NullFields is a list of field names (e.g. "Blocks") to include in API
7802	// requests with the JSON null value. By default, fields with empty
7803	// values are omitted from API requests. However, any field with an
7804	// empty value appearing in NullFields will be sent to the server as
7805	// null. It is an error if a field in this list has a non-empty value.
7806	// This may be used to include null fields in Patch requests.
7807	NullFields []string `json:"-"`
7808}
7809
7810func (s *GoogleCloudVisionV1p3beta1Page) MarshalJSON() ([]byte, error) {
7811	type NoMethod GoogleCloudVisionV1p3beta1Page
7812	raw := NoMethod(*s)
7813	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7814}
7815
7816func (s *GoogleCloudVisionV1p3beta1Page) UnmarshalJSON(data []byte) error {
7817	type NoMethod GoogleCloudVisionV1p3beta1Page
7818	var s1 struct {
7819		Confidence gensupport.JSONFloat64 `json:"confidence"`
7820		*NoMethod
7821	}
7822	s1.NoMethod = (*NoMethod)(s)
7823	if err := json.Unmarshal(data, &s1); err != nil {
7824		return err
7825	}
7826	s.Confidence = float64(s1.Confidence)
7827	return nil
7828}
7829
7830// GoogleCloudVisionV1p3beta1Paragraph: Structural unit of text
7831// representing a number of words in certain order.
7832type GoogleCloudVisionV1p3beta1Paragraph struct {
7833	// BoundingBox: The bounding box for the paragraph. The vertices are in
7834	// the order of top-left, top-right, bottom-right, bottom-left. When a
7835	// rotation of the bounding box is detected the rotation is represented
7836	// as around the top-left corner as defined when the text is read in the
7837	// 'natural' orientation. For example: * when the text is horizontal it
7838	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
7839	// around the top-left corner it becomes: 2----3 | | 1----0 and the
7840	// vertex order will still be (0, 1, 2, 3).
7841	BoundingBox *GoogleCloudVisionV1p3beta1BoundingPoly `json:"boundingBox,omitempty"`
7842
7843	// Confidence: Confidence of the OCR results for the paragraph. Range
7844	// [0, 1].
7845	Confidence float64 `json:"confidence,omitempty"`
7846
7847	// Property: Additional information detected for the paragraph.
7848	Property *GoogleCloudVisionV1p3beta1TextAnnotationTextProperty `json:"property,omitempty"`
7849
7850	// Words: List of all words in this paragraph.
7851	Words []*GoogleCloudVisionV1p3beta1Word `json:"words,omitempty"`
7852
7853	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
7854	// unconditionally include in API requests. By default, fields with
7855	// empty values are omitted from API requests. However, any non-pointer,
7856	// non-interface field appearing in ForceSendFields will be sent to the
7857	// server regardless of whether the field is empty or not. This may be
7858	// used to include empty fields in Patch requests.
7859	ForceSendFields []string `json:"-"`
7860
7861	// NullFields is a list of field names (e.g. "BoundingBox") to include
7862	// in API requests with the JSON null value. By default, fields with
7863	// empty values are omitted from API requests. However, any field with
7864	// an empty value appearing in NullFields will be sent to the server as
7865	// null. It is an error if a field in this list has a non-empty value.
7866	// This may be used to include null fields in Patch requests.
7867	NullFields []string `json:"-"`
7868}
7869
7870func (s *GoogleCloudVisionV1p3beta1Paragraph) MarshalJSON() ([]byte, error) {
7871	type NoMethod GoogleCloudVisionV1p3beta1Paragraph
7872	raw := NoMethod(*s)
7873	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7874}
7875
7876func (s *GoogleCloudVisionV1p3beta1Paragraph) UnmarshalJSON(data []byte) error {
7877	type NoMethod GoogleCloudVisionV1p3beta1Paragraph
7878	var s1 struct {
7879		Confidence gensupport.JSONFloat64 `json:"confidence"`
7880		*NoMethod
7881	}
7882	s1.NoMethod = (*NoMethod)(s)
7883	if err := json.Unmarshal(data, &s1); err != nil {
7884		return err
7885	}
7886	s.Confidence = float64(s1.Confidence)
7887	return nil
7888}
7889
7890// GoogleCloudVisionV1p3beta1Position: A 3D position in the image, used
7891// primarily for Face detection landmarks. A valid Position must have
7892// both x and y coordinates. The position coordinates are in the same
7893// scale as the original image.
7894type GoogleCloudVisionV1p3beta1Position struct {
7895	// X: X coordinate.
7896	X float64 `json:"x,omitempty"`
7897
7898	// Y: Y coordinate.
7899	Y float64 `json:"y,omitempty"`
7900
7901	// Z: Z coordinate (or depth).
7902	Z float64 `json:"z,omitempty"`
7903
7904	// ForceSendFields is a list of field names (e.g. "X") to
7905	// unconditionally include in API requests. By default, fields with
7906	// empty values are omitted from API requests. However, any non-pointer,
7907	// non-interface field appearing in ForceSendFields will be sent to the
7908	// server regardless of whether the field is empty or not. This may be
7909	// used to include empty fields in Patch requests.
7910	ForceSendFields []string `json:"-"`
7911
7912	// NullFields is a list of field names (e.g. "X") to include in API
7913	// requests with the JSON null value. By default, fields with empty
7914	// values are omitted from API requests. However, any field with an
7915	// empty value appearing in NullFields will be sent to the server as
7916	// null. It is an error if a field in this list has a non-empty value.
7917	// This may be used to include null fields in Patch requests.
7918	NullFields []string `json:"-"`
7919}
7920
7921func (s *GoogleCloudVisionV1p3beta1Position) MarshalJSON() ([]byte, error) {
7922	type NoMethod GoogleCloudVisionV1p3beta1Position
7923	raw := NoMethod(*s)
7924	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
7925}
7926
7927func (s *GoogleCloudVisionV1p3beta1Position) UnmarshalJSON(data []byte) error {
7928	type NoMethod GoogleCloudVisionV1p3beta1Position
7929	var s1 struct {
7930		X gensupport.JSONFloat64 `json:"x"`
7931		Y gensupport.JSONFloat64 `json:"y"`
7932		Z gensupport.JSONFloat64 `json:"z"`
7933		*NoMethod
7934	}
7935	s1.NoMethod = (*NoMethod)(s)
7936	if err := json.Unmarshal(data, &s1); err != nil {
7937		return err
7938	}
7939	s.X = float64(s1.X)
7940	s.Y = float64(s1.Y)
7941	s.Z = float64(s1.Z)
7942	return nil
7943}
7944
7945// GoogleCloudVisionV1p3beta1Product: A Product contains
7946// ReferenceImages.
7947type GoogleCloudVisionV1p3beta1Product struct {
7948	// Description: User-provided metadata to be stored with this product.
7949	// Must be at most 4096 characters long.
7950	Description string `json:"description,omitempty"`
7951
7952	// DisplayName: The user-provided name for this Product. Must not be
7953	// empty. Must be at most 4096 characters long.
7954	DisplayName string `json:"displayName,omitempty"`
7955
7956	// Name: The resource name of the product. Format is:
7957	// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This
7958	// field is ignored when creating a product.
7959	Name string `json:"name,omitempty"`
7960
7961	// ProductCategory: Immutable. The category for the product identified
7962	// by the reference image. This should be one of "homegoods-v2",
7963	// "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The
7964	// legacy categories "homegoods", "apparel", and "toys" are still
7965	// supported, but these should not be used for new products.
7966	ProductCategory string `json:"productCategory,omitempty"`
7967
7968	// ProductLabels: Key-value pairs that can be attached to a product. At
7969	// query time, constraints can be specified based on the product_labels.
7970	// Note that integer values can be provided as strings, e.g. "1199".
7971	// Only strings with integer values can match a range-based restriction
7972	// which is to be supported soon. Multiple values can be assigned to the
7973	// same key. One product may have up to 500 product_labels. Notice that
7974	// the total number of distinct product_labels over all products in one
7975	// ProductSet cannot exceed 1M, otherwise the product search pipeline
7976	// will refuse to work for that ProductSet.
7977	ProductLabels []*GoogleCloudVisionV1p3beta1ProductKeyValue `json:"productLabels,omitempty"`
7978
7979	// ForceSendFields is a list of field names (e.g. "Description") to
7980	// unconditionally include in API requests. By default, fields with
7981	// empty values are omitted from API requests. However, any non-pointer,
7982	// non-interface field appearing in ForceSendFields will be sent to the
7983	// server regardless of whether the field is empty or not. This may be
7984	// used to include empty fields in Patch requests.
7985	ForceSendFields []string `json:"-"`
7986
7987	// NullFields is a list of field names (e.g. "Description") to include
7988	// in API requests with the JSON null value. By default, fields with
7989	// empty values are omitted from API requests. However, any field with
7990	// an empty value appearing in NullFields will be sent to the server as
7991	// null. It is an error if a field in this list has a non-empty value.
7992	// This may be used to include null fields in Patch requests.
7993	NullFields []string `json:"-"`
7994}
7995
7996func (s *GoogleCloudVisionV1p3beta1Product) MarshalJSON() ([]byte, error) {
7997	type NoMethod GoogleCloudVisionV1p3beta1Product
7998	raw := NoMethod(*s)
7999	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8000}
8001
8002// GoogleCloudVisionV1p3beta1ProductKeyValue: A product label
8003// represented as a key-value pair.
8004type GoogleCloudVisionV1p3beta1ProductKeyValue struct {
8005	// Key: The key of the label attached to the product. Cannot be empty
8006	// and cannot exceed 128 bytes.
8007	Key string `json:"key,omitempty"`
8008
8009	// Value: The value of the label attached to the product. Cannot be
8010	// empty and cannot exceed 128 bytes.
8011	Value string `json:"value,omitempty"`
8012
8013	// ForceSendFields is a list of field names (e.g. "Key") to
8014	// unconditionally include in API requests. By default, fields with
8015	// empty values are omitted from API requests. However, any non-pointer,
8016	// non-interface field appearing in ForceSendFields will be sent to the
8017	// server regardless of whether the field is empty or not. This may be
8018	// used to include empty fields in Patch requests.
8019	ForceSendFields []string `json:"-"`
8020
8021	// NullFields is a list of field names (e.g. "Key") to include in API
8022	// requests with the JSON null value. By default, fields with empty
8023	// values are omitted from API requests. However, any field with an
8024	// empty value appearing in NullFields will be sent to the server as
8025	// null. It is an error if a field in this list has a non-empty value.
8026	// This may be used to include null fields in Patch requests.
8027	NullFields []string `json:"-"`
8028}
8029
8030func (s *GoogleCloudVisionV1p3beta1ProductKeyValue) MarshalJSON() ([]byte, error) {
8031	type NoMethod GoogleCloudVisionV1p3beta1ProductKeyValue
8032	raw := NoMethod(*s)
8033	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8034}
8035
8036// GoogleCloudVisionV1p3beta1ProductSearchResults: Results for a product
8037// search request.
8038type GoogleCloudVisionV1p3beta1ProductSearchResults struct {
8039	// IndexTime: Timestamp of the index which provided these results.
8040	// Products added to the product set and products removed from the
8041	// product set after this time are not reflected in the current results.
8042	IndexTime string `json:"indexTime,omitempty"`
8043
8044	// ProductGroupedResults: List of results grouped by products detected
8045	// in the query image. Each entry corresponds to one bounding polygon in
8046	// the query image, and contains the matching products specific to that
8047	// region. There may be duplicate product matches in the union of all
8048	// the per-product results.
8049	ProductGroupedResults []*GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult `json:"productGroupedResults,omitempty"`
8050
8051	// Results: List of results, one for each product match.
8052	Results []*GoogleCloudVisionV1p3beta1ProductSearchResultsResult `json:"results,omitempty"`
8053
8054	// ForceSendFields is a list of field names (e.g. "IndexTime") to
8055	// unconditionally include in API requests. By default, fields with
8056	// empty values are omitted from API requests. However, any non-pointer,
8057	// non-interface field appearing in ForceSendFields will be sent to the
8058	// server regardless of whether the field is empty or not. This may be
8059	// used to include empty fields in Patch requests.
8060	ForceSendFields []string `json:"-"`
8061
8062	// NullFields is a list of field names (e.g. "IndexTime") to include in
8063	// API requests with the JSON null value. By default, fields with empty
8064	// values are omitted from API requests. However, any field with an
8065	// empty value appearing in NullFields will be sent to the server as
8066	// null. It is an error if a field in this list has a non-empty value.
8067	// This may be used to include null fields in Patch requests.
8068	NullFields []string `json:"-"`
8069}
8070
8071func (s *GoogleCloudVisionV1p3beta1ProductSearchResults) MarshalJSON() ([]byte, error) {
8072	type NoMethod GoogleCloudVisionV1p3beta1ProductSearchResults
8073	raw := NoMethod(*s)
8074	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8075}
8076
8077// GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult:
8078// Information about the products similar to a single product in a query
8079// image.
8080type GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult struct {
8081	// BoundingPoly: The bounding polygon around the product detected in the
8082	// query image.
8083	BoundingPoly *GoogleCloudVisionV1p3beta1BoundingPoly `json:"boundingPoly,omitempty"`
8084
8085	// ObjectAnnotations: List of generic predictions for the object in the
8086	// bounding box.
8087	ObjectAnnotations []*GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation `json:"objectAnnotations,omitempty"`
8088
8089	// Results: List of results, one for each product match.
8090	Results []*GoogleCloudVisionV1p3beta1ProductSearchResultsResult `json:"results,omitempty"`
8091
8092	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
8093	// unconditionally include in API requests. By default, fields with
8094	// empty values are omitted from API requests. However, any non-pointer,
8095	// non-interface field appearing in ForceSendFields will be sent to the
8096	// server regardless of whether the field is empty or not. This may be
8097	// used to include empty fields in Patch requests.
8098	ForceSendFields []string `json:"-"`
8099
8100	// NullFields is a list of field names (e.g. "BoundingPoly") to include
8101	// in API requests with the JSON null value. By default, fields with
8102	// empty values are omitted from API requests. However, any field with
8103	// an empty value appearing in NullFields will be sent to the server as
8104	// null. It is an error if a field in this list has a non-empty value.
8105	// This may be used to include null fields in Patch requests.
8106	NullFields []string `json:"-"`
8107}
8108
8109func (s *GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult) MarshalJSON() ([]byte, error) {
8110	type NoMethod GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult
8111	raw := NoMethod(*s)
8112	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8113}
8114
8115// GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation:
8116// Prediction for what the object in the bounding box is.
8117type GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation struct {
8118	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
8119	// For more information, see
8120	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
8121	LanguageCode string `json:"languageCode,omitempty"`
8122
8123	// Mid: Object ID that should align with EntityAnnotation mid.
8124	Mid string `json:"mid,omitempty"`
8125
8126	// Name: Object name, expressed in its `language_code` language.
8127	Name string `json:"name,omitempty"`
8128
8129	// Score: Score of the result. Range [0, 1].
8130	Score float64 `json:"score,omitempty"`
8131
8132	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
8133	// unconditionally include in API requests. By default, fields with
8134	// empty values are omitted from API requests. However, any non-pointer,
8135	// non-interface field appearing in ForceSendFields will be sent to the
8136	// server regardless of whether the field is empty or not. This may be
8137	// used to include empty fields in Patch requests.
8138	ForceSendFields []string `json:"-"`
8139
8140	// NullFields is a list of field names (e.g. "LanguageCode") to include
8141	// in API requests with the JSON null value. By default, fields with
8142	// empty values are omitted from API requests. However, any field with
8143	// an empty value appearing in NullFields will be sent to the server as
8144	// null. It is an error if a field in this list has a non-empty value.
8145	// This may be used to include null fields in Patch requests.
8146	NullFields []string `json:"-"`
8147}
8148
8149func (s *GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation) MarshalJSON() ([]byte, error) {
8150	type NoMethod GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation
8151	raw := NoMethod(*s)
8152	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8153}
8154
8155func (s *GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation) UnmarshalJSON(data []byte) error {
8156	type NoMethod GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation
8157	var s1 struct {
8158		Score gensupport.JSONFloat64 `json:"score"`
8159		*NoMethod
8160	}
8161	s1.NoMethod = (*NoMethod)(s)
8162	if err := json.Unmarshal(data, &s1); err != nil {
8163		return err
8164	}
8165	s.Score = float64(s1.Score)
8166	return nil
8167}
8168
8169// GoogleCloudVisionV1p3beta1ProductSearchResultsResult: Information
8170// about a product.
8171type GoogleCloudVisionV1p3beta1ProductSearchResultsResult struct {
8172	// Image: The resource name of the image from the product that is the
8173	// closest match to the query.
8174	Image string `json:"image,omitempty"`
8175
8176	// Product: The Product.
8177	Product *GoogleCloudVisionV1p3beta1Product `json:"product,omitempty"`
8178
8179	// Score: A confidence level on the match, ranging from 0 (no
8180	// confidence) to 1 (full confidence).
8181	Score float64 `json:"score,omitempty"`
8182
8183	// ForceSendFields is a list of field names (e.g. "Image") to
8184	// unconditionally include in API requests. By default, fields with
8185	// empty values are omitted from API requests. However, any non-pointer,
8186	// non-interface field appearing in ForceSendFields will be sent to the
8187	// server regardless of whether the field is empty or not. This may be
8188	// used to include empty fields in Patch requests.
8189	ForceSendFields []string `json:"-"`
8190
8191	// NullFields is a list of field names (e.g. "Image") to include in API
8192	// requests with the JSON null value. By default, fields with empty
8193	// values are omitted from API requests. However, any field with an
8194	// empty value appearing in NullFields will be sent to the server as
8195	// null. It is an error if a field in this list has a non-empty value.
8196	// This may be used to include null fields in Patch requests.
8197	NullFields []string `json:"-"`
8198}
8199
8200func (s *GoogleCloudVisionV1p3beta1ProductSearchResultsResult) MarshalJSON() ([]byte, error) {
8201	type NoMethod GoogleCloudVisionV1p3beta1ProductSearchResultsResult
8202	raw := NoMethod(*s)
8203	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8204}
8205
8206func (s *GoogleCloudVisionV1p3beta1ProductSearchResultsResult) UnmarshalJSON(data []byte) error {
8207	type NoMethod GoogleCloudVisionV1p3beta1ProductSearchResultsResult
8208	var s1 struct {
8209		Score gensupport.JSONFloat64 `json:"score"`
8210		*NoMethod
8211	}
8212	s1.NoMethod = (*NoMethod)(s)
8213	if err := json.Unmarshal(data, &s1); err != nil {
8214		return err
8215	}
8216	s.Score = float64(s1.Score)
8217	return nil
8218}
8219
8220// GoogleCloudVisionV1p3beta1Property: A `Property` consists of a
8221// user-supplied name/value pair.
8222type GoogleCloudVisionV1p3beta1Property struct {
8223	// Name: Name of the property.
8224	Name string `json:"name,omitempty"`
8225
8226	// Uint64Value: Value of numeric properties.
8227	Uint64Value uint64 `json:"uint64Value,omitempty,string"`
8228
8229	// Value: Value of the property.
8230	Value string `json:"value,omitempty"`
8231
8232	// ForceSendFields is a list of field names (e.g. "Name") to
8233	// unconditionally include in API requests. By default, fields with
8234	// empty values are omitted from API requests. However, any non-pointer,
8235	// non-interface field appearing in ForceSendFields will be sent to the
8236	// server regardless of whether the field is empty or not. This may be
8237	// used to include empty fields in Patch requests.
8238	ForceSendFields []string `json:"-"`
8239
8240	// NullFields is a list of field names (e.g. "Name") to include in API
8241	// requests with the JSON null value. By default, fields with empty
8242	// values are omitted from API requests. However, any field with an
8243	// empty value appearing in NullFields will be sent to the server as
8244	// null. It is an error if a field in this list has a non-empty value.
8245	// This may be used to include null fields in Patch requests.
8246	NullFields []string `json:"-"`
8247}
8248
8249func (s *GoogleCloudVisionV1p3beta1Property) MarshalJSON() ([]byte, error) {
8250	type NoMethod GoogleCloudVisionV1p3beta1Property
8251	raw := NoMethod(*s)
8252	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8253}
8254
8255// GoogleCloudVisionV1p3beta1ReferenceImage: A `ReferenceImage`
8256// represents a product image and its associated metadata, such as
8257// bounding boxes.
8258type GoogleCloudVisionV1p3beta1ReferenceImage struct {
8259	// BoundingPolys: Optional. Bounding polygons around the areas of
8260	// interest in the reference image. If this field is empty, the system
8261	// will try to detect regions of interest. At most 10 bounding polygons
8262	// will be used. The provided shape is converted into a non-rotated
8263	// rectangle. Once converted, the small edge of the rectangle must be
8264	// greater than or equal to 300 pixels. The aspect ratio must be 1:4 or
8265	// less (i.e. 1:3 is ok; 1:5 is not).
8266	BoundingPolys []*GoogleCloudVisionV1p3beta1BoundingPoly `json:"boundingPolys,omitempty"`
8267
8268	// Name: The resource name of the reference image. Format is:
8269	// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceIma
8270	// ges/IMAGE_ID`. This field is ignored when creating a reference image.
8271	Name string `json:"name,omitempty"`
8272
8273	// Uri: Required. The Google Cloud Storage URI of the reference image.
8274	// The URI must start with `gs://`.
8275	Uri string `json:"uri,omitempty"`
8276
8277	// ForceSendFields is a list of field names (e.g. "BoundingPolys") to
8278	// unconditionally include in API requests. By default, fields with
8279	// empty values are omitted from API requests. However, any non-pointer,
8280	// non-interface field appearing in ForceSendFields will be sent to the
8281	// server regardless of whether the field is empty or not. This may be
8282	// used to include empty fields in Patch requests.
8283	ForceSendFields []string `json:"-"`
8284
8285	// NullFields is a list of field names (e.g. "BoundingPolys") to include
8286	// in API requests with the JSON null value. By default, fields with
8287	// empty values are omitted from API requests. However, any field with
8288	// an empty value appearing in NullFields will be sent to the server as
8289	// null. It is an error if a field in this list has a non-empty value.
8290	// This may be used to include null fields in Patch requests.
8291	NullFields []string `json:"-"`
8292}
8293
8294func (s *GoogleCloudVisionV1p3beta1ReferenceImage) MarshalJSON() ([]byte, error) {
8295	type NoMethod GoogleCloudVisionV1p3beta1ReferenceImage
8296	raw := NoMethod(*s)
8297	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8298}
8299
8300// GoogleCloudVisionV1p3beta1SafeSearchAnnotation: Set of features
8301// pertaining to the image, computed by computer vision methods over
8302// safe-search verticals (for example, adult, spoof, medical, violence).
8303type GoogleCloudVisionV1p3beta1SafeSearchAnnotation struct {
8304	// Adult: Represents the adult content likelihood for the image. Adult
8305	// content may contain elements such as nudity, pornographic images or
8306	// cartoons, or sexual activities.
8307	//
8308	// Possible values:
8309	//   "UNKNOWN" - Unknown likelihood.
8310	//   "VERY_UNLIKELY" - It is very unlikely.
8311	//   "UNLIKELY" - It is unlikely.
8312	//   "POSSIBLE" - It is possible.
8313	//   "LIKELY" - It is likely.
8314	//   "VERY_LIKELY" - It is very likely.
8315	Adult string `json:"adult,omitempty"`
8316
8317	// Medical: Likelihood that this is a medical image.
8318	//
8319	// Possible values:
8320	//   "UNKNOWN" - Unknown likelihood.
8321	//   "VERY_UNLIKELY" - It is very unlikely.
8322	//   "UNLIKELY" - It is unlikely.
8323	//   "POSSIBLE" - It is possible.
8324	//   "LIKELY" - It is likely.
8325	//   "VERY_LIKELY" - It is very likely.
8326	Medical string `json:"medical,omitempty"`
8327
8328	// Racy: Likelihood that the request image contains racy content. Racy
8329	// content may include (but is not limited to) skimpy or sheer clothing,
8330	// strategically covered nudity, lewd or provocative poses, or close-ups
8331	// of sensitive body areas.
8332	//
8333	// Possible values:
8334	//   "UNKNOWN" - Unknown likelihood.
8335	//   "VERY_UNLIKELY" - It is very unlikely.
8336	//   "UNLIKELY" - It is unlikely.
8337	//   "POSSIBLE" - It is possible.
8338	//   "LIKELY" - It is likely.
8339	//   "VERY_LIKELY" - It is very likely.
8340	Racy string `json:"racy,omitempty"`
8341
8342	// Spoof: Spoof likelihood. The likelihood that an modification was made
8343	// to the image's canonical version to make it appear funny or
8344	// offensive.
8345	//
8346	// Possible values:
8347	//   "UNKNOWN" - Unknown likelihood.
8348	//   "VERY_UNLIKELY" - It is very unlikely.
8349	//   "UNLIKELY" - It is unlikely.
8350	//   "POSSIBLE" - It is possible.
8351	//   "LIKELY" - It is likely.
8352	//   "VERY_LIKELY" - It is very likely.
8353	Spoof string `json:"spoof,omitempty"`
8354
8355	// Violence: Likelihood that this image contains violent content.
8356	//
8357	// Possible values:
8358	//   "UNKNOWN" - Unknown likelihood.
8359	//   "VERY_UNLIKELY" - It is very unlikely.
8360	//   "UNLIKELY" - It is unlikely.
8361	//   "POSSIBLE" - It is possible.
8362	//   "LIKELY" - It is likely.
8363	//   "VERY_LIKELY" - It is very likely.
8364	Violence string `json:"violence,omitempty"`
8365
8366	// ForceSendFields is a list of field names (e.g. "Adult") to
8367	// unconditionally include in API requests. By default, fields with
8368	// empty values are omitted from API requests. However, any non-pointer,
8369	// non-interface field appearing in ForceSendFields will be sent to the
8370	// server regardless of whether the field is empty or not. This may be
8371	// used to include empty fields in Patch requests.
8372	ForceSendFields []string `json:"-"`
8373
8374	// NullFields is a list of field names (e.g. "Adult") to include in API
8375	// requests with the JSON null value. By default, fields with empty
8376	// values are omitted from API requests. However, any field with an
8377	// empty value appearing in NullFields will be sent to the server as
8378	// null. It is an error if a field in this list has a non-empty value.
8379	// This may be used to include null fields in Patch requests.
8380	NullFields []string `json:"-"`
8381}
8382
8383func (s *GoogleCloudVisionV1p3beta1SafeSearchAnnotation) MarshalJSON() ([]byte, error) {
8384	type NoMethod GoogleCloudVisionV1p3beta1SafeSearchAnnotation
8385	raw := NoMethod(*s)
8386	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8387}
8388
8389// GoogleCloudVisionV1p3beta1Symbol: A single symbol representation.
8390type GoogleCloudVisionV1p3beta1Symbol struct {
8391	// BoundingBox: The bounding box for the symbol. The vertices are in the
8392	// order of top-left, top-right, bottom-right, bottom-left. When a
8393	// rotation of the bounding box is detected the rotation is represented
8394	// as around the top-left corner as defined when the text is read in the
8395	// 'natural' orientation. For example: * when the text is horizontal it
8396	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
8397	// around the top-left corner it becomes: 2----3 | | 1----0 and the
8398	// vertex order will still be (0, 1, 2, 3).
8399	BoundingBox *GoogleCloudVisionV1p3beta1BoundingPoly `json:"boundingBox,omitempty"`
8400
8401	// Confidence: Confidence of the OCR results for the symbol. Range [0,
8402	// 1].
8403	Confidence float64 `json:"confidence,omitempty"`
8404
8405	// Property: Additional information detected for the symbol.
8406	Property *GoogleCloudVisionV1p3beta1TextAnnotationTextProperty `json:"property,omitempty"`
8407
8408	// Text: The actual UTF-8 representation of the symbol.
8409	Text string `json:"text,omitempty"`
8410
8411	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
8412	// unconditionally include in API requests. By default, fields with
8413	// empty values are omitted from API requests. However, any non-pointer,
8414	// non-interface field appearing in ForceSendFields will be sent to the
8415	// server regardless of whether the field is empty or not. This may be
8416	// used to include empty fields in Patch requests.
8417	ForceSendFields []string `json:"-"`
8418
8419	// NullFields is a list of field names (e.g. "BoundingBox") to include
8420	// in API requests with the JSON null value. By default, fields with
8421	// empty values are omitted from API requests. However, any field with
8422	// an empty value appearing in NullFields will be sent to the server as
8423	// null. It is an error if a field in this list has a non-empty value.
8424	// This may be used to include null fields in Patch requests.
8425	NullFields []string `json:"-"`
8426}
8427
8428func (s *GoogleCloudVisionV1p3beta1Symbol) MarshalJSON() ([]byte, error) {
8429	type NoMethod GoogleCloudVisionV1p3beta1Symbol
8430	raw := NoMethod(*s)
8431	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8432}
8433
8434func (s *GoogleCloudVisionV1p3beta1Symbol) UnmarshalJSON(data []byte) error {
8435	type NoMethod GoogleCloudVisionV1p3beta1Symbol
8436	var s1 struct {
8437		Confidence gensupport.JSONFloat64 `json:"confidence"`
8438		*NoMethod
8439	}
8440	s1.NoMethod = (*NoMethod)(s)
8441	if err := json.Unmarshal(data, &s1); err != nil {
8442		return err
8443	}
8444	s.Confidence = float64(s1.Confidence)
8445	return nil
8446}
8447
8448// GoogleCloudVisionV1p3beta1TextAnnotation: TextAnnotation contains a
8449// structured representation of OCR extracted text. The hierarchy of an
8450// OCR extracted text structure is like this: TextAnnotation -> Page ->
8451// Block -> Paragraph -> Word -> Symbol Each structural component,
8452// starting from Page, may further have their own properties. Properties
8453// describe detected languages, breaks etc.. Please refer to the
8454// TextAnnotation.TextProperty message definition below for more detail.
8455type GoogleCloudVisionV1p3beta1TextAnnotation struct {
8456	// Pages: List of pages detected by OCR.
8457	Pages []*GoogleCloudVisionV1p3beta1Page `json:"pages,omitempty"`
8458
8459	// Text: UTF-8 text detected on the pages.
8460	Text string `json:"text,omitempty"`
8461
8462	// ForceSendFields is a list of field names (e.g. "Pages") to
8463	// unconditionally include in API requests. By default, fields with
8464	// empty values are omitted from API requests. However, any non-pointer,
8465	// non-interface field appearing in ForceSendFields will be sent to the
8466	// server regardless of whether the field is empty or not. This may be
8467	// used to include empty fields in Patch requests.
8468	ForceSendFields []string `json:"-"`
8469
8470	// NullFields is a list of field names (e.g. "Pages") to include in API
8471	// requests with the JSON null value. By default, fields with empty
8472	// values are omitted from API requests. However, any field with an
8473	// empty value appearing in NullFields will be sent to the server as
8474	// null. It is an error if a field in this list has a non-empty value.
8475	// This may be used to include null fields in Patch requests.
8476	NullFields []string `json:"-"`
8477}
8478
8479func (s *GoogleCloudVisionV1p3beta1TextAnnotation) MarshalJSON() ([]byte, error) {
8480	type NoMethod GoogleCloudVisionV1p3beta1TextAnnotation
8481	raw := NoMethod(*s)
8482	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8483}
8484
8485// GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak: Detected start
8486// or end of a structural component.
8487type GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak struct {
8488	// IsPrefix: True if break prepends the element.
8489	IsPrefix bool `json:"isPrefix,omitempty"`
8490
8491	// Type: Detected break type.
8492	//
8493	// Possible values:
8494	//   "UNKNOWN" - Unknown break label type.
8495	//   "SPACE" - Regular space.
8496	//   "SURE_SPACE" - Sure space (very wide).
8497	//   "EOL_SURE_SPACE" - Line-wrapping break.
8498	//   "HYPHEN" - End-line hyphen that is not present in text; does not
8499	// co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
8500	//   "LINE_BREAK" - Line break that ends a paragraph.
8501	Type string `json:"type,omitempty"`
8502
8503	// ForceSendFields is a list of field names (e.g. "IsPrefix") to
8504	// unconditionally include in API requests. By default, fields with
8505	// empty values are omitted from API requests. However, any non-pointer,
8506	// non-interface field appearing in ForceSendFields will be sent to the
8507	// server regardless of whether the field is empty or not. This may be
8508	// used to include empty fields in Patch requests.
8509	ForceSendFields []string `json:"-"`
8510
8511	// NullFields is a list of field names (e.g. "IsPrefix") to include in
8512	// API requests with the JSON null value. By default, fields with empty
8513	// values are omitted from API requests. However, any field with an
8514	// empty value appearing in NullFields will be sent to the server as
8515	// null. It is an error if a field in this list has a non-empty value.
8516	// This may be used to include null fields in Patch requests.
8517	NullFields []string `json:"-"`
8518}
8519
8520func (s *GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak) MarshalJSON() ([]byte, error) {
8521	type NoMethod GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak
8522	raw := NoMethod(*s)
8523	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8524}
8525
8526// GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage: Detected
8527// language for a structural component.
8528type GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage struct {
8529	// Confidence: Confidence of detected language. Range [0, 1].
8530	Confidence float64 `json:"confidence,omitempty"`
8531
8532	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
8533	// For more information, see
8534	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
8535	LanguageCode string `json:"languageCode,omitempty"`
8536
8537	// ForceSendFields is a list of field names (e.g. "Confidence") to
8538	// unconditionally include in API requests. By default, fields with
8539	// empty values are omitted from API requests. However, any non-pointer,
8540	// non-interface field appearing in ForceSendFields will be sent to the
8541	// server regardless of whether the field is empty or not. This may be
8542	// used to include empty fields in Patch requests.
8543	ForceSendFields []string `json:"-"`
8544
8545	// NullFields is a list of field names (e.g. "Confidence") to include in
8546	// API requests with the JSON null value. By default, fields with empty
8547	// values are omitted from API requests. However, any field with an
8548	// empty value appearing in NullFields will be sent to the server as
8549	// null. It is an error if a field in this list has a non-empty value.
8550	// This may be used to include null fields in Patch requests.
8551	NullFields []string `json:"-"`
8552}
8553
8554func (s *GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage) MarshalJSON() ([]byte, error) {
8555	type NoMethod GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage
8556	raw := NoMethod(*s)
8557	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8558}
8559
8560func (s *GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage) UnmarshalJSON(data []byte) error {
8561	type NoMethod GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage
8562	var s1 struct {
8563		Confidence gensupport.JSONFloat64 `json:"confidence"`
8564		*NoMethod
8565	}
8566	s1.NoMethod = (*NoMethod)(s)
8567	if err := json.Unmarshal(data, &s1); err != nil {
8568		return err
8569	}
8570	s.Confidence = float64(s1.Confidence)
8571	return nil
8572}
8573
8574// GoogleCloudVisionV1p3beta1TextAnnotationTextProperty: Additional
8575// information detected on the structural component.
8576type GoogleCloudVisionV1p3beta1TextAnnotationTextProperty struct {
8577	// DetectedBreak: Detected start or end of a text segment.
8578	DetectedBreak *GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak `json:"detectedBreak,omitempty"`
8579
8580	// DetectedLanguages: A list of detected languages together with
8581	// confidence.
8582	DetectedLanguages []*GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage `json:"detectedLanguages,omitempty"`
8583
8584	// ForceSendFields is a list of field names (e.g. "DetectedBreak") to
8585	// unconditionally include in API requests. By default, fields with
8586	// empty values are omitted from API requests. However, any non-pointer,
8587	// non-interface field appearing in ForceSendFields will be sent to the
8588	// server regardless of whether the field is empty or not. This may be
8589	// used to include empty fields in Patch requests.
8590	ForceSendFields []string `json:"-"`
8591
8592	// NullFields is a list of field names (e.g. "DetectedBreak") to include
8593	// in API requests with the JSON null value. By default, fields with
8594	// empty values are omitted from API requests. However, any field with
8595	// an empty value appearing in NullFields will be sent to the server as
8596	// null. It is an error if a field in this list has a non-empty value.
8597	// This may be used to include null fields in Patch requests.
8598	NullFields []string `json:"-"`
8599}
8600
8601func (s *GoogleCloudVisionV1p3beta1TextAnnotationTextProperty) MarshalJSON() ([]byte, error) {
8602	type NoMethod GoogleCloudVisionV1p3beta1TextAnnotationTextProperty
8603	raw := NoMethod(*s)
8604	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8605}
8606
8607// GoogleCloudVisionV1p3beta1Vertex: A vertex represents a 2D point in
8608// the image. NOTE: the vertex coordinates are in the same scale as the
8609// original image.
8610type GoogleCloudVisionV1p3beta1Vertex struct {
8611	// X: X coordinate.
8612	X int64 `json:"x,omitempty"`
8613
8614	// Y: Y coordinate.
8615	Y int64 `json:"y,omitempty"`
8616
8617	// ForceSendFields is a list of field names (e.g. "X") to
8618	// unconditionally include in API requests. By default, fields with
8619	// empty values are omitted from API requests. However, any non-pointer,
8620	// non-interface field appearing in ForceSendFields will be sent to the
8621	// server regardless of whether the field is empty or not. This may be
8622	// used to include empty fields in Patch requests.
8623	ForceSendFields []string `json:"-"`
8624
8625	// NullFields is a list of field names (e.g. "X") to include in API
8626	// requests with the JSON null value. By default, fields with empty
8627	// values are omitted from API requests. However, any field with an
8628	// empty value appearing in NullFields will be sent to the server as
8629	// null. It is an error if a field in this list has a non-empty value.
8630	// This may be used to include null fields in Patch requests.
8631	NullFields []string `json:"-"`
8632}
8633
8634func (s *GoogleCloudVisionV1p3beta1Vertex) MarshalJSON() ([]byte, error) {
8635	type NoMethod GoogleCloudVisionV1p3beta1Vertex
8636	raw := NoMethod(*s)
8637	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8638}
8639
8640// GoogleCloudVisionV1p3beta1WebDetection: Relevant information for the
8641// image from the Internet.
8642type GoogleCloudVisionV1p3beta1WebDetection struct {
8643	// BestGuessLabels: The service's best guess as to the topic of the
8644	// request image. Inferred from similar images on the open web.
8645	BestGuessLabels []*GoogleCloudVisionV1p3beta1WebDetectionWebLabel `json:"bestGuessLabels,omitempty"`
8646
8647	// FullMatchingImages: Fully matching images from the Internet. Can
8648	// include resized copies of the query image.
8649	FullMatchingImages []*GoogleCloudVisionV1p3beta1WebDetectionWebImage `json:"fullMatchingImages,omitempty"`
8650
8651	// PagesWithMatchingImages: Web pages containing the matching images
8652	// from the Internet.
8653	PagesWithMatchingImages []*GoogleCloudVisionV1p3beta1WebDetectionWebPage `json:"pagesWithMatchingImages,omitempty"`
8654
8655	// PartialMatchingImages: Partial matching images from the Internet.
8656	// Those images are similar enough to share some key-point features. For
8657	// example an original image will likely have partial matching for its
8658	// crops.
8659	PartialMatchingImages []*GoogleCloudVisionV1p3beta1WebDetectionWebImage `json:"partialMatchingImages,omitempty"`
8660
8661	// VisuallySimilarImages: The visually similar image results.
8662	VisuallySimilarImages []*GoogleCloudVisionV1p3beta1WebDetectionWebImage `json:"visuallySimilarImages,omitempty"`
8663
8664	// WebEntities: Deduced entities from similar images on the Internet.
8665	WebEntities []*GoogleCloudVisionV1p3beta1WebDetectionWebEntity `json:"webEntities,omitempty"`
8666
8667	// ForceSendFields is a list of field names (e.g. "BestGuessLabels") to
8668	// unconditionally include in API requests. By default, fields with
8669	// empty values are omitted from API requests. However, any non-pointer,
8670	// non-interface field appearing in ForceSendFields will be sent to the
8671	// server regardless of whether the field is empty or not. This may be
8672	// used to include empty fields in Patch requests.
8673	ForceSendFields []string `json:"-"`
8674
8675	// NullFields is a list of field names (e.g. "BestGuessLabels") to
8676	// include in API requests with the JSON null value. By default, fields
8677	// with empty values are omitted from API requests. However, any field
8678	// with an empty value appearing in NullFields will be sent to the
8679	// server as null. It is an error if a field in this list has a
8680	// non-empty value. This may be used to include null fields in Patch
8681	// requests.
8682	NullFields []string `json:"-"`
8683}
8684
8685func (s *GoogleCloudVisionV1p3beta1WebDetection) MarshalJSON() ([]byte, error) {
8686	type NoMethod GoogleCloudVisionV1p3beta1WebDetection
8687	raw := NoMethod(*s)
8688	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8689}
8690
8691// GoogleCloudVisionV1p3beta1WebDetectionWebEntity: Entity deduced from
8692// similar images on the Internet.
8693type GoogleCloudVisionV1p3beta1WebDetectionWebEntity struct {
8694	// Description: Canonical description of the entity, in English.
8695	Description string `json:"description,omitempty"`
8696
8697	// EntityId: Opaque entity ID.
8698	EntityId string `json:"entityId,omitempty"`
8699
8700	// Score: Overall relevancy score for the entity. Not normalized and not
8701	// comparable across different image queries.
8702	Score float64 `json:"score,omitempty"`
8703
8704	// ForceSendFields is a list of field names (e.g. "Description") to
8705	// unconditionally include in API requests. By default, fields with
8706	// empty values are omitted from API requests. However, any non-pointer,
8707	// non-interface field appearing in ForceSendFields will be sent to the
8708	// server regardless of whether the field is empty or not. This may be
8709	// used to include empty fields in Patch requests.
8710	ForceSendFields []string `json:"-"`
8711
8712	// NullFields is a list of field names (e.g. "Description") to include
8713	// in API requests with the JSON null value. By default, fields with
8714	// empty values are omitted from API requests. However, any field with
8715	// an empty value appearing in NullFields will be sent to the server as
8716	// null. It is an error if a field in this list has a non-empty value.
8717	// This may be used to include null fields in Patch requests.
8718	NullFields []string `json:"-"`
8719}
8720
8721func (s *GoogleCloudVisionV1p3beta1WebDetectionWebEntity) MarshalJSON() ([]byte, error) {
8722	type NoMethod GoogleCloudVisionV1p3beta1WebDetectionWebEntity
8723	raw := NoMethod(*s)
8724	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8725}
8726
8727func (s *GoogleCloudVisionV1p3beta1WebDetectionWebEntity) UnmarshalJSON(data []byte) error {
8728	type NoMethod GoogleCloudVisionV1p3beta1WebDetectionWebEntity
8729	var s1 struct {
8730		Score gensupport.JSONFloat64 `json:"score"`
8731		*NoMethod
8732	}
8733	s1.NoMethod = (*NoMethod)(s)
8734	if err := json.Unmarshal(data, &s1); err != nil {
8735		return err
8736	}
8737	s.Score = float64(s1.Score)
8738	return nil
8739}
8740
8741// GoogleCloudVisionV1p3beta1WebDetectionWebImage: Metadata for online
8742// images.
8743type GoogleCloudVisionV1p3beta1WebDetectionWebImage struct {
8744	// Score: (Deprecated) Overall relevancy score for the image.
8745	Score float64 `json:"score,omitempty"`
8746
8747	// Url: The result image URL.
8748	Url string `json:"url,omitempty"`
8749
8750	// ForceSendFields is a list of field names (e.g. "Score") to
8751	// unconditionally include in API requests. By default, fields with
8752	// empty values are omitted from API requests. However, any non-pointer,
8753	// non-interface field appearing in ForceSendFields will be sent to the
8754	// server regardless of whether the field is empty or not. This may be
8755	// used to include empty fields in Patch requests.
8756	ForceSendFields []string `json:"-"`
8757
8758	// NullFields is a list of field names (e.g. "Score") to include in API
8759	// requests with the JSON null value. By default, fields with empty
8760	// values are omitted from API requests. However, any field with an
8761	// empty value appearing in NullFields will be sent to the server as
8762	// null. It is an error if a field in this list has a non-empty value.
8763	// This may be used to include null fields in Patch requests.
8764	NullFields []string `json:"-"`
8765}
8766
8767func (s *GoogleCloudVisionV1p3beta1WebDetectionWebImage) MarshalJSON() ([]byte, error) {
8768	type NoMethod GoogleCloudVisionV1p3beta1WebDetectionWebImage
8769	raw := NoMethod(*s)
8770	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8771}
8772
8773func (s *GoogleCloudVisionV1p3beta1WebDetectionWebImage) UnmarshalJSON(data []byte) error {
8774	type NoMethod GoogleCloudVisionV1p3beta1WebDetectionWebImage
8775	var s1 struct {
8776		Score gensupport.JSONFloat64 `json:"score"`
8777		*NoMethod
8778	}
8779	s1.NoMethod = (*NoMethod)(s)
8780	if err := json.Unmarshal(data, &s1); err != nil {
8781		return err
8782	}
8783	s.Score = float64(s1.Score)
8784	return nil
8785}
8786
8787// GoogleCloudVisionV1p3beta1WebDetectionWebLabel: Label to provide
8788// extra metadata for the web detection.
8789type GoogleCloudVisionV1p3beta1WebDetectionWebLabel struct {
8790	// Label: Label for extra metadata.
8791	Label string `json:"label,omitempty"`
8792
8793	// LanguageCode: The BCP-47 language code for `label`, such as "en-US"
8794	// or "sr-Latn". For more information, see
8795	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
8796	LanguageCode string `json:"languageCode,omitempty"`
8797
8798	// ForceSendFields is a list of field names (e.g. "Label") to
8799	// unconditionally include in API requests. By default, fields with
8800	// empty values are omitted from API requests. However, any non-pointer,
8801	// non-interface field appearing in ForceSendFields will be sent to the
8802	// server regardless of whether the field is empty or not. This may be
8803	// used to include empty fields in Patch requests.
8804	ForceSendFields []string `json:"-"`
8805
8806	// NullFields is a list of field names (e.g. "Label") to include in API
8807	// requests with the JSON null value. By default, fields with empty
8808	// values are omitted from API requests. However, any field with an
8809	// empty value appearing in NullFields will be sent to the server as
8810	// null. It is an error if a field in this list has a non-empty value.
8811	// This may be used to include null fields in Patch requests.
8812	NullFields []string `json:"-"`
8813}
8814
8815func (s *GoogleCloudVisionV1p3beta1WebDetectionWebLabel) MarshalJSON() ([]byte, error) {
8816	type NoMethod GoogleCloudVisionV1p3beta1WebDetectionWebLabel
8817	raw := NoMethod(*s)
8818	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8819}
8820
8821// GoogleCloudVisionV1p3beta1WebDetectionWebPage: Metadata for web
8822// pages.
8823type GoogleCloudVisionV1p3beta1WebDetectionWebPage struct {
8824	// FullMatchingImages: Fully matching images on the page. Can include
8825	// resized copies of the query image.
8826	FullMatchingImages []*GoogleCloudVisionV1p3beta1WebDetectionWebImage `json:"fullMatchingImages,omitempty"`
8827
8828	// PageTitle: Title for the web page, may contain HTML markups.
8829	PageTitle string `json:"pageTitle,omitempty"`
8830
8831	// PartialMatchingImages: Partial matching images on the page. Those
8832	// images are similar enough to share some key-point features. For
8833	// example an original image will likely have partial matching for its
8834	// crops.
8835	PartialMatchingImages []*GoogleCloudVisionV1p3beta1WebDetectionWebImage `json:"partialMatchingImages,omitempty"`
8836
8837	// Score: (Deprecated) Overall relevancy score for the web page.
8838	Score float64 `json:"score,omitempty"`
8839
8840	// Url: The result web page URL.
8841	Url string `json:"url,omitempty"`
8842
8843	// ForceSendFields is a list of field names (e.g. "FullMatchingImages")
8844	// to unconditionally include in API requests. By default, fields with
8845	// empty values are omitted from API requests. However, any non-pointer,
8846	// non-interface field appearing in ForceSendFields will be sent to the
8847	// server regardless of whether the field is empty or not. This may be
8848	// used to include empty fields in Patch requests.
8849	ForceSendFields []string `json:"-"`
8850
8851	// NullFields is a list of field names (e.g. "FullMatchingImages") to
8852	// include in API requests with the JSON null value. By default, fields
8853	// with empty values are omitted from API requests. However, any field
8854	// with an empty value appearing in NullFields will be sent to the
8855	// server as null. It is an error if a field in this list has a
8856	// non-empty value. This may be used to include null fields in Patch
8857	// requests.
8858	NullFields []string `json:"-"`
8859}
8860
8861func (s *GoogleCloudVisionV1p3beta1WebDetectionWebPage) MarshalJSON() ([]byte, error) {
8862	type NoMethod GoogleCloudVisionV1p3beta1WebDetectionWebPage
8863	raw := NoMethod(*s)
8864	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8865}
8866
8867func (s *GoogleCloudVisionV1p3beta1WebDetectionWebPage) UnmarshalJSON(data []byte) error {
8868	type NoMethod GoogleCloudVisionV1p3beta1WebDetectionWebPage
8869	var s1 struct {
8870		Score gensupport.JSONFloat64 `json:"score"`
8871		*NoMethod
8872	}
8873	s1.NoMethod = (*NoMethod)(s)
8874	if err := json.Unmarshal(data, &s1); err != nil {
8875		return err
8876	}
8877	s.Score = float64(s1.Score)
8878	return nil
8879}
8880
8881// GoogleCloudVisionV1p3beta1Word: A word representation.
8882type GoogleCloudVisionV1p3beta1Word struct {
8883	// BoundingBox: The bounding box for the word. The vertices are in the
8884	// order of top-left, top-right, bottom-right, bottom-left. When a
8885	// rotation of the bounding box is detected the rotation is represented
8886	// as around the top-left corner as defined when the text is read in the
8887	// 'natural' orientation. For example: * when the text is horizontal it
8888	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
8889	// around the top-left corner it becomes: 2----3 | | 1----0 and the
8890	// vertex order will still be (0, 1, 2, 3).
8891	BoundingBox *GoogleCloudVisionV1p3beta1BoundingPoly `json:"boundingBox,omitempty"`
8892
8893	// Confidence: Confidence of the OCR results for the word. Range [0, 1].
8894	Confidence float64 `json:"confidence,omitempty"`
8895
8896	// Property: Additional information detected for the word.
8897	Property *GoogleCloudVisionV1p3beta1TextAnnotationTextProperty `json:"property,omitempty"`
8898
8899	// Symbols: List of symbols in the word. The order of the symbols
8900	// follows the natural reading order.
8901	Symbols []*GoogleCloudVisionV1p3beta1Symbol `json:"symbols,omitempty"`
8902
8903	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
8904	// unconditionally include in API requests. By default, fields with
8905	// empty values are omitted from API requests. However, any non-pointer,
8906	// non-interface field appearing in ForceSendFields will be sent to the
8907	// server regardless of whether the field is empty or not. This may be
8908	// used to include empty fields in Patch requests.
8909	ForceSendFields []string `json:"-"`
8910
8911	// NullFields is a list of field names (e.g. "BoundingBox") to include
8912	// in API requests with the JSON null value. By default, fields with
8913	// empty values are omitted from API requests. However, any field with
8914	// an empty value appearing in NullFields will be sent to the server as
8915	// null. It is an error if a field in this list has a non-empty value.
8916	// This may be used to include null fields in Patch requests.
8917	NullFields []string `json:"-"`
8918}
8919
8920func (s *GoogleCloudVisionV1p3beta1Word) MarshalJSON() ([]byte, error) {
8921	type NoMethod GoogleCloudVisionV1p3beta1Word
8922	raw := NoMethod(*s)
8923	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8924}
8925
8926func (s *GoogleCloudVisionV1p3beta1Word) UnmarshalJSON(data []byte) error {
8927	type NoMethod GoogleCloudVisionV1p3beta1Word
8928	var s1 struct {
8929		Confidence gensupport.JSONFloat64 `json:"confidence"`
8930		*NoMethod
8931	}
8932	s1.NoMethod = (*NoMethod)(s)
8933	if err := json.Unmarshal(data, &s1); err != nil {
8934		return err
8935	}
8936	s.Confidence = float64(s1.Confidence)
8937	return nil
8938}
8939
8940// GoogleCloudVisionV1p4beta1AnnotateFileResponse: Response to a single
8941// file annotation request. A file may contain one or more images, which
8942// individually have their own responses.
8943type GoogleCloudVisionV1p4beta1AnnotateFileResponse struct {
8944	// Error: If set, represents the error message for the failed request.
8945	// The `responses` field will not be set in this case.
8946	Error *Status `json:"error,omitempty"`
8947
8948	// InputConfig: Information about the file for which this response is
8949	// generated.
8950	InputConfig *GoogleCloudVisionV1p4beta1InputConfig `json:"inputConfig,omitempty"`
8951
8952	// Responses: Individual responses to images found within the file. This
8953	// field will be empty if the `error` field is set.
8954	Responses []*GoogleCloudVisionV1p4beta1AnnotateImageResponse `json:"responses,omitempty"`
8955
8956	// TotalPages: This field gives the total number of pages in the file.
8957	TotalPages int64 `json:"totalPages,omitempty"`
8958
8959	// ForceSendFields is a list of field names (e.g. "Error") to
8960	// unconditionally include in API requests. By default, fields with
8961	// empty values are omitted from API requests. However, any non-pointer,
8962	// non-interface field appearing in ForceSendFields will be sent to the
8963	// server regardless of whether the field is empty or not. This may be
8964	// used to include empty fields in Patch requests.
8965	ForceSendFields []string `json:"-"`
8966
8967	// NullFields is a list of field names (e.g. "Error") to include in API
8968	// requests with the JSON null value. By default, fields with empty
8969	// values are omitted from API requests. However, any field with an
8970	// empty value appearing in NullFields will be sent to the server as
8971	// null. It is an error if a field in this list has a non-empty value.
8972	// This may be used to include null fields in Patch requests.
8973	NullFields []string `json:"-"`
8974}
8975
8976func (s *GoogleCloudVisionV1p4beta1AnnotateFileResponse) MarshalJSON() ([]byte, error) {
8977	type NoMethod GoogleCloudVisionV1p4beta1AnnotateFileResponse
8978	raw := NoMethod(*s)
8979	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
8980}
8981
8982// GoogleCloudVisionV1p4beta1AnnotateImageResponse: Response to an image
8983// annotation request.
8984type GoogleCloudVisionV1p4beta1AnnotateImageResponse struct {
8985	// Context: If present, contextual information is needed to understand
8986	// where this image comes from.
8987	Context *GoogleCloudVisionV1p4beta1ImageAnnotationContext `json:"context,omitempty"`
8988
8989	// CropHintsAnnotation: If present, crop hints have completed
8990	// successfully.
8991	CropHintsAnnotation *GoogleCloudVisionV1p4beta1CropHintsAnnotation `json:"cropHintsAnnotation,omitempty"`
8992
8993	// Error: If set, represents the error message for the operation. Note
8994	// that filled-in image annotations are guaranteed to be correct, even
8995	// when `error` is set.
8996	Error *Status `json:"error,omitempty"`
8997
8998	// FaceAnnotations: If present, face detection has completed
8999	// successfully.
9000	FaceAnnotations []*GoogleCloudVisionV1p4beta1FaceAnnotation `json:"faceAnnotations,omitempty"`
9001
9002	// FullTextAnnotation: If present, text (OCR) detection or document
9003	// (OCR) text detection has completed successfully. This annotation
9004	// provides the structural hierarchy for the OCR detected text.
9005	FullTextAnnotation *GoogleCloudVisionV1p4beta1TextAnnotation `json:"fullTextAnnotation,omitempty"`
9006
9007	// ImagePropertiesAnnotation: If present, image properties were
9008	// extracted successfully.
9009	ImagePropertiesAnnotation *GoogleCloudVisionV1p4beta1ImageProperties `json:"imagePropertiesAnnotation,omitempty"`
9010
9011	// LabelAnnotations: If present, label detection has completed
9012	// successfully.
9013	LabelAnnotations []*GoogleCloudVisionV1p4beta1EntityAnnotation `json:"labelAnnotations,omitempty"`
9014
9015	// LandmarkAnnotations: If present, landmark detection has completed
9016	// successfully.
9017	LandmarkAnnotations []*GoogleCloudVisionV1p4beta1EntityAnnotation `json:"landmarkAnnotations,omitempty"`
9018
9019	// LocalizedObjectAnnotations: If present, localized object detection
9020	// has completed successfully. This will be sorted descending by
9021	// confidence score.
9022	LocalizedObjectAnnotations []*GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation `json:"localizedObjectAnnotations,omitempty"`
9023
9024	// LogoAnnotations: If present, logo detection has completed
9025	// successfully.
9026	LogoAnnotations []*GoogleCloudVisionV1p4beta1EntityAnnotation `json:"logoAnnotations,omitempty"`
9027
9028	// ProductSearchResults: If present, product search has completed
9029	// successfully.
9030	ProductSearchResults *GoogleCloudVisionV1p4beta1ProductSearchResults `json:"productSearchResults,omitempty"`
9031
9032	// SafeSearchAnnotation: If present, safe-search annotation has
9033	// completed successfully.
9034	SafeSearchAnnotation *GoogleCloudVisionV1p4beta1SafeSearchAnnotation `json:"safeSearchAnnotation,omitempty"`
9035
9036	// TextAnnotations: If present, text (OCR) detection has completed
9037	// successfully.
9038	TextAnnotations []*GoogleCloudVisionV1p4beta1EntityAnnotation `json:"textAnnotations,omitempty"`
9039
9040	// WebDetection: If present, web detection has completed successfully.
9041	WebDetection *GoogleCloudVisionV1p4beta1WebDetection `json:"webDetection,omitempty"`
9042
9043	// ForceSendFields is a list of field names (e.g. "Context") to
9044	// unconditionally include in API requests. By default, fields with
9045	// empty values are omitted from API requests. However, any non-pointer,
9046	// non-interface field appearing in ForceSendFields will be sent to the
9047	// server regardless of whether the field is empty or not. This may be
9048	// used to include empty fields in Patch requests.
9049	ForceSendFields []string `json:"-"`
9050
9051	// NullFields is a list of field names (e.g. "Context") to include in
9052	// API requests with the JSON null value. By default, fields with empty
9053	// values are omitted from API requests. However, any field with an
9054	// empty value appearing in NullFields will be sent to the server as
9055	// null. It is an error if a field in this list has a non-empty value.
9056	// This may be used to include null fields in Patch requests.
9057	NullFields []string `json:"-"`
9058}
9059
9060func (s *GoogleCloudVisionV1p4beta1AnnotateImageResponse) MarshalJSON() ([]byte, error) {
9061	type NoMethod GoogleCloudVisionV1p4beta1AnnotateImageResponse
9062	raw := NoMethod(*s)
9063	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9064}
9065
9066// GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse: The response for
9067// a single offline file annotation request.
9068type GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse struct {
9069	// OutputConfig: The output location and metadata from
9070	// AsyncAnnotateFileRequest.
9071	OutputConfig *GoogleCloudVisionV1p4beta1OutputConfig `json:"outputConfig,omitempty"`
9072
9073	// ForceSendFields is a list of field names (e.g. "OutputConfig") to
9074	// unconditionally include in API requests. By default, fields with
9075	// empty values are omitted from API requests. However, any non-pointer,
9076	// non-interface field appearing in ForceSendFields will be sent to the
9077	// server regardless of whether the field is empty or not. This may be
9078	// used to include empty fields in Patch requests.
9079	ForceSendFields []string `json:"-"`
9080
9081	// NullFields is a list of field names (e.g. "OutputConfig") to include
9082	// in API requests with the JSON null value. By default, fields with
9083	// empty values are omitted from API requests. However, any field with
9084	// an empty value appearing in NullFields will be sent to the server as
9085	// null. It is an error if a field in this list has a non-empty value.
9086	// This may be used to include null fields in Patch requests.
9087	NullFields []string `json:"-"`
9088}
9089
9090func (s *GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse) MarshalJSON() ([]byte, error) {
9091	type NoMethod GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse
9092	raw := NoMethod(*s)
9093	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9094}
9095
9096// GoogleCloudVisionV1p4beta1AsyncBatchAnnotateFilesResponse: Response
9097// to an async batch file annotation request.
9098type GoogleCloudVisionV1p4beta1AsyncBatchAnnotateFilesResponse struct {
9099	// Responses: The list of file annotation responses, one for each
9100	// request in AsyncBatchAnnotateFilesRequest.
9101	Responses []*GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse `json:"responses,omitempty"`
9102
9103	// ForceSendFields is a list of field names (e.g. "Responses") to
9104	// unconditionally include in API requests. By default, fields with
9105	// empty values are omitted from API requests. However, any non-pointer,
9106	// non-interface field appearing in ForceSendFields will be sent to the
9107	// server regardless of whether the field is empty or not. This may be
9108	// used to include empty fields in Patch requests.
9109	ForceSendFields []string `json:"-"`
9110
9111	// NullFields is a list of field names (e.g. "Responses") to include in
9112	// API requests with the JSON null value. By default, fields with empty
9113	// values are omitted from API requests. However, any field with an
9114	// empty value appearing in NullFields will be sent to the server as
9115	// null. It is an error if a field in this list has a non-empty value.
9116	// This may be used to include null fields in Patch requests.
9117	NullFields []string `json:"-"`
9118}
9119
9120func (s *GoogleCloudVisionV1p4beta1AsyncBatchAnnotateFilesResponse) MarshalJSON() ([]byte, error) {
9121	type NoMethod GoogleCloudVisionV1p4beta1AsyncBatchAnnotateFilesResponse
9122	raw := NoMethod(*s)
9123	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9124}
9125
9126// GoogleCloudVisionV1p4beta1AsyncBatchAnnotateImagesResponse: Response
9127// to an async batch image annotation request.
9128type GoogleCloudVisionV1p4beta1AsyncBatchAnnotateImagesResponse struct {
9129	// OutputConfig: The output location and metadata from
9130	// AsyncBatchAnnotateImagesRequest.
9131	OutputConfig *GoogleCloudVisionV1p4beta1OutputConfig `json:"outputConfig,omitempty"`
9132
9133	// ForceSendFields is a list of field names (e.g. "OutputConfig") to
9134	// unconditionally include in API requests. By default, fields with
9135	// empty values are omitted from API requests. However, any non-pointer,
9136	// non-interface field appearing in ForceSendFields will be sent to the
9137	// server regardless of whether the field is empty or not. This may be
9138	// used to include empty fields in Patch requests.
9139	ForceSendFields []string `json:"-"`
9140
9141	// NullFields is a list of field names (e.g. "OutputConfig") to include
9142	// in API requests with the JSON null value. By default, fields with
9143	// empty values are omitted from API requests. However, any field with
9144	// an empty value appearing in NullFields will be sent to the server as
9145	// null. It is an error if a field in this list has a non-empty value.
9146	// This may be used to include null fields in Patch requests.
9147	NullFields []string `json:"-"`
9148}
9149
9150func (s *GoogleCloudVisionV1p4beta1AsyncBatchAnnotateImagesResponse) MarshalJSON() ([]byte, error) {
9151	type NoMethod GoogleCloudVisionV1p4beta1AsyncBatchAnnotateImagesResponse
9152	raw := NoMethod(*s)
9153	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9154}
9155
9156// GoogleCloudVisionV1p4beta1BatchAnnotateFilesResponse: A list of file
9157// annotation responses.
9158type GoogleCloudVisionV1p4beta1BatchAnnotateFilesResponse struct {
9159	// Responses: The list of file annotation responses, each response
9160	// corresponding to each AnnotateFileRequest in
9161	// BatchAnnotateFilesRequest.
9162	Responses []*GoogleCloudVisionV1p4beta1AnnotateFileResponse `json:"responses,omitempty"`
9163
9164	// ForceSendFields is a list of field names (e.g. "Responses") to
9165	// unconditionally include in API requests. By default, fields with
9166	// empty values are omitted from API requests. However, any non-pointer,
9167	// non-interface field appearing in ForceSendFields will be sent to the
9168	// server regardless of whether the field is empty or not. This may be
9169	// used to include empty fields in Patch requests.
9170	ForceSendFields []string `json:"-"`
9171
9172	// NullFields is a list of field names (e.g. "Responses") to include in
9173	// API requests with the JSON null value. By default, fields with empty
9174	// values are omitted from API requests. However, any field with an
9175	// empty value appearing in NullFields will be sent to the server as
9176	// null. It is an error if a field in this list has a non-empty value.
9177	// This may be used to include null fields in Patch requests.
9178	NullFields []string `json:"-"`
9179}
9180
9181func (s *GoogleCloudVisionV1p4beta1BatchAnnotateFilesResponse) MarshalJSON() ([]byte, error) {
9182	type NoMethod GoogleCloudVisionV1p4beta1BatchAnnotateFilesResponse
9183	raw := NoMethod(*s)
9184	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9185}
9186
9187// GoogleCloudVisionV1p4beta1BatchOperationMetadata: Metadata for the
9188// batch operations such as the current state. This is included in the
9189// `metadata` field of the `Operation` returned by the `GetOperation`
9190// call of the `google::longrunning::Operations` service.
9191type GoogleCloudVisionV1p4beta1BatchOperationMetadata struct {
9192	// EndTime: The time when the batch request is finished and
9193	// google.longrunning.Operation.done is set to true.
9194	EndTime string `json:"endTime,omitempty"`
9195
9196	// State: The current state of the batch operation.
9197	//
9198	// Possible values:
9199	//   "STATE_UNSPECIFIED" - Invalid.
9200	//   "PROCESSING" - Request is actively being processed.
9201	//   "SUCCESSFUL" - The request is done and at least one item has been
9202	// successfully processed.
9203	//   "FAILED" - The request is done and no item has been successfully
9204	// processed.
9205	//   "CANCELLED" - The request is done after the
9206	// longrunning.Operations.CancelOperation has been called by the user.
9207	// Any records that were processed before the cancel command are output
9208	// as specified in the request.
9209	State string `json:"state,omitempty"`
9210
9211	// SubmitTime: The time when the batch request was submitted to the
9212	// server.
9213	SubmitTime string `json:"submitTime,omitempty"`
9214
9215	// ForceSendFields is a list of field names (e.g. "EndTime") to
9216	// unconditionally include in API requests. By default, fields with
9217	// empty values are omitted from API requests. However, any non-pointer,
9218	// non-interface field appearing in ForceSendFields will be sent to the
9219	// server regardless of whether the field is empty or not. This may be
9220	// used to include empty fields in Patch requests.
9221	ForceSendFields []string `json:"-"`
9222
9223	// NullFields is a list of field names (e.g. "EndTime") to include in
9224	// API requests with the JSON null value. By default, fields with empty
9225	// values are omitted from API requests. However, any field with an
9226	// empty value appearing in NullFields will be sent to the server as
9227	// null. It is an error if a field in this list has a non-empty value.
9228	// This may be used to include null fields in Patch requests.
9229	NullFields []string `json:"-"`
9230}
9231
9232func (s *GoogleCloudVisionV1p4beta1BatchOperationMetadata) MarshalJSON() ([]byte, error) {
9233	type NoMethod GoogleCloudVisionV1p4beta1BatchOperationMetadata
9234	raw := NoMethod(*s)
9235	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9236}
9237
9238// GoogleCloudVisionV1p4beta1Block: Logical element on the page.
9239type GoogleCloudVisionV1p4beta1Block struct {
9240	// BlockType: Detected block type (text, image etc) for this block.
9241	//
9242	// Possible values:
9243	//   "UNKNOWN" - Unknown block type.
9244	//   "TEXT" - Regular text block.
9245	//   "TABLE" - Table block.
9246	//   "PICTURE" - Image block.
9247	//   "RULER" - Horizontal/vertical line box.
9248	//   "BARCODE" - Barcode block.
9249	BlockType string `json:"blockType,omitempty"`
9250
9251	// BoundingBox: The bounding box for the block. The vertices are in the
9252	// order of top-left, top-right, bottom-right, bottom-left. When a
9253	// rotation of the bounding box is detected the rotation is represented
9254	// as around the top-left corner as defined when the text is read in the
9255	// 'natural' orientation. For example: * when the text is horizontal it
9256	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
9257	// around the top-left corner it becomes: 2----3 | | 1----0 and the
9258	// vertex order will still be (0, 1, 2, 3).
9259	BoundingBox *GoogleCloudVisionV1p4beta1BoundingPoly `json:"boundingBox,omitempty"`
9260
9261	// Confidence: Confidence of the OCR results on the block. Range [0, 1].
9262	Confidence float64 `json:"confidence,omitempty"`
9263
9264	// Paragraphs: List of paragraphs in this block (if this blocks is of
9265	// type text).
9266	Paragraphs []*GoogleCloudVisionV1p4beta1Paragraph `json:"paragraphs,omitempty"`
9267
9268	// Property: Additional information detected for the block.
9269	Property *GoogleCloudVisionV1p4beta1TextAnnotationTextProperty `json:"property,omitempty"`
9270
9271	// ForceSendFields is a list of field names (e.g. "BlockType") to
9272	// unconditionally include in API requests. By default, fields with
9273	// empty values are omitted from API requests. However, any non-pointer,
9274	// non-interface field appearing in ForceSendFields will be sent to the
9275	// server regardless of whether the field is empty or not. This may be
9276	// used to include empty fields in Patch requests.
9277	ForceSendFields []string `json:"-"`
9278
9279	// NullFields is a list of field names (e.g. "BlockType") to include in
9280	// API requests with the JSON null value. By default, fields with empty
9281	// values are omitted from API requests. However, any field with an
9282	// empty value appearing in NullFields will be sent to the server as
9283	// null. It is an error if a field in this list has a non-empty value.
9284	// This may be used to include null fields in Patch requests.
9285	NullFields []string `json:"-"`
9286}
9287
9288func (s *GoogleCloudVisionV1p4beta1Block) MarshalJSON() ([]byte, error) {
9289	type NoMethod GoogleCloudVisionV1p4beta1Block
9290	raw := NoMethod(*s)
9291	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9292}
9293
9294func (s *GoogleCloudVisionV1p4beta1Block) UnmarshalJSON(data []byte) error {
9295	type NoMethod GoogleCloudVisionV1p4beta1Block
9296	var s1 struct {
9297		Confidence gensupport.JSONFloat64 `json:"confidence"`
9298		*NoMethod
9299	}
9300	s1.NoMethod = (*NoMethod)(s)
9301	if err := json.Unmarshal(data, &s1); err != nil {
9302		return err
9303	}
9304	s.Confidence = float64(s1.Confidence)
9305	return nil
9306}
9307
9308// GoogleCloudVisionV1p4beta1BoundingPoly: A bounding polygon for the
9309// detected image annotation.
9310type GoogleCloudVisionV1p4beta1BoundingPoly struct {
9311	// NormalizedVertices: The bounding polygon normalized vertices.
9312	NormalizedVertices []*GoogleCloudVisionV1p4beta1NormalizedVertex `json:"normalizedVertices,omitempty"`
9313
9314	// Vertices: The bounding polygon vertices.
9315	Vertices []*GoogleCloudVisionV1p4beta1Vertex `json:"vertices,omitempty"`
9316
9317	// ForceSendFields is a list of field names (e.g. "NormalizedVertices")
9318	// to unconditionally include in API requests. By default, fields with
9319	// empty values are omitted from API requests. However, any non-pointer,
9320	// non-interface field appearing in ForceSendFields will be sent to the
9321	// server regardless of whether the field is empty or not. This may be
9322	// used to include empty fields in Patch requests.
9323	ForceSendFields []string `json:"-"`
9324
9325	// NullFields is a list of field names (e.g. "NormalizedVertices") to
9326	// include in API requests with the JSON null value. By default, fields
9327	// with empty values are omitted from API requests. However, any field
9328	// with an empty value appearing in NullFields will be sent to the
9329	// server as null. It is an error if a field in this list has a
9330	// non-empty value. This may be used to include null fields in Patch
9331	// requests.
9332	NullFields []string `json:"-"`
9333}
9334
9335func (s *GoogleCloudVisionV1p4beta1BoundingPoly) MarshalJSON() ([]byte, error) {
9336	type NoMethod GoogleCloudVisionV1p4beta1BoundingPoly
9337	raw := NoMethod(*s)
9338	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9339}
9340
9341// GoogleCloudVisionV1p4beta1Celebrity: A Celebrity is a group of Faces
9342// with an identity.
9343type GoogleCloudVisionV1p4beta1Celebrity struct {
9344	// Description: The Celebrity's description.
9345	Description string `json:"description,omitempty"`
9346
9347	// DisplayName: The Celebrity's display name.
9348	DisplayName string `json:"displayName,omitempty"`
9349
9350	// Name: The resource name of the preloaded Celebrity. Has the format
9351	// `builtin/{mid}`.
9352	Name string `json:"name,omitempty"`
9353
9354	// ForceSendFields is a list of field names (e.g. "Description") to
9355	// unconditionally include in API requests. By default, fields with
9356	// empty values are omitted from API requests. However, any non-pointer,
9357	// non-interface field appearing in ForceSendFields will be sent to the
9358	// server regardless of whether the field is empty or not. This may be
9359	// used to include empty fields in Patch requests.
9360	ForceSendFields []string `json:"-"`
9361
9362	// NullFields is a list of field names (e.g. "Description") to include
9363	// in API requests with the JSON null value. By default, fields with
9364	// empty values are omitted from API requests. However, any field with
9365	// an empty value appearing in NullFields will be sent to the server as
9366	// null. It is an error if a field in this list has a non-empty value.
9367	// This may be used to include null fields in Patch requests.
9368	NullFields []string `json:"-"`
9369}
9370
9371func (s *GoogleCloudVisionV1p4beta1Celebrity) MarshalJSON() ([]byte, error) {
9372	type NoMethod GoogleCloudVisionV1p4beta1Celebrity
9373	raw := NoMethod(*s)
9374	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9375}
9376
9377// GoogleCloudVisionV1p4beta1ColorInfo: Color information consists of
9378// RGB channels, score, and the fraction of the image that the color
9379// occupies in the image.
9380type GoogleCloudVisionV1p4beta1ColorInfo struct {
9381	// Color: RGB components of the color.
9382	Color *Color `json:"color,omitempty"`
9383
9384	// PixelFraction: The fraction of pixels the color occupies in the
9385	// image. Value in range [0, 1].
9386	PixelFraction float64 `json:"pixelFraction,omitempty"`
9387
9388	// Score: Image-specific score for this color. Value in range [0, 1].
9389	Score float64 `json:"score,omitempty"`
9390
9391	// ForceSendFields is a list of field names (e.g. "Color") to
9392	// unconditionally include in API requests. By default, fields with
9393	// empty values are omitted from API requests. However, any non-pointer,
9394	// non-interface field appearing in ForceSendFields will be sent to the
9395	// server regardless of whether the field is empty or not. This may be
9396	// used to include empty fields in Patch requests.
9397	ForceSendFields []string `json:"-"`
9398
9399	// NullFields is a list of field names (e.g. "Color") to include in API
9400	// requests with the JSON null value. By default, fields with empty
9401	// values are omitted from API requests. However, any field with an
9402	// empty value appearing in NullFields will be sent to the server as
9403	// null. It is an error if a field in this list has a non-empty value.
9404	// This may be used to include null fields in Patch requests.
9405	NullFields []string `json:"-"`
9406}
9407
9408func (s *GoogleCloudVisionV1p4beta1ColorInfo) MarshalJSON() ([]byte, error) {
9409	type NoMethod GoogleCloudVisionV1p4beta1ColorInfo
9410	raw := NoMethod(*s)
9411	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9412}
9413
9414func (s *GoogleCloudVisionV1p4beta1ColorInfo) UnmarshalJSON(data []byte) error {
9415	type NoMethod GoogleCloudVisionV1p4beta1ColorInfo
9416	var s1 struct {
9417		PixelFraction gensupport.JSONFloat64 `json:"pixelFraction"`
9418		Score         gensupport.JSONFloat64 `json:"score"`
9419		*NoMethod
9420	}
9421	s1.NoMethod = (*NoMethod)(s)
9422	if err := json.Unmarshal(data, &s1); err != nil {
9423		return err
9424	}
9425	s.PixelFraction = float64(s1.PixelFraction)
9426	s.Score = float64(s1.Score)
9427	return nil
9428}
9429
9430// GoogleCloudVisionV1p4beta1CropHint: Single crop hint that is used to
9431// generate a new crop when serving an image.
9432type GoogleCloudVisionV1p4beta1CropHint struct {
9433	// BoundingPoly: The bounding polygon for the crop region. The
9434	// coordinates of the bounding box are in the original image's scale.
9435	BoundingPoly *GoogleCloudVisionV1p4beta1BoundingPoly `json:"boundingPoly,omitempty"`
9436
9437	// Confidence: Confidence of this being a salient region. Range [0, 1].
9438	Confidence float64 `json:"confidence,omitempty"`
9439
9440	// ImportanceFraction: Fraction of importance of this salient region
9441	// with respect to the original image.
9442	ImportanceFraction float64 `json:"importanceFraction,omitempty"`
9443
9444	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
9445	// unconditionally include in API requests. By default, fields with
9446	// empty values are omitted from API requests. However, any non-pointer,
9447	// non-interface field appearing in ForceSendFields will be sent to the
9448	// server regardless of whether the field is empty or not. This may be
9449	// used to include empty fields in Patch requests.
9450	ForceSendFields []string `json:"-"`
9451
9452	// NullFields is a list of field names (e.g. "BoundingPoly") to include
9453	// in API requests with the JSON null value. By default, fields with
9454	// empty values are omitted from API requests. However, any field with
9455	// an empty value appearing in NullFields will be sent to the server as
9456	// null. It is an error if a field in this list has a non-empty value.
9457	// This may be used to include null fields in Patch requests.
9458	NullFields []string `json:"-"`
9459}
9460
9461func (s *GoogleCloudVisionV1p4beta1CropHint) MarshalJSON() ([]byte, error) {
9462	type NoMethod GoogleCloudVisionV1p4beta1CropHint
9463	raw := NoMethod(*s)
9464	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9465}
9466
9467func (s *GoogleCloudVisionV1p4beta1CropHint) UnmarshalJSON(data []byte) error {
9468	type NoMethod GoogleCloudVisionV1p4beta1CropHint
9469	var s1 struct {
9470		Confidence         gensupport.JSONFloat64 `json:"confidence"`
9471		ImportanceFraction gensupport.JSONFloat64 `json:"importanceFraction"`
9472		*NoMethod
9473	}
9474	s1.NoMethod = (*NoMethod)(s)
9475	if err := json.Unmarshal(data, &s1); err != nil {
9476		return err
9477	}
9478	s.Confidence = float64(s1.Confidence)
9479	s.ImportanceFraction = float64(s1.ImportanceFraction)
9480	return nil
9481}
9482
9483// GoogleCloudVisionV1p4beta1CropHintsAnnotation: Set of crop hints that
9484// are used to generate new crops when serving images.
9485type GoogleCloudVisionV1p4beta1CropHintsAnnotation struct {
9486	// CropHints: Crop hint results.
9487	CropHints []*GoogleCloudVisionV1p4beta1CropHint `json:"cropHints,omitempty"`
9488
9489	// ForceSendFields is a list of field names (e.g. "CropHints") to
9490	// unconditionally include in API requests. By default, fields with
9491	// empty values are omitted from API requests. However, any non-pointer,
9492	// non-interface field appearing in ForceSendFields will be sent to the
9493	// server regardless of whether the field is empty or not. This may be
9494	// used to include empty fields in Patch requests.
9495	ForceSendFields []string `json:"-"`
9496
9497	// NullFields is a list of field names (e.g. "CropHints") to include in
9498	// API requests with the JSON null value. By default, fields with empty
9499	// values are omitted from API requests. However, any field with an
9500	// empty value appearing in NullFields will be sent to the server as
9501	// null. It is an error if a field in this list has a non-empty value.
9502	// This may be used to include null fields in Patch requests.
9503	NullFields []string `json:"-"`
9504}
9505
9506func (s *GoogleCloudVisionV1p4beta1CropHintsAnnotation) MarshalJSON() ([]byte, error) {
9507	type NoMethod GoogleCloudVisionV1p4beta1CropHintsAnnotation
9508	raw := NoMethod(*s)
9509	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9510}
9511
9512// GoogleCloudVisionV1p4beta1DominantColorsAnnotation: Set of dominant
9513// colors and their corresponding scores.
9514type GoogleCloudVisionV1p4beta1DominantColorsAnnotation struct {
9515	// Colors: RGB color values with their score and pixel fraction.
9516	Colors []*GoogleCloudVisionV1p4beta1ColorInfo `json:"colors,omitempty"`
9517
9518	// ForceSendFields is a list of field names (e.g. "Colors") to
9519	// unconditionally include in API requests. By default, fields with
9520	// empty values are omitted from API requests. However, any non-pointer,
9521	// non-interface field appearing in ForceSendFields will be sent to the
9522	// server regardless of whether the field is empty or not. This may be
9523	// used to include empty fields in Patch requests.
9524	ForceSendFields []string `json:"-"`
9525
9526	// NullFields is a list of field names (e.g. "Colors") to include in API
9527	// requests with the JSON null value. By default, fields with empty
9528	// values are omitted from API requests. However, any field with an
9529	// empty value appearing in NullFields will be sent to the server as
9530	// null. It is an error if a field in this list has a non-empty value.
9531	// This may be used to include null fields in Patch requests.
9532	NullFields []string `json:"-"`
9533}
9534
9535func (s *GoogleCloudVisionV1p4beta1DominantColorsAnnotation) MarshalJSON() ([]byte, error) {
9536	type NoMethod GoogleCloudVisionV1p4beta1DominantColorsAnnotation
9537	raw := NoMethod(*s)
9538	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9539}
9540
9541// GoogleCloudVisionV1p4beta1EntityAnnotation: Set of detected entity
9542// features.
9543type GoogleCloudVisionV1p4beta1EntityAnnotation struct {
9544	// BoundingPoly: Image region to which this entity belongs. Not produced
9545	// for `LABEL_DETECTION` features.
9546	BoundingPoly *GoogleCloudVisionV1p4beta1BoundingPoly `json:"boundingPoly,omitempty"`
9547
9548	// Confidence: **Deprecated. Use `score` instead.** The accuracy of the
9549	// entity detection in an image. For example, for an image in which the
9550	// "Eiffel Tower" entity is detected, this field represents the
9551	// confidence that there is a tower in the query image. Range [0, 1].
9552	Confidence float64 `json:"confidence,omitempty"`
9553
9554	// Description: Entity textual description, expressed in its `locale`
9555	// language.
9556	Description string `json:"description,omitempty"`
9557
9558	// Locale: The language code for the locale in which the entity textual
9559	// `description` is expressed.
9560	Locale string `json:"locale,omitempty"`
9561
9562	// Locations: The location information for the detected entity. Multiple
9563	// `LocationInfo` elements can be present because one location may
9564	// indicate the location of the scene in the image, and another location
9565	// may indicate the location of the place where the image was taken.
9566	// Location information is usually present for landmarks.
9567	Locations []*GoogleCloudVisionV1p4beta1LocationInfo `json:"locations,omitempty"`
9568
9569	// Mid: Opaque entity ID. Some IDs may be available in Google Knowledge
9570	// Graph Search API (https://developers.google.com/knowledge-graph/).
9571	Mid string `json:"mid,omitempty"`
9572
9573	// Properties: Some entities may have optional user-supplied `Property`
9574	// (name/value) fields, such a score or string that qualifies the
9575	// entity.
9576	Properties []*GoogleCloudVisionV1p4beta1Property `json:"properties,omitempty"`
9577
9578	// Score: Overall score of the result. Range [0, 1].
9579	Score float64 `json:"score,omitempty"`
9580
9581	// Topicality: The relevancy of the ICA (Image Content Annotation) label
9582	// to the image. For example, the relevancy of "tower" is likely higher
9583	// to an image containing the detected "Eiffel Tower" than to an image
9584	// containing a detected distant towering building, even though the
9585	// confidence that there is a tower in each image may be the same. Range
9586	// [0, 1].
9587	Topicality float64 `json:"topicality,omitempty"`
9588
9589	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
9590	// unconditionally include in API requests. By default, fields with
9591	// empty values are omitted from API requests. However, any non-pointer,
9592	// non-interface field appearing in ForceSendFields will be sent to the
9593	// server regardless of whether the field is empty or not. This may be
9594	// used to include empty fields in Patch requests.
9595	ForceSendFields []string `json:"-"`
9596
9597	// NullFields is a list of field names (e.g. "BoundingPoly") to include
9598	// in API requests with the JSON null value. By default, fields with
9599	// empty values are omitted from API requests. However, any field with
9600	// an empty value appearing in NullFields will be sent to the server as
9601	// null. It is an error if a field in this list has a non-empty value.
9602	// This may be used to include null fields in Patch requests.
9603	NullFields []string `json:"-"`
9604}
9605
9606func (s *GoogleCloudVisionV1p4beta1EntityAnnotation) MarshalJSON() ([]byte, error) {
9607	type NoMethod GoogleCloudVisionV1p4beta1EntityAnnotation
9608	raw := NoMethod(*s)
9609	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9610}
9611
9612func (s *GoogleCloudVisionV1p4beta1EntityAnnotation) UnmarshalJSON(data []byte) error {
9613	type NoMethod GoogleCloudVisionV1p4beta1EntityAnnotation
9614	var s1 struct {
9615		Confidence gensupport.JSONFloat64 `json:"confidence"`
9616		Score      gensupport.JSONFloat64 `json:"score"`
9617		Topicality gensupport.JSONFloat64 `json:"topicality"`
9618		*NoMethod
9619	}
9620	s1.NoMethod = (*NoMethod)(s)
9621	if err := json.Unmarshal(data, &s1); err != nil {
9622		return err
9623	}
9624	s.Confidence = float64(s1.Confidence)
9625	s.Score = float64(s1.Score)
9626	s.Topicality = float64(s1.Topicality)
9627	return nil
9628}
9629
9630// GoogleCloudVisionV1p4beta1FaceAnnotation: A face annotation object
9631// contains the results of face detection.
9632type GoogleCloudVisionV1p4beta1FaceAnnotation struct {
9633	// AngerLikelihood: Anger likelihood.
9634	//
9635	// Possible values:
9636	//   "UNKNOWN" - Unknown likelihood.
9637	//   "VERY_UNLIKELY" - It is very unlikely.
9638	//   "UNLIKELY" - It is unlikely.
9639	//   "POSSIBLE" - It is possible.
9640	//   "LIKELY" - It is likely.
9641	//   "VERY_LIKELY" - It is very likely.
9642	AngerLikelihood string `json:"angerLikelihood,omitempty"`
9643
9644	// BlurredLikelihood: Blurred likelihood.
9645	//
9646	// Possible values:
9647	//   "UNKNOWN" - Unknown likelihood.
9648	//   "VERY_UNLIKELY" - It is very unlikely.
9649	//   "UNLIKELY" - It is unlikely.
9650	//   "POSSIBLE" - It is possible.
9651	//   "LIKELY" - It is likely.
9652	//   "VERY_LIKELY" - It is very likely.
9653	BlurredLikelihood string `json:"blurredLikelihood,omitempty"`
9654
9655	// BoundingPoly: The bounding polygon around the face. The coordinates
9656	// of the bounding box are in the original image's scale. The bounding
9657	// box is computed to "frame" the face in accordance with human
9658	// expectations. It is based on the landmarker results. Note that one or
9659	// more x and/or y coordinates may not be generated in the
9660	// `BoundingPoly` (the polygon will be unbounded) if only a partial face
9661	// appears in the image to be annotated.
9662	BoundingPoly *GoogleCloudVisionV1p4beta1BoundingPoly `json:"boundingPoly,omitempty"`
9663
9664	// DetectionConfidence: Detection confidence. Range [0, 1].
9665	DetectionConfidence float64 `json:"detectionConfidence,omitempty"`
9666
9667	// FdBoundingPoly: The `fd_bounding_poly` bounding polygon is tighter
9668	// than the `boundingPoly`, and encloses only the skin part of the face.
9669	// Typically, it is used to eliminate the face from any image analysis
9670	// that detects the "amount of skin" visible in an image. It is not
9671	// based on the landmarker results, only on the initial face detection,
9672	// hence the fd (face detection) prefix.
9673	FdBoundingPoly *GoogleCloudVisionV1p4beta1BoundingPoly `json:"fdBoundingPoly,omitempty"`
9674
9675	// HeadwearLikelihood: Headwear likelihood.
9676	//
9677	// Possible values:
9678	//   "UNKNOWN" - Unknown likelihood.
9679	//   "VERY_UNLIKELY" - It is very unlikely.
9680	//   "UNLIKELY" - It is unlikely.
9681	//   "POSSIBLE" - It is possible.
9682	//   "LIKELY" - It is likely.
9683	//   "VERY_LIKELY" - It is very likely.
9684	HeadwearLikelihood string `json:"headwearLikelihood,omitempty"`
9685
9686	// JoyLikelihood: Joy likelihood.
9687	//
9688	// Possible values:
9689	//   "UNKNOWN" - Unknown likelihood.
9690	//   "VERY_UNLIKELY" - It is very unlikely.
9691	//   "UNLIKELY" - It is unlikely.
9692	//   "POSSIBLE" - It is possible.
9693	//   "LIKELY" - It is likely.
9694	//   "VERY_LIKELY" - It is very likely.
9695	JoyLikelihood string `json:"joyLikelihood,omitempty"`
9696
9697	// LandmarkingConfidence: Face landmarking confidence. Range [0, 1].
9698	LandmarkingConfidence float64 `json:"landmarkingConfidence,omitempty"`
9699
9700	// Landmarks: Detected face landmarks.
9701	Landmarks []*GoogleCloudVisionV1p4beta1FaceAnnotationLandmark `json:"landmarks,omitempty"`
9702
9703	// PanAngle: Yaw angle, which indicates the leftward/rightward angle
9704	// that the face is pointing relative to the vertical plane
9705	// perpendicular to the image. Range [-180,180].
9706	PanAngle float64 `json:"panAngle,omitempty"`
9707
9708	// RecognitionResult: Additional recognition information. Only computed
9709	// if image_context.face_recognition_params is provided, **and** a match
9710	// is found to a Celebrity in the input CelebritySet. This field is
9711	// sorted in order of decreasing confidence values.
9712	RecognitionResult []*GoogleCloudVisionV1p4beta1FaceRecognitionResult `json:"recognitionResult,omitempty"`
9713
9714	// RollAngle: Roll angle, which indicates the amount of
9715	// clockwise/anti-clockwise rotation of the face relative to the image
9716	// vertical about the axis perpendicular to the face. Range [-180,180].
9717	RollAngle float64 `json:"rollAngle,omitempty"`
9718
9719	// SorrowLikelihood: Sorrow likelihood.
9720	//
9721	// Possible values:
9722	//   "UNKNOWN" - Unknown likelihood.
9723	//   "VERY_UNLIKELY" - It is very unlikely.
9724	//   "UNLIKELY" - It is unlikely.
9725	//   "POSSIBLE" - It is possible.
9726	//   "LIKELY" - It is likely.
9727	//   "VERY_LIKELY" - It is very likely.
9728	SorrowLikelihood string `json:"sorrowLikelihood,omitempty"`
9729
9730	// SurpriseLikelihood: Surprise likelihood.
9731	//
9732	// Possible values:
9733	//   "UNKNOWN" - Unknown likelihood.
9734	//   "VERY_UNLIKELY" - It is very unlikely.
9735	//   "UNLIKELY" - It is unlikely.
9736	//   "POSSIBLE" - It is possible.
9737	//   "LIKELY" - It is likely.
9738	//   "VERY_LIKELY" - It is very likely.
9739	SurpriseLikelihood string `json:"surpriseLikelihood,omitempty"`
9740
9741	// TiltAngle: Pitch angle, which indicates the upwards/downwards angle
9742	// that the face is pointing relative to the image's horizontal plane.
9743	// Range [-180,180].
9744	TiltAngle float64 `json:"tiltAngle,omitempty"`
9745
9746	// UnderExposedLikelihood: Under-exposed likelihood.
9747	//
9748	// Possible values:
9749	//   "UNKNOWN" - Unknown likelihood.
9750	//   "VERY_UNLIKELY" - It is very unlikely.
9751	//   "UNLIKELY" - It is unlikely.
9752	//   "POSSIBLE" - It is possible.
9753	//   "LIKELY" - It is likely.
9754	//   "VERY_LIKELY" - It is very likely.
9755	UnderExposedLikelihood string `json:"underExposedLikelihood,omitempty"`
9756
9757	// ForceSendFields is a list of field names (e.g. "AngerLikelihood") to
9758	// unconditionally include in API requests. By default, fields with
9759	// empty values are omitted from API requests. However, any non-pointer,
9760	// non-interface field appearing in ForceSendFields will be sent to the
9761	// server regardless of whether the field is empty or not. This may be
9762	// used to include empty fields in Patch requests.
9763	ForceSendFields []string `json:"-"`
9764
9765	// NullFields is a list of field names (e.g. "AngerLikelihood") to
9766	// include in API requests with the JSON null value. By default, fields
9767	// with empty values are omitted from API requests. However, any field
9768	// with an empty value appearing in NullFields will be sent to the
9769	// server as null. It is an error if a field in this list has a
9770	// non-empty value. This may be used to include null fields in Patch
9771	// requests.
9772	NullFields []string `json:"-"`
9773}
9774
9775func (s *GoogleCloudVisionV1p4beta1FaceAnnotation) MarshalJSON() ([]byte, error) {
9776	type NoMethod GoogleCloudVisionV1p4beta1FaceAnnotation
9777	raw := NoMethod(*s)
9778	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9779}
9780
9781func (s *GoogleCloudVisionV1p4beta1FaceAnnotation) UnmarshalJSON(data []byte) error {
9782	type NoMethod GoogleCloudVisionV1p4beta1FaceAnnotation
9783	var s1 struct {
9784		DetectionConfidence   gensupport.JSONFloat64 `json:"detectionConfidence"`
9785		LandmarkingConfidence gensupport.JSONFloat64 `json:"landmarkingConfidence"`
9786		PanAngle              gensupport.JSONFloat64 `json:"panAngle"`
9787		RollAngle             gensupport.JSONFloat64 `json:"rollAngle"`
9788		TiltAngle             gensupport.JSONFloat64 `json:"tiltAngle"`
9789		*NoMethod
9790	}
9791	s1.NoMethod = (*NoMethod)(s)
9792	if err := json.Unmarshal(data, &s1); err != nil {
9793		return err
9794	}
9795	s.DetectionConfidence = float64(s1.DetectionConfidence)
9796	s.LandmarkingConfidence = float64(s1.LandmarkingConfidence)
9797	s.PanAngle = float64(s1.PanAngle)
9798	s.RollAngle = float64(s1.RollAngle)
9799	s.TiltAngle = float64(s1.TiltAngle)
9800	return nil
9801}
9802
9803// GoogleCloudVisionV1p4beta1FaceAnnotationLandmark: A face-specific
9804// landmark (for example, a face feature).
9805type GoogleCloudVisionV1p4beta1FaceAnnotationLandmark struct {
9806	// Position: Face landmark position.
9807	Position *GoogleCloudVisionV1p4beta1Position `json:"position,omitempty"`
9808
9809	// Type: Face landmark type.
9810	//
9811	// Possible values:
9812	//   "UNKNOWN_LANDMARK" - Unknown face landmark detected. Should not be
9813	// filled.
9814	//   "LEFT_EYE" - Left eye.
9815	//   "RIGHT_EYE" - Right eye.
9816	//   "LEFT_OF_LEFT_EYEBROW" - Left of left eyebrow.
9817	//   "RIGHT_OF_LEFT_EYEBROW" - Right of left eyebrow.
9818	//   "LEFT_OF_RIGHT_EYEBROW" - Left of right eyebrow.
9819	//   "RIGHT_OF_RIGHT_EYEBROW" - Right of right eyebrow.
9820	//   "MIDPOINT_BETWEEN_EYES" - Midpoint between eyes.
9821	//   "NOSE_TIP" - Nose tip.
9822	//   "UPPER_LIP" - Upper lip.
9823	//   "LOWER_LIP" - Lower lip.
9824	//   "MOUTH_LEFT" - Mouth left.
9825	//   "MOUTH_RIGHT" - Mouth right.
9826	//   "MOUTH_CENTER" - Mouth center.
9827	//   "NOSE_BOTTOM_RIGHT" - Nose, bottom right.
9828	//   "NOSE_BOTTOM_LEFT" - Nose, bottom left.
9829	//   "NOSE_BOTTOM_CENTER" - Nose, bottom center.
9830	//   "LEFT_EYE_TOP_BOUNDARY" - Left eye, top boundary.
9831	//   "LEFT_EYE_RIGHT_CORNER" - Left eye, right corner.
9832	//   "LEFT_EYE_BOTTOM_BOUNDARY" - Left eye, bottom boundary.
9833	//   "LEFT_EYE_LEFT_CORNER" - Left eye, left corner.
9834	//   "RIGHT_EYE_TOP_BOUNDARY" - Right eye, top boundary.
9835	//   "RIGHT_EYE_RIGHT_CORNER" - Right eye, right corner.
9836	//   "RIGHT_EYE_BOTTOM_BOUNDARY" - Right eye, bottom boundary.
9837	//   "RIGHT_EYE_LEFT_CORNER" - Right eye, left corner.
9838	//   "LEFT_EYEBROW_UPPER_MIDPOINT" - Left eyebrow, upper midpoint.
9839	//   "RIGHT_EYEBROW_UPPER_MIDPOINT" - Right eyebrow, upper midpoint.
9840	//   "LEFT_EAR_TRAGION" - Left ear tragion.
9841	//   "RIGHT_EAR_TRAGION" - Right ear tragion.
9842	//   "LEFT_EYE_PUPIL" - Left eye pupil.
9843	//   "RIGHT_EYE_PUPIL" - Right eye pupil.
9844	//   "FOREHEAD_GLABELLA" - Forehead glabella.
9845	//   "CHIN_GNATHION" - Chin gnathion.
9846	//   "CHIN_LEFT_GONION" - Chin left gonion.
9847	//   "CHIN_RIGHT_GONION" - Chin right gonion.
9848	//   "LEFT_CHEEK_CENTER" - Left cheek center.
9849	//   "RIGHT_CHEEK_CENTER" - Right cheek center.
9850	Type string `json:"type,omitempty"`
9851
9852	// ForceSendFields is a list of field names (e.g. "Position") to
9853	// unconditionally include in API requests. By default, fields with
9854	// empty values are omitted from API requests. However, any non-pointer,
9855	// non-interface field appearing in ForceSendFields will be sent to the
9856	// server regardless of whether the field is empty or not. This may be
9857	// used to include empty fields in Patch requests.
9858	ForceSendFields []string `json:"-"`
9859
9860	// NullFields is a list of field names (e.g. "Position") to include in
9861	// API requests with the JSON null value. By default, fields with empty
9862	// values are omitted from API requests. However, any field with an
9863	// empty value appearing in NullFields will be sent to the server as
9864	// null. It is an error if a field in this list has a non-empty value.
9865	// This may be used to include null fields in Patch requests.
9866	NullFields []string `json:"-"`
9867}
9868
9869func (s *GoogleCloudVisionV1p4beta1FaceAnnotationLandmark) MarshalJSON() ([]byte, error) {
9870	type NoMethod GoogleCloudVisionV1p4beta1FaceAnnotationLandmark
9871	raw := NoMethod(*s)
9872	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9873}
9874
9875// GoogleCloudVisionV1p4beta1FaceRecognitionResult: Information about a
9876// face's identity.
9877type GoogleCloudVisionV1p4beta1FaceRecognitionResult struct {
9878	// Celebrity: The Celebrity that this face was matched to.
9879	Celebrity *GoogleCloudVisionV1p4beta1Celebrity `json:"celebrity,omitempty"`
9880
9881	// Confidence: Recognition confidence. Range [0, 1].
9882	Confidence float64 `json:"confidence,omitempty"`
9883
9884	// ForceSendFields is a list of field names (e.g. "Celebrity") to
9885	// unconditionally include in API requests. By default, fields with
9886	// empty values are omitted from API requests. However, any non-pointer,
9887	// non-interface field appearing in ForceSendFields will be sent to the
9888	// server regardless of whether the field is empty or not. This may be
9889	// used to include empty fields in Patch requests.
9890	ForceSendFields []string `json:"-"`
9891
9892	// NullFields is a list of field names (e.g. "Celebrity") to include in
9893	// API requests with the JSON null value. By default, fields with empty
9894	// values are omitted from API requests. However, any field with an
9895	// empty value appearing in NullFields will be sent to the server as
9896	// null. It is an error if a field in this list has a non-empty value.
9897	// This may be used to include null fields in Patch requests.
9898	NullFields []string `json:"-"`
9899}
9900
9901func (s *GoogleCloudVisionV1p4beta1FaceRecognitionResult) MarshalJSON() ([]byte, error) {
9902	type NoMethod GoogleCloudVisionV1p4beta1FaceRecognitionResult
9903	raw := NoMethod(*s)
9904	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9905}
9906
9907func (s *GoogleCloudVisionV1p4beta1FaceRecognitionResult) UnmarshalJSON(data []byte) error {
9908	type NoMethod GoogleCloudVisionV1p4beta1FaceRecognitionResult
9909	var s1 struct {
9910		Confidence gensupport.JSONFloat64 `json:"confidence"`
9911		*NoMethod
9912	}
9913	s1.NoMethod = (*NoMethod)(s)
9914	if err := json.Unmarshal(data, &s1); err != nil {
9915		return err
9916	}
9917	s.Confidence = float64(s1.Confidence)
9918	return nil
9919}
9920
9921// GoogleCloudVisionV1p4beta1GcsDestination: The Google Cloud Storage
9922// location where the output will be written to.
9923type GoogleCloudVisionV1p4beta1GcsDestination struct {
9924	// Uri: Google Cloud Storage URI prefix where the results will be
9925	// stored. Results will be in JSON format and preceded by its
9926	// corresponding input URI prefix. This field can either represent a gcs
9927	// file prefix or gcs directory. In either case, the uri should be
9928	// unique because in order to get all of the output files, you will need
9929	// to do a wildcard gcs search on the uri prefix you provide. Examples:
9930	// * File Prefix: gs://bucket-name/here/filenameprefix The output files
9931	// will be created in gs://bucket-name/here/ and the names of the output
9932	// files will begin with "filenameprefix". * Directory Prefix:
9933	// gs://bucket-name/some/location/ The output files will be created in
9934	// gs://bucket-name/some/location/ and the names of the output files
9935	// could be anything because there was no filename prefix specified. If
9936	// multiple outputs, each response is still AnnotateFileResponse, each
9937	// of which contains some subset of the full list of
9938	// AnnotateImageResponse. Multiple outputs can happen if, for example,
9939	// the output JSON is too large and overflows into multiple sharded
9940	// files.
9941	Uri string `json:"uri,omitempty"`
9942
9943	// ForceSendFields is a list of field names (e.g. "Uri") to
9944	// unconditionally include in API requests. By default, fields with
9945	// empty values are omitted from API requests. However, any non-pointer,
9946	// non-interface field appearing in ForceSendFields will be sent to the
9947	// server regardless of whether the field is empty or not. This may be
9948	// used to include empty fields in Patch requests.
9949	ForceSendFields []string `json:"-"`
9950
9951	// NullFields is a list of field names (e.g. "Uri") to include in API
9952	// requests with the JSON null value. By default, fields with empty
9953	// values are omitted from API requests. However, any field with an
9954	// empty value appearing in NullFields will be sent to the server as
9955	// null. It is an error if a field in this list has a non-empty value.
9956	// This may be used to include null fields in Patch requests.
9957	NullFields []string `json:"-"`
9958}
9959
9960func (s *GoogleCloudVisionV1p4beta1GcsDestination) MarshalJSON() ([]byte, error) {
9961	type NoMethod GoogleCloudVisionV1p4beta1GcsDestination
9962	raw := NoMethod(*s)
9963	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9964}
9965
9966// GoogleCloudVisionV1p4beta1GcsSource: The Google Cloud Storage
9967// location where the input will be read from.
9968type GoogleCloudVisionV1p4beta1GcsSource struct {
9969	// Uri: Google Cloud Storage URI for the input file. This must only be a
9970	// Google Cloud Storage object. Wildcards are not currently supported.
9971	Uri string `json:"uri,omitempty"`
9972
9973	// ForceSendFields is a list of field names (e.g. "Uri") to
9974	// unconditionally include in API requests. By default, fields with
9975	// empty values are omitted from API requests. However, any non-pointer,
9976	// non-interface field appearing in ForceSendFields will be sent to the
9977	// server regardless of whether the field is empty or not. This may be
9978	// used to include empty fields in Patch requests.
9979	ForceSendFields []string `json:"-"`
9980
9981	// NullFields is a list of field names (e.g. "Uri") to include in API
9982	// requests with the JSON null value. By default, fields with empty
9983	// values are omitted from API requests. However, any field with an
9984	// empty value appearing in NullFields will be sent to the server as
9985	// null. It is an error if a field in this list has a non-empty value.
9986	// This may be used to include null fields in Patch requests.
9987	NullFields []string `json:"-"`
9988}
9989
9990func (s *GoogleCloudVisionV1p4beta1GcsSource) MarshalJSON() ([]byte, error) {
9991	type NoMethod GoogleCloudVisionV1p4beta1GcsSource
9992	raw := NoMethod(*s)
9993	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
9994}
9995
9996// GoogleCloudVisionV1p4beta1ImageAnnotationContext: If an image was
9997// produced from a file (e.g. a PDF), this message gives information
9998// about the source of that image.
9999type GoogleCloudVisionV1p4beta1ImageAnnotationContext struct {
10000	// PageNumber: If the file was a PDF or TIFF, this field gives the page
10001	// number within the file used to produce the image.
10002	PageNumber int64 `json:"pageNumber,omitempty"`
10003
10004	// Uri: The URI of the file used to produce the image.
10005	Uri string `json:"uri,omitempty"`
10006
10007	// ForceSendFields is a list of field names (e.g. "PageNumber") to
10008	// unconditionally include in API requests. By default, fields with
10009	// empty values are omitted from API requests. However, any non-pointer,
10010	// non-interface field appearing in ForceSendFields will be sent to the
10011	// server regardless of whether the field is empty or not. This may be
10012	// used to include empty fields in Patch requests.
10013	ForceSendFields []string `json:"-"`
10014
10015	// NullFields is a list of field names (e.g. "PageNumber") to include in
10016	// API requests with the JSON null value. By default, fields with empty
10017	// values are omitted from API requests. However, any field with an
10018	// empty value appearing in NullFields will be sent to the server as
10019	// null. It is an error if a field in this list has a non-empty value.
10020	// This may be used to include null fields in Patch requests.
10021	NullFields []string `json:"-"`
10022}
10023
10024func (s *GoogleCloudVisionV1p4beta1ImageAnnotationContext) MarshalJSON() ([]byte, error) {
10025	type NoMethod GoogleCloudVisionV1p4beta1ImageAnnotationContext
10026	raw := NoMethod(*s)
10027	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10028}
10029
10030// GoogleCloudVisionV1p4beta1ImageProperties: Stores image properties,
10031// such as dominant colors.
10032type GoogleCloudVisionV1p4beta1ImageProperties struct {
10033	// DominantColors: If present, dominant colors completed successfully.
10034	DominantColors *GoogleCloudVisionV1p4beta1DominantColorsAnnotation `json:"dominantColors,omitempty"`
10035
10036	// ForceSendFields is a list of field names (e.g. "DominantColors") to
10037	// unconditionally include in API requests. By default, fields with
10038	// empty values are omitted from API requests. However, any non-pointer,
10039	// non-interface field appearing in ForceSendFields will be sent to the
10040	// server regardless of whether the field is empty or not. This may be
10041	// used to include empty fields in Patch requests.
10042	ForceSendFields []string `json:"-"`
10043
10044	// NullFields is a list of field names (e.g. "DominantColors") to
10045	// include in API requests with the JSON null value. By default, fields
10046	// with empty values are omitted from API requests. However, any field
10047	// with an empty value appearing in NullFields will be sent to the
10048	// server as null. It is an error if a field in this list has a
10049	// non-empty value. This may be used to include null fields in Patch
10050	// requests.
10051	NullFields []string `json:"-"`
10052}
10053
10054func (s *GoogleCloudVisionV1p4beta1ImageProperties) MarshalJSON() ([]byte, error) {
10055	type NoMethod GoogleCloudVisionV1p4beta1ImageProperties
10056	raw := NoMethod(*s)
10057	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10058}
10059
10060// GoogleCloudVisionV1p4beta1ImportProductSetsResponse: Response message
10061// for the `ImportProductSets` method. This message is returned by the
10062// google.longrunning.Operations.GetOperation method in the returned
10063// google.longrunning.Operation.response field.
10064type GoogleCloudVisionV1p4beta1ImportProductSetsResponse struct {
10065	// ReferenceImages: The list of reference_images that are imported
10066	// successfully.
10067	ReferenceImages []*GoogleCloudVisionV1p4beta1ReferenceImage `json:"referenceImages,omitempty"`
10068
10069	// Statuses: The rpc status for each ImportProductSet request, including
10070	// both successes and errors. The number of statuses here matches the
10071	// number of lines in the csv file, and statuses[i] stores the success
10072	// or failure status of processing the i-th line of the csv, starting
10073	// from line 0.
10074	Statuses []*Status `json:"statuses,omitempty"`
10075
10076	// ForceSendFields is a list of field names (e.g. "ReferenceImages") to
10077	// unconditionally include in API requests. By default, fields with
10078	// empty values are omitted from API requests. However, any non-pointer,
10079	// non-interface field appearing in ForceSendFields will be sent to the
10080	// server regardless of whether the field is empty or not. This may be
10081	// used to include empty fields in Patch requests.
10082	ForceSendFields []string `json:"-"`
10083
10084	// NullFields is a list of field names (e.g. "ReferenceImages") to
10085	// include in API requests with the JSON null value. By default, fields
10086	// with empty values are omitted from API requests. However, any field
10087	// with an empty value appearing in NullFields will be sent to the
10088	// server as null. It is an error if a field in this list has a
10089	// non-empty value. This may be used to include null fields in Patch
10090	// requests.
10091	NullFields []string `json:"-"`
10092}
10093
10094func (s *GoogleCloudVisionV1p4beta1ImportProductSetsResponse) MarshalJSON() ([]byte, error) {
10095	type NoMethod GoogleCloudVisionV1p4beta1ImportProductSetsResponse
10096	raw := NoMethod(*s)
10097	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10098}
10099
10100// GoogleCloudVisionV1p4beta1InputConfig: The desired input location and
10101// metadata.
10102type GoogleCloudVisionV1p4beta1InputConfig struct {
10103	// Content: File content, represented as a stream of bytes. Note: As
10104	// with all `bytes` fields, protobuffers use a pure binary
10105	// representation, whereas JSON representations use base64. Currently,
10106	// this field only works for BatchAnnotateFiles requests. It does not
10107	// work for AsyncBatchAnnotateFiles requests.
10108	Content string `json:"content,omitempty"`
10109
10110	// GcsSource: The Google Cloud Storage location to read the input from.
10111	GcsSource *GoogleCloudVisionV1p4beta1GcsSource `json:"gcsSource,omitempty"`
10112
10113	// MimeType: The type of the file. Currently only "application/pdf",
10114	// "image/tiff" and "image/gif" are supported. Wildcards are not
10115	// supported.
10116	MimeType string `json:"mimeType,omitempty"`
10117
10118	// ForceSendFields is a list of field names (e.g. "Content") to
10119	// unconditionally include in API requests. By default, fields with
10120	// empty values are omitted from API requests. However, any non-pointer,
10121	// non-interface field appearing in ForceSendFields will be sent to the
10122	// server regardless of whether the field is empty or not. This may be
10123	// used to include empty fields in Patch requests.
10124	ForceSendFields []string `json:"-"`
10125
10126	// NullFields is a list of field names (e.g. "Content") to include in
10127	// API requests with the JSON null value. By default, fields with empty
10128	// values are omitted from API requests. However, any field with an
10129	// empty value appearing in NullFields will be sent to the server as
10130	// null. It is an error if a field in this list has a non-empty value.
10131	// This may be used to include null fields in Patch requests.
10132	NullFields []string `json:"-"`
10133}
10134
10135func (s *GoogleCloudVisionV1p4beta1InputConfig) MarshalJSON() ([]byte, error) {
10136	type NoMethod GoogleCloudVisionV1p4beta1InputConfig
10137	raw := NoMethod(*s)
10138	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10139}
10140
10141// GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation: Set of detected
10142// objects with bounding boxes.
10143type GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation struct {
10144	// BoundingPoly: Image region to which this object belongs. This must be
10145	// populated.
10146	BoundingPoly *GoogleCloudVisionV1p4beta1BoundingPoly `json:"boundingPoly,omitempty"`
10147
10148	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
10149	// For more information, see
10150	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
10151	LanguageCode string `json:"languageCode,omitempty"`
10152
10153	// Mid: Object ID that should align with EntityAnnotation mid.
10154	Mid string `json:"mid,omitempty"`
10155
10156	// Name: Object name, expressed in its `language_code` language.
10157	Name string `json:"name,omitempty"`
10158
10159	// Score: Score of the result. Range [0, 1].
10160	Score float64 `json:"score,omitempty"`
10161
10162	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
10163	// unconditionally include in API requests. By default, fields with
10164	// empty values are omitted from API requests. However, any non-pointer,
10165	// non-interface field appearing in ForceSendFields will be sent to the
10166	// server regardless of whether the field is empty or not. This may be
10167	// used to include empty fields in Patch requests.
10168	ForceSendFields []string `json:"-"`
10169
10170	// NullFields is a list of field names (e.g. "BoundingPoly") to include
10171	// in API requests with the JSON null value. By default, fields with
10172	// empty values are omitted from API requests. However, any field with
10173	// an empty value appearing in NullFields will be sent to the server as
10174	// null. It is an error if a field in this list has a non-empty value.
10175	// This may be used to include null fields in Patch requests.
10176	NullFields []string `json:"-"`
10177}
10178
10179func (s *GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation) MarshalJSON() ([]byte, error) {
10180	type NoMethod GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation
10181	raw := NoMethod(*s)
10182	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10183}
10184
10185func (s *GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation) UnmarshalJSON(data []byte) error {
10186	type NoMethod GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation
10187	var s1 struct {
10188		Score gensupport.JSONFloat64 `json:"score"`
10189		*NoMethod
10190	}
10191	s1.NoMethod = (*NoMethod)(s)
10192	if err := json.Unmarshal(data, &s1); err != nil {
10193		return err
10194	}
10195	s.Score = float64(s1.Score)
10196	return nil
10197}
10198
10199// GoogleCloudVisionV1p4beta1LocationInfo: Detected entity location
10200// information.
10201type GoogleCloudVisionV1p4beta1LocationInfo struct {
10202	// LatLng: lat/long location coordinates.
10203	LatLng *LatLng `json:"latLng,omitempty"`
10204
10205	// ForceSendFields is a list of field names (e.g. "LatLng") to
10206	// unconditionally include in API requests. By default, fields with
10207	// empty values are omitted from API requests. However, any non-pointer,
10208	// non-interface field appearing in ForceSendFields will be sent to the
10209	// server regardless of whether the field is empty or not. This may be
10210	// used to include empty fields in Patch requests.
10211	ForceSendFields []string `json:"-"`
10212
10213	// NullFields is a list of field names (e.g. "LatLng") to include in API
10214	// requests with the JSON null value. By default, fields with empty
10215	// values are omitted from API requests. However, any field with an
10216	// empty value appearing in NullFields will be sent to the server as
10217	// null. It is an error if a field in this list has a non-empty value.
10218	// This may be used to include null fields in Patch requests.
10219	NullFields []string `json:"-"`
10220}
10221
10222func (s *GoogleCloudVisionV1p4beta1LocationInfo) MarshalJSON() ([]byte, error) {
10223	type NoMethod GoogleCloudVisionV1p4beta1LocationInfo
10224	raw := NoMethod(*s)
10225	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10226}
10227
10228// GoogleCloudVisionV1p4beta1NormalizedVertex: A vertex represents a 2D
10229// point in the image. NOTE: the normalized vertex coordinates are
10230// relative to the original image and range from 0 to 1.
10231type GoogleCloudVisionV1p4beta1NormalizedVertex struct {
10232	// X: X coordinate.
10233	X float64 `json:"x,omitempty"`
10234
10235	// Y: Y coordinate.
10236	Y float64 `json:"y,omitempty"`
10237
10238	// ForceSendFields is a list of field names (e.g. "X") to
10239	// unconditionally include in API requests. By default, fields with
10240	// empty values are omitted from API requests. However, any non-pointer,
10241	// non-interface field appearing in ForceSendFields will be sent to the
10242	// server regardless of whether the field is empty or not. This may be
10243	// used to include empty fields in Patch requests.
10244	ForceSendFields []string `json:"-"`
10245
10246	// NullFields is a list of field names (e.g. "X") to include in API
10247	// requests with the JSON null value. By default, fields with empty
10248	// values are omitted from API requests. However, any field with an
10249	// empty value appearing in NullFields will be sent to the server as
10250	// null. It is an error if a field in this list has a non-empty value.
10251	// This may be used to include null fields in Patch requests.
10252	NullFields []string `json:"-"`
10253}
10254
10255func (s *GoogleCloudVisionV1p4beta1NormalizedVertex) MarshalJSON() ([]byte, error) {
10256	type NoMethod GoogleCloudVisionV1p4beta1NormalizedVertex
10257	raw := NoMethod(*s)
10258	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10259}
10260
10261func (s *GoogleCloudVisionV1p4beta1NormalizedVertex) UnmarshalJSON(data []byte) error {
10262	type NoMethod GoogleCloudVisionV1p4beta1NormalizedVertex
10263	var s1 struct {
10264		X gensupport.JSONFloat64 `json:"x"`
10265		Y gensupport.JSONFloat64 `json:"y"`
10266		*NoMethod
10267	}
10268	s1.NoMethod = (*NoMethod)(s)
10269	if err := json.Unmarshal(data, &s1); err != nil {
10270		return err
10271	}
10272	s.X = float64(s1.X)
10273	s.Y = float64(s1.Y)
10274	return nil
10275}
10276
10277// GoogleCloudVisionV1p4beta1OperationMetadata: Contains metadata for
10278// the BatchAnnotateImages operation.
10279type GoogleCloudVisionV1p4beta1OperationMetadata struct {
10280	// CreateTime: The time when the batch request was received.
10281	CreateTime string `json:"createTime,omitempty"`
10282
10283	// State: Current state of the batch operation.
10284	//
10285	// Possible values:
10286	//   "STATE_UNSPECIFIED" - Invalid.
10287	//   "CREATED" - Request is received.
10288	//   "RUNNING" - Request is actively being processed.
10289	//   "DONE" - The batch processing is done.
10290	//   "CANCELLED" - The batch processing was cancelled.
10291	State string `json:"state,omitempty"`
10292
10293	// UpdateTime: The time when the operation result was last updated.
10294	UpdateTime string `json:"updateTime,omitempty"`
10295
10296	// ForceSendFields is a list of field names (e.g. "CreateTime") to
10297	// unconditionally include in API requests. By default, fields with
10298	// empty values are omitted from API requests. However, any non-pointer,
10299	// non-interface field appearing in ForceSendFields will be sent to the
10300	// server regardless of whether the field is empty or not. This may be
10301	// used to include empty fields in Patch requests.
10302	ForceSendFields []string `json:"-"`
10303
10304	// NullFields is a list of field names (e.g. "CreateTime") to include in
10305	// API requests with the JSON null value. By default, fields with empty
10306	// values are omitted from API requests. However, any field with an
10307	// empty value appearing in NullFields will be sent to the server as
10308	// null. It is an error if a field in this list has a non-empty value.
10309	// This may be used to include null fields in Patch requests.
10310	NullFields []string `json:"-"`
10311}
10312
10313func (s *GoogleCloudVisionV1p4beta1OperationMetadata) MarshalJSON() ([]byte, error) {
10314	type NoMethod GoogleCloudVisionV1p4beta1OperationMetadata
10315	raw := NoMethod(*s)
10316	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10317}
10318
10319// GoogleCloudVisionV1p4beta1OutputConfig: The desired output location
10320// and metadata.
10321type GoogleCloudVisionV1p4beta1OutputConfig struct {
10322	// BatchSize: The max number of response protos to put into each output
10323	// JSON file on Google Cloud Storage. The valid range is [1, 100]. If
10324	// not specified, the default value is 20. For example, for one pdf file
10325	// with 100 pages, 100 response protos will be generated. If
10326	// `batch_size` = 20, then 5 json files each containing 20 response
10327	// protos will be written under the prefix `gcs_destination`.`uri`.
10328	// Currently, batch_size only applies to GcsDestination, with potential
10329	// future support for other output configurations.
10330	BatchSize int64 `json:"batchSize,omitempty"`
10331
10332	// GcsDestination: The Google Cloud Storage location to write the
10333	// output(s) to.
10334	GcsDestination *GoogleCloudVisionV1p4beta1GcsDestination `json:"gcsDestination,omitempty"`
10335
10336	// ForceSendFields is a list of field names (e.g. "BatchSize") to
10337	// unconditionally include in API requests. By default, fields with
10338	// empty values are omitted from API requests. However, any non-pointer,
10339	// non-interface field appearing in ForceSendFields will be sent to the
10340	// server regardless of whether the field is empty or not. This may be
10341	// used to include empty fields in Patch requests.
10342	ForceSendFields []string `json:"-"`
10343
10344	// NullFields is a list of field names (e.g. "BatchSize") to include in
10345	// API requests with the JSON null value. By default, fields with empty
10346	// values are omitted from API requests. However, any field with an
10347	// empty value appearing in NullFields will be sent to the server as
10348	// null. It is an error if a field in this list has a non-empty value.
10349	// This may be used to include null fields in Patch requests.
10350	NullFields []string `json:"-"`
10351}
10352
10353func (s *GoogleCloudVisionV1p4beta1OutputConfig) MarshalJSON() ([]byte, error) {
10354	type NoMethod GoogleCloudVisionV1p4beta1OutputConfig
10355	raw := NoMethod(*s)
10356	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10357}
10358
10359// GoogleCloudVisionV1p4beta1Page: Detected page from OCR.
10360type GoogleCloudVisionV1p4beta1Page struct {
10361	// Blocks: List of blocks of text, images etc on this page.
10362	Blocks []*GoogleCloudVisionV1p4beta1Block `json:"blocks,omitempty"`
10363
10364	// Confidence: Confidence of the OCR results on the page. Range [0, 1].
10365	Confidence float64 `json:"confidence,omitempty"`
10366
10367	// Height: Page height. For PDFs the unit is points. For images
10368	// (including TIFFs) the unit is pixels.
10369	Height int64 `json:"height,omitempty"`
10370
10371	// Property: Additional information detected on the page.
10372	Property *GoogleCloudVisionV1p4beta1TextAnnotationTextProperty `json:"property,omitempty"`
10373
10374	// Width: Page width. For PDFs the unit is points. For images (including
10375	// TIFFs) the unit is pixels.
10376	Width int64 `json:"width,omitempty"`
10377
10378	// ForceSendFields is a list of field names (e.g. "Blocks") to
10379	// unconditionally include in API requests. By default, fields with
10380	// empty values are omitted from API requests. However, any non-pointer,
10381	// non-interface field appearing in ForceSendFields will be sent to the
10382	// server regardless of whether the field is empty or not. This may be
10383	// used to include empty fields in Patch requests.
10384	ForceSendFields []string `json:"-"`
10385
10386	// NullFields is a list of field names (e.g. "Blocks") to include in API
10387	// requests with the JSON null value. By default, fields with empty
10388	// values are omitted from API requests. However, any field with an
10389	// empty value appearing in NullFields will be sent to the server as
10390	// null. It is an error if a field in this list has a non-empty value.
10391	// This may be used to include null fields in Patch requests.
10392	NullFields []string `json:"-"`
10393}
10394
10395func (s *GoogleCloudVisionV1p4beta1Page) MarshalJSON() ([]byte, error) {
10396	type NoMethod GoogleCloudVisionV1p4beta1Page
10397	raw := NoMethod(*s)
10398	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10399}
10400
10401func (s *GoogleCloudVisionV1p4beta1Page) UnmarshalJSON(data []byte) error {
10402	type NoMethod GoogleCloudVisionV1p4beta1Page
10403	var s1 struct {
10404		Confidence gensupport.JSONFloat64 `json:"confidence"`
10405		*NoMethod
10406	}
10407	s1.NoMethod = (*NoMethod)(s)
10408	if err := json.Unmarshal(data, &s1); err != nil {
10409		return err
10410	}
10411	s.Confidence = float64(s1.Confidence)
10412	return nil
10413}
10414
10415// GoogleCloudVisionV1p4beta1Paragraph: Structural unit of text
10416// representing a number of words in certain order.
10417type GoogleCloudVisionV1p4beta1Paragraph struct {
10418	// BoundingBox: The bounding box for the paragraph. The vertices are in
10419	// the order of top-left, top-right, bottom-right, bottom-left. When a
10420	// rotation of the bounding box is detected the rotation is represented
10421	// as around the top-left corner as defined when the text is read in the
10422	// 'natural' orientation. For example: * when the text is horizontal it
10423	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
10424	// around the top-left corner it becomes: 2----3 | | 1----0 and the
10425	// vertex order will still be (0, 1, 2, 3).
10426	BoundingBox *GoogleCloudVisionV1p4beta1BoundingPoly `json:"boundingBox,omitempty"`
10427
10428	// Confidence: Confidence of the OCR results for the paragraph. Range
10429	// [0, 1].
10430	Confidence float64 `json:"confidence,omitempty"`
10431
10432	// Property: Additional information detected for the paragraph.
10433	Property *GoogleCloudVisionV1p4beta1TextAnnotationTextProperty `json:"property,omitempty"`
10434
10435	// Words: List of all words in this paragraph.
10436	Words []*GoogleCloudVisionV1p4beta1Word `json:"words,omitempty"`
10437
10438	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
10439	// unconditionally include in API requests. By default, fields with
10440	// empty values are omitted from API requests. However, any non-pointer,
10441	// non-interface field appearing in ForceSendFields will be sent to the
10442	// server regardless of whether the field is empty or not. This may be
10443	// used to include empty fields in Patch requests.
10444	ForceSendFields []string `json:"-"`
10445
10446	// NullFields is a list of field names (e.g. "BoundingBox") to include
10447	// in API requests with the JSON null value. By default, fields with
10448	// empty values are omitted from API requests. However, any field with
10449	// an empty value appearing in NullFields will be sent to the server as
10450	// null. It is an error if a field in this list has a non-empty value.
10451	// This may be used to include null fields in Patch requests.
10452	NullFields []string `json:"-"`
10453}
10454
10455func (s *GoogleCloudVisionV1p4beta1Paragraph) MarshalJSON() ([]byte, error) {
10456	type NoMethod GoogleCloudVisionV1p4beta1Paragraph
10457	raw := NoMethod(*s)
10458	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10459}
10460
10461func (s *GoogleCloudVisionV1p4beta1Paragraph) UnmarshalJSON(data []byte) error {
10462	type NoMethod GoogleCloudVisionV1p4beta1Paragraph
10463	var s1 struct {
10464		Confidence gensupport.JSONFloat64 `json:"confidence"`
10465		*NoMethod
10466	}
10467	s1.NoMethod = (*NoMethod)(s)
10468	if err := json.Unmarshal(data, &s1); err != nil {
10469		return err
10470	}
10471	s.Confidence = float64(s1.Confidence)
10472	return nil
10473}
10474
10475// GoogleCloudVisionV1p4beta1Position: A 3D position in the image, used
10476// primarily for Face detection landmarks. A valid Position must have
10477// both x and y coordinates. The position coordinates are in the same
10478// scale as the original image.
10479type GoogleCloudVisionV1p4beta1Position struct {
10480	// X: X coordinate.
10481	X float64 `json:"x,omitempty"`
10482
10483	// Y: Y coordinate.
10484	Y float64 `json:"y,omitempty"`
10485
10486	// Z: Z coordinate (or depth).
10487	Z float64 `json:"z,omitempty"`
10488
10489	// ForceSendFields is a list of field names (e.g. "X") to
10490	// unconditionally include in API requests. By default, fields with
10491	// empty values are omitted from API requests. However, any non-pointer,
10492	// non-interface field appearing in ForceSendFields will be sent to the
10493	// server regardless of whether the field is empty or not. This may be
10494	// used to include empty fields in Patch requests.
10495	ForceSendFields []string `json:"-"`
10496
10497	// NullFields is a list of field names (e.g. "X") to include in API
10498	// requests with the JSON null value. By default, fields with empty
10499	// values are omitted from API requests. However, any field with an
10500	// empty value appearing in NullFields will be sent to the server as
10501	// null. It is an error if a field in this list has a non-empty value.
10502	// This may be used to include null fields in Patch requests.
10503	NullFields []string `json:"-"`
10504}
10505
10506func (s *GoogleCloudVisionV1p4beta1Position) MarshalJSON() ([]byte, error) {
10507	type NoMethod GoogleCloudVisionV1p4beta1Position
10508	raw := NoMethod(*s)
10509	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10510}
10511
10512func (s *GoogleCloudVisionV1p4beta1Position) UnmarshalJSON(data []byte) error {
10513	type NoMethod GoogleCloudVisionV1p4beta1Position
10514	var s1 struct {
10515		X gensupport.JSONFloat64 `json:"x"`
10516		Y gensupport.JSONFloat64 `json:"y"`
10517		Z gensupport.JSONFloat64 `json:"z"`
10518		*NoMethod
10519	}
10520	s1.NoMethod = (*NoMethod)(s)
10521	if err := json.Unmarshal(data, &s1); err != nil {
10522		return err
10523	}
10524	s.X = float64(s1.X)
10525	s.Y = float64(s1.Y)
10526	s.Z = float64(s1.Z)
10527	return nil
10528}
10529
10530// GoogleCloudVisionV1p4beta1Product: A Product contains
10531// ReferenceImages.
10532type GoogleCloudVisionV1p4beta1Product struct {
10533	// Description: User-provided metadata to be stored with this product.
10534	// Must be at most 4096 characters long.
10535	Description string `json:"description,omitempty"`
10536
10537	// DisplayName: The user-provided name for this Product. Must not be
10538	// empty. Must be at most 4096 characters long.
10539	DisplayName string `json:"displayName,omitempty"`
10540
10541	// Name: The resource name of the product. Format is:
10542	// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This
10543	// field is ignored when creating a product.
10544	Name string `json:"name,omitempty"`
10545
10546	// ProductCategory: Immutable. The category for the product identified
10547	// by the reference image. This should be one of "homegoods-v2",
10548	// "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The
10549	// legacy categories "homegoods", "apparel", and "toys" are still
10550	// supported, but these should not be used for new products.
10551	ProductCategory string `json:"productCategory,omitempty"`
10552
10553	// ProductLabels: Key-value pairs that can be attached to a product. At
10554	// query time, constraints can be specified based on the product_labels.
10555	// Note that integer values can be provided as strings, e.g. "1199".
10556	// Only strings with integer values can match a range-based restriction
10557	// which is to be supported soon. Multiple values can be assigned to the
10558	// same key. One product may have up to 500 product_labels. Notice that
10559	// the total number of distinct product_labels over all products in one
10560	// ProductSet cannot exceed 1M, otherwise the product search pipeline
10561	// will refuse to work for that ProductSet.
10562	ProductLabels []*GoogleCloudVisionV1p4beta1ProductKeyValue `json:"productLabels,omitempty"`
10563
10564	// ForceSendFields is a list of field names (e.g. "Description") to
10565	// unconditionally include in API requests. By default, fields with
10566	// empty values are omitted from API requests. However, any non-pointer,
10567	// non-interface field appearing in ForceSendFields will be sent to the
10568	// server regardless of whether the field is empty or not. This may be
10569	// used to include empty fields in Patch requests.
10570	ForceSendFields []string `json:"-"`
10571
10572	// NullFields is a list of field names (e.g. "Description") to include
10573	// in API requests with the JSON null value. By default, fields with
10574	// empty values are omitted from API requests. However, any field with
10575	// an empty value appearing in NullFields will be sent to the server as
10576	// null. It is an error if a field in this list has a non-empty value.
10577	// This may be used to include null fields in Patch requests.
10578	NullFields []string `json:"-"`
10579}
10580
10581func (s *GoogleCloudVisionV1p4beta1Product) MarshalJSON() ([]byte, error) {
10582	type NoMethod GoogleCloudVisionV1p4beta1Product
10583	raw := NoMethod(*s)
10584	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10585}
10586
10587// GoogleCloudVisionV1p4beta1ProductKeyValue: A product label
10588// represented as a key-value pair.
10589type GoogleCloudVisionV1p4beta1ProductKeyValue struct {
10590	// Key: The key of the label attached to the product. Cannot be empty
10591	// and cannot exceed 128 bytes.
10592	Key string `json:"key,omitempty"`
10593
10594	// Value: The value of the label attached to the product. Cannot be
10595	// empty and cannot exceed 128 bytes.
10596	Value string `json:"value,omitempty"`
10597
10598	// ForceSendFields is a list of field names (e.g. "Key") to
10599	// unconditionally include in API requests. By default, fields with
10600	// empty values are omitted from API requests. However, any non-pointer,
10601	// non-interface field appearing in ForceSendFields will be sent to the
10602	// server regardless of whether the field is empty or not. This may be
10603	// used to include empty fields in Patch requests.
10604	ForceSendFields []string `json:"-"`
10605
10606	// NullFields is a list of field names (e.g. "Key") to include in API
10607	// requests with the JSON null value. By default, fields with empty
10608	// values are omitted from API requests. However, any field with an
10609	// empty value appearing in NullFields will be sent to the server as
10610	// null. It is an error if a field in this list has a non-empty value.
10611	// This may be used to include null fields in Patch requests.
10612	NullFields []string `json:"-"`
10613}
10614
10615func (s *GoogleCloudVisionV1p4beta1ProductKeyValue) MarshalJSON() ([]byte, error) {
10616	type NoMethod GoogleCloudVisionV1p4beta1ProductKeyValue
10617	raw := NoMethod(*s)
10618	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10619}
10620
10621// GoogleCloudVisionV1p4beta1ProductSearchResults: Results for a product
10622// search request.
10623type GoogleCloudVisionV1p4beta1ProductSearchResults struct {
10624	// IndexTime: Timestamp of the index which provided these results.
10625	// Products added to the product set and products removed from the
10626	// product set after this time are not reflected in the current results.
10627	IndexTime string `json:"indexTime,omitempty"`
10628
10629	// ProductGroupedResults: List of results grouped by products detected
10630	// in the query image. Each entry corresponds to one bounding polygon in
10631	// the query image, and contains the matching products specific to that
10632	// region. There may be duplicate product matches in the union of all
10633	// the per-product results.
10634	ProductGroupedResults []*GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult `json:"productGroupedResults,omitempty"`
10635
10636	// Results: List of results, one for each product match.
10637	Results []*GoogleCloudVisionV1p4beta1ProductSearchResultsResult `json:"results,omitempty"`
10638
10639	// ForceSendFields is a list of field names (e.g. "IndexTime") to
10640	// unconditionally include in API requests. By default, fields with
10641	// empty values are omitted from API requests. However, any non-pointer,
10642	// non-interface field appearing in ForceSendFields will be sent to the
10643	// server regardless of whether the field is empty or not. This may be
10644	// used to include empty fields in Patch requests.
10645	ForceSendFields []string `json:"-"`
10646
10647	// NullFields is a list of field names (e.g. "IndexTime") to include in
10648	// API requests with the JSON null value. By default, fields with empty
10649	// values are omitted from API requests. However, any field with an
10650	// empty value appearing in NullFields will be sent to the server as
10651	// null. It is an error if a field in this list has a non-empty value.
10652	// This may be used to include null fields in Patch requests.
10653	NullFields []string `json:"-"`
10654}
10655
10656func (s *GoogleCloudVisionV1p4beta1ProductSearchResults) MarshalJSON() ([]byte, error) {
10657	type NoMethod GoogleCloudVisionV1p4beta1ProductSearchResults
10658	raw := NoMethod(*s)
10659	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10660}
10661
10662// GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult:
10663// Information about the products similar to a single product in a query
10664// image.
10665type GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult struct {
10666	// BoundingPoly: The bounding polygon around the product detected in the
10667	// query image.
10668	BoundingPoly *GoogleCloudVisionV1p4beta1BoundingPoly `json:"boundingPoly,omitempty"`
10669
10670	// ObjectAnnotations: List of generic predictions for the object in the
10671	// bounding box.
10672	ObjectAnnotations []*GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation `json:"objectAnnotations,omitempty"`
10673
10674	// Results: List of results, one for each product match.
10675	Results []*GoogleCloudVisionV1p4beta1ProductSearchResultsResult `json:"results,omitempty"`
10676
10677	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
10678	// unconditionally include in API requests. By default, fields with
10679	// empty values are omitted from API requests. However, any non-pointer,
10680	// non-interface field appearing in ForceSendFields will be sent to the
10681	// server regardless of whether the field is empty or not. This may be
10682	// used to include empty fields in Patch requests.
10683	ForceSendFields []string `json:"-"`
10684
10685	// NullFields is a list of field names (e.g. "BoundingPoly") to include
10686	// in API requests with the JSON null value. By default, fields with
10687	// empty values are omitted from API requests. However, any field with
10688	// an empty value appearing in NullFields will be sent to the server as
10689	// null. It is an error if a field in this list has a non-empty value.
10690	// This may be used to include null fields in Patch requests.
10691	NullFields []string `json:"-"`
10692}
10693
10694func (s *GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult) MarshalJSON() ([]byte, error) {
10695	type NoMethod GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult
10696	raw := NoMethod(*s)
10697	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10698}
10699
10700// GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation:
10701// Prediction for what the object in the bounding box is.
10702type GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation struct {
10703	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
10704	// For more information, see
10705	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
10706	LanguageCode string `json:"languageCode,omitempty"`
10707
10708	// Mid: Object ID that should align with EntityAnnotation mid.
10709	Mid string `json:"mid,omitempty"`
10710
10711	// Name: Object name, expressed in its `language_code` language.
10712	Name string `json:"name,omitempty"`
10713
10714	// Score: Score of the result. Range [0, 1].
10715	Score float64 `json:"score,omitempty"`
10716
10717	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
10718	// unconditionally include in API requests. By default, fields with
10719	// empty values are omitted from API requests. However, any non-pointer,
10720	// non-interface field appearing in ForceSendFields will be sent to the
10721	// server regardless of whether the field is empty or not. This may be
10722	// used to include empty fields in Patch requests.
10723	ForceSendFields []string `json:"-"`
10724
10725	// NullFields is a list of field names (e.g. "LanguageCode") to include
10726	// in API requests with the JSON null value. By default, fields with
10727	// empty values are omitted from API requests. However, any field with
10728	// an empty value appearing in NullFields will be sent to the server as
10729	// null. It is an error if a field in this list has a non-empty value.
10730	// This may be used to include null fields in Patch requests.
10731	NullFields []string `json:"-"`
10732}
10733
10734func (s *GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation) MarshalJSON() ([]byte, error) {
10735	type NoMethod GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation
10736	raw := NoMethod(*s)
10737	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10738}
10739
10740func (s *GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation) UnmarshalJSON(data []byte) error {
10741	type NoMethod GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation
10742	var s1 struct {
10743		Score gensupport.JSONFloat64 `json:"score"`
10744		*NoMethod
10745	}
10746	s1.NoMethod = (*NoMethod)(s)
10747	if err := json.Unmarshal(data, &s1); err != nil {
10748		return err
10749	}
10750	s.Score = float64(s1.Score)
10751	return nil
10752}
10753
10754// GoogleCloudVisionV1p4beta1ProductSearchResultsResult: Information
10755// about a product.
10756type GoogleCloudVisionV1p4beta1ProductSearchResultsResult struct {
10757	// Image: The resource name of the image from the product that is the
10758	// closest match to the query.
10759	Image string `json:"image,omitempty"`
10760
10761	// Product: The Product.
10762	Product *GoogleCloudVisionV1p4beta1Product `json:"product,omitempty"`
10763
10764	// Score: A confidence level on the match, ranging from 0 (no
10765	// confidence) to 1 (full confidence).
10766	Score float64 `json:"score,omitempty"`
10767
10768	// ForceSendFields is a list of field names (e.g. "Image") to
10769	// unconditionally include in API requests. By default, fields with
10770	// empty values are omitted from API requests. However, any non-pointer,
10771	// non-interface field appearing in ForceSendFields will be sent to the
10772	// server regardless of whether the field is empty or not. This may be
10773	// used to include empty fields in Patch requests.
10774	ForceSendFields []string `json:"-"`
10775
10776	// NullFields is a list of field names (e.g. "Image") to include in API
10777	// requests with the JSON null value. By default, fields with empty
10778	// values are omitted from API requests. However, any field with an
10779	// empty value appearing in NullFields will be sent to the server as
10780	// null. It is an error if a field in this list has a non-empty value.
10781	// This may be used to include null fields in Patch requests.
10782	NullFields []string `json:"-"`
10783}
10784
10785func (s *GoogleCloudVisionV1p4beta1ProductSearchResultsResult) MarshalJSON() ([]byte, error) {
10786	type NoMethod GoogleCloudVisionV1p4beta1ProductSearchResultsResult
10787	raw := NoMethod(*s)
10788	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10789}
10790
10791func (s *GoogleCloudVisionV1p4beta1ProductSearchResultsResult) UnmarshalJSON(data []byte) error {
10792	type NoMethod GoogleCloudVisionV1p4beta1ProductSearchResultsResult
10793	var s1 struct {
10794		Score gensupport.JSONFloat64 `json:"score"`
10795		*NoMethod
10796	}
10797	s1.NoMethod = (*NoMethod)(s)
10798	if err := json.Unmarshal(data, &s1); err != nil {
10799		return err
10800	}
10801	s.Score = float64(s1.Score)
10802	return nil
10803}
10804
10805// GoogleCloudVisionV1p4beta1Property: A `Property` consists of a
10806// user-supplied name/value pair.
10807type GoogleCloudVisionV1p4beta1Property struct {
10808	// Name: Name of the property.
10809	Name string `json:"name,omitempty"`
10810
10811	// Uint64Value: Value of numeric properties.
10812	Uint64Value uint64 `json:"uint64Value,omitempty,string"`
10813
10814	// Value: Value of the property.
10815	Value string `json:"value,omitempty"`
10816
10817	// ForceSendFields is a list of field names (e.g. "Name") to
10818	// unconditionally include in API requests. By default, fields with
10819	// empty values are omitted from API requests. However, any non-pointer,
10820	// non-interface field appearing in ForceSendFields will be sent to the
10821	// server regardless of whether the field is empty or not. This may be
10822	// used to include empty fields in Patch requests.
10823	ForceSendFields []string `json:"-"`
10824
10825	// NullFields is a list of field names (e.g. "Name") to include in API
10826	// requests with the JSON null value. By default, fields with empty
10827	// values are omitted from API requests. However, any field with an
10828	// empty value appearing in NullFields will be sent to the server as
10829	// null. It is an error if a field in this list has a non-empty value.
10830	// This may be used to include null fields in Patch requests.
10831	NullFields []string `json:"-"`
10832}
10833
10834func (s *GoogleCloudVisionV1p4beta1Property) MarshalJSON() ([]byte, error) {
10835	type NoMethod GoogleCloudVisionV1p4beta1Property
10836	raw := NoMethod(*s)
10837	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10838}
10839
10840// GoogleCloudVisionV1p4beta1ReferenceImage: A `ReferenceImage`
10841// represents a product image and its associated metadata, such as
10842// bounding boxes.
10843type GoogleCloudVisionV1p4beta1ReferenceImage struct {
10844	// BoundingPolys: Optional. Bounding polygons around the areas of
10845	// interest in the reference image. If this field is empty, the system
10846	// will try to detect regions of interest. At most 10 bounding polygons
10847	// will be used. The provided shape is converted into a non-rotated
10848	// rectangle. Once converted, the small edge of the rectangle must be
10849	// greater than or equal to 300 pixels. The aspect ratio must be 1:4 or
10850	// less (i.e. 1:3 is ok; 1:5 is not).
10851	BoundingPolys []*GoogleCloudVisionV1p4beta1BoundingPoly `json:"boundingPolys,omitempty"`
10852
10853	// Name: The resource name of the reference image. Format is:
10854	// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceIma
10855	// ges/IMAGE_ID`. This field is ignored when creating a reference image.
10856	Name string `json:"name,omitempty"`
10857
10858	// Uri: Required. The Google Cloud Storage URI of the reference image.
10859	// The URI must start with `gs://`.
10860	Uri string `json:"uri,omitempty"`
10861
10862	// ForceSendFields is a list of field names (e.g. "BoundingPolys") to
10863	// unconditionally include in API requests. By default, fields with
10864	// empty values are omitted from API requests. However, any non-pointer,
10865	// non-interface field appearing in ForceSendFields will be sent to the
10866	// server regardless of whether the field is empty or not. This may be
10867	// used to include empty fields in Patch requests.
10868	ForceSendFields []string `json:"-"`
10869
10870	// NullFields is a list of field names (e.g. "BoundingPolys") to include
10871	// in API requests with the JSON null value. By default, fields with
10872	// empty values are omitted from API requests. However, any field with
10873	// an empty value appearing in NullFields will be sent to the server as
10874	// null. It is an error if a field in this list has a non-empty value.
10875	// This may be used to include null fields in Patch requests.
10876	NullFields []string `json:"-"`
10877}
10878
10879func (s *GoogleCloudVisionV1p4beta1ReferenceImage) MarshalJSON() ([]byte, error) {
10880	type NoMethod GoogleCloudVisionV1p4beta1ReferenceImage
10881	raw := NoMethod(*s)
10882	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10883}
10884
10885// GoogleCloudVisionV1p4beta1SafeSearchAnnotation: Set of features
10886// pertaining to the image, computed by computer vision methods over
10887// safe-search verticals (for example, adult, spoof, medical, violence).
10888type GoogleCloudVisionV1p4beta1SafeSearchAnnotation struct {
10889	// Adult: Represents the adult content likelihood for the image. Adult
10890	// content may contain elements such as nudity, pornographic images or
10891	// cartoons, or sexual activities.
10892	//
10893	// Possible values:
10894	//   "UNKNOWN" - Unknown likelihood.
10895	//   "VERY_UNLIKELY" - It is very unlikely.
10896	//   "UNLIKELY" - It is unlikely.
10897	//   "POSSIBLE" - It is possible.
10898	//   "LIKELY" - It is likely.
10899	//   "VERY_LIKELY" - It is very likely.
10900	Adult string `json:"adult,omitempty"`
10901
10902	// Medical: Likelihood that this is a medical image.
10903	//
10904	// Possible values:
10905	//   "UNKNOWN" - Unknown likelihood.
10906	//   "VERY_UNLIKELY" - It is very unlikely.
10907	//   "UNLIKELY" - It is unlikely.
10908	//   "POSSIBLE" - It is possible.
10909	//   "LIKELY" - It is likely.
10910	//   "VERY_LIKELY" - It is very likely.
10911	Medical string `json:"medical,omitempty"`
10912
10913	// Racy: Likelihood that the request image contains racy content. Racy
10914	// content may include (but is not limited to) skimpy or sheer clothing,
10915	// strategically covered nudity, lewd or provocative poses, or close-ups
10916	// of sensitive body areas.
10917	//
10918	// Possible values:
10919	//   "UNKNOWN" - Unknown likelihood.
10920	//   "VERY_UNLIKELY" - It is very unlikely.
10921	//   "UNLIKELY" - It is unlikely.
10922	//   "POSSIBLE" - It is possible.
10923	//   "LIKELY" - It is likely.
10924	//   "VERY_LIKELY" - It is very likely.
10925	Racy string `json:"racy,omitempty"`
10926
10927	// Spoof: Spoof likelihood. The likelihood that an modification was made
10928	// to the image's canonical version to make it appear funny or
10929	// offensive.
10930	//
10931	// Possible values:
10932	//   "UNKNOWN" - Unknown likelihood.
10933	//   "VERY_UNLIKELY" - It is very unlikely.
10934	//   "UNLIKELY" - It is unlikely.
10935	//   "POSSIBLE" - It is possible.
10936	//   "LIKELY" - It is likely.
10937	//   "VERY_LIKELY" - It is very likely.
10938	Spoof string `json:"spoof,omitempty"`
10939
10940	// Violence: Likelihood that this image contains violent content.
10941	//
10942	// Possible values:
10943	//   "UNKNOWN" - Unknown likelihood.
10944	//   "VERY_UNLIKELY" - It is very unlikely.
10945	//   "UNLIKELY" - It is unlikely.
10946	//   "POSSIBLE" - It is possible.
10947	//   "LIKELY" - It is likely.
10948	//   "VERY_LIKELY" - It is very likely.
10949	Violence string `json:"violence,omitempty"`
10950
10951	// ForceSendFields is a list of field names (e.g. "Adult") to
10952	// unconditionally include in API requests. By default, fields with
10953	// empty values are omitted from API requests. However, any non-pointer,
10954	// non-interface field appearing in ForceSendFields will be sent to the
10955	// server regardless of whether the field is empty or not. This may be
10956	// used to include empty fields in Patch requests.
10957	ForceSendFields []string `json:"-"`
10958
10959	// NullFields is a list of field names (e.g. "Adult") to include in API
10960	// requests with the JSON null value. By default, fields with empty
10961	// values are omitted from API requests. However, any field with an
10962	// empty value appearing in NullFields will be sent to the server as
10963	// null. It is an error if a field in this list has a non-empty value.
10964	// This may be used to include null fields in Patch requests.
10965	NullFields []string `json:"-"`
10966}
10967
10968func (s *GoogleCloudVisionV1p4beta1SafeSearchAnnotation) MarshalJSON() ([]byte, error) {
10969	type NoMethod GoogleCloudVisionV1p4beta1SafeSearchAnnotation
10970	raw := NoMethod(*s)
10971	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
10972}
10973
10974// GoogleCloudVisionV1p4beta1Symbol: A single symbol representation.
10975type GoogleCloudVisionV1p4beta1Symbol struct {
10976	// BoundingBox: The bounding box for the symbol. The vertices are in the
10977	// order of top-left, top-right, bottom-right, bottom-left. When a
10978	// rotation of the bounding box is detected the rotation is represented
10979	// as around the top-left corner as defined when the text is read in the
10980	// 'natural' orientation. For example: * when the text is horizontal it
10981	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
10982	// around the top-left corner it becomes: 2----3 | | 1----0 and the
10983	// vertex order will still be (0, 1, 2, 3).
10984	BoundingBox *GoogleCloudVisionV1p4beta1BoundingPoly `json:"boundingBox,omitempty"`
10985
10986	// Confidence: Confidence of the OCR results for the symbol. Range [0,
10987	// 1].
10988	Confidence float64 `json:"confidence,omitempty"`
10989
10990	// Property: Additional information detected for the symbol.
10991	Property *GoogleCloudVisionV1p4beta1TextAnnotationTextProperty `json:"property,omitempty"`
10992
10993	// Text: The actual UTF-8 representation of the symbol.
10994	Text string `json:"text,omitempty"`
10995
10996	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
10997	// unconditionally include in API requests. By default, fields with
10998	// empty values are omitted from API requests. However, any non-pointer,
10999	// non-interface field appearing in ForceSendFields will be sent to the
11000	// server regardless of whether the field is empty or not. This may be
11001	// used to include empty fields in Patch requests.
11002	ForceSendFields []string `json:"-"`
11003
11004	// NullFields is a list of field names (e.g. "BoundingBox") to include
11005	// in API requests with the JSON null value. By default, fields with
11006	// empty values are omitted from API requests. However, any field with
11007	// an empty value appearing in NullFields will be sent to the server as
11008	// null. It is an error if a field in this list has a non-empty value.
11009	// This may be used to include null fields in Patch requests.
11010	NullFields []string `json:"-"`
11011}
11012
11013func (s *GoogleCloudVisionV1p4beta1Symbol) MarshalJSON() ([]byte, error) {
11014	type NoMethod GoogleCloudVisionV1p4beta1Symbol
11015	raw := NoMethod(*s)
11016	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11017}
11018
11019func (s *GoogleCloudVisionV1p4beta1Symbol) UnmarshalJSON(data []byte) error {
11020	type NoMethod GoogleCloudVisionV1p4beta1Symbol
11021	var s1 struct {
11022		Confidence gensupport.JSONFloat64 `json:"confidence"`
11023		*NoMethod
11024	}
11025	s1.NoMethod = (*NoMethod)(s)
11026	if err := json.Unmarshal(data, &s1); err != nil {
11027		return err
11028	}
11029	s.Confidence = float64(s1.Confidence)
11030	return nil
11031}
11032
11033// GoogleCloudVisionV1p4beta1TextAnnotation: TextAnnotation contains a
11034// structured representation of OCR extracted text. The hierarchy of an
11035// OCR extracted text structure is like this: TextAnnotation -> Page ->
11036// Block -> Paragraph -> Word -> Symbol Each structural component,
11037// starting from Page, may further have their own properties. Properties
11038// describe detected languages, breaks etc.. Please refer to the
11039// TextAnnotation.TextProperty message definition below for more detail.
11040type GoogleCloudVisionV1p4beta1TextAnnotation struct {
11041	// Pages: List of pages detected by OCR.
11042	Pages []*GoogleCloudVisionV1p4beta1Page `json:"pages,omitempty"`
11043
11044	// Text: UTF-8 text detected on the pages.
11045	Text string `json:"text,omitempty"`
11046
11047	// ForceSendFields is a list of field names (e.g. "Pages") to
11048	// unconditionally include in API requests. By default, fields with
11049	// empty values are omitted from API requests. However, any non-pointer,
11050	// non-interface field appearing in ForceSendFields will be sent to the
11051	// server regardless of whether the field is empty or not. This may be
11052	// used to include empty fields in Patch requests.
11053	ForceSendFields []string `json:"-"`
11054
11055	// NullFields is a list of field names (e.g. "Pages") to include in API
11056	// requests with the JSON null value. By default, fields with empty
11057	// values are omitted from API requests. However, any field with an
11058	// empty value appearing in NullFields will be sent to the server as
11059	// null. It is an error if a field in this list has a non-empty value.
11060	// This may be used to include null fields in Patch requests.
11061	NullFields []string `json:"-"`
11062}
11063
11064func (s *GoogleCloudVisionV1p4beta1TextAnnotation) MarshalJSON() ([]byte, error) {
11065	type NoMethod GoogleCloudVisionV1p4beta1TextAnnotation
11066	raw := NoMethod(*s)
11067	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11068}
11069
11070// GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak: Detected start
11071// or end of a structural component.
11072type GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak struct {
11073	// IsPrefix: True if break prepends the element.
11074	IsPrefix bool `json:"isPrefix,omitempty"`
11075
11076	// Type: Detected break type.
11077	//
11078	// Possible values:
11079	//   "UNKNOWN" - Unknown break label type.
11080	//   "SPACE" - Regular space.
11081	//   "SURE_SPACE" - Sure space (very wide).
11082	//   "EOL_SURE_SPACE" - Line-wrapping break.
11083	//   "HYPHEN" - End-line hyphen that is not present in text; does not
11084	// co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
11085	//   "LINE_BREAK" - Line break that ends a paragraph.
11086	Type string `json:"type,omitempty"`
11087
11088	// ForceSendFields is a list of field names (e.g. "IsPrefix") to
11089	// unconditionally include in API requests. By default, fields with
11090	// empty values are omitted from API requests. However, any non-pointer,
11091	// non-interface field appearing in ForceSendFields will be sent to the
11092	// server regardless of whether the field is empty or not. This may be
11093	// used to include empty fields in Patch requests.
11094	ForceSendFields []string `json:"-"`
11095
11096	// NullFields is a list of field names (e.g. "IsPrefix") to include in
11097	// API requests with the JSON null value. By default, fields with empty
11098	// values are omitted from API requests. However, any field with an
11099	// empty value appearing in NullFields will be sent to the server as
11100	// null. It is an error if a field in this list has a non-empty value.
11101	// This may be used to include null fields in Patch requests.
11102	NullFields []string `json:"-"`
11103}
11104
11105func (s *GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak) MarshalJSON() ([]byte, error) {
11106	type NoMethod GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak
11107	raw := NoMethod(*s)
11108	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11109}
11110
11111// GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage: Detected
11112// language for a structural component.
11113type GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage struct {
11114	// Confidence: Confidence of detected language. Range [0, 1].
11115	Confidence float64 `json:"confidence,omitempty"`
11116
11117	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
11118	// For more information, see
11119	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
11120	LanguageCode string `json:"languageCode,omitempty"`
11121
11122	// ForceSendFields is a list of field names (e.g. "Confidence") to
11123	// unconditionally include in API requests. By default, fields with
11124	// empty values are omitted from API requests. However, any non-pointer,
11125	// non-interface field appearing in ForceSendFields will be sent to the
11126	// server regardless of whether the field is empty or not. This may be
11127	// used to include empty fields in Patch requests.
11128	ForceSendFields []string `json:"-"`
11129
11130	// NullFields is a list of field names (e.g. "Confidence") to include in
11131	// API requests with the JSON null value. By default, fields with empty
11132	// values are omitted from API requests. However, any field with an
11133	// empty value appearing in NullFields will be sent to the server as
11134	// null. It is an error if a field in this list has a non-empty value.
11135	// This may be used to include null fields in Patch requests.
11136	NullFields []string `json:"-"`
11137}
11138
11139func (s *GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage) MarshalJSON() ([]byte, error) {
11140	type NoMethod GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage
11141	raw := NoMethod(*s)
11142	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11143}
11144
11145func (s *GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage) UnmarshalJSON(data []byte) error {
11146	type NoMethod GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage
11147	var s1 struct {
11148		Confidence gensupport.JSONFloat64 `json:"confidence"`
11149		*NoMethod
11150	}
11151	s1.NoMethod = (*NoMethod)(s)
11152	if err := json.Unmarshal(data, &s1); err != nil {
11153		return err
11154	}
11155	s.Confidence = float64(s1.Confidence)
11156	return nil
11157}
11158
11159// GoogleCloudVisionV1p4beta1TextAnnotationTextProperty: Additional
11160// information detected on the structural component.
11161type GoogleCloudVisionV1p4beta1TextAnnotationTextProperty struct {
11162	// DetectedBreak: Detected start or end of a text segment.
11163	DetectedBreak *GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak `json:"detectedBreak,omitempty"`
11164
11165	// DetectedLanguages: A list of detected languages together with
11166	// confidence.
11167	DetectedLanguages []*GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage `json:"detectedLanguages,omitempty"`
11168
11169	// ForceSendFields is a list of field names (e.g. "DetectedBreak") to
11170	// unconditionally include in API requests. By default, fields with
11171	// empty values are omitted from API requests. However, any non-pointer,
11172	// non-interface field appearing in ForceSendFields will be sent to the
11173	// server regardless of whether the field is empty or not. This may be
11174	// used to include empty fields in Patch requests.
11175	ForceSendFields []string `json:"-"`
11176
11177	// NullFields is a list of field names (e.g. "DetectedBreak") to include
11178	// in API requests with the JSON null value. By default, fields with
11179	// empty values are omitted from API requests. However, any field with
11180	// an empty value appearing in NullFields will be sent to the server as
11181	// null. It is an error if a field in this list has a non-empty value.
11182	// This may be used to include null fields in Patch requests.
11183	NullFields []string `json:"-"`
11184}
11185
11186func (s *GoogleCloudVisionV1p4beta1TextAnnotationTextProperty) MarshalJSON() ([]byte, error) {
11187	type NoMethod GoogleCloudVisionV1p4beta1TextAnnotationTextProperty
11188	raw := NoMethod(*s)
11189	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11190}
11191
11192// GoogleCloudVisionV1p4beta1Vertex: A vertex represents a 2D point in
11193// the image. NOTE: the vertex coordinates are in the same scale as the
11194// original image.
11195type GoogleCloudVisionV1p4beta1Vertex struct {
11196	// X: X coordinate.
11197	X int64 `json:"x,omitempty"`
11198
11199	// Y: Y coordinate.
11200	Y int64 `json:"y,omitempty"`
11201
11202	// ForceSendFields is a list of field names (e.g. "X") to
11203	// unconditionally include in API requests. By default, fields with
11204	// empty values are omitted from API requests. However, any non-pointer,
11205	// non-interface field appearing in ForceSendFields will be sent to the
11206	// server regardless of whether the field is empty or not. This may be
11207	// used to include empty fields in Patch requests.
11208	ForceSendFields []string `json:"-"`
11209
11210	// NullFields is a list of field names (e.g. "X") to include in API
11211	// requests with the JSON null value. By default, fields with empty
11212	// values are omitted from API requests. However, any field with an
11213	// empty value appearing in NullFields will be sent to the server as
11214	// null. It is an error if a field in this list has a non-empty value.
11215	// This may be used to include null fields in Patch requests.
11216	NullFields []string `json:"-"`
11217}
11218
11219func (s *GoogleCloudVisionV1p4beta1Vertex) MarshalJSON() ([]byte, error) {
11220	type NoMethod GoogleCloudVisionV1p4beta1Vertex
11221	raw := NoMethod(*s)
11222	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11223}
11224
11225// GoogleCloudVisionV1p4beta1WebDetection: Relevant information for the
11226// image from the Internet.
11227type GoogleCloudVisionV1p4beta1WebDetection struct {
11228	// BestGuessLabels: The service's best guess as to the topic of the
11229	// request image. Inferred from similar images on the open web.
11230	BestGuessLabels []*GoogleCloudVisionV1p4beta1WebDetectionWebLabel `json:"bestGuessLabels,omitempty"`
11231
11232	// FullMatchingImages: Fully matching images from the Internet. Can
11233	// include resized copies of the query image.
11234	FullMatchingImages []*GoogleCloudVisionV1p4beta1WebDetectionWebImage `json:"fullMatchingImages,omitempty"`
11235
11236	// PagesWithMatchingImages: Web pages containing the matching images
11237	// from the Internet.
11238	PagesWithMatchingImages []*GoogleCloudVisionV1p4beta1WebDetectionWebPage `json:"pagesWithMatchingImages,omitempty"`
11239
11240	// PartialMatchingImages: Partial matching images from the Internet.
11241	// Those images are similar enough to share some key-point features. For
11242	// example an original image will likely have partial matching for its
11243	// crops.
11244	PartialMatchingImages []*GoogleCloudVisionV1p4beta1WebDetectionWebImage `json:"partialMatchingImages,omitempty"`
11245
11246	// VisuallySimilarImages: The visually similar image results.
11247	VisuallySimilarImages []*GoogleCloudVisionV1p4beta1WebDetectionWebImage `json:"visuallySimilarImages,omitempty"`
11248
11249	// WebEntities: Deduced entities from similar images on the Internet.
11250	WebEntities []*GoogleCloudVisionV1p4beta1WebDetectionWebEntity `json:"webEntities,omitempty"`
11251
11252	// ForceSendFields is a list of field names (e.g. "BestGuessLabels") to
11253	// unconditionally include in API requests. By default, fields with
11254	// empty values are omitted from API requests. However, any non-pointer,
11255	// non-interface field appearing in ForceSendFields will be sent to the
11256	// server regardless of whether the field is empty or not. This may be
11257	// used to include empty fields in Patch requests.
11258	ForceSendFields []string `json:"-"`
11259
11260	// NullFields is a list of field names (e.g. "BestGuessLabels") to
11261	// include in API requests with the JSON null value. By default, fields
11262	// with empty values are omitted from API requests. However, any field
11263	// with an empty value appearing in NullFields will be sent to the
11264	// server as null. It is an error if a field in this list has a
11265	// non-empty value. This may be used to include null fields in Patch
11266	// requests.
11267	NullFields []string `json:"-"`
11268}
11269
11270func (s *GoogleCloudVisionV1p4beta1WebDetection) MarshalJSON() ([]byte, error) {
11271	type NoMethod GoogleCloudVisionV1p4beta1WebDetection
11272	raw := NoMethod(*s)
11273	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11274}
11275
11276// GoogleCloudVisionV1p4beta1WebDetectionWebEntity: Entity deduced from
11277// similar images on the Internet.
11278type GoogleCloudVisionV1p4beta1WebDetectionWebEntity struct {
11279	// Description: Canonical description of the entity, in English.
11280	Description string `json:"description,omitempty"`
11281
11282	// EntityId: Opaque entity ID.
11283	EntityId string `json:"entityId,omitempty"`
11284
11285	// Score: Overall relevancy score for the entity. Not normalized and not
11286	// comparable across different image queries.
11287	Score float64 `json:"score,omitempty"`
11288
11289	// ForceSendFields is a list of field names (e.g. "Description") to
11290	// unconditionally include in API requests. By default, fields with
11291	// empty values are omitted from API requests. However, any non-pointer,
11292	// non-interface field appearing in ForceSendFields will be sent to the
11293	// server regardless of whether the field is empty or not. This may be
11294	// used to include empty fields in Patch requests.
11295	ForceSendFields []string `json:"-"`
11296
11297	// NullFields is a list of field names (e.g. "Description") to include
11298	// in API requests with the JSON null value. By default, fields with
11299	// empty values are omitted from API requests. However, any field with
11300	// an empty value appearing in NullFields will be sent to the server as
11301	// null. It is an error if a field in this list has a non-empty value.
11302	// This may be used to include null fields in Patch requests.
11303	NullFields []string `json:"-"`
11304}
11305
11306func (s *GoogleCloudVisionV1p4beta1WebDetectionWebEntity) MarshalJSON() ([]byte, error) {
11307	type NoMethod GoogleCloudVisionV1p4beta1WebDetectionWebEntity
11308	raw := NoMethod(*s)
11309	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11310}
11311
11312func (s *GoogleCloudVisionV1p4beta1WebDetectionWebEntity) UnmarshalJSON(data []byte) error {
11313	type NoMethod GoogleCloudVisionV1p4beta1WebDetectionWebEntity
11314	var s1 struct {
11315		Score gensupport.JSONFloat64 `json:"score"`
11316		*NoMethod
11317	}
11318	s1.NoMethod = (*NoMethod)(s)
11319	if err := json.Unmarshal(data, &s1); err != nil {
11320		return err
11321	}
11322	s.Score = float64(s1.Score)
11323	return nil
11324}
11325
11326// GoogleCloudVisionV1p4beta1WebDetectionWebImage: Metadata for online
11327// images.
11328type GoogleCloudVisionV1p4beta1WebDetectionWebImage struct {
11329	// Score: (Deprecated) Overall relevancy score for the image.
11330	Score float64 `json:"score,omitempty"`
11331
11332	// Url: The result image URL.
11333	Url string `json:"url,omitempty"`
11334
11335	// ForceSendFields is a list of field names (e.g. "Score") to
11336	// unconditionally include in API requests. By default, fields with
11337	// empty values are omitted from API requests. However, any non-pointer,
11338	// non-interface field appearing in ForceSendFields will be sent to the
11339	// server regardless of whether the field is empty or not. This may be
11340	// used to include empty fields in Patch requests.
11341	ForceSendFields []string `json:"-"`
11342
11343	// NullFields is a list of field names (e.g. "Score") to include in API
11344	// requests with the JSON null value. By default, fields with empty
11345	// values are omitted from API requests. However, any field with an
11346	// empty value appearing in NullFields will be sent to the server as
11347	// null. It is an error if a field in this list has a non-empty value.
11348	// This may be used to include null fields in Patch requests.
11349	NullFields []string `json:"-"`
11350}
11351
11352func (s *GoogleCloudVisionV1p4beta1WebDetectionWebImage) MarshalJSON() ([]byte, error) {
11353	type NoMethod GoogleCloudVisionV1p4beta1WebDetectionWebImage
11354	raw := NoMethod(*s)
11355	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11356}
11357
11358func (s *GoogleCloudVisionV1p4beta1WebDetectionWebImage) UnmarshalJSON(data []byte) error {
11359	type NoMethod GoogleCloudVisionV1p4beta1WebDetectionWebImage
11360	var s1 struct {
11361		Score gensupport.JSONFloat64 `json:"score"`
11362		*NoMethod
11363	}
11364	s1.NoMethod = (*NoMethod)(s)
11365	if err := json.Unmarshal(data, &s1); err != nil {
11366		return err
11367	}
11368	s.Score = float64(s1.Score)
11369	return nil
11370}
11371
11372// GoogleCloudVisionV1p4beta1WebDetectionWebLabel: Label to provide
11373// extra metadata for the web detection.
11374type GoogleCloudVisionV1p4beta1WebDetectionWebLabel struct {
11375	// Label: Label for extra metadata.
11376	Label string `json:"label,omitempty"`
11377
11378	// LanguageCode: The BCP-47 language code for `label`, such as "en-US"
11379	// or "sr-Latn". For more information, see
11380	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
11381	LanguageCode string `json:"languageCode,omitempty"`
11382
11383	// ForceSendFields is a list of field names (e.g. "Label") to
11384	// unconditionally include in API requests. By default, fields with
11385	// empty values are omitted from API requests. However, any non-pointer,
11386	// non-interface field appearing in ForceSendFields will be sent to the
11387	// server regardless of whether the field is empty or not. This may be
11388	// used to include empty fields in Patch requests.
11389	ForceSendFields []string `json:"-"`
11390
11391	// NullFields is a list of field names (e.g. "Label") to include in API
11392	// requests with the JSON null value. By default, fields with empty
11393	// values are omitted from API requests. However, any field with an
11394	// empty value appearing in NullFields will be sent to the server as
11395	// null. It is an error if a field in this list has a non-empty value.
11396	// This may be used to include null fields in Patch requests.
11397	NullFields []string `json:"-"`
11398}
11399
11400func (s *GoogleCloudVisionV1p4beta1WebDetectionWebLabel) MarshalJSON() ([]byte, error) {
11401	type NoMethod GoogleCloudVisionV1p4beta1WebDetectionWebLabel
11402	raw := NoMethod(*s)
11403	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11404}
11405
11406// GoogleCloudVisionV1p4beta1WebDetectionWebPage: Metadata for web
11407// pages.
11408type GoogleCloudVisionV1p4beta1WebDetectionWebPage struct {
11409	// FullMatchingImages: Fully matching images on the page. Can include
11410	// resized copies of the query image.
11411	FullMatchingImages []*GoogleCloudVisionV1p4beta1WebDetectionWebImage `json:"fullMatchingImages,omitempty"`
11412
11413	// PageTitle: Title for the web page, may contain HTML markups.
11414	PageTitle string `json:"pageTitle,omitempty"`
11415
11416	// PartialMatchingImages: Partial matching images on the page. Those
11417	// images are similar enough to share some key-point features. For
11418	// example an original image will likely have partial matching for its
11419	// crops.
11420	PartialMatchingImages []*GoogleCloudVisionV1p4beta1WebDetectionWebImage `json:"partialMatchingImages,omitempty"`
11421
11422	// Score: (Deprecated) Overall relevancy score for the web page.
11423	Score float64 `json:"score,omitempty"`
11424
11425	// Url: The result web page URL.
11426	Url string `json:"url,omitempty"`
11427
11428	// ForceSendFields is a list of field names (e.g. "FullMatchingImages")
11429	// to unconditionally include in API requests. By default, fields with
11430	// empty values are omitted from API requests. However, any non-pointer,
11431	// non-interface field appearing in ForceSendFields will be sent to the
11432	// server regardless of whether the field is empty or not. This may be
11433	// used to include empty fields in Patch requests.
11434	ForceSendFields []string `json:"-"`
11435
11436	// NullFields is a list of field names (e.g. "FullMatchingImages") to
11437	// include in API requests with the JSON null value. By default, fields
11438	// with empty values are omitted from API requests. However, any field
11439	// with an empty value appearing in NullFields will be sent to the
11440	// server as null. It is an error if a field in this list has a
11441	// non-empty value. This may be used to include null fields in Patch
11442	// requests.
11443	NullFields []string `json:"-"`
11444}
11445
11446func (s *GoogleCloudVisionV1p4beta1WebDetectionWebPage) MarshalJSON() ([]byte, error) {
11447	type NoMethod GoogleCloudVisionV1p4beta1WebDetectionWebPage
11448	raw := NoMethod(*s)
11449	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11450}
11451
11452func (s *GoogleCloudVisionV1p4beta1WebDetectionWebPage) UnmarshalJSON(data []byte) error {
11453	type NoMethod GoogleCloudVisionV1p4beta1WebDetectionWebPage
11454	var s1 struct {
11455		Score gensupport.JSONFloat64 `json:"score"`
11456		*NoMethod
11457	}
11458	s1.NoMethod = (*NoMethod)(s)
11459	if err := json.Unmarshal(data, &s1); err != nil {
11460		return err
11461	}
11462	s.Score = float64(s1.Score)
11463	return nil
11464}
11465
11466// GoogleCloudVisionV1p4beta1Word: A word representation.
11467type GoogleCloudVisionV1p4beta1Word struct {
11468	// BoundingBox: The bounding box for the word. The vertices are in the
11469	// order of top-left, top-right, bottom-right, bottom-left. When a
11470	// rotation of the bounding box is detected the rotation is represented
11471	// as around the top-left corner as defined when the text is read in the
11472	// 'natural' orientation. For example: * when the text is horizontal it
11473	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
11474	// around the top-left corner it becomes: 2----3 | | 1----0 and the
11475	// vertex order will still be (0, 1, 2, 3).
11476	BoundingBox *GoogleCloudVisionV1p4beta1BoundingPoly `json:"boundingBox,omitempty"`
11477
11478	// Confidence: Confidence of the OCR results for the word. Range [0, 1].
11479	Confidence float64 `json:"confidence,omitempty"`
11480
11481	// Property: Additional information detected for the word.
11482	Property *GoogleCloudVisionV1p4beta1TextAnnotationTextProperty `json:"property,omitempty"`
11483
11484	// Symbols: List of symbols in the word. The order of the symbols
11485	// follows the natural reading order.
11486	Symbols []*GoogleCloudVisionV1p4beta1Symbol `json:"symbols,omitempty"`
11487
11488	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
11489	// unconditionally include in API requests. By default, fields with
11490	// empty values are omitted from API requests. However, any non-pointer,
11491	// non-interface field appearing in ForceSendFields will be sent to the
11492	// server regardless of whether the field is empty or not. This may be
11493	// used to include empty fields in Patch requests.
11494	ForceSendFields []string `json:"-"`
11495
11496	// NullFields is a list of field names (e.g. "BoundingBox") to include
11497	// in API requests with the JSON null value. By default, fields with
11498	// empty values are omitted from API requests. However, any field with
11499	// an empty value appearing in NullFields will be sent to the server as
11500	// null. It is an error if a field in this list has a non-empty value.
11501	// This may be used to include null fields in Patch requests.
11502	NullFields []string `json:"-"`
11503}
11504
11505func (s *GoogleCloudVisionV1p4beta1Word) MarshalJSON() ([]byte, error) {
11506	type NoMethod GoogleCloudVisionV1p4beta1Word
11507	raw := NoMethod(*s)
11508	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11509}
11510
11511func (s *GoogleCloudVisionV1p4beta1Word) UnmarshalJSON(data []byte) error {
11512	type NoMethod GoogleCloudVisionV1p4beta1Word
11513	var s1 struct {
11514		Confidence gensupport.JSONFloat64 `json:"confidence"`
11515		*NoMethod
11516	}
11517	s1.NoMethod = (*NoMethod)(s)
11518	if err := json.Unmarshal(data, &s1); err != nil {
11519		return err
11520	}
11521	s.Confidence = float64(s1.Confidence)
11522	return nil
11523}
11524
11525// GroupedResult: Information about the products similar to a single
11526// product in a query image.
11527type GroupedResult struct {
11528	// BoundingPoly: The bounding polygon around the product detected in the
11529	// query image.
11530	BoundingPoly *BoundingPoly `json:"boundingPoly,omitempty"`
11531
11532	// ObjectAnnotations: List of generic predictions for the object in the
11533	// bounding box.
11534	ObjectAnnotations []*ObjectAnnotation `json:"objectAnnotations,omitempty"`
11535
11536	// Results: List of results, one for each product match.
11537	Results []*Result `json:"results,omitempty"`
11538
11539	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
11540	// unconditionally include in API requests. By default, fields with
11541	// empty values are omitted from API requests. However, any non-pointer,
11542	// non-interface field appearing in ForceSendFields will be sent to the
11543	// server regardless of whether the field is empty or not. This may be
11544	// used to include empty fields in Patch requests.
11545	ForceSendFields []string `json:"-"`
11546
11547	// NullFields is a list of field names (e.g. "BoundingPoly") to include
11548	// in API requests with the JSON null value. By default, fields with
11549	// empty values are omitted from API requests. However, any field with
11550	// an empty value appearing in NullFields will be sent to the server as
11551	// null. It is an error if a field in this list has a non-empty value.
11552	// This may be used to include null fields in Patch requests.
11553	NullFields []string `json:"-"`
11554}
11555
11556func (s *GroupedResult) MarshalJSON() ([]byte, error) {
11557	type NoMethod GroupedResult
11558	raw := NoMethod(*s)
11559	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11560}
11561
11562// Image: Client image to perform Google Cloud Vision API tasks over.
11563type Image struct {
11564	// Content: Image content, represented as a stream of bytes. Note: As
11565	// with all `bytes` fields, protobuffers use a pure binary
11566	// representation, whereas JSON representations use base64. Currently,
11567	// this field only works for BatchAnnotateImages requests. It does not
11568	// work for AsyncBatchAnnotateImages requests.
11569	Content string `json:"content,omitempty"`
11570
11571	// Source: Google Cloud Storage image location, or publicly-accessible
11572	// image URL. If both `content` and `source` are provided for an image,
11573	// `content` takes precedence and is used to perform the image
11574	// annotation request.
11575	Source *ImageSource `json:"source,omitempty"`
11576
11577	// ForceSendFields is a list of field names (e.g. "Content") to
11578	// unconditionally include in API requests. By default, fields with
11579	// empty values are omitted from API requests. However, any non-pointer,
11580	// non-interface field appearing in ForceSendFields will be sent to the
11581	// server regardless of whether the field is empty or not. This may be
11582	// used to include empty fields in Patch requests.
11583	ForceSendFields []string `json:"-"`
11584
11585	// NullFields is a list of field names (e.g. "Content") to include in
11586	// API requests with the JSON null value. By default, fields with empty
11587	// values are omitted from API requests. However, any field with an
11588	// empty value appearing in NullFields will be sent to the server as
11589	// null. It is an error if a field in this list has a non-empty value.
11590	// This may be used to include null fields in Patch requests.
11591	NullFields []string `json:"-"`
11592}
11593
11594func (s *Image) MarshalJSON() ([]byte, error) {
11595	type NoMethod Image
11596	raw := NoMethod(*s)
11597	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11598}
11599
11600// ImageAnnotationContext: If an image was produced from a file (e.g. a
11601// PDF), this message gives information about the source of that image.
11602type ImageAnnotationContext struct {
11603	// PageNumber: If the file was a PDF or TIFF, this field gives the page
11604	// number within the file used to produce the image.
11605	PageNumber int64 `json:"pageNumber,omitempty"`
11606
11607	// Uri: The URI of the file used to produce the image.
11608	Uri string `json:"uri,omitempty"`
11609
11610	// ForceSendFields is a list of field names (e.g. "PageNumber") to
11611	// unconditionally include in API requests. By default, fields with
11612	// empty values are omitted from API requests. However, any non-pointer,
11613	// non-interface field appearing in ForceSendFields will be sent to the
11614	// server regardless of whether the field is empty or not. This may be
11615	// used to include empty fields in Patch requests.
11616	ForceSendFields []string `json:"-"`
11617
11618	// NullFields is a list of field names (e.g. "PageNumber") to include in
11619	// API requests with the JSON null value. By default, fields with empty
11620	// values are omitted from API requests. However, any field with an
11621	// empty value appearing in NullFields will be sent to the server as
11622	// null. It is an error if a field in this list has a non-empty value.
11623	// This may be used to include null fields in Patch requests.
11624	NullFields []string `json:"-"`
11625}
11626
11627func (s *ImageAnnotationContext) MarshalJSON() ([]byte, error) {
11628	type NoMethod ImageAnnotationContext
11629	raw := NoMethod(*s)
11630	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11631}
11632
11633// ImageContext: Image context and/or feature-specific parameters.
11634type ImageContext struct {
11635	// CropHintsParams: Parameters for crop hints annotation request.
11636	CropHintsParams *CropHintsParams `json:"cropHintsParams,omitempty"`
11637
11638	// LanguageHints: List of languages to use for TEXT_DETECTION. In most
11639	// cases, an empty value yields the best results since it enables
11640	// automatic language detection. For languages based on the Latin
11641	// alphabet, setting `language_hints` is not needed. In rare cases, when
11642	// the language of the text in the image is known, setting a hint will
11643	// help get better results (although it will be a significant hindrance
11644	// if the hint is wrong). Text detection returns an error if one or more
11645	// of the specified languages is not one of the supported languages
11646	// (https://cloud.google.com/vision/docs/languages).
11647	LanguageHints []string `json:"languageHints,omitempty"`
11648
11649	// LatLongRect: Not used.
11650	LatLongRect *LatLongRect `json:"latLongRect,omitempty"`
11651
11652	// ProductSearchParams: Parameters for product search.
11653	ProductSearchParams *ProductSearchParams `json:"productSearchParams,omitempty"`
11654
11655	// TextDetectionParams: Parameters for text detection and document text
11656	// detection.
11657	TextDetectionParams *TextDetectionParams `json:"textDetectionParams,omitempty"`
11658
11659	// WebDetectionParams: Parameters for web detection.
11660	WebDetectionParams *WebDetectionParams `json:"webDetectionParams,omitempty"`
11661
11662	// ForceSendFields is a list of field names (e.g. "CropHintsParams") to
11663	// unconditionally include in API requests. By default, fields with
11664	// empty values are omitted from API requests. However, any non-pointer,
11665	// non-interface field appearing in ForceSendFields will be sent to the
11666	// server regardless of whether the field is empty or not. This may be
11667	// used to include empty fields in Patch requests.
11668	ForceSendFields []string `json:"-"`
11669
11670	// NullFields is a list of field names (e.g. "CropHintsParams") to
11671	// include in API requests with the JSON null value. By default, fields
11672	// with empty values are omitted from API requests. However, any field
11673	// with an empty value appearing in NullFields will be sent to the
11674	// server as null. It is an error if a field in this list has a
11675	// non-empty value. This may be used to include null fields in Patch
11676	// requests.
11677	NullFields []string `json:"-"`
11678}
11679
11680func (s *ImageContext) MarshalJSON() ([]byte, error) {
11681	type NoMethod ImageContext
11682	raw := NoMethod(*s)
11683	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11684}
11685
11686// ImageProperties: Stores image properties, such as dominant colors.
11687type ImageProperties struct {
11688	// DominantColors: If present, dominant colors completed successfully.
11689	DominantColors *DominantColorsAnnotation `json:"dominantColors,omitempty"`
11690
11691	// ForceSendFields is a list of field names (e.g. "DominantColors") to
11692	// unconditionally include in API requests. By default, fields with
11693	// empty values are omitted from API requests. However, any non-pointer,
11694	// non-interface field appearing in ForceSendFields will be sent to the
11695	// server regardless of whether the field is empty or not. This may be
11696	// used to include empty fields in Patch requests.
11697	ForceSendFields []string `json:"-"`
11698
11699	// NullFields is a list of field names (e.g. "DominantColors") to
11700	// include in API requests with the JSON null value. By default, fields
11701	// with empty values are omitted from API requests. However, any field
11702	// with an empty value appearing in NullFields will be sent to the
11703	// server as null. It is an error if a field in this list has a
11704	// non-empty value. This may be used to include null fields in Patch
11705	// requests.
11706	NullFields []string `json:"-"`
11707}
11708
11709func (s *ImageProperties) MarshalJSON() ([]byte, error) {
11710	type NoMethod ImageProperties
11711	raw := NoMethod(*s)
11712	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11713}
11714
11715// ImageSource: External image source (Google Cloud Storage or web URL
11716// image location).
11717type ImageSource struct {
11718	// GcsImageUri: **Use `image_uri` instead.** The Google Cloud Storage
11719	// URI of the form `gs://bucket_name/object_name`. Object versioning is
11720	// not supported. See Google Cloud Storage Request URIs
11721	// (https://cloud.google.com/storage/docs/reference-uris) for more info.
11722	GcsImageUri string `json:"gcsImageUri,omitempty"`
11723
11724	// ImageUri: The URI of the source image. Can be either: 1. A Google
11725	// Cloud Storage URI of the form `gs://bucket_name/object_name`. Object
11726	// versioning is not supported. See Google Cloud Storage Request URIs
11727	// (https://cloud.google.com/storage/docs/reference-uris) for more info.
11728	// 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images
11729	// from HTTP/HTTPS URLs, Google cannot guarantee that the request will
11730	// be completed. Your request may fail if the specified host denies the
11731	// request (e.g. due to request throttling or DOS prevention), or if
11732	// Google throttles requests to the site for abuse prevention. You
11733	// should not depend on externally-hosted images for production
11734	// applications. When both `gcs_image_uri` and `image_uri` are
11735	// specified, `image_uri` takes precedence.
11736	ImageUri string `json:"imageUri,omitempty"`
11737
11738	// ForceSendFields is a list of field names (e.g. "GcsImageUri") to
11739	// unconditionally include in API requests. By default, fields with
11740	// empty values are omitted from API requests. However, any non-pointer,
11741	// non-interface field appearing in ForceSendFields will be sent to the
11742	// server regardless of whether the field is empty or not. This may be
11743	// used to include empty fields in Patch requests.
11744	ForceSendFields []string `json:"-"`
11745
11746	// NullFields is a list of field names (e.g. "GcsImageUri") to include
11747	// in API requests with the JSON null value. By default, fields with
11748	// empty values are omitted from API requests. However, any field with
11749	// an empty value appearing in NullFields will be sent to the server as
11750	// null. It is an error if a field in this list has a non-empty value.
11751	// This may be used to include null fields in Patch requests.
11752	NullFields []string `json:"-"`
11753}
11754
11755func (s *ImageSource) MarshalJSON() ([]byte, error) {
11756	type NoMethod ImageSource
11757	raw := NoMethod(*s)
11758	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11759}
11760
11761// ImportProductSetsGcsSource: The Google Cloud Storage location for a
11762// csv file which preserves a list of ImportProductSetRequests in each
11763// line.
11764type ImportProductSetsGcsSource struct {
11765	// CsvFileUri: The Google Cloud Storage URI of the input csv file. The
11766	// URI must start with `gs://`. The format of the input csv file should
11767	// be one image per line. In each line, there are 8 columns. 1.
11768	// image-uri 2. image-id 3. product-set-id 4. product-id 5.
11769	// product-category 6. product-display-name 7. labels 8. bounding-poly
11770	// The `image-uri`, `product-set-id`, `product-id`, and
11771	// `product-category` columns are required. All other columns are
11772	// optional. If the `ProductSet` or `Product` specified by the
11773	// `product-set-id` and `product-id` values does not exist, then the
11774	// system will create a new `ProductSet` or `Product` for the image. In
11775	// this case, the `product-display-name` column refers to display_name,
11776	// the `product-category` column refers to product_category, and the
11777	// `labels` column refers to product_labels. The `image-id` column is
11778	// optional but must be unique if provided. If it is empty, the system
11779	// will automatically assign a unique id to the image. The
11780	// `product-display-name` column is optional. If it is empty, the system
11781	// sets the display_name field for the product to a space (" "). You can
11782	// update the `display_name` later by using the API. If a `Product` with
11783	// the specified `product-id` already exists, then the system ignores
11784	// the `product-display-name`, `product-category`, and `labels` columns.
11785	// The `labels` column (optional) is a line containing a list of
11786	// comma-separated key-value pairs, in the following format:
11787	// "key_1=value_1,key_2=value_2,...,key_n=value_n" The `bounding-poly`
11788	// column (optional) identifies one region of interest from the image in
11789	// the same manner as `CreateReferenceImage`. If you do not specify the
11790	// `bounding-poly` column, then the system will try to detect regions of
11791	// interest automatically. At most one `bounding-poly` column is allowed
11792	// per line. If the image contains multiple regions of interest, add a
11793	// line to the CSV file that includes the same product information, and
11794	// the `bounding-poly` values for each region of interest. The
11795	// `bounding-poly` column must contain an even number of comma-separated
11796	// numbers, in the format "p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y". Use
11797	// non-negative integers for absolute bounding polygons, and float
11798	// values in [0, 1] for normalized bounding polygons. The system will
11799	// resize the image if the image resolution is too large to process
11800	// (larger than 20MP).
11801	CsvFileUri string `json:"csvFileUri,omitempty"`
11802
11803	// ForceSendFields is a list of field names (e.g. "CsvFileUri") to
11804	// unconditionally include in API requests. By default, fields with
11805	// empty values are omitted from API requests. However, any non-pointer,
11806	// non-interface field appearing in ForceSendFields will be sent to the
11807	// server regardless of whether the field is empty or not. This may be
11808	// used to include empty fields in Patch requests.
11809	ForceSendFields []string `json:"-"`
11810
11811	// NullFields is a list of field names (e.g. "CsvFileUri") to include in
11812	// API requests with the JSON null value. By default, fields with empty
11813	// values are omitted from API requests. However, any field with an
11814	// empty value appearing in NullFields will be sent to the server as
11815	// null. It is an error if a field in this list has a non-empty value.
11816	// This may be used to include null fields in Patch requests.
11817	NullFields []string `json:"-"`
11818}
11819
11820func (s *ImportProductSetsGcsSource) MarshalJSON() ([]byte, error) {
11821	type NoMethod ImportProductSetsGcsSource
11822	raw := NoMethod(*s)
11823	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11824}
11825
11826// ImportProductSetsInputConfig: The input content for the
11827// `ImportProductSets` method.
11828type ImportProductSetsInputConfig struct {
11829	// GcsSource: The Google Cloud Storage location for a csv file which
11830	// preserves a list of ImportProductSetRequests in each line.
11831	GcsSource *ImportProductSetsGcsSource `json:"gcsSource,omitempty"`
11832
11833	// ForceSendFields is a list of field names (e.g. "GcsSource") to
11834	// unconditionally include in API requests. By default, fields with
11835	// empty values are omitted from API requests. However, any non-pointer,
11836	// non-interface field appearing in ForceSendFields will be sent to the
11837	// server regardless of whether the field is empty or not. This may be
11838	// used to include empty fields in Patch requests.
11839	ForceSendFields []string `json:"-"`
11840
11841	// NullFields is a list of field names (e.g. "GcsSource") to include in
11842	// API requests with the JSON null value. By default, fields with empty
11843	// values are omitted from API requests. However, any field with an
11844	// empty value appearing in NullFields will be sent to the server as
11845	// null. It is an error if a field in this list has a non-empty value.
11846	// This may be used to include null fields in Patch requests.
11847	NullFields []string `json:"-"`
11848}
11849
11850func (s *ImportProductSetsInputConfig) MarshalJSON() ([]byte, error) {
11851	type NoMethod ImportProductSetsInputConfig
11852	raw := NoMethod(*s)
11853	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11854}
11855
11856// ImportProductSetsRequest: Request message for the `ImportProductSets`
11857// method.
11858type ImportProductSetsRequest struct {
11859	// InputConfig: Required. The input content for the list of requests.
11860	InputConfig *ImportProductSetsInputConfig `json:"inputConfig,omitempty"`
11861
11862	// ForceSendFields is a list of field names (e.g. "InputConfig") to
11863	// unconditionally include in API requests. By default, fields with
11864	// empty values are omitted from API requests. However, any non-pointer,
11865	// non-interface field appearing in ForceSendFields will be sent to the
11866	// server regardless of whether the field is empty or not. This may be
11867	// used to include empty fields in Patch requests.
11868	ForceSendFields []string `json:"-"`
11869
11870	// NullFields is a list of field names (e.g. "InputConfig") to include
11871	// in API requests with the JSON null value. By default, fields with
11872	// empty values are omitted from API requests. However, any field with
11873	// an empty value appearing in NullFields will be sent to the server as
11874	// null. It is an error if a field in this list has a non-empty value.
11875	// This may be used to include null fields in Patch requests.
11876	NullFields []string `json:"-"`
11877}
11878
11879func (s *ImportProductSetsRequest) MarshalJSON() ([]byte, error) {
11880	type NoMethod ImportProductSetsRequest
11881	raw := NoMethod(*s)
11882	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11883}
11884
11885// ImportProductSetsResponse: Response message for the
11886// `ImportProductSets` method. This message is returned by the
11887// google.longrunning.Operations.GetOperation method in the returned
11888// google.longrunning.Operation.response field.
11889type ImportProductSetsResponse struct {
11890	// ReferenceImages: The list of reference_images that are imported
11891	// successfully.
11892	ReferenceImages []*ReferenceImage `json:"referenceImages,omitempty"`
11893
11894	// Statuses: The rpc status for each ImportProductSet request, including
11895	// both successes and errors. The number of statuses here matches the
11896	// number of lines in the csv file, and statuses[i] stores the success
11897	// or failure status of processing the i-th line of the csv, starting
11898	// from line 0.
11899	Statuses []*Status `json:"statuses,omitempty"`
11900
11901	// ForceSendFields is a list of field names (e.g. "ReferenceImages") to
11902	// unconditionally include in API requests. By default, fields with
11903	// empty values are omitted from API requests. However, any non-pointer,
11904	// non-interface field appearing in ForceSendFields will be sent to the
11905	// server regardless of whether the field is empty or not. This may be
11906	// used to include empty fields in Patch requests.
11907	ForceSendFields []string `json:"-"`
11908
11909	// NullFields is a list of field names (e.g. "ReferenceImages") to
11910	// include in API requests with the JSON null value. By default, fields
11911	// with empty values are omitted from API requests. However, any field
11912	// with an empty value appearing in NullFields will be sent to the
11913	// server as null. It is an error if a field in this list has a
11914	// non-empty value. This may be used to include null fields in Patch
11915	// requests.
11916	NullFields []string `json:"-"`
11917}
11918
11919func (s *ImportProductSetsResponse) MarshalJSON() ([]byte, error) {
11920	type NoMethod ImportProductSetsResponse
11921	raw := NoMethod(*s)
11922	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11923}
11924
11925// InputConfig: The desired input location and metadata.
11926type InputConfig struct {
11927	// Content: File content, represented as a stream of bytes. Note: As
11928	// with all `bytes` fields, protobuffers use a pure binary
11929	// representation, whereas JSON representations use base64. Currently,
11930	// this field only works for BatchAnnotateFiles requests. It does not
11931	// work for AsyncBatchAnnotateFiles requests.
11932	Content string `json:"content,omitempty"`
11933
11934	// GcsSource: The Google Cloud Storage location to read the input from.
11935	GcsSource *GcsSource `json:"gcsSource,omitempty"`
11936
11937	// MimeType: The type of the file. Currently only "application/pdf",
11938	// "image/tiff" and "image/gif" are supported. Wildcards are not
11939	// supported.
11940	MimeType string `json:"mimeType,omitempty"`
11941
11942	// ForceSendFields is a list of field names (e.g. "Content") to
11943	// unconditionally include in API requests. By default, fields with
11944	// empty values are omitted from API requests. However, any non-pointer,
11945	// non-interface field appearing in ForceSendFields will be sent to the
11946	// server regardless of whether the field is empty or not. This may be
11947	// used to include empty fields in Patch requests.
11948	ForceSendFields []string `json:"-"`
11949
11950	// NullFields is a list of field names (e.g. "Content") to include in
11951	// API requests with the JSON null value. By default, fields with empty
11952	// values are omitted from API requests. However, any field with an
11953	// empty value appearing in NullFields will be sent to the server as
11954	// null. It is an error if a field in this list has a non-empty value.
11955	// This may be used to include null fields in Patch requests.
11956	NullFields []string `json:"-"`
11957}
11958
11959func (s *InputConfig) MarshalJSON() ([]byte, error) {
11960	type NoMethod InputConfig
11961	raw := NoMethod(*s)
11962	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11963}
11964
11965// KeyValue: A product label represented as a key-value pair.
11966type KeyValue struct {
11967	// Key: The key of the label attached to the product. Cannot be empty
11968	// and cannot exceed 128 bytes.
11969	Key string `json:"key,omitempty"`
11970
11971	// Value: The value of the label attached to the product. Cannot be
11972	// empty and cannot exceed 128 bytes.
11973	Value string `json:"value,omitempty"`
11974
11975	// ForceSendFields is a list of field names (e.g. "Key") to
11976	// unconditionally include in API requests. By default, fields with
11977	// empty values are omitted from API requests. However, any non-pointer,
11978	// non-interface field appearing in ForceSendFields will be sent to the
11979	// server regardless of whether the field is empty or not. This may be
11980	// used to include empty fields in Patch requests.
11981	ForceSendFields []string `json:"-"`
11982
11983	// NullFields is a list of field names (e.g. "Key") to include in API
11984	// requests with the JSON null value. By default, fields with empty
11985	// values are omitted from API requests. However, any field with an
11986	// empty value appearing in NullFields will be sent to the server as
11987	// null. It is an error if a field in this list has a non-empty value.
11988	// This may be used to include null fields in Patch requests.
11989	NullFields []string `json:"-"`
11990}
11991
11992func (s *KeyValue) MarshalJSON() ([]byte, error) {
11993	type NoMethod KeyValue
11994	raw := NoMethod(*s)
11995	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
11996}
11997
11998// Landmark: A face-specific landmark (for example, a face feature).
11999type Landmark struct {
12000	// Position: Face landmark position.
12001	Position *Position `json:"position,omitempty"`
12002
12003	// Type: Face landmark type.
12004	//
12005	// Possible values:
12006	//   "UNKNOWN_LANDMARK" - Unknown face landmark detected. Should not be
12007	// filled.
12008	//   "LEFT_EYE" - Left eye.
12009	//   "RIGHT_EYE" - Right eye.
12010	//   "LEFT_OF_LEFT_EYEBROW" - Left of left eyebrow.
12011	//   "RIGHT_OF_LEFT_EYEBROW" - Right of left eyebrow.
12012	//   "LEFT_OF_RIGHT_EYEBROW" - Left of right eyebrow.
12013	//   "RIGHT_OF_RIGHT_EYEBROW" - Right of right eyebrow.
12014	//   "MIDPOINT_BETWEEN_EYES" - Midpoint between eyes.
12015	//   "NOSE_TIP" - Nose tip.
12016	//   "UPPER_LIP" - Upper lip.
12017	//   "LOWER_LIP" - Lower lip.
12018	//   "MOUTH_LEFT" - Mouth left.
12019	//   "MOUTH_RIGHT" - Mouth right.
12020	//   "MOUTH_CENTER" - Mouth center.
12021	//   "NOSE_BOTTOM_RIGHT" - Nose, bottom right.
12022	//   "NOSE_BOTTOM_LEFT" - Nose, bottom left.
12023	//   "NOSE_BOTTOM_CENTER" - Nose, bottom center.
12024	//   "LEFT_EYE_TOP_BOUNDARY" - Left eye, top boundary.
12025	//   "LEFT_EYE_RIGHT_CORNER" - Left eye, right corner.
12026	//   "LEFT_EYE_BOTTOM_BOUNDARY" - Left eye, bottom boundary.
12027	//   "LEFT_EYE_LEFT_CORNER" - Left eye, left corner.
12028	//   "RIGHT_EYE_TOP_BOUNDARY" - Right eye, top boundary.
12029	//   "RIGHT_EYE_RIGHT_CORNER" - Right eye, right corner.
12030	//   "RIGHT_EYE_BOTTOM_BOUNDARY" - Right eye, bottom boundary.
12031	//   "RIGHT_EYE_LEFT_CORNER" - Right eye, left corner.
12032	//   "LEFT_EYEBROW_UPPER_MIDPOINT" - Left eyebrow, upper midpoint.
12033	//   "RIGHT_EYEBROW_UPPER_MIDPOINT" - Right eyebrow, upper midpoint.
12034	//   "LEFT_EAR_TRAGION" - Left ear tragion.
12035	//   "RIGHT_EAR_TRAGION" - Right ear tragion.
12036	//   "LEFT_EYE_PUPIL" - Left eye pupil.
12037	//   "RIGHT_EYE_PUPIL" - Right eye pupil.
12038	//   "FOREHEAD_GLABELLA" - Forehead glabella.
12039	//   "CHIN_GNATHION" - Chin gnathion.
12040	//   "CHIN_LEFT_GONION" - Chin left gonion.
12041	//   "CHIN_RIGHT_GONION" - Chin right gonion.
12042	//   "LEFT_CHEEK_CENTER" - Left cheek center.
12043	//   "RIGHT_CHEEK_CENTER" - Right cheek center.
12044	Type string `json:"type,omitempty"`
12045
12046	// ForceSendFields is a list of field names (e.g. "Position") to
12047	// unconditionally include in API requests. By default, fields with
12048	// empty values are omitted from API requests. However, any non-pointer,
12049	// non-interface field appearing in ForceSendFields will be sent to the
12050	// server regardless of whether the field is empty or not. This may be
12051	// used to include empty fields in Patch requests.
12052	ForceSendFields []string `json:"-"`
12053
12054	// NullFields is a list of field names (e.g. "Position") to include in
12055	// API requests with the JSON null value. By default, fields with empty
12056	// values are omitted from API requests. However, any field with an
12057	// empty value appearing in NullFields will be sent to the server as
12058	// null. It is an error if a field in this list has a non-empty value.
12059	// This may be used to include null fields in Patch requests.
12060	NullFields []string `json:"-"`
12061}
12062
12063func (s *Landmark) MarshalJSON() ([]byte, error) {
12064	type NoMethod Landmark
12065	raw := NoMethod(*s)
12066	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12067}
12068
12069// LatLng: An object that represents a latitude/longitude pair. This is
12070// expressed as a pair of doubles to represent degrees latitude and
12071// degrees longitude. Unless specified otherwise, this must conform to
12072// the WGS84 standard. Values must be within normalized ranges.
12073type LatLng struct {
12074	// Latitude: The latitude in degrees. It must be in the range [-90.0,
12075	// +90.0].
12076	Latitude float64 `json:"latitude,omitempty"`
12077
12078	// Longitude: The longitude in degrees. It must be in the range [-180.0,
12079	// +180.0].
12080	Longitude float64 `json:"longitude,omitempty"`
12081
12082	// ForceSendFields is a list of field names (e.g. "Latitude") to
12083	// unconditionally include in API requests. By default, fields with
12084	// empty values are omitted from API requests. However, any non-pointer,
12085	// non-interface field appearing in ForceSendFields will be sent to the
12086	// server regardless of whether the field is empty or not. This may be
12087	// used to include empty fields in Patch requests.
12088	ForceSendFields []string `json:"-"`
12089
12090	// NullFields is a list of field names (e.g. "Latitude") to include in
12091	// API requests with the JSON null value. By default, fields with empty
12092	// values are omitted from API requests. However, any field with an
12093	// empty value appearing in NullFields will be sent to the server as
12094	// null. It is an error if a field in this list has a non-empty value.
12095	// This may be used to include null fields in Patch requests.
12096	NullFields []string `json:"-"`
12097}
12098
12099func (s *LatLng) MarshalJSON() ([]byte, error) {
12100	type NoMethod LatLng
12101	raw := NoMethod(*s)
12102	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12103}
12104
12105func (s *LatLng) UnmarshalJSON(data []byte) error {
12106	type NoMethod LatLng
12107	var s1 struct {
12108		Latitude  gensupport.JSONFloat64 `json:"latitude"`
12109		Longitude gensupport.JSONFloat64 `json:"longitude"`
12110		*NoMethod
12111	}
12112	s1.NoMethod = (*NoMethod)(s)
12113	if err := json.Unmarshal(data, &s1); err != nil {
12114		return err
12115	}
12116	s.Latitude = float64(s1.Latitude)
12117	s.Longitude = float64(s1.Longitude)
12118	return nil
12119}
12120
12121// LatLongRect: Rectangle determined by min and max `LatLng` pairs.
12122type LatLongRect struct {
12123	// MaxLatLng: Max lat/long pair.
12124	MaxLatLng *LatLng `json:"maxLatLng,omitempty"`
12125
12126	// MinLatLng: Min lat/long pair.
12127	MinLatLng *LatLng `json:"minLatLng,omitempty"`
12128
12129	// ForceSendFields is a list of field names (e.g. "MaxLatLng") to
12130	// unconditionally include in API requests. By default, fields with
12131	// empty values are omitted from API requests. However, any non-pointer,
12132	// non-interface field appearing in ForceSendFields will be sent to the
12133	// server regardless of whether the field is empty or not. This may be
12134	// used to include empty fields in Patch requests.
12135	ForceSendFields []string `json:"-"`
12136
12137	// NullFields is a list of field names (e.g. "MaxLatLng") to include in
12138	// API requests with the JSON null value. By default, fields with empty
12139	// values are omitted from API requests. However, any field with an
12140	// empty value appearing in NullFields will be sent to the server as
12141	// null. It is an error if a field in this list has a non-empty value.
12142	// This may be used to include null fields in Patch requests.
12143	NullFields []string `json:"-"`
12144}
12145
12146func (s *LatLongRect) MarshalJSON() ([]byte, error) {
12147	type NoMethod LatLongRect
12148	raw := NoMethod(*s)
12149	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12150}
12151
12152// ListOperationsResponse: The response message for
12153// Operations.ListOperations.
12154type ListOperationsResponse struct {
12155	// NextPageToken: The standard List next-page token.
12156	NextPageToken string `json:"nextPageToken,omitempty"`
12157
12158	// Operations: A list of operations that matches the specified filter in
12159	// the request.
12160	Operations []*Operation `json:"operations,omitempty"`
12161
12162	// ServerResponse contains the HTTP response code and headers from the
12163	// server.
12164	googleapi.ServerResponse `json:"-"`
12165
12166	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
12167	// unconditionally include in API requests. By default, fields with
12168	// empty values are omitted from API requests. However, any non-pointer,
12169	// non-interface field appearing in ForceSendFields will be sent to the
12170	// server regardless of whether the field is empty or not. This may be
12171	// used to include empty fields in Patch requests.
12172	ForceSendFields []string `json:"-"`
12173
12174	// NullFields is a list of field names (e.g. "NextPageToken") to include
12175	// in API requests with the JSON null value. By default, fields with
12176	// empty values are omitted from API requests. However, any field with
12177	// an empty value appearing in NullFields will be sent to the server as
12178	// null. It is an error if a field in this list has a non-empty value.
12179	// This may be used to include null fields in Patch requests.
12180	NullFields []string `json:"-"`
12181}
12182
12183func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
12184	type NoMethod ListOperationsResponse
12185	raw := NoMethod(*s)
12186	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12187}
12188
12189// ListProductSetsResponse: Response message for the `ListProductSets`
12190// method.
12191type ListProductSetsResponse struct {
12192	// NextPageToken: Token to retrieve the next page of results, or empty
12193	// if there are no more results in the list.
12194	NextPageToken string `json:"nextPageToken,omitempty"`
12195
12196	// ProductSets: List of ProductSets.
12197	ProductSets []*ProductSet `json:"productSets,omitempty"`
12198
12199	// ServerResponse contains the HTTP response code and headers from the
12200	// server.
12201	googleapi.ServerResponse `json:"-"`
12202
12203	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
12204	// unconditionally include in API requests. By default, fields with
12205	// empty values are omitted from API requests. However, any non-pointer,
12206	// non-interface field appearing in ForceSendFields will be sent to the
12207	// server regardless of whether the field is empty or not. This may be
12208	// used to include empty fields in Patch requests.
12209	ForceSendFields []string `json:"-"`
12210
12211	// NullFields is a list of field names (e.g. "NextPageToken") to include
12212	// in API requests with the JSON null value. By default, fields with
12213	// empty values are omitted from API requests. However, any field with
12214	// an empty value appearing in NullFields will be sent to the server as
12215	// null. It is an error if a field in this list has a non-empty value.
12216	// This may be used to include null fields in Patch requests.
12217	NullFields []string `json:"-"`
12218}
12219
12220func (s *ListProductSetsResponse) MarshalJSON() ([]byte, error) {
12221	type NoMethod ListProductSetsResponse
12222	raw := NoMethod(*s)
12223	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12224}
12225
12226// ListProductsInProductSetResponse: Response message for the
12227// `ListProductsInProductSet` method.
12228type ListProductsInProductSetResponse struct {
12229	// NextPageToken: Token to retrieve the next page of results, or empty
12230	// if there are no more results in the list.
12231	NextPageToken string `json:"nextPageToken,omitempty"`
12232
12233	// Products: The list of Products.
12234	Products []*Product `json:"products,omitempty"`
12235
12236	// ServerResponse contains the HTTP response code and headers from the
12237	// server.
12238	googleapi.ServerResponse `json:"-"`
12239
12240	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
12241	// unconditionally include in API requests. By default, fields with
12242	// empty values are omitted from API requests. However, any non-pointer,
12243	// non-interface field appearing in ForceSendFields will be sent to the
12244	// server regardless of whether the field is empty or not. This may be
12245	// used to include empty fields in Patch requests.
12246	ForceSendFields []string `json:"-"`
12247
12248	// NullFields is a list of field names (e.g. "NextPageToken") to include
12249	// in API requests with the JSON null value. By default, fields with
12250	// empty values are omitted from API requests. However, any field with
12251	// an empty value appearing in NullFields will be sent to the server as
12252	// null. It is an error if a field in this list has a non-empty value.
12253	// This may be used to include null fields in Patch requests.
12254	NullFields []string `json:"-"`
12255}
12256
12257func (s *ListProductsInProductSetResponse) MarshalJSON() ([]byte, error) {
12258	type NoMethod ListProductsInProductSetResponse
12259	raw := NoMethod(*s)
12260	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12261}
12262
12263// ListProductsResponse: Response message for the `ListProducts` method.
12264type ListProductsResponse struct {
12265	// NextPageToken: Token to retrieve the next page of results, or empty
12266	// if there are no more results in the list.
12267	NextPageToken string `json:"nextPageToken,omitempty"`
12268
12269	// Products: List of products.
12270	Products []*Product `json:"products,omitempty"`
12271
12272	// ServerResponse contains the HTTP response code and headers from the
12273	// server.
12274	googleapi.ServerResponse `json:"-"`
12275
12276	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
12277	// unconditionally include in API requests. By default, fields with
12278	// empty values are omitted from API requests. However, any non-pointer,
12279	// non-interface field appearing in ForceSendFields will be sent to the
12280	// server regardless of whether the field is empty or not. This may be
12281	// used to include empty fields in Patch requests.
12282	ForceSendFields []string `json:"-"`
12283
12284	// NullFields is a list of field names (e.g. "NextPageToken") to include
12285	// in API requests with the JSON null value. By default, fields with
12286	// empty values are omitted from API requests. However, any field with
12287	// an empty value appearing in NullFields will be sent to the server as
12288	// null. It is an error if a field in this list has a non-empty value.
12289	// This may be used to include null fields in Patch requests.
12290	NullFields []string `json:"-"`
12291}
12292
12293func (s *ListProductsResponse) MarshalJSON() ([]byte, error) {
12294	type NoMethod ListProductsResponse
12295	raw := NoMethod(*s)
12296	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12297}
12298
12299// ListReferenceImagesResponse: Response message for the
12300// `ListReferenceImages` method.
12301type ListReferenceImagesResponse struct {
12302	// NextPageToken: The next_page_token returned from a previous List
12303	// request, if any.
12304	NextPageToken string `json:"nextPageToken,omitempty"`
12305
12306	// PageSize: The maximum number of items to return. Default 10, maximum
12307	// 100.
12308	PageSize int64 `json:"pageSize,omitempty"`
12309
12310	// ReferenceImages: The list of reference images.
12311	ReferenceImages []*ReferenceImage `json:"referenceImages,omitempty"`
12312
12313	// ServerResponse contains the HTTP response code and headers from the
12314	// server.
12315	googleapi.ServerResponse `json:"-"`
12316
12317	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
12318	// unconditionally include in API requests. By default, fields with
12319	// empty values are omitted from API requests. However, any non-pointer,
12320	// non-interface field appearing in ForceSendFields will be sent to the
12321	// server regardless of whether the field is empty or not. This may be
12322	// used to include empty fields in Patch requests.
12323	ForceSendFields []string `json:"-"`
12324
12325	// NullFields is a list of field names (e.g. "NextPageToken") to include
12326	// in API requests with the JSON null value. By default, fields with
12327	// empty values are omitted from API requests. However, any field with
12328	// an empty value appearing in NullFields will be sent to the server as
12329	// null. It is an error if a field in this list has a non-empty value.
12330	// This may be used to include null fields in Patch requests.
12331	NullFields []string `json:"-"`
12332}
12333
12334func (s *ListReferenceImagesResponse) MarshalJSON() ([]byte, error) {
12335	type NoMethod ListReferenceImagesResponse
12336	raw := NoMethod(*s)
12337	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12338}
12339
12340// LocalizedObjectAnnotation: Set of detected objects with bounding
12341// boxes.
12342type LocalizedObjectAnnotation struct {
12343	// BoundingPoly: Image region to which this object belongs. This must be
12344	// populated.
12345	BoundingPoly *BoundingPoly `json:"boundingPoly,omitempty"`
12346
12347	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
12348	// For more information, see
12349	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
12350	LanguageCode string `json:"languageCode,omitempty"`
12351
12352	// Mid: Object ID that should align with EntityAnnotation mid.
12353	Mid string `json:"mid,omitempty"`
12354
12355	// Name: Object name, expressed in its `language_code` language.
12356	Name string `json:"name,omitempty"`
12357
12358	// Score: Score of the result. Range [0, 1].
12359	Score float64 `json:"score,omitempty"`
12360
12361	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
12362	// unconditionally include in API requests. By default, fields with
12363	// empty values are omitted from API requests. However, any non-pointer,
12364	// non-interface field appearing in ForceSendFields will be sent to the
12365	// server regardless of whether the field is empty or not. This may be
12366	// used to include empty fields in Patch requests.
12367	ForceSendFields []string `json:"-"`
12368
12369	// NullFields is a list of field names (e.g. "BoundingPoly") to include
12370	// in API requests with the JSON null value. By default, fields with
12371	// empty values are omitted from API requests. However, any field with
12372	// an empty value appearing in NullFields will be sent to the server as
12373	// null. It is an error if a field in this list has a non-empty value.
12374	// This may be used to include null fields in Patch requests.
12375	NullFields []string `json:"-"`
12376}
12377
12378func (s *LocalizedObjectAnnotation) MarshalJSON() ([]byte, error) {
12379	type NoMethod LocalizedObjectAnnotation
12380	raw := NoMethod(*s)
12381	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12382}
12383
12384func (s *LocalizedObjectAnnotation) UnmarshalJSON(data []byte) error {
12385	type NoMethod LocalizedObjectAnnotation
12386	var s1 struct {
12387		Score gensupport.JSONFloat64 `json:"score"`
12388		*NoMethod
12389	}
12390	s1.NoMethod = (*NoMethod)(s)
12391	if err := json.Unmarshal(data, &s1); err != nil {
12392		return err
12393	}
12394	s.Score = float64(s1.Score)
12395	return nil
12396}
12397
12398// LocationInfo: Detected entity location information.
12399type LocationInfo struct {
12400	// LatLng: lat/long location coordinates.
12401	LatLng *LatLng `json:"latLng,omitempty"`
12402
12403	// ForceSendFields is a list of field names (e.g. "LatLng") to
12404	// unconditionally include in API requests. By default, fields with
12405	// empty values are omitted from API requests. However, any non-pointer,
12406	// non-interface field appearing in ForceSendFields will be sent to the
12407	// server regardless of whether the field is empty or not. This may be
12408	// used to include empty fields in Patch requests.
12409	ForceSendFields []string `json:"-"`
12410
12411	// NullFields is a list of field names (e.g. "LatLng") to include in API
12412	// requests with the JSON null value. By default, fields with empty
12413	// values are omitted from API requests. However, any field with an
12414	// empty value appearing in NullFields will be sent to the server as
12415	// null. It is an error if a field in this list has a non-empty value.
12416	// This may be used to include null fields in Patch requests.
12417	NullFields []string `json:"-"`
12418}
12419
12420func (s *LocationInfo) MarshalJSON() ([]byte, error) {
12421	type NoMethod LocationInfo
12422	raw := NoMethod(*s)
12423	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12424}
12425
12426// NormalizedVertex: A vertex represents a 2D point in the image. NOTE:
12427// the normalized vertex coordinates are relative to the original image
12428// and range from 0 to 1.
12429type NormalizedVertex struct {
12430	// X: X coordinate.
12431	X float64 `json:"x,omitempty"`
12432
12433	// Y: Y coordinate.
12434	Y float64 `json:"y,omitempty"`
12435
12436	// ForceSendFields is a list of field names (e.g. "X") to
12437	// unconditionally include in API requests. By default, fields with
12438	// empty values are omitted from API requests. However, any non-pointer,
12439	// non-interface field appearing in ForceSendFields will be sent to the
12440	// server regardless of whether the field is empty or not. This may be
12441	// used to include empty fields in Patch requests.
12442	ForceSendFields []string `json:"-"`
12443
12444	// NullFields is a list of field names (e.g. "X") to include in API
12445	// requests with the JSON null value. By default, fields with empty
12446	// values are omitted from API requests. However, any field with an
12447	// empty value appearing in NullFields will be sent to the server as
12448	// null. It is an error if a field in this list has a non-empty value.
12449	// This may be used to include null fields in Patch requests.
12450	NullFields []string `json:"-"`
12451}
12452
12453func (s *NormalizedVertex) MarshalJSON() ([]byte, error) {
12454	type NoMethod NormalizedVertex
12455	raw := NoMethod(*s)
12456	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12457}
12458
12459func (s *NormalizedVertex) UnmarshalJSON(data []byte) error {
12460	type NoMethod NormalizedVertex
12461	var s1 struct {
12462		X gensupport.JSONFloat64 `json:"x"`
12463		Y gensupport.JSONFloat64 `json:"y"`
12464		*NoMethod
12465	}
12466	s1.NoMethod = (*NoMethod)(s)
12467	if err := json.Unmarshal(data, &s1); err != nil {
12468		return err
12469	}
12470	s.X = float64(s1.X)
12471	s.Y = float64(s1.Y)
12472	return nil
12473}
12474
12475// ObjectAnnotation: Prediction for what the object in the bounding box
12476// is.
12477type ObjectAnnotation struct {
12478	// LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn".
12479	// For more information, see
12480	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
12481	LanguageCode string `json:"languageCode,omitempty"`
12482
12483	// Mid: Object ID that should align with EntityAnnotation mid.
12484	Mid string `json:"mid,omitempty"`
12485
12486	// Name: Object name, expressed in its `language_code` language.
12487	Name string `json:"name,omitempty"`
12488
12489	// Score: Score of the result. Range [0, 1].
12490	Score float64 `json:"score,omitempty"`
12491
12492	// ForceSendFields is a list of field names (e.g. "LanguageCode") to
12493	// unconditionally include in API requests. By default, fields with
12494	// empty values are omitted from API requests. However, any non-pointer,
12495	// non-interface field appearing in ForceSendFields will be sent to the
12496	// server regardless of whether the field is empty or not. This may be
12497	// used to include empty fields in Patch requests.
12498	ForceSendFields []string `json:"-"`
12499
12500	// NullFields is a list of field names (e.g. "LanguageCode") to include
12501	// in API requests with the JSON null value. By default, fields with
12502	// empty values are omitted from API requests. However, any field with
12503	// an empty value appearing in NullFields will be sent to the server as
12504	// null. It is an error if a field in this list has a non-empty value.
12505	// This may be used to include null fields in Patch requests.
12506	NullFields []string `json:"-"`
12507}
12508
12509func (s *ObjectAnnotation) MarshalJSON() ([]byte, error) {
12510	type NoMethod ObjectAnnotation
12511	raw := NoMethod(*s)
12512	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12513}
12514
12515func (s *ObjectAnnotation) UnmarshalJSON(data []byte) error {
12516	type NoMethod ObjectAnnotation
12517	var s1 struct {
12518		Score gensupport.JSONFloat64 `json:"score"`
12519		*NoMethod
12520	}
12521	s1.NoMethod = (*NoMethod)(s)
12522	if err := json.Unmarshal(data, &s1); err != nil {
12523		return err
12524	}
12525	s.Score = float64(s1.Score)
12526	return nil
12527}
12528
12529// Operation: This resource represents a long-running operation that is
12530// the result of a network API call.
12531type Operation struct {
12532	// Done: If the value is `false`, it means the operation is still in
12533	// progress. If `true`, the operation is completed, and either `error`
12534	// or `response` is available.
12535	Done bool `json:"done,omitempty"`
12536
12537	// Error: The error result of the operation in case of failure or
12538	// cancellation.
12539	Error *Status `json:"error,omitempty"`
12540
12541	// Metadata: Service-specific metadata associated with the operation. It
12542	// typically contains progress information and common metadata such as
12543	// create time. Some services might not provide such metadata. Any
12544	// method that returns a long-running operation should document the
12545	// metadata type, if any.
12546	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
12547
12548	// Name: The server-assigned name, which is only unique within the same
12549	// service that originally returns it. If you use the default HTTP
12550	// mapping, the `name` should be a resource name ending with
12551	// `operations/{unique_id}`.
12552	Name string `json:"name,omitempty"`
12553
12554	// Response: The normal response of the operation in case of success. If
12555	// the original method returns no data on success, such as `Delete`, the
12556	// response is `google.protobuf.Empty`. If the original method is
12557	// standard `Get`/`Create`/`Update`, the response should be the
12558	// resource. For other methods, the response should have the type
12559	// `XxxResponse`, where `Xxx` is the original method name. For example,
12560	// if the original method name is `TakeSnapshot()`, the inferred
12561	// response type is `TakeSnapshotResponse`.
12562	Response googleapi.RawMessage `json:"response,omitempty"`
12563
12564	// ServerResponse contains the HTTP response code and headers from the
12565	// server.
12566	googleapi.ServerResponse `json:"-"`
12567
12568	// ForceSendFields is a list of field names (e.g. "Done") to
12569	// unconditionally include in API requests. By default, fields with
12570	// empty values are omitted from API requests. However, any non-pointer,
12571	// non-interface field appearing in ForceSendFields will be sent to the
12572	// server regardless of whether the field is empty or not. This may be
12573	// used to include empty fields in Patch requests.
12574	ForceSendFields []string `json:"-"`
12575
12576	// NullFields is a list of field names (e.g. "Done") to include in API
12577	// requests with the JSON null value. By default, fields with empty
12578	// values are omitted from API requests. However, any field with an
12579	// empty value appearing in NullFields will be sent to the server as
12580	// null. It is an error if a field in this list has a non-empty value.
12581	// This may be used to include null fields in Patch requests.
12582	NullFields []string `json:"-"`
12583}
12584
12585func (s *Operation) MarshalJSON() ([]byte, error) {
12586	type NoMethod Operation
12587	raw := NoMethod(*s)
12588	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12589}
12590
12591// OperationMetadata: Contains metadata for the BatchAnnotateImages
12592// operation.
12593type OperationMetadata struct {
12594	// CreateTime: The time when the batch request was received.
12595	CreateTime string `json:"createTime,omitempty"`
12596
12597	// State: Current state of the batch operation.
12598	//
12599	// Possible values:
12600	//   "STATE_UNSPECIFIED" - Invalid.
12601	//   "CREATED" - Request is received.
12602	//   "RUNNING" - Request is actively being processed.
12603	//   "DONE" - The batch processing is done.
12604	//   "CANCELLED" - The batch processing was cancelled.
12605	State string `json:"state,omitempty"`
12606
12607	// UpdateTime: The time when the operation result was last updated.
12608	UpdateTime string `json:"updateTime,omitempty"`
12609
12610	// ForceSendFields is a list of field names (e.g. "CreateTime") to
12611	// unconditionally include in API requests. By default, fields with
12612	// empty values are omitted from API requests. However, any non-pointer,
12613	// non-interface field appearing in ForceSendFields will be sent to the
12614	// server regardless of whether the field is empty or not. This may be
12615	// used to include empty fields in Patch requests.
12616	ForceSendFields []string `json:"-"`
12617
12618	// NullFields is a list of field names (e.g. "CreateTime") to include in
12619	// API requests with the JSON null value. By default, fields with empty
12620	// values are omitted from API requests. However, any field with an
12621	// empty value appearing in NullFields will be sent to the server as
12622	// null. It is an error if a field in this list has a non-empty value.
12623	// This may be used to include null fields in Patch requests.
12624	NullFields []string `json:"-"`
12625}
12626
12627func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
12628	type NoMethod OperationMetadata
12629	raw := NoMethod(*s)
12630	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12631}
12632
12633// OutputConfig: The desired output location and metadata.
12634type OutputConfig struct {
12635	// BatchSize: The max number of response protos to put into each output
12636	// JSON file on Google Cloud Storage. The valid range is [1, 100]. If
12637	// not specified, the default value is 20. For example, for one pdf file
12638	// with 100 pages, 100 response protos will be generated. If
12639	// `batch_size` = 20, then 5 json files each containing 20 response
12640	// protos will be written under the prefix `gcs_destination`.`uri`.
12641	// Currently, batch_size only applies to GcsDestination, with potential
12642	// future support for other output configurations.
12643	BatchSize int64 `json:"batchSize,omitempty"`
12644
12645	// GcsDestination: The Google Cloud Storage location to write the
12646	// output(s) to.
12647	GcsDestination *GcsDestination `json:"gcsDestination,omitempty"`
12648
12649	// ForceSendFields is a list of field names (e.g. "BatchSize") to
12650	// unconditionally include in API requests. By default, fields with
12651	// empty values are omitted from API requests. However, any non-pointer,
12652	// non-interface field appearing in ForceSendFields will be sent to the
12653	// server regardless of whether the field is empty or not. This may be
12654	// used to include empty fields in Patch requests.
12655	ForceSendFields []string `json:"-"`
12656
12657	// NullFields is a list of field names (e.g. "BatchSize") to include in
12658	// API requests with the JSON null value. By default, fields with empty
12659	// values are omitted from API requests. However, any field with an
12660	// empty value appearing in NullFields will be sent to the server as
12661	// null. It is an error if a field in this list has a non-empty value.
12662	// This may be used to include null fields in Patch requests.
12663	NullFields []string `json:"-"`
12664}
12665
12666func (s *OutputConfig) MarshalJSON() ([]byte, error) {
12667	type NoMethod OutputConfig
12668	raw := NoMethod(*s)
12669	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12670}
12671
12672// Page: Detected page from OCR.
12673type Page struct {
12674	// Blocks: List of blocks of text, images etc on this page.
12675	Blocks []*Block `json:"blocks,omitempty"`
12676
12677	// Confidence: Confidence of the OCR results on the page. Range [0, 1].
12678	Confidence float64 `json:"confidence,omitempty"`
12679
12680	// Height: Page height. For PDFs the unit is points. For images
12681	// (including TIFFs) the unit is pixels.
12682	Height int64 `json:"height,omitempty"`
12683
12684	// Property: Additional information detected on the page.
12685	Property *TextProperty `json:"property,omitempty"`
12686
12687	// Width: Page width. For PDFs the unit is points. For images (including
12688	// TIFFs) the unit is pixels.
12689	Width int64 `json:"width,omitempty"`
12690
12691	// ForceSendFields is a list of field names (e.g. "Blocks") to
12692	// unconditionally include in API requests. By default, fields with
12693	// empty values are omitted from API requests. However, any non-pointer,
12694	// non-interface field appearing in ForceSendFields will be sent to the
12695	// server regardless of whether the field is empty or not. This may be
12696	// used to include empty fields in Patch requests.
12697	ForceSendFields []string `json:"-"`
12698
12699	// NullFields is a list of field names (e.g. "Blocks") to include in API
12700	// requests with the JSON null value. By default, fields with empty
12701	// values are omitted from API requests. However, any field with an
12702	// empty value appearing in NullFields will be sent to the server as
12703	// null. It is an error if a field in this list has a non-empty value.
12704	// This may be used to include null fields in Patch requests.
12705	NullFields []string `json:"-"`
12706}
12707
12708func (s *Page) MarshalJSON() ([]byte, error) {
12709	type NoMethod Page
12710	raw := NoMethod(*s)
12711	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12712}
12713
12714func (s *Page) UnmarshalJSON(data []byte) error {
12715	type NoMethod Page
12716	var s1 struct {
12717		Confidence gensupport.JSONFloat64 `json:"confidence"`
12718		*NoMethod
12719	}
12720	s1.NoMethod = (*NoMethod)(s)
12721	if err := json.Unmarshal(data, &s1); err != nil {
12722		return err
12723	}
12724	s.Confidence = float64(s1.Confidence)
12725	return nil
12726}
12727
12728// Paragraph: Structural unit of text representing a number of words in
12729// certain order.
12730type Paragraph struct {
12731	// BoundingBox: The bounding box for the paragraph. The vertices are in
12732	// the order of top-left, top-right, bottom-right, bottom-left. When a
12733	// rotation of the bounding box is detected the rotation is represented
12734	// as around the top-left corner as defined when the text is read in the
12735	// 'natural' orientation. For example: * when the text is horizontal it
12736	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
12737	// around the top-left corner it becomes: 2----3 | | 1----0 and the
12738	// vertex order will still be (0, 1, 2, 3).
12739	BoundingBox *BoundingPoly `json:"boundingBox,omitempty"`
12740
12741	// Confidence: Confidence of the OCR results for the paragraph. Range
12742	// [0, 1].
12743	Confidence float64 `json:"confidence,omitempty"`
12744
12745	// Property: Additional information detected for the paragraph.
12746	Property *TextProperty `json:"property,omitempty"`
12747
12748	// Words: List of all words in this paragraph.
12749	Words []*Word `json:"words,omitempty"`
12750
12751	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
12752	// unconditionally include in API requests. By default, fields with
12753	// empty values are omitted from API requests. However, any non-pointer,
12754	// non-interface field appearing in ForceSendFields will be sent to the
12755	// server regardless of whether the field is empty or not. This may be
12756	// used to include empty fields in Patch requests.
12757	ForceSendFields []string `json:"-"`
12758
12759	// NullFields is a list of field names (e.g. "BoundingBox") to include
12760	// in API requests with the JSON null value. By default, fields with
12761	// empty values are omitted from API requests. However, any field with
12762	// an empty value appearing in NullFields will be sent to the server as
12763	// null. It is an error if a field in this list has a non-empty value.
12764	// This may be used to include null fields in Patch requests.
12765	NullFields []string `json:"-"`
12766}
12767
12768func (s *Paragraph) MarshalJSON() ([]byte, error) {
12769	type NoMethod Paragraph
12770	raw := NoMethod(*s)
12771	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12772}
12773
12774func (s *Paragraph) UnmarshalJSON(data []byte) error {
12775	type NoMethod Paragraph
12776	var s1 struct {
12777		Confidence gensupport.JSONFloat64 `json:"confidence"`
12778		*NoMethod
12779	}
12780	s1.NoMethod = (*NoMethod)(s)
12781	if err := json.Unmarshal(data, &s1); err != nil {
12782		return err
12783	}
12784	s.Confidence = float64(s1.Confidence)
12785	return nil
12786}
12787
12788// Position: A 3D position in the image, used primarily for Face
12789// detection landmarks. A valid Position must have both x and y
12790// coordinates. The position coordinates are in the same scale as the
12791// original image.
12792type Position struct {
12793	// X: X coordinate.
12794	X float64 `json:"x,omitempty"`
12795
12796	// Y: Y coordinate.
12797	Y float64 `json:"y,omitempty"`
12798
12799	// Z: Z coordinate (or depth).
12800	Z float64 `json:"z,omitempty"`
12801
12802	// ForceSendFields is a list of field names (e.g. "X") to
12803	// unconditionally include in API requests. By default, fields with
12804	// empty values are omitted from API requests. However, any non-pointer,
12805	// non-interface field appearing in ForceSendFields will be sent to the
12806	// server regardless of whether the field is empty or not. This may be
12807	// used to include empty fields in Patch requests.
12808	ForceSendFields []string `json:"-"`
12809
12810	// NullFields is a list of field names (e.g. "X") to include in API
12811	// requests with the JSON null value. By default, fields with empty
12812	// values are omitted from API requests. However, any field with an
12813	// empty value appearing in NullFields will be sent to the server as
12814	// null. It is an error if a field in this list has a non-empty value.
12815	// This may be used to include null fields in Patch requests.
12816	NullFields []string `json:"-"`
12817}
12818
12819func (s *Position) MarshalJSON() ([]byte, error) {
12820	type NoMethod Position
12821	raw := NoMethod(*s)
12822	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12823}
12824
12825func (s *Position) UnmarshalJSON(data []byte) error {
12826	type NoMethod Position
12827	var s1 struct {
12828		X gensupport.JSONFloat64 `json:"x"`
12829		Y gensupport.JSONFloat64 `json:"y"`
12830		Z gensupport.JSONFloat64 `json:"z"`
12831		*NoMethod
12832	}
12833	s1.NoMethod = (*NoMethod)(s)
12834	if err := json.Unmarshal(data, &s1); err != nil {
12835		return err
12836	}
12837	s.X = float64(s1.X)
12838	s.Y = float64(s1.Y)
12839	s.Z = float64(s1.Z)
12840	return nil
12841}
12842
12843// Product: A Product contains ReferenceImages.
12844type Product struct {
12845	// Description: User-provided metadata to be stored with this product.
12846	// Must be at most 4096 characters long.
12847	Description string `json:"description,omitempty"`
12848
12849	// DisplayName: The user-provided name for this Product. Must not be
12850	// empty. Must be at most 4096 characters long.
12851	DisplayName string `json:"displayName,omitempty"`
12852
12853	// Name: The resource name of the product. Format is:
12854	// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This
12855	// field is ignored when creating a product.
12856	Name string `json:"name,omitempty"`
12857
12858	// ProductCategory: Immutable. The category for the product identified
12859	// by the reference image. This should be one of "homegoods-v2",
12860	// "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The
12861	// legacy categories "homegoods", "apparel", and "toys" are still
12862	// supported, but these should not be used for new products.
12863	ProductCategory string `json:"productCategory,omitempty"`
12864
12865	// ProductLabels: Key-value pairs that can be attached to a product. At
12866	// query time, constraints can be specified based on the product_labels.
12867	// Note that integer values can be provided as strings, e.g. "1199".
12868	// Only strings with integer values can match a range-based restriction
12869	// which is to be supported soon. Multiple values can be assigned to the
12870	// same key. One product may have up to 500 product_labels. Notice that
12871	// the total number of distinct product_labels over all products in one
12872	// ProductSet cannot exceed 1M, otherwise the product search pipeline
12873	// will refuse to work for that ProductSet.
12874	ProductLabels []*KeyValue `json:"productLabels,omitempty"`
12875
12876	// ServerResponse contains the HTTP response code and headers from the
12877	// server.
12878	googleapi.ServerResponse `json:"-"`
12879
12880	// ForceSendFields is a list of field names (e.g. "Description") to
12881	// unconditionally include in API requests. By default, fields with
12882	// empty values are omitted from API requests. However, any non-pointer,
12883	// non-interface field appearing in ForceSendFields will be sent to the
12884	// server regardless of whether the field is empty or not. This may be
12885	// used to include empty fields in Patch requests.
12886	ForceSendFields []string `json:"-"`
12887
12888	// NullFields is a list of field names (e.g. "Description") to include
12889	// in API requests with the JSON null value. By default, fields with
12890	// empty values are omitted from API requests. However, any field with
12891	// an empty value appearing in NullFields will be sent to the server as
12892	// null. It is an error if a field in this list has a non-empty value.
12893	// This may be used to include null fields in Patch requests.
12894	NullFields []string `json:"-"`
12895}
12896
12897func (s *Product) MarshalJSON() ([]byte, error) {
12898	type NoMethod Product
12899	raw := NoMethod(*s)
12900	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12901}
12902
12903// ProductSearchParams: Parameters for a product search request.
12904type ProductSearchParams struct {
12905	// BoundingPoly: The bounding polygon around the area of interest in the
12906	// image. If it is not specified, system discretion will be applied.
12907	BoundingPoly *BoundingPoly `json:"boundingPoly,omitempty"`
12908
12909	// Filter: The filtering expression. This can be used to restrict search
12910	// results based on Product labels. We currently support an AND of OR of
12911	// key-value expressions, where each expression within an OR must have
12912	// the same key. An '=' should be used to connect the key and value. For
12913	// example, "(color = red OR color = blue) AND brand = Google" is
12914	// acceptable, but "(color = red OR brand = Google)" is not acceptable.
12915	// "color: red" is not acceptable because it uses a ':' instead of an
12916	// '='.
12917	Filter string `json:"filter,omitempty"`
12918
12919	// ProductCategories: The list of product categories to search in.
12920	// Currently, we only consider the first category, and either
12921	// "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1", or
12922	// "general-v1" should be specified. The legacy categories "homegoods",
12923	// "apparel", and "toys" are still supported but will be deprecated. For
12924	// new products, please use "homegoods-v2", "apparel-v2", or "toys-v2"
12925	// for better product search accuracy. It is recommended to migrate
12926	// existing products to these categories as well.
12927	ProductCategories []string `json:"productCategories,omitempty"`
12928
12929	// ProductSet: The resource name of a ProductSet to be searched for
12930	// similar images. Format is:
12931	// `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
12932	ProductSet string `json:"productSet,omitempty"`
12933
12934	// ForceSendFields is a list of field names (e.g. "BoundingPoly") to
12935	// unconditionally include in API requests. By default, fields with
12936	// empty values are omitted from API requests. However, any non-pointer,
12937	// non-interface field appearing in ForceSendFields will be sent to the
12938	// server regardless of whether the field is empty or not. This may be
12939	// used to include empty fields in Patch requests.
12940	ForceSendFields []string `json:"-"`
12941
12942	// NullFields is a list of field names (e.g. "BoundingPoly") to include
12943	// in API requests with the JSON null value. By default, fields with
12944	// empty values are omitted from API requests. However, any field with
12945	// an empty value appearing in NullFields will be sent to the server as
12946	// null. It is an error if a field in this list has a non-empty value.
12947	// This may be used to include null fields in Patch requests.
12948	NullFields []string `json:"-"`
12949}
12950
12951func (s *ProductSearchParams) MarshalJSON() ([]byte, error) {
12952	type NoMethod ProductSearchParams
12953	raw := NoMethod(*s)
12954	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12955}
12956
12957// ProductSearchResults: Results for a product search request.
12958type ProductSearchResults struct {
12959	// IndexTime: Timestamp of the index which provided these results.
12960	// Products added to the product set and products removed from the
12961	// product set after this time are not reflected in the current results.
12962	IndexTime string `json:"indexTime,omitempty"`
12963
12964	// ProductGroupedResults: List of results grouped by products detected
12965	// in the query image. Each entry corresponds to one bounding polygon in
12966	// the query image, and contains the matching products specific to that
12967	// region. There may be duplicate product matches in the union of all
12968	// the per-product results.
12969	ProductGroupedResults []*GroupedResult `json:"productGroupedResults,omitempty"`
12970
12971	// Results: List of results, one for each product match.
12972	Results []*Result `json:"results,omitempty"`
12973
12974	// ForceSendFields is a list of field names (e.g. "IndexTime") to
12975	// unconditionally include in API requests. By default, fields with
12976	// empty values are omitted from API requests. However, any non-pointer,
12977	// non-interface field appearing in ForceSendFields will be sent to the
12978	// server regardless of whether the field is empty or not. This may be
12979	// used to include empty fields in Patch requests.
12980	ForceSendFields []string `json:"-"`
12981
12982	// NullFields is a list of field names (e.g. "IndexTime") to include in
12983	// API requests with the JSON null value. By default, fields with empty
12984	// values are omitted from API requests. However, any field with an
12985	// empty value appearing in NullFields will be sent to the server as
12986	// null. It is an error if a field in this list has a non-empty value.
12987	// This may be used to include null fields in Patch requests.
12988	NullFields []string `json:"-"`
12989}
12990
12991func (s *ProductSearchResults) MarshalJSON() ([]byte, error) {
12992	type NoMethod ProductSearchResults
12993	raw := NoMethod(*s)
12994	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
12995}
12996
12997// ProductSet: A ProductSet contains Products. A ProductSet can contain
12998// a maximum of 1 million reference images. If the limit is exceeded,
12999// periodic indexing will fail.
13000type ProductSet struct {
13001	// DisplayName: The user-provided name for this ProductSet. Must not be
13002	// empty. Must be at most 4096 characters long.
13003	DisplayName string `json:"displayName,omitempty"`
13004
13005	// IndexError: Output only. If there was an error with indexing the
13006	// product set, the field is populated. This field is ignored when
13007	// creating a ProductSet.
13008	IndexError *Status `json:"indexError,omitempty"`
13009
13010	// IndexTime: Output only. The time at which this ProductSet was last
13011	// indexed. Query results will reflect all updates before this time. If
13012	// this ProductSet has never been indexed, this timestamp is the default
13013	// value "1970-01-01T00:00:00Z". This field is ignored when creating a
13014	// ProductSet.
13015	IndexTime string `json:"indexTime,omitempty"`
13016
13017	// Name: The resource name of the ProductSet. Format is:
13018	// `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
13019	// This field is ignored when creating a ProductSet.
13020	Name string `json:"name,omitempty"`
13021
13022	// ServerResponse contains the HTTP response code and headers from the
13023	// server.
13024	googleapi.ServerResponse `json:"-"`
13025
13026	// ForceSendFields is a list of field names (e.g. "DisplayName") to
13027	// unconditionally include in API requests. By default, fields with
13028	// empty values are omitted from API requests. However, any non-pointer,
13029	// non-interface field appearing in ForceSendFields will be sent to the
13030	// server regardless of whether the field is empty or not. This may be
13031	// used to include empty fields in Patch requests.
13032	ForceSendFields []string `json:"-"`
13033
13034	// NullFields is a list of field names (e.g. "DisplayName") to include
13035	// in API requests with the JSON null value. By default, fields with
13036	// empty values are omitted from API requests. However, any field with
13037	// an empty value appearing in NullFields will be sent to the server as
13038	// null. It is an error if a field in this list has a non-empty value.
13039	// This may be used to include null fields in Patch requests.
13040	NullFields []string `json:"-"`
13041}
13042
13043func (s *ProductSet) MarshalJSON() ([]byte, error) {
13044	type NoMethod ProductSet
13045	raw := NoMethod(*s)
13046	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13047}
13048
13049// ProductSetPurgeConfig: Config to control which ProductSet contains
13050// the Products to be deleted.
13051type ProductSetPurgeConfig struct {
13052	// ProductSetId: The ProductSet that contains the Products to delete. If
13053	// a Product is a member of product_set_id in addition to other
13054	// ProductSets, the Product will still be deleted.
13055	ProductSetId string `json:"productSetId,omitempty"`
13056
13057	// ForceSendFields is a list of field names (e.g. "ProductSetId") to
13058	// unconditionally include in API requests. By default, fields with
13059	// empty values are omitted from API requests. However, any non-pointer,
13060	// non-interface field appearing in ForceSendFields will be sent to the
13061	// server regardless of whether the field is empty or not. This may be
13062	// used to include empty fields in Patch requests.
13063	ForceSendFields []string `json:"-"`
13064
13065	// NullFields is a list of field names (e.g. "ProductSetId") to include
13066	// in API requests with the JSON null value. By default, fields with
13067	// empty values are omitted from API requests. However, any field with
13068	// an empty value appearing in NullFields will be sent to the server as
13069	// null. It is an error if a field in this list has a non-empty value.
13070	// This may be used to include null fields in Patch requests.
13071	NullFields []string `json:"-"`
13072}
13073
13074func (s *ProductSetPurgeConfig) MarshalJSON() ([]byte, error) {
13075	type NoMethod ProductSetPurgeConfig
13076	raw := NoMethod(*s)
13077	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13078}
13079
13080// Property: A `Property` consists of a user-supplied name/value pair.
13081type Property struct {
13082	// Name: Name of the property.
13083	Name string `json:"name,omitempty"`
13084
13085	// Uint64Value: Value of numeric properties.
13086	Uint64Value uint64 `json:"uint64Value,omitempty,string"`
13087
13088	// Value: Value of the property.
13089	Value string `json:"value,omitempty"`
13090
13091	// ForceSendFields is a list of field names (e.g. "Name") to
13092	// unconditionally include in API requests. By default, fields with
13093	// empty values are omitted from API requests. However, any non-pointer,
13094	// non-interface field appearing in ForceSendFields will be sent to the
13095	// server regardless of whether the field is empty or not. This may be
13096	// used to include empty fields in Patch requests.
13097	ForceSendFields []string `json:"-"`
13098
13099	// NullFields is a list of field names (e.g. "Name") to include in API
13100	// requests with the JSON null value. By default, fields with empty
13101	// values are omitted from API requests. However, any field with an
13102	// empty value appearing in NullFields will be sent to the server as
13103	// null. It is an error if a field in this list has a non-empty value.
13104	// This may be used to include null fields in Patch requests.
13105	NullFields []string `json:"-"`
13106}
13107
13108func (s *Property) MarshalJSON() ([]byte, error) {
13109	type NoMethod Property
13110	raw := NoMethod(*s)
13111	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13112}
13113
13114// PurgeProductsRequest: Request message for the `PurgeProducts` method.
13115type PurgeProductsRequest struct {
13116	// DeleteOrphanProducts: If delete_orphan_products is true, all Products
13117	// that are not in any ProductSet will be deleted.
13118	DeleteOrphanProducts bool `json:"deleteOrphanProducts,omitempty"`
13119
13120	// Force: The default value is false. Override this value to true to
13121	// actually perform the purge.
13122	Force bool `json:"force,omitempty"`
13123
13124	// ProductSetPurgeConfig: Specify which ProductSet contains the Products
13125	// to be deleted.
13126	ProductSetPurgeConfig *ProductSetPurgeConfig `json:"productSetPurgeConfig,omitempty"`
13127
13128	// ForceSendFields is a list of field names (e.g.
13129	// "DeleteOrphanProducts") to unconditionally include in API requests.
13130	// By default, fields with empty values are omitted from API requests.
13131	// However, any non-pointer, non-interface field appearing in
13132	// ForceSendFields will be sent to the server regardless of whether the
13133	// field is empty or not. This may be used to include empty fields in
13134	// Patch requests.
13135	ForceSendFields []string `json:"-"`
13136
13137	// NullFields is a list of field names (e.g. "DeleteOrphanProducts") to
13138	// include in API requests with the JSON null value. By default, fields
13139	// with empty values are omitted from API requests. However, any field
13140	// with an empty value appearing in NullFields will be sent to the
13141	// server as null. It is an error if a field in this list has a
13142	// non-empty value. This may be used to include null fields in Patch
13143	// requests.
13144	NullFields []string `json:"-"`
13145}
13146
13147func (s *PurgeProductsRequest) MarshalJSON() ([]byte, error) {
13148	type NoMethod PurgeProductsRequest
13149	raw := NoMethod(*s)
13150	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13151}
13152
13153// ReferenceImage: A `ReferenceImage` represents a product image and its
13154// associated metadata, such as bounding boxes.
13155type ReferenceImage struct {
13156	// BoundingPolys: Optional. Bounding polygons around the areas of
13157	// interest in the reference image. If this field is empty, the system
13158	// will try to detect regions of interest. At most 10 bounding polygons
13159	// will be used. The provided shape is converted into a non-rotated
13160	// rectangle. Once converted, the small edge of the rectangle must be
13161	// greater than or equal to 300 pixels. The aspect ratio must be 1:4 or
13162	// less (i.e. 1:3 is ok; 1:5 is not).
13163	BoundingPolys []*BoundingPoly `json:"boundingPolys,omitempty"`
13164
13165	// Name: The resource name of the reference image. Format is:
13166	// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceIma
13167	// ges/IMAGE_ID`. This field is ignored when creating a reference image.
13168	Name string `json:"name,omitempty"`
13169
13170	// Uri: Required. The Google Cloud Storage URI of the reference image.
13171	// The URI must start with `gs://`.
13172	Uri string `json:"uri,omitempty"`
13173
13174	// ServerResponse contains the HTTP response code and headers from the
13175	// server.
13176	googleapi.ServerResponse `json:"-"`
13177
13178	// ForceSendFields is a list of field names (e.g. "BoundingPolys") to
13179	// unconditionally include in API requests. By default, fields with
13180	// empty values are omitted from API requests. However, any non-pointer,
13181	// non-interface field appearing in ForceSendFields will be sent to the
13182	// server regardless of whether the field is empty or not. This may be
13183	// used to include empty fields in Patch requests.
13184	ForceSendFields []string `json:"-"`
13185
13186	// NullFields is a list of field names (e.g. "BoundingPolys") to include
13187	// in API requests with the JSON null value. By default, fields with
13188	// empty values are omitted from API requests. However, any field with
13189	// an empty value appearing in NullFields will be sent to the server as
13190	// null. It is an error if a field in this list has a non-empty value.
13191	// This may be used to include null fields in Patch requests.
13192	NullFields []string `json:"-"`
13193}
13194
13195func (s *ReferenceImage) MarshalJSON() ([]byte, error) {
13196	type NoMethod ReferenceImage
13197	raw := NoMethod(*s)
13198	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13199}
13200
13201// RemoveProductFromProductSetRequest: Request message for the
13202// `RemoveProductFromProductSet` method.
13203type RemoveProductFromProductSetRequest struct {
13204	// Product: Required. The resource name for the Product to be removed
13205	// from this ProductSet. Format is:
13206	// `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`
13207	Product string `json:"product,omitempty"`
13208
13209	// ForceSendFields is a list of field names (e.g. "Product") to
13210	// unconditionally include in API requests. By default, fields with
13211	// empty values are omitted from API requests. However, any non-pointer,
13212	// non-interface field appearing in ForceSendFields will be sent to the
13213	// server regardless of whether the field is empty or not. This may be
13214	// used to include empty fields in Patch requests.
13215	ForceSendFields []string `json:"-"`
13216
13217	// NullFields is a list of field names (e.g. "Product") to include in
13218	// API requests with the JSON null value. By default, fields with empty
13219	// values are omitted from API requests. However, any field with an
13220	// empty value appearing in NullFields will be sent to the server as
13221	// null. It is an error if a field in this list has a non-empty value.
13222	// This may be used to include null fields in Patch requests.
13223	NullFields []string `json:"-"`
13224}
13225
13226func (s *RemoveProductFromProductSetRequest) MarshalJSON() ([]byte, error) {
13227	type NoMethod RemoveProductFromProductSetRequest
13228	raw := NoMethod(*s)
13229	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13230}
13231
13232// Result: Information about a product.
13233type Result struct {
13234	// Image: The resource name of the image from the product that is the
13235	// closest match to the query.
13236	Image string `json:"image,omitempty"`
13237
13238	// Product: The Product.
13239	Product *Product `json:"product,omitempty"`
13240
13241	// Score: A confidence level on the match, ranging from 0 (no
13242	// confidence) to 1 (full confidence).
13243	Score float64 `json:"score,omitempty"`
13244
13245	// ForceSendFields is a list of field names (e.g. "Image") to
13246	// unconditionally include in API requests. By default, fields with
13247	// empty values are omitted from API requests. However, any non-pointer,
13248	// non-interface field appearing in ForceSendFields will be sent to the
13249	// server regardless of whether the field is empty or not. This may be
13250	// used to include empty fields in Patch requests.
13251	ForceSendFields []string `json:"-"`
13252
13253	// NullFields is a list of field names (e.g. "Image") to include in API
13254	// requests with the JSON null value. By default, fields with empty
13255	// values are omitted from API requests. However, any field with an
13256	// empty value appearing in NullFields will be sent to the server as
13257	// null. It is an error if a field in this list has a non-empty value.
13258	// This may be used to include null fields in Patch requests.
13259	NullFields []string `json:"-"`
13260}
13261
13262func (s *Result) MarshalJSON() ([]byte, error) {
13263	type NoMethod Result
13264	raw := NoMethod(*s)
13265	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13266}
13267
13268func (s *Result) UnmarshalJSON(data []byte) error {
13269	type NoMethod Result
13270	var s1 struct {
13271		Score gensupport.JSONFloat64 `json:"score"`
13272		*NoMethod
13273	}
13274	s1.NoMethod = (*NoMethod)(s)
13275	if err := json.Unmarshal(data, &s1); err != nil {
13276		return err
13277	}
13278	s.Score = float64(s1.Score)
13279	return nil
13280}
13281
13282// SafeSearchAnnotation: Set of features pertaining to the image,
13283// computed by computer vision methods over safe-search verticals (for
13284// example, adult, spoof, medical, violence).
13285type SafeSearchAnnotation struct {
13286	// Adult: Represents the adult content likelihood for the image. Adult
13287	// content may contain elements such as nudity, pornographic images or
13288	// cartoons, or sexual activities.
13289	//
13290	// Possible values:
13291	//   "UNKNOWN" - Unknown likelihood.
13292	//   "VERY_UNLIKELY" - It is very unlikely.
13293	//   "UNLIKELY" - It is unlikely.
13294	//   "POSSIBLE" - It is possible.
13295	//   "LIKELY" - It is likely.
13296	//   "VERY_LIKELY" - It is very likely.
13297	Adult string `json:"adult,omitempty"`
13298
13299	// Medical: Likelihood that this is a medical image.
13300	//
13301	// Possible values:
13302	//   "UNKNOWN" - Unknown likelihood.
13303	//   "VERY_UNLIKELY" - It is very unlikely.
13304	//   "UNLIKELY" - It is unlikely.
13305	//   "POSSIBLE" - It is possible.
13306	//   "LIKELY" - It is likely.
13307	//   "VERY_LIKELY" - It is very likely.
13308	Medical string `json:"medical,omitempty"`
13309
13310	// Racy: Likelihood that the request image contains racy content. Racy
13311	// content may include (but is not limited to) skimpy or sheer clothing,
13312	// strategically covered nudity, lewd or provocative poses, or close-ups
13313	// of sensitive body areas.
13314	//
13315	// Possible values:
13316	//   "UNKNOWN" - Unknown likelihood.
13317	//   "VERY_UNLIKELY" - It is very unlikely.
13318	//   "UNLIKELY" - It is unlikely.
13319	//   "POSSIBLE" - It is possible.
13320	//   "LIKELY" - It is likely.
13321	//   "VERY_LIKELY" - It is very likely.
13322	Racy string `json:"racy,omitempty"`
13323
13324	// Spoof: Spoof likelihood. The likelihood that an modification was made
13325	// to the image's canonical version to make it appear funny or
13326	// offensive.
13327	//
13328	// Possible values:
13329	//   "UNKNOWN" - Unknown likelihood.
13330	//   "VERY_UNLIKELY" - It is very unlikely.
13331	//   "UNLIKELY" - It is unlikely.
13332	//   "POSSIBLE" - It is possible.
13333	//   "LIKELY" - It is likely.
13334	//   "VERY_LIKELY" - It is very likely.
13335	Spoof string `json:"spoof,omitempty"`
13336
13337	// Violence: Likelihood that this image contains violent content.
13338	//
13339	// Possible values:
13340	//   "UNKNOWN" - Unknown likelihood.
13341	//   "VERY_UNLIKELY" - It is very unlikely.
13342	//   "UNLIKELY" - It is unlikely.
13343	//   "POSSIBLE" - It is possible.
13344	//   "LIKELY" - It is likely.
13345	//   "VERY_LIKELY" - It is very likely.
13346	Violence string `json:"violence,omitempty"`
13347
13348	// ForceSendFields is a list of field names (e.g. "Adult") to
13349	// unconditionally include in API requests. By default, fields with
13350	// empty values are omitted from API requests. However, any non-pointer,
13351	// non-interface field appearing in ForceSendFields will be sent to the
13352	// server regardless of whether the field is empty or not. This may be
13353	// used to include empty fields in Patch requests.
13354	ForceSendFields []string `json:"-"`
13355
13356	// NullFields is a list of field names (e.g. "Adult") to include in API
13357	// requests with the JSON null value. By default, fields with empty
13358	// values are omitted from API requests. However, any field with an
13359	// empty value appearing in NullFields will be sent to the server as
13360	// null. It is an error if a field in this list has a non-empty value.
13361	// This may be used to include null fields in Patch requests.
13362	NullFields []string `json:"-"`
13363}
13364
13365func (s *SafeSearchAnnotation) MarshalJSON() ([]byte, error) {
13366	type NoMethod SafeSearchAnnotation
13367	raw := NoMethod(*s)
13368	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13369}
13370
13371// Status: The `Status` type defines a logical error model that is
13372// suitable for different programming environments, including REST APIs
13373// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
13374// `Status` message contains three pieces of data: error code, error
13375// message, and error details. You can find out more about this error
13376// model and how to work with it in the API Design Guide
13377// (https://cloud.google.com/apis/design/errors).
13378type Status struct {
13379	// Code: The status code, which should be an enum value of
13380	// google.rpc.Code.
13381	Code int64 `json:"code,omitempty"`
13382
13383	// Details: A list of messages that carry the error details. There is a
13384	// common set of message types for APIs to use.
13385	Details []googleapi.RawMessage `json:"details,omitempty"`
13386
13387	// Message: A developer-facing error message, which should be in
13388	// English. Any user-facing error message should be localized and sent
13389	// in the google.rpc.Status.details field, or localized by the client.
13390	Message string `json:"message,omitempty"`
13391
13392	// ForceSendFields is a list of field names (e.g. "Code") to
13393	// unconditionally include in API requests. By default, fields with
13394	// empty values are omitted from API requests. However, any non-pointer,
13395	// non-interface field appearing in ForceSendFields will be sent to the
13396	// server regardless of whether the field is empty or not. This may be
13397	// used to include empty fields in Patch requests.
13398	ForceSendFields []string `json:"-"`
13399
13400	// NullFields is a list of field names (e.g. "Code") to include in API
13401	// requests with the JSON null value. By default, fields with empty
13402	// values are omitted from API requests. However, any field with an
13403	// empty value appearing in NullFields will be sent to the server as
13404	// null. It is an error if a field in this list has a non-empty value.
13405	// This may be used to include null fields in Patch requests.
13406	NullFields []string `json:"-"`
13407}
13408
13409func (s *Status) MarshalJSON() ([]byte, error) {
13410	type NoMethod Status
13411	raw := NoMethod(*s)
13412	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13413}
13414
13415// Symbol: A single symbol representation.
13416type Symbol struct {
13417	// BoundingBox: The bounding box for the symbol. The vertices are in the
13418	// order of top-left, top-right, bottom-right, bottom-left. When a
13419	// rotation of the bounding box is detected the rotation is represented
13420	// as around the top-left corner as defined when the text is read in the
13421	// 'natural' orientation. For example: * when the text is horizontal it
13422	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
13423	// around the top-left corner it becomes: 2----3 | | 1----0 and the
13424	// vertex order will still be (0, 1, 2, 3).
13425	BoundingBox *BoundingPoly `json:"boundingBox,omitempty"`
13426
13427	// Confidence: Confidence of the OCR results for the symbol. Range [0,
13428	// 1].
13429	Confidence float64 `json:"confidence,omitempty"`
13430
13431	// Property: Additional information detected for the symbol.
13432	Property *TextProperty `json:"property,omitempty"`
13433
13434	// Text: The actual UTF-8 representation of the symbol.
13435	Text string `json:"text,omitempty"`
13436
13437	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
13438	// unconditionally include in API requests. By default, fields with
13439	// empty values are omitted from API requests. However, any non-pointer,
13440	// non-interface field appearing in ForceSendFields will be sent to the
13441	// server regardless of whether the field is empty or not. This may be
13442	// used to include empty fields in Patch requests.
13443	ForceSendFields []string `json:"-"`
13444
13445	// NullFields is a list of field names (e.g. "BoundingBox") to include
13446	// in API requests with the JSON null value. By default, fields with
13447	// empty values are omitted from API requests. However, any field with
13448	// an empty value appearing in NullFields will be sent to the server as
13449	// null. It is an error if a field in this list has a non-empty value.
13450	// This may be used to include null fields in Patch requests.
13451	NullFields []string `json:"-"`
13452}
13453
13454func (s *Symbol) MarshalJSON() ([]byte, error) {
13455	type NoMethod Symbol
13456	raw := NoMethod(*s)
13457	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13458}
13459
13460func (s *Symbol) UnmarshalJSON(data []byte) error {
13461	type NoMethod Symbol
13462	var s1 struct {
13463		Confidence gensupport.JSONFloat64 `json:"confidence"`
13464		*NoMethod
13465	}
13466	s1.NoMethod = (*NoMethod)(s)
13467	if err := json.Unmarshal(data, &s1); err != nil {
13468		return err
13469	}
13470	s.Confidence = float64(s1.Confidence)
13471	return nil
13472}
13473
13474// TextAnnotation: TextAnnotation contains a structured representation
13475// of OCR extracted text. The hierarchy of an OCR extracted text
13476// structure is like this: TextAnnotation -> Page -> Block -> Paragraph
13477// -> Word -> Symbol Each structural component, starting from Page, may
13478// further have their own properties. Properties describe detected
13479// languages, breaks etc.. Please refer to the
13480// TextAnnotation.TextProperty message definition below for more detail.
13481type TextAnnotation struct {
13482	// Pages: List of pages detected by OCR.
13483	Pages []*Page `json:"pages,omitempty"`
13484
13485	// Text: UTF-8 text detected on the pages.
13486	Text string `json:"text,omitempty"`
13487
13488	// ForceSendFields is a list of field names (e.g. "Pages") to
13489	// unconditionally include in API requests. By default, fields with
13490	// empty values are omitted from API requests. However, any non-pointer,
13491	// non-interface field appearing in ForceSendFields will be sent to the
13492	// server regardless of whether the field is empty or not. This may be
13493	// used to include empty fields in Patch requests.
13494	ForceSendFields []string `json:"-"`
13495
13496	// NullFields is a list of field names (e.g. "Pages") to include in API
13497	// requests with the JSON null value. By default, fields with empty
13498	// values are omitted from API requests. However, any field with an
13499	// empty value appearing in NullFields will be sent to the server as
13500	// null. It is an error if a field in this list has a non-empty value.
13501	// This may be used to include null fields in Patch requests.
13502	NullFields []string `json:"-"`
13503}
13504
13505func (s *TextAnnotation) MarshalJSON() ([]byte, error) {
13506	type NoMethod TextAnnotation
13507	raw := NoMethod(*s)
13508	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13509}
13510
13511// TextDetectionParams: Parameters for text detections. This is used to
13512// control TEXT_DETECTION and DOCUMENT_TEXT_DETECTION features.
13513type TextDetectionParams struct {
13514	// EnableTextDetectionConfidenceScore: By default, Cloud Vision API only
13515	// includes confidence score for DOCUMENT_TEXT_DETECTION result. Set the
13516	// flag to true to include confidence score for TEXT_DETECTION as well.
13517	EnableTextDetectionConfidenceScore bool `json:"enableTextDetectionConfidenceScore,omitempty"`
13518
13519	// ForceSendFields is a list of field names (e.g.
13520	// "EnableTextDetectionConfidenceScore") to unconditionally include in
13521	// API requests. By default, fields with empty values are omitted from
13522	// API requests. However, any non-pointer, non-interface field appearing
13523	// in ForceSendFields will be sent to the server regardless of whether
13524	// the field is empty or not. This may be used to include empty fields
13525	// in Patch requests.
13526	ForceSendFields []string `json:"-"`
13527
13528	// NullFields is a list of field names (e.g.
13529	// "EnableTextDetectionConfidenceScore") to include in API requests with
13530	// the JSON null value. By default, fields with empty values are omitted
13531	// from API requests. However, any field with an empty value appearing
13532	// in NullFields will be sent to the server as null. It is an error if a
13533	// field in this list has a non-empty value. This may be used to include
13534	// null fields in Patch requests.
13535	NullFields []string `json:"-"`
13536}
13537
13538func (s *TextDetectionParams) MarshalJSON() ([]byte, error) {
13539	type NoMethod TextDetectionParams
13540	raw := NoMethod(*s)
13541	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13542}
13543
13544// TextProperty: Additional information detected on the structural
13545// component.
13546type TextProperty struct {
13547	// DetectedBreak: Detected start or end of a text segment.
13548	DetectedBreak *DetectedBreak `json:"detectedBreak,omitempty"`
13549
13550	// DetectedLanguages: A list of detected languages together with
13551	// confidence.
13552	DetectedLanguages []*DetectedLanguage `json:"detectedLanguages,omitempty"`
13553
13554	// ForceSendFields is a list of field names (e.g. "DetectedBreak") to
13555	// unconditionally include in API requests. By default, fields with
13556	// empty values are omitted from API requests. However, any non-pointer,
13557	// non-interface field appearing in ForceSendFields will be sent to the
13558	// server regardless of whether the field is empty or not. This may be
13559	// used to include empty fields in Patch requests.
13560	ForceSendFields []string `json:"-"`
13561
13562	// NullFields is a list of field names (e.g. "DetectedBreak") to include
13563	// in API requests with the JSON null value. By default, fields with
13564	// empty values are omitted from API requests. However, any field with
13565	// an empty value appearing in NullFields will be sent to the server as
13566	// null. It is an error if a field in this list has a non-empty value.
13567	// This may be used to include null fields in Patch requests.
13568	NullFields []string `json:"-"`
13569}
13570
13571func (s *TextProperty) MarshalJSON() ([]byte, error) {
13572	type NoMethod TextProperty
13573	raw := NoMethod(*s)
13574	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13575}
13576
13577// Vertex: A vertex represents a 2D point in the image. NOTE: the vertex
13578// coordinates are in the same scale as the original image.
13579type Vertex struct {
13580	// X: X coordinate.
13581	X int64 `json:"x,omitempty"`
13582
13583	// Y: Y coordinate.
13584	Y int64 `json:"y,omitempty"`
13585
13586	// ForceSendFields is a list of field names (e.g. "X") to
13587	// unconditionally include in API requests. By default, fields with
13588	// empty values are omitted from API requests. However, any non-pointer,
13589	// non-interface field appearing in ForceSendFields will be sent to the
13590	// server regardless of whether the field is empty or not. This may be
13591	// used to include empty fields in Patch requests.
13592	ForceSendFields []string `json:"-"`
13593
13594	// NullFields is a list of field names (e.g. "X") to include in API
13595	// requests with the JSON null value. By default, fields with empty
13596	// values are omitted from API requests. However, any field with an
13597	// empty value appearing in NullFields will be sent to the server as
13598	// null. It is an error if a field in this list has a non-empty value.
13599	// This may be used to include null fields in Patch requests.
13600	NullFields []string `json:"-"`
13601}
13602
13603func (s *Vertex) MarshalJSON() ([]byte, error) {
13604	type NoMethod Vertex
13605	raw := NoMethod(*s)
13606	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13607}
13608
13609// WebDetection: Relevant information for the image from the Internet.
13610type WebDetection struct {
13611	// BestGuessLabels: The service's best guess as to the topic of the
13612	// request image. Inferred from similar images on the open web.
13613	BestGuessLabels []*WebLabel `json:"bestGuessLabels,omitempty"`
13614
13615	// FullMatchingImages: Fully matching images from the Internet. Can
13616	// include resized copies of the query image.
13617	FullMatchingImages []*WebImage `json:"fullMatchingImages,omitempty"`
13618
13619	// PagesWithMatchingImages: Web pages containing the matching images
13620	// from the Internet.
13621	PagesWithMatchingImages []*WebPage `json:"pagesWithMatchingImages,omitempty"`
13622
13623	// PartialMatchingImages: Partial matching images from the Internet.
13624	// Those images are similar enough to share some key-point features. For
13625	// example an original image will likely have partial matching for its
13626	// crops.
13627	PartialMatchingImages []*WebImage `json:"partialMatchingImages,omitempty"`
13628
13629	// VisuallySimilarImages: The visually similar image results.
13630	VisuallySimilarImages []*WebImage `json:"visuallySimilarImages,omitempty"`
13631
13632	// WebEntities: Deduced entities from similar images on the Internet.
13633	WebEntities []*WebEntity `json:"webEntities,omitempty"`
13634
13635	// ForceSendFields is a list of field names (e.g. "BestGuessLabels") to
13636	// unconditionally include in API requests. By default, fields with
13637	// empty values are omitted from API requests. However, any non-pointer,
13638	// non-interface field appearing in ForceSendFields will be sent to the
13639	// server regardless of whether the field is empty or not. This may be
13640	// used to include empty fields in Patch requests.
13641	ForceSendFields []string `json:"-"`
13642
13643	// NullFields is a list of field names (e.g. "BestGuessLabels") to
13644	// include in API requests with the JSON null value. By default, fields
13645	// with empty values are omitted from API requests. However, any field
13646	// with an empty value appearing in NullFields will be sent to the
13647	// server as null. It is an error if a field in this list has a
13648	// non-empty value. This may be used to include null fields in Patch
13649	// requests.
13650	NullFields []string `json:"-"`
13651}
13652
13653func (s *WebDetection) MarshalJSON() ([]byte, error) {
13654	type NoMethod WebDetection
13655	raw := NoMethod(*s)
13656	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13657}
13658
13659// WebDetectionParams: Parameters for web detection request.
13660type WebDetectionParams struct {
13661	// IncludeGeoResults: Whether to include results derived from the geo
13662	// information in the image.
13663	IncludeGeoResults bool `json:"includeGeoResults,omitempty"`
13664
13665	// ForceSendFields is a list of field names (e.g. "IncludeGeoResults")
13666	// to unconditionally include in API requests. By default, fields with
13667	// empty values are omitted from API requests. However, any non-pointer,
13668	// non-interface field appearing in ForceSendFields will be sent to the
13669	// server regardless of whether the field is empty or not. This may be
13670	// used to include empty fields in Patch requests.
13671	ForceSendFields []string `json:"-"`
13672
13673	// NullFields is a list of field names (e.g. "IncludeGeoResults") to
13674	// include in API requests with the JSON null value. By default, fields
13675	// with empty values are omitted from API requests. However, any field
13676	// with an empty value appearing in NullFields will be sent to the
13677	// server as null. It is an error if a field in this list has a
13678	// non-empty value. This may be used to include null fields in Patch
13679	// requests.
13680	NullFields []string `json:"-"`
13681}
13682
13683func (s *WebDetectionParams) MarshalJSON() ([]byte, error) {
13684	type NoMethod WebDetectionParams
13685	raw := NoMethod(*s)
13686	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13687}
13688
13689// WebEntity: Entity deduced from similar images on the Internet.
13690type WebEntity struct {
13691	// Description: Canonical description of the entity, in English.
13692	Description string `json:"description,omitempty"`
13693
13694	// EntityId: Opaque entity ID.
13695	EntityId string `json:"entityId,omitempty"`
13696
13697	// Score: Overall relevancy score for the entity. Not normalized and not
13698	// comparable across different image queries.
13699	Score float64 `json:"score,omitempty"`
13700
13701	// ForceSendFields is a list of field names (e.g. "Description") to
13702	// unconditionally include in API requests. By default, fields with
13703	// empty values are omitted from API requests. However, any non-pointer,
13704	// non-interface field appearing in ForceSendFields will be sent to the
13705	// server regardless of whether the field is empty or not. This may be
13706	// used to include empty fields in Patch requests.
13707	ForceSendFields []string `json:"-"`
13708
13709	// NullFields is a list of field names (e.g. "Description") to include
13710	// in API requests with the JSON null value. By default, fields with
13711	// empty values are omitted from API requests. However, any field with
13712	// an empty value appearing in NullFields will be sent to the server as
13713	// null. It is an error if a field in this list has a non-empty value.
13714	// This may be used to include null fields in Patch requests.
13715	NullFields []string `json:"-"`
13716}
13717
13718func (s *WebEntity) MarshalJSON() ([]byte, error) {
13719	type NoMethod WebEntity
13720	raw := NoMethod(*s)
13721	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13722}
13723
13724func (s *WebEntity) UnmarshalJSON(data []byte) error {
13725	type NoMethod WebEntity
13726	var s1 struct {
13727		Score gensupport.JSONFloat64 `json:"score"`
13728		*NoMethod
13729	}
13730	s1.NoMethod = (*NoMethod)(s)
13731	if err := json.Unmarshal(data, &s1); err != nil {
13732		return err
13733	}
13734	s.Score = float64(s1.Score)
13735	return nil
13736}
13737
13738// WebImage: Metadata for online images.
13739type WebImage struct {
13740	// Score: (Deprecated) Overall relevancy score for the image.
13741	Score float64 `json:"score,omitempty"`
13742
13743	// Url: The result image URL.
13744	Url string `json:"url,omitempty"`
13745
13746	// ForceSendFields is a list of field names (e.g. "Score") to
13747	// unconditionally include in API requests. By default, fields with
13748	// empty values are omitted from API requests. However, any non-pointer,
13749	// non-interface field appearing in ForceSendFields will be sent to the
13750	// server regardless of whether the field is empty or not. This may be
13751	// used to include empty fields in Patch requests.
13752	ForceSendFields []string `json:"-"`
13753
13754	// NullFields is a list of field names (e.g. "Score") to include in API
13755	// requests with the JSON null value. By default, fields with empty
13756	// values are omitted from API requests. However, any field with an
13757	// empty value appearing in NullFields will be sent to the server as
13758	// null. It is an error if a field in this list has a non-empty value.
13759	// This may be used to include null fields in Patch requests.
13760	NullFields []string `json:"-"`
13761}
13762
13763func (s *WebImage) MarshalJSON() ([]byte, error) {
13764	type NoMethod WebImage
13765	raw := NoMethod(*s)
13766	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13767}
13768
13769func (s *WebImage) UnmarshalJSON(data []byte) error {
13770	type NoMethod WebImage
13771	var s1 struct {
13772		Score gensupport.JSONFloat64 `json:"score"`
13773		*NoMethod
13774	}
13775	s1.NoMethod = (*NoMethod)(s)
13776	if err := json.Unmarshal(data, &s1); err != nil {
13777		return err
13778	}
13779	s.Score = float64(s1.Score)
13780	return nil
13781}
13782
13783// WebLabel: Label to provide extra metadata for the web detection.
13784type WebLabel struct {
13785	// Label: Label for extra metadata.
13786	Label string `json:"label,omitempty"`
13787
13788	// LanguageCode: The BCP-47 language code for `label`, such as "en-US"
13789	// or "sr-Latn". For more information, see
13790	// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
13791	LanguageCode string `json:"languageCode,omitempty"`
13792
13793	// ForceSendFields is a list of field names (e.g. "Label") to
13794	// unconditionally include in API requests. By default, fields with
13795	// empty values are omitted from API requests. However, any non-pointer,
13796	// non-interface field appearing in ForceSendFields will be sent to the
13797	// server regardless of whether the field is empty or not. This may be
13798	// used to include empty fields in Patch requests.
13799	ForceSendFields []string `json:"-"`
13800
13801	// NullFields is a list of field names (e.g. "Label") to include in API
13802	// requests with the JSON null value. By default, fields with empty
13803	// values are omitted from API requests. However, any field with an
13804	// empty value appearing in NullFields will be sent to the server as
13805	// null. It is an error if a field in this list has a non-empty value.
13806	// This may be used to include null fields in Patch requests.
13807	NullFields []string `json:"-"`
13808}
13809
13810func (s *WebLabel) MarshalJSON() ([]byte, error) {
13811	type NoMethod WebLabel
13812	raw := NoMethod(*s)
13813	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13814}
13815
13816// WebPage: Metadata for web pages.
13817type WebPage struct {
13818	// FullMatchingImages: Fully matching images on the page. Can include
13819	// resized copies of the query image.
13820	FullMatchingImages []*WebImage `json:"fullMatchingImages,omitempty"`
13821
13822	// PageTitle: Title for the web page, may contain HTML markups.
13823	PageTitle string `json:"pageTitle,omitempty"`
13824
13825	// PartialMatchingImages: Partial matching images on the page. Those
13826	// images are similar enough to share some key-point features. For
13827	// example an original image will likely have partial matching for its
13828	// crops.
13829	PartialMatchingImages []*WebImage `json:"partialMatchingImages,omitempty"`
13830
13831	// Score: (Deprecated) Overall relevancy score for the web page.
13832	Score float64 `json:"score,omitempty"`
13833
13834	// Url: The result web page URL.
13835	Url string `json:"url,omitempty"`
13836
13837	// ForceSendFields is a list of field names (e.g. "FullMatchingImages")
13838	// to unconditionally include in API requests. By default, fields with
13839	// empty values are omitted from API requests. However, any non-pointer,
13840	// non-interface field appearing in ForceSendFields will be sent to the
13841	// server regardless of whether the field is empty or not. This may be
13842	// used to include empty fields in Patch requests.
13843	ForceSendFields []string `json:"-"`
13844
13845	// NullFields is a list of field names (e.g. "FullMatchingImages") to
13846	// include in API requests with the JSON null value. By default, fields
13847	// with empty values are omitted from API requests. However, any field
13848	// with an empty value appearing in NullFields will be sent to the
13849	// server as null. It is an error if a field in this list has a
13850	// non-empty value. This may be used to include null fields in Patch
13851	// requests.
13852	NullFields []string `json:"-"`
13853}
13854
13855func (s *WebPage) MarshalJSON() ([]byte, error) {
13856	type NoMethod WebPage
13857	raw := NoMethod(*s)
13858	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13859}
13860
13861func (s *WebPage) UnmarshalJSON(data []byte) error {
13862	type NoMethod WebPage
13863	var s1 struct {
13864		Score gensupport.JSONFloat64 `json:"score"`
13865		*NoMethod
13866	}
13867	s1.NoMethod = (*NoMethod)(s)
13868	if err := json.Unmarshal(data, &s1); err != nil {
13869		return err
13870	}
13871	s.Score = float64(s1.Score)
13872	return nil
13873}
13874
13875// Word: A word representation.
13876type Word struct {
13877	// BoundingBox: The bounding box for the word. The vertices are in the
13878	// order of top-left, top-right, bottom-right, bottom-left. When a
13879	// rotation of the bounding box is detected the rotation is represented
13880	// as around the top-left corner as defined when the text is read in the
13881	// 'natural' orientation. For example: * when the text is horizontal it
13882	// might look like: 0----1 | | 3----2 * when it's rotated 180 degrees
13883	// around the top-left corner it becomes: 2----3 | | 1----0 and the
13884	// vertex order will still be (0, 1, 2, 3).
13885	BoundingBox *BoundingPoly `json:"boundingBox,omitempty"`
13886
13887	// Confidence: Confidence of the OCR results for the word. Range [0, 1].
13888	Confidence float64 `json:"confidence,omitempty"`
13889
13890	// Property: Additional information detected for the word.
13891	Property *TextProperty `json:"property,omitempty"`
13892
13893	// Symbols: List of symbols in the word. The order of the symbols
13894	// follows the natural reading order.
13895	Symbols []*Symbol `json:"symbols,omitempty"`
13896
13897	// ForceSendFields is a list of field names (e.g. "BoundingBox") to
13898	// unconditionally include in API requests. By default, fields with
13899	// empty values are omitted from API requests. However, any non-pointer,
13900	// non-interface field appearing in ForceSendFields will be sent to the
13901	// server regardless of whether the field is empty or not. This may be
13902	// used to include empty fields in Patch requests.
13903	ForceSendFields []string `json:"-"`
13904
13905	// NullFields is a list of field names (e.g. "BoundingBox") to include
13906	// in API requests with the JSON null value. By default, fields with
13907	// empty values are omitted from API requests. However, any field with
13908	// an empty value appearing in NullFields will be sent to the server as
13909	// null. It is an error if a field in this list has a non-empty value.
13910	// This may be used to include null fields in Patch requests.
13911	NullFields []string `json:"-"`
13912}
13913
13914func (s *Word) MarshalJSON() ([]byte, error) {
13915	type NoMethod Word
13916	raw := NoMethod(*s)
13917	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
13918}
13919
13920func (s *Word) UnmarshalJSON(data []byte) error {
13921	type NoMethod Word
13922	var s1 struct {
13923		Confidence gensupport.JSONFloat64 `json:"confidence"`
13924		*NoMethod
13925	}
13926	s1.NoMethod = (*NoMethod)(s)
13927	if err := json.Unmarshal(data, &s1); err != nil {
13928		return err
13929	}
13930	s.Confidence = float64(s1.Confidence)
13931	return nil
13932}
13933
13934// method id "vision.files.annotate":
13935
13936type FilesAnnotateCall struct {
13937	s                         *Service
13938	batchannotatefilesrequest *BatchAnnotateFilesRequest
13939	urlParams_                gensupport.URLParams
13940	ctx_                      context.Context
13941	header_                   http.Header
13942}
13943
13944// Annotate: Service that performs image detection and annotation for a
13945// batch of files. Now only "application/pdf", "image/tiff" and
13946// "image/gif" are supported. This service will extract at most 5
13947// (customers can specify which 5 in AnnotateFileRequest.pages) frames
13948// (gif) or pages (pdf or tiff) from each file provided and perform
13949// detection and annotation for each image extracted.
13950func (r *FilesService) Annotate(batchannotatefilesrequest *BatchAnnotateFilesRequest) *FilesAnnotateCall {
13951	c := &FilesAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13952	c.batchannotatefilesrequest = batchannotatefilesrequest
13953	return c
13954}
13955
13956// Fields allows partial responses to be retrieved. See
13957// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13958// for more information.
13959func (c *FilesAnnotateCall) Fields(s ...googleapi.Field) *FilesAnnotateCall {
13960	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13961	return c
13962}
13963
13964// Context sets the context to be used in this call's Do method. Any
13965// pending HTTP request will be aborted if the provided context is
13966// canceled.
13967func (c *FilesAnnotateCall) Context(ctx context.Context) *FilesAnnotateCall {
13968	c.ctx_ = ctx
13969	return c
13970}
13971
13972// Header returns an http.Header that can be modified by the caller to
13973// add HTTP headers to the request.
13974func (c *FilesAnnotateCall) Header() http.Header {
13975	if c.header_ == nil {
13976		c.header_ = make(http.Header)
13977	}
13978	return c.header_
13979}
13980
13981func (c *FilesAnnotateCall) doRequest(alt string) (*http.Response, error) {
13982	reqHeaders := make(http.Header)
13983	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
13984	for k, v := range c.header_ {
13985		reqHeaders[k] = v
13986	}
13987	reqHeaders.Set("User-Agent", c.s.userAgent())
13988	var body io.Reader = nil
13989	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchannotatefilesrequest)
13990	if err != nil {
13991		return nil, err
13992	}
13993	reqHeaders.Set("Content-Type", "application/json")
13994	c.urlParams_.Set("alt", alt)
13995	c.urlParams_.Set("prettyPrint", "false")
13996	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/files:annotate")
13997	urls += "?" + c.urlParams_.Encode()
13998	req, err := http.NewRequest("POST", urls, body)
13999	if err != nil {
14000		return nil, err
14001	}
14002	req.Header = reqHeaders
14003	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14004}
14005
14006// Do executes the "vision.files.annotate" call.
14007// Exactly one of *BatchAnnotateFilesResponse or error will be non-nil.
14008// Any non-2xx status code is an error. Response headers are in either
14009// *BatchAnnotateFilesResponse.ServerResponse.Header or (if a response
14010// was returned at all) in error.(*googleapi.Error).Header. Use
14011// googleapi.IsNotModified to check whether the returned error was
14012// because http.StatusNotModified was returned.
14013func (c *FilesAnnotateCall) Do(opts ...googleapi.CallOption) (*BatchAnnotateFilesResponse, error) {
14014	gensupport.SetOptions(c.urlParams_, opts...)
14015	res, err := c.doRequest("json")
14016	if res != nil && res.StatusCode == http.StatusNotModified {
14017		if res.Body != nil {
14018			res.Body.Close()
14019		}
14020		return nil, &googleapi.Error{
14021			Code:   res.StatusCode,
14022			Header: res.Header,
14023		}
14024	}
14025	if err != nil {
14026		return nil, err
14027	}
14028	defer googleapi.CloseBody(res)
14029	if err := googleapi.CheckResponse(res); err != nil {
14030		return nil, err
14031	}
14032	ret := &BatchAnnotateFilesResponse{
14033		ServerResponse: googleapi.ServerResponse{
14034			Header:         res.Header,
14035			HTTPStatusCode: res.StatusCode,
14036		},
14037	}
14038	target := &ret
14039	if err := gensupport.DecodeResponse(target, res); err != nil {
14040		return nil, err
14041	}
14042	return ret, nil
14043	// {
14044	//   "description": "Service that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.",
14045	//   "flatPath": "v1/files:annotate",
14046	//   "httpMethod": "POST",
14047	//   "id": "vision.files.annotate",
14048	//   "parameterOrder": [],
14049	//   "parameters": {},
14050	//   "path": "v1/files:annotate",
14051	//   "request": {
14052	//     "$ref": "BatchAnnotateFilesRequest"
14053	//   },
14054	//   "response": {
14055	//     "$ref": "BatchAnnotateFilesResponse"
14056	//   },
14057	//   "scopes": [
14058	//     "https://www.googleapis.com/auth/cloud-platform",
14059	//     "https://www.googleapis.com/auth/cloud-vision"
14060	//   ]
14061	// }
14062
14063}
14064
14065// method id "vision.files.asyncBatchAnnotate":
14066
14067type FilesAsyncBatchAnnotateCall struct {
14068	s                              *Service
14069	asyncbatchannotatefilesrequest *AsyncBatchAnnotateFilesRequest
14070	urlParams_                     gensupport.URLParams
14071	ctx_                           context.Context
14072	header_                        http.Header
14073}
14074
14075// AsyncBatchAnnotate: Run asynchronous image detection and annotation
14076// for a list of generic files, such as PDF files, which may contain
14077// multiple pages and multiple images per page. Progress and results can
14078// be retrieved through the `google.longrunning.Operations` interface.
14079// `Operation.metadata` contains `OperationMetadata` (metadata).
14080// `Operation.response` contains `AsyncBatchAnnotateFilesResponse`
14081// (results).
14082func (r *FilesService) AsyncBatchAnnotate(asyncbatchannotatefilesrequest *AsyncBatchAnnotateFilesRequest) *FilesAsyncBatchAnnotateCall {
14083	c := &FilesAsyncBatchAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14084	c.asyncbatchannotatefilesrequest = asyncbatchannotatefilesrequest
14085	return c
14086}
14087
14088// Fields allows partial responses to be retrieved. See
14089// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14090// for more information.
14091func (c *FilesAsyncBatchAnnotateCall) Fields(s ...googleapi.Field) *FilesAsyncBatchAnnotateCall {
14092	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14093	return c
14094}
14095
14096// Context sets the context to be used in this call's Do method. Any
14097// pending HTTP request will be aborted if the provided context is
14098// canceled.
14099func (c *FilesAsyncBatchAnnotateCall) Context(ctx context.Context) *FilesAsyncBatchAnnotateCall {
14100	c.ctx_ = ctx
14101	return c
14102}
14103
14104// Header returns an http.Header that can be modified by the caller to
14105// add HTTP headers to the request.
14106func (c *FilesAsyncBatchAnnotateCall) Header() http.Header {
14107	if c.header_ == nil {
14108		c.header_ = make(http.Header)
14109	}
14110	return c.header_
14111}
14112
14113func (c *FilesAsyncBatchAnnotateCall) doRequest(alt string) (*http.Response, error) {
14114	reqHeaders := make(http.Header)
14115	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
14116	for k, v := range c.header_ {
14117		reqHeaders[k] = v
14118	}
14119	reqHeaders.Set("User-Agent", c.s.userAgent())
14120	var body io.Reader = nil
14121	body, err := googleapi.WithoutDataWrapper.JSONReader(c.asyncbatchannotatefilesrequest)
14122	if err != nil {
14123		return nil, err
14124	}
14125	reqHeaders.Set("Content-Type", "application/json")
14126	c.urlParams_.Set("alt", alt)
14127	c.urlParams_.Set("prettyPrint", "false")
14128	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/files:asyncBatchAnnotate")
14129	urls += "?" + c.urlParams_.Encode()
14130	req, err := http.NewRequest("POST", urls, body)
14131	if err != nil {
14132		return nil, err
14133	}
14134	req.Header = reqHeaders
14135	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14136}
14137
14138// Do executes the "vision.files.asyncBatchAnnotate" call.
14139// Exactly one of *Operation or error will be non-nil. Any non-2xx
14140// status code is an error. Response headers are in either
14141// *Operation.ServerResponse.Header or (if a response was returned at
14142// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14143// to check whether the returned error was because
14144// http.StatusNotModified was returned.
14145func (c *FilesAsyncBatchAnnotateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14146	gensupport.SetOptions(c.urlParams_, opts...)
14147	res, err := c.doRequest("json")
14148	if res != nil && res.StatusCode == http.StatusNotModified {
14149		if res.Body != nil {
14150			res.Body.Close()
14151		}
14152		return nil, &googleapi.Error{
14153			Code:   res.StatusCode,
14154			Header: res.Header,
14155		}
14156	}
14157	if err != nil {
14158		return nil, err
14159	}
14160	defer googleapi.CloseBody(res)
14161	if err := googleapi.CheckResponse(res); err != nil {
14162		return nil, err
14163	}
14164	ret := &Operation{
14165		ServerResponse: googleapi.ServerResponse{
14166			Header:         res.Header,
14167			HTTPStatusCode: res.StatusCode,
14168		},
14169	}
14170	target := &ret
14171	if err := gensupport.DecodeResponse(target, res); err != nil {
14172		return nil, err
14173	}
14174	return ret, nil
14175	// {
14176	//   "description": "Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).",
14177	//   "flatPath": "v1/files:asyncBatchAnnotate",
14178	//   "httpMethod": "POST",
14179	//   "id": "vision.files.asyncBatchAnnotate",
14180	//   "parameterOrder": [],
14181	//   "parameters": {},
14182	//   "path": "v1/files:asyncBatchAnnotate",
14183	//   "request": {
14184	//     "$ref": "AsyncBatchAnnotateFilesRequest"
14185	//   },
14186	//   "response": {
14187	//     "$ref": "Operation"
14188	//   },
14189	//   "scopes": [
14190	//     "https://www.googleapis.com/auth/cloud-platform",
14191	//     "https://www.googleapis.com/auth/cloud-vision"
14192	//   ]
14193	// }
14194
14195}
14196
14197// method id "vision.images.annotate":
14198
14199type ImagesAnnotateCall struct {
14200	s                          *Service
14201	batchannotateimagesrequest *BatchAnnotateImagesRequest
14202	urlParams_                 gensupport.URLParams
14203	ctx_                       context.Context
14204	header_                    http.Header
14205}
14206
14207// Annotate: Run image detection and annotation for a batch of images.
14208func (r *ImagesService) Annotate(batchannotateimagesrequest *BatchAnnotateImagesRequest) *ImagesAnnotateCall {
14209	c := &ImagesAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14210	c.batchannotateimagesrequest = batchannotateimagesrequest
14211	return c
14212}
14213
14214// Fields allows partial responses to be retrieved. See
14215// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14216// for more information.
14217func (c *ImagesAnnotateCall) Fields(s ...googleapi.Field) *ImagesAnnotateCall {
14218	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14219	return c
14220}
14221
14222// Context sets the context to be used in this call's Do method. Any
14223// pending HTTP request will be aborted if the provided context is
14224// canceled.
14225func (c *ImagesAnnotateCall) Context(ctx context.Context) *ImagesAnnotateCall {
14226	c.ctx_ = ctx
14227	return c
14228}
14229
14230// Header returns an http.Header that can be modified by the caller to
14231// add HTTP headers to the request.
14232func (c *ImagesAnnotateCall) Header() http.Header {
14233	if c.header_ == nil {
14234		c.header_ = make(http.Header)
14235	}
14236	return c.header_
14237}
14238
14239func (c *ImagesAnnotateCall) doRequest(alt string) (*http.Response, error) {
14240	reqHeaders := make(http.Header)
14241	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
14242	for k, v := range c.header_ {
14243		reqHeaders[k] = v
14244	}
14245	reqHeaders.Set("User-Agent", c.s.userAgent())
14246	var body io.Reader = nil
14247	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchannotateimagesrequest)
14248	if err != nil {
14249		return nil, err
14250	}
14251	reqHeaders.Set("Content-Type", "application/json")
14252	c.urlParams_.Set("alt", alt)
14253	c.urlParams_.Set("prettyPrint", "false")
14254	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/images:annotate")
14255	urls += "?" + c.urlParams_.Encode()
14256	req, err := http.NewRequest("POST", urls, body)
14257	if err != nil {
14258		return nil, err
14259	}
14260	req.Header = reqHeaders
14261	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14262}
14263
14264// Do executes the "vision.images.annotate" call.
14265// Exactly one of *BatchAnnotateImagesResponse or error will be non-nil.
14266// Any non-2xx status code is an error. Response headers are in either
14267// *BatchAnnotateImagesResponse.ServerResponse.Header or (if a response
14268// was returned at all) in error.(*googleapi.Error).Header. Use
14269// googleapi.IsNotModified to check whether the returned error was
14270// because http.StatusNotModified was returned.
14271func (c *ImagesAnnotateCall) Do(opts ...googleapi.CallOption) (*BatchAnnotateImagesResponse, error) {
14272	gensupport.SetOptions(c.urlParams_, opts...)
14273	res, err := c.doRequest("json")
14274	if res != nil && res.StatusCode == http.StatusNotModified {
14275		if res.Body != nil {
14276			res.Body.Close()
14277		}
14278		return nil, &googleapi.Error{
14279			Code:   res.StatusCode,
14280			Header: res.Header,
14281		}
14282	}
14283	if err != nil {
14284		return nil, err
14285	}
14286	defer googleapi.CloseBody(res)
14287	if err := googleapi.CheckResponse(res); err != nil {
14288		return nil, err
14289	}
14290	ret := &BatchAnnotateImagesResponse{
14291		ServerResponse: googleapi.ServerResponse{
14292			Header:         res.Header,
14293			HTTPStatusCode: res.StatusCode,
14294		},
14295	}
14296	target := &ret
14297	if err := gensupport.DecodeResponse(target, res); err != nil {
14298		return nil, err
14299	}
14300	return ret, nil
14301	// {
14302	//   "description": "Run image detection and annotation for a batch of images.",
14303	//   "flatPath": "v1/images:annotate",
14304	//   "httpMethod": "POST",
14305	//   "id": "vision.images.annotate",
14306	//   "parameterOrder": [],
14307	//   "parameters": {},
14308	//   "path": "v1/images:annotate",
14309	//   "request": {
14310	//     "$ref": "BatchAnnotateImagesRequest"
14311	//   },
14312	//   "response": {
14313	//     "$ref": "BatchAnnotateImagesResponse"
14314	//   },
14315	//   "scopes": [
14316	//     "https://www.googleapis.com/auth/cloud-platform",
14317	//     "https://www.googleapis.com/auth/cloud-vision"
14318	//   ]
14319	// }
14320
14321}
14322
14323// method id "vision.images.asyncBatchAnnotate":
14324
14325type ImagesAsyncBatchAnnotateCall struct {
14326	s                               *Service
14327	asyncbatchannotateimagesrequest *AsyncBatchAnnotateImagesRequest
14328	urlParams_                      gensupport.URLParams
14329	ctx_                            context.Context
14330	header_                         http.Header
14331}
14332
14333// AsyncBatchAnnotate: Run asynchronous image detection and annotation
14334// for a list of images. Progress and results can be retrieved through
14335// the `google.longrunning.Operations` interface. `Operation.metadata`
14336// contains `OperationMetadata` (metadata). `Operation.response`
14337// contains `AsyncBatchAnnotateImagesResponse` (results). This service
14338// will write image annotation outputs to json files in customer GCS
14339// bucket, each json file containing BatchAnnotateImagesResponse proto.
14340func (r *ImagesService) AsyncBatchAnnotate(asyncbatchannotateimagesrequest *AsyncBatchAnnotateImagesRequest) *ImagesAsyncBatchAnnotateCall {
14341	c := &ImagesAsyncBatchAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14342	c.asyncbatchannotateimagesrequest = asyncbatchannotateimagesrequest
14343	return c
14344}
14345
14346// Fields allows partial responses to be retrieved. See
14347// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14348// for more information.
14349func (c *ImagesAsyncBatchAnnotateCall) Fields(s ...googleapi.Field) *ImagesAsyncBatchAnnotateCall {
14350	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14351	return c
14352}
14353
14354// Context sets the context to be used in this call's Do method. Any
14355// pending HTTP request will be aborted if the provided context is
14356// canceled.
14357func (c *ImagesAsyncBatchAnnotateCall) Context(ctx context.Context) *ImagesAsyncBatchAnnotateCall {
14358	c.ctx_ = ctx
14359	return c
14360}
14361
14362// Header returns an http.Header that can be modified by the caller to
14363// add HTTP headers to the request.
14364func (c *ImagesAsyncBatchAnnotateCall) Header() http.Header {
14365	if c.header_ == nil {
14366		c.header_ = make(http.Header)
14367	}
14368	return c.header_
14369}
14370
14371func (c *ImagesAsyncBatchAnnotateCall) doRequest(alt string) (*http.Response, error) {
14372	reqHeaders := make(http.Header)
14373	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
14374	for k, v := range c.header_ {
14375		reqHeaders[k] = v
14376	}
14377	reqHeaders.Set("User-Agent", c.s.userAgent())
14378	var body io.Reader = nil
14379	body, err := googleapi.WithoutDataWrapper.JSONReader(c.asyncbatchannotateimagesrequest)
14380	if err != nil {
14381		return nil, err
14382	}
14383	reqHeaders.Set("Content-Type", "application/json")
14384	c.urlParams_.Set("alt", alt)
14385	c.urlParams_.Set("prettyPrint", "false")
14386	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/images:asyncBatchAnnotate")
14387	urls += "?" + c.urlParams_.Encode()
14388	req, err := http.NewRequest("POST", urls, body)
14389	if err != nil {
14390		return nil, err
14391	}
14392	req.Header = reqHeaders
14393	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14394}
14395
14396// Do executes the "vision.images.asyncBatchAnnotate" call.
14397// Exactly one of *Operation or error will be non-nil. Any non-2xx
14398// status code is an error. Response headers are in either
14399// *Operation.ServerResponse.Header or (if a response was returned at
14400// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14401// to check whether the returned error was because
14402// http.StatusNotModified was returned.
14403func (c *ImagesAsyncBatchAnnotateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14404	gensupport.SetOptions(c.urlParams_, opts...)
14405	res, err := c.doRequest("json")
14406	if res != nil && res.StatusCode == http.StatusNotModified {
14407		if res.Body != nil {
14408			res.Body.Close()
14409		}
14410		return nil, &googleapi.Error{
14411			Code:   res.StatusCode,
14412			Header: res.Header,
14413		}
14414	}
14415	if err != nil {
14416		return nil, err
14417	}
14418	defer googleapi.CloseBody(res)
14419	if err := googleapi.CheckResponse(res); err != nil {
14420		return nil, err
14421	}
14422	ret := &Operation{
14423		ServerResponse: googleapi.ServerResponse{
14424			Header:         res.Header,
14425			HTTPStatusCode: res.StatusCode,
14426		},
14427	}
14428	target := &ret
14429	if err := gensupport.DecodeResponse(target, res); err != nil {
14430		return nil, err
14431	}
14432	return ret, nil
14433	// {
14434	//   "description": "Run asynchronous image detection and annotation for a list of images. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.",
14435	//   "flatPath": "v1/images:asyncBatchAnnotate",
14436	//   "httpMethod": "POST",
14437	//   "id": "vision.images.asyncBatchAnnotate",
14438	//   "parameterOrder": [],
14439	//   "parameters": {},
14440	//   "path": "v1/images:asyncBatchAnnotate",
14441	//   "request": {
14442	//     "$ref": "AsyncBatchAnnotateImagesRequest"
14443	//   },
14444	//   "response": {
14445	//     "$ref": "Operation"
14446	//   },
14447	//   "scopes": [
14448	//     "https://www.googleapis.com/auth/cloud-platform",
14449	//     "https://www.googleapis.com/auth/cloud-vision"
14450	//   ]
14451	// }
14452
14453}
14454
14455// method id "vision.locations.operations.get":
14456
14457type LocationsOperationsGetCall struct {
14458	s            *Service
14459	name         string
14460	urlParams_   gensupport.URLParams
14461	ifNoneMatch_ string
14462	ctx_         context.Context
14463	header_      http.Header
14464}
14465
14466// Get: Gets the latest state of a long-running operation. Clients can
14467// use this method to poll the operation result at intervals as
14468// recommended by the API service.
14469//
14470// - name: The name of the operation resource.
14471func (r *LocationsOperationsService) Get(name string) *LocationsOperationsGetCall {
14472	c := &LocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14473	c.name = name
14474	return c
14475}
14476
14477// Fields allows partial responses to be retrieved. See
14478// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14479// for more information.
14480func (c *LocationsOperationsGetCall) Fields(s ...googleapi.Field) *LocationsOperationsGetCall {
14481	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14482	return c
14483}
14484
14485// IfNoneMatch sets the optional parameter which makes the operation
14486// fail if the object's ETag matches the given value. This is useful for
14487// getting updates only after the object has changed since the last
14488// request. Use googleapi.IsNotModified to check whether the response
14489// error from Do is the result of In-None-Match.
14490func (c *LocationsOperationsGetCall) IfNoneMatch(entityTag string) *LocationsOperationsGetCall {
14491	c.ifNoneMatch_ = entityTag
14492	return c
14493}
14494
14495// Context sets the context to be used in this call's Do method. Any
14496// pending HTTP request will be aborted if the provided context is
14497// canceled.
14498func (c *LocationsOperationsGetCall) Context(ctx context.Context) *LocationsOperationsGetCall {
14499	c.ctx_ = ctx
14500	return c
14501}
14502
14503// Header returns an http.Header that can be modified by the caller to
14504// add HTTP headers to the request.
14505func (c *LocationsOperationsGetCall) Header() http.Header {
14506	if c.header_ == nil {
14507		c.header_ = make(http.Header)
14508	}
14509	return c.header_
14510}
14511
14512func (c *LocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
14513	reqHeaders := make(http.Header)
14514	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
14515	for k, v := range c.header_ {
14516		reqHeaders[k] = v
14517	}
14518	reqHeaders.Set("User-Agent", c.s.userAgent())
14519	if c.ifNoneMatch_ != "" {
14520		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14521	}
14522	var body io.Reader = nil
14523	c.urlParams_.Set("alt", alt)
14524	c.urlParams_.Set("prettyPrint", "false")
14525	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
14526	urls += "?" + c.urlParams_.Encode()
14527	req, err := http.NewRequest("GET", urls, body)
14528	if err != nil {
14529		return nil, err
14530	}
14531	req.Header = reqHeaders
14532	googleapi.Expand(req.URL, map[string]string{
14533		"name": c.name,
14534	})
14535	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14536}
14537
14538// Do executes the "vision.locations.operations.get" call.
14539// Exactly one of *Operation or error will be non-nil. Any non-2xx
14540// status code is an error. Response headers are in either
14541// *Operation.ServerResponse.Header or (if a response was returned at
14542// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14543// to check whether the returned error was because
14544// http.StatusNotModified was returned.
14545func (c *LocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14546	gensupport.SetOptions(c.urlParams_, opts...)
14547	res, err := c.doRequest("json")
14548	if res != nil && res.StatusCode == http.StatusNotModified {
14549		if res.Body != nil {
14550			res.Body.Close()
14551		}
14552		return nil, &googleapi.Error{
14553			Code:   res.StatusCode,
14554			Header: res.Header,
14555		}
14556	}
14557	if err != nil {
14558		return nil, err
14559	}
14560	defer googleapi.CloseBody(res)
14561	if err := googleapi.CheckResponse(res); err != nil {
14562		return nil, err
14563	}
14564	ret := &Operation{
14565		ServerResponse: googleapi.ServerResponse{
14566			Header:         res.Header,
14567			HTTPStatusCode: res.StatusCode,
14568		},
14569	}
14570	target := &ret
14571	if err := gensupport.DecodeResponse(target, res); err != nil {
14572		return nil, err
14573	}
14574	return ret, nil
14575	// {
14576	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
14577	//   "flatPath": "v1/locations/{locationsId}/operations/{operationsId}",
14578	//   "httpMethod": "GET",
14579	//   "id": "vision.locations.operations.get",
14580	//   "parameterOrder": [
14581	//     "name"
14582	//   ],
14583	//   "parameters": {
14584	//     "name": {
14585	//       "description": "The name of the operation resource.",
14586	//       "location": "path",
14587	//       "pattern": "^locations/[^/]+/operations/[^/]+$",
14588	//       "required": true,
14589	//       "type": "string"
14590	//     }
14591	//   },
14592	//   "path": "v1/{+name}",
14593	//   "response": {
14594	//     "$ref": "Operation"
14595	//   },
14596	//   "scopes": [
14597	//     "https://www.googleapis.com/auth/cloud-platform",
14598	//     "https://www.googleapis.com/auth/cloud-vision"
14599	//   ]
14600	// }
14601
14602}
14603
14604// method id "vision.operations.cancel":
14605
14606type OperationsCancelCall struct {
14607	s                      *Service
14608	name                   string
14609	canceloperationrequest *CancelOperationRequest
14610	urlParams_             gensupport.URLParams
14611	ctx_                   context.Context
14612	header_                http.Header
14613}
14614
14615// Cancel: Starts asynchronous cancellation on a long-running operation.
14616// The server makes a best effort to cancel the operation, but success
14617// is not guaranteed. If the server doesn't support this method, it
14618// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
14619// Operations.GetOperation or other methods to check whether the
14620// cancellation succeeded or whether the operation completed despite
14621// cancellation. On successful cancellation, the operation is not
14622// deleted; instead, it becomes an operation with an Operation.error
14623// value with a google.rpc.Status.code of 1, corresponding to
14624// `Code.CANCELLED`.
14625//
14626// - name: The name of the operation resource to be cancelled.
14627func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall {
14628	c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14629	c.name = name
14630	c.canceloperationrequest = canceloperationrequest
14631	return c
14632}
14633
14634// Fields allows partial responses to be retrieved. See
14635// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14636// for more information.
14637func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall {
14638	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14639	return c
14640}
14641
14642// Context sets the context to be used in this call's Do method. Any
14643// pending HTTP request will be aborted if the provided context is
14644// canceled.
14645func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall {
14646	c.ctx_ = ctx
14647	return c
14648}
14649
14650// Header returns an http.Header that can be modified by the caller to
14651// add HTTP headers to the request.
14652func (c *OperationsCancelCall) Header() http.Header {
14653	if c.header_ == nil {
14654		c.header_ = make(http.Header)
14655	}
14656	return c.header_
14657}
14658
14659func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) {
14660	reqHeaders := make(http.Header)
14661	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
14662	for k, v := range c.header_ {
14663		reqHeaders[k] = v
14664	}
14665	reqHeaders.Set("User-Agent", c.s.userAgent())
14666	var body io.Reader = nil
14667	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
14668	if err != nil {
14669		return nil, err
14670	}
14671	reqHeaders.Set("Content-Type", "application/json")
14672	c.urlParams_.Set("alt", alt)
14673	c.urlParams_.Set("prettyPrint", "false")
14674	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
14675	urls += "?" + c.urlParams_.Encode()
14676	req, err := http.NewRequest("POST", urls, body)
14677	if err != nil {
14678		return nil, err
14679	}
14680	req.Header = reqHeaders
14681	googleapi.Expand(req.URL, map[string]string{
14682		"name": c.name,
14683	})
14684	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14685}
14686
14687// Do executes the "vision.operations.cancel" call.
14688// Exactly one of *Empty or error will be non-nil. Any non-2xx status
14689// code is an error. Response headers are in either
14690// *Empty.ServerResponse.Header or (if a response was returned at all)
14691// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14692// check whether the returned error was because http.StatusNotModified
14693// was returned.
14694func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
14695	gensupport.SetOptions(c.urlParams_, opts...)
14696	res, err := c.doRequest("json")
14697	if res != nil && res.StatusCode == http.StatusNotModified {
14698		if res.Body != nil {
14699			res.Body.Close()
14700		}
14701		return nil, &googleapi.Error{
14702			Code:   res.StatusCode,
14703			Header: res.Header,
14704		}
14705	}
14706	if err != nil {
14707		return nil, err
14708	}
14709	defer googleapi.CloseBody(res)
14710	if err := googleapi.CheckResponse(res); err != nil {
14711		return nil, err
14712	}
14713	ret := &Empty{
14714		ServerResponse: googleapi.ServerResponse{
14715			Header:         res.Header,
14716			HTTPStatusCode: res.StatusCode,
14717		},
14718	}
14719	target := &ret
14720	if err := gensupport.DecodeResponse(target, res); err != nil {
14721		return nil, err
14722	}
14723	return ret, nil
14724	// {
14725	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.",
14726	//   "flatPath": "v1/operations/{operationsId}:cancel",
14727	//   "httpMethod": "POST",
14728	//   "id": "vision.operations.cancel",
14729	//   "parameterOrder": [
14730	//     "name"
14731	//   ],
14732	//   "parameters": {
14733	//     "name": {
14734	//       "description": "The name of the operation resource to be cancelled.",
14735	//       "location": "path",
14736	//       "pattern": "^operations/.*$",
14737	//       "required": true,
14738	//       "type": "string"
14739	//     }
14740	//   },
14741	//   "path": "v1/{+name}:cancel",
14742	//   "request": {
14743	//     "$ref": "CancelOperationRequest"
14744	//   },
14745	//   "response": {
14746	//     "$ref": "Empty"
14747	//   },
14748	//   "scopes": [
14749	//     "https://www.googleapis.com/auth/cloud-platform",
14750	//     "https://www.googleapis.com/auth/cloud-vision"
14751	//   ]
14752	// }
14753
14754}
14755
14756// method id "vision.operations.delete":
14757
14758type OperationsDeleteCall struct {
14759	s          *Service
14760	name       string
14761	urlParams_ gensupport.URLParams
14762	ctx_       context.Context
14763	header_    http.Header
14764}
14765
14766// Delete: Deletes a long-running operation. This method indicates that
14767// the client is no longer interested in the operation result. It does
14768// not cancel the operation. If the server doesn't support this method,
14769// it returns `google.rpc.Code.UNIMPLEMENTED`.
14770//
14771// - name: The name of the operation resource to be deleted.
14772func (r *OperationsService) Delete(name string) *OperationsDeleteCall {
14773	c := &OperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14774	c.name = name
14775	return c
14776}
14777
14778// Fields allows partial responses to be retrieved. See
14779// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14780// for more information.
14781func (c *OperationsDeleteCall) Fields(s ...googleapi.Field) *OperationsDeleteCall {
14782	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14783	return c
14784}
14785
14786// Context sets the context to be used in this call's Do method. Any
14787// pending HTTP request will be aborted if the provided context is
14788// canceled.
14789func (c *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall {
14790	c.ctx_ = ctx
14791	return c
14792}
14793
14794// Header returns an http.Header that can be modified by the caller to
14795// add HTTP headers to the request.
14796func (c *OperationsDeleteCall) Header() http.Header {
14797	if c.header_ == nil {
14798		c.header_ = make(http.Header)
14799	}
14800	return c.header_
14801}
14802
14803func (c *OperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
14804	reqHeaders := make(http.Header)
14805	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
14806	for k, v := range c.header_ {
14807		reqHeaders[k] = v
14808	}
14809	reqHeaders.Set("User-Agent", c.s.userAgent())
14810	var body io.Reader = nil
14811	c.urlParams_.Set("alt", alt)
14812	c.urlParams_.Set("prettyPrint", "false")
14813	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
14814	urls += "?" + c.urlParams_.Encode()
14815	req, err := http.NewRequest("DELETE", urls, body)
14816	if err != nil {
14817		return nil, err
14818	}
14819	req.Header = reqHeaders
14820	googleapi.Expand(req.URL, map[string]string{
14821		"name": c.name,
14822	})
14823	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14824}
14825
14826// Do executes the "vision.operations.delete" call.
14827// Exactly one of *Empty or error will be non-nil. Any non-2xx status
14828// code is an error. Response headers are in either
14829// *Empty.ServerResponse.Header or (if a response was returned at all)
14830// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14831// check whether the returned error was because http.StatusNotModified
14832// was returned.
14833func (c *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
14834	gensupport.SetOptions(c.urlParams_, opts...)
14835	res, err := c.doRequest("json")
14836	if res != nil && res.StatusCode == http.StatusNotModified {
14837		if res.Body != nil {
14838			res.Body.Close()
14839		}
14840		return nil, &googleapi.Error{
14841			Code:   res.StatusCode,
14842			Header: res.Header,
14843		}
14844	}
14845	if err != nil {
14846		return nil, err
14847	}
14848	defer googleapi.CloseBody(res)
14849	if err := googleapi.CheckResponse(res); err != nil {
14850		return nil, err
14851	}
14852	ret := &Empty{
14853		ServerResponse: googleapi.ServerResponse{
14854			Header:         res.Header,
14855			HTTPStatusCode: res.StatusCode,
14856		},
14857	}
14858	target := &ret
14859	if err := gensupport.DecodeResponse(target, res); err != nil {
14860		return nil, err
14861	}
14862	return ret, nil
14863	// {
14864	//   "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.",
14865	//   "flatPath": "v1/operations/{operationsId}",
14866	//   "httpMethod": "DELETE",
14867	//   "id": "vision.operations.delete",
14868	//   "parameterOrder": [
14869	//     "name"
14870	//   ],
14871	//   "parameters": {
14872	//     "name": {
14873	//       "description": "The name of the operation resource to be deleted.",
14874	//       "location": "path",
14875	//       "pattern": "^operations/.*$",
14876	//       "required": true,
14877	//       "type": "string"
14878	//     }
14879	//   },
14880	//   "path": "v1/{+name}",
14881	//   "response": {
14882	//     "$ref": "Empty"
14883	//   },
14884	//   "scopes": [
14885	//     "https://www.googleapis.com/auth/cloud-platform",
14886	//     "https://www.googleapis.com/auth/cloud-vision"
14887	//   ]
14888	// }
14889
14890}
14891
14892// method id "vision.operations.get":
14893
14894type OperationsGetCall struct {
14895	s            *Service
14896	name         string
14897	urlParams_   gensupport.URLParams
14898	ifNoneMatch_ string
14899	ctx_         context.Context
14900	header_      http.Header
14901}
14902
14903// Get: Gets the latest state of a long-running operation. Clients can
14904// use this method to poll the operation result at intervals as
14905// recommended by the API service.
14906//
14907// - name: The name of the operation resource.
14908func (r *OperationsService) Get(name string) *OperationsGetCall {
14909	c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14910	c.name = name
14911	return c
14912}
14913
14914// Fields allows partial responses to be retrieved. See
14915// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14916// for more information.
14917func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
14918	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14919	return c
14920}
14921
14922// IfNoneMatch sets the optional parameter which makes the operation
14923// fail if the object's ETag matches the given value. This is useful for
14924// getting updates only after the object has changed since the last
14925// request. Use googleapi.IsNotModified to check whether the response
14926// error from Do is the result of In-None-Match.
14927func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
14928	c.ifNoneMatch_ = entityTag
14929	return c
14930}
14931
14932// Context sets the context to be used in this call's Do method. Any
14933// pending HTTP request will be aborted if the provided context is
14934// canceled.
14935func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
14936	c.ctx_ = ctx
14937	return c
14938}
14939
14940// Header returns an http.Header that can be modified by the caller to
14941// add HTTP headers to the request.
14942func (c *OperationsGetCall) Header() http.Header {
14943	if c.header_ == nil {
14944		c.header_ = make(http.Header)
14945	}
14946	return c.header_
14947}
14948
14949func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
14950	reqHeaders := make(http.Header)
14951	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
14952	for k, v := range c.header_ {
14953		reqHeaders[k] = v
14954	}
14955	reqHeaders.Set("User-Agent", c.s.userAgent())
14956	if c.ifNoneMatch_ != "" {
14957		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14958	}
14959	var body io.Reader = nil
14960	c.urlParams_.Set("alt", alt)
14961	c.urlParams_.Set("prettyPrint", "false")
14962	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
14963	urls += "?" + c.urlParams_.Encode()
14964	req, err := http.NewRequest("GET", urls, body)
14965	if err != nil {
14966		return nil, err
14967	}
14968	req.Header = reqHeaders
14969	googleapi.Expand(req.URL, map[string]string{
14970		"name": c.name,
14971	})
14972	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14973}
14974
14975// Do executes the "vision.operations.get" call.
14976// Exactly one of *Operation or error will be non-nil. Any non-2xx
14977// status code is an error. Response headers are in either
14978// *Operation.ServerResponse.Header or (if a response was returned at
14979// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14980// to check whether the returned error was because
14981// http.StatusNotModified was returned.
14982func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14983	gensupport.SetOptions(c.urlParams_, opts...)
14984	res, err := c.doRequest("json")
14985	if res != nil && res.StatusCode == http.StatusNotModified {
14986		if res.Body != nil {
14987			res.Body.Close()
14988		}
14989		return nil, &googleapi.Error{
14990			Code:   res.StatusCode,
14991			Header: res.Header,
14992		}
14993	}
14994	if err != nil {
14995		return nil, err
14996	}
14997	defer googleapi.CloseBody(res)
14998	if err := googleapi.CheckResponse(res); err != nil {
14999		return nil, err
15000	}
15001	ret := &Operation{
15002		ServerResponse: googleapi.ServerResponse{
15003			Header:         res.Header,
15004			HTTPStatusCode: res.StatusCode,
15005		},
15006	}
15007	target := &ret
15008	if err := gensupport.DecodeResponse(target, res); err != nil {
15009		return nil, err
15010	}
15011	return ret, nil
15012	// {
15013	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
15014	//   "flatPath": "v1/operations/{operationsId}",
15015	//   "httpMethod": "GET",
15016	//   "id": "vision.operations.get",
15017	//   "parameterOrder": [
15018	//     "name"
15019	//   ],
15020	//   "parameters": {
15021	//     "name": {
15022	//       "description": "The name of the operation resource.",
15023	//       "location": "path",
15024	//       "pattern": "^operations/[^/]+$",
15025	//       "required": true,
15026	//       "type": "string"
15027	//     }
15028	//   },
15029	//   "path": "v1/{+name}",
15030	//   "response": {
15031	//     "$ref": "Operation"
15032	//   },
15033	//   "scopes": [
15034	//     "https://www.googleapis.com/auth/cloud-platform",
15035	//     "https://www.googleapis.com/auth/cloud-vision"
15036	//   ]
15037	// }
15038
15039}
15040
15041// method id "vision.operations.list":
15042
15043type OperationsListCall struct {
15044	s            *Service
15045	name         string
15046	urlParams_   gensupport.URLParams
15047	ifNoneMatch_ string
15048	ctx_         context.Context
15049	header_      http.Header
15050}
15051
15052// List: Lists operations that match the specified filter in the
15053// request. If the server doesn't support this method, it returns
15054// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
15055// override the binding to use different resource name schemes, such as
15056// `users/*/operations`. To override the binding, API services can add a
15057// binding such as "/v1/{name=users/*}/operations" to their service
15058// configuration. For backwards compatibility, the default name includes
15059// the operations collection id, however overriding users must ensure
15060// the name binding is the parent resource, without the operations
15061// collection id.
15062//
15063// - name: The name of the operation's parent resource.
15064func (r *OperationsService) List(name string) *OperationsListCall {
15065	c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15066	c.name = name
15067	return c
15068}
15069
15070// Filter sets the optional parameter "filter": The standard list
15071// filter.
15072func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
15073	c.urlParams_.Set("filter", filter)
15074	return c
15075}
15076
15077// PageSize sets the optional parameter "pageSize": The standard list
15078// page size.
15079func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall {
15080	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
15081	return c
15082}
15083
15084// PageToken sets the optional parameter "pageToken": The standard list
15085// page token.
15086func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
15087	c.urlParams_.Set("pageToken", pageToken)
15088	return c
15089}
15090
15091// Fields allows partial responses to be retrieved. See
15092// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15093// for more information.
15094func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
15095	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15096	return c
15097}
15098
15099// IfNoneMatch sets the optional parameter which makes the operation
15100// fail if the object's ETag matches the given value. This is useful for
15101// getting updates only after the object has changed since the last
15102// request. Use googleapi.IsNotModified to check whether the response
15103// error from Do is the result of In-None-Match.
15104func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
15105	c.ifNoneMatch_ = entityTag
15106	return c
15107}
15108
15109// Context sets the context to be used in this call's Do method. Any
15110// pending HTTP request will be aborted if the provided context is
15111// canceled.
15112func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
15113	c.ctx_ = ctx
15114	return c
15115}
15116
15117// Header returns an http.Header that can be modified by the caller to
15118// add HTTP headers to the request.
15119func (c *OperationsListCall) Header() http.Header {
15120	if c.header_ == nil {
15121		c.header_ = make(http.Header)
15122	}
15123	return c.header_
15124}
15125
15126func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
15127	reqHeaders := make(http.Header)
15128	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
15129	for k, v := range c.header_ {
15130		reqHeaders[k] = v
15131	}
15132	reqHeaders.Set("User-Agent", c.s.userAgent())
15133	if c.ifNoneMatch_ != "" {
15134		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
15135	}
15136	var body io.Reader = nil
15137	c.urlParams_.Set("alt", alt)
15138	c.urlParams_.Set("prettyPrint", "false")
15139	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
15140	urls += "?" + c.urlParams_.Encode()
15141	req, err := http.NewRequest("GET", urls, body)
15142	if err != nil {
15143		return nil, err
15144	}
15145	req.Header = reqHeaders
15146	googleapi.Expand(req.URL, map[string]string{
15147		"name": c.name,
15148	})
15149	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15150}
15151
15152// Do executes the "vision.operations.list" call.
15153// Exactly one of *ListOperationsResponse or error will be non-nil. Any
15154// non-2xx status code is an error. Response headers are in either
15155// *ListOperationsResponse.ServerResponse.Header or (if a response was
15156// returned at all) in error.(*googleapi.Error).Header. Use
15157// googleapi.IsNotModified to check whether the returned error was
15158// because http.StatusNotModified was returned.
15159func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
15160	gensupport.SetOptions(c.urlParams_, opts...)
15161	res, err := c.doRequest("json")
15162	if res != nil && res.StatusCode == http.StatusNotModified {
15163		if res.Body != nil {
15164			res.Body.Close()
15165		}
15166		return nil, &googleapi.Error{
15167			Code:   res.StatusCode,
15168			Header: res.Header,
15169		}
15170	}
15171	if err != nil {
15172		return nil, err
15173	}
15174	defer googleapi.CloseBody(res)
15175	if err := googleapi.CheckResponse(res); err != nil {
15176		return nil, err
15177	}
15178	ret := &ListOperationsResponse{
15179		ServerResponse: googleapi.ServerResponse{
15180			Header:         res.Header,
15181			HTTPStatusCode: res.StatusCode,
15182		},
15183	}
15184	target := &ret
15185	if err := gensupport.DecodeResponse(target, res); err != nil {
15186		return nil, err
15187	}
15188	return ret, nil
15189	// {
15190	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
15191	//   "flatPath": "v1/operations",
15192	//   "httpMethod": "GET",
15193	//   "id": "vision.operations.list",
15194	//   "parameterOrder": [
15195	//     "name"
15196	//   ],
15197	//   "parameters": {
15198	//     "filter": {
15199	//       "description": "The standard list filter.",
15200	//       "location": "query",
15201	//       "type": "string"
15202	//     },
15203	//     "name": {
15204	//       "description": "The name of the operation's parent resource.",
15205	//       "location": "path",
15206	//       "pattern": "^operations$",
15207	//       "required": true,
15208	//       "type": "string"
15209	//     },
15210	//     "pageSize": {
15211	//       "description": "The standard list page size.",
15212	//       "format": "int32",
15213	//       "location": "query",
15214	//       "type": "integer"
15215	//     },
15216	//     "pageToken": {
15217	//       "description": "The standard list page token.",
15218	//       "location": "query",
15219	//       "type": "string"
15220	//     }
15221	//   },
15222	//   "path": "v1/{+name}",
15223	//   "response": {
15224	//     "$ref": "ListOperationsResponse"
15225	//   },
15226	//   "scopes": [
15227	//     "https://www.googleapis.com/auth/cloud-platform",
15228	//     "https://www.googleapis.com/auth/cloud-vision"
15229	//   ]
15230	// }
15231
15232}
15233
15234// Pages invokes f for each page of results.
15235// A non-nil error returned from f will halt the iteration.
15236// The provided context supersedes any context provided to the Context method.
15237func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
15238	c.ctx_ = ctx
15239	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
15240	for {
15241		x, err := c.Do()
15242		if err != nil {
15243			return err
15244		}
15245		if err := f(x); err != nil {
15246			return err
15247		}
15248		if x.NextPageToken == "" {
15249			return nil
15250		}
15251		c.PageToken(x.NextPageToken)
15252	}
15253}
15254
15255// method id "vision.projects.files.annotate":
15256
15257type ProjectsFilesAnnotateCall struct {
15258	s                         *Service
15259	parent                    string
15260	batchannotatefilesrequest *BatchAnnotateFilesRequest
15261	urlParams_                gensupport.URLParams
15262	ctx_                      context.Context
15263	header_                   http.Header
15264}
15265
15266// Annotate: Service that performs image detection and annotation for a
15267// batch of files. Now only "application/pdf", "image/tiff" and
15268// "image/gif" are supported. This service will extract at most 5
15269// (customers can specify which 5 in AnnotateFileRequest.pages) frames
15270// (gif) or pages (pdf or tiff) from each file provided and perform
15271// detection and annotation for each image extracted.
15272//
15273// - parent: Optional. Target project and location to make a call.
15274//   Format: `projects/{project-id}/locations/{location-id}`. If no
15275//   parent is specified, a region will be chosen automatically.
15276//   Supported location-ids: `us`: USA country only, `asia`: East asia
15277//   areas, like Japan, Taiwan, `eu`: The European Union. Example:
15278//   `projects/project-A/locations/eu`.
15279func (r *ProjectsFilesService) Annotate(parent string, batchannotatefilesrequest *BatchAnnotateFilesRequest) *ProjectsFilesAnnotateCall {
15280	c := &ProjectsFilesAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15281	c.parent = parent
15282	c.batchannotatefilesrequest = batchannotatefilesrequest
15283	return c
15284}
15285
15286// Fields allows partial responses to be retrieved. See
15287// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15288// for more information.
15289func (c *ProjectsFilesAnnotateCall) Fields(s ...googleapi.Field) *ProjectsFilesAnnotateCall {
15290	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15291	return c
15292}
15293
15294// Context sets the context to be used in this call's Do method. Any
15295// pending HTTP request will be aborted if the provided context is
15296// canceled.
15297func (c *ProjectsFilesAnnotateCall) Context(ctx context.Context) *ProjectsFilesAnnotateCall {
15298	c.ctx_ = ctx
15299	return c
15300}
15301
15302// Header returns an http.Header that can be modified by the caller to
15303// add HTTP headers to the request.
15304func (c *ProjectsFilesAnnotateCall) Header() http.Header {
15305	if c.header_ == nil {
15306		c.header_ = make(http.Header)
15307	}
15308	return c.header_
15309}
15310
15311func (c *ProjectsFilesAnnotateCall) doRequest(alt string) (*http.Response, error) {
15312	reqHeaders := make(http.Header)
15313	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
15314	for k, v := range c.header_ {
15315		reqHeaders[k] = v
15316	}
15317	reqHeaders.Set("User-Agent", c.s.userAgent())
15318	var body io.Reader = nil
15319	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchannotatefilesrequest)
15320	if err != nil {
15321		return nil, err
15322	}
15323	reqHeaders.Set("Content-Type", "application/json")
15324	c.urlParams_.Set("alt", alt)
15325	c.urlParams_.Set("prettyPrint", "false")
15326	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/files:annotate")
15327	urls += "?" + c.urlParams_.Encode()
15328	req, err := http.NewRequest("POST", urls, body)
15329	if err != nil {
15330		return nil, err
15331	}
15332	req.Header = reqHeaders
15333	googleapi.Expand(req.URL, map[string]string{
15334		"parent": c.parent,
15335	})
15336	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15337}
15338
15339// Do executes the "vision.projects.files.annotate" call.
15340// Exactly one of *BatchAnnotateFilesResponse or error will be non-nil.
15341// Any non-2xx status code is an error. Response headers are in either
15342// *BatchAnnotateFilesResponse.ServerResponse.Header or (if a response
15343// was returned at all) in error.(*googleapi.Error).Header. Use
15344// googleapi.IsNotModified to check whether the returned error was
15345// because http.StatusNotModified was returned.
15346func (c *ProjectsFilesAnnotateCall) Do(opts ...googleapi.CallOption) (*BatchAnnotateFilesResponse, error) {
15347	gensupport.SetOptions(c.urlParams_, opts...)
15348	res, err := c.doRequest("json")
15349	if res != nil && res.StatusCode == http.StatusNotModified {
15350		if res.Body != nil {
15351			res.Body.Close()
15352		}
15353		return nil, &googleapi.Error{
15354			Code:   res.StatusCode,
15355			Header: res.Header,
15356		}
15357	}
15358	if err != nil {
15359		return nil, err
15360	}
15361	defer googleapi.CloseBody(res)
15362	if err := googleapi.CheckResponse(res); err != nil {
15363		return nil, err
15364	}
15365	ret := &BatchAnnotateFilesResponse{
15366		ServerResponse: googleapi.ServerResponse{
15367			Header:         res.Header,
15368			HTTPStatusCode: res.StatusCode,
15369		},
15370	}
15371	target := &ret
15372	if err := gensupport.DecodeResponse(target, res); err != nil {
15373		return nil, err
15374	}
15375	return ret, nil
15376	// {
15377	//   "description": "Service that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.",
15378	//   "flatPath": "v1/projects/{projectsId}/files:annotate",
15379	//   "httpMethod": "POST",
15380	//   "id": "vision.projects.files.annotate",
15381	//   "parameterOrder": [
15382	//     "parent"
15383	//   ],
15384	//   "parameters": {
15385	//     "parent": {
15386	//       "description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.",
15387	//       "location": "path",
15388	//       "pattern": "^projects/[^/]+$",
15389	//       "required": true,
15390	//       "type": "string"
15391	//     }
15392	//   },
15393	//   "path": "v1/{+parent}/files:annotate",
15394	//   "request": {
15395	//     "$ref": "BatchAnnotateFilesRequest"
15396	//   },
15397	//   "response": {
15398	//     "$ref": "BatchAnnotateFilesResponse"
15399	//   },
15400	//   "scopes": [
15401	//     "https://www.googleapis.com/auth/cloud-platform",
15402	//     "https://www.googleapis.com/auth/cloud-vision"
15403	//   ]
15404	// }
15405
15406}
15407
15408// method id "vision.projects.files.asyncBatchAnnotate":
15409
15410type ProjectsFilesAsyncBatchAnnotateCall struct {
15411	s                              *Service
15412	parent                         string
15413	asyncbatchannotatefilesrequest *AsyncBatchAnnotateFilesRequest
15414	urlParams_                     gensupport.URLParams
15415	ctx_                           context.Context
15416	header_                        http.Header
15417}
15418
15419// AsyncBatchAnnotate: Run asynchronous image detection and annotation
15420// for a list of generic files, such as PDF files, which may contain
15421// multiple pages and multiple images per page. Progress and results can
15422// be retrieved through the `google.longrunning.Operations` interface.
15423// `Operation.metadata` contains `OperationMetadata` (metadata).
15424// `Operation.response` contains `AsyncBatchAnnotateFilesResponse`
15425// (results).
15426//
15427// - parent: Optional. Target project and location to make a call.
15428//   Format: `projects/{project-id}/locations/{location-id}`. If no
15429//   parent is specified, a region will be chosen automatically.
15430//   Supported location-ids: `us`: USA country only, `asia`: East asia
15431//   areas, like Japan, Taiwan, `eu`: The European Union. Example:
15432//   `projects/project-A/locations/eu`.
15433func (r *ProjectsFilesService) AsyncBatchAnnotate(parent string, asyncbatchannotatefilesrequest *AsyncBatchAnnotateFilesRequest) *ProjectsFilesAsyncBatchAnnotateCall {
15434	c := &ProjectsFilesAsyncBatchAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15435	c.parent = parent
15436	c.asyncbatchannotatefilesrequest = asyncbatchannotatefilesrequest
15437	return c
15438}
15439
15440// Fields allows partial responses to be retrieved. See
15441// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15442// for more information.
15443func (c *ProjectsFilesAsyncBatchAnnotateCall) Fields(s ...googleapi.Field) *ProjectsFilesAsyncBatchAnnotateCall {
15444	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15445	return c
15446}
15447
15448// Context sets the context to be used in this call's Do method. Any
15449// pending HTTP request will be aborted if the provided context is
15450// canceled.
15451func (c *ProjectsFilesAsyncBatchAnnotateCall) Context(ctx context.Context) *ProjectsFilesAsyncBatchAnnotateCall {
15452	c.ctx_ = ctx
15453	return c
15454}
15455
15456// Header returns an http.Header that can be modified by the caller to
15457// add HTTP headers to the request.
15458func (c *ProjectsFilesAsyncBatchAnnotateCall) Header() http.Header {
15459	if c.header_ == nil {
15460		c.header_ = make(http.Header)
15461	}
15462	return c.header_
15463}
15464
15465func (c *ProjectsFilesAsyncBatchAnnotateCall) doRequest(alt string) (*http.Response, error) {
15466	reqHeaders := make(http.Header)
15467	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
15468	for k, v := range c.header_ {
15469		reqHeaders[k] = v
15470	}
15471	reqHeaders.Set("User-Agent", c.s.userAgent())
15472	var body io.Reader = nil
15473	body, err := googleapi.WithoutDataWrapper.JSONReader(c.asyncbatchannotatefilesrequest)
15474	if err != nil {
15475		return nil, err
15476	}
15477	reqHeaders.Set("Content-Type", "application/json")
15478	c.urlParams_.Set("alt", alt)
15479	c.urlParams_.Set("prettyPrint", "false")
15480	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/files:asyncBatchAnnotate")
15481	urls += "?" + c.urlParams_.Encode()
15482	req, err := http.NewRequest("POST", urls, body)
15483	if err != nil {
15484		return nil, err
15485	}
15486	req.Header = reqHeaders
15487	googleapi.Expand(req.URL, map[string]string{
15488		"parent": c.parent,
15489	})
15490	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15491}
15492
15493// Do executes the "vision.projects.files.asyncBatchAnnotate" call.
15494// Exactly one of *Operation or error will be non-nil. Any non-2xx
15495// status code is an error. Response headers are in either
15496// *Operation.ServerResponse.Header or (if a response was returned at
15497// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15498// to check whether the returned error was because
15499// http.StatusNotModified was returned.
15500func (c *ProjectsFilesAsyncBatchAnnotateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15501	gensupport.SetOptions(c.urlParams_, opts...)
15502	res, err := c.doRequest("json")
15503	if res != nil && res.StatusCode == http.StatusNotModified {
15504		if res.Body != nil {
15505			res.Body.Close()
15506		}
15507		return nil, &googleapi.Error{
15508			Code:   res.StatusCode,
15509			Header: res.Header,
15510		}
15511	}
15512	if err != nil {
15513		return nil, err
15514	}
15515	defer googleapi.CloseBody(res)
15516	if err := googleapi.CheckResponse(res); err != nil {
15517		return nil, err
15518	}
15519	ret := &Operation{
15520		ServerResponse: googleapi.ServerResponse{
15521			Header:         res.Header,
15522			HTTPStatusCode: res.StatusCode,
15523		},
15524	}
15525	target := &ret
15526	if err := gensupport.DecodeResponse(target, res); err != nil {
15527		return nil, err
15528	}
15529	return ret, nil
15530	// {
15531	//   "description": "Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).",
15532	//   "flatPath": "v1/projects/{projectsId}/files:asyncBatchAnnotate",
15533	//   "httpMethod": "POST",
15534	//   "id": "vision.projects.files.asyncBatchAnnotate",
15535	//   "parameterOrder": [
15536	//     "parent"
15537	//   ],
15538	//   "parameters": {
15539	//     "parent": {
15540	//       "description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.",
15541	//       "location": "path",
15542	//       "pattern": "^projects/[^/]+$",
15543	//       "required": true,
15544	//       "type": "string"
15545	//     }
15546	//   },
15547	//   "path": "v1/{+parent}/files:asyncBatchAnnotate",
15548	//   "request": {
15549	//     "$ref": "AsyncBatchAnnotateFilesRequest"
15550	//   },
15551	//   "response": {
15552	//     "$ref": "Operation"
15553	//   },
15554	//   "scopes": [
15555	//     "https://www.googleapis.com/auth/cloud-platform",
15556	//     "https://www.googleapis.com/auth/cloud-vision"
15557	//   ]
15558	// }
15559
15560}
15561
15562// method id "vision.projects.images.annotate":
15563
15564type ProjectsImagesAnnotateCall struct {
15565	s                          *Service
15566	parent                     string
15567	batchannotateimagesrequest *BatchAnnotateImagesRequest
15568	urlParams_                 gensupport.URLParams
15569	ctx_                       context.Context
15570	header_                    http.Header
15571}
15572
15573// Annotate: Run image detection and annotation for a batch of images.
15574//
15575// - parent: Optional. Target project and location to make a call.
15576//   Format: `projects/{project-id}/locations/{location-id}`. If no
15577//   parent is specified, a region will be chosen automatically.
15578//   Supported location-ids: `us`: USA country only, `asia`: East asia
15579//   areas, like Japan, Taiwan, `eu`: The European Union. Example:
15580//   `projects/project-A/locations/eu`.
15581func (r *ProjectsImagesService) Annotate(parent string, batchannotateimagesrequest *BatchAnnotateImagesRequest) *ProjectsImagesAnnotateCall {
15582	c := &ProjectsImagesAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15583	c.parent = parent
15584	c.batchannotateimagesrequest = batchannotateimagesrequest
15585	return c
15586}
15587
15588// Fields allows partial responses to be retrieved. See
15589// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15590// for more information.
15591func (c *ProjectsImagesAnnotateCall) Fields(s ...googleapi.Field) *ProjectsImagesAnnotateCall {
15592	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15593	return c
15594}
15595
15596// Context sets the context to be used in this call's Do method. Any
15597// pending HTTP request will be aborted if the provided context is
15598// canceled.
15599func (c *ProjectsImagesAnnotateCall) Context(ctx context.Context) *ProjectsImagesAnnotateCall {
15600	c.ctx_ = ctx
15601	return c
15602}
15603
15604// Header returns an http.Header that can be modified by the caller to
15605// add HTTP headers to the request.
15606func (c *ProjectsImagesAnnotateCall) Header() http.Header {
15607	if c.header_ == nil {
15608		c.header_ = make(http.Header)
15609	}
15610	return c.header_
15611}
15612
15613func (c *ProjectsImagesAnnotateCall) doRequest(alt string) (*http.Response, error) {
15614	reqHeaders := make(http.Header)
15615	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
15616	for k, v := range c.header_ {
15617		reqHeaders[k] = v
15618	}
15619	reqHeaders.Set("User-Agent", c.s.userAgent())
15620	var body io.Reader = nil
15621	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchannotateimagesrequest)
15622	if err != nil {
15623		return nil, err
15624	}
15625	reqHeaders.Set("Content-Type", "application/json")
15626	c.urlParams_.Set("alt", alt)
15627	c.urlParams_.Set("prettyPrint", "false")
15628	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/images:annotate")
15629	urls += "?" + c.urlParams_.Encode()
15630	req, err := http.NewRequest("POST", urls, body)
15631	if err != nil {
15632		return nil, err
15633	}
15634	req.Header = reqHeaders
15635	googleapi.Expand(req.URL, map[string]string{
15636		"parent": c.parent,
15637	})
15638	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15639}
15640
15641// Do executes the "vision.projects.images.annotate" call.
15642// Exactly one of *BatchAnnotateImagesResponse or error will be non-nil.
15643// Any non-2xx status code is an error. Response headers are in either
15644// *BatchAnnotateImagesResponse.ServerResponse.Header or (if a response
15645// was returned at all) in error.(*googleapi.Error).Header. Use
15646// googleapi.IsNotModified to check whether the returned error was
15647// because http.StatusNotModified was returned.
15648func (c *ProjectsImagesAnnotateCall) Do(opts ...googleapi.CallOption) (*BatchAnnotateImagesResponse, error) {
15649	gensupport.SetOptions(c.urlParams_, opts...)
15650	res, err := c.doRequest("json")
15651	if res != nil && res.StatusCode == http.StatusNotModified {
15652		if res.Body != nil {
15653			res.Body.Close()
15654		}
15655		return nil, &googleapi.Error{
15656			Code:   res.StatusCode,
15657			Header: res.Header,
15658		}
15659	}
15660	if err != nil {
15661		return nil, err
15662	}
15663	defer googleapi.CloseBody(res)
15664	if err := googleapi.CheckResponse(res); err != nil {
15665		return nil, err
15666	}
15667	ret := &BatchAnnotateImagesResponse{
15668		ServerResponse: googleapi.ServerResponse{
15669			Header:         res.Header,
15670			HTTPStatusCode: res.StatusCode,
15671		},
15672	}
15673	target := &ret
15674	if err := gensupport.DecodeResponse(target, res); err != nil {
15675		return nil, err
15676	}
15677	return ret, nil
15678	// {
15679	//   "description": "Run image detection and annotation for a batch of images.",
15680	//   "flatPath": "v1/projects/{projectsId}/images:annotate",
15681	//   "httpMethod": "POST",
15682	//   "id": "vision.projects.images.annotate",
15683	//   "parameterOrder": [
15684	//     "parent"
15685	//   ],
15686	//   "parameters": {
15687	//     "parent": {
15688	//       "description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.",
15689	//       "location": "path",
15690	//       "pattern": "^projects/[^/]+$",
15691	//       "required": true,
15692	//       "type": "string"
15693	//     }
15694	//   },
15695	//   "path": "v1/{+parent}/images:annotate",
15696	//   "request": {
15697	//     "$ref": "BatchAnnotateImagesRequest"
15698	//   },
15699	//   "response": {
15700	//     "$ref": "BatchAnnotateImagesResponse"
15701	//   },
15702	//   "scopes": [
15703	//     "https://www.googleapis.com/auth/cloud-platform",
15704	//     "https://www.googleapis.com/auth/cloud-vision"
15705	//   ]
15706	// }
15707
15708}
15709
15710// method id "vision.projects.images.asyncBatchAnnotate":
15711
15712type ProjectsImagesAsyncBatchAnnotateCall struct {
15713	s                               *Service
15714	parent                          string
15715	asyncbatchannotateimagesrequest *AsyncBatchAnnotateImagesRequest
15716	urlParams_                      gensupport.URLParams
15717	ctx_                            context.Context
15718	header_                         http.Header
15719}
15720
15721// AsyncBatchAnnotate: Run asynchronous image detection and annotation
15722// for a list of images. Progress and results can be retrieved through
15723// the `google.longrunning.Operations` interface. `Operation.metadata`
15724// contains `OperationMetadata` (metadata). `Operation.response`
15725// contains `AsyncBatchAnnotateImagesResponse` (results). This service
15726// will write image annotation outputs to json files in customer GCS
15727// bucket, each json file containing BatchAnnotateImagesResponse proto.
15728//
15729// - parent: Optional. Target project and location to make a call.
15730//   Format: `projects/{project-id}/locations/{location-id}`. If no
15731//   parent is specified, a region will be chosen automatically.
15732//   Supported location-ids: `us`: USA country only, `asia`: East asia
15733//   areas, like Japan, Taiwan, `eu`: The European Union. Example:
15734//   `projects/project-A/locations/eu`.
15735func (r *ProjectsImagesService) AsyncBatchAnnotate(parent string, asyncbatchannotateimagesrequest *AsyncBatchAnnotateImagesRequest) *ProjectsImagesAsyncBatchAnnotateCall {
15736	c := &ProjectsImagesAsyncBatchAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15737	c.parent = parent
15738	c.asyncbatchannotateimagesrequest = asyncbatchannotateimagesrequest
15739	return c
15740}
15741
15742// Fields allows partial responses to be retrieved. See
15743// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15744// for more information.
15745func (c *ProjectsImagesAsyncBatchAnnotateCall) Fields(s ...googleapi.Field) *ProjectsImagesAsyncBatchAnnotateCall {
15746	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15747	return c
15748}
15749
15750// Context sets the context to be used in this call's Do method. Any
15751// pending HTTP request will be aborted if the provided context is
15752// canceled.
15753func (c *ProjectsImagesAsyncBatchAnnotateCall) Context(ctx context.Context) *ProjectsImagesAsyncBatchAnnotateCall {
15754	c.ctx_ = ctx
15755	return c
15756}
15757
15758// Header returns an http.Header that can be modified by the caller to
15759// add HTTP headers to the request.
15760func (c *ProjectsImagesAsyncBatchAnnotateCall) Header() http.Header {
15761	if c.header_ == nil {
15762		c.header_ = make(http.Header)
15763	}
15764	return c.header_
15765}
15766
15767func (c *ProjectsImagesAsyncBatchAnnotateCall) doRequest(alt string) (*http.Response, error) {
15768	reqHeaders := make(http.Header)
15769	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
15770	for k, v := range c.header_ {
15771		reqHeaders[k] = v
15772	}
15773	reqHeaders.Set("User-Agent", c.s.userAgent())
15774	var body io.Reader = nil
15775	body, err := googleapi.WithoutDataWrapper.JSONReader(c.asyncbatchannotateimagesrequest)
15776	if err != nil {
15777		return nil, err
15778	}
15779	reqHeaders.Set("Content-Type", "application/json")
15780	c.urlParams_.Set("alt", alt)
15781	c.urlParams_.Set("prettyPrint", "false")
15782	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/images:asyncBatchAnnotate")
15783	urls += "?" + c.urlParams_.Encode()
15784	req, err := http.NewRequest("POST", urls, body)
15785	if err != nil {
15786		return nil, err
15787	}
15788	req.Header = reqHeaders
15789	googleapi.Expand(req.URL, map[string]string{
15790		"parent": c.parent,
15791	})
15792	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15793}
15794
15795// Do executes the "vision.projects.images.asyncBatchAnnotate" call.
15796// Exactly one of *Operation or error will be non-nil. Any non-2xx
15797// status code is an error. Response headers are in either
15798// *Operation.ServerResponse.Header or (if a response was returned at
15799// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
15800// to check whether the returned error was because
15801// http.StatusNotModified was returned.
15802func (c *ProjectsImagesAsyncBatchAnnotateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
15803	gensupport.SetOptions(c.urlParams_, opts...)
15804	res, err := c.doRequest("json")
15805	if res != nil && res.StatusCode == http.StatusNotModified {
15806		if res.Body != nil {
15807			res.Body.Close()
15808		}
15809		return nil, &googleapi.Error{
15810			Code:   res.StatusCode,
15811			Header: res.Header,
15812		}
15813	}
15814	if err != nil {
15815		return nil, err
15816	}
15817	defer googleapi.CloseBody(res)
15818	if err := googleapi.CheckResponse(res); err != nil {
15819		return nil, err
15820	}
15821	ret := &Operation{
15822		ServerResponse: googleapi.ServerResponse{
15823			Header:         res.Header,
15824			HTTPStatusCode: res.StatusCode,
15825		},
15826	}
15827	target := &ret
15828	if err := gensupport.DecodeResponse(target, res); err != nil {
15829		return nil, err
15830	}
15831	return ret, nil
15832	// {
15833	//   "description": "Run asynchronous image detection and annotation for a list of images. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.",
15834	//   "flatPath": "v1/projects/{projectsId}/images:asyncBatchAnnotate",
15835	//   "httpMethod": "POST",
15836	//   "id": "vision.projects.images.asyncBatchAnnotate",
15837	//   "parameterOrder": [
15838	//     "parent"
15839	//   ],
15840	//   "parameters": {
15841	//     "parent": {
15842	//       "description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.",
15843	//       "location": "path",
15844	//       "pattern": "^projects/[^/]+$",
15845	//       "required": true,
15846	//       "type": "string"
15847	//     }
15848	//   },
15849	//   "path": "v1/{+parent}/images:asyncBatchAnnotate",
15850	//   "request": {
15851	//     "$ref": "AsyncBatchAnnotateImagesRequest"
15852	//   },
15853	//   "response": {
15854	//     "$ref": "Operation"
15855	//   },
15856	//   "scopes": [
15857	//     "https://www.googleapis.com/auth/cloud-platform",
15858	//     "https://www.googleapis.com/auth/cloud-vision"
15859	//   ]
15860	// }
15861
15862}
15863
15864// method id "vision.projects.locations.files.annotate":
15865
15866type ProjectsLocationsFilesAnnotateCall struct {
15867	s                         *Service
15868	parent                    string
15869	batchannotatefilesrequest *BatchAnnotateFilesRequest
15870	urlParams_                gensupport.URLParams
15871	ctx_                      context.Context
15872	header_                   http.Header
15873}
15874
15875// Annotate: Service that performs image detection and annotation for a
15876// batch of files. Now only "application/pdf", "image/tiff" and
15877// "image/gif" are supported. This service will extract at most 5
15878// (customers can specify which 5 in AnnotateFileRequest.pages) frames
15879// (gif) or pages (pdf or tiff) from each file provided and perform
15880// detection and annotation for each image extracted.
15881//
15882// - parent: Optional. Target project and location to make a call.
15883//   Format: `projects/{project-id}/locations/{location-id}`. If no
15884//   parent is specified, a region will be chosen automatically.
15885//   Supported location-ids: `us`: USA country only, `asia`: East asia
15886//   areas, like Japan, Taiwan, `eu`: The European Union. Example:
15887//   `projects/project-A/locations/eu`.
15888func (r *ProjectsLocationsFilesService) Annotate(parent string, batchannotatefilesrequest *BatchAnnotateFilesRequest) *ProjectsLocationsFilesAnnotateCall {
15889	c := &ProjectsLocationsFilesAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
15890	c.parent = parent
15891	c.batchannotatefilesrequest = batchannotatefilesrequest
15892	return c
15893}
15894
15895// Fields allows partial responses to be retrieved. See
15896// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
15897// for more information.
15898func (c *ProjectsLocationsFilesAnnotateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFilesAnnotateCall {
15899	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15900	return c
15901}
15902
15903// Context sets the context to be used in this call's Do method. Any
15904// pending HTTP request will be aborted if the provided context is
15905// canceled.
15906func (c *ProjectsLocationsFilesAnnotateCall) Context(ctx context.Context) *ProjectsLocationsFilesAnnotateCall {
15907	c.ctx_ = ctx
15908	return c
15909}
15910
15911// Header returns an http.Header that can be modified by the caller to
15912// add HTTP headers to the request.
15913func (c *ProjectsLocationsFilesAnnotateCall) Header() http.Header {
15914	if c.header_ == nil {
15915		c.header_ = make(http.Header)
15916	}
15917	return c.header_
15918}
15919
15920func (c *ProjectsLocationsFilesAnnotateCall) doRequest(alt string) (*http.Response, error) {
15921	reqHeaders := make(http.Header)
15922	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
15923	for k, v := range c.header_ {
15924		reqHeaders[k] = v
15925	}
15926	reqHeaders.Set("User-Agent", c.s.userAgent())
15927	var body io.Reader = nil
15928	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchannotatefilesrequest)
15929	if err != nil {
15930		return nil, err
15931	}
15932	reqHeaders.Set("Content-Type", "application/json")
15933	c.urlParams_.Set("alt", alt)
15934	c.urlParams_.Set("prettyPrint", "false")
15935	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/files:annotate")
15936	urls += "?" + c.urlParams_.Encode()
15937	req, err := http.NewRequest("POST", urls, body)
15938	if err != nil {
15939		return nil, err
15940	}
15941	req.Header = reqHeaders
15942	googleapi.Expand(req.URL, map[string]string{
15943		"parent": c.parent,
15944	})
15945	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15946}
15947
15948// Do executes the "vision.projects.locations.files.annotate" call.
15949// Exactly one of *BatchAnnotateFilesResponse or error will be non-nil.
15950// Any non-2xx status code is an error. Response headers are in either
15951// *BatchAnnotateFilesResponse.ServerResponse.Header or (if a response
15952// was returned at all) in error.(*googleapi.Error).Header. Use
15953// googleapi.IsNotModified to check whether the returned error was
15954// because http.StatusNotModified was returned.
15955func (c *ProjectsLocationsFilesAnnotateCall) Do(opts ...googleapi.CallOption) (*BatchAnnotateFilesResponse, error) {
15956	gensupport.SetOptions(c.urlParams_, opts...)
15957	res, err := c.doRequest("json")
15958	if res != nil && res.StatusCode == http.StatusNotModified {
15959		if res.Body != nil {
15960			res.Body.Close()
15961		}
15962		return nil, &googleapi.Error{
15963			Code:   res.StatusCode,
15964			Header: res.Header,
15965		}
15966	}
15967	if err != nil {
15968		return nil, err
15969	}
15970	defer googleapi.CloseBody(res)
15971	if err := googleapi.CheckResponse(res); err != nil {
15972		return nil, err
15973	}
15974	ret := &BatchAnnotateFilesResponse{
15975		ServerResponse: googleapi.ServerResponse{
15976			Header:         res.Header,
15977			HTTPStatusCode: res.StatusCode,
15978		},
15979	}
15980	target := &ret
15981	if err := gensupport.DecodeResponse(target, res); err != nil {
15982		return nil, err
15983	}
15984	return ret, nil
15985	// {
15986	//   "description": "Service that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.",
15987	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/files:annotate",
15988	//   "httpMethod": "POST",
15989	//   "id": "vision.projects.locations.files.annotate",
15990	//   "parameterOrder": [
15991	//     "parent"
15992	//   ],
15993	//   "parameters": {
15994	//     "parent": {
15995	//       "description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.",
15996	//       "location": "path",
15997	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
15998	//       "required": true,
15999	//       "type": "string"
16000	//     }
16001	//   },
16002	//   "path": "v1/{+parent}/files:annotate",
16003	//   "request": {
16004	//     "$ref": "BatchAnnotateFilesRequest"
16005	//   },
16006	//   "response": {
16007	//     "$ref": "BatchAnnotateFilesResponse"
16008	//   },
16009	//   "scopes": [
16010	//     "https://www.googleapis.com/auth/cloud-platform",
16011	//     "https://www.googleapis.com/auth/cloud-vision"
16012	//   ]
16013	// }
16014
16015}
16016
16017// method id "vision.projects.locations.files.asyncBatchAnnotate":
16018
16019type ProjectsLocationsFilesAsyncBatchAnnotateCall struct {
16020	s                              *Service
16021	parent                         string
16022	asyncbatchannotatefilesrequest *AsyncBatchAnnotateFilesRequest
16023	urlParams_                     gensupport.URLParams
16024	ctx_                           context.Context
16025	header_                        http.Header
16026}
16027
16028// AsyncBatchAnnotate: Run asynchronous image detection and annotation
16029// for a list of generic files, such as PDF files, which may contain
16030// multiple pages and multiple images per page. Progress and results can
16031// be retrieved through the `google.longrunning.Operations` interface.
16032// `Operation.metadata` contains `OperationMetadata` (metadata).
16033// `Operation.response` contains `AsyncBatchAnnotateFilesResponse`
16034// (results).
16035//
16036// - parent: Optional. Target project and location to make a call.
16037//   Format: `projects/{project-id}/locations/{location-id}`. If no
16038//   parent is specified, a region will be chosen automatically.
16039//   Supported location-ids: `us`: USA country only, `asia`: East asia
16040//   areas, like Japan, Taiwan, `eu`: The European Union. Example:
16041//   `projects/project-A/locations/eu`.
16042func (r *ProjectsLocationsFilesService) AsyncBatchAnnotate(parent string, asyncbatchannotatefilesrequest *AsyncBatchAnnotateFilesRequest) *ProjectsLocationsFilesAsyncBatchAnnotateCall {
16043	c := &ProjectsLocationsFilesAsyncBatchAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16044	c.parent = parent
16045	c.asyncbatchannotatefilesrequest = asyncbatchannotatefilesrequest
16046	return c
16047}
16048
16049// Fields allows partial responses to be retrieved. See
16050// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16051// for more information.
16052func (c *ProjectsLocationsFilesAsyncBatchAnnotateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFilesAsyncBatchAnnotateCall {
16053	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16054	return c
16055}
16056
16057// Context sets the context to be used in this call's Do method. Any
16058// pending HTTP request will be aborted if the provided context is
16059// canceled.
16060func (c *ProjectsLocationsFilesAsyncBatchAnnotateCall) Context(ctx context.Context) *ProjectsLocationsFilesAsyncBatchAnnotateCall {
16061	c.ctx_ = ctx
16062	return c
16063}
16064
16065// Header returns an http.Header that can be modified by the caller to
16066// add HTTP headers to the request.
16067func (c *ProjectsLocationsFilesAsyncBatchAnnotateCall) Header() http.Header {
16068	if c.header_ == nil {
16069		c.header_ = make(http.Header)
16070	}
16071	return c.header_
16072}
16073
16074func (c *ProjectsLocationsFilesAsyncBatchAnnotateCall) doRequest(alt string) (*http.Response, error) {
16075	reqHeaders := make(http.Header)
16076	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
16077	for k, v := range c.header_ {
16078		reqHeaders[k] = v
16079	}
16080	reqHeaders.Set("User-Agent", c.s.userAgent())
16081	var body io.Reader = nil
16082	body, err := googleapi.WithoutDataWrapper.JSONReader(c.asyncbatchannotatefilesrequest)
16083	if err != nil {
16084		return nil, err
16085	}
16086	reqHeaders.Set("Content-Type", "application/json")
16087	c.urlParams_.Set("alt", alt)
16088	c.urlParams_.Set("prettyPrint", "false")
16089	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/files:asyncBatchAnnotate")
16090	urls += "?" + c.urlParams_.Encode()
16091	req, err := http.NewRequest("POST", urls, body)
16092	if err != nil {
16093		return nil, err
16094	}
16095	req.Header = reqHeaders
16096	googleapi.Expand(req.URL, map[string]string{
16097		"parent": c.parent,
16098	})
16099	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16100}
16101
16102// Do executes the "vision.projects.locations.files.asyncBatchAnnotate" call.
16103// Exactly one of *Operation or error will be non-nil. Any non-2xx
16104// status code is an error. Response headers are in either
16105// *Operation.ServerResponse.Header or (if a response was returned at
16106// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16107// to check whether the returned error was because
16108// http.StatusNotModified was returned.
16109func (c *ProjectsLocationsFilesAsyncBatchAnnotateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
16110	gensupport.SetOptions(c.urlParams_, opts...)
16111	res, err := c.doRequest("json")
16112	if res != nil && res.StatusCode == http.StatusNotModified {
16113		if res.Body != nil {
16114			res.Body.Close()
16115		}
16116		return nil, &googleapi.Error{
16117			Code:   res.StatusCode,
16118			Header: res.Header,
16119		}
16120	}
16121	if err != nil {
16122		return nil, err
16123	}
16124	defer googleapi.CloseBody(res)
16125	if err := googleapi.CheckResponse(res); err != nil {
16126		return nil, err
16127	}
16128	ret := &Operation{
16129		ServerResponse: googleapi.ServerResponse{
16130			Header:         res.Header,
16131			HTTPStatusCode: res.StatusCode,
16132		},
16133	}
16134	target := &ret
16135	if err := gensupport.DecodeResponse(target, res); err != nil {
16136		return nil, err
16137	}
16138	return ret, nil
16139	// {
16140	//   "description": "Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).",
16141	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/files:asyncBatchAnnotate",
16142	//   "httpMethod": "POST",
16143	//   "id": "vision.projects.locations.files.asyncBatchAnnotate",
16144	//   "parameterOrder": [
16145	//     "parent"
16146	//   ],
16147	//   "parameters": {
16148	//     "parent": {
16149	//       "description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.",
16150	//       "location": "path",
16151	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
16152	//       "required": true,
16153	//       "type": "string"
16154	//     }
16155	//   },
16156	//   "path": "v1/{+parent}/files:asyncBatchAnnotate",
16157	//   "request": {
16158	//     "$ref": "AsyncBatchAnnotateFilesRequest"
16159	//   },
16160	//   "response": {
16161	//     "$ref": "Operation"
16162	//   },
16163	//   "scopes": [
16164	//     "https://www.googleapis.com/auth/cloud-platform",
16165	//     "https://www.googleapis.com/auth/cloud-vision"
16166	//   ]
16167	// }
16168
16169}
16170
16171// method id "vision.projects.locations.images.annotate":
16172
16173type ProjectsLocationsImagesAnnotateCall struct {
16174	s                          *Service
16175	parent                     string
16176	batchannotateimagesrequest *BatchAnnotateImagesRequest
16177	urlParams_                 gensupport.URLParams
16178	ctx_                       context.Context
16179	header_                    http.Header
16180}
16181
16182// Annotate: Run image detection and annotation for a batch of images.
16183//
16184// - parent: Optional. Target project and location to make a call.
16185//   Format: `projects/{project-id}/locations/{location-id}`. If no
16186//   parent is specified, a region will be chosen automatically.
16187//   Supported location-ids: `us`: USA country only, `asia`: East asia
16188//   areas, like Japan, Taiwan, `eu`: The European Union. Example:
16189//   `projects/project-A/locations/eu`.
16190func (r *ProjectsLocationsImagesService) Annotate(parent string, batchannotateimagesrequest *BatchAnnotateImagesRequest) *ProjectsLocationsImagesAnnotateCall {
16191	c := &ProjectsLocationsImagesAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16192	c.parent = parent
16193	c.batchannotateimagesrequest = batchannotateimagesrequest
16194	return c
16195}
16196
16197// Fields allows partial responses to be retrieved. See
16198// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16199// for more information.
16200func (c *ProjectsLocationsImagesAnnotateCall) Fields(s ...googleapi.Field) *ProjectsLocationsImagesAnnotateCall {
16201	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16202	return c
16203}
16204
16205// Context sets the context to be used in this call's Do method. Any
16206// pending HTTP request will be aborted if the provided context is
16207// canceled.
16208func (c *ProjectsLocationsImagesAnnotateCall) Context(ctx context.Context) *ProjectsLocationsImagesAnnotateCall {
16209	c.ctx_ = ctx
16210	return c
16211}
16212
16213// Header returns an http.Header that can be modified by the caller to
16214// add HTTP headers to the request.
16215func (c *ProjectsLocationsImagesAnnotateCall) Header() http.Header {
16216	if c.header_ == nil {
16217		c.header_ = make(http.Header)
16218	}
16219	return c.header_
16220}
16221
16222func (c *ProjectsLocationsImagesAnnotateCall) doRequest(alt string) (*http.Response, error) {
16223	reqHeaders := make(http.Header)
16224	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
16225	for k, v := range c.header_ {
16226		reqHeaders[k] = v
16227	}
16228	reqHeaders.Set("User-Agent", c.s.userAgent())
16229	var body io.Reader = nil
16230	body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchannotateimagesrequest)
16231	if err != nil {
16232		return nil, err
16233	}
16234	reqHeaders.Set("Content-Type", "application/json")
16235	c.urlParams_.Set("alt", alt)
16236	c.urlParams_.Set("prettyPrint", "false")
16237	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/images:annotate")
16238	urls += "?" + c.urlParams_.Encode()
16239	req, err := http.NewRequest("POST", urls, body)
16240	if err != nil {
16241		return nil, err
16242	}
16243	req.Header = reqHeaders
16244	googleapi.Expand(req.URL, map[string]string{
16245		"parent": c.parent,
16246	})
16247	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16248}
16249
16250// Do executes the "vision.projects.locations.images.annotate" call.
16251// Exactly one of *BatchAnnotateImagesResponse or error will be non-nil.
16252// Any non-2xx status code is an error. Response headers are in either
16253// *BatchAnnotateImagesResponse.ServerResponse.Header or (if a response
16254// was returned at all) in error.(*googleapi.Error).Header. Use
16255// googleapi.IsNotModified to check whether the returned error was
16256// because http.StatusNotModified was returned.
16257func (c *ProjectsLocationsImagesAnnotateCall) Do(opts ...googleapi.CallOption) (*BatchAnnotateImagesResponse, error) {
16258	gensupport.SetOptions(c.urlParams_, opts...)
16259	res, err := c.doRequest("json")
16260	if res != nil && res.StatusCode == http.StatusNotModified {
16261		if res.Body != nil {
16262			res.Body.Close()
16263		}
16264		return nil, &googleapi.Error{
16265			Code:   res.StatusCode,
16266			Header: res.Header,
16267		}
16268	}
16269	if err != nil {
16270		return nil, err
16271	}
16272	defer googleapi.CloseBody(res)
16273	if err := googleapi.CheckResponse(res); err != nil {
16274		return nil, err
16275	}
16276	ret := &BatchAnnotateImagesResponse{
16277		ServerResponse: googleapi.ServerResponse{
16278			Header:         res.Header,
16279			HTTPStatusCode: res.StatusCode,
16280		},
16281	}
16282	target := &ret
16283	if err := gensupport.DecodeResponse(target, res); err != nil {
16284		return nil, err
16285	}
16286	return ret, nil
16287	// {
16288	//   "description": "Run image detection and annotation for a batch of images.",
16289	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/images:annotate",
16290	//   "httpMethod": "POST",
16291	//   "id": "vision.projects.locations.images.annotate",
16292	//   "parameterOrder": [
16293	//     "parent"
16294	//   ],
16295	//   "parameters": {
16296	//     "parent": {
16297	//       "description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.",
16298	//       "location": "path",
16299	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
16300	//       "required": true,
16301	//       "type": "string"
16302	//     }
16303	//   },
16304	//   "path": "v1/{+parent}/images:annotate",
16305	//   "request": {
16306	//     "$ref": "BatchAnnotateImagesRequest"
16307	//   },
16308	//   "response": {
16309	//     "$ref": "BatchAnnotateImagesResponse"
16310	//   },
16311	//   "scopes": [
16312	//     "https://www.googleapis.com/auth/cloud-platform",
16313	//     "https://www.googleapis.com/auth/cloud-vision"
16314	//   ]
16315	// }
16316
16317}
16318
16319// method id "vision.projects.locations.images.asyncBatchAnnotate":
16320
16321type ProjectsLocationsImagesAsyncBatchAnnotateCall struct {
16322	s                               *Service
16323	parent                          string
16324	asyncbatchannotateimagesrequest *AsyncBatchAnnotateImagesRequest
16325	urlParams_                      gensupport.URLParams
16326	ctx_                            context.Context
16327	header_                         http.Header
16328}
16329
16330// AsyncBatchAnnotate: Run asynchronous image detection and annotation
16331// for a list of images. Progress and results can be retrieved through
16332// the `google.longrunning.Operations` interface. `Operation.metadata`
16333// contains `OperationMetadata` (metadata). `Operation.response`
16334// contains `AsyncBatchAnnotateImagesResponse` (results). This service
16335// will write image annotation outputs to json files in customer GCS
16336// bucket, each json file containing BatchAnnotateImagesResponse proto.
16337//
16338// - parent: Optional. Target project and location to make a call.
16339//   Format: `projects/{project-id}/locations/{location-id}`. If no
16340//   parent is specified, a region will be chosen automatically.
16341//   Supported location-ids: `us`: USA country only, `asia`: East asia
16342//   areas, like Japan, Taiwan, `eu`: The European Union. Example:
16343//   `projects/project-A/locations/eu`.
16344func (r *ProjectsLocationsImagesService) AsyncBatchAnnotate(parent string, asyncbatchannotateimagesrequest *AsyncBatchAnnotateImagesRequest) *ProjectsLocationsImagesAsyncBatchAnnotateCall {
16345	c := &ProjectsLocationsImagesAsyncBatchAnnotateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16346	c.parent = parent
16347	c.asyncbatchannotateimagesrequest = asyncbatchannotateimagesrequest
16348	return c
16349}
16350
16351// Fields allows partial responses to be retrieved. See
16352// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16353// for more information.
16354func (c *ProjectsLocationsImagesAsyncBatchAnnotateCall) Fields(s ...googleapi.Field) *ProjectsLocationsImagesAsyncBatchAnnotateCall {
16355	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16356	return c
16357}
16358
16359// Context sets the context to be used in this call's Do method. Any
16360// pending HTTP request will be aborted if the provided context is
16361// canceled.
16362func (c *ProjectsLocationsImagesAsyncBatchAnnotateCall) Context(ctx context.Context) *ProjectsLocationsImagesAsyncBatchAnnotateCall {
16363	c.ctx_ = ctx
16364	return c
16365}
16366
16367// Header returns an http.Header that can be modified by the caller to
16368// add HTTP headers to the request.
16369func (c *ProjectsLocationsImagesAsyncBatchAnnotateCall) Header() http.Header {
16370	if c.header_ == nil {
16371		c.header_ = make(http.Header)
16372	}
16373	return c.header_
16374}
16375
16376func (c *ProjectsLocationsImagesAsyncBatchAnnotateCall) doRequest(alt string) (*http.Response, error) {
16377	reqHeaders := make(http.Header)
16378	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
16379	for k, v := range c.header_ {
16380		reqHeaders[k] = v
16381	}
16382	reqHeaders.Set("User-Agent", c.s.userAgent())
16383	var body io.Reader = nil
16384	body, err := googleapi.WithoutDataWrapper.JSONReader(c.asyncbatchannotateimagesrequest)
16385	if err != nil {
16386		return nil, err
16387	}
16388	reqHeaders.Set("Content-Type", "application/json")
16389	c.urlParams_.Set("alt", alt)
16390	c.urlParams_.Set("prettyPrint", "false")
16391	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/images:asyncBatchAnnotate")
16392	urls += "?" + c.urlParams_.Encode()
16393	req, err := http.NewRequest("POST", urls, body)
16394	if err != nil {
16395		return nil, err
16396	}
16397	req.Header = reqHeaders
16398	googleapi.Expand(req.URL, map[string]string{
16399		"parent": c.parent,
16400	})
16401	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16402}
16403
16404// Do executes the "vision.projects.locations.images.asyncBatchAnnotate" call.
16405// Exactly one of *Operation or error will be non-nil. Any non-2xx
16406// status code is an error. Response headers are in either
16407// *Operation.ServerResponse.Header or (if a response was returned at
16408// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16409// to check whether the returned error was because
16410// http.StatusNotModified was returned.
16411func (c *ProjectsLocationsImagesAsyncBatchAnnotateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
16412	gensupport.SetOptions(c.urlParams_, opts...)
16413	res, err := c.doRequest("json")
16414	if res != nil && res.StatusCode == http.StatusNotModified {
16415		if res.Body != nil {
16416			res.Body.Close()
16417		}
16418		return nil, &googleapi.Error{
16419			Code:   res.StatusCode,
16420			Header: res.Header,
16421		}
16422	}
16423	if err != nil {
16424		return nil, err
16425	}
16426	defer googleapi.CloseBody(res)
16427	if err := googleapi.CheckResponse(res); err != nil {
16428		return nil, err
16429	}
16430	ret := &Operation{
16431		ServerResponse: googleapi.ServerResponse{
16432			Header:         res.Header,
16433			HTTPStatusCode: res.StatusCode,
16434		},
16435	}
16436	target := &ret
16437	if err := gensupport.DecodeResponse(target, res); err != nil {
16438		return nil, err
16439	}
16440	return ret, nil
16441	// {
16442	//   "description": "Run asynchronous image detection and annotation for a list of images. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.",
16443	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/images:asyncBatchAnnotate",
16444	//   "httpMethod": "POST",
16445	//   "id": "vision.projects.locations.images.asyncBatchAnnotate",
16446	//   "parameterOrder": [
16447	//     "parent"
16448	//   ],
16449	//   "parameters": {
16450	//     "parent": {
16451	//       "description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.",
16452	//       "location": "path",
16453	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
16454	//       "required": true,
16455	//       "type": "string"
16456	//     }
16457	//   },
16458	//   "path": "v1/{+parent}/images:asyncBatchAnnotate",
16459	//   "request": {
16460	//     "$ref": "AsyncBatchAnnotateImagesRequest"
16461	//   },
16462	//   "response": {
16463	//     "$ref": "Operation"
16464	//   },
16465	//   "scopes": [
16466	//     "https://www.googleapis.com/auth/cloud-platform",
16467	//     "https://www.googleapis.com/auth/cloud-vision"
16468	//   ]
16469	// }
16470
16471}
16472
16473// method id "vision.projects.locations.operations.get":
16474
16475type ProjectsLocationsOperationsGetCall struct {
16476	s            *Service
16477	name         string
16478	urlParams_   gensupport.URLParams
16479	ifNoneMatch_ string
16480	ctx_         context.Context
16481	header_      http.Header
16482}
16483
16484// Get: Gets the latest state of a long-running operation. Clients can
16485// use this method to poll the operation result at intervals as
16486// recommended by the API service.
16487//
16488// - name: The name of the operation resource.
16489func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
16490	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16491	c.name = name
16492	return c
16493}
16494
16495// Fields allows partial responses to be retrieved. See
16496// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16497// for more information.
16498func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
16499	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16500	return c
16501}
16502
16503// IfNoneMatch sets the optional parameter which makes the operation
16504// fail if the object's ETag matches the given value. This is useful for
16505// getting updates only after the object has changed since the last
16506// request. Use googleapi.IsNotModified to check whether the response
16507// error from Do is the result of In-None-Match.
16508func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
16509	c.ifNoneMatch_ = entityTag
16510	return c
16511}
16512
16513// Context sets the context to be used in this call's Do method. Any
16514// pending HTTP request will be aborted if the provided context is
16515// canceled.
16516func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
16517	c.ctx_ = ctx
16518	return c
16519}
16520
16521// Header returns an http.Header that can be modified by the caller to
16522// add HTTP headers to the request.
16523func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
16524	if c.header_ == nil {
16525		c.header_ = make(http.Header)
16526	}
16527	return c.header_
16528}
16529
16530func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
16531	reqHeaders := make(http.Header)
16532	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
16533	for k, v := range c.header_ {
16534		reqHeaders[k] = v
16535	}
16536	reqHeaders.Set("User-Agent", c.s.userAgent())
16537	if c.ifNoneMatch_ != "" {
16538		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
16539	}
16540	var body io.Reader = nil
16541	c.urlParams_.Set("alt", alt)
16542	c.urlParams_.Set("prettyPrint", "false")
16543	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
16544	urls += "?" + c.urlParams_.Encode()
16545	req, err := http.NewRequest("GET", urls, body)
16546	if err != nil {
16547		return nil, err
16548	}
16549	req.Header = reqHeaders
16550	googleapi.Expand(req.URL, map[string]string{
16551		"name": c.name,
16552	})
16553	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16554}
16555
16556// Do executes the "vision.projects.locations.operations.get" call.
16557// Exactly one of *Operation or error will be non-nil. Any non-2xx
16558// status code is an error. Response headers are in either
16559// *Operation.ServerResponse.Header or (if a response was returned at
16560// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16561// to check whether the returned error was because
16562// http.StatusNotModified was returned.
16563func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
16564	gensupport.SetOptions(c.urlParams_, opts...)
16565	res, err := c.doRequest("json")
16566	if res != nil && res.StatusCode == http.StatusNotModified {
16567		if res.Body != nil {
16568			res.Body.Close()
16569		}
16570		return nil, &googleapi.Error{
16571			Code:   res.StatusCode,
16572			Header: res.Header,
16573		}
16574	}
16575	if err != nil {
16576		return nil, err
16577	}
16578	defer googleapi.CloseBody(res)
16579	if err := googleapi.CheckResponse(res); err != nil {
16580		return nil, err
16581	}
16582	ret := &Operation{
16583		ServerResponse: googleapi.ServerResponse{
16584			Header:         res.Header,
16585			HTTPStatusCode: res.StatusCode,
16586		},
16587	}
16588	target := &ret
16589	if err := gensupport.DecodeResponse(target, res); err != nil {
16590		return nil, err
16591	}
16592	return ret, nil
16593	// {
16594	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
16595	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
16596	//   "httpMethod": "GET",
16597	//   "id": "vision.projects.locations.operations.get",
16598	//   "parameterOrder": [
16599	//     "name"
16600	//   ],
16601	//   "parameters": {
16602	//     "name": {
16603	//       "description": "The name of the operation resource.",
16604	//       "location": "path",
16605	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
16606	//       "required": true,
16607	//       "type": "string"
16608	//     }
16609	//   },
16610	//   "path": "v1/{+name}",
16611	//   "response": {
16612	//     "$ref": "Operation"
16613	//   },
16614	//   "scopes": [
16615	//     "https://www.googleapis.com/auth/cloud-platform",
16616	//     "https://www.googleapis.com/auth/cloud-vision"
16617	//   ]
16618	// }
16619
16620}
16621
16622// method id "vision.projects.locations.productSets.addProduct":
16623
16624type ProjectsLocationsProductSetsAddProductCall struct {
16625	s                             *Service
16626	name                          string
16627	addproducttoproductsetrequest *AddProductToProductSetRequest
16628	urlParams_                    gensupport.URLParams
16629	ctx_                          context.Context
16630	header_                       http.Header
16631}
16632
16633// AddProduct: Adds a Product to the specified ProductSet. If the
16634// Product is already present, no change is made. One Product can be
16635// added to at most 100 ProductSets. Possible errors: * Returns
16636// NOT_FOUND if the Product or the ProductSet doesn't exist.
16637//
16638// - name: The resource name for the ProductSet to modify. Format is:
16639//   `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
16640func (r *ProjectsLocationsProductSetsService) AddProduct(name string, addproducttoproductsetrequest *AddProductToProductSetRequest) *ProjectsLocationsProductSetsAddProductCall {
16641	c := &ProjectsLocationsProductSetsAddProductCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16642	c.name = name
16643	c.addproducttoproductsetrequest = addproducttoproductsetrequest
16644	return c
16645}
16646
16647// Fields allows partial responses to be retrieved. See
16648// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16649// for more information.
16650func (c *ProjectsLocationsProductSetsAddProductCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductSetsAddProductCall {
16651	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16652	return c
16653}
16654
16655// Context sets the context to be used in this call's Do method. Any
16656// pending HTTP request will be aborted if the provided context is
16657// canceled.
16658func (c *ProjectsLocationsProductSetsAddProductCall) Context(ctx context.Context) *ProjectsLocationsProductSetsAddProductCall {
16659	c.ctx_ = ctx
16660	return c
16661}
16662
16663// Header returns an http.Header that can be modified by the caller to
16664// add HTTP headers to the request.
16665func (c *ProjectsLocationsProductSetsAddProductCall) Header() http.Header {
16666	if c.header_ == nil {
16667		c.header_ = make(http.Header)
16668	}
16669	return c.header_
16670}
16671
16672func (c *ProjectsLocationsProductSetsAddProductCall) doRequest(alt string) (*http.Response, error) {
16673	reqHeaders := make(http.Header)
16674	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
16675	for k, v := range c.header_ {
16676		reqHeaders[k] = v
16677	}
16678	reqHeaders.Set("User-Agent", c.s.userAgent())
16679	var body io.Reader = nil
16680	body, err := googleapi.WithoutDataWrapper.JSONReader(c.addproducttoproductsetrequest)
16681	if err != nil {
16682		return nil, err
16683	}
16684	reqHeaders.Set("Content-Type", "application/json")
16685	c.urlParams_.Set("alt", alt)
16686	c.urlParams_.Set("prettyPrint", "false")
16687	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:addProduct")
16688	urls += "?" + c.urlParams_.Encode()
16689	req, err := http.NewRequest("POST", urls, body)
16690	if err != nil {
16691		return nil, err
16692	}
16693	req.Header = reqHeaders
16694	googleapi.Expand(req.URL, map[string]string{
16695		"name": c.name,
16696	})
16697	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16698}
16699
16700// Do executes the "vision.projects.locations.productSets.addProduct" call.
16701// Exactly one of *Empty or error will be non-nil. Any non-2xx status
16702// code is an error. Response headers are in either
16703// *Empty.ServerResponse.Header or (if a response was returned at all)
16704// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
16705// check whether the returned error was because http.StatusNotModified
16706// was returned.
16707func (c *ProjectsLocationsProductSetsAddProductCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
16708	gensupport.SetOptions(c.urlParams_, opts...)
16709	res, err := c.doRequest("json")
16710	if res != nil && res.StatusCode == http.StatusNotModified {
16711		if res.Body != nil {
16712			res.Body.Close()
16713		}
16714		return nil, &googleapi.Error{
16715			Code:   res.StatusCode,
16716			Header: res.Header,
16717		}
16718	}
16719	if err != nil {
16720		return nil, err
16721	}
16722	defer googleapi.CloseBody(res)
16723	if err := googleapi.CheckResponse(res); err != nil {
16724		return nil, err
16725	}
16726	ret := &Empty{
16727		ServerResponse: googleapi.ServerResponse{
16728			Header:         res.Header,
16729			HTTPStatusCode: res.StatusCode,
16730		},
16731	}
16732	target := &ret
16733	if err := gensupport.DecodeResponse(target, res); err != nil {
16734		return nil, err
16735	}
16736	return ret, nil
16737	// {
16738	//   "description": "Adds a Product to the specified ProductSet. If the Product is already present, no change is made. One Product can be added to at most 100 ProductSets. Possible errors: * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.",
16739	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets/{productSetsId}:addProduct",
16740	//   "httpMethod": "POST",
16741	//   "id": "vision.projects.locations.productSets.addProduct",
16742	//   "parameterOrder": [
16743	//     "name"
16744	//   ],
16745	//   "parameters": {
16746	//     "name": {
16747	//       "description": "Required. The resource name for the ProductSet to modify. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`",
16748	//       "location": "path",
16749	//       "pattern": "^projects/[^/]+/locations/[^/]+/productSets/[^/]+$",
16750	//       "required": true,
16751	//       "type": "string"
16752	//     }
16753	//   },
16754	//   "path": "v1/{+name}:addProduct",
16755	//   "request": {
16756	//     "$ref": "AddProductToProductSetRequest"
16757	//   },
16758	//   "response": {
16759	//     "$ref": "Empty"
16760	//   },
16761	//   "scopes": [
16762	//     "https://www.googleapis.com/auth/cloud-platform",
16763	//     "https://www.googleapis.com/auth/cloud-vision"
16764	//   ]
16765	// }
16766
16767}
16768
16769// method id "vision.projects.locations.productSets.create":
16770
16771type ProjectsLocationsProductSetsCreateCall struct {
16772	s          *Service
16773	parent     string
16774	productset *ProductSet
16775	urlParams_ gensupport.URLParams
16776	ctx_       context.Context
16777	header_    http.Header
16778}
16779
16780// Create: Creates and returns a new ProductSet resource. Possible
16781// errors: * Returns INVALID_ARGUMENT if display_name is missing, or is
16782// longer than 4096 characters.
16783//
16784// - parent: The project in which the ProductSet should be created.
16785//   Format is `projects/PROJECT_ID/locations/LOC_ID`.
16786func (r *ProjectsLocationsProductSetsService) Create(parent string, productset *ProductSet) *ProjectsLocationsProductSetsCreateCall {
16787	c := &ProjectsLocationsProductSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16788	c.parent = parent
16789	c.productset = productset
16790	return c
16791}
16792
16793// ProductSetId sets the optional parameter "productSetId": A
16794// user-supplied resource id for this ProductSet. If set, the server
16795// will attempt to use this value as the resource id. If it is already
16796// in use, an error is returned with code ALREADY_EXISTS. Must be at
16797// most 128 characters long. It cannot contain the character `/`.
16798func (c *ProjectsLocationsProductSetsCreateCall) ProductSetId(productSetId string) *ProjectsLocationsProductSetsCreateCall {
16799	c.urlParams_.Set("productSetId", productSetId)
16800	return c
16801}
16802
16803// Fields allows partial responses to be retrieved. See
16804// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16805// for more information.
16806func (c *ProjectsLocationsProductSetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductSetsCreateCall {
16807	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16808	return c
16809}
16810
16811// Context sets the context to be used in this call's Do method. Any
16812// pending HTTP request will be aborted if the provided context is
16813// canceled.
16814func (c *ProjectsLocationsProductSetsCreateCall) Context(ctx context.Context) *ProjectsLocationsProductSetsCreateCall {
16815	c.ctx_ = ctx
16816	return c
16817}
16818
16819// Header returns an http.Header that can be modified by the caller to
16820// add HTTP headers to the request.
16821func (c *ProjectsLocationsProductSetsCreateCall) Header() http.Header {
16822	if c.header_ == nil {
16823		c.header_ = make(http.Header)
16824	}
16825	return c.header_
16826}
16827
16828func (c *ProjectsLocationsProductSetsCreateCall) doRequest(alt string) (*http.Response, error) {
16829	reqHeaders := make(http.Header)
16830	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
16831	for k, v := range c.header_ {
16832		reqHeaders[k] = v
16833	}
16834	reqHeaders.Set("User-Agent", c.s.userAgent())
16835	var body io.Reader = nil
16836	body, err := googleapi.WithoutDataWrapper.JSONReader(c.productset)
16837	if err != nil {
16838		return nil, err
16839	}
16840	reqHeaders.Set("Content-Type", "application/json")
16841	c.urlParams_.Set("alt", alt)
16842	c.urlParams_.Set("prettyPrint", "false")
16843	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/productSets")
16844	urls += "?" + c.urlParams_.Encode()
16845	req, err := http.NewRequest("POST", urls, body)
16846	if err != nil {
16847		return nil, err
16848	}
16849	req.Header = reqHeaders
16850	googleapi.Expand(req.URL, map[string]string{
16851		"parent": c.parent,
16852	})
16853	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16854}
16855
16856// Do executes the "vision.projects.locations.productSets.create" call.
16857// Exactly one of *ProductSet or error will be non-nil. Any non-2xx
16858// status code is an error. Response headers are in either
16859// *ProductSet.ServerResponse.Header or (if a response was returned at
16860// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
16861// to check whether the returned error was because
16862// http.StatusNotModified was returned.
16863func (c *ProjectsLocationsProductSetsCreateCall) Do(opts ...googleapi.CallOption) (*ProductSet, error) {
16864	gensupport.SetOptions(c.urlParams_, opts...)
16865	res, err := c.doRequest("json")
16866	if res != nil && res.StatusCode == http.StatusNotModified {
16867		if res.Body != nil {
16868			res.Body.Close()
16869		}
16870		return nil, &googleapi.Error{
16871			Code:   res.StatusCode,
16872			Header: res.Header,
16873		}
16874	}
16875	if err != nil {
16876		return nil, err
16877	}
16878	defer googleapi.CloseBody(res)
16879	if err := googleapi.CheckResponse(res); err != nil {
16880		return nil, err
16881	}
16882	ret := &ProductSet{
16883		ServerResponse: googleapi.ServerResponse{
16884			Header:         res.Header,
16885			HTTPStatusCode: res.StatusCode,
16886		},
16887	}
16888	target := &ret
16889	if err := gensupport.DecodeResponse(target, res); err != nil {
16890		return nil, err
16891	}
16892	return ret, nil
16893	// {
16894	//   "description": "Creates and returns a new ProductSet resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters.",
16895	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets",
16896	//   "httpMethod": "POST",
16897	//   "id": "vision.projects.locations.productSets.create",
16898	//   "parameterOrder": [
16899	//     "parent"
16900	//   ],
16901	//   "parameters": {
16902	//     "parent": {
16903	//       "description": "Required. The project in which the ProductSet should be created. Format is `projects/PROJECT_ID/locations/LOC_ID`.",
16904	//       "location": "path",
16905	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
16906	//       "required": true,
16907	//       "type": "string"
16908	//     },
16909	//     "productSetId": {
16910	//       "description": "A user-supplied resource id for this ProductSet. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character `/`.",
16911	//       "location": "query",
16912	//       "type": "string"
16913	//     }
16914	//   },
16915	//   "path": "v1/{+parent}/productSets",
16916	//   "request": {
16917	//     "$ref": "ProductSet"
16918	//   },
16919	//   "response": {
16920	//     "$ref": "ProductSet"
16921	//   },
16922	//   "scopes": [
16923	//     "https://www.googleapis.com/auth/cloud-platform",
16924	//     "https://www.googleapis.com/auth/cloud-vision"
16925	//   ]
16926	// }
16927
16928}
16929
16930// method id "vision.projects.locations.productSets.delete":
16931
16932type ProjectsLocationsProductSetsDeleteCall struct {
16933	s          *Service
16934	name       string
16935	urlParams_ gensupport.URLParams
16936	ctx_       context.Context
16937	header_    http.Header
16938}
16939
16940// Delete: Permanently deletes a ProductSet. Products and
16941// ReferenceImages in the ProductSet are not deleted. The actual image
16942// files are not deleted from Google Cloud Storage.
16943//
16944// - name: Resource name of the ProductSet to delete. Format is:
16945//   `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
16946func (r *ProjectsLocationsProductSetsService) Delete(name string) *ProjectsLocationsProductSetsDeleteCall {
16947	c := &ProjectsLocationsProductSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
16948	c.name = name
16949	return c
16950}
16951
16952// Fields allows partial responses to be retrieved. See
16953// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
16954// for more information.
16955func (c *ProjectsLocationsProductSetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductSetsDeleteCall {
16956	c.urlParams_.Set("fields", googleapi.CombineFields(s))
16957	return c
16958}
16959
16960// Context sets the context to be used in this call's Do method. Any
16961// pending HTTP request will be aborted if the provided context is
16962// canceled.
16963func (c *ProjectsLocationsProductSetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsProductSetsDeleteCall {
16964	c.ctx_ = ctx
16965	return c
16966}
16967
16968// Header returns an http.Header that can be modified by the caller to
16969// add HTTP headers to the request.
16970func (c *ProjectsLocationsProductSetsDeleteCall) Header() http.Header {
16971	if c.header_ == nil {
16972		c.header_ = make(http.Header)
16973	}
16974	return c.header_
16975}
16976
16977func (c *ProjectsLocationsProductSetsDeleteCall) doRequest(alt string) (*http.Response, error) {
16978	reqHeaders := make(http.Header)
16979	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
16980	for k, v := range c.header_ {
16981		reqHeaders[k] = v
16982	}
16983	reqHeaders.Set("User-Agent", c.s.userAgent())
16984	var body io.Reader = nil
16985	c.urlParams_.Set("alt", alt)
16986	c.urlParams_.Set("prettyPrint", "false")
16987	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
16988	urls += "?" + c.urlParams_.Encode()
16989	req, err := http.NewRequest("DELETE", urls, body)
16990	if err != nil {
16991		return nil, err
16992	}
16993	req.Header = reqHeaders
16994	googleapi.Expand(req.URL, map[string]string{
16995		"name": c.name,
16996	})
16997	return gensupport.SendRequest(c.ctx_, c.s.client, req)
16998}
16999
17000// Do executes the "vision.projects.locations.productSets.delete" call.
17001// Exactly one of *Empty or error will be non-nil. Any non-2xx status
17002// code is an error. Response headers are in either
17003// *Empty.ServerResponse.Header or (if a response was returned at all)
17004// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17005// check whether the returned error was because http.StatusNotModified
17006// was returned.
17007func (c *ProjectsLocationsProductSetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
17008	gensupport.SetOptions(c.urlParams_, opts...)
17009	res, err := c.doRequest("json")
17010	if res != nil && res.StatusCode == http.StatusNotModified {
17011		if res.Body != nil {
17012			res.Body.Close()
17013		}
17014		return nil, &googleapi.Error{
17015			Code:   res.StatusCode,
17016			Header: res.Header,
17017		}
17018	}
17019	if err != nil {
17020		return nil, err
17021	}
17022	defer googleapi.CloseBody(res)
17023	if err := googleapi.CheckResponse(res); err != nil {
17024		return nil, err
17025	}
17026	ret := &Empty{
17027		ServerResponse: googleapi.ServerResponse{
17028			Header:         res.Header,
17029			HTTPStatusCode: res.StatusCode,
17030		},
17031	}
17032	target := &ret
17033	if err := gensupport.DecodeResponse(target, res); err != nil {
17034		return nil, err
17035	}
17036	return ret, nil
17037	// {
17038	//   "description": "Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not deleted. The actual image files are not deleted from Google Cloud Storage.",
17039	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets/{productSetsId}",
17040	//   "httpMethod": "DELETE",
17041	//   "id": "vision.projects.locations.productSets.delete",
17042	//   "parameterOrder": [
17043	//     "name"
17044	//   ],
17045	//   "parameters": {
17046	//     "name": {
17047	//       "description": "Required. Resource name of the ProductSet to delete. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`",
17048	//       "location": "path",
17049	//       "pattern": "^projects/[^/]+/locations/[^/]+/productSets/[^/]+$",
17050	//       "required": true,
17051	//       "type": "string"
17052	//     }
17053	//   },
17054	//   "path": "v1/{+name}",
17055	//   "response": {
17056	//     "$ref": "Empty"
17057	//   },
17058	//   "scopes": [
17059	//     "https://www.googleapis.com/auth/cloud-platform",
17060	//     "https://www.googleapis.com/auth/cloud-vision"
17061	//   ]
17062	// }
17063
17064}
17065
17066// method id "vision.projects.locations.productSets.get":
17067
17068type ProjectsLocationsProductSetsGetCall struct {
17069	s            *Service
17070	name         string
17071	urlParams_   gensupport.URLParams
17072	ifNoneMatch_ string
17073	ctx_         context.Context
17074	header_      http.Header
17075}
17076
17077// Get: Gets information associated with a ProductSet. Possible errors:
17078// * Returns NOT_FOUND if the ProductSet does not exist.
17079//
17080// - name: Resource name of the ProductSet to get. Format is:
17081//   `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
17082func (r *ProjectsLocationsProductSetsService) Get(name string) *ProjectsLocationsProductSetsGetCall {
17083	c := &ProjectsLocationsProductSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17084	c.name = name
17085	return c
17086}
17087
17088// Fields allows partial responses to be retrieved. See
17089// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17090// for more information.
17091func (c *ProjectsLocationsProductSetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductSetsGetCall {
17092	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17093	return c
17094}
17095
17096// IfNoneMatch sets the optional parameter which makes the operation
17097// fail if the object's ETag matches the given value. This is useful for
17098// getting updates only after the object has changed since the last
17099// request. Use googleapi.IsNotModified to check whether the response
17100// error from Do is the result of In-None-Match.
17101func (c *ProjectsLocationsProductSetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsProductSetsGetCall {
17102	c.ifNoneMatch_ = entityTag
17103	return c
17104}
17105
17106// Context sets the context to be used in this call's Do method. Any
17107// pending HTTP request will be aborted if the provided context is
17108// canceled.
17109func (c *ProjectsLocationsProductSetsGetCall) Context(ctx context.Context) *ProjectsLocationsProductSetsGetCall {
17110	c.ctx_ = ctx
17111	return c
17112}
17113
17114// Header returns an http.Header that can be modified by the caller to
17115// add HTTP headers to the request.
17116func (c *ProjectsLocationsProductSetsGetCall) Header() http.Header {
17117	if c.header_ == nil {
17118		c.header_ = make(http.Header)
17119	}
17120	return c.header_
17121}
17122
17123func (c *ProjectsLocationsProductSetsGetCall) doRequest(alt string) (*http.Response, error) {
17124	reqHeaders := make(http.Header)
17125	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
17126	for k, v := range c.header_ {
17127		reqHeaders[k] = v
17128	}
17129	reqHeaders.Set("User-Agent", c.s.userAgent())
17130	if c.ifNoneMatch_ != "" {
17131		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17132	}
17133	var body io.Reader = nil
17134	c.urlParams_.Set("alt", alt)
17135	c.urlParams_.Set("prettyPrint", "false")
17136	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
17137	urls += "?" + c.urlParams_.Encode()
17138	req, err := http.NewRequest("GET", urls, body)
17139	if err != nil {
17140		return nil, err
17141	}
17142	req.Header = reqHeaders
17143	googleapi.Expand(req.URL, map[string]string{
17144		"name": c.name,
17145	})
17146	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17147}
17148
17149// Do executes the "vision.projects.locations.productSets.get" call.
17150// Exactly one of *ProductSet or error will be non-nil. Any non-2xx
17151// status code is an error. Response headers are in either
17152// *ProductSet.ServerResponse.Header or (if a response was returned at
17153// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
17154// to check whether the returned error was because
17155// http.StatusNotModified was returned.
17156func (c *ProjectsLocationsProductSetsGetCall) Do(opts ...googleapi.CallOption) (*ProductSet, error) {
17157	gensupport.SetOptions(c.urlParams_, opts...)
17158	res, err := c.doRequest("json")
17159	if res != nil && res.StatusCode == http.StatusNotModified {
17160		if res.Body != nil {
17161			res.Body.Close()
17162		}
17163		return nil, &googleapi.Error{
17164			Code:   res.StatusCode,
17165			Header: res.Header,
17166		}
17167	}
17168	if err != nil {
17169		return nil, err
17170	}
17171	defer googleapi.CloseBody(res)
17172	if err := googleapi.CheckResponse(res); err != nil {
17173		return nil, err
17174	}
17175	ret := &ProductSet{
17176		ServerResponse: googleapi.ServerResponse{
17177			Header:         res.Header,
17178			HTTPStatusCode: res.StatusCode,
17179		},
17180	}
17181	target := &ret
17182	if err := gensupport.DecodeResponse(target, res); err != nil {
17183		return nil, err
17184	}
17185	return ret, nil
17186	// {
17187	//   "description": "Gets information associated with a ProductSet. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist.",
17188	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets/{productSetsId}",
17189	//   "httpMethod": "GET",
17190	//   "id": "vision.projects.locations.productSets.get",
17191	//   "parameterOrder": [
17192	//     "name"
17193	//   ],
17194	//   "parameters": {
17195	//     "name": {
17196	//       "description": "Required. Resource name of the ProductSet to get. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`",
17197	//       "location": "path",
17198	//       "pattern": "^projects/[^/]+/locations/[^/]+/productSets/[^/]+$",
17199	//       "required": true,
17200	//       "type": "string"
17201	//     }
17202	//   },
17203	//   "path": "v1/{+name}",
17204	//   "response": {
17205	//     "$ref": "ProductSet"
17206	//   },
17207	//   "scopes": [
17208	//     "https://www.googleapis.com/auth/cloud-platform",
17209	//     "https://www.googleapis.com/auth/cloud-vision"
17210	//   ]
17211	// }
17212
17213}
17214
17215// method id "vision.projects.locations.productSets.import":
17216
17217type ProjectsLocationsProductSetsImportCall struct {
17218	s                        *Service
17219	parent                   string
17220	importproductsetsrequest *ImportProductSetsRequest
17221	urlParams_               gensupport.URLParams
17222	ctx_                     context.Context
17223	header_                  http.Header
17224}
17225
17226// Import: Asynchronous API that imports a list of reference images to
17227// specified product sets based on a list of image information. The
17228// google.longrunning.Operation API can be used to keep track of the
17229// progress and results of the request. `Operation.metadata` contains
17230// `BatchOperationMetadata`. (progress) `Operation.response` contains
17231// `ImportProductSetsResponse`. (results) The input source of this
17232// method is a csv file on Google Cloud Storage. For the format of the
17233// csv file please see ImportProductSetsGcsSource.csv_file_uri.
17234//
17235// - parent: The project in which the ProductSets should be imported.
17236//   Format is `projects/PROJECT_ID/locations/LOC_ID`.
17237func (r *ProjectsLocationsProductSetsService) Import(parent string, importproductsetsrequest *ImportProductSetsRequest) *ProjectsLocationsProductSetsImportCall {
17238	c := &ProjectsLocationsProductSetsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17239	c.parent = parent
17240	c.importproductsetsrequest = importproductsetsrequest
17241	return c
17242}
17243
17244// Fields allows partial responses to be retrieved. See
17245// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17246// for more information.
17247func (c *ProjectsLocationsProductSetsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductSetsImportCall {
17248	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17249	return c
17250}
17251
17252// Context sets the context to be used in this call's Do method. Any
17253// pending HTTP request will be aborted if the provided context is
17254// canceled.
17255func (c *ProjectsLocationsProductSetsImportCall) Context(ctx context.Context) *ProjectsLocationsProductSetsImportCall {
17256	c.ctx_ = ctx
17257	return c
17258}
17259
17260// Header returns an http.Header that can be modified by the caller to
17261// add HTTP headers to the request.
17262func (c *ProjectsLocationsProductSetsImportCall) Header() http.Header {
17263	if c.header_ == nil {
17264		c.header_ = make(http.Header)
17265	}
17266	return c.header_
17267}
17268
17269func (c *ProjectsLocationsProductSetsImportCall) doRequest(alt string) (*http.Response, error) {
17270	reqHeaders := make(http.Header)
17271	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
17272	for k, v := range c.header_ {
17273		reqHeaders[k] = v
17274	}
17275	reqHeaders.Set("User-Agent", c.s.userAgent())
17276	var body io.Reader = nil
17277	body, err := googleapi.WithoutDataWrapper.JSONReader(c.importproductsetsrequest)
17278	if err != nil {
17279		return nil, err
17280	}
17281	reqHeaders.Set("Content-Type", "application/json")
17282	c.urlParams_.Set("alt", alt)
17283	c.urlParams_.Set("prettyPrint", "false")
17284	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/productSets:import")
17285	urls += "?" + c.urlParams_.Encode()
17286	req, err := http.NewRequest("POST", urls, body)
17287	if err != nil {
17288		return nil, err
17289	}
17290	req.Header = reqHeaders
17291	googleapi.Expand(req.URL, map[string]string{
17292		"parent": c.parent,
17293	})
17294	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17295}
17296
17297// Do executes the "vision.projects.locations.productSets.import" call.
17298// Exactly one of *Operation or error will be non-nil. Any non-2xx
17299// status code is an error. Response headers are in either
17300// *Operation.ServerResponse.Header or (if a response was returned at
17301// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
17302// to check whether the returned error was because
17303// http.StatusNotModified was returned.
17304func (c *ProjectsLocationsProductSetsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
17305	gensupport.SetOptions(c.urlParams_, opts...)
17306	res, err := c.doRequest("json")
17307	if res != nil && res.StatusCode == http.StatusNotModified {
17308		if res.Body != nil {
17309			res.Body.Close()
17310		}
17311		return nil, &googleapi.Error{
17312			Code:   res.StatusCode,
17313			Header: res.Header,
17314		}
17315	}
17316	if err != nil {
17317		return nil, err
17318	}
17319	defer googleapi.CloseBody(res)
17320	if err := googleapi.CheckResponse(res); err != nil {
17321		return nil, err
17322	}
17323	ret := &Operation{
17324		ServerResponse: googleapi.ServerResponse{
17325			Header:         res.Header,
17326			HTTPStatusCode: res.StatusCode,
17327		},
17328	}
17329	target := &ret
17330	if err := gensupport.DecodeResponse(target, res); err != nil {
17331		return nil, err
17332	}
17333	return ret, nil
17334	// {
17335	//   "description": "Asynchronous API that imports a list of reference images to specified product sets based on a list of image information. The google.longrunning.Operation API can be used to keep track of the progress and results of the request. `Operation.metadata` contains `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. (results) The input source of this method is a csv file on Google Cloud Storage. For the format of the csv file please see ImportProductSetsGcsSource.csv_file_uri.",
17336	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets:import",
17337	//   "httpMethod": "POST",
17338	//   "id": "vision.projects.locations.productSets.import",
17339	//   "parameterOrder": [
17340	//     "parent"
17341	//   ],
17342	//   "parameters": {
17343	//     "parent": {
17344	//       "description": "Required. The project in which the ProductSets should be imported. Format is `projects/PROJECT_ID/locations/LOC_ID`.",
17345	//       "location": "path",
17346	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
17347	//       "required": true,
17348	//       "type": "string"
17349	//     }
17350	//   },
17351	//   "path": "v1/{+parent}/productSets:import",
17352	//   "request": {
17353	//     "$ref": "ImportProductSetsRequest"
17354	//   },
17355	//   "response": {
17356	//     "$ref": "Operation"
17357	//   },
17358	//   "scopes": [
17359	//     "https://www.googleapis.com/auth/cloud-platform",
17360	//     "https://www.googleapis.com/auth/cloud-vision"
17361	//   ]
17362	// }
17363
17364}
17365
17366// method id "vision.projects.locations.productSets.list":
17367
17368type ProjectsLocationsProductSetsListCall struct {
17369	s            *Service
17370	parent       string
17371	urlParams_   gensupport.URLParams
17372	ifNoneMatch_ string
17373	ctx_         context.Context
17374	header_      http.Header
17375}
17376
17377// List: Lists ProductSets in an unspecified order. Possible errors: *
17378// Returns INVALID_ARGUMENT if page_size is greater than 100, or less
17379// than 1.
17380//
17381// - parent: The project from which ProductSets should be listed. Format
17382//   is `projects/PROJECT_ID/locations/LOC_ID`.
17383func (r *ProjectsLocationsProductSetsService) List(parent string) *ProjectsLocationsProductSetsListCall {
17384	c := &ProjectsLocationsProductSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17385	c.parent = parent
17386	return c
17387}
17388
17389// PageSize sets the optional parameter "pageSize": The maximum number
17390// of items to return. Default 10, maximum 100.
17391func (c *ProjectsLocationsProductSetsListCall) PageSize(pageSize int64) *ProjectsLocationsProductSetsListCall {
17392	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17393	return c
17394}
17395
17396// PageToken sets the optional parameter "pageToken": The
17397// next_page_token returned from a previous List request, if any.
17398func (c *ProjectsLocationsProductSetsListCall) PageToken(pageToken string) *ProjectsLocationsProductSetsListCall {
17399	c.urlParams_.Set("pageToken", pageToken)
17400	return c
17401}
17402
17403// Fields allows partial responses to be retrieved. See
17404// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17405// for more information.
17406func (c *ProjectsLocationsProductSetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductSetsListCall {
17407	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17408	return c
17409}
17410
17411// IfNoneMatch sets the optional parameter which makes the operation
17412// fail if the object's ETag matches the given value. This is useful for
17413// getting updates only after the object has changed since the last
17414// request. Use googleapi.IsNotModified to check whether the response
17415// error from Do is the result of In-None-Match.
17416func (c *ProjectsLocationsProductSetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProductSetsListCall {
17417	c.ifNoneMatch_ = entityTag
17418	return c
17419}
17420
17421// Context sets the context to be used in this call's Do method. Any
17422// pending HTTP request will be aborted if the provided context is
17423// canceled.
17424func (c *ProjectsLocationsProductSetsListCall) Context(ctx context.Context) *ProjectsLocationsProductSetsListCall {
17425	c.ctx_ = ctx
17426	return c
17427}
17428
17429// Header returns an http.Header that can be modified by the caller to
17430// add HTTP headers to the request.
17431func (c *ProjectsLocationsProductSetsListCall) Header() http.Header {
17432	if c.header_ == nil {
17433		c.header_ = make(http.Header)
17434	}
17435	return c.header_
17436}
17437
17438func (c *ProjectsLocationsProductSetsListCall) doRequest(alt string) (*http.Response, error) {
17439	reqHeaders := make(http.Header)
17440	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
17441	for k, v := range c.header_ {
17442		reqHeaders[k] = v
17443	}
17444	reqHeaders.Set("User-Agent", c.s.userAgent())
17445	if c.ifNoneMatch_ != "" {
17446		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17447	}
17448	var body io.Reader = nil
17449	c.urlParams_.Set("alt", alt)
17450	c.urlParams_.Set("prettyPrint", "false")
17451	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/productSets")
17452	urls += "?" + c.urlParams_.Encode()
17453	req, err := http.NewRequest("GET", urls, body)
17454	if err != nil {
17455		return nil, err
17456	}
17457	req.Header = reqHeaders
17458	googleapi.Expand(req.URL, map[string]string{
17459		"parent": c.parent,
17460	})
17461	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17462}
17463
17464// Do executes the "vision.projects.locations.productSets.list" call.
17465// Exactly one of *ListProductSetsResponse or error will be non-nil. Any
17466// non-2xx status code is an error. Response headers are in either
17467// *ListProductSetsResponse.ServerResponse.Header or (if a response was
17468// returned at all) in error.(*googleapi.Error).Header. Use
17469// googleapi.IsNotModified to check whether the returned error was
17470// because http.StatusNotModified was returned.
17471func (c *ProjectsLocationsProductSetsListCall) Do(opts ...googleapi.CallOption) (*ListProductSetsResponse, error) {
17472	gensupport.SetOptions(c.urlParams_, opts...)
17473	res, err := c.doRequest("json")
17474	if res != nil && res.StatusCode == http.StatusNotModified {
17475		if res.Body != nil {
17476			res.Body.Close()
17477		}
17478		return nil, &googleapi.Error{
17479			Code:   res.StatusCode,
17480			Header: res.Header,
17481		}
17482	}
17483	if err != nil {
17484		return nil, err
17485	}
17486	defer googleapi.CloseBody(res)
17487	if err := googleapi.CheckResponse(res); err != nil {
17488		return nil, err
17489	}
17490	ret := &ListProductSetsResponse{
17491		ServerResponse: googleapi.ServerResponse{
17492			Header:         res.Header,
17493			HTTPStatusCode: res.StatusCode,
17494		},
17495	}
17496	target := &ret
17497	if err := gensupport.DecodeResponse(target, res); err != nil {
17498		return nil, err
17499	}
17500	return ret, nil
17501	// {
17502	//   "description": "Lists ProductSets in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1.",
17503	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets",
17504	//   "httpMethod": "GET",
17505	//   "id": "vision.projects.locations.productSets.list",
17506	//   "parameterOrder": [
17507	//     "parent"
17508	//   ],
17509	//   "parameters": {
17510	//     "pageSize": {
17511	//       "description": "The maximum number of items to return. Default 10, maximum 100.",
17512	//       "format": "int32",
17513	//       "location": "query",
17514	//       "type": "integer"
17515	//     },
17516	//     "pageToken": {
17517	//       "description": "The next_page_token returned from a previous List request, if any.",
17518	//       "location": "query",
17519	//       "type": "string"
17520	//     },
17521	//     "parent": {
17522	//       "description": "Required. The project from which ProductSets should be listed. Format is `projects/PROJECT_ID/locations/LOC_ID`.",
17523	//       "location": "path",
17524	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
17525	//       "required": true,
17526	//       "type": "string"
17527	//     }
17528	//   },
17529	//   "path": "v1/{+parent}/productSets",
17530	//   "response": {
17531	//     "$ref": "ListProductSetsResponse"
17532	//   },
17533	//   "scopes": [
17534	//     "https://www.googleapis.com/auth/cloud-platform",
17535	//     "https://www.googleapis.com/auth/cloud-vision"
17536	//   ]
17537	// }
17538
17539}
17540
17541// Pages invokes f for each page of results.
17542// A non-nil error returned from f will halt the iteration.
17543// The provided context supersedes any context provided to the Context method.
17544func (c *ProjectsLocationsProductSetsListCall) Pages(ctx context.Context, f func(*ListProductSetsResponse) error) error {
17545	c.ctx_ = ctx
17546	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
17547	for {
17548		x, err := c.Do()
17549		if err != nil {
17550			return err
17551		}
17552		if err := f(x); err != nil {
17553			return err
17554		}
17555		if x.NextPageToken == "" {
17556			return nil
17557		}
17558		c.PageToken(x.NextPageToken)
17559	}
17560}
17561
17562// method id "vision.projects.locations.productSets.patch":
17563
17564type ProjectsLocationsProductSetsPatchCall struct {
17565	s          *Service
17566	name       string
17567	productset *ProductSet
17568	urlParams_ gensupport.URLParams
17569	ctx_       context.Context
17570	header_    http.Header
17571}
17572
17573// Patch: Makes changes to a ProductSet resource. Only display_name can
17574// be updated currently. Possible errors: * Returns NOT_FOUND if the
17575// ProductSet does not exist. * Returns INVALID_ARGUMENT if display_name
17576// is present in update_mask but missing from the request or longer than
17577// 4096 characters.
17578//
17579// - name: The resource name of the ProductSet. Format is:
17580//   `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
17581//   This field is ignored when creating a ProductSet.
17582func (r *ProjectsLocationsProductSetsService) Patch(name string, productset *ProductSet) *ProjectsLocationsProductSetsPatchCall {
17583	c := &ProjectsLocationsProductSetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17584	c.name = name
17585	c.productset = productset
17586	return c
17587}
17588
17589// UpdateMask sets the optional parameter "updateMask": The FieldMask
17590// that specifies which fields to update. If update_mask isn't
17591// specified, all mutable fields are to be updated. Valid mask path is
17592// `display_name`.
17593func (c *ProjectsLocationsProductSetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsProductSetsPatchCall {
17594	c.urlParams_.Set("updateMask", updateMask)
17595	return c
17596}
17597
17598// Fields allows partial responses to be retrieved. See
17599// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17600// for more information.
17601func (c *ProjectsLocationsProductSetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductSetsPatchCall {
17602	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17603	return c
17604}
17605
17606// Context sets the context to be used in this call's Do method. Any
17607// pending HTTP request will be aborted if the provided context is
17608// canceled.
17609func (c *ProjectsLocationsProductSetsPatchCall) Context(ctx context.Context) *ProjectsLocationsProductSetsPatchCall {
17610	c.ctx_ = ctx
17611	return c
17612}
17613
17614// Header returns an http.Header that can be modified by the caller to
17615// add HTTP headers to the request.
17616func (c *ProjectsLocationsProductSetsPatchCall) Header() http.Header {
17617	if c.header_ == nil {
17618		c.header_ = make(http.Header)
17619	}
17620	return c.header_
17621}
17622
17623func (c *ProjectsLocationsProductSetsPatchCall) doRequest(alt string) (*http.Response, error) {
17624	reqHeaders := make(http.Header)
17625	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
17626	for k, v := range c.header_ {
17627		reqHeaders[k] = v
17628	}
17629	reqHeaders.Set("User-Agent", c.s.userAgent())
17630	var body io.Reader = nil
17631	body, err := googleapi.WithoutDataWrapper.JSONReader(c.productset)
17632	if err != nil {
17633		return nil, err
17634	}
17635	reqHeaders.Set("Content-Type", "application/json")
17636	c.urlParams_.Set("alt", alt)
17637	c.urlParams_.Set("prettyPrint", "false")
17638	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
17639	urls += "?" + c.urlParams_.Encode()
17640	req, err := http.NewRequest("PATCH", urls, body)
17641	if err != nil {
17642		return nil, err
17643	}
17644	req.Header = reqHeaders
17645	googleapi.Expand(req.URL, map[string]string{
17646		"name": c.name,
17647	})
17648	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17649}
17650
17651// Do executes the "vision.projects.locations.productSets.patch" call.
17652// Exactly one of *ProductSet or error will be non-nil. Any non-2xx
17653// status code is an error. Response headers are in either
17654// *ProductSet.ServerResponse.Header or (if a response was returned at
17655// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
17656// to check whether the returned error was because
17657// http.StatusNotModified was returned.
17658func (c *ProjectsLocationsProductSetsPatchCall) Do(opts ...googleapi.CallOption) (*ProductSet, error) {
17659	gensupport.SetOptions(c.urlParams_, opts...)
17660	res, err := c.doRequest("json")
17661	if res != nil && res.StatusCode == http.StatusNotModified {
17662		if res.Body != nil {
17663			res.Body.Close()
17664		}
17665		return nil, &googleapi.Error{
17666			Code:   res.StatusCode,
17667			Header: res.Header,
17668		}
17669	}
17670	if err != nil {
17671		return nil, err
17672	}
17673	defer googleapi.CloseBody(res)
17674	if err := googleapi.CheckResponse(res); err != nil {
17675		return nil, err
17676	}
17677	ret := &ProductSet{
17678		ServerResponse: googleapi.ServerResponse{
17679			Header:         res.Header,
17680			HTTPStatusCode: res.StatusCode,
17681		},
17682	}
17683	target := &ret
17684	if err := gensupport.DecodeResponse(target, res); err != nil {
17685		return nil, err
17686	}
17687	return ret, nil
17688	// {
17689	//   "description": "Makes changes to a ProductSet resource. Only display_name can be updated currently. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist. * Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the request or longer than 4096 characters.",
17690	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets/{productSetsId}",
17691	//   "httpMethod": "PATCH",
17692	//   "id": "vision.projects.locations.productSets.patch",
17693	//   "parameterOrder": [
17694	//     "name"
17695	//   ],
17696	//   "parameters": {
17697	//     "name": {
17698	//       "description": "The resource name of the ProductSet. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. This field is ignored when creating a ProductSet.",
17699	//       "location": "path",
17700	//       "pattern": "^projects/[^/]+/locations/[^/]+/productSets/[^/]+$",
17701	//       "required": true,
17702	//       "type": "string"
17703	//     },
17704	//     "updateMask": {
17705	//       "description": "The FieldMask that specifies which fields to update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask path is `display_name`.",
17706	//       "format": "google-fieldmask",
17707	//       "location": "query",
17708	//       "type": "string"
17709	//     }
17710	//   },
17711	//   "path": "v1/{+name}",
17712	//   "request": {
17713	//     "$ref": "ProductSet"
17714	//   },
17715	//   "response": {
17716	//     "$ref": "ProductSet"
17717	//   },
17718	//   "scopes": [
17719	//     "https://www.googleapis.com/auth/cloud-platform",
17720	//     "https://www.googleapis.com/auth/cloud-vision"
17721	//   ]
17722	// }
17723
17724}
17725
17726// method id "vision.projects.locations.productSets.removeProduct":
17727
17728type ProjectsLocationsProductSetsRemoveProductCall struct {
17729	s                                  *Service
17730	name                               string
17731	removeproductfromproductsetrequest *RemoveProductFromProductSetRequest
17732	urlParams_                         gensupport.URLParams
17733	ctx_                               context.Context
17734	header_                            http.Header
17735}
17736
17737// RemoveProduct: Removes a Product from the specified ProductSet.
17738//
17739// - name: The resource name for the ProductSet to modify. Format is:
17740//   `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
17741func (r *ProjectsLocationsProductSetsService) RemoveProduct(name string, removeproductfromproductsetrequest *RemoveProductFromProductSetRequest) *ProjectsLocationsProductSetsRemoveProductCall {
17742	c := &ProjectsLocationsProductSetsRemoveProductCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17743	c.name = name
17744	c.removeproductfromproductsetrequest = removeproductfromproductsetrequest
17745	return c
17746}
17747
17748// Fields allows partial responses to be retrieved. See
17749// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17750// for more information.
17751func (c *ProjectsLocationsProductSetsRemoveProductCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductSetsRemoveProductCall {
17752	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17753	return c
17754}
17755
17756// Context sets the context to be used in this call's Do method. Any
17757// pending HTTP request will be aborted if the provided context is
17758// canceled.
17759func (c *ProjectsLocationsProductSetsRemoveProductCall) Context(ctx context.Context) *ProjectsLocationsProductSetsRemoveProductCall {
17760	c.ctx_ = ctx
17761	return c
17762}
17763
17764// Header returns an http.Header that can be modified by the caller to
17765// add HTTP headers to the request.
17766func (c *ProjectsLocationsProductSetsRemoveProductCall) Header() http.Header {
17767	if c.header_ == nil {
17768		c.header_ = make(http.Header)
17769	}
17770	return c.header_
17771}
17772
17773func (c *ProjectsLocationsProductSetsRemoveProductCall) doRequest(alt string) (*http.Response, error) {
17774	reqHeaders := make(http.Header)
17775	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
17776	for k, v := range c.header_ {
17777		reqHeaders[k] = v
17778	}
17779	reqHeaders.Set("User-Agent", c.s.userAgent())
17780	var body io.Reader = nil
17781	body, err := googleapi.WithoutDataWrapper.JSONReader(c.removeproductfromproductsetrequest)
17782	if err != nil {
17783		return nil, err
17784	}
17785	reqHeaders.Set("Content-Type", "application/json")
17786	c.urlParams_.Set("alt", alt)
17787	c.urlParams_.Set("prettyPrint", "false")
17788	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:removeProduct")
17789	urls += "?" + c.urlParams_.Encode()
17790	req, err := http.NewRequest("POST", urls, body)
17791	if err != nil {
17792		return nil, err
17793	}
17794	req.Header = reqHeaders
17795	googleapi.Expand(req.URL, map[string]string{
17796		"name": c.name,
17797	})
17798	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17799}
17800
17801// Do executes the "vision.projects.locations.productSets.removeProduct" call.
17802// Exactly one of *Empty or error will be non-nil. Any non-2xx status
17803// code is an error. Response headers are in either
17804// *Empty.ServerResponse.Header or (if a response was returned at all)
17805// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
17806// check whether the returned error was because http.StatusNotModified
17807// was returned.
17808func (c *ProjectsLocationsProductSetsRemoveProductCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
17809	gensupport.SetOptions(c.urlParams_, opts...)
17810	res, err := c.doRequest("json")
17811	if res != nil && res.StatusCode == http.StatusNotModified {
17812		if res.Body != nil {
17813			res.Body.Close()
17814		}
17815		return nil, &googleapi.Error{
17816			Code:   res.StatusCode,
17817			Header: res.Header,
17818		}
17819	}
17820	if err != nil {
17821		return nil, err
17822	}
17823	defer googleapi.CloseBody(res)
17824	if err := googleapi.CheckResponse(res); err != nil {
17825		return nil, err
17826	}
17827	ret := &Empty{
17828		ServerResponse: googleapi.ServerResponse{
17829			Header:         res.Header,
17830			HTTPStatusCode: res.StatusCode,
17831		},
17832	}
17833	target := &ret
17834	if err := gensupport.DecodeResponse(target, res); err != nil {
17835		return nil, err
17836	}
17837	return ret, nil
17838	// {
17839	//   "description": "Removes a Product from the specified ProductSet.",
17840	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets/{productSetsId}:removeProduct",
17841	//   "httpMethod": "POST",
17842	//   "id": "vision.projects.locations.productSets.removeProduct",
17843	//   "parameterOrder": [
17844	//     "name"
17845	//   ],
17846	//   "parameters": {
17847	//     "name": {
17848	//       "description": "Required. The resource name for the ProductSet to modify. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`",
17849	//       "location": "path",
17850	//       "pattern": "^projects/[^/]+/locations/[^/]+/productSets/[^/]+$",
17851	//       "required": true,
17852	//       "type": "string"
17853	//     }
17854	//   },
17855	//   "path": "v1/{+name}:removeProduct",
17856	//   "request": {
17857	//     "$ref": "RemoveProductFromProductSetRequest"
17858	//   },
17859	//   "response": {
17860	//     "$ref": "Empty"
17861	//   },
17862	//   "scopes": [
17863	//     "https://www.googleapis.com/auth/cloud-platform",
17864	//     "https://www.googleapis.com/auth/cloud-vision"
17865	//   ]
17866	// }
17867
17868}
17869
17870// method id "vision.projects.locations.productSets.products.list":
17871
17872type ProjectsLocationsProductSetsProductsListCall struct {
17873	s            *Service
17874	name         string
17875	urlParams_   gensupport.URLParams
17876	ifNoneMatch_ string
17877	ctx_         context.Context
17878	header_      http.Header
17879}
17880
17881// List: Lists the Products in a ProductSet, in an unspecified order. If
17882// the ProductSet does not exist, the products field of the response
17883// will be empty. Possible errors: * Returns INVALID_ARGUMENT if
17884// page_size is greater than 100 or less than 1.
17885//
17886// - name: The ProductSet resource for which to retrieve Products.
17887//   Format is:
17888//   `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
17889func (r *ProjectsLocationsProductSetsProductsService) List(name string) *ProjectsLocationsProductSetsProductsListCall {
17890	c := &ProjectsLocationsProductSetsProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
17891	c.name = name
17892	return c
17893}
17894
17895// PageSize sets the optional parameter "pageSize": The maximum number
17896// of items to return. Default 10, maximum 100.
17897func (c *ProjectsLocationsProductSetsProductsListCall) PageSize(pageSize int64) *ProjectsLocationsProductSetsProductsListCall {
17898	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
17899	return c
17900}
17901
17902// PageToken sets the optional parameter "pageToken": The
17903// next_page_token returned from a previous List request, if any.
17904func (c *ProjectsLocationsProductSetsProductsListCall) PageToken(pageToken string) *ProjectsLocationsProductSetsProductsListCall {
17905	c.urlParams_.Set("pageToken", pageToken)
17906	return c
17907}
17908
17909// Fields allows partial responses to be retrieved. See
17910// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
17911// for more information.
17912func (c *ProjectsLocationsProductSetsProductsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductSetsProductsListCall {
17913	c.urlParams_.Set("fields", googleapi.CombineFields(s))
17914	return c
17915}
17916
17917// IfNoneMatch sets the optional parameter which makes the operation
17918// fail if the object's ETag matches the given value. This is useful for
17919// getting updates only after the object has changed since the last
17920// request. Use googleapi.IsNotModified to check whether the response
17921// error from Do is the result of In-None-Match.
17922func (c *ProjectsLocationsProductSetsProductsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProductSetsProductsListCall {
17923	c.ifNoneMatch_ = entityTag
17924	return c
17925}
17926
17927// Context sets the context to be used in this call's Do method. Any
17928// pending HTTP request will be aborted if the provided context is
17929// canceled.
17930func (c *ProjectsLocationsProductSetsProductsListCall) Context(ctx context.Context) *ProjectsLocationsProductSetsProductsListCall {
17931	c.ctx_ = ctx
17932	return c
17933}
17934
17935// Header returns an http.Header that can be modified by the caller to
17936// add HTTP headers to the request.
17937func (c *ProjectsLocationsProductSetsProductsListCall) Header() http.Header {
17938	if c.header_ == nil {
17939		c.header_ = make(http.Header)
17940	}
17941	return c.header_
17942}
17943
17944func (c *ProjectsLocationsProductSetsProductsListCall) doRequest(alt string) (*http.Response, error) {
17945	reqHeaders := make(http.Header)
17946	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
17947	for k, v := range c.header_ {
17948		reqHeaders[k] = v
17949	}
17950	reqHeaders.Set("User-Agent", c.s.userAgent())
17951	if c.ifNoneMatch_ != "" {
17952		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
17953	}
17954	var body io.Reader = nil
17955	c.urlParams_.Set("alt", alt)
17956	c.urlParams_.Set("prettyPrint", "false")
17957	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/products")
17958	urls += "?" + c.urlParams_.Encode()
17959	req, err := http.NewRequest("GET", urls, body)
17960	if err != nil {
17961		return nil, err
17962	}
17963	req.Header = reqHeaders
17964	googleapi.Expand(req.URL, map[string]string{
17965		"name": c.name,
17966	})
17967	return gensupport.SendRequest(c.ctx_, c.s.client, req)
17968}
17969
17970// Do executes the "vision.projects.locations.productSets.products.list" call.
17971// Exactly one of *ListProductsInProductSetResponse or error will be
17972// non-nil. Any non-2xx status code is an error. Response headers are in
17973// either *ListProductsInProductSetResponse.ServerResponse.Header or (if
17974// a response was returned at all) in error.(*googleapi.Error).Header.
17975// Use googleapi.IsNotModified to check whether the returned error was
17976// because http.StatusNotModified was returned.
17977func (c *ProjectsLocationsProductSetsProductsListCall) Do(opts ...googleapi.CallOption) (*ListProductsInProductSetResponse, error) {
17978	gensupport.SetOptions(c.urlParams_, opts...)
17979	res, err := c.doRequest("json")
17980	if res != nil && res.StatusCode == http.StatusNotModified {
17981		if res.Body != nil {
17982			res.Body.Close()
17983		}
17984		return nil, &googleapi.Error{
17985			Code:   res.StatusCode,
17986			Header: res.Header,
17987		}
17988	}
17989	if err != nil {
17990		return nil, err
17991	}
17992	defer googleapi.CloseBody(res)
17993	if err := googleapi.CheckResponse(res); err != nil {
17994		return nil, err
17995	}
17996	ret := &ListProductsInProductSetResponse{
17997		ServerResponse: googleapi.ServerResponse{
17998			Header:         res.Header,
17999			HTTPStatusCode: res.StatusCode,
18000		},
18001	}
18002	target := &ret
18003	if err := gensupport.DecodeResponse(target, res); err != nil {
18004		return nil, err
18005	}
18006	return ret, nil
18007	// {
18008	//   "description": "Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, the products field of the response will be empty. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.",
18009	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets/{productSetsId}/products",
18010	//   "httpMethod": "GET",
18011	//   "id": "vision.projects.locations.productSets.products.list",
18012	//   "parameterOrder": [
18013	//     "name"
18014	//   ],
18015	//   "parameters": {
18016	//     "name": {
18017	//       "description": "Required. The ProductSet resource for which to retrieve Products. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`",
18018	//       "location": "path",
18019	//       "pattern": "^projects/[^/]+/locations/[^/]+/productSets/[^/]+$",
18020	//       "required": true,
18021	//       "type": "string"
18022	//     },
18023	//     "pageSize": {
18024	//       "description": "The maximum number of items to return. Default 10, maximum 100.",
18025	//       "format": "int32",
18026	//       "location": "query",
18027	//       "type": "integer"
18028	//     },
18029	//     "pageToken": {
18030	//       "description": "The next_page_token returned from a previous List request, if any.",
18031	//       "location": "query",
18032	//       "type": "string"
18033	//     }
18034	//   },
18035	//   "path": "v1/{+name}/products",
18036	//   "response": {
18037	//     "$ref": "ListProductsInProductSetResponse"
18038	//   },
18039	//   "scopes": [
18040	//     "https://www.googleapis.com/auth/cloud-platform",
18041	//     "https://www.googleapis.com/auth/cloud-vision"
18042	//   ]
18043	// }
18044
18045}
18046
18047// Pages invokes f for each page of results.
18048// A non-nil error returned from f will halt the iteration.
18049// The provided context supersedes any context provided to the Context method.
18050func (c *ProjectsLocationsProductSetsProductsListCall) Pages(ctx context.Context, f func(*ListProductsInProductSetResponse) error) error {
18051	c.ctx_ = ctx
18052	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18053	for {
18054		x, err := c.Do()
18055		if err != nil {
18056			return err
18057		}
18058		if err := f(x); err != nil {
18059			return err
18060		}
18061		if x.NextPageToken == "" {
18062			return nil
18063		}
18064		c.PageToken(x.NextPageToken)
18065	}
18066}
18067
18068// method id "vision.projects.locations.products.create":
18069
18070type ProjectsLocationsProductsCreateCall struct {
18071	s          *Service
18072	parent     string
18073	product    *Product
18074	urlParams_ gensupport.URLParams
18075	ctx_       context.Context
18076	header_    http.Header
18077}
18078
18079// Create: Creates and returns a new product resource. Possible errors:
18080// * Returns INVALID_ARGUMENT if display_name is missing or longer than
18081// 4096 characters. * Returns INVALID_ARGUMENT if description is longer
18082// than 4096 characters. * Returns INVALID_ARGUMENT if product_category
18083// is missing or invalid.
18084//
18085// - parent: The project in which the Product should be created. Format
18086//   is `projects/PROJECT_ID/locations/LOC_ID`.
18087func (r *ProjectsLocationsProductsService) Create(parent string, product *Product) *ProjectsLocationsProductsCreateCall {
18088	c := &ProjectsLocationsProductsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18089	c.parent = parent
18090	c.product = product
18091	return c
18092}
18093
18094// ProductId sets the optional parameter "productId": A user-supplied
18095// resource id for this Product. If set, the server will attempt to use
18096// this value as the resource id. If it is already in use, an error is
18097// returned with code ALREADY_EXISTS. Must be at most 128 characters
18098// long. It cannot contain the character `/`.
18099func (c *ProjectsLocationsProductsCreateCall) ProductId(productId string) *ProjectsLocationsProductsCreateCall {
18100	c.urlParams_.Set("productId", productId)
18101	return c
18102}
18103
18104// Fields allows partial responses to be retrieved. See
18105// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18106// for more information.
18107func (c *ProjectsLocationsProductsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductsCreateCall {
18108	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18109	return c
18110}
18111
18112// Context sets the context to be used in this call's Do method. Any
18113// pending HTTP request will be aborted if the provided context is
18114// canceled.
18115func (c *ProjectsLocationsProductsCreateCall) Context(ctx context.Context) *ProjectsLocationsProductsCreateCall {
18116	c.ctx_ = ctx
18117	return c
18118}
18119
18120// Header returns an http.Header that can be modified by the caller to
18121// add HTTP headers to the request.
18122func (c *ProjectsLocationsProductsCreateCall) Header() http.Header {
18123	if c.header_ == nil {
18124		c.header_ = make(http.Header)
18125	}
18126	return c.header_
18127}
18128
18129func (c *ProjectsLocationsProductsCreateCall) doRequest(alt string) (*http.Response, error) {
18130	reqHeaders := make(http.Header)
18131	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
18132	for k, v := range c.header_ {
18133		reqHeaders[k] = v
18134	}
18135	reqHeaders.Set("User-Agent", c.s.userAgent())
18136	var body io.Reader = nil
18137	body, err := googleapi.WithoutDataWrapper.JSONReader(c.product)
18138	if err != nil {
18139		return nil, err
18140	}
18141	reqHeaders.Set("Content-Type", "application/json")
18142	c.urlParams_.Set("alt", alt)
18143	c.urlParams_.Set("prettyPrint", "false")
18144	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/products")
18145	urls += "?" + c.urlParams_.Encode()
18146	req, err := http.NewRequest("POST", urls, body)
18147	if err != nil {
18148		return nil, err
18149	}
18150	req.Header = reqHeaders
18151	googleapi.Expand(req.URL, map[string]string{
18152		"parent": c.parent,
18153	})
18154	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18155}
18156
18157// Do executes the "vision.projects.locations.products.create" call.
18158// Exactly one of *Product or error will be non-nil. Any non-2xx status
18159// code is an error. Response headers are in either
18160// *Product.ServerResponse.Header or (if a response was returned at all)
18161// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
18162// check whether the returned error was because http.StatusNotModified
18163// was returned.
18164func (c *ProjectsLocationsProductsCreateCall) Do(opts ...googleapi.CallOption) (*Product, error) {
18165	gensupport.SetOptions(c.urlParams_, opts...)
18166	res, err := c.doRequest("json")
18167	if res != nil && res.StatusCode == http.StatusNotModified {
18168		if res.Body != nil {
18169			res.Body.Close()
18170		}
18171		return nil, &googleapi.Error{
18172			Code:   res.StatusCode,
18173			Header: res.Header,
18174		}
18175	}
18176	if err != nil {
18177		return nil, err
18178	}
18179	defer googleapi.CloseBody(res)
18180	if err := googleapi.CheckResponse(res); err != nil {
18181		return nil, err
18182	}
18183	ret := &Product{
18184		ServerResponse: googleapi.ServerResponse{
18185			Header:         res.Header,
18186			HTTPStatusCode: res.StatusCode,
18187		},
18188	}
18189	target := &ret
18190	if err := gensupport.DecodeResponse(target, res); err != nil {
18191		return nil, err
18192	}
18193	return ret, nil
18194	// {
18195	//   "description": "Creates and returns a new product resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. * Returns INVALID_ARGUMENT if description is longer than 4096 characters. * Returns INVALID_ARGUMENT if product_category is missing or invalid.",
18196	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products",
18197	//   "httpMethod": "POST",
18198	//   "id": "vision.projects.locations.products.create",
18199	//   "parameterOrder": [
18200	//     "parent"
18201	//   ],
18202	//   "parameters": {
18203	//     "parent": {
18204	//       "description": "Required. The project in which the Product should be created. Format is `projects/PROJECT_ID/locations/LOC_ID`.",
18205	//       "location": "path",
18206	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
18207	//       "required": true,
18208	//       "type": "string"
18209	//     },
18210	//     "productId": {
18211	//       "description": "A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character `/`.",
18212	//       "location": "query",
18213	//       "type": "string"
18214	//     }
18215	//   },
18216	//   "path": "v1/{+parent}/products",
18217	//   "request": {
18218	//     "$ref": "Product"
18219	//   },
18220	//   "response": {
18221	//     "$ref": "Product"
18222	//   },
18223	//   "scopes": [
18224	//     "https://www.googleapis.com/auth/cloud-platform",
18225	//     "https://www.googleapis.com/auth/cloud-vision"
18226	//   ]
18227	// }
18228
18229}
18230
18231// method id "vision.projects.locations.products.delete":
18232
18233type ProjectsLocationsProductsDeleteCall struct {
18234	s          *Service
18235	name       string
18236	urlParams_ gensupport.URLParams
18237	ctx_       context.Context
18238	header_    http.Header
18239}
18240
18241// Delete: Permanently deletes a product and its reference images.
18242// Metadata of the product and all its images will be deleted right
18243// away, but search queries against ProductSets containing the product
18244// may still work until all related caches are refreshed.
18245//
18246// - name: Resource name of product to delete. Format is:
18247//   `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
18248func (r *ProjectsLocationsProductsService) Delete(name string) *ProjectsLocationsProductsDeleteCall {
18249	c := &ProjectsLocationsProductsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18250	c.name = name
18251	return c
18252}
18253
18254// Fields allows partial responses to be retrieved. See
18255// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18256// for more information.
18257func (c *ProjectsLocationsProductsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductsDeleteCall {
18258	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18259	return c
18260}
18261
18262// Context sets the context to be used in this call's Do method. Any
18263// pending HTTP request will be aborted if the provided context is
18264// canceled.
18265func (c *ProjectsLocationsProductsDeleteCall) Context(ctx context.Context) *ProjectsLocationsProductsDeleteCall {
18266	c.ctx_ = ctx
18267	return c
18268}
18269
18270// Header returns an http.Header that can be modified by the caller to
18271// add HTTP headers to the request.
18272func (c *ProjectsLocationsProductsDeleteCall) Header() http.Header {
18273	if c.header_ == nil {
18274		c.header_ = make(http.Header)
18275	}
18276	return c.header_
18277}
18278
18279func (c *ProjectsLocationsProductsDeleteCall) doRequest(alt string) (*http.Response, error) {
18280	reqHeaders := make(http.Header)
18281	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
18282	for k, v := range c.header_ {
18283		reqHeaders[k] = v
18284	}
18285	reqHeaders.Set("User-Agent", c.s.userAgent())
18286	var body io.Reader = nil
18287	c.urlParams_.Set("alt", alt)
18288	c.urlParams_.Set("prettyPrint", "false")
18289	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
18290	urls += "?" + c.urlParams_.Encode()
18291	req, err := http.NewRequest("DELETE", urls, body)
18292	if err != nil {
18293		return nil, err
18294	}
18295	req.Header = reqHeaders
18296	googleapi.Expand(req.URL, map[string]string{
18297		"name": c.name,
18298	})
18299	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18300}
18301
18302// Do executes the "vision.projects.locations.products.delete" call.
18303// Exactly one of *Empty or error will be non-nil. Any non-2xx status
18304// code is an error. Response headers are in either
18305// *Empty.ServerResponse.Header or (if a response was returned at all)
18306// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
18307// check whether the returned error was because http.StatusNotModified
18308// was returned.
18309func (c *ProjectsLocationsProductsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
18310	gensupport.SetOptions(c.urlParams_, opts...)
18311	res, err := c.doRequest("json")
18312	if res != nil && res.StatusCode == http.StatusNotModified {
18313		if res.Body != nil {
18314			res.Body.Close()
18315		}
18316		return nil, &googleapi.Error{
18317			Code:   res.StatusCode,
18318			Header: res.Header,
18319		}
18320	}
18321	if err != nil {
18322		return nil, err
18323	}
18324	defer googleapi.CloseBody(res)
18325	if err := googleapi.CheckResponse(res); err != nil {
18326		return nil, err
18327	}
18328	ret := &Empty{
18329		ServerResponse: googleapi.ServerResponse{
18330			Header:         res.Header,
18331			HTTPStatusCode: res.StatusCode,
18332		},
18333	}
18334	target := &ret
18335	if err := gensupport.DecodeResponse(target, res); err != nil {
18336		return nil, err
18337	}
18338	return ret, nil
18339	// {
18340	//   "description": "Permanently deletes a product and its reference images. Metadata of the product and all its images will be deleted right away, but search queries against ProductSets containing the product may still work until all related caches are refreshed.",
18341	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products/{productsId}",
18342	//   "httpMethod": "DELETE",
18343	//   "id": "vision.projects.locations.products.delete",
18344	//   "parameterOrder": [
18345	//     "name"
18346	//   ],
18347	//   "parameters": {
18348	//     "name": {
18349	//       "description": "Required. Resource name of product to delete. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`",
18350	//       "location": "path",
18351	//       "pattern": "^projects/[^/]+/locations/[^/]+/products/[^/]+$",
18352	//       "required": true,
18353	//       "type": "string"
18354	//     }
18355	//   },
18356	//   "path": "v1/{+name}",
18357	//   "response": {
18358	//     "$ref": "Empty"
18359	//   },
18360	//   "scopes": [
18361	//     "https://www.googleapis.com/auth/cloud-platform",
18362	//     "https://www.googleapis.com/auth/cloud-vision"
18363	//   ]
18364	// }
18365
18366}
18367
18368// method id "vision.projects.locations.products.get":
18369
18370type ProjectsLocationsProductsGetCall struct {
18371	s            *Service
18372	name         string
18373	urlParams_   gensupport.URLParams
18374	ifNoneMatch_ string
18375	ctx_         context.Context
18376	header_      http.Header
18377}
18378
18379// Get: Gets information associated with a Product. Possible errors: *
18380// Returns NOT_FOUND if the Product does not exist.
18381//
18382// - name: Resource name of the Product to get. Format is:
18383//   `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
18384func (r *ProjectsLocationsProductsService) Get(name string) *ProjectsLocationsProductsGetCall {
18385	c := &ProjectsLocationsProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18386	c.name = name
18387	return c
18388}
18389
18390// Fields allows partial responses to be retrieved. See
18391// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18392// for more information.
18393func (c *ProjectsLocationsProductsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductsGetCall {
18394	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18395	return c
18396}
18397
18398// IfNoneMatch sets the optional parameter which makes the operation
18399// fail if the object's ETag matches the given value. This is useful for
18400// getting updates only after the object has changed since the last
18401// request. Use googleapi.IsNotModified to check whether the response
18402// error from Do is the result of In-None-Match.
18403func (c *ProjectsLocationsProductsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsProductsGetCall {
18404	c.ifNoneMatch_ = entityTag
18405	return c
18406}
18407
18408// Context sets the context to be used in this call's Do method. Any
18409// pending HTTP request will be aborted if the provided context is
18410// canceled.
18411func (c *ProjectsLocationsProductsGetCall) Context(ctx context.Context) *ProjectsLocationsProductsGetCall {
18412	c.ctx_ = ctx
18413	return c
18414}
18415
18416// Header returns an http.Header that can be modified by the caller to
18417// add HTTP headers to the request.
18418func (c *ProjectsLocationsProductsGetCall) Header() http.Header {
18419	if c.header_ == nil {
18420		c.header_ = make(http.Header)
18421	}
18422	return c.header_
18423}
18424
18425func (c *ProjectsLocationsProductsGetCall) doRequest(alt string) (*http.Response, error) {
18426	reqHeaders := make(http.Header)
18427	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
18428	for k, v := range c.header_ {
18429		reqHeaders[k] = v
18430	}
18431	reqHeaders.Set("User-Agent", c.s.userAgent())
18432	if c.ifNoneMatch_ != "" {
18433		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18434	}
18435	var body io.Reader = nil
18436	c.urlParams_.Set("alt", alt)
18437	c.urlParams_.Set("prettyPrint", "false")
18438	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
18439	urls += "?" + c.urlParams_.Encode()
18440	req, err := http.NewRequest("GET", urls, body)
18441	if err != nil {
18442		return nil, err
18443	}
18444	req.Header = reqHeaders
18445	googleapi.Expand(req.URL, map[string]string{
18446		"name": c.name,
18447	})
18448	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18449}
18450
18451// Do executes the "vision.projects.locations.products.get" call.
18452// Exactly one of *Product or error will be non-nil. Any non-2xx status
18453// code is an error. Response headers are in either
18454// *Product.ServerResponse.Header or (if a response was returned at all)
18455// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
18456// check whether the returned error was because http.StatusNotModified
18457// was returned.
18458func (c *ProjectsLocationsProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) {
18459	gensupport.SetOptions(c.urlParams_, opts...)
18460	res, err := c.doRequest("json")
18461	if res != nil && res.StatusCode == http.StatusNotModified {
18462		if res.Body != nil {
18463			res.Body.Close()
18464		}
18465		return nil, &googleapi.Error{
18466			Code:   res.StatusCode,
18467			Header: res.Header,
18468		}
18469	}
18470	if err != nil {
18471		return nil, err
18472	}
18473	defer googleapi.CloseBody(res)
18474	if err := googleapi.CheckResponse(res); err != nil {
18475		return nil, err
18476	}
18477	ret := &Product{
18478		ServerResponse: googleapi.ServerResponse{
18479			Header:         res.Header,
18480			HTTPStatusCode: res.StatusCode,
18481		},
18482	}
18483	target := &ret
18484	if err := gensupport.DecodeResponse(target, res); err != nil {
18485		return nil, err
18486	}
18487	return ret, nil
18488	// {
18489	//   "description": "Gets information associated with a Product. Possible errors: * Returns NOT_FOUND if the Product does not exist.",
18490	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products/{productsId}",
18491	//   "httpMethod": "GET",
18492	//   "id": "vision.projects.locations.products.get",
18493	//   "parameterOrder": [
18494	//     "name"
18495	//   ],
18496	//   "parameters": {
18497	//     "name": {
18498	//       "description": "Required. Resource name of the Product to get. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`",
18499	//       "location": "path",
18500	//       "pattern": "^projects/[^/]+/locations/[^/]+/products/[^/]+$",
18501	//       "required": true,
18502	//       "type": "string"
18503	//     }
18504	//   },
18505	//   "path": "v1/{+name}",
18506	//   "response": {
18507	//     "$ref": "Product"
18508	//   },
18509	//   "scopes": [
18510	//     "https://www.googleapis.com/auth/cloud-platform",
18511	//     "https://www.googleapis.com/auth/cloud-vision"
18512	//   ]
18513	// }
18514
18515}
18516
18517// method id "vision.projects.locations.products.list":
18518
18519type ProjectsLocationsProductsListCall struct {
18520	s            *Service
18521	parent       string
18522	urlParams_   gensupport.URLParams
18523	ifNoneMatch_ string
18524	ctx_         context.Context
18525	header_      http.Header
18526}
18527
18528// List: Lists products in an unspecified order. Possible errors: *
18529// Returns INVALID_ARGUMENT if page_size is greater than 100 or less
18530// than 1.
18531//
18532// - parent: The project OR ProductSet from which Products should be
18533//   listed. Format: `projects/PROJECT_ID/locations/LOC_ID`.
18534func (r *ProjectsLocationsProductsService) List(parent string) *ProjectsLocationsProductsListCall {
18535	c := &ProjectsLocationsProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18536	c.parent = parent
18537	return c
18538}
18539
18540// PageSize sets the optional parameter "pageSize": The maximum number
18541// of items to return. Default 10, maximum 100.
18542func (c *ProjectsLocationsProductsListCall) PageSize(pageSize int64) *ProjectsLocationsProductsListCall {
18543	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
18544	return c
18545}
18546
18547// PageToken sets the optional parameter "pageToken": The
18548// next_page_token returned from a previous List request, if any.
18549func (c *ProjectsLocationsProductsListCall) PageToken(pageToken string) *ProjectsLocationsProductsListCall {
18550	c.urlParams_.Set("pageToken", pageToken)
18551	return c
18552}
18553
18554// Fields allows partial responses to be retrieved. See
18555// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18556// for more information.
18557func (c *ProjectsLocationsProductsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductsListCall {
18558	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18559	return c
18560}
18561
18562// IfNoneMatch sets the optional parameter which makes the operation
18563// fail if the object's ETag matches the given value. This is useful for
18564// getting updates only after the object has changed since the last
18565// request. Use googleapi.IsNotModified to check whether the response
18566// error from Do is the result of In-None-Match.
18567func (c *ProjectsLocationsProductsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProductsListCall {
18568	c.ifNoneMatch_ = entityTag
18569	return c
18570}
18571
18572// Context sets the context to be used in this call's Do method. Any
18573// pending HTTP request will be aborted if the provided context is
18574// canceled.
18575func (c *ProjectsLocationsProductsListCall) Context(ctx context.Context) *ProjectsLocationsProductsListCall {
18576	c.ctx_ = ctx
18577	return c
18578}
18579
18580// Header returns an http.Header that can be modified by the caller to
18581// add HTTP headers to the request.
18582func (c *ProjectsLocationsProductsListCall) Header() http.Header {
18583	if c.header_ == nil {
18584		c.header_ = make(http.Header)
18585	}
18586	return c.header_
18587}
18588
18589func (c *ProjectsLocationsProductsListCall) doRequest(alt string) (*http.Response, error) {
18590	reqHeaders := make(http.Header)
18591	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
18592	for k, v := range c.header_ {
18593		reqHeaders[k] = v
18594	}
18595	reqHeaders.Set("User-Agent", c.s.userAgent())
18596	if c.ifNoneMatch_ != "" {
18597		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
18598	}
18599	var body io.Reader = nil
18600	c.urlParams_.Set("alt", alt)
18601	c.urlParams_.Set("prettyPrint", "false")
18602	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/products")
18603	urls += "?" + c.urlParams_.Encode()
18604	req, err := http.NewRequest("GET", urls, body)
18605	if err != nil {
18606		return nil, err
18607	}
18608	req.Header = reqHeaders
18609	googleapi.Expand(req.URL, map[string]string{
18610		"parent": c.parent,
18611	})
18612	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18613}
18614
18615// Do executes the "vision.projects.locations.products.list" call.
18616// Exactly one of *ListProductsResponse or error will be non-nil. Any
18617// non-2xx status code is an error. Response headers are in either
18618// *ListProductsResponse.ServerResponse.Header or (if a response was
18619// returned at all) in error.(*googleapi.Error).Header. Use
18620// googleapi.IsNotModified to check whether the returned error was
18621// because http.StatusNotModified was returned.
18622func (c *ProjectsLocationsProductsListCall) Do(opts ...googleapi.CallOption) (*ListProductsResponse, error) {
18623	gensupport.SetOptions(c.urlParams_, opts...)
18624	res, err := c.doRequest("json")
18625	if res != nil && res.StatusCode == http.StatusNotModified {
18626		if res.Body != nil {
18627			res.Body.Close()
18628		}
18629		return nil, &googleapi.Error{
18630			Code:   res.StatusCode,
18631			Header: res.Header,
18632		}
18633	}
18634	if err != nil {
18635		return nil, err
18636	}
18637	defer googleapi.CloseBody(res)
18638	if err := googleapi.CheckResponse(res); err != nil {
18639		return nil, err
18640	}
18641	ret := &ListProductsResponse{
18642		ServerResponse: googleapi.ServerResponse{
18643			Header:         res.Header,
18644			HTTPStatusCode: res.StatusCode,
18645		},
18646	}
18647	target := &ret
18648	if err := gensupport.DecodeResponse(target, res); err != nil {
18649		return nil, err
18650	}
18651	return ret, nil
18652	// {
18653	//   "description": "Lists products in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.",
18654	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products",
18655	//   "httpMethod": "GET",
18656	//   "id": "vision.projects.locations.products.list",
18657	//   "parameterOrder": [
18658	//     "parent"
18659	//   ],
18660	//   "parameters": {
18661	//     "pageSize": {
18662	//       "description": "The maximum number of items to return. Default 10, maximum 100.",
18663	//       "format": "int32",
18664	//       "location": "query",
18665	//       "type": "integer"
18666	//     },
18667	//     "pageToken": {
18668	//       "description": "The next_page_token returned from a previous List request, if any.",
18669	//       "location": "query",
18670	//       "type": "string"
18671	//     },
18672	//     "parent": {
18673	//       "description": "Required. The project OR ProductSet from which Products should be listed. Format: `projects/PROJECT_ID/locations/LOC_ID`",
18674	//       "location": "path",
18675	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
18676	//       "required": true,
18677	//       "type": "string"
18678	//     }
18679	//   },
18680	//   "path": "v1/{+parent}/products",
18681	//   "response": {
18682	//     "$ref": "ListProductsResponse"
18683	//   },
18684	//   "scopes": [
18685	//     "https://www.googleapis.com/auth/cloud-platform",
18686	//     "https://www.googleapis.com/auth/cloud-vision"
18687	//   ]
18688	// }
18689
18690}
18691
18692// Pages invokes f for each page of results.
18693// A non-nil error returned from f will halt the iteration.
18694// The provided context supersedes any context provided to the Context method.
18695func (c *ProjectsLocationsProductsListCall) Pages(ctx context.Context, f func(*ListProductsResponse) error) error {
18696	c.ctx_ = ctx
18697	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
18698	for {
18699		x, err := c.Do()
18700		if err != nil {
18701			return err
18702		}
18703		if err := f(x); err != nil {
18704			return err
18705		}
18706		if x.NextPageToken == "" {
18707			return nil
18708		}
18709		c.PageToken(x.NextPageToken)
18710	}
18711}
18712
18713// method id "vision.projects.locations.products.patch":
18714
18715type ProjectsLocationsProductsPatchCall struct {
18716	s          *Service
18717	name       string
18718	product    *Product
18719	urlParams_ gensupport.URLParams
18720	ctx_       context.Context
18721	header_    http.Header
18722}
18723
18724// Patch: Makes changes to a Product resource. Only the `display_name`,
18725// `description`, and `labels` fields can be updated right now. If
18726// labels are updated, the change will not be reflected in queries until
18727// the next index time. Possible errors: * Returns NOT_FOUND if the
18728// Product does not exist. * Returns INVALID_ARGUMENT if display_name is
18729// present in update_mask but is missing from the request or longer than
18730// 4096 characters. * Returns INVALID_ARGUMENT if description is present
18731// in update_mask but is longer than 4096 characters. * Returns
18732// INVALID_ARGUMENT if product_category is present in update_mask.
18733//
18734// - name: The resource name of the product. Format is:
18735//   `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This
18736//   field is ignored when creating a product.
18737func (r *ProjectsLocationsProductsService) Patch(name string, product *Product) *ProjectsLocationsProductsPatchCall {
18738	c := &ProjectsLocationsProductsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18739	c.name = name
18740	c.product = product
18741	return c
18742}
18743
18744// UpdateMask sets the optional parameter "updateMask": The FieldMask
18745// that specifies which fields to update. If update_mask isn't
18746// specified, all mutable fields are to be updated. Valid mask paths
18747// include `product_labels`, `display_name`, and `description`.
18748func (c *ProjectsLocationsProductsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsProductsPatchCall {
18749	c.urlParams_.Set("updateMask", updateMask)
18750	return c
18751}
18752
18753// Fields allows partial responses to be retrieved. See
18754// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18755// for more information.
18756func (c *ProjectsLocationsProductsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductsPatchCall {
18757	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18758	return c
18759}
18760
18761// Context sets the context to be used in this call's Do method. Any
18762// pending HTTP request will be aborted if the provided context is
18763// canceled.
18764func (c *ProjectsLocationsProductsPatchCall) Context(ctx context.Context) *ProjectsLocationsProductsPatchCall {
18765	c.ctx_ = ctx
18766	return c
18767}
18768
18769// Header returns an http.Header that can be modified by the caller to
18770// add HTTP headers to the request.
18771func (c *ProjectsLocationsProductsPatchCall) Header() http.Header {
18772	if c.header_ == nil {
18773		c.header_ = make(http.Header)
18774	}
18775	return c.header_
18776}
18777
18778func (c *ProjectsLocationsProductsPatchCall) doRequest(alt string) (*http.Response, error) {
18779	reqHeaders := make(http.Header)
18780	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
18781	for k, v := range c.header_ {
18782		reqHeaders[k] = v
18783	}
18784	reqHeaders.Set("User-Agent", c.s.userAgent())
18785	var body io.Reader = nil
18786	body, err := googleapi.WithoutDataWrapper.JSONReader(c.product)
18787	if err != nil {
18788		return nil, err
18789	}
18790	reqHeaders.Set("Content-Type", "application/json")
18791	c.urlParams_.Set("alt", alt)
18792	c.urlParams_.Set("prettyPrint", "false")
18793	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
18794	urls += "?" + c.urlParams_.Encode()
18795	req, err := http.NewRequest("PATCH", urls, body)
18796	if err != nil {
18797		return nil, err
18798	}
18799	req.Header = reqHeaders
18800	googleapi.Expand(req.URL, map[string]string{
18801		"name": c.name,
18802	})
18803	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18804}
18805
18806// Do executes the "vision.projects.locations.products.patch" call.
18807// Exactly one of *Product or error will be non-nil. Any non-2xx status
18808// code is an error. Response headers are in either
18809// *Product.ServerResponse.Header or (if a response was returned at all)
18810// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
18811// check whether the returned error was because http.StatusNotModified
18812// was returned.
18813func (c *ProjectsLocationsProductsPatchCall) Do(opts ...googleapi.CallOption) (*Product, error) {
18814	gensupport.SetOptions(c.urlParams_, opts...)
18815	res, err := c.doRequest("json")
18816	if res != nil && res.StatusCode == http.StatusNotModified {
18817		if res.Body != nil {
18818			res.Body.Close()
18819		}
18820		return nil, &googleapi.Error{
18821			Code:   res.StatusCode,
18822			Header: res.Header,
18823		}
18824	}
18825	if err != nil {
18826		return nil, err
18827	}
18828	defer googleapi.CloseBody(res)
18829	if err := googleapi.CheckResponse(res); err != nil {
18830		return nil, err
18831	}
18832	ret := &Product{
18833		ServerResponse: googleapi.ServerResponse{
18834			Header:         res.Header,
18835			HTTPStatusCode: res.StatusCode,
18836		},
18837	}
18838	target := &ret
18839	if err := gensupport.DecodeResponse(target, res); err != nil {
18840		return nil, err
18841	}
18842	return ret, nil
18843	// {
18844	//   "description": "Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` fields can be updated right now. If labels are updated, the change will not be reflected in queries until the next index time. Possible errors: * Returns NOT_FOUND if the Product does not exist. * Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from the request or longer than 4096 characters. * Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 characters. * Returns INVALID_ARGUMENT if product_category is present in update_mask.",
18845	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products/{productsId}",
18846	//   "httpMethod": "PATCH",
18847	//   "id": "vision.projects.locations.products.patch",
18848	//   "parameterOrder": [
18849	//     "name"
18850	//   ],
18851	//   "parameters": {
18852	//     "name": {
18853	//       "description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.",
18854	//       "location": "path",
18855	//       "pattern": "^projects/[^/]+/locations/[^/]+/products/[^/]+$",
18856	//       "required": true,
18857	//       "type": "string"
18858	//     },
18859	//     "updateMask": {
18860	//       "description": "The FieldMask that specifies which fields to update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask paths include `product_labels`, `display_name`, and `description`.",
18861	//       "format": "google-fieldmask",
18862	//       "location": "query",
18863	//       "type": "string"
18864	//     }
18865	//   },
18866	//   "path": "v1/{+name}",
18867	//   "request": {
18868	//     "$ref": "Product"
18869	//   },
18870	//   "response": {
18871	//     "$ref": "Product"
18872	//   },
18873	//   "scopes": [
18874	//     "https://www.googleapis.com/auth/cloud-platform",
18875	//     "https://www.googleapis.com/auth/cloud-vision"
18876	//   ]
18877	// }
18878
18879}
18880
18881// method id "vision.projects.locations.products.purge":
18882
18883type ProjectsLocationsProductsPurgeCall struct {
18884	s                    *Service
18885	parent               string
18886	purgeproductsrequest *PurgeProductsRequest
18887	urlParams_           gensupport.URLParams
18888	ctx_                 context.Context
18889	header_              http.Header
18890}
18891
18892// Purge: Asynchronous API to delete all Products in a ProductSet or all
18893// Products that are in no ProductSet. If a Product is a member of the
18894// specified ProductSet in addition to other ProductSets, the Product
18895// will still be deleted. It is recommended to not delete the specified
18896// ProductSet until after this operation has completed. It is also
18897// recommended to not add any of the Products involved in the batch
18898// delete to a new ProductSet while this operation is running because
18899// those Products may still end up deleted. It's not possible to undo
18900// the PurgeProducts operation. Therefore, it is recommended to keep the
18901// csv files used in ImportProductSets (if that was how you originally
18902// built the Product Set) before starting PurgeProducts, in case you
18903// need to re-import the data after deletion. If the plan is to purge
18904// all of the Products from a ProductSet and then re-use the empty
18905// ProductSet to re-import new Products into the empty ProductSet, you
18906// must wait until the PurgeProducts operation has finished for that
18907// ProductSet. The google.longrunning.Operation API can be used to keep
18908// track of the progress and results of the request.
18909// `Operation.metadata` contains `BatchOperationMetadata`. (progress)
18910//
18911// - parent: The project and location in which the Products should be
18912//   deleted. Format is `projects/PROJECT_ID/locations/LOC_ID`.
18913func (r *ProjectsLocationsProductsService) Purge(parent string, purgeproductsrequest *PurgeProductsRequest) *ProjectsLocationsProductsPurgeCall {
18914	c := &ProjectsLocationsProductsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
18915	c.parent = parent
18916	c.purgeproductsrequest = purgeproductsrequest
18917	return c
18918}
18919
18920// Fields allows partial responses to be retrieved. See
18921// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
18922// for more information.
18923func (c *ProjectsLocationsProductsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductsPurgeCall {
18924	c.urlParams_.Set("fields", googleapi.CombineFields(s))
18925	return c
18926}
18927
18928// Context sets the context to be used in this call's Do method. Any
18929// pending HTTP request will be aborted if the provided context is
18930// canceled.
18931func (c *ProjectsLocationsProductsPurgeCall) Context(ctx context.Context) *ProjectsLocationsProductsPurgeCall {
18932	c.ctx_ = ctx
18933	return c
18934}
18935
18936// Header returns an http.Header that can be modified by the caller to
18937// add HTTP headers to the request.
18938func (c *ProjectsLocationsProductsPurgeCall) Header() http.Header {
18939	if c.header_ == nil {
18940		c.header_ = make(http.Header)
18941	}
18942	return c.header_
18943}
18944
18945func (c *ProjectsLocationsProductsPurgeCall) doRequest(alt string) (*http.Response, error) {
18946	reqHeaders := make(http.Header)
18947	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
18948	for k, v := range c.header_ {
18949		reqHeaders[k] = v
18950	}
18951	reqHeaders.Set("User-Agent", c.s.userAgent())
18952	var body io.Reader = nil
18953	body, err := googleapi.WithoutDataWrapper.JSONReader(c.purgeproductsrequest)
18954	if err != nil {
18955		return nil, err
18956	}
18957	reqHeaders.Set("Content-Type", "application/json")
18958	c.urlParams_.Set("alt", alt)
18959	c.urlParams_.Set("prettyPrint", "false")
18960	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/products:purge")
18961	urls += "?" + c.urlParams_.Encode()
18962	req, err := http.NewRequest("POST", urls, body)
18963	if err != nil {
18964		return nil, err
18965	}
18966	req.Header = reqHeaders
18967	googleapi.Expand(req.URL, map[string]string{
18968		"parent": c.parent,
18969	})
18970	return gensupport.SendRequest(c.ctx_, c.s.client, req)
18971}
18972
18973// Do executes the "vision.projects.locations.products.purge" call.
18974// Exactly one of *Operation or error will be non-nil. Any non-2xx
18975// status code is an error. Response headers are in either
18976// *Operation.ServerResponse.Header or (if a response was returned at
18977// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
18978// to check whether the returned error was because
18979// http.StatusNotModified was returned.
18980func (c *ProjectsLocationsProductsPurgeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
18981	gensupport.SetOptions(c.urlParams_, opts...)
18982	res, err := c.doRequest("json")
18983	if res != nil && res.StatusCode == http.StatusNotModified {
18984		if res.Body != nil {
18985			res.Body.Close()
18986		}
18987		return nil, &googleapi.Error{
18988			Code:   res.StatusCode,
18989			Header: res.Header,
18990		}
18991	}
18992	if err != nil {
18993		return nil, err
18994	}
18995	defer googleapi.CloseBody(res)
18996	if err := googleapi.CheckResponse(res); err != nil {
18997		return nil, err
18998	}
18999	ret := &Operation{
19000		ServerResponse: googleapi.ServerResponse{
19001			Header:         res.Header,
19002			HTTPStatusCode: res.StatusCode,
19003		},
19004	}
19005	target := &ret
19006	if err := gensupport.DecodeResponse(target, res); err != nil {
19007		return nil, err
19008	}
19009	return ret, nil
19010	// {
19011	//   "description": "Asynchronous API to delete all Products in a ProductSet or all Products that are in no ProductSet. If a Product is a member of the specified ProductSet in addition to other ProductSets, the Product will still be deleted. It is recommended to not delete the specified ProductSet until after this operation has completed. It is also recommended to not add any of the Products involved in the batch delete to a new ProductSet while this operation is running because those Products may still end up deleted. It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep the csv files used in ImportProductSets (if that was how you originally built the Product Set) before starting PurgeProducts, in case you need to re-import the data after deletion. If the plan is to purge all of the Products from a ProductSet and then re-use the empty ProductSet to re-import new Products into the empty ProductSet, you must wait until the PurgeProducts operation has finished for that ProductSet. The google.longrunning.Operation API can be used to keep track of the progress and results of the request. `Operation.metadata` contains `BatchOperationMetadata`. (progress)",
19012	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products:purge",
19013	//   "httpMethod": "POST",
19014	//   "id": "vision.projects.locations.products.purge",
19015	//   "parameterOrder": [
19016	//     "parent"
19017	//   ],
19018	//   "parameters": {
19019	//     "parent": {
19020	//       "description": "Required. The project and location in which the Products should be deleted. Format is `projects/PROJECT_ID/locations/LOC_ID`.",
19021	//       "location": "path",
19022	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
19023	//       "required": true,
19024	//       "type": "string"
19025	//     }
19026	//   },
19027	//   "path": "v1/{+parent}/products:purge",
19028	//   "request": {
19029	//     "$ref": "PurgeProductsRequest"
19030	//   },
19031	//   "response": {
19032	//     "$ref": "Operation"
19033	//   },
19034	//   "scopes": [
19035	//     "https://www.googleapis.com/auth/cloud-platform",
19036	//     "https://www.googleapis.com/auth/cloud-vision"
19037	//   ]
19038	// }
19039
19040}
19041
19042// method id "vision.projects.locations.products.referenceImages.create":
19043
19044type ProjectsLocationsProductsReferenceImagesCreateCall struct {
19045	s              *Service
19046	parent         string
19047	referenceimage *ReferenceImage
19048	urlParams_     gensupport.URLParams
19049	ctx_           context.Context
19050	header_        http.Header
19051}
19052
19053// Create: Creates and returns a new ReferenceImage resource. The
19054// `bounding_poly` field is optional. If `bounding_poly` is not
19055// specified, the system will try to detect regions of interest in the
19056// image that are compatible with the product_category on the parent
19057// product. If it is specified, detection is ALWAYS skipped. The system
19058// converts polygons into non-rotated rectangles. Note that the pipeline
19059// will resize the image if the image resolution is too large to process
19060// (above 50MP). Possible errors: * Returns INVALID_ARGUMENT if the
19061// image_uri is missing or longer than 4096 characters. * Returns
19062// INVALID_ARGUMENT if the product does not exist. * Returns
19063// INVALID_ARGUMENT if bounding_poly is not provided, and nothing
19064// compatible with the parent product's product_category is detected. *
19065// Returns INVALID_ARGUMENT if bounding_poly contains more than 10
19066// polygons.
19067//
19068// - parent: Resource name of the product in which to create the
19069//   reference image. Format is
19070//   `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
19071func (r *ProjectsLocationsProductsReferenceImagesService) Create(parent string, referenceimage *ReferenceImage) *ProjectsLocationsProductsReferenceImagesCreateCall {
19072	c := &ProjectsLocationsProductsReferenceImagesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19073	c.parent = parent
19074	c.referenceimage = referenceimage
19075	return c
19076}
19077
19078// ReferenceImageId sets the optional parameter "referenceImageId": A
19079// user-supplied resource id for the ReferenceImage to be added. If set,
19080// the server will attempt to use this value as the resource id. If it
19081// is already in use, an error is returned with code ALREADY_EXISTS.
19082// Must be at most 128 characters long. It cannot contain the character
19083// `/`.
19084func (c *ProjectsLocationsProductsReferenceImagesCreateCall) ReferenceImageId(referenceImageId string) *ProjectsLocationsProductsReferenceImagesCreateCall {
19085	c.urlParams_.Set("referenceImageId", referenceImageId)
19086	return c
19087}
19088
19089// Fields allows partial responses to be retrieved. See
19090// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19091// for more information.
19092func (c *ProjectsLocationsProductsReferenceImagesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductsReferenceImagesCreateCall {
19093	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19094	return c
19095}
19096
19097// Context sets the context to be used in this call's Do method. Any
19098// pending HTTP request will be aborted if the provided context is
19099// canceled.
19100func (c *ProjectsLocationsProductsReferenceImagesCreateCall) Context(ctx context.Context) *ProjectsLocationsProductsReferenceImagesCreateCall {
19101	c.ctx_ = ctx
19102	return c
19103}
19104
19105// Header returns an http.Header that can be modified by the caller to
19106// add HTTP headers to the request.
19107func (c *ProjectsLocationsProductsReferenceImagesCreateCall) Header() http.Header {
19108	if c.header_ == nil {
19109		c.header_ = make(http.Header)
19110	}
19111	return c.header_
19112}
19113
19114func (c *ProjectsLocationsProductsReferenceImagesCreateCall) doRequest(alt string) (*http.Response, error) {
19115	reqHeaders := make(http.Header)
19116	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
19117	for k, v := range c.header_ {
19118		reqHeaders[k] = v
19119	}
19120	reqHeaders.Set("User-Agent", c.s.userAgent())
19121	var body io.Reader = nil
19122	body, err := googleapi.WithoutDataWrapper.JSONReader(c.referenceimage)
19123	if err != nil {
19124		return nil, err
19125	}
19126	reqHeaders.Set("Content-Type", "application/json")
19127	c.urlParams_.Set("alt", alt)
19128	c.urlParams_.Set("prettyPrint", "false")
19129	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/referenceImages")
19130	urls += "?" + c.urlParams_.Encode()
19131	req, err := http.NewRequest("POST", urls, body)
19132	if err != nil {
19133		return nil, err
19134	}
19135	req.Header = reqHeaders
19136	googleapi.Expand(req.URL, map[string]string{
19137		"parent": c.parent,
19138	})
19139	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19140}
19141
19142// Do executes the "vision.projects.locations.products.referenceImages.create" call.
19143// Exactly one of *ReferenceImage or error will be non-nil. Any non-2xx
19144// status code is an error. Response headers are in either
19145// *ReferenceImage.ServerResponse.Header or (if a response was returned
19146// at all) in error.(*googleapi.Error).Header. Use
19147// googleapi.IsNotModified to check whether the returned error was
19148// because http.StatusNotModified was returned.
19149func (c *ProjectsLocationsProductsReferenceImagesCreateCall) Do(opts ...googleapi.CallOption) (*ReferenceImage, error) {
19150	gensupport.SetOptions(c.urlParams_, opts...)
19151	res, err := c.doRequest("json")
19152	if res != nil && res.StatusCode == http.StatusNotModified {
19153		if res.Body != nil {
19154			res.Body.Close()
19155		}
19156		return nil, &googleapi.Error{
19157			Code:   res.StatusCode,
19158			Header: res.Header,
19159		}
19160	}
19161	if err != nil {
19162		return nil, err
19163	}
19164	defer googleapi.CloseBody(res)
19165	if err := googleapi.CheckResponse(res); err != nil {
19166		return nil, err
19167	}
19168	ret := &ReferenceImage{
19169		ServerResponse: googleapi.ServerResponse{
19170			Header:         res.Header,
19171			HTTPStatusCode: res.StatusCode,
19172		},
19173	}
19174	target := &ret
19175	if err := gensupport.DecodeResponse(target, res); err != nil {
19176		return nil, err
19177	}
19178	return ret, nil
19179	// {
19180	//   "description": "Creates and returns a new ReferenceImage resource. The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will try to detect regions of interest in the image that are compatible with the product_category on the parent product. If it is specified, detection is ALWAYS skipped. The system converts polygons into non-rotated rectangles. Note that the pipeline will resize the image if the image resolution is too large to process (above 50MP). Possible errors: * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. * Returns INVALID_ARGUMENT if the product does not exist. * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with the parent product's product_category is detected. * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.",
19181	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products/{productsId}/referenceImages",
19182	//   "httpMethod": "POST",
19183	//   "id": "vision.projects.locations.products.referenceImages.create",
19184	//   "parameterOrder": [
19185	//     "parent"
19186	//   ],
19187	//   "parameters": {
19188	//     "parent": {
19189	//       "description": "Required. Resource name of the product in which to create the reference image. Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.",
19190	//       "location": "path",
19191	//       "pattern": "^projects/[^/]+/locations/[^/]+/products/[^/]+$",
19192	//       "required": true,
19193	//       "type": "string"
19194	//     },
19195	//     "referenceImageId": {
19196	//       "description": "A user-supplied resource id for the ReferenceImage to be added. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character `/`.",
19197	//       "location": "query",
19198	//       "type": "string"
19199	//     }
19200	//   },
19201	//   "path": "v1/{+parent}/referenceImages",
19202	//   "request": {
19203	//     "$ref": "ReferenceImage"
19204	//   },
19205	//   "response": {
19206	//     "$ref": "ReferenceImage"
19207	//   },
19208	//   "scopes": [
19209	//     "https://www.googleapis.com/auth/cloud-platform",
19210	//     "https://www.googleapis.com/auth/cloud-vision"
19211	//   ]
19212	// }
19213
19214}
19215
19216// method id "vision.projects.locations.products.referenceImages.delete":
19217
19218type ProjectsLocationsProductsReferenceImagesDeleteCall struct {
19219	s          *Service
19220	name       string
19221	urlParams_ gensupport.URLParams
19222	ctx_       context.Context
19223	header_    http.Header
19224}
19225
19226// Delete: Permanently deletes a reference image. The image metadata
19227// will be deleted right away, but search queries against ProductSets
19228// containing the image may still work until all related caches are
19229// refreshed. The actual image files are not deleted from Google Cloud
19230// Storage.
19231//
19232// - name: The resource name of the reference image to delete. Format
19233//   is:
19234//   `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceI
19235//   mages/IMAGE_ID`.
19236func (r *ProjectsLocationsProductsReferenceImagesService) Delete(name string) *ProjectsLocationsProductsReferenceImagesDeleteCall {
19237	c := &ProjectsLocationsProductsReferenceImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19238	c.name = name
19239	return c
19240}
19241
19242// Fields allows partial responses to be retrieved. See
19243// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19244// for more information.
19245func (c *ProjectsLocationsProductsReferenceImagesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductsReferenceImagesDeleteCall {
19246	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19247	return c
19248}
19249
19250// Context sets the context to be used in this call's Do method. Any
19251// pending HTTP request will be aborted if the provided context is
19252// canceled.
19253func (c *ProjectsLocationsProductsReferenceImagesDeleteCall) Context(ctx context.Context) *ProjectsLocationsProductsReferenceImagesDeleteCall {
19254	c.ctx_ = ctx
19255	return c
19256}
19257
19258// Header returns an http.Header that can be modified by the caller to
19259// add HTTP headers to the request.
19260func (c *ProjectsLocationsProductsReferenceImagesDeleteCall) Header() http.Header {
19261	if c.header_ == nil {
19262		c.header_ = make(http.Header)
19263	}
19264	return c.header_
19265}
19266
19267func (c *ProjectsLocationsProductsReferenceImagesDeleteCall) doRequest(alt string) (*http.Response, error) {
19268	reqHeaders := make(http.Header)
19269	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
19270	for k, v := range c.header_ {
19271		reqHeaders[k] = v
19272	}
19273	reqHeaders.Set("User-Agent", c.s.userAgent())
19274	var body io.Reader = nil
19275	c.urlParams_.Set("alt", alt)
19276	c.urlParams_.Set("prettyPrint", "false")
19277	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
19278	urls += "?" + c.urlParams_.Encode()
19279	req, err := http.NewRequest("DELETE", urls, body)
19280	if err != nil {
19281		return nil, err
19282	}
19283	req.Header = reqHeaders
19284	googleapi.Expand(req.URL, map[string]string{
19285		"name": c.name,
19286	})
19287	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19288}
19289
19290// Do executes the "vision.projects.locations.products.referenceImages.delete" call.
19291// Exactly one of *Empty or error will be non-nil. Any non-2xx status
19292// code is an error. Response headers are in either
19293// *Empty.ServerResponse.Header or (if a response was returned at all)
19294// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
19295// check whether the returned error was because http.StatusNotModified
19296// was returned.
19297func (c *ProjectsLocationsProductsReferenceImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
19298	gensupport.SetOptions(c.urlParams_, opts...)
19299	res, err := c.doRequest("json")
19300	if res != nil && res.StatusCode == http.StatusNotModified {
19301		if res.Body != nil {
19302			res.Body.Close()
19303		}
19304		return nil, &googleapi.Error{
19305			Code:   res.StatusCode,
19306			Header: res.Header,
19307		}
19308	}
19309	if err != nil {
19310		return nil, err
19311	}
19312	defer googleapi.CloseBody(res)
19313	if err := googleapi.CheckResponse(res); err != nil {
19314		return nil, err
19315	}
19316	ret := &Empty{
19317		ServerResponse: googleapi.ServerResponse{
19318			Header:         res.Header,
19319			HTTPStatusCode: res.StatusCode,
19320		},
19321	}
19322	target := &ret
19323	if err := gensupport.DecodeResponse(target, res); err != nil {
19324		return nil, err
19325	}
19326	return ret, nil
19327	// {
19328	//   "description": "Permanently deletes a reference image. The image metadata will be deleted right away, but search queries against ProductSets containing the image may still work until all related caches are refreshed. The actual image files are not deleted from Google Cloud Storage.",
19329	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products/{productsId}/referenceImages/{referenceImagesId}",
19330	//   "httpMethod": "DELETE",
19331	//   "id": "vision.projects.locations.products.referenceImages.delete",
19332	//   "parameterOrder": [
19333	//     "name"
19334	//   ],
19335	//   "parameters": {
19336	//     "name": {
19337	//       "description": "Required. The resource name of the reference image to delete. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`",
19338	//       "location": "path",
19339	//       "pattern": "^projects/[^/]+/locations/[^/]+/products/[^/]+/referenceImages/[^/]+$",
19340	//       "required": true,
19341	//       "type": "string"
19342	//     }
19343	//   },
19344	//   "path": "v1/{+name}",
19345	//   "response": {
19346	//     "$ref": "Empty"
19347	//   },
19348	//   "scopes": [
19349	//     "https://www.googleapis.com/auth/cloud-platform",
19350	//     "https://www.googleapis.com/auth/cloud-vision"
19351	//   ]
19352	// }
19353
19354}
19355
19356// method id "vision.projects.locations.products.referenceImages.get":
19357
19358type ProjectsLocationsProductsReferenceImagesGetCall struct {
19359	s            *Service
19360	name         string
19361	urlParams_   gensupport.URLParams
19362	ifNoneMatch_ string
19363	ctx_         context.Context
19364	header_      http.Header
19365}
19366
19367// Get: Gets information associated with a ReferenceImage. Possible
19368// errors: * Returns NOT_FOUND if the specified image does not exist.
19369//
19370// - name: The resource name of the ReferenceImage to get. Format is:
19371//   `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceI
19372//   mages/IMAGE_ID`.
19373func (r *ProjectsLocationsProductsReferenceImagesService) Get(name string) *ProjectsLocationsProductsReferenceImagesGetCall {
19374	c := &ProjectsLocationsProductsReferenceImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19375	c.name = name
19376	return c
19377}
19378
19379// Fields allows partial responses to be retrieved. See
19380// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19381// for more information.
19382func (c *ProjectsLocationsProductsReferenceImagesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductsReferenceImagesGetCall {
19383	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19384	return c
19385}
19386
19387// IfNoneMatch sets the optional parameter which makes the operation
19388// fail if the object's ETag matches the given value. This is useful for
19389// getting updates only after the object has changed since the last
19390// request. Use googleapi.IsNotModified to check whether the response
19391// error from Do is the result of In-None-Match.
19392func (c *ProjectsLocationsProductsReferenceImagesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsProductsReferenceImagesGetCall {
19393	c.ifNoneMatch_ = entityTag
19394	return c
19395}
19396
19397// Context sets the context to be used in this call's Do method. Any
19398// pending HTTP request will be aborted if the provided context is
19399// canceled.
19400func (c *ProjectsLocationsProductsReferenceImagesGetCall) Context(ctx context.Context) *ProjectsLocationsProductsReferenceImagesGetCall {
19401	c.ctx_ = ctx
19402	return c
19403}
19404
19405// Header returns an http.Header that can be modified by the caller to
19406// add HTTP headers to the request.
19407func (c *ProjectsLocationsProductsReferenceImagesGetCall) Header() http.Header {
19408	if c.header_ == nil {
19409		c.header_ = make(http.Header)
19410	}
19411	return c.header_
19412}
19413
19414func (c *ProjectsLocationsProductsReferenceImagesGetCall) doRequest(alt string) (*http.Response, error) {
19415	reqHeaders := make(http.Header)
19416	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
19417	for k, v := range c.header_ {
19418		reqHeaders[k] = v
19419	}
19420	reqHeaders.Set("User-Agent", c.s.userAgent())
19421	if c.ifNoneMatch_ != "" {
19422		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19423	}
19424	var body io.Reader = nil
19425	c.urlParams_.Set("alt", alt)
19426	c.urlParams_.Set("prettyPrint", "false")
19427	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
19428	urls += "?" + c.urlParams_.Encode()
19429	req, err := http.NewRequest("GET", urls, body)
19430	if err != nil {
19431		return nil, err
19432	}
19433	req.Header = reqHeaders
19434	googleapi.Expand(req.URL, map[string]string{
19435		"name": c.name,
19436	})
19437	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19438}
19439
19440// Do executes the "vision.projects.locations.products.referenceImages.get" call.
19441// Exactly one of *ReferenceImage or error will be non-nil. Any non-2xx
19442// status code is an error. Response headers are in either
19443// *ReferenceImage.ServerResponse.Header or (if a response was returned
19444// at all) in error.(*googleapi.Error).Header. Use
19445// googleapi.IsNotModified to check whether the returned error was
19446// because http.StatusNotModified was returned.
19447func (c *ProjectsLocationsProductsReferenceImagesGetCall) Do(opts ...googleapi.CallOption) (*ReferenceImage, error) {
19448	gensupport.SetOptions(c.urlParams_, opts...)
19449	res, err := c.doRequest("json")
19450	if res != nil && res.StatusCode == http.StatusNotModified {
19451		if res.Body != nil {
19452			res.Body.Close()
19453		}
19454		return nil, &googleapi.Error{
19455			Code:   res.StatusCode,
19456			Header: res.Header,
19457		}
19458	}
19459	if err != nil {
19460		return nil, err
19461	}
19462	defer googleapi.CloseBody(res)
19463	if err := googleapi.CheckResponse(res); err != nil {
19464		return nil, err
19465	}
19466	ret := &ReferenceImage{
19467		ServerResponse: googleapi.ServerResponse{
19468			Header:         res.Header,
19469			HTTPStatusCode: res.StatusCode,
19470		},
19471	}
19472	target := &ret
19473	if err := gensupport.DecodeResponse(target, res); err != nil {
19474		return nil, err
19475	}
19476	return ret, nil
19477	// {
19478	//   "description": "Gets information associated with a ReferenceImage. Possible errors: * Returns NOT_FOUND if the specified image does not exist.",
19479	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products/{productsId}/referenceImages/{referenceImagesId}",
19480	//   "httpMethod": "GET",
19481	//   "id": "vision.projects.locations.products.referenceImages.get",
19482	//   "parameterOrder": [
19483	//     "name"
19484	//   ],
19485	//   "parameters": {
19486	//     "name": {
19487	//       "description": "Required. The resource name of the ReferenceImage to get. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.",
19488	//       "location": "path",
19489	//       "pattern": "^projects/[^/]+/locations/[^/]+/products/[^/]+/referenceImages/[^/]+$",
19490	//       "required": true,
19491	//       "type": "string"
19492	//     }
19493	//   },
19494	//   "path": "v1/{+name}",
19495	//   "response": {
19496	//     "$ref": "ReferenceImage"
19497	//   },
19498	//   "scopes": [
19499	//     "https://www.googleapis.com/auth/cloud-platform",
19500	//     "https://www.googleapis.com/auth/cloud-vision"
19501	//   ]
19502	// }
19503
19504}
19505
19506// method id "vision.projects.locations.products.referenceImages.list":
19507
19508type ProjectsLocationsProductsReferenceImagesListCall struct {
19509	s            *Service
19510	parent       string
19511	urlParams_   gensupport.URLParams
19512	ifNoneMatch_ string
19513	ctx_         context.Context
19514	header_      http.Header
19515}
19516
19517// List: Lists reference images. Possible errors: * Returns NOT_FOUND if
19518// the parent product does not exist. * Returns INVALID_ARGUMENT if the
19519// page_size is greater than 100, or less than 1.
19520//
19521// - parent: Resource name of the product containing the reference
19522//   images. Format is
19523//   `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.
19524func (r *ProjectsLocationsProductsReferenceImagesService) List(parent string) *ProjectsLocationsProductsReferenceImagesListCall {
19525	c := &ProjectsLocationsProductsReferenceImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19526	c.parent = parent
19527	return c
19528}
19529
19530// PageSize sets the optional parameter "pageSize": The maximum number
19531// of items to return. Default 10, maximum 100.
19532func (c *ProjectsLocationsProductsReferenceImagesListCall) PageSize(pageSize int64) *ProjectsLocationsProductsReferenceImagesListCall {
19533	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
19534	return c
19535}
19536
19537// PageToken sets the optional parameter "pageToken": A token
19538// identifying a page of results to be returned. This is the value of
19539// `nextPageToken` returned in a previous reference image list request.
19540// Defaults to the first page if not specified.
19541func (c *ProjectsLocationsProductsReferenceImagesListCall) PageToken(pageToken string) *ProjectsLocationsProductsReferenceImagesListCall {
19542	c.urlParams_.Set("pageToken", pageToken)
19543	return c
19544}
19545
19546// Fields allows partial responses to be retrieved. See
19547// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19548// for more information.
19549func (c *ProjectsLocationsProductsReferenceImagesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsProductsReferenceImagesListCall {
19550	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19551	return c
19552}
19553
19554// IfNoneMatch sets the optional parameter which makes the operation
19555// fail if the object's ETag matches the given value. This is useful for
19556// getting updates only after the object has changed since the last
19557// request. Use googleapi.IsNotModified to check whether the response
19558// error from Do is the result of In-None-Match.
19559func (c *ProjectsLocationsProductsReferenceImagesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsProductsReferenceImagesListCall {
19560	c.ifNoneMatch_ = entityTag
19561	return c
19562}
19563
19564// Context sets the context to be used in this call's Do method. Any
19565// pending HTTP request will be aborted if the provided context is
19566// canceled.
19567func (c *ProjectsLocationsProductsReferenceImagesListCall) Context(ctx context.Context) *ProjectsLocationsProductsReferenceImagesListCall {
19568	c.ctx_ = ctx
19569	return c
19570}
19571
19572// Header returns an http.Header that can be modified by the caller to
19573// add HTTP headers to the request.
19574func (c *ProjectsLocationsProductsReferenceImagesListCall) Header() http.Header {
19575	if c.header_ == nil {
19576		c.header_ = make(http.Header)
19577	}
19578	return c.header_
19579}
19580
19581func (c *ProjectsLocationsProductsReferenceImagesListCall) doRequest(alt string) (*http.Response, error) {
19582	reqHeaders := make(http.Header)
19583	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
19584	for k, v := range c.header_ {
19585		reqHeaders[k] = v
19586	}
19587	reqHeaders.Set("User-Agent", c.s.userAgent())
19588	if c.ifNoneMatch_ != "" {
19589		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19590	}
19591	var body io.Reader = nil
19592	c.urlParams_.Set("alt", alt)
19593	c.urlParams_.Set("prettyPrint", "false")
19594	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/referenceImages")
19595	urls += "?" + c.urlParams_.Encode()
19596	req, err := http.NewRequest("GET", urls, body)
19597	if err != nil {
19598		return nil, err
19599	}
19600	req.Header = reqHeaders
19601	googleapi.Expand(req.URL, map[string]string{
19602		"parent": c.parent,
19603	})
19604	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19605}
19606
19607// Do executes the "vision.projects.locations.products.referenceImages.list" call.
19608// Exactly one of *ListReferenceImagesResponse or error will be non-nil.
19609// Any non-2xx status code is an error. Response headers are in either
19610// *ListReferenceImagesResponse.ServerResponse.Header or (if a response
19611// was returned at all) in error.(*googleapi.Error).Header. Use
19612// googleapi.IsNotModified to check whether the returned error was
19613// because http.StatusNotModified was returned.
19614func (c *ProjectsLocationsProductsReferenceImagesListCall) Do(opts ...googleapi.CallOption) (*ListReferenceImagesResponse, error) {
19615	gensupport.SetOptions(c.urlParams_, opts...)
19616	res, err := c.doRequest("json")
19617	if res != nil && res.StatusCode == http.StatusNotModified {
19618		if res.Body != nil {
19619			res.Body.Close()
19620		}
19621		return nil, &googleapi.Error{
19622			Code:   res.StatusCode,
19623			Header: res.Header,
19624		}
19625	}
19626	if err != nil {
19627		return nil, err
19628	}
19629	defer googleapi.CloseBody(res)
19630	if err := googleapi.CheckResponse(res); err != nil {
19631		return nil, err
19632	}
19633	ret := &ListReferenceImagesResponse{
19634		ServerResponse: googleapi.ServerResponse{
19635			Header:         res.Header,
19636			HTTPStatusCode: res.StatusCode,
19637		},
19638	}
19639	target := &ret
19640	if err := gensupport.DecodeResponse(target, res); err != nil {
19641		return nil, err
19642	}
19643	return ret, nil
19644	// {
19645	//   "description": "Lists reference images. Possible errors: * Returns NOT_FOUND if the parent product does not exist. * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1.",
19646	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products/{productsId}/referenceImages",
19647	//   "httpMethod": "GET",
19648	//   "id": "vision.projects.locations.products.referenceImages.list",
19649	//   "parameterOrder": [
19650	//     "parent"
19651	//   ],
19652	//   "parameters": {
19653	//     "pageSize": {
19654	//       "description": "The maximum number of items to return. Default 10, maximum 100.",
19655	//       "format": "int32",
19656	//       "location": "query",
19657	//       "type": "integer"
19658	//     },
19659	//     "pageToken": {
19660	//       "description": "A token identifying a page of results to be returned. This is the value of `nextPageToken` returned in a previous reference image list request. Defaults to the first page if not specified.",
19661	//       "location": "query",
19662	//       "type": "string"
19663	//     },
19664	//     "parent": {
19665	//       "description": "Required. Resource name of the product containing the reference images. Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.",
19666	//       "location": "path",
19667	//       "pattern": "^projects/[^/]+/locations/[^/]+/products/[^/]+$",
19668	//       "required": true,
19669	//       "type": "string"
19670	//     }
19671	//   },
19672	//   "path": "v1/{+parent}/referenceImages",
19673	//   "response": {
19674	//     "$ref": "ListReferenceImagesResponse"
19675	//   },
19676	//   "scopes": [
19677	//     "https://www.googleapis.com/auth/cloud-platform",
19678	//     "https://www.googleapis.com/auth/cloud-vision"
19679	//   ]
19680	// }
19681
19682}
19683
19684// Pages invokes f for each page of results.
19685// A non-nil error returned from f will halt the iteration.
19686// The provided context supersedes any context provided to the Context method.
19687func (c *ProjectsLocationsProductsReferenceImagesListCall) Pages(ctx context.Context, f func(*ListReferenceImagesResponse) error) error {
19688	c.ctx_ = ctx
19689	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
19690	for {
19691		x, err := c.Do()
19692		if err != nil {
19693			return err
19694		}
19695		if err := f(x); err != nil {
19696			return err
19697		}
19698		if x.NextPageToken == "" {
19699			return nil
19700		}
19701		c.PageToken(x.NextPageToken)
19702	}
19703}
19704
19705// method id "vision.projects.operations.get":
19706
19707type ProjectsOperationsGetCall struct {
19708	s            *Service
19709	name         string
19710	urlParams_   gensupport.URLParams
19711	ifNoneMatch_ string
19712	ctx_         context.Context
19713	header_      http.Header
19714}
19715
19716// Get: Gets the latest state of a long-running operation. Clients can
19717// use this method to poll the operation result at intervals as
19718// recommended by the API service.
19719//
19720// - name: The name of the operation resource.
19721func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall {
19722	c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
19723	c.name = name
19724	return c
19725}
19726
19727// Fields allows partial responses to be retrieved. See
19728// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
19729// for more information.
19730func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall {
19731	c.urlParams_.Set("fields", googleapi.CombineFields(s))
19732	return c
19733}
19734
19735// IfNoneMatch sets the optional parameter which makes the operation
19736// fail if the object's ETag matches the given value. This is useful for
19737// getting updates only after the object has changed since the last
19738// request. Use googleapi.IsNotModified to check whether the response
19739// error from Do is the result of In-None-Match.
19740func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall {
19741	c.ifNoneMatch_ = entityTag
19742	return c
19743}
19744
19745// Context sets the context to be used in this call's Do method. Any
19746// pending HTTP request will be aborted if the provided context is
19747// canceled.
19748func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall {
19749	c.ctx_ = ctx
19750	return c
19751}
19752
19753// Header returns an http.Header that can be modified by the caller to
19754// add HTTP headers to the request.
19755func (c *ProjectsOperationsGetCall) Header() http.Header {
19756	if c.header_ == nil {
19757		c.header_ = make(http.Header)
19758	}
19759	return c.header_
19760}
19761
19762func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
19763	reqHeaders := make(http.Header)
19764	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210410")
19765	for k, v := range c.header_ {
19766		reqHeaders[k] = v
19767	}
19768	reqHeaders.Set("User-Agent", c.s.userAgent())
19769	if c.ifNoneMatch_ != "" {
19770		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
19771	}
19772	var body io.Reader = nil
19773	c.urlParams_.Set("alt", alt)
19774	c.urlParams_.Set("prettyPrint", "false")
19775	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
19776	urls += "?" + c.urlParams_.Encode()
19777	req, err := http.NewRequest("GET", urls, body)
19778	if err != nil {
19779		return nil, err
19780	}
19781	req.Header = reqHeaders
19782	googleapi.Expand(req.URL, map[string]string{
19783		"name": c.name,
19784	})
19785	return gensupport.SendRequest(c.ctx_, c.s.client, req)
19786}
19787
19788// Do executes the "vision.projects.operations.get" call.
19789// Exactly one of *Operation or error will be non-nil. Any non-2xx
19790// status code is an error. Response headers are in either
19791// *Operation.ServerResponse.Header or (if a response was returned at
19792// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
19793// to check whether the returned error was because
19794// http.StatusNotModified was returned.
19795func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
19796	gensupport.SetOptions(c.urlParams_, opts...)
19797	res, err := c.doRequest("json")
19798	if res != nil && res.StatusCode == http.StatusNotModified {
19799		if res.Body != nil {
19800			res.Body.Close()
19801		}
19802		return nil, &googleapi.Error{
19803			Code:   res.StatusCode,
19804			Header: res.Header,
19805		}
19806	}
19807	if err != nil {
19808		return nil, err
19809	}
19810	defer googleapi.CloseBody(res)
19811	if err := googleapi.CheckResponse(res); err != nil {
19812		return nil, err
19813	}
19814	ret := &Operation{
19815		ServerResponse: googleapi.ServerResponse{
19816			Header:         res.Header,
19817			HTTPStatusCode: res.StatusCode,
19818		},
19819	}
19820	target := &ret
19821	if err := gensupport.DecodeResponse(target, res); err != nil {
19822		return nil, err
19823	}
19824	return ret, nil
19825	// {
19826	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
19827	//   "flatPath": "v1/projects/{projectsId}/operations/{operationsId}",
19828	//   "httpMethod": "GET",
19829	//   "id": "vision.projects.operations.get",
19830	//   "parameterOrder": [
19831	//     "name"
19832	//   ],
19833	//   "parameters": {
19834	//     "name": {
19835	//       "description": "The name of the operation resource.",
19836	//       "location": "path",
19837	//       "pattern": "^projects/[^/]+/operations/[^/]+$",
19838	//       "required": true,
19839	//       "type": "string"
19840	//     }
19841	//   },
19842	//   "path": "v1/{+name}",
19843	//   "response": {
19844	//     "$ref": "Operation"
19845	//   },
19846	//   "scopes": [
19847	//     "https://www.googleapis.com/auth/cloud-platform",
19848	//     "https://www.googleapis.com/auth/cloud-vision"
19849	//   ]
19850	// }
19851
19852}
19853