This repository has been archived by the owner on Oct 3, 2019. It is now read-only.
forked from googleapis/google-api-go-client
/
mapsengine-gen.go
10381 lines (9412 loc) · 323 KB
/
mapsengine-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 mapsengine provides access to the Google Maps Engine API.
//
// See https://developers.google.com/maps-engine/
//
// Usage example:
//
// import "google.golang.org/api/mapsengine/v1"
// ...
// mapsengineService, err := mapsengine.New(oauthHttpClient)
package mapsengine
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"golang.org/x/net/context"
"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 _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Background
const apiId = "mapsengine:v1"
const apiName = "mapsengine"
const apiVersion = "v1"
const basePath = "https://www.googleapis.com/mapsengine/v1/"
// OAuth2 scopes used by this API.
const (
// View and manage your Google My Maps data
MapsengineScope = "https://www.googleapis.com/auth/mapsengine"
// View your Google My Maps data
MapsengineReadonlyScope = "https://www.googleapis.com/auth/mapsengine.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.Assets = NewAssetsService(s)
s.Layers = NewLayersService(s)
s.Maps = NewMapsService(s)
s.Projects = NewProjectsService(s)
s.RasterCollections = NewRasterCollectionsService(s)
s.Rasters = NewRastersService(s)
s.Tables = NewTablesService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Assets *AssetsService
Layers *LayersService
Maps *MapsService
Projects *ProjectsService
RasterCollections *RasterCollectionsService
Rasters *RastersService
Tables *TablesService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewAssetsService(s *Service) *AssetsService {
rs := &AssetsService{s: s}
rs.Parents = NewAssetsParentsService(s)
rs.Permissions = NewAssetsPermissionsService(s)
return rs
}
type AssetsService struct {
s *Service
Parents *AssetsParentsService
Permissions *AssetsPermissionsService
}
func NewAssetsParentsService(s *Service) *AssetsParentsService {
rs := &AssetsParentsService{s: s}
return rs
}
type AssetsParentsService struct {
s *Service
}
func NewAssetsPermissionsService(s *Service) *AssetsPermissionsService {
rs := &AssetsPermissionsService{s: s}
return rs
}
type AssetsPermissionsService struct {
s *Service
}
func NewLayersService(s *Service) *LayersService {
rs := &LayersService{s: s}
rs.Parents = NewLayersParentsService(s)
rs.Permissions = NewLayersPermissionsService(s)
return rs
}
type LayersService struct {
s *Service
Parents *LayersParentsService
Permissions *LayersPermissionsService
}
func NewLayersParentsService(s *Service) *LayersParentsService {
rs := &LayersParentsService{s: s}
return rs
}
type LayersParentsService struct {
s *Service
}
func NewLayersPermissionsService(s *Service) *LayersPermissionsService {
rs := &LayersPermissionsService{s: s}
return rs
}
type LayersPermissionsService struct {
s *Service
}
func NewMapsService(s *Service) *MapsService {
rs := &MapsService{s: s}
rs.Permissions = NewMapsPermissionsService(s)
return rs
}
type MapsService struct {
s *Service
Permissions *MapsPermissionsService
}
func NewMapsPermissionsService(s *Service) *MapsPermissionsService {
rs := &MapsPermissionsService{s: s}
return rs
}
type MapsPermissionsService struct {
s *Service
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Icons = NewProjectsIconsService(s)
return rs
}
type ProjectsService struct {
s *Service
Icons *ProjectsIconsService
}
func NewProjectsIconsService(s *Service) *ProjectsIconsService {
rs := &ProjectsIconsService{s: s}
return rs
}
type ProjectsIconsService struct {
s *Service
}
func NewRasterCollectionsService(s *Service) *RasterCollectionsService {
rs := &RasterCollectionsService{s: s}
rs.Parents = NewRasterCollectionsParentsService(s)
rs.Permissions = NewRasterCollectionsPermissionsService(s)
rs.Rasters = NewRasterCollectionsRastersService(s)
return rs
}
type RasterCollectionsService struct {
s *Service
Parents *RasterCollectionsParentsService
Permissions *RasterCollectionsPermissionsService
Rasters *RasterCollectionsRastersService
}
func NewRasterCollectionsParentsService(s *Service) *RasterCollectionsParentsService {
rs := &RasterCollectionsParentsService{s: s}
return rs
}
type RasterCollectionsParentsService struct {
s *Service
}
func NewRasterCollectionsPermissionsService(s *Service) *RasterCollectionsPermissionsService {
rs := &RasterCollectionsPermissionsService{s: s}
return rs
}
type RasterCollectionsPermissionsService struct {
s *Service
}
func NewRasterCollectionsRastersService(s *Service) *RasterCollectionsRastersService {
rs := &RasterCollectionsRastersService{s: s}
return rs
}
type RasterCollectionsRastersService struct {
s *Service
}
func NewRastersService(s *Service) *RastersService {
rs := &RastersService{s: s}
rs.Files = NewRastersFilesService(s)
rs.Parents = NewRastersParentsService(s)
rs.Permissions = NewRastersPermissionsService(s)
return rs
}
type RastersService struct {
s *Service
Files *RastersFilesService
Parents *RastersParentsService
Permissions *RastersPermissionsService
}
func NewRastersFilesService(s *Service) *RastersFilesService {
rs := &RastersFilesService{s: s}
return rs
}
type RastersFilesService struct {
s *Service
}
func NewRastersParentsService(s *Service) *RastersParentsService {
rs := &RastersParentsService{s: s}
return rs
}
type RastersParentsService struct {
s *Service
}
func NewRastersPermissionsService(s *Service) *RastersPermissionsService {
rs := &RastersPermissionsService{s: s}
return rs
}
type RastersPermissionsService struct {
s *Service
}
func NewTablesService(s *Service) *TablesService {
rs := &TablesService{s: s}
rs.Features = NewTablesFeaturesService(s)
rs.Files = NewTablesFilesService(s)
rs.Parents = NewTablesParentsService(s)
rs.Permissions = NewTablesPermissionsService(s)
return rs
}
type TablesService struct {
s *Service
Features *TablesFeaturesService
Files *TablesFilesService
Parents *TablesParentsService
Permissions *TablesPermissionsService
}
func NewTablesFeaturesService(s *Service) *TablesFeaturesService {
rs := &TablesFeaturesService{s: s}
return rs
}
type TablesFeaturesService struct {
s *Service
}
func NewTablesFilesService(s *Service) *TablesFilesService {
rs := &TablesFilesService{s: s}
return rs
}
type TablesFilesService struct {
s *Service
}
func NewTablesParentsService(s *Service) *TablesParentsService {
rs := &TablesParentsService{s: s}
return rs
}
type TablesParentsService struct {
s *Service
}
func NewTablesPermissionsService(s *Service) *TablesPermissionsService {
rs := &TablesPermissionsService{s: s}
return rs
}
type TablesPermissionsService struct {
s *Service
}
type AcquisitionTime struct {
// End: The end time if acquisition time is a range. The value is an RFC
// 3339 formatted date-time value (1970-01-01T00:00:00Z).
End string `json:"end,omitempty"`
// Precision: The precision of acquisition time.
//
// Possible values:
// "day"
// "hour"
// "minute"
// "month"
// "second"
// "year"
Precision string `json:"precision,omitempty"`
// Start: The acquisition time, or start time if acquisition time is a
// range. The value is an RFC 3339 formatted date-time value
// (1970-01-01T00:00:00Z).
Start string `json:"start,omitempty"`
}
type Asset struct {
// Bbox: A rectangular bounding box which contains all of the data in
// this asset. The box is expressed as \"west, south, east, north\". The
// numbers represent latitude and longitude in decimal degrees.
Bbox []float64 `json:"bbox,omitempty"`
// CreationTime: The creation time of this asset. The value is an RFC
// 3339-formatted date-time value (for example, 1970-01-01T00:00:00Z).
CreationTime string `json:"creationTime,omitempty"`
// CreatorEmail: The email address of the creator of this asset. This is
// only returned on GET requests and not LIST requests.
CreatorEmail string `json:"creatorEmail,omitempty"`
// Description: The asset's description.
Description string `json:"description,omitempty"`
// Etag: The ETag, used to refer to the current version of the asset.
Etag string `json:"etag,omitempty"`
// Id: The asset's globally unique ID.
Id string `json:"id,omitempty"`
// LastModifiedTime: The last modified time of this asset. The value is
// an RFC 3339-formatted date-time value (for example,
// 1970-01-01T00:00:00Z).
LastModifiedTime string `json:"lastModifiedTime,omitempty"`
// LastModifierEmail: The email address of the last modifier of this
// asset. This is only returned on GET requests and not LIST requests.
LastModifierEmail string `json:"lastModifierEmail,omitempty"`
// Name: The asset's name.
Name string `json:"name,omitempty"`
// ProjectId: The ID of the project to which the asset belongs.
ProjectId string `json:"projectId,omitempty"`
// Resource: The URL to query to retrieve the asset's complete object.
// The assets endpoint only returns high-level information about a
// resource.
Resource string `json:"resource,omitempty"`
// Tags: An array of text strings, with each string representing a tag.
// More information about tags can be found in the Tagging data article
// of the Maps Engine help center.
Tags []string `json:"tags,omitempty"`
// Type: The type of asset. One of raster, rasterCollection, table, map,
// or layer.
//
// Possible values:
// "layer"
// "map"
// "raster"
// "rasterCollection"
// "table"
Type string `json:"type,omitempty"`
// WritersCanEditPermissions: If true, WRITERs of the asset are able to
// edit the asset permissions.
WritersCanEditPermissions *bool `json:"writersCanEditPermissions,omitempty"`
}
type AssetsListResponse struct {
// Assets: Assets returned.
Assets []*Asset `json:"assets,omitempty"`
// NextPageToken: Next page token.
NextPageToken string `json:"nextPageToken,omitempty"`
}
type Border struct {
// Color: Color of the border.
Color string `json:"color,omitempty"`
// Opacity: Opacity of the border.
Opacity float64 `json:"opacity,omitempty"`
// Width: Width of the border, in pixels.
Width float64 `json:"width,omitempty"`
}
type Color struct {
// Color: The CSS style color, can be in format of "red" or "#7733EE".
Color string `json:"color,omitempty"`
// Opacity: Opacity ranges from 0 to 1, inclusive. If not provided,
// default to 1.
Opacity float64 `json:"opacity,omitempty"`
}
type Datasource struct {
// Id: The ID of a datasource.
Id string `json:"id,omitempty"`
}
type DisplayRule struct {
// Filters: This display rule will only be applied to features that
// match all of the filters here. If filters is empty, then the rule
// applies to all features.
Filters []*Filter `json:"filters,omitempty"`
// LineOptions: Style applied to lines. Required for LineString
// Geometry.
LineOptions *LineStyle `json:"lineOptions,omitempty"`
// Name: Display rule name. Name is not unique and cannot be used for
// identification purpose.
Name string `json:"name,omitempty"`
// PointOptions: Style applied to points. Required for Point Geometry.
PointOptions *PointStyle `json:"pointOptions,omitempty"`
// PolygonOptions: Style applied to polygons. Required for Polygon
// Geometry.
PolygonOptions *PolygonStyle `json:"polygonOptions,omitempty"`
// ZoomLevels: The zoom levels that this display rule apply.
ZoomLevels *ZoomLevels `json:"zoomLevels,omitempty"`
}
type Feature struct {
// Geometry: The geometry member of this Feature.
Geometry GeoJsonGeometry `json:"geometry,omitempty"`
// Properties: Key/value pairs of this Feature.
Properties GeoJsonProperties `json:"properties,omitempty"`
// Type: Identifies this object as a feature.
Type string `json:"type,omitempty"`
}
type FeatureInfo struct {
// Content: HTML template of the info window. If not provided, a default
// template with all attributes will be generated.
Content string `json:"content,omitempty"`
}
type FeaturesBatchDeleteRequest struct {
GxIds []string `json:"gx_ids,omitempty"`
PrimaryKeys []string `json:"primaryKeys,omitempty"`
}
type FeaturesBatchInsertRequest struct {
Features []*Feature `json:"features,omitempty"`
// NormalizeGeometries: If true, the server will normalize feature
// geometries. It is assumed that the South Pole is exterior to any
// polygons given. See here for a list of normalizations. If false, all
// feature geometries must be given already normalized. The points in
// all LinearRings must be listed in counter-clockwise order, and
// LinearRings may not intersect.
//
// Default: true
NormalizeGeometries *bool `json:"normalizeGeometries,omitempty"`
}
type FeaturesBatchPatchRequest struct {
Features []*Feature `json:"features,omitempty"`
// NormalizeGeometries: If true, the server will normalize feature
// geometries. It is assumed that the South Pole is exterior to any
// polygons given. See here for a list of normalizations. If false, all
// feature geometries must be given already normalized. The points in
// all LinearRings must be listed in counter-clockwise order, and
// LinearRings may not intersect.
//
// Default: true
NormalizeGeometries *bool `json:"normalizeGeometries,omitempty"`
}
type FeaturesListResponse struct {
// AllowedQueriesPerSecond: An indicator of the maximum rate at which
// queries may be made, if all queries were as expensive as this query.
AllowedQueriesPerSecond float64 `json:"allowedQueriesPerSecond,omitempty"`
// Features: Resources returned.
Features []*Feature `json:"features,omitempty"`
// NextPageToken: Next page token.
NextPageToken string `json:"nextPageToken,omitempty"`
// Schema: The feature schema.
Schema *Schema `json:"schema,omitempty"`
Type string `json:"type,omitempty"`
}
type File struct {
// Filename: The name of the file.
Filename string `json:"filename,omitempty"`
// Size: The size of the file in bytes.
Size int64 `json:"size,omitempty,string"`
// UploadStatus: The upload status of the file.
//
// Possible values:
// "canceled"
// "complete"
// "failed"
// "inProgress"
UploadStatus string `json:"uploadStatus,omitempty"`
}
type Filter struct {
// Column: The column name to filter on.
Column string `json:"column,omitempty"`
// Operator: Operation used to evaluate the filter.
//
// Possible values:
// "!="
// "<"
// "<="
// "=="
// ">"
// ">="
// "contains"
// "endsWith"
// "startsWith"
Operator string `json:"operator,omitempty"`
// Value: Value to be evaluated against attribute.
Value interface{} `json:"value,omitempty"`
}
type GeoJsonGeometry map[string]interface{}
func (t GeoJsonGeometry) Type() string {
return googleapi.VariantType(t)
}
func (t GeoJsonGeometry) GeometryCollection() (r GeoJsonGeometryCollection, ok bool) {
if t.Type() != "GeometryCollection" {
return r, false
}
ok = googleapi.ConvertVariant(map[string]interface{}(t), &r)
return r, ok
}
func (t GeoJsonGeometry) LineString() (r GeoJsonLineString, ok bool) {
if t.Type() != "LineString" {
return r, false
}
ok = googleapi.ConvertVariant(map[string]interface{}(t), &r)
return r, ok
}
func (t GeoJsonGeometry) MultiLineString() (r GeoJsonMultiLineString, ok bool) {
if t.Type() != "MultiLineString" {
return r, false
}
ok = googleapi.ConvertVariant(map[string]interface{}(t), &r)
return r, ok
}
func (t GeoJsonGeometry) MultiPoint() (r GeoJsonMultiPoint, ok bool) {
if t.Type() != "MultiPoint" {
return r, false
}
ok = googleapi.ConvertVariant(map[string]interface{}(t), &r)
return r, ok
}
func (t GeoJsonGeometry) MultiPolygon() (r GeoJsonMultiPolygon, ok bool) {
if t.Type() != "MultiPolygon" {
return r, false
}
ok = googleapi.ConvertVariant(map[string]interface{}(t), &r)
return r, ok
}
func (t GeoJsonGeometry) Point() (r GeoJsonPoint, ok bool) {
if t.Type() != "Point" {
return r, false
}
ok = googleapi.ConvertVariant(map[string]interface{}(t), &r)
return r, ok
}
func (t GeoJsonGeometry) Polygon() (r GeoJsonPolygon, ok bool) {
if t.Type() != "Polygon" {
return r, false
}
ok = googleapi.ConvertVariant(map[string]interface{}(t), &r)
return r, ok
}
type GeoJsonGeometryCollection struct {
// Geometries: An array of geometry objects. There must be at least 2
// different types of geometries in the array.
Geometries []GeoJsonGeometry `json:"geometries,omitempty"`
// Type: Identifies this object as a GeoJsonGeometryCollection.
//
// Possible values:
// "GeometryCollection"
Type string `json:"type,omitempty"`
}
type GeoJsonLineString struct {
// Coordinates: An array of two or more positions, representing a line.
Coordinates [][]float64 `json:"coordinates,omitempty"`
// Type: Identifies this object as a GeoJsonLineString.
//
// Possible values:
// "LineString"
Type string `json:"type,omitempty"`
}
type GeoJsonMultiLineString struct {
// Coordinates: An array of at least two GeoJsonLineString coordinate
// arrays.
Coordinates [][][]float64 `json:"coordinates,omitempty"`
// Type: Identifies this object as a GeoJsonMultiLineString.
//
// Possible values:
// "MultiLineString"
Type string `json:"type,omitempty"`
}
type GeoJsonMultiPoint struct {
// Coordinates: An array of at least two GeoJsonPoint coordinate arrays.
Coordinates [][]float64 `json:"coordinates,omitempty"`
// Type: Identifies this object as a GeoJsonMultiPoint.
//
// Possible values:
// "MultiPoint"
Type string `json:"type,omitempty"`
}
type GeoJsonMultiPolygon struct {
// Coordinates: An array of at least two GeoJsonPolygon coordinate
// arrays.
Coordinates [][][][]float64 `json:"coordinates,omitempty"`
// Type: Identifies this object as a GeoJsonMultiPolygon.
//
// Possible values:
// "MultiPolygon"
Type string `json:"type,omitempty"`
}
type GeoJsonPoint struct {
// Coordinates: A single GeoJsonPosition, specifying the location of the
// point.
Coordinates []float64 `json:"coordinates,omitempty"`
// Type: Identifies this object as a GeoJsonPoint.
//
// Possible values:
// "Point"
Type string `json:"type,omitempty"`
}
type GeoJsonPolygon struct {
// Coordinates: An array of LinearRings. A LinearRing is a
// GeoJsonLineString which is closed (that is, the first and last
// GeoJsonPositions are equal), and which contains at least four
// GeoJsonPositions. For polygons with multiple rings, the first
// LinearRing is the exterior ring, and any subsequent rings are
// interior rings (that is, holes).
Coordinates [][][]float64 `json:"coordinates,omitempty"`
// Type: Identifies this object as a GeoJsonPolygon.
//
// Possible values:
// "Polygon"
Type string `json:"type,omitempty"`
}
type GeoJsonProperties interface{}
type Icon struct {
// Description: The description of this Icon, supplied by the author.
Description string `json:"description,omitempty"`
// Id: An ID used to refer to this Icon.
Id string `json:"id,omitempty"`
// Name: The name of this Icon, supplied by the author.
Name string `json:"name,omitempty"`
}
type IconStyle struct {
// Id: Custom icon id.
Id string `json:"id,omitempty"`
// Name: Stock icon name. To use a stock icon, prefix it with 'gx_'. See
// Stock icon names for valid icon names. For example, to specify
// small_red, set name to 'gx_small_red'.
Name string `json:"name,omitempty"`
// ScaledShape: A scalable shape.
ScaledShape *ScaledShape `json:"scaledShape,omitempty"`
// ScalingFunction: The function used to scale shapes. Required when a
// scaledShape is specified.
ScalingFunction *ScalingFunction `json:"scalingFunction,omitempty"`
}
type IconsListResponse struct {
// Icons: Resources returned.
Icons []*Icon `json:"icons,omitempty"`
// NextPageToken: Next page token.
NextPageToken string `json:"nextPageToken,omitempty"`
}
type LabelStyle struct {
// Color: Color of the text. If not provided, default to black.
Color string `json:"color,omitempty"`
// Column: The column value of the feature to be displayed.
Column string `json:"column,omitempty"`
// FontStyle: Font style of the label, defaults to 'normal'.
//
// Possible values:
// "italic"
// "normal"
FontStyle string `json:"fontStyle,omitempty"`
// FontWeight: Font weight of the label, defaults to 'normal'.
//
// Possible values:
// "bold"
// "normal"
FontWeight string `json:"fontWeight,omitempty"`
// Opacity: Opacity of the text.
Opacity float64 `json:"opacity,omitempty"`
// Outline: Outline color of the text.
Outline *Color `json:"outline,omitempty"`
// Size: Font size of the label, in pixels. 8 <= size <= 15. If not
// provided, a default size will be provided.
Size float64 `json:"size,omitempty"`
}
type Layer struct {
// Bbox: A rectangular bounding box which contains all of the data in
// this Layer. The box is expressed as \"west, south, east, north\". The
// numbers represent latitude and longitude in decimal degrees.
Bbox []float64 `json:"bbox,omitempty"`
// CreationTime: The creation time of this layer. The value is an RFC
// 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z).
CreationTime string `json:"creationTime,omitempty"`
// CreatorEmail: The email address of the creator of this layer. This is
// only returned on GET requests and not LIST requests.
CreatorEmail string `json:"creatorEmail,omitempty"`
// DatasourceType: Deprecated: The type of the datasources used to build
// this Layer. Note: This has been replaced by layerType, but is still
// available for now to maintain backward compatibility.
//
// Possible values:
// "image"
// "table"
DatasourceType string `json:"datasourceType,omitempty"`
// Datasources: An array of datasources used to build this layer. If
// layerType is "image", or layerType is not specified and
// datasourceType is "image", then each element in this array is a
// reference to an Image or RasterCollection. If layerType is "vector",
// or layerType is not specified and datasourceType is "table" then each
// element in this array is a reference to a Vector Table.
Datasources []*Datasource `json:"datasources,omitempty"`
// Description: The description of this Layer, supplied by the author.
Description string `json:"description,omitempty"`
// DraftAccessList: Deprecated: The name of an access list of the Map
// Editor type. The user on whose behalf the request is being sent must
// be an editor on that access list. Note: Google Maps Engine no longer
// uses access lists. Instead, each asset has its own list of
// permissions. For backward compatibility, the API still accepts access
// lists for projects that are already using access lists. If you
// created a GME account/project after July 14th, 2014, you will not be
// able to send API requests that include access lists. Note: This is an
// input field only. It is not returned in response to a list or get
// request.
DraftAccessList string `json:"draftAccessList,omitempty"`
// Etag: The ETag, used to refer to the current version of the asset.
Etag string `json:"etag,omitempty"`
// Id: A globally unique ID, used to refer to this Layer.
Id string `json:"id,omitempty"`
// LastModifiedTime: The last modified time of this layer. The value is
// an RFC 3339 formatted date-time value (e.g. 1970-01-01T00:00:00Z).
LastModifiedTime string `json:"lastModifiedTime,omitempty"`
// LastModifierEmail: The email address of the last modifier of this
// layer. This is only returned on GET requests and not LIST requests.
LastModifierEmail string `json:"lastModifierEmail,omitempty"`
// LayerType: The type of the datasources used to build this Layer. This
// should be used instead of datasourceType. At least one of layerType
// and datasourceType and must be specified, but layerType takes
// precedence.
//
// Possible values:
// "image"
// "vector"
LayerType string `json:"layerType,omitempty"`
// Name: The name of this Layer, supplied by the author.
Name string `json:"name,omitempty"`
// ProcessingStatus: The processing status of this layer.
//
// Possible values:
// "complete"
// "failed"
// "notReady"
// "processing"
// "ready"
ProcessingStatus string `json:"processingStatus,omitempty"`
// ProjectId: The ID of the project that this Layer is in.
ProjectId string `json:"projectId,omitempty"`
// PublishedAccessList: Deprecated: The access list to whom view
// permissions are granted. The value must be the name of a Maps Engine
// access list of the Map Viewer type, and the user must be a viewer on
// that list. Note: Google Maps Engine no longer uses access lists.
// Instead, each asset has its own list of permissions. For backward
// compatibility, the API still accepts access lists for projects that
// are already using access lists. If you created a GME account/project
// after July 14th, 2014, you will not be able to send API requests that
// include access lists. Note: This is an input field only. It is not
// returned in response to a list or get request.
PublishedAccessList string `json:"publishedAccessList,omitempty"`
// PublishingStatus: The publishing status of this layer.
//
// Possible values:
// "notPublished"
// "published"
PublishingStatus string `json:"publishingStatus,omitempty"`
// Style: The styling information for a vector layer. Note: Style
// information is returned in response to a get request but not a list
// request. After requesting a list of layers, you'll need to send a get
// request to retrieve the VectorStyles for each layer.
Style *VectorStyle `json:"style,omitempty"`
// Tags: Tags of this Layer.
Tags []string `json:"tags,omitempty"`
// WritersCanEditPermissions: If true, WRITERs of the asset are able to
// edit the asset permissions.
WritersCanEditPermissions *bool `json:"writersCanEditPermissions,omitempty"`
}
type LayersListResponse struct {
// Layers: Resources returned.
Layers []*Layer `json:"layers,omitempty"`
// NextPageToken: Next page token.
NextPageToken string `json:"nextPageToken,omitempty"`
}
type LineStyle struct {
// Border: Border of the line. 0 < border.width <= 5.
Border *Border `json:"border,omitempty"`
// Dash: Dash defines the pattern of the line, the values are pixel
// lengths of alternating dash and gap. If dash is not provided, then it
// means a solid line. Dash can contain up to 10 values and must contain
// even number of values.
Dash []float64 `json:"dash,omitempty"`
// Label: Label style for the line.
Label *LabelStyle `json:"label,omitempty"`
// Stroke: Stroke of the line.
Stroke *LineStyleStroke `json:"stroke,omitempty"`
}
type LineStyleStroke struct {
// Color: Color of the line.
Color string `json:"color,omitempty"`
// Opacity: Opacity of the line.
Opacity float64 `json:"opacity,omitempty"`
// Width: Width of the line, in pixels. 0 <= width <= 10. If width is
// set to 0, the line will be invisible.
Width float64 `json:"width,omitempty"`
}
type Map struct {
// Bbox: A rectangular bounding box which contains all of the data in
// this Map. The box is expressed as \"west, south, east, north\". The
// numbers represent latitude and longitude in decimal degrees.
Bbox []float64 `json:"bbox,omitempty"`
// Contents: The contents of this Map.
Contents []MapItem `json:"contents,omitempty"`
// CreationTime: The creation time of this map. The value is an RFC 3339
// formatted date-time value (e.g. 1970-01-01T00:00:00Z).
CreationTime string `json:"creationTime,omitempty"`
// CreatorEmail: The email address of the creator of this map. This is
// only returned on GET requests and not LIST requests.
CreatorEmail string `json:"creatorEmail,omitempty"`
// DefaultViewport: An array of four numbers (west, south, east, north)
// which defines the rectangular bounding box of the default viewport.
// The numbers represent latitude and longitude in decimal degrees.
DefaultViewport []float64 `json:"defaultViewport,omitempty"`
// Description: The description of this Map, supplied by the author.
Description string `json:"description,omitempty"`
// DraftAccessList: Deprecated: The name of an access list of the Map