forked from googleapis/google-api-go-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sheets-gen.go
6247 lines (5484 loc) · 231 KB
/
sheets-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
// Package sheets provides access to the Google Sheets API.
//
// See https://developers.google.com/sheets/
//
// Usage example:
//
// import "google.golang.org/api/sheets/v4"
// ...
// sheetsService, err := sheets.New(oauthHttpClient)
package sheets // import "google.golang.org/api/sheets/v4"
import (
"bytes"
"encoding/json"
"errors"
"fmt"
context "golang.org/x/net/context"
ctxhttp "golang.org/x/net/context/ctxhttp"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
"io"
"net/http"
"net/url"
"strconv"
"strings"
)
// 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 _ = ctxhttp.Do
const apiId = "sheets:v4"
const apiName = "sheets"
const apiVersion = "v4"
const basePath = "https://sheets.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// View and manage the files in your Google Drive
DriveScope = "https://www.googleapis.com/auth/drive"
// View the files in your Google Drive
DriveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly"
// View and manage your spreadsheets in Google Drive
SpreadsheetsScope = "https://www.googleapis.com/auth/spreadsheets"
// View your Google Spreadsheets
SpreadsheetsReadonlyScope = "https://www.googleapis.com/auth/spreadsheets.readonly"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Spreadsheets = NewSpreadsheetsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Spreadsheets *SpreadsheetsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewSpreadsheetsService(s *Service) *SpreadsheetsService {
rs := &SpreadsheetsService{s: s}
rs.Sheets = NewSpreadsheetsSheetsService(s)
rs.Values = NewSpreadsheetsValuesService(s)
return rs
}
type SpreadsheetsService struct {
s *Service
Sheets *SpreadsheetsSheetsService
Values *SpreadsheetsValuesService
}
func NewSpreadsheetsSheetsService(s *Service) *SpreadsheetsSheetsService {
rs := &SpreadsheetsSheetsService{s: s}
return rs
}
type SpreadsheetsSheetsService struct {
s *Service
}
func NewSpreadsheetsValuesService(s *Service) *SpreadsheetsValuesService {
rs := &SpreadsheetsValuesService{s: s}
return rs
}
type SpreadsheetsValuesService struct {
s *Service
}
// AddChartRequest: Adds a chart to a sheet in the spreadsheet.
type AddChartRequest struct {
// Chart: The chart that should be added to the spreadsheet, including
// the position
// where it should be placed. The chartId
// field is optional; if one is not set, an id will be randomly
// generated. (It
// is an error to specify the ID of a chart that already exists.)
Chart *EmbeddedChart `json:"chart,omitempty"`
// ForceSendFields is a list of field names (e.g. "Chart") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AddChartRequest) MarshalJSON() ([]byte, error) {
type noMethod AddChartRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AddChartResponse: The result of adding a chart to a spreadsheet.
type AddChartResponse struct {
// Chart: The newly added chart.
Chart *EmbeddedChart `json:"chart,omitempty"`
// ForceSendFields is a list of field names (e.g. "Chart") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AddChartResponse) MarshalJSON() ([]byte, error) {
type noMethod AddChartResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AddConditionalFormatRuleRequest: Adds a new conditional format rule
// at the given index.
// All subsequent rules' indexes are incremented.
type AddConditionalFormatRuleRequest struct {
// Index: The zero-based index where the rule should be inserted.
Index int64 `json:"index,omitempty"`
// Rule: The rule to add.
Rule *ConditionalFormatRule `json:"rule,omitempty"`
// ForceSendFields is a list of field names (e.g. "Index") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AddConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) {
type noMethod AddConditionalFormatRuleRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AddFilterViewRequest: Adds a filter view.
type AddFilterViewRequest struct {
// Filter: The filter to add. The filterViewId
// field is optional; if one is not set, an id will be randomly
// generated. (It
// is an error to specify the ID of a filter that already exists.)
Filter *FilterView `json:"filter,omitempty"`
// ForceSendFields is a list of field names (e.g. "Filter") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AddFilterViewRequest) MarshalJSON() ([]byte, error) {
type noMethod AddFilterViewRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AddFilterViewResponse: The result of adding a filter view.
type AddFilterViewResponse struct {
// Filter: The newly added filter view.
Filter *FilterView `json:"filter,omitempty"`
// ForceSendFields is a list of field names (e.g. "Filter") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AddFilterViewResponse) MarshalJSON() ([]byte, error) {
type noMethod AddFilterViewResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AddNamedRangeRequest: Adds a named range to the spreadsheet.
type AddNamedRangeRequest struct {
// NamedRange: The named range to add. The namedRangeId
// field is optional; if one is not set, an id will be randomly
// generated. (It
// is an error to specify the ID of a range that already exists.)
NamedRange *NamedRange `json:"namedRange,omitempty"`
// ForceSendFields is a list of field names (e.g. "NamedRange") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AddNamedRangeRequest) MarshalJSON() ([]byte, error) {
type noMethod AddNamedRangeRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AddNamedRangeResponse: The result of adding a named range.
type AddNamedRangeResponse struct {
// NamedRange: The named range to add.
NamedRange *NamedRange `json:"namedRange,omitempty"`
// ForceSendFields is a list of field names (e.g. "NamedRange") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AddNamedRangeResponse) MarshalJSON() ([]byte, error) {
type noMethod AddNamedRangeResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AddProtectedRangeRequest: Adds a new protected range.
type AddProtectedRangeRequest struct {
// ProtectedRange: The protected range to be added. The
// protectedRangeId field is optional; if
// one is not set, an id will be randomly generated. (It is an error
// to
// specify the ID of a range that already exists.)
ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"`
// ForceSendFields is a list of field names (e.g. "ProtectedRange") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AddProtectedRangeRequest) MarshalJSON() ([]byte, error) {
type noMethod AddProtectedRangeRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AddProtectedRangeResponse: The result of adding a new protected
// range.
type AddProtectedRangeResponse struct {
// ProtectedRange: The newly added protected range.
ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"`
// ForceSendFields is a list of field names (e.g. "ProtectedRange") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AddProtectedRangeResponse) MarshalJSON() ([]byte, error) {
type noMethod AddProtectedRangeResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AddSheetRequest: Adds a new sheet.
// When a sheet is added at a given index,
// all subsequent sheets' indexes are incremented.
// To add an object sheet, use AddChartRequest instead and
// specify
// EmbeddedObjectPosition.sheetId or
// EmbeddedObjectPosition.newSheet.
type AddSheetRequest struct {
// Properties: The properties the new sheet should have.
// All properties are optional.
// The sheetId field is optional; if one is not
// set, an id will be randomly generated. (It is an error to specify the
// ID
// of a sheet that already exists.)
Properties *SheetProperties `json:"properties,omitempty"`
// ForceSendFields is a list of field names (e.g. "Properties") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AddSheetRequest) MarshalJSON() ([]byte, error) {
type noMethod AddSheetRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AddSheetResponse: The result of adding a sheet.
type AddSheetResponse struct {
// Properties: The properties of the newly added sheet.
Properties *SheetProperties `json:"properties,omitempty"`
// ForceSendFields is a list of field names (e.g. "Properties") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AddSheetResponse) MarshalJSON() ([]byte, error) {
type noMethod AddSheetResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AppendCellsRequest: Adds new cells after the last row with data in a
// sheet,
// inserting new rows into the sheet if necessary.
type AppendCellsRequest struct {
// Fields: The fields of CellData that should be updated.
// At least one field must be specified.
// The root is the CellData; 'row.values.' should not be specified.
// A single "*" can be used as short-hand for listing every field.
Fields string `json:"fields,omitempty"`
// Rows: The data to append.
Rows []*RowData `json:"rows,omitempty"`
// SheetId: The sheet ID to append the data to.
SheetId int64 `json:"sheetId,omitempty"`
// ForceSendFields is a list of field names (e.g. "Fields") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AppendCellsRequest) MarshalJSON() ([]byte, error) {
type noMethod AppendCellsRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AppendDimensionRequest: Appends rows or columns to the end of a
// sheet.
type AppendDimensionRequest struct {
// Dimension: Whether rows or columns should be appended.
//
// Possible values:
// "DIMENSION_UNSPECIFIED" - The default value, do not use.
// "ROWS" - Operates on the rows of a sheet.
// "COLUMNS" - Operates on the columns of a sheet.
Dimension string `json:"dimension,omitempty"`
// Length: The number of rows or columns to append.
Length int64 `json:"length,omitempty"`
// SheetId: The sheet to append rows or columns to.
SheetId int64 `json:"sheetId,omitempty"`
// ForceSendFields is a list of field names (e.g. "Dimension") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AppendDimensionRequest) MarshalJSON() ([]byte, error) {
type noMethod AppendDimensionRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AppendValuesResponse: The response when updating a range of values in
// a spreadsheet.
type AppendValuesResponse struct {
// SpreadsheetId: The spreadsheet the updates were applied to.
SpreadsheetId string `json:"spreadsheetId,omitempty"`
// TableRange: The range (in A1 notation) of the table that values are
// being appended to
// (before the values were appended).
// Empty if no table was found.
TableRange string `json:"tableRange,omitempty"`
// Updates: Information about the updates that were applied.
Updates *UpdateValuesResponse `json:"updates,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "SpreadsheetId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AppendValuesResponse) MarshalJSON() ([]byte, error) {
type noMethod AppendValuesResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AutoFillRequest: Fills in more data based on existing data.
type AutoFillRequest struct {
// Range: The range to autofill. This will examine the range and
// detect
// the location that has data and automatically fill that data
// in to the rest of the range.
Range *GridRange `json:"range,omitempty"`
// SourceAndDestination: The source and destination areas to
// autofill.
// This explicitly lists the source of the autofill and where to
// extend that data.
SourceAndDestination *SourceAndDestination `json:"sourceAndDestination,omitempty"`
// UseAlternateSeries: True if we should generate data with the
// "alternate" series.
// This differs based on the type and amount of source data.
UseAlternateSeries bool `json:"useAlternateSeries,omitempty"`
// ForceSendFields is a list of field names (e.g. "Range") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AutoFillRequest) MarshalJSON() ([]byte, error) {
type noMethod AutoFillRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// AutoResizeDimensionsRequest: Automatically resizes one or more
// dimensions based on the contents
// of the cells in that dimension.
type AutoResizeDimensionsRequest struct {
// Dimensions: The dimensions to automatically resize.
// Only COLUMNS are supported.
Dimensions *DimensionRange `json:"dimensions,omitempty"`
// ForceSendFields is a list of field names (e.g. "Dimensions") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *AutoResizeDimensionsRequest) MarshalJSON() ([]byte, error) {
type noMethod AutoResizeDimensionsRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// BasicChartAxis: An axis of the chart.
// A chart may not have more than one axis per
// axis position.
type BasicChartAxis struct {
// Format: The format of the title.
// Only valid if the axis is not associated with the domain.
Format *TextFormat `json:"format,omitempty"`
// Position: The position of this axis.
//
// Possible values:
// "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" - Default value, do not
// use.
// "BOTTOM_AXIS" - The axis rendered at the bottom of a chart.
// For most charts, this is the standard major axis.
// For bar charts, this is a minor axis.
// "LEFT_AXIS" - The axis rendered at the left of a chart.
// For most charts, this is a minor axis.
// For bar charts, this is the standard major axis.
// "RIGHT_AXIS" - The axis rendered at the right of a chart.
// For most charts, this is a minor axis.
// For bar charts, this is an unusual major axis.
Position string `json:"position,omitempty"`
// Title: The title of this axis. If set, this overrides any title
// inferred
// from headers of the data.
Title string `json:"title,omitempty"`
// ForceSendFields is a list of field names (e.g. "Format") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *BasicChartAxis) MarshalJSON() ([]byte, error) {
type noMethod BasicChartAxis
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// BasicChartDomain: The domain of a chart.
// For example, if charting stock prices over time, this would be the
// date.
type BasicChartDomain struct {
// Domain: The data of the domain. For example, if charting stock prices
// over time,
// this is the data representing the dates.
Domain *ChartData `json:"domain,omitempty"`
// ForceSendFields is a list of field names (e.g. "Domain") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *BasicChartDomain) MarshalJSON() ([]byte, error) {
type noMethod BasicChartDomain
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// BasicChartSeries: A single series of data in a chart.
// For example, if charting stock prices over time, multiple series may
// exist,
// one for the "Open Price", "High Price", "Low Price" and "Close
// Price".
type BasicChartSeries struct {
// Series: The data being visualized in this chart series.
Series *ChartData `json:"series,omitempty"`
// TargetAxis: The minor axis that will specify the range of values for
// this series.
// For example, if charting stocks over time, the "Volume" series
// may want to be pinned to the right with the prices pinned to the
// left,
// because the scale of trading volume is different than the scale
// of
// prices.
// It is an error to specify an axis that isn't a valid minor axis
// for the chart's type.
//
// Possible values:
// "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" - Default value, do not
// use.
// "BOTTOM_AXIS" - The axis rendered at the bottom of a chart.
// For most charts, this is the standard major axis.
// For bar charts, this is a minor axis.
// "LEFT_AXIS" - The axis rendered at the left of a chart.
// For most charts, this is a minor axis.
// For bar charts, this is the standard major axis.
// "RIGHT_AXIS" - The axis rendered at the right of a chart.
// For most charts, this is a minor axis.
// For bar charts, this is an unusual major axis.
TargetAxis string `json:"targetAxis,omitempty"`
// Type: The type of this series. Valid only if the
// chartType is
// COMBO.
// Different types will change the way the series is visualized.
// Only LINE, AREA,
// and COLUMN are supported.
//
// Possible values:
// "BASIC_CHART_TYPE_UNSPECIFIED" - Default value, do not use.
// "BAR" - A <a href="/chart/interactive/docs/gallery/barchart">bar
// chart</a>.
// "LINE" - A <a href="/chart/interactive/docs/gallery/linechart">line
// chart</a>.
// "AREA" - An <a
// href="/chart/interactive/docs/gallery/areachart">area chart</a>.
// "COLUMN" - A <a
// href="/chart/interactive/docs/gallery/columnchart">column chart</a>.
// "SCATTER" - A <a
// href="/chart/interactive/docs/gallery/scatterchart">scatter
// chart</a>.
// "COMBO" - A <a
// href="/chart/interactive/docs/gallery/combochart">combo chart</a>.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Series") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *BasicChartSeries) MarshalJSON() ([]byte, error) {
type noMethod BasicChartSeries
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// BasicChartSpec: The specification for a basic chart. See
// BasicChartType for the list
// of charts this supports.
type BasicChartSpec struct {
// Axis: The axis on the chart.
Axis []*BasicChartAxis `json:"axis,omitempty"`
// ChartType: The type of the chart.
//
// Possible values:
// "BASIC_CHART_TYPE_UNSPECIFIED" - Default value, do not use.
// "BAR" - A <a href="/chart/interactive/docs/gallery/barchart">bar
// chart</a>.
// "LINE" - A <a href="/chart/interactive/docs/gallery/linechart">line
// chart</a>.
// "AREA" - An <a
// href="/chart/interactive/docs/gallery/areachart">area chart</a>.
// "COLUMN" - A <a
// href="/chart/interactive/docs/gallery/columnchart">column chart</a>.
// "SCATTER" - A <a
// href="/chart/interactive/docs/gallery/scatterchart">scatter
// chart</a>.
// "COMBO" - A <a
// href="/chart/interactive/docs/gallery/combochart">combo chart</a>.
ChartType string `json:"chartType,omitempty"`
// Domains: The domain of data this is charting.
// Only a single domain is currently supported.
Domains []*BasicChartDomain `json:"domains,omitempty"`
// HeaderCount: The number of rows or columns in the data that are
// "headers".
// If not set, Google Sheets will guess how many rows are headers
// based
// on the data.
//
// (Note that BasicChartAxis.title may override the axis title
// inferred from the header values.)
HeaderCount int64 `json:"headerCount,omitempty"`
// LegendPosition: The position of the chart legend.
//
// Possible values:
// "BASIC_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not
// use.
// "BOTTOM_LEGEND" - The legend is rendered on the bottom of the
// chart.
// "LEFT_LEGEND" - The legend is rendered on the left of the chart.
// "RIGHT_LEGEND" - The legend is rendered on the right of the chart.
// "TOP_LEGEND" - The legend is rendered on the top of the chart.
// "NO_LEGEND" - No legend is rendered.
LegendPosition string `json:"legendPosition,omitempty"`
// Series: The data this chart is visualizing.
Series []*BasicChartSeries `json:"series,omitempty"`
// ForceSendFields is a list of field names (e.g. "Axis") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *BasicChartSpec) MarshalJSON() ([]byte, error) {
type noMethod BasicChartSpec
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// BasicFilter: The default filter associated with a sheet.
type BasicFilter struct {
// Criteria: The criteria for showing/hiding values per column.
// The map's key is the column index, and the value is the criteria
// for
// that column.
Criteria map[string]FilterCriteria `json:"criteria,omitempty"`
// Range: The range the filter covers.
Range *GridRange `json:"range,omitempty"`
// SortSpecs: The sort order per column. Later specifications are used
// when values
// are equal in the earlier specifications.
SortSpecs []*SortSpec `json:"sortSpecs,omitempty"`
// ForceSendFields is a list of field names (e.g. "Criteria") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *BasicFilter) MarshalJSON() ([]byte, error) {
type noMethod BasicFilter
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// BatchGetValuesResponse: The response when retrieving more than one
// range of values in a spreadsheet.
type BatchGetValuesResponse struct {
// SpreadsheetId: The ID of the spreadsheet the data was retrieved from.
SpreadsheetId string `json:"spreadsheetId,omitempty"`
// ValueRanges: The requested values. The order of the ValueRanges is
// the same as the
// order of the requested ranges.
ValueRanges []*ValueRange `json:"valueRanges,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "SpreadsheetId") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *BatchGetValuesResponse) MarshalJSON() ([]byte, error) {
type noMethod BatchGetValuesResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// BatchUpdateSpreadsheetRequest: The request for updating any aspect of
// a spreadsheet.
type BatchUpdateSpreadsheetRequest struct {
// Requests: A list of updates to apply to the spreadsheet.
Requests []*Request `json:"requests,omitempty"`
// ForceSendFields is a list of field names (e.g. "Requests") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *BatchUpdateSpreadsheetRequest) MarshalJSON() ([]byte, error) {
type noMethod BatchUpdateSpreadsheetRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// BatchUpdateSpreadsheetResponse: The reply for batch updating a
// spreadsheet.
type BatchUpdateSpreadsheetResponse struct {
// Replies: The reply of the updates. This maps 1:1 with the updates,
// although
// replies to some requests may be empty.
Replies []*Response `json:"replies,omitempty"`
// SpreadsheetId: The spreadsheet the updates were applied to.
SpreadsheetId string `json:"spreadsheetId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Replies") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *BatchUpdateSpreadsheetResponse) MarshalJSON() ([]byte, error) {
type noMethod BatchUpdateSpreadsheetResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// BatchUpdateValuesRequest: The request for updating more than one
// range of values in a spreadsheet.
type BatchUpdateValuesRequest struct {
// Data: The new values to apply to the spreadsheet.
Data []*ValueRange `json:"data,omitempty"`
// ValueInputOption: How the input data should be interpreted.
//
// Possible values:
// "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value
// must not be used.
// "RAW" - The values the user has entered will not be parsed and will
// be stored
// as-is.
// "USER_ENTERED" - The values will be parsed as if the user typed
// them into the UI.
// Numbers will stay as numbers, but strings may be converted to
// numbers,
// dates, etc. following the same rules that are applied when
// entering
// text into a cell via the Google Sheets UI.
ValueInputOption string `json:"valueInputOption,omitempty"`
// ForceSendFields is a list of field names (e.g. "Data") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *BatchUpdateValuesRequest) MarshalJSON() ([]byte, error) {
type noMethod BatchUpdateValuesRequest
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// BatchUpdateValuesResponse: The response when updating a range of
// values in a spreadsheet.
type BatchUpdateValuesResponse struct {
// Responses: One UpdateValuesResponse per requested range, in the same
// order as
// the requests appeared.
Responses []*UpdateValuesResponse `json:"responses,omitempty"`
// SpreadsheetId: The spreadsheet the updates were applied to.
SpreadsheetId string `json:"spreadsheetId,omitempty"`
// TotalUpdatedCells: The total number of cells updated.
TotalUpdatedCells int64 `json:"totalUpdatedCells,omitempty"`
// TotalUpdatedColumns: The total number of columns where at least one
// cell in the column was
// updated.
TotalUpdatedColumns int64 `json:"totalUpdatedColumns,omitempty"`
// TotalUpdatedRows: The total number of rows where at least one cell in
// the row was updated.
TotalUpdatedRows int64 `json:"totalUpdatedRows,omitempty"`
// TotalUpdatedSheets: The total number of sheets where at least one
// cell in the sheet was
// updated.
TotalUpdatedSheets int64 `json:"totalUpdatedSheets,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Responses") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
}
func (s *BatchUpdateValuesResponse) MarshalJSON() ([]byte, error) {
type noMethod BatchUpdateValuesResponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// BooleanCondition: A condition that can evaluate to true or
// false.
// BooleanConditions are used by conditional formatting,
// data validation, and the criteria in filters.
type BooleanCondition struct {
// Type: The type of condition.
//
// Possible values:
// "CONDITION_TYPE_UNSPECIFIED" - The default value, do not use.
// "NUMBER_GREATER" - The cell's value must be greater than the
// condition's value.
// Supported by data validation, conditional formatting and
// filters.
// Requires a single ConditionValue.
// "NUMBER_GREATER_THAN_EQ" - The cell's value must be greater than or
// equal to the condition's value.
// Supported by data validation, conditional formatting and
// filters.
// Requires a single ConditionValue.
// "NUMBER_LESS" - The cell's value must be less than the condition's
// value.
// Supported by data validation, conditional formatting and
// filters.
// Requires a single ConditionValue.
// "NUMBER_LESS_THAN_EQ" - The cell's value must be less than or equal
// to the condition's value.
// Supported by data validation, conditional formatting and
// filters.
// Requires a single ConditionValue.
// "NUMBER_EQ" - The cell's value must be equal to the condition's
// value.
// Supported by data validation, conditional formatting and
// filters.
// Requires a single ConditionValue.
// "NUMBER_NOT_EQ" - The cell's value must be not equal to the
// condition's value.
// Supported by data validation, conditional formatting and
// filters.
// Requires a single ConditionValue.
// "NUMBER_BETWEEN" - The cell's value must be between the two
// condition values.
// Supported by data validation, conditional formatting and
// filters.
// Requires exactly two ConditionValues.
// "NUMBER_NOT_BETWEEN" - The cell's value must not be between the two
// condition values.
// Supported by data validation, conditional formatting and
// filters.
// Requires exactly two ConditionValues.
// "TEXT_CONTAINS" - The cell's value must contain the condition's
// value.
// Supported by data validation, conditional formatting and
// filters.
// Requires a single ConditionValue.
// "TEXT_NOT_CONTAINS" - The cell's value must not contain the
// condition's value.
// Supported by data validation, conditional formatting and
// filters.
// Requires a single ConditionValue.
// "TEXT_STARTS_WITH" - The cell's value must start with the
// condition's value.
// Supported by data validation, conditional formatting and
// filters.
// Requires a single ConditionValue.
// "TEXT_ENDS_WITH" - The cell's value must end with the condition's
// value.