forked from googleapis/google-api-go-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fusiontables-gen.go
5810 lines (5295 loc) · 182 KB
/
fusiontables-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 fusiontables provides access to the Fusion Tables API.
//
// See https://developers.google.com/fusiontables
//
// Usage example:
//
// import "google.golang.org/api/fusiontables/v2"
// ...
// fusiontablesService, err := fusiontables.New(oauthHttpClient)
package fusiontables // import "google.golang.org/api/fusiontables/v2"
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 = "fusiontables:v2"
const apiName = "fusiontables"
const apiVersion = "v2"
const basePath = "https://www.googleapis.com/fusiontables/v2/"
// OAuth2 scopes used by this API.
const (
// Manage your Fusion Tables
FusiontablesScope = "https://www.googleapis.com/auth/fusiontables"
// View your Fusion Tables
FusiontablesReadonlyScope = "https://www.googleapis.com/auth/fusiontables.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.Column = NewColumnService(s)
s.Query = NewQueryService(s)
s.Style = NewStyleService(s)
s.Table = NewTableService(s)
s.Task = NewTaskService(s)
s.Template = NewTemplateService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Column *ColumnService
Query *QueryService
Style *StyleService
Table *TableService
Task *TaskService
Template *TemplateService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewColumnService(s *Service) *ColumnService {
rs := &ColumnService{s: s}
return rs
}
type ColumnService struct {
s *Service
}
func NewQueryService(s *Service) *QueryService {
rs := &QueryService{s: s}
return rs
}
type QueryService struct {
s *Service
}
func NewStyleService(s *Service) *StyleService {
rs := &StyleService{s: s}
return rs
}
type StyleService struct {
s *Service
}
func NewTableService(s *Service) *TableService {
rs := &TableService{s: s}
return rs
}
type TableService struct {
s *Service
}
func NewTaskService(s *Service) *TaskService {
rs := &TaskService{s: s}
return rs
}
type TaskService struct {
s *Service
}
func NewTemplateService(s *Service) *TemplateService {
rs := &TemplateService{s: s}
return rs
}
type TemplateService struct {
s *Service
}
// Bucket: Specifies the minimum and maximum values, the color, opacity,
// icon and weight of a bucket within a StyleSetting.
type Bucket struct {
// Color: Color of line or the interior of a polygon in #RRGGBB format.
Color string `json:"color,omitempty"`
// Icon: Icon name used for a point.
Icon string `json:"icon,omitempty"`
// Max: Maximum value in the selected column for a row to be styled
// according to the bucket color, opacity, icon, or weight.
Max float64 `json:"max,omitempty"`
// Min: Minimum value in the selected column for a row to be styled
// according to the bucket color, opacity, icon, or weight.
Min float64 `json:"min,omitempty"`
// Opacity: Opacity of the color: 0.0 (transparent) to 1.0 (opaque).
Opacity float64 `json:"opacity,omitempty"`
// Weight: Width of a line (in pixels).
Weight int64 `json:"weight,omitempty"`
// ForceSendFields is a list of field names (e.g. "Color") 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 *Bucket) MarshalJSON() ([]byte, error) {
type noMethod Bucket
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// Column: Specifies the details of a column in a table.
type Column struct {
// BaseColumn: Identifier of the base column. If present, this column is
// derived from the specified base column.
BaseColumn *ColumnBaseColumn `json:"baseColumn,omitempty"`
// ColumnId: Identifier for the column.
ColumnId int64 `json:"columnId,omitempty"`
// ColumnJsonSchema: JSON schema for interpreting JSON in this column.
ColumnJsonSchema string `json:"columnJsonSchema,omitempty"`
// ColumnPropertiesJson: JSON object containing custom column
// properties.
ColumnPropertiesJson string `json:"columnPropertiesJson,omitempty"`
// Description: Column description.
Description string `json:"description,omitempty"`
// FormatPattern: Format pattern.
// Acceptable values are DT_DATE_MEDIUMe.g Dec 24, 2008 DT_DATE_SHORTfor
// example 12/24/08 DT_DATE_TIME_MEDIUMfor example Dec 24, 2008 8:30:45
// PM DT_DATE_TIME_SHORTfor example 12/24/08 8:30 PM
// DT_DAY_MONTH_2_DIGIT_YEARfor example 24/12/08
// DT_DAY_MONTH_2_DIGIT_YEAR_TIMEfor example 24/12/08 20:30
// DT_DAY_MONTH_2_DIGIT_YEAR_TIME_MERIDIANfor example 24/12/08 8:30 PM
// DT_DAY_MONTH_4_DIGIT_YEARfor example 24/12/2008
// DT_DAY_MONTH_4_DIGIT_YEAR_TIMEfor example 24/12/2008 20:30
// DT_DAY_MONTH_4_DIGIT_YEAR_TIME_MERIDIANfor example 24/12/2008 8:30 PM
// DT_ISO_YEAR_MONTH_DAYfor example 2008-12-24
// DT_ISO_YEAR_MONTH_DAY_TIMEfor example 2008-12-24 20:30:45
// DT_MONTH_DAY_4_DIGIT_YEARfor example 12/24/2008 DT_TIME_LONGfor
// example 8:30:45 PM UTC-6 DT_TIME_MEDIUMfor example 8:30:45 PM
// DT_TIME_SHORTfor example 8:30 PM DT_YEAR_ONLYfor example 2008
// HIGHLIGHT_UNTYPED_CELLSHighlight cell data that does not match the
// data type NONENo formatting (default) NUMBER_CURRENCYfor example
// $1234.56 NUMBER_DEFAULTfor example 1,234.56 NUMBER_INTEGERfor example
// 1235 NUMBER_NO_SEPARATORfor example 1234.56 NUMBER_PERCENTfor example
// 123,456% NUMBER_SCIENTIFICfor example 1E3
// STRING_EIGHT_LINE_IMAGEDisplays thumbnail images as tall as eight
// lines of text STRING_FOUR_LINE_IMAGEDisplays thumbnail images as tall
// as four lines of text STRING_JSON_TEXTAllows editing of text as JSON
// in UI STRING_JSON_LISTAllows editing of text as a JSON list in UI
// STRING_LINKTreats cell as a link (must start with http:// or
// https://) STRING_ONE_LINE_IMAGEDisplays thumbnail images as tall as
// one line of text STRING_VIDEO_OR_MAPDisplay a video or map thumbnail
FormatPattern string `json:"formatPattern,omitempty"`
// GraphPredicate: Column graph predicate.
// Used to map table to graph data model (subject,predicate,object)
// See W3C Graph-based Data Model.
GraphPredicate string `json:"graphPredicate,omitempty"`
// Kind: The kind of item this is. For a column, this is always
// fusiontables#column.
Kind string `json:"kind,omitempty"`
// Name: Name of the column.
Name string `json:"name,omitempty"`
// Type: Type of the column.
Type string `json:"type,omitempty"`
// ValidValues: List of valid values used to validate data and supply a
// drop-down list of values in the web application.
ValidValues []string `json:"validValues,omitempty"`
// ValidateData: If true, data entered via the web application is
// validated.
ValidateData bool `json:"validateData,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "BaseColumn") 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 *Column) MarshalJSON() ([]byte, error) {
type noMethod Column
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// ColumnBaseColumn: Identifier of the base column. If present, this
// column is derived from the specified base column.
type ColumnBaseColumn struct {
// ColumnId: The id of the column in the base table from which this
// column is derived.
ColumnId int64 `json:"columnId,omitempty"`
// TableIndex: Offset to the entry in the list of base tables in the
// table definition.
TableIndex int64 `json:"tableIndex,omitempty"`
// ForceSendFields is a list of field names (e.g. "ColumnId") 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 *ColumnBaseColumn) MarshalJSON() ([]byte, error) {
type noMethod ColumnBaseColumn
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// ColumnList: Represents a list of columns in a table.
type ColumnList struct {
// Items: List of all requested columns.
Items []*Column `json:"items,omitempty"`
// Kind: The kind of item this is. For a column list, this is always
// fusiontables#columnList.
Kind string `json:"kind,omitempty"`
// NextPageToken: Token used to access the next page of this result. No
// token is displayed if there are no more pages left.
NextPageToken string `json:"nextPageToken,omitempty"`
// TotalItems: Total number of columns for the table.
TotalItems int64 `json:"totalItems,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") 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 *ColumnList) MarshalJSON() ([]byte, error) {
type noMethod ColumnList
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// Geometry: Represents a Geometry object.
type Geometry struct {
// Geometries: The list of geometries in this geometry collection.
Geometries []interface{} `json:"geometries,omitempty"`
Geometry interface{} `json:"geometry,omitempty"`
// Type: Type: A collection of geometries.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Geometries") 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 *Geometry) MarshalJSON() ([]byte, error) {
type noMethod Geometry
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// Import: Represents an import request.
type Import struct {
// Kind: The kind of item this is. For an import, this is always
// fusiontables#import.
Kind string `json:"kind,omitempty"`
// NumRowsReceived: The number of rows received from the import request.
NumRowsReceived int64 `json:"numRowsReceived,omitempty,string"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Kind") 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 *Import) MarshalJSON() ([]byte, error) {
type noMethod Import
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// Line: Represents a line geometry.
type Line struct {
// Coordinates: The coordinates that define the line.
Coordinates [][]float64 `json:"coordinates,omitempty"`
// Type: Type: A line geometry.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Coordinates") 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 *Line) MarshalJSON() ([]byte, error) {
type noMethod Line
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// LineStyle: Represents a LineStyle within a StyleSetting
type LineStyle struct {
// StrokeColor: Color of the line in #RRGGBB format.
StrokeColor string `json:"strokeColor,omitempty"`
// StrokeColorStyler: Column-value, gradient or buckets styler that is
// used to determine the line color and opacity.
StrokeColorStyler *StyleFunction `json:"strokeColorStyler,omitempty"`
// StrokeOpacity: Opacity of the line : 0.0 (transparent) to 1.0
// (opaque).
StrokeOpacity float64 `json:"strokeOpacity,omitempty"`
// StrokeWeight: Width of the line in pixels.
StrokeWeight int64 `json:"strokeWeight,omitempty"`
// StrokeWeightStyler: Column-value or bucket styler that is used to
// determine the width of the line.
StrokeWeightStyler *StyleFunction `json:"strokeWeightStyler,omitempty"`
// ForceSendFields is a list of field names (e.g. "StrokeColor") 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 *LineStyle) MarshalJSON() ([]byte, error) {
type noMethod LineStyle
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// Point: Represents a point object.
type Point struct {
// Coordinates: The coordinates that define the point.
Coordinates []float64 `json:"coordinates,omitempty"`
// Type: Point: A point geometry.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Coordinates") 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 *Point) MarshalJSON() ([]byte, error) {
type noMethod Point
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// PointStyle: Represents a PointStyle within a StyleSetting
type PointStyle struct {
// IconName: Name of the icon. Use values defined in
// http://www.google.com/fusiontables/DataSource?dsrcid=308519
IconName string `json:"iconName,omitempty"`
// IconStyler: Column or a bucket value from which the icon name is to
// be determined.
IconStyler *StyleFunction `json:"iconStyler,omitempty"`
// ForceSendFields is a list of field names (e.g. "IconName") 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 *PointStyle) MarshalJSON() ([]byte, error) {
type noMethod PointStyle
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// Polygon: Represents a polygon object.
type Polygon struct {
// Coordinates: The coordinates that define the polygon.
Coordinates [][][]float64 `json:"coordinates,omitempty"`
// Type: Type: A polygon geometry.
Type string `json:"type,omitempty"`
// ForceSendFields is a list of field names (e.g. "Coordinates") 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 *Polygon) MarshalJSON() ([]byte, error) {
type noMethod Polygon
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// PolygonStyle: Represents a PolygonStyle within a StyleSetting
type PolygonStyle struct {
// FillColor: Color of the interior of the polygon in #RRGGBB format.
FillColor string `json:"fillColor,omitempty"`
// FillColorStyler: Column-value, gradient, or bucket styler that is
// used to determine the interior color and opacity of the polygon.
FillColorStyler *StyleFunction `json:"fillColorStyler,omitempty"`
// FillOpacity: Opacity of the interior of the polygon: 0.0
// (transparent) to 1.0 (opaque).
FillOpacity float64 `json:"fillOpacity,omitempty"`
// StrokeColor: Color of the polygon border in #RRGGBB format.
StrokeColor string `json:"strokeColor,omitempty"`
// StrokeColorStyler: Column-value, gradient or buckets styler that is
// used to determine the border color and opacity.
StrokeColorStyler *StyleFunction `json:"strokeColorStyler,omitempty"`
// StrokeOpacity: Opacity of the polygon border: 0.0 (transparent) to
// 1.0 (opaque).
StrokeOpacity float64 `json:"strokeOpacity,omitempty"`
// StrokeWeight: Width of the polyon border in pixels.
StrokeWeight int64 `json:"strokeWeight,omitempty"`
// StrokeWeightStyler: Column-value or bucket styler that is used to
// determine the width of the polygon border.
StrokeWeightStyler *StyleFunction `json:"strokeWeightStyler,omitempty"`
// ForceSendFields is a list of field names (e.g. "FillColor") 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 *PolygonStyle) MarshalJSON() ([]byte, error) {
type noMethod PolygonStyle
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// Sqlresponse: Represents a response to a SQL statement.
type Sqlresponse struct {
// Columns: Columns in the table.
Columns []string `json:"columns,omitempty"`
// Kind: The kind of item this is. For responses to SQL queries, this is
// always fusiontables#sqlresponse.
Kind string `json:"kind,omitempty"`
// Rows: The rows in the table. For each cell we print out whatever cell
// value (e.g., numeric, string) exists. Thus it is important that each
// cell contains only one value.
Rows [][]interface{} `json:"rows,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Columns") 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 *Sqlresponse) MarshalJSON() ([]byte, error) {
type noMethod Sqlresponse
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// StyleFunction: Represents a StyleFunction within a StyleSetting
type StyleFunction struct {
// Buckets: Bucket function that assigns a style based on the range a
// column value falls into.
Buckets []*Bucket `json:"buckets,omitempty"`
// ColumnName: Name of the column whose value is used in the style.
ColumnName string `json:"columnName,omitempty"`
// Gradient: Gradient function that interpolates a range of colors based
// on column value.
Gradient *StyleFunctionGradient `json:"gradient,omitempty"`
// Kind: Stylers can be one of three kinds: "fusiontables#fromColumn if
// the column value is to be used as is, i.e., the column values can
// have colors in #RRGGBBAA format or integer line widths or icon names;
// fusiontables#gradient if the styling of the row is to be based on
// applying the gradient function on the column value; or
// fusiontables#buckets if the styling is to based on the bucket into
// which the the column value falls.
Kind string `json:"kind,omitempty"`
// ForceSendFields is a list of field names (e.g. "Buckets") 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 *StyleFunction) MarshalJSON() ([]byte, error) {
type noMethod StyleFunction
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// StyleFunctionGradient: Gradient function that interpolates a range of
// colors based on column value.
type StyleFunctionGradient struct {
// Colors: Array with two or more colors.
Colors []*StyleFunctionGradientColors `json:"colors,omitempty"`
// Max: Higher-end of the interpolation range: rows with this value will
// be assigned to colors[n-1].
Max float64 `json:"max,omitempty"`
// Min: Lower-end of the interpolation range: rows with this value will
// be assigned to colors[0].
Min float64 `json:"min,omitempty"`
// ForceSendFields is a list of field names (e.g. "Colors") 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 *StyleFunctionGradient) MarshalJSON() ([]byte, error) {
type noMethod StyleFunctionGradient
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
type StyleFunctionGradientColors struct {
// Color: Color in #RRGGBB format.
Color string `json:"color,omitempty"`
// Opacity: Opacity of the color: 0.0 (transparent) to 1.0 (opaque).
Opacity float64 `json:"opacity,omitempty"`
// ForceSendFields is a list of field names (e.g. "Color") 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 *StyleFunctionGradientColors) MarshalJSON() ([]byte, error) {
type noMethod StyleFunctionGradientColors
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// StyleSetting: Represents a complete StyleSettings object. The primary
// key is a combination of the tableId and a styleId.
type StyleSetting struct {
// Kind: The kind of item this is. A StyleSetting contains the style
// definitions for points, lines, and polygons in a table. Since a table
// can have any one or all of them, a style definition can have point,
// line and polygon style definitions.
Kind string `json:"kind,omitempty"`
// MarkerOptions: Style definition for points in the table.
MarkerOptions *PointStyle `json:"markerOptions,omitempty"`
// Name: Optional name for the style setting.
Name string `json:"name,omitempty"`
// PolygonOptions: Style definition for polygons in the table.
PolygonOptions *PolygonStyle `json:"polygonOptions,omitempty"`
// PolylineOptions: Style definition for lines in the table.
PolylineOptions *LineStyle `json:"polylineOptions,omitempty"`
// StyleId: Identifier for the style setting (unique only within
// tables).
StyleId int64 `json:"styleId,omitempty"`
// TableId: Identifier for the table.
TableId string `json:"tableId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Kind") 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 *StyleSetting) MarshalJSON() ([]byte, error) {
type noMethod StyleSetting
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// StyleSettingList: Represents a list of styles for a given table.
type StyleSettingList struct {
// Items: All requested style settings.
Items []*StyleSetting `json:"items,omitempty"`
// Kind: The kind of item this is. For a style list, this is always
// fusiontables#styleSettingList .
Kind string `json:"kind,omitempty"`
// NextPageToken: Token used to access the next page of this result. No
// token is displayed if there are no more styles left.
NextPageToken string `json:"nextPageToken,omitempty"`
// TotalItems: Total number of styles for the table.
TotalItems int64 `json:"totalItems,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") 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 *StyleSettingList) MarshalJSON() ([]byte, error) {
type noMethod StyleSettingList
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// Table: Represents a table.
type Table struct {
// Attribution: Attribution assigned to the table.
Attribution string `json:"attribution,omitempty"`
// AttributionLink: Optional link for attribution.
AttributionLink string `json:"attributionLink,omitempty"`
// BaseTableIds: Base table identifier if this table is a view or merged
// table.
BaseTableIds []string `json:"baseTableIds,omitempty"`
// ColumnPropertiesJsonSchema: Default JSON schema for validating all
// JSON column properties.
ColumnPropertiesJsonSchema string `json:"columnPropertiesJsonSchema,omitempty"`
// Columns: Columns in the table.
Columns []*Column `json:"columns,omitempty"`
// Description: Description assigned to the table.
Description string `json:"description,omitempty"`
// IsExportable: Variable for whether table is exportable.
IsExportable bool `json:"isExportable,omitempty"`
// Kind: The kind of item this is. For a table, this is always
// fusiontables#table.
Kind string `json:"kind,omitempty"`
// Name: Name assigned to a table.
Name string `json:"name,omitempty"`
// Sql: SQL that encodes the table definition for derived tables.
Sql string `json:"sql,omitempty"`
// TableId: Encrypted unique alphanumeric identifier for the table.
TableId string `json:"tableId,omitempty"`
// TablePropertiesJson: JSON object containing custom table properties.
TablePropertiesJson string `json:"tablePropertiesJson,omitempty"`
// TablePropertiesJsonSchema: JSON schema for validating the JSON table
// properties.
TablePropertiesJsonSchema string `json:"tablePropertiesJsonSchema,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Attribution") 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 *Table) MarshalJSON() ([]byte, error) {
type noMethod Table
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// TableList: Represents a list of tables.
type TableList struct {
// Items: List of all requested tables.
Items []*Table `json:"items,omitempty"`
// Kind: The kind of item this is. For table list, this is always
// fusiontables#tableList.
Kind string `json:"kind,omitempty"`
// NextPageToken: Token used to access the next page of this result. No
// token is displayed if there are no more pages left.
NextPageToken string `json:"nextPageToken,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") 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 *TableList) MarshalJSON() ([]byte, error) {
type noMethod TableList
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// Task: A background task on a table, initiated for time- or
// resource-consuming operations such as changing column types or
// deleting all rows.
type Task struct {
// Kind: Type of the resource. This is always "fusiontables#task".
Kind string `json:"kind,omitempty"`
// Progress: Task percentage completion.
Progress string `json:"progress,omitempty"`
// Started: false while the table is busy with some other task. true if
// this background task is currently running.
Started bool `json:"started,omitempty"`
// TaskId: Identifier for the task.
TaskId int64 `json:"taskId,omitempty,string"`
// Type: Type of background task.
Type string `json:"type,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Kind") 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 *Task) MarshalJSON() ([]byte, error) {
type noMethod Task
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// TaskList: Represents a list of tasks for a table.
type TaskList struct {
// Items: List of all requested tasks.
Items []*Task `json:"items,omitempty"`
// Kind: Type of the resource. This is always "fusiontables#taskList".
Kind string `json:"kind,omitempty"`
// NextPageToken: Token used to access the next page of this result. No
// token is displayed if there are no more pages left.
NextPageToken string `json:"nextPageToken,omitempty"`
// TotalItems: Total number of tasks for the table.
TotalItems int64 `json:"totalItems,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "Items") 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 *TaskList) MarshalJSON() ([]byte, error) {
type noMethod TaskList
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// Template: Represents the contents of InfoWindow templates.
type Template struct {
// AutomaticColumnNames: List of columns from which the template is to
// be automatically constructed. Only one of body or automaticColumns
// can be specified.
AutomaticColumnNames []string `json:"automaticColumnNames,omitempty"`
// Body: Body of the template. It contains HTML with {column_name} to
// insert values from a particular column. The body is sanitized to
// remove certain tags, e.g., script. Only one of body or
// automaticColumns can be specified.
Body string `json:"body,omitempty"`
// Kind: The kind of item this is. For a template, this is always
// fusiontables#template.
Kind string `json:"kind,omitempty"`
// Name: Optional name assigned to a template.
Name string `json:"name,omitempty"`
// TableId: Identifier for the table for which the template is defined.
TableId string `json:"tableId,omitempty"`
// TemplateId: Identifier for the template, unique within the context of
// a particular table.
TemplateId int64 `json:"templateId,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g.
// "AutomaticColumnNames") 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 *Template) MarshalJSON() ([]byte, error) {
type noMethod Template
raw := noMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields)
}
// TemplateList: Represents a list of templates for a given table.
type TemplateList struct {
// Items: List of all requested templates.
Items []*Template `json:"items,omitempty"`
// Kind: The kind of item this is. For a template list, this is always
// fusiontables#templateList .
Kind string `json:"kind,omitempty"`
// NextPageToken: Token used to access the next page of this result. No
// token is displayed if there are no more pages left.
NextPageToken string `json:"nextPageToken,omitempty"`
// TotalItems: Total number of templates for the table.
TotalItems int64 `json:"totalItems,omitempty"`