-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
customsearch-gen.go
1991 lines (1865 loc) · 88.7 KB
/
customsearch-gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2024 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package customsearch provides access to the Custom Search API.
//
// For product documentation, see: https://developers.google.com/custom-search/v1/introduction
//
// # Library status
//
// These client libraries are officially supported by Google. However, this
// library is considered complete and is in maintenance mode. This means
// that we will address critical bugs and security issues but will not add
// any new features.
//
// When possible, we recommend using our newer
// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
// that are still actively being worked and iterated on.
//
// # Creating a client
//
// Usage example:
//
// import "google.golang.org/api/customsearch/v1"
// ...
// ctx := context.Background()
// customsearchService, err := customsearch.NewService(ctx)
//
// In this example, Google Application Default Credentials are used for
// authentication. For information on how to create and obtain Application
// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
//
// # Other authentication options
//
// To use an API key for authentication (note: some APIs do not support API
// keys), use [google.golang.org/api/option.WithAPIKey]:
//
// customsearchService, err := customsearch.NewService(ctx, option.WithAPIKey("AIza..."))
//
// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
// flow, use [google.golang.org/api/option.WithTokenSource]:
//
// config := &oauth2.Config{...}
// // ...
// token, err := config.Exchange(ctx, ...)
// customsearchService, err := customsearch.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
//
// See [google.golang.org/api/option.ClientOption] for details on options.
package customsearch // import "google.golang.org/api/customsearch/v1"
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"net/url"
"strconv"
"strings"
googleapi "google.golang.org/api/googleapi"
internal "google.golang.org/api/internal"
gensupport "google.golang.org/api/internal/gensupport"
option "google.golang.org/api/option"
internaloption "google.golang.org/api/option/internaloption"
htransport "google.golang.org/api/transport/http"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = internaloption.WithDefaultEndpoint
var _ = internal.Version
const apiId = "customsearch:v1"
const apiName = "customsearch"
const apiVersion = "v1"
const basePath = "https://customsearch.googleapis.com/"
const basePathTemplate = "https://customsearch.UNIVERSE_DOMAIN/"
const mtlsBasePath = "https://customsearch.mtls.googleapis.com/"
// NewService creates a new Service.
func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
opts = append(opts, internaloption.EnableNewAuthLibrary())
client, endpoint, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, err
}
s, err := New(client)
if err != nil {
return nil, err
}
if endpoint != "" {
s.BasePath = endpoint
}
return s, nil
}
// New creates a new Service. It uses the provided http.Client for requests.
//
// Deprecated: please use NewService instead.
// To provide a custom HTTP client, use option.WithHTTPClient.
// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Cse = NewCseService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Cse *CseService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewCseService(s *Service) *CseService {
rs := &CseService{s: s}
rs.Siterestrict = NewCseSiterestrictService(s)
return rs
}
type CseService struct {
s *Service
Siterestrict *CseSiterestrictService
}
func NewCseSiterestrictService(s *Service) *CseSiterestrictService {
rs := &CseSiterestrictService{s: s}
return rs
}
type CseSiterestrictService struct {
s *Service
}
// Promotion: Promotion result.
type Promotion struct {
// BodyLines: An array of block objects for this promotion.
BodyLines []*PromotionBodyLines `json:"bodyLines,omitempty"`
// DisplayLink: An abridged version of this search's result URL, e.g.
// www.example.com.
DisplayLink string `json:"displayLink,omitempty"`
// HtmlTitle: The title of the promotion, in HTML.
HtmlTitle string `json:"htmlTitle,omitempty"`
// Image: Image belonging to a promotion.
Image *PromotionImage `json:"image,omitempty"`
// Link: The URL of the promotion.
Link string `json:"link,omitempty"`
// Title: The title of the promotion.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "BodyLines") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BodyLines") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s Promotion) MarshalJSON() ([]byte, error) {
type NoMethod Promotion
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// PromotionBodyLines: Block object belonging to a promotion.
type PromotionBodyLines struct {
// HtmlTitle: The block object's text in HTML, if it has text.
HtmlTitle string `json:"htmlTitle,omitempty"`
// Link: The anchor text of the block object's link, if it has a link.
Link string `json:"link,omitempty"`
// Title: The block object's text, if it has text.
Title string `json:"title,omitempty"`
// Url: The URL of the block object's link, if it has one.
Url string `json:"url,omitempty"`
// ForceSendFields is a list of field names (e.g. "HtmlTitle") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "HtmlTitle") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s PromotionBodyLines) MarshalJSON() ([]byte, error) {
type NoMethod PromotionBodyLines
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// PromotionImage: Image belonging to a promotion.
type PromotionImage struct {
// Height: Image height in pixels.
Height int64 `json:"height,omitempty"`
// Source: URL of the image for this promotion link.
Source string `json:"source,omitempty"`
// Width: Image width in pixels.
Width int64 `json:"width,omitempty"`
// ForceSendFields is a list of field names (e.g. "Height") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Height") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s PromotionImage) MarshalJSON() ([]byte, error) {
type NoMethod PromotionImage
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// Result: A custom search result.
type Result struct {
// CacheId: Indicates the ID of Google's cached version of the search result.
CacheId string `json:"cacheId,omitempty"`
// DisplayLink: An abridged version of this search result’s URL, e.g.
// www.example.com.
DisplayLink string `json:"displayLink,omitempty"`
// FileFormat: The file format of the search result.
FileFormat string `json:"fileFormat,omitempty"`
// FormattedUrl: The URL displayed after the snippet for each search result.
FormattedUrl string `json:"formattedUrl,omitempty"`
// HtmlFormattedUrl: The HTML-formatted URL displayed after the snippet for
// each search result.
HtmlFormattedUrl string `json:"htmlFormattedUrl,omitempty"`
// HtmlSnippet: The snippet of the search result, in HTML.
HtmlSnippet string `json:"htmlSnippet,omitempty"`
// HtmlTitle: The title of the search result, in HTML.
HtmlTitle string `json:"htmlTitle,omitempty"`
// Image: Image belonging to a custom search result.
Image *ResultImage `json:"image,omitempty"`
// Kind: A unique identifier for the type of current object. For this API, it
// is `customsearch#result.`
Kind string `json:"kind,omitempty"`
// Labels: Encapsulates all information about refinement labels.
Labels []*ResultLabels `json:"labels,omitempty"`
// Link: The full URL to which the search result is pointing, e.g.
// http://www.example.com/foo/bar.
Link string `json:"link,omitempty"`
// Mime: The MIME type of the search result.
Mime string `json:"mime,omitempty"`
// Pagemap: Contains PageMap
// (https://developers.google.com/custom-search/docs/structured_data#pagemaps)
// information for this search result.
Pagemap googleapi.RawMessage `json:"pagemap,omitempty"`
// Snippet: The snippet of the search result, in plain text.
Snippet string `json:"snippet,omitempty"`
// Title: The title of the search result, in plain text.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "CacheId") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CacheId") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s Result) MarshalJSON() ([]byte, error) {
type NoMethod Result
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// ResultImage: Image belonging to a custom search result.
type ResultImage struct {
// ByteSize: The size of the image, in bytes.
ByteSize int64 `json:"byteSize,omitempty"`
// ContextLink: A URL pointing to the webpage hosting the image.
ContextLink string `json:"contextLink,omitempty"`
// Height: The height of the image, in pixels.
Height int64 `json:"height,omitempty"`
// ThumbnailHeight: The height of the thumbnail image, in pixels.
ThumbnailHeight int64 `json:"thumbnailHeight,omitempty"`
// ThumbnailLink: A URL to the thumbnail image.
ThumbnailLink string `json:"thumbnailLink,omitempty"`
// ThumbnailWidth: The width of the thumbnail image, in pixels.
ThumbnailWidth int64 `json:"thumbnailWidth,omitempty"`
// Width: The width of the image, in pixels.
Width int64 `json:"width,omitempty"`
// ForceSendFields is a list of field names (e.g. "ByteSize") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ByteSize") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s ResultImage) MarshalJSON() ([]byte, error) {
type NoMethod ResultImage
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// ResultLabels: Refinement label associated with a custom search result.
type ResultLabels struct {
// DisplayName: The display name of a refinement label. This is the name you
// should display in your user interface.
DisplayName string `json:"displayName,omitempty"`
// LabelWithOp: Refinement label and the associated refinement operation.
LabelWithOp string `json:"label_with_op,omitempty"`
// Name: The name of a refinement label, which you can use to refine searches.
// Don't display this in your user interface; instead, use displayName.
Name string `json:"name,omitempty"`
// ForceSendFields is a list of field names (e.g. "DisplayName") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DisplayName") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s ResultLabels) MarshalJSON() ([]byte, error) {
type NoMethod ResultLabels
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// Search: Response to a custom search request.
type Search struct {
// Context: Metadata and refinements associated with the given search engine,
// including: * The name of the search engine that was used for the query. * A
// set of facet objects
// (https://developers.google.com/custom-search/docs/refinements#create)
// (refinements) you can use for refining a search.
Context googleapi.RawMessage `json:"context,omitempty"`
// Items: The current set of custom search results.
Items []*Result `json:"items,omitempty"`
// Kind: Unique identifier for the type of current object. For this API, it is
// customsearch#search.
Kind string `json:"kind,omitempty"`
// Promotions: The set of promotions
// (https://developers.google.com/custom-search/docs/promotions). Present only
// if the custom search engine's configuration files define any promotions for
// the given query.
Promotions []*Promotion `json:"promotions,omitempty"`
// Queries: Query metadata for the previous, current, and next pages of
// results.
Queries *SearchQueries `json:"queries,omitempty"`
// SearchInformation: Metadata about a search operation.
SearchInformation *SearchSearchInformation `json:"searchInformation,omitempty"`
// Spelling: Spell correction information for a query.
Spelling *SearchSpelling `json:"spelling,omitempty"`
// Url: OpenSearch template and URL.
Url *SearchUrl `json:"url,omitempty"`
// ServerResponse contains the HTTP response code and headers from the server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Context") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Context") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s Search) MarshalJSON() ([]byte, error) {
type NoMethod Search
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// SearchQueries: Query metadata for the previous, current, and next pages of
// results.
type SearchQueries struct {
// NextPage: Metadata representing the next page of results, if applicable.
NextPage []*SearchQueriesNextPage `json:"nextPage,omitempty"`
// PreviousPage: Metadata representing the previous page of results, if
// applicable.
PreviousPage []*SearchQueriesPreviousPage `json:"previousPage,omitempty"`
// Request: Metadata representing the current request.
Request []*SearchQueriesRequest `json:"request,omitempty"`
// ForceSendFields is a list of field names (e.g. "NextPage") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "NextPage") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s SearchQueries) MarshalJSON() ([]byte, error) {
type NoMethod SearchQueries
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// SearchQueriesNextPage: Custom search request metadata.
type SearchQueriesNextPage struct {
// Count: Number of search results returned in this set.
Count int64 `json:"count,omitempty"`
// Cr: Restricts search results to documents originating in a particular
// country. You may use Boolean operators
// (https://developers.google.com/custom-search/docs/json_api_reference#BooleanOrSearch)
// in the `cr` parameter's value. Google WebSearch determines the country of a
// document by analyzing the following: * The top-level domain (TLD) of the
// document's URL. * The geographic location of the web server's IP address.
// See Country (cr) Parameter Values
// (https://developers.google.com/custom-search/docs/json_api_reference#countryCollections)
// for a list of valid values for this parameter.
Cr string `json:"cr,omitempty"`
// Cx: The identifier of an engine created using the Programmable Search Engine
// Control Panel (https://programmablesearchengine.google.com/). This is a
// custom property not defined in the OpenSearch spec. This parameter is
// **required**.
Cx string `json:"cx,omitempty"`
// DateRestrict: Restricts results to URLs based on date. Supported values
// include: * `d[number]`: requests results from the specified number of past
// days. * `w[number]`: requests results from the specified number of past
// weeks. * `m[number]`: requests results from the specified number of past
// months. * `y[number]`: requests results from the specified number of past
// years.
DateRestrict string `json:"dateRestrict,omitempty"`
// DisableCnTwTranslation: Enables or disables the Simplified and Traditional
// Chinese Search
// (https://developers.google.com/custom-search/docs/json_api_reference#chineseSearch)
// feature. Supported values are: * `0`: enabled (default) * `1`: disabled
DisableCnTwTranslation string `json:"disableCnTwTranslation,omitempty"`
// ExactTerms: Identifies a phrase that all documents in the search results
// must contain.
ExactTerms string `json:"exactTerms,omitempty"`
// ExcludeTerms: Identifies a word or phrase that should not appear in any
// documents in the search results.
ExcludeTerms string `json:"excludeTerms,omitempty"`
// FileType: Restricts results to files of a specified extension. Filetypes
// supported by Google include: * Adobe Portable Document Format (`pdf`) *
// Adobe PostScript (`ps`) * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`,
// `wki`, `wks`, `wku`) * Lotus WordPro (`lwp`) * Macwrite (`mw`) * Microsoft
// Excel (`xls`) * Microsoft PowerPoint (`ppt`) * Microsoft Word (`doc`) *
// Microsoft Works (`wks`, `wps`, `wdb`) * Microsoft Write (`wri`) * Rich Text
// Format (`rtf`) * Shockwave Flash (`swf`) * Text (`ans`, `txt`). Additional
// filetypes may be added in the future. An up-to-date list can always be found
// in Google's file type FAQ
// (https://support.google.com/webmasters/answer/35287).
FileType string `json:"fileType,omitempty"`
// Filter: Activates or deactivates the automatic filtering of Google search
// results. See Automatic Filtering
// (https://developers.google.com/custom-search/docs/json_api_reference#automaticFiltering)
// for more information about Google's search results filters. Valid values for
// this parameter are: * `0`: Disabled * `1`: Enabled (default) **Note**: By
// default, Google applies filtering to all search results to improve the
// quality of those results.
Filter string `json:"filter,omitempty"`
// Gl: Boosts search results whose country of origin matches the parameter
// value. See Country Codes
// (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
// for a list of valid values. Specifying a `gl` parameter value in WebSearch
// requests should improve the relevance of results. This is particularly true
// for international customers and, even more specifically, for customers in
// English-speaking countries other than the United States.
Gl string `json:"gl,omitempty"`
// GoogleHost: Specifies the Google domain (for example, google.com, google.de,
// or google.fr) to which the search should be limited.
GoogleHost string `json:"googleHost,omitempty"`
// HighRange: Specifies the ending value for a search range. Use `cse:lowRange`
// and `cse:highrange` to append an inclusive search range of
// `lowRange...highRange` to the query.
HighRange string `json:"highRange,omitempty"`
// Hl: Specifies the interface language (host language) of your user interface.
// Explicitly setting this parameter improves the performance and the quality
// of your search results. See the Interface Languages
// (https://developers.google.com/custom-search/docs/json_api_reference#wsInterfaceLanguages)
// section of Internationalizing Queries and Results Presentation
// (https://developers.google.com/custom-search/docs/json_api_reference#wsInternationalizing)
// for more information, and Supported Interface Languages
// (https://developers.google.com/custom-search/docs/json_api_reference#interfaceLanguages)
// for a list of supported languages.
Hl string `json:"hl,omitempty"`
// Hq: Appends the specified query terms to the query, as if they were combined
// with a logical `AND` operator.
Hq string `json:"hq,omitempty"`
// ImgColorType: Restricts results to images of a specified color type.
// Supported values are: * `mono` (black and white) * `gray` (grayscale) *
// `color` (color)
ImgColorType string `json:"imgColorType,omitempty"`
// ImgDominantColor: Restricts results to images with a specific dominant
// color. Supported values are: * `red` * `orange` * `yellow` * `green` *
// `teal` * `blue` * `purple` * `pink` * `white` * `gray` * `black` * `brown`
ImgDominantColor string `json:"imgDominantColor,omitempty"`
// ImgSize: Restricts results to images of a specified size. Supported values
// are: * `icon` (small) * `small | medium | large | xlarge` (medium) *
// `xxlarge` (large) * `huge` (extra-large)
ImgSize string `json:"imgSize,omitempty"`
// ImgType: Restricts results to images of a specified type. Supported values
// are: * `clipart` (Clip art) * `face` (Face) * `lineart` (Line drawing) *
// `photo` (Photo) * `animated` (Animated) * `stock` (Stock)
ImgType string `json:"imgType,omitempty"`
// InputEncoding: The character encoding supported for search requests.
InputEncoding string `json:"inputEncoding,omitempty"`
// Language: The language of the search results.
Language string `json:"language,omitempty"`
// LinkSite: Specifies that all results should contain a link to a specific
// URL.
LinkSite string `json:"linkSite,omitempty"`
// LowRange: Specifies the starting value for a search range. Use
// `cse:lowRange` and `cse:highrange` to append an inclusive search range of
// `lowRange...highRange` to the query.
LowRange string `json:"lowRange,omitempty"`
// OrTerms: Provides additional search terms to check for in a document, where
// each document in the search results must contain at least one of the
// additional search terms. You can also use the Boolean OR
// (https://developers.google.com/custom-search/docs/json_api_reference#BooleanOrSearch)
// query term for this type of query.
OrTerms string `json:"orTerms,omitempty"`
// OutputEncoding: The character encoding supported for search results.
OutputEncoding string `json:"outputEncoding,omitempty"`
// RelatedSite: Specifies that all search results should be pages that are
// related to the specified URL. The parameter value should be a URL.
RelatedSite string `json:"relatedSite,omitempty"`
// Rights: Filters based on licensing. Supported values include: *
// `cc_publicdomain` * `cc_attribute` * `cc_sharealike` * `cc_noncommercial` *
// `cc_nonderived`
Rights string `json:"rights,omitempty"`
// Safe: Specifies the SafeSearch level
// (https://developers.google.com/custom-search/docs/json_api_reference#safeSearchLevels)
// used for filtering out adult results. This is a custom property not defined
// in the OpenSearch spec. Valid parameter values are: * "off": Disable
// SafeSearch * "active": Enable SafeSearch
Safe string `json:"safe,omitempty"`
// SearchTerms: The search terms entered by the user.
SearchTerms string `json:"searchTerms,omitempty"`
// SearchType: Allowed values are `web` or `image`. If unspecified, results are
// limited to webpages.
SearchType string `json:"searchType,omitempty"`
// SiteSearch: Restricts results to URLs from a specified site.
SiteSearch string `json:"siteSearch,omitempty"`
// SiteSearchFilter: Specifies whether to include or exclude results from the
// site named in the `sitesearch` parameter. Supported values are: * `i`:
// include content from site * `e`: exclude content from site
SiteSearchFilter string `json:"siteSearchFilter,omitempty"`
// Sort: Specifies that results should be sorted according to the specified
// expression. For example, sort by date.
Sort string `json:"sort,omitempty"`
// StartIndex: The index of the current set of search results into the total
// set of results, where the index of the first result is 1.
StartIndex int64 `json:"startIndex,omitempty"`
// StartPage: The page number of this set of results, where the page length is
// set by the `count` property.
StartPage int64 `json:"startPage,omitempty"`
// Title: A description of the query.
Title string `json:"title,omitempty"`
// TotalResults: Estimated number of total search results. May not be accurate.
TotalResults int64 `json:"totalResults,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Count") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s SearchQueriesNextPage) MarshalJSON() ([]byte, error) {
type NoMethod SearchQueriesNextPage
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// SearchQueriesPreviousPage: Custom search request metadata.
type SearchQueriesPreviousPage struct {
// Count: Number of search results returned in this set.
Count int64 `json:"count,omitempty"`
// Cr: Restricts search results to documents originating in a particular
// country. You may use Boolean operators
// (https://developers.google.com/custom-search/docs/json_api_reference#BooleanOrSearch)
// in the `cr` parameter's value. Google WebSearch determines the country of a
// document by analyzing the following: * The top-level domain (TLD) of the
// document's URL. * The geographic location of the web server's IP address.
// See Country (cr) Parameter Values
// (https://developers.google.com/custom-search/docs/json_api_reference#countryCollections)
// for a list of valid values for this parameter.
Cr string `json:"cr,omitempty"`
// Cx: The identifier of an engine created using the Programmable Search Engine
// Control Panel (https://programmablesearchengine.google.com/). This is a
// custom property not defined in the OpenSearch spec. This parameter is
// **required**.
Cx string `json:"cx,omitempty"`
// DateRestrict: Restricts results to URLs based on date. Supported values
// include: * `d[number]`: requests results from the specified number of past
// days. * `w[number]`: requests results from the specified number of past
// weeks. * `m[number]`: requests results from the specified number of past
// months. * `y[number]`: requests results from the specified number of past
// years.
DateRestrict string `json:"dateRestrict,omitempty"`
// DisableCnTwTranslation: Enables or disables the Simplified and Traditional
// Chinese Search
// (https://developers.google.com/custom-search/docs/json_api_reference#chineseSearch)
// feature. Supported values are: * `0`: enabled (default) * `1`: disabled
DisableCnTwTranslation string `json:"disableCnTwTranslation,omitempty"`
// ExactTerms: Identifies a phrase that all documents in the search results
// must contain.
ExactTerms string `json:"exactTerms,omitempty"`
// ExcludeTerms: Identifies a word or phrase that should not appear in any
// documents in the search results.
ExcludeTerms string `json:"excludeTerms,omitempty"`
// FileType: Restricts results to files of a specified extension. Filetypes
// supported by Google include: * Adobe Portable Document Format (`pdf`) *
// Adobe PostScript (`ps`) * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`,
// `wki`, `wks`, `wku`) * Lotus WordPro (`lwp`) * Macwrite (`mw`) * Microsoft
// Excel (`xls`) * Microsoft PowerPoint (`ppt`) * Microsoft Word (`doc`) *
// Microsoft Works (`wks`, `wps`, `wdb`) * Microsoft Write (`wri`) * Rich Text
// Format (`rtf`) * Shockwave Flash (`swf`) * Text (`ans`, `txt`). Additional
// filetypes may be added in the future. An up-to-date list can always be found
// in Google's file type FAQ
// (https://support.google.com/webmasters/answer/35287).
FileType string `json:"fileType,omitempty"`
// Filter: Activates or deactivates the automatic filtering of Google search
// results. See Automatic Filtering
// (https://developers.google.com/custom-search/docs/json_api_reference#automaticFiltering)
// for more information about Google's search results filters. Valid values for
// this parameter are: * `0`: Disabled * `1`: Enabled (default) **Note**: By
// default, Google applies filtering to all search results to improve the
// quality of those results.
Filter string `json:"filter,omitempty"`
// Gl: Boosts search results whose country of origin matches the parameter
// value. See Country Codes
// (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
// for a list of valid values. Specifying a `gl` parameter value in WebSearch
// requests should improve the relevance of results. This is particularly true
// for international customers and, even more specifically, for customers in
// English-speaking countries other than the United States.
Gl string `json:"gl,omitempty"`
// GoogleHost: Specifies the Google domain (for example, google.com, google.de,
// or google.fr) to which the search should be limited.
GoogleHost string `json:"googleHost,omitempty"`
// HighRange: Specifies the ending value for a search range. Use `cse:lowRange`
// and `cse:highrange` to append an inclusive search range of
// `lowRange...highRange` to the query.
HighRange string `json:"highRange,omitempty"`
// Hl: Specifies the interface language (host language) of your user interface.
// Explicitly setting this parameter improves the performance and the quality
// of your search results. See the Interface Languages
// (https://developers.google.com/custom-search/docs/json_api_reference#wsInterfaceLanguages)
// section of Internationalizing Queries and Results Presentation
// (https://developers.google.com/custom-search/docs/json_api_reference#wsInternationalizing)
// for more information, and Supported Interface Languages
// (https://developers.google.com/custom-search/docs/json_api_reference#interfaceLanguages)
// for a list of supported languages.
Hl string `json:"hl,omitempty"`
// Hq: Appends the specified query terms to the query, as if they were combined
// with a logical `AND` operator.
Hq string `json:"hq,omitempty"`
// ImgColorType: Restricts results to images of a specified color type.
// Supported values are: * `mono` (black and white) * `gray` (grayscale) *
// `color` (color)
ImgColorType string `json:"imgColorType,omitempty"`
// ImgDominantColor: Restricts results to images with a specific dominant
// color. Supported values are: * `red` * `orange` * `yellow` * `green` *
// `teal` * `blue` * `purple` * `pink` * `white` * `gray` * `black` * `brown`
ImgDominantColor string `json:"imgDominantColor,omitempty"`
// ImgSize: Restricts results to images of a specified size. Supported values
// are: * `icon` (small) * `small | medium | large | xlarge` (medium) *
// `xxlarge` (large) * `huge` (extra-large)
ImgSize string `json:"imgSize,omitempty"`
// ImgType: Restricts results to images of a specified type. Supported values
// are: * `clipart` (Clip art) * `face` (Face) * `lineart` (Line drawing) *
// `photo` (Photo) * `animated` (Animated) * `stock` (Stock)
ImgType string `json:"imgType,omitempty"`
// InputEncoding: The character encoding supported for search requests.
InputEncoding string `json:"inputEncoding,omitempty"`
// Language: The language of the search results.
Language string `json:"language,omitempty"`
// LinkSite: Specifies that all results should contain a link to a specific
// URL.
LinkSite string `json:"linkSite,omitempty"`
// LowRange: Specifies the starting value for a search range. Use
// `cse:lowRange` and `cse:highrange` to append an inclusive search range of
// `lowRange...highRange` to the query.
LowRange string `json:"lowRange,omitempty"`
// OrTerms: Provides additional search terms to check for in a document, where
// each document in the search results must contain at least one of the
// additional search terms. You can also use the Boolean OR
// (https://developers.google.com/custom-search/docs/json_api_reference#BooleanOrSearch)
// query term for this type of query.
OrTerms string `json:"orTerms,omitempty"`
// OutputEncoding: The character encoding supported for search results.
OutputEncoding string `json:"outputEncoding,omitempty"`
// RelatedSite: Specifies that all search results should be pages that are
// related to the specified URL. The parameter value should be a URL.
RelatedSite string `json:"relatedSite,omitempty"`
// Rights: Filters based on licensing. Supported values include: *
// `cc_publicdomain` * `cc_attribute` * `cc_sharealike` * `cc_noncommercial` *
// `cc_nonderived`
Rights string `json:"rights,omitempty"`
// Safe: Specifies the SafeSearch level
// (https://developers.google.com/custom-search/docs/json_api_reference#safeSearchLevels)
// used for filtering out adult results. This is a custom property not defined
// in the OpenSearch spec. Valid parameter values are: * "off": Disable
// SafeSearch * "active": Enable SafeSearch
Safe string `json:"safe,omitempty"`
// SearchTerms: The search terms entered by the user.
SearchTerms string `json:"searchTerms,omitempty"`
// SearchType: Allowed values are `web` or `image`. If unspecified, results are
// limited to webpages.
SearchType string `json:"searchType,omitempty"`
// SiteSearch: Restricts results to URLs from a specified site.
SiteSearch string `json:"siteSearch,omitempty"`
// SiteSearchFilter: Specifies whether to include or exclude results from the
// site named in the `sitesearch` parameter. Supported values are: * `i`:
// include content from site * `e`: exclude content from site
SiteSearchFilter string `json:"siteSearchFilter,omitempty"`
// Sort: Specifies that results should be sorted according to the specified
// expression. For example, sort by date.
Sort string `json:"sort,omitempty"`
// StartIndex: The index of the current set of search results into the total
// set of results, where the index of the first result is 1.
StartIndex int64 `json:"startIndex,omitempty"`
// StartPage: The page number of this set of results, where the page length is
// set by the `count` property.
StartPage int64 `json:"startPage,omitempty"`
// Title: A description of the query.
Title string `json:"title,omitempty"`
// TotalResults: Estimated number of total search results. May not be accurate.
TotalResults int64 `json:"totalResults,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Count") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s SearchQueriesPreviousPage) MarshalJSON() ([]byte, error) {
type NoMethod SearchQueriesPreviousPage
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// SearchQueriesRequest: Custom search request metadata.
type SearchQueriesRequest struct {
// Count: Number of search results returned in this set.
Count int64 `json:"count,omitempty"`
// Cr: Restricts search results to documents originating in a particular
// country. You may use Boolean operators
// (https://developers.google.com/custom-search/docs/json_api_reference#BooleanOrSearch)
// in the `cr` parameter's value. Google WebSearch determines the country of a
// document by analyzing the following: * The top-level domain (TLD) of the
// document's URL. * The geographic location of the web server's IP address.
// See Country (cr) Parameter Values
// (https://developers.google.com/custom-search/docs/json_api_reference#countryCollections)
// for a list of valid values for this parameter.
Cr string `json:"cr,omitempty"`
// Cx: The identifier of an engine created using the Programmable Search Engine
// Control Panel (https://programmablesearchengine.google.com/). This is a
// custom property not defined in the OpenSearch spec. This parameter is
// **required**.
Cx string `json:"cx,omitempty"`
// DateRestrict: Restricts results to URLs based on date. Supported values
// include: * `d[number]`: requests results from the specified number of past
// days. * `w[number]`: requests results from the specified number of past
// weeks. * `m[number]`: requests results from the specified number of past
// months. * `y[number]`: requests results from the specified number of past
// years.
DateRestrict string `json:"dateRestrict,omitempty"`
// DisableCnTwTranslation: Enables or disables the Simplified and Traditional
// Chinese Search
// (https://developers.google.com/custom-search/docs/json_api_reference#chineseSearch)
// feature. Supported values are: * `0`: enabled (default) * `1`: disabled
DisableCnTwTranslation string `json:"disableCnTwTranslation,omitempty"`
// ExactTerms: Identifies a phrase that all documents in the search results
// must contain.
ExactTerms string `json:"exactTerms,omitempty"`
// ExcludeTerms: Identifies a word or phrase that should not appear in any
// documents in the search results.
ExcludeTerms string `json:"excludeTerms,omitempty"`
// FileType: Restricts results to files of a specified extension. Filetypes
// supported by Google include: * Adobe Portable Document Format (`pdf`) *
// Adobe PostScript (`ps`) * Lotus 1-2-3 (`wk1`, `wk2`, `wk3`, `wk4`, `wk5`,
// `wki`, `wks`, `wku`) * Lotus WordPro (`lwp`) * Macwrite (`mw`) * Microsoft
// Excel (`xls`) * Microsoft PowerPoint (`ppt`) * Microsoft Word (`doc`) *
// Microsoft Works (`wks`, `wps`, `wdb`) * Microsoft Write (`wri`) * Rich Text
// Format (`rtf`) * Shockwave Flash (`swf`) * Text (`ans`, `txt`). Additional
// filetypes may be added in the future. An up-to-date list can always be found
// in Google's file type FAQ
// (https://support.google.com/webmasters/answer/35287).
FileType string `json:"fileType,omitempty"`
// Filter: Activates or deactivates the automatic filtering of Google search
// results. See Automatic Filtering
// (https://developers.google.com/custom-search/docs/json_api_reference#automaticFiltering)
// for more information about Google's search results filters. Valid values for
// this parameter are: * `0`: Disabled * `1`: Enabled (default) **Note**: By
// default, Google applies filtering to all search results to improve the
// quality of those results.
Filter string `json:"filter,omitempty"`
// Gl: Boosts search results whose country of origin matches the parameter
// value. See Country Codes
// (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
// for a list of valid values. Specifying a `gl` parameter value in WebSearch
// requests should improve the relevance of results. This is particularly true
// for international customers and, even more specifically, for customers in
// English-speaking countries other than the United States.
Gl string `json:"gl,omitempty"`
// GoogleHost: Specifies the Google domain (for example, google.com, google.de,
// or google.fr) to which the search should be limited.
GoogleHost string `json:"googleHost,omitempty"`
// HighRange: Specifies the ending value for a search range. Use `cse:lowRange`
// and `cse:highrange` to append an inclusive search range of
// `lowRange...highRange` to the query.
HighRange string `json:"highRange,omitempty"`
// Hl: Specifies the interface language (host language) of your user interface.
// Explicitly setting this parameter improves the performance and the quality
// of your search results. See the Interface Languages
// (https://developers.google.com/custom-search/docs/json_api_reference#wsInterfaceLanguages)
// section of Internationalizing Queries and Results Presentation
// (https://developers.google.com/custom-search/docs/json_api_reference#wsInternationalizing)
// for more information, and Supported Interface Languages
// (https://developers.google.com/custom-search/docs/json_api_reference#interfaceLanguages)
// for a list of supported languages.
Hl string `json:"hl,omitempty"`
// Hq: Appends the specified query terms to the query, as if they were combined
// with a logical `AND` operator.
Hq string `json:"hq,omitempty"`
// ImgColorType: Restricts results to images of a specified color type.
// Supported values are: * `mono` (black and white) * `gray` (grayscale) *
// `color` (color)
ImgColorType string `json:"imgColorType,omitempty"`
// ImgDominantColor: Restricts results to images with a specific dominant
// color. Supported values are: * `red` * `orange` * `yellow` * `green` *
// `teal` * `blue` * `purple` * `pink` * `white` * `gray` * `black` * `brown`
ImgDominantColor string `json:"imgDominantColor,omitempty"`
// ImgSize: Restricts results to images of a specified size. Supported values
// are: * `icon` (small) * `small | medium | large | xlarge` (medium) *
// `xxlarge` (large) * `huge` (extra-large)
ImgSize string `json:"imgSize,omitempty"`
// ImgType: Restricts results to images of a specified type. Supported values
// are: * `clipart` (Clip art) * `face` (Face) * `lineart` (Line drawing) *
// `photo` (Photo) * `animated` (Animated) * `stock` (Stock)
ImgType string `json:"imgType,omitempty"`
// InputEncoding: The character encoding supported for search requests.
InputEncoding string `json:"inputEncoding,omitempty"`
// Language: The language of the search results.
Language string `json:"language,omitempty"`
// LinkSite: Specifies that all results should contain a link to a specific
// URL.
LinkSite string `json:"linkSite,omitempty"`
// LowRange: Specifies the starting value for a search range. Use
// `cse:lowRange` and `cse:highrange` to append an inclusive search range of
// `lowRange...highRange` to the query.
LowRange string `json:"lowRange,omitempty"`
// OrTerms: Provides additional search terms to check for in a document, where
// each document in the search results must contain at least one of the
// additional search terms. You can also use the Boolean OR
// (https://developers.google.com/custom-search/docs/json_api_reference#BooleanOrSearch)
// query term for this type of query.
OrTerms string `json:"orTerms,omitempty"`
// OutputEncoding: The character encoding supported for search results.
OutputEncoding string `json:"outputEncoding,omitempty"`
// RelatedSite: Specifies that all search results should be pages that are
// related to the specified URL. The parameter value should be a URL.
RelatedSite string `json:"relatedSite,omitempty"`
// Rights: Filters based on licensing. Supported values include: *
// `cc_publicdomain` * `cc_attribute` * `cc_sharealike` * `cc_noncommercial` *
// `cc_nonderived`
Rights string `json:"rights,omitempty"`
// Safe: Specifies the SafeSearch level
// (https://developers.google.com/custom-search/docs/json_api_reference#safeSearchLevels)
// used for filtering out adult results. This is a custom property not defined
// in the OpenSearch spec. Valid parameter values are: * "off": Disable
// SafeSearch * "active": Enable SafeSearch
Safe string `json:"safe,omitempty"`
// SearchTerms: The search terms entered by the user.
SearchTerms string `json:"searchTerms,omitempty"`
// SearchType: Allowed values are `web` or `image`. If unspecified, results are
// limited to webpages.
SearchType string `json:"searchType,omitempty"`
// SiteSearch: Restricts results to URLs from a specified site.
SiteSearch string `json:"siteSearch,omitempty"`
// SiteSearchFilter: Specifies whether to include or exclude results from the
// site named in the `sitesearch` parameter. Supported values are: * `i`:
// include content from site * `e`: exclude content from site
SiteSearchFilter string `json:"siteSearchFilter,omitempty"`
// Sort: Specifies that results should be sorted according to the specified
// expression. For example, sort by date.
Sort string `json:"sort,omitempty"`
// StartIndex: The index of the current set of search results into the total
// set of results, where the index of the first result is 1.
StartIndex int64 `json:"startIndex,omitempty"`
// StartPage: The page number of this set of results, where the page length is
// set by the `count` property.
StartPage int64 `json:"startPage,omitempty"`
// Title: A description of the query.
Title string `json:"title,omitempty"`
// TotalResults: Estimated number of total search results. May not be accurate.
TotalResults int64 `json:"totalResults,omitempty,string"`
// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Count") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s SearchQueriesRequest) MarshalJSON() ([]byte, error) {
type NoMethod SearchQueriesRequest
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// SearchSearchInformation: Metadata about a search operation.
type SearchSearchInformation struct {
// FormattedSearchTime: The time taken for the server to return search results,
// formatted according to locale style.
FormattedSearchTime string `json:"formattedSearchTime,omitempty"`
// FormattedTotalResults: The total number of search results, formatted
// according to locale style.
FormattedTotalResults string `json:"formattedTotalResults,omitempty"`
// SearchTime: The time taken for the server to return search results.
SearchTime float64 `json:"searchTime,omitempty"`
// TotalResults: The total number of search results returned by the query.
TotalResults string `json:"totalResults,omitempty"`
// ForceSendFields is a list of field names (e.g. "FormattedSearchTime") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "FormattedSearchTime") to include
// in API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s SearchSearchInformation) MarshalJSON() ([]byte, error) {
type NoMethod SearchSearchInformation
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
func (s *SearchSearchInformation) UnmarshalJSON(data []byte) error {
type NoMethod SearchSearchInformation