1unit googlefusiontables;
2{$MODE objfpc}
3{$H+}
4
5interface
6
7uses sysutils, classes, googleservice, restbase, googlebase;
8
9type
10
11  //Top-level schema types
12  TBucket = Class;
13  TColumn = Class;
14  TColumnList = Class;
15  TGeometry = Class;
16  TImport = Class;
17  TLine = Class;
18  TLineStyle = Class;
19  TPoint = Class;
20  TPointStyle = Class;
21  TPolygon = Class;
22  TPolygonStyle = Class;
23  TSqlresponse = Class;
24  TStyleFunction = Class;
25  TStyleSetting = Class;
26  TStyleSettingList = Class;
27  TTable = Class;
28  TTableList = Class;
29  TTask = Class;
30  TTaskList = Class;
31  TTemplate = Class;
32  TTemplateList = Class;
33  TBucketArray = Array of TBucket;
34  TColumnArray = Array of TColumn;
35  TColumnListArray = Array of TColumnList;
36  TGeometryArray = Array of TGeometry;
37  TImportArray = Array of TImport;
38  TLineArray = Array of TLine;
39  TLineStyleArray = Array of TLineStyle;
40  TPointArray = Array of TPoint;
41  TPointStyleArray = Array of TPointStyle;
42  TPolygonArray = Array of TPolygon;
43  TPolygonStyleArray = Array of TPolygonStyle;
44  TSqlresponseArray = Array of TSqlresponse;
45  TStyleFunctionArray = Array of TStyleFunction;
46  TStyleSettingArray = Array of TStyleSetting;
47  TStyleSettingListArray = Array of TStyleSettingList;
48  TTableArray = Array of TTable;
49  TTableListArray = Array of TTableList;
50  TTaskArray = Array of TTask;
51  TTaskListArray = Array of TTaskList;
52  TTemplateArray = Array of TTemplate;
53  TTemplateListArray = Array of TTemplateList;
54  //Anonymous types, using auto-generated names
55  TColumnTypebaseColumn = Class;
56  TStyleFunctionTypegradientTypecolorsItem = Class;
57  TStyleFunctionTypegradient = Class;
58  TColumnListTypeitemsArray = Array of TColumn;
59  TLineTypecoordinatesArray = Array of TdoubleArray;
60  TPolygonTypecoordinatesItemArray = Array of TdoubleArray;
61  TPolygonTypecoordinatesArray = Array of TPolygonTypecoordinatesItemArray;
62  TSqlresponseTyperowsArray = Array of TTJSONSchemaArray;
63  TStyleFunctionTypebucketsArray = Array of TBucket;
64  TStyleFunctionTypegradientTypecolorsArray = Array of TStyleFunctionTypegradientTypecolorsItem;
65  TStyleSettingListTypeitemsArray = Array of TStyleSetting;
66  TTableTypecolumnsArray = Array of TColumn;
67  TTableListTypeitemsArray = Array of TTable;
68  TTaskListTypeitemsArray = Array of TTask;
69  TTemplateListTypeitemsArray = Array of TTemplate;
70
71  { --------------------------------------------------------------------
72    TBucket
73    --------------------------------------------------------------------}
74
75  TBucket = Class(TGoogleBaseObject)
76  Private
77    Fcolor : String;
78    Ficon : String;
79    Fmax : double;
80    Fmin : double;
81    Fopacity : double;
82    Fweight : integer;
83  Protected
84    //Property setters
85    Procedure Setcolor(AIndex : Integer; const AValue : String); virtual;
86    Procedure Seticon(AIndex : Integer; const AValue : String); virtual;
87    Procedure Setmax(AIndex : Integer; const AValue : double); virtual;
88    Procedure Setmin(AIndex : Integer; const AValue : double); virtual;
89    Procedure Setopacity(AIndex : Integer; const AValue : double); virtual;
90    Procedure Setweight(AIndex : Integer; const AValue : integer); virtual;
91  Public
92  Published
93    Property color : String Index 0 Read Fcolor Write Setcolor;
94    Property icon : String Index 8 Read Ficon Write Seticon;
95    Property max : double Index 16 Read Fmax Write Setmax;
96    Property min : double Index 24 Read Fmin Write Setmin;
97    Property opacity : double Index 32 Read Fopacity Write Setopacity;
98    Property weight : integer Index 40 Read Fweight Write Setweight;
99  end;
100  TBucketClass = Class of TBucket;
101
102  { --------------------------------------------------------------------
103    TColumnTypebaseColumn
104    --------------------------------------------------------------------}
105
106  TColumnTypebaseColumn = Class(TGoogleBaseObject)
107  Private
108    FcolumnId : integer;
109    FtableIndex : integer;
110  Protected
111    //Property setters
112    Procedure SetcolumnId(AIndex : Integer; const AValue : integer); virtual;
113    Procedure SettableIndex(AIndex : Integer; const AValue : integer); virtual;
114  Public
115  Published
116    Property columnId : integer Index 0 Read FcolumnId Write SetcolumnId;
117    Property tableIndex : integer Index 8 Read FtableIndex Write SettableIndex;
118  end;
119  TColumnTypebaseColumnClass = Class of TColumnTypebaseColumn;
120
121  { --------------------------------------------------------------------
122    TColumn
123    --------------------------------------------------------------------}
124
125  TColumn = Class(TGoogleBaseObject)
126  Private
127    FbaseColumn : TColumnTypebaseColumn;
128    FcolumnId : integer;
129    FcolumnJsonSchema : String;
130    FcolumnPropertiesJson : String;
131    Fdescription : String;
132    FformatPattern : String;
133    FgraphPredicate : String;
134    Fkind : String;
135    Fname : String;
136    F_type : String;
137    FvalidValues : TStringArray;
138    FvalidateData : boolean;
139  Protected
140    Class Function ExportPropertyName(Const AName : String) : string; override;
141    //Property setters
142    Procedure SetbaseColumn(AIndex : Integer; const AValue : TColumnTypebaseColumn); virtual;
143    Procedure SetcolumnId(AIndex : Integer; const AValue : integer); virtual;
144    Procedure SetcolumnJsonSchema(AIndex : Integer; const AValue : String); virtual;
145    Procedure SetcolumnPropertiesJson(AIndex : Integer; const AValue : String); virtual;
146    Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
147    Procedure SetformatPattern(AIndex : Integer; const AValue : String); virtual;
148    Procedure SetgraphPredicate(AIndex : Integer; const AValue : String); virtual;
149    Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
150    Procedure Setname(AIndex : Integer; const AValue : String); virtual;
151    Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
152    Procedure SetvalidValues(AIndex : Integer; const AValue : TStringArray); virtual;
153    Procedure SetvalidateData(AIndex : Integer; const AValue : boolean); virtual;
154    //2.6.4. bug workaround
155    {$IFDEF VER2_6}
156    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
157    {$ENDIF VER2_6}
158  Public
159  Published
160    Property baseColumn : TColumnTypebaseColumn Index 0 Read FbaseColumn Write SetbaseColumn;
161    Property columnId : integer Index 8 Read FcolumnId Write SetcolumnId;
162    Property columnJsonSchema : String Index 16 Read FcolumnJsonSchema Write SetcolumnJsonSchema;
163    Property columnPropertiesJson : String Index 24 Read FcolumnPropertiesJson Write SetcolumnPropertiesJson;
164    Property description : String Index 32 Read Fdescription Write Setdescription;
165    Property formatPattern : String Index 40 Read FformatPattern Write SetformatPattern;
166    Property graphPredicate : String Index 48 Read FgraphPredicate Write SetgraphPredicate;
167    Property kind : String Index 56 Read Fkind Write Setkind;
168    Property name : String Index 64 Read Fname Write Setname;
169    Property _type : String Index 72 Read F_type Write Set_type;
170    Property validValues : TStringArray Index 80 Read FvalidValues Write SetvalidValues;
171    Property validateData : boolean Index 88 Read FvalidateData Write SetvalidateData;
172  end;
173  TColumnClass = Class of TColumn;
174
175  { --------------------------------------------------------------------
176    TColumnList
177    --------------------------------------------------------------------}
178
179  TColumnList = Class(TGoogleBaseObject)
180  Private
181    Fitems : TColumnListTypeitemsArray;
182    Fkind : String;
183    FnextPageToken : String;
184    FtotalItems : integer;
185  Protected
186    //Property setters
187    Procedure Setitems(AIndex : Integer; const AValue : TColumnListTypeitemsArray); virtual;
188    Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
189    Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
190    Procedure SettotalItems(AIndex : Integer; const AValue : integer); virtual;
191    //2.6.4. bug workaround
192    {$IFDEF VER2_6}
193    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
194    {$ENDIF VER2_6}
195  Public
196  Published
197    Property items : TColumnListTypeitemsArray Index 0 Read Fitems Write Setitems;
198    Property kind : String Index 8 Read Fkind Write Setkind;
199    Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
200    Property totalItems : integer Index 24 Read FtotalItems Write SettotalItems;
201  end;
202  TColumnListClass = Class of TColumnList;
203
204  { --------------------------------------------------------------------
205    TGeometry
206    --------------------------------------------------------------------}
207
208  TGeometry = Class(TGoogleBaseObject)
209  Private
210    Fgeometries : TTJSONSchemaArray;
211    Fgeometry : TJSONSchema;
212    F_type : String;
213  Protected
214    Class Function ExportPropertyName(Const AName : String) : string; override;
215    //Property setters
216    Procedure Setgeometries(AIndex : Integer; const AValue : TTJSONSchemaArray); virtual;
217    Procedure Setgeometry(AIndex : Integer; const AValue : TJSONSchema); virtual;
218    Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
219    //2.6.4. bug workaround
220    {$IFDEF VER2_6}
221    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
222    {$ENDIF VER2_6}
223  Public
224  Published
225    Property geometries : TTJSONSchemaArray Index 0 Read Fgeometries Write Setgeometries;
226    Property geometry : TJSONSchema Index 8 Read Fgeometry Write Setgeometry;
227    Property _type : String Index 16 Read F_type Write Set_type;
228  end;
229  TGeometryClass = Class of TGeometry;
230
231  { --------------------------------------------------------------------
232    TImport
233    --------------------------------------------------------------------}
234
235  TImport = Class(TGoogleBaseObject)
236  Private
237    Fkind : String;
238    FnumRowsReceived : String;
239  Protected
240    //Property setters
241    Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
242    Procedure SetnumRowsReceived(AIndex : Integer; const AValue : String); virtual;
243  Public
244  Published
245    Property kind : String Index 0 Read Fkind Write Setkind;
246    Property numRowsReceived : String Index 8 Read FnumRowsReceived Write SetnumRowsReceived;
247  end;
248  TImportClass = Class of TImport;
249
250  { --------------------------------------------------------------------
251    TLine
252    --------------------------------------------------------------------}
253
254  TLine = Class(TGoogleBaseObject)
255  Private
256    Fcoordinates : TLineTypecoordinatesArray;
257    F_type : String;
258  Protected
259    Class Function ExportPropertyName(Const AName : String) : string; override;
260    //Property setters
261    Procedure Setcoordinates(AIndex : Integer; const AValue : TLineTypecoordinatesArray); virtual;
262    Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
263    //2.6.4. bug workaround
264    {$IFDEF VER2_6}
265    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
266    {$ENDIF VER2_6}
267  Public
268  Published
269    Property coordinates : TLineTypecoordinatesArray Index 0 Read Fcoordinates Write Setcoordinates;
270    Property _type : String Index 8 Read F_type Write Set_type;
271  end;
272  TLineClass = Class of TLine;
273
274  { --------------------------------------------------------------------
275    TLineStyle
276    --------------------------------------------------------------------}
277
278  TLineStyle = Class(TGoogleBaseObject)
279  Private
280    FstrokeColor : String;
281    FstrokeColorStyler : TStyleFunction;
282    FstrokeOpacity : double;
283    FstrokeWeight : integer;
284    FstrokeWeightStyler : TStyleFunction;
285  Protected
286    //Property setters
287    Procedure SetstrokeColor(AIndex : Integer; const AValue : String); virtual;
288    Procedure SetstrokeColorStyler(AIndex : Integer; const AValue : TStyleFunction); virtual;
289    Procedure SetstrokeOpacity(AIndex : Integer; const AValue : double); virtual;
290    Procedure SetstrokeWeight(AIndex : Integer; const AValue : integer); virtual;
291    Procedure SetstrokeWeightStyler(AIndex : Integer; const AValue : TStyleFunction); virtual;
292  Public
293  Published
294    Property strokeColor : String Index 0 Read FstrokeColor Write SetstrokeColor;
295    Property strokeColorStyler : TStyleFunction Index 8 Read FstrokeColorStyler Write SetstrokeColorStyler;
296    Property strokeOpacity : double Index 16 Read FstrokeOpacity Write SetstrokeOpacity;
297    Property strokeWeight : integer Index 24 Read FstrokeWeight Write SetstrokeWeight;
298    Property strokeWeightStyler : TStyleFunction Index 32 Read FstrokeWeightStyler Write SetstrokeWeightStyler;
299  end;
300  TLineStyleClass = Class of TLineStyle;
301
302  { --------------------------------------------------------------------
303    TPoint
304    --------------------------------------------------------------------}
305
306  TPoint = Class(TGoogleBaseObject)
307  Private
308    Fcoordinates : TdoubleArray;
309    F_type : String;
310  Protected
311    Class Function ExportPropertyName(Const AName : String) : string; override;
312    //Property setters
313    Procedure Setcoordinates(AIndex : Integer; const AValue : TdoubleArray); virtual;
314    Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
315    //2.6.4. bug workaround
316    {$IFDEF VER2_6}
317    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
318    {$ENDIF VER2_6}
319  Public
320  Published
321    Property coordinates : TdoubleArray Index 0 Read Fcoordinates Write Setcoordinates;
322    Property _type : String Index 8 Read F_type Write Set_type;
323  end;
324  TPointClass = Class of TPoint;
325
326  { --------------------------------------------------------------------
327    TPointStyle
328    --------------------------------------------------------------------}
329
330  TPointStyle = Class(TGoogleBaseObject)
331  Private
332    FiconName : String;
333    FiconStyler : TStyleFunction;
334  Protected
335    //Property setters
336    Procedure SeticonName(AIndex : Integer; const AValue : String); virtual;
337    Procedure SeticonStyler(AIndex : Integer; const AValue : TStyleFunction); virtual;
338  Public
339  Published
340    Property iconName : String Index 0 Read FiconName Write SeticonName;
341    Property iconStyler : TStyleFunction Index 8 Read FiconStyler Write SeticonStyler;
342  end;
343  TPointStyleClass = Class of TPointStyle;
344
345  { --------------------------------------------------------------------
346    TPolygon
347    --------------------------------------------------------------------}
348
349  TPolygon = Class(TGoogleBaseObject)
350  Private
351    Fcoordinates : TPolygonTypecoordinatesArray;
352    F_type : String;
353  Protected
354    Class Function ExportPropertyName(Const AName : String) : string; override;
355    //Property setters
356    Procedure Setcoordinates(AIndex : Integer; const AValue : TPolygonTypecoordinatesArray); virtual;
357    Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
358    //2.6.4. bug workaround
359    {$IFDEF VER2_6}
360    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
361    {$ENDIF VER2_6}
362  Public
363  Published
364    Property coordinates : TPolygonTypecoordinatesArray Index 0 Read Fcoordinates Write Setcoordinates;
365    Property _type : String Index 8 Read F_type Write Set_type;
366  end;
367  TPolygonClass = Class of TPolygon;
368
369  { --------------------------------------------------------------------
370    TPolygonStyle
371    --------------------------------------------------------------------}
372
373  TPolygonStyle = Class(TGoogleBaseObject)
374  Private
375    FfillColor : String;
376    FfillColorStyler : TStyleFunction;
377    FfillOpacity : double;
378    FstrokeColor : String;
379    FstrokeColorStyler : TStyleFunction;
380    FstrokeOpacity : double;
381    FstrokeWeight : integer;
382    FstrokeWeightStyler : TStyleFunction;
383  Protected
384    //Property setters
385    Procedure SetfillColor(AIndex : Integer; const AValue : String); virtual;
386    Procedure SetfillColorStyler(AIndex : Integer; const AValue : TStyleFunction); virtual;
387    Procedure SetfillOpacity(AIndex : Integer; const AValue : double); virtual;
388    Procedure SetstrokeColor(AIndex : Integer; const AValue : String); virtual;
389    Procedure SetstrokeColorStyler(AIndex : Integer; const AValue : TStyleFunction); virtual;
390    Procedure SetstrokeOpacity(AIndex : Integer; const AValue : double); virtual;
391    Procedure SetstrokeWeight(AIndex : Integer; const AValue : integer); virtual;
392    Procedure SetstrokeWeightStyler(AIndex : Integer; const AValue : TStyleFunction); virtual;
393  Public
394  Published
395    Property fillColor : String Index 0 Read FfillColor Write SetfillColor;
396    Property fillColorStyler : TStyleFunction Index 8 Read FfillColorStyler Write SetfillColorStyler;
397    Property fillOpacity : double Index 16 Read FfillOpacity Write SetfillOpacity;
398    Property strokeColor : String Index 24 Read FstrokeColor Write SetstrokeColor;
399    Property strokeColorStyler : TStyleFunction Index 32 Read FstrokeColorStyler Write SetstrokeColorStyler;
400    Property strokeOpacity : double Index 40 Read FstrokeOpacity Write SetstrokeOpacity;
401    Property strokeWeight : integer Index 48 Read FstrokeWeight Write SetstrokeWeight;
402    Property strokeWeightStyler : TStyleFunction Index 56 Read FstrokeWeightStyler Write SetstrokeWeightStyler;
403  end;
404  TPolygonStyleClass = Class of TPolygonStyle;
405
406  { --------------------------------------------------------------------
407    TSqlresponse
408    --------------------------------------------------------------------}
409
410  TSqlresponse = Class(TGoogleBaseObject)
411  Private
412    Fcolumns : TStringArray;
413    Fkind : String;
414    Frows : TSqlresponseTyperowsArray;
415  Protected
416    //Property setters
417    Procedure Setcolumns(AIndex : Integer; const AValue : TStringArray); virtual;
418    Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
419    Procedure Setrows(AIndex : Integer; const AValue : TSqlresponseTyperowsArray); virtual;
420    //2.6.4. bug workaround
421    {$IFDEF VER2_6}
422    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
423    {$ENDIF VER2_6}
424  Public
425  Published
426    Property columns : TStringArray Index 0 Read Fcolumns Write Setcolumns;
427    Property kind : String Index 8 Read Fkind Write Setkind;
428    Property rows : TSqlresponseTyperowsArray Index 16 Read Frows Write Setrows;
429  end;
430  TSqlresponseClass = Class of TSqlresponse;
431
432  { --------------------------------------------------------------------
433    TStyleFunctionTypegradientTypecolorsItem
434    --------------------------------------------------------------------}
435
436  TStyleFunctionTypegradientTypecolorsItem = Class(TGoogleBaseObject)
437  Private
438    Fcolor : String;
439    Fopacity : double;
440  Protected
441    //Property setters
442    Procedure Setcolor(AIndex : Integer; const AValue : String); virtual;
443    Procedure Setopacity(AIndex : Integer; const AValue : double); virtual;
444  Public
445  Published
446    Property color : String Index 0 Read Fcolor Write Setcolor;
447    Property opacity : double Index 8 Read Fopacity Write Setopacity;
448  end;
449  TStyleFunctionTypegradientTypecolorsItemClass = Class of TStyleFunctionTypegradientTypecolorsItem;
450
451  { --------------------------------------------------------------------
452    TStyleFunctionTypegradient
453    --------------------------------------------------------------------}
454
455  TStyleFunctionTypegradient = Class(TGoogleBaseObject)
456  Private
457    Fcolors : TStyleFunctionTypegradientTypecolorsArray;
458    Fmax : double;
459    Fmin : double;
460  Protected
461    //Property setters
462    Procedure Setcolors(AIndex : Integer; const AValue : TStyleFunctionTypegradientTypecolorsArray); virtual;
463    Procedure Setmax(AIndex : Integer; const AValue : double); virtual;
464    Procedure Setmin(AIndex : Integer; const AValue : double); virtual;
465    //2.6.4. bug workaround
466    {$IFDEF VER2_6}
467    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
468    {$ENDIF VER2_6}
469  Public
470  Published
471    Property colors : TStyleFunctionTypegradientTypecolorsArray Index 0 Read Fcolors Write Setcolors;
472    Property max : double Index 8 Read Fmax Write Setmax;
473    Property min : double Index 16 Read Fmin Write Setmin;
474  end;
475  TStyleFunctionTypegradientClass = Class of TStyleFunctionTypegradient;
476
477  { --------------------------------------------------------------------
478    TStyleFunction
479    --------------------------------------------------------------------}
480
481  TStyleFunction = Class(TGoogleBaseObject)
482  Private
483    Fbuckets : TStyleFunctionTypebucketsArray;
484    FcolumnName : String;
485    Fgradient : TStyleFunctionTypegradient;
486    Fkind : String;
487  Protected
488    //Property setters
489    Procedure Setbuckets(AIndex : Integer; const AValue : TStyleFunctionTypebucketsArray); virtual;
490    Procedure SetcolumnName(AIndex : Integer; const AValue : String); virtual;
491    Procedure Setgradient(AIndex : Integer; const AValue : TStyleFunctionTypegradient); virtual;
492    Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
493    //2.6.4. bug workaround
494    {$IFDEF VER2_6}
495    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
496    {$ENDIF VER2_6}
497  Public
498  Published
499    Property buckets : TStyleFunctionTypebucketsArray Index 0 Read Fbuckets Write Setbuckets;
500    Property columnName : String Index 8 Read FcolumnName Write SetcolumnName;
501    Property gradient : TStyleFunctionTypegradient Index 16 Read Fgradient Write Setgradient;
502    Property kind : String Index 24 Read Fkind Write Setkind;
503  end;
504  TStyleFunctionClass = Class of TStyleFunction;
505
506  { --------------------------------------------------------------------
507    TStyleSetting
508    --------------------------------------------------------------------}
509
510  TStyleSetting = Class(TGoogleBaseObject)
511  Private
512    Fkind : String;
513    FmarkerOptions : TPointStyle;
514    Fname : String;
515    FpolygonOptions : TPolygonStyle;
516    FpolylineOptions : TLineStyle;
517    FstyleId : integer;
518    FtableId : String;
519  Protected
520    //Property setters
521    Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
522    Procedure SetmarkerOptions(AIndex : Integer; const AValue : TPointStyle); virtual;
523    Procedure Setname(AIndex : Integer; const AValue : String); virtual;
524    Procedure SetpolygonOptions(AIndex : Integer; const AValue : TPolygonStyle); virtual;
525    Procedure SetpolylineOptions(AIndex : Integer; const AValue : TLineStyle); virtual;
526    Procedure SetstyleId(AIndex : Integer; const AValue : integer); virtual;
527    Procedure SettableId(AIndex : Integer; const AValue : String); virtual;
528  Public
529  Published
530    Property kind : String Index 0 Read Fkind Write Setkind;
531    Property markerOptions : TPointStyle Index 8 Read FmarkerOptions Write SetmarkerOptions;
532    Property name : String Index 16 Read Fname Write Setname;
533    Property polygonOptions : TPolygonStyle Index 24 Read FpolygonOptions Write SetpolygonOptions;
534    Property polylineOptions : TLineStyle Index 32 Read FpolylineOptions Write SetpolylineOptions;
535    Property styleId : integer Index 40 Read FstyleId Write SetstyleId;
536    Property tableId : String Index 48 Read FtableId Write SettableId;
537  end;
538  TStyleSettingClass = Class of TStyleSetting;
539
540  { --------------------------------------------------------------------
541    TStyleSettingList
542    --------------------------------------------------------------------}
543
544  TStyleSettingList = Class(TGoogleBaseObject)
545  Private
546    Fitems : TStyleSettingListTypeitemsArray;
547    Fkind : String;
548    FnextPageToken : String;
549    FtotalItems : integer;
550  Protected
551    //Property setters
552    Procedure Setitems(AIndex : Integer; const AValue : TStyleSettingListTypeitemsArray); virtual;
553    Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
554    Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
555    Procedure SettotalItems(AIndex : Integer; const AValue : integer); virtual;
556    //2.6.4. bug workaround
557    {$IFDEF VER2_6}
558    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
559    {$ENDIF VER2_6}
560  Public
561  Published
562    Property items : TStyleSettingListTypeitemsArray Index 0 Read Fitems Write Setitems;
563    Property kind : String Index 8 Read Fkind Write Setkind;
564    Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
565    Property totalItems : integer Index 24 Read FtotalItems Write SettotalItems;
566  end;
567  TStyleSettingListClass = Class of TStyleSettingList;
568
569  { --------------------------------------------------------------------
570    TTable
571    --------------------------------------------------------------------}
572
573  TTable = Class(TGoogleBaseObject)
574  Private
575    Fattribution : String;
576    FattributionLink : String;
577    FbaseTableIds : TStringArray;
578    FcolumnPropertiesJsonSchema : String;
579    Fcolumns : TTableTypecolumnsArray;
580    Fdescription : String;
581    FisExportable : boolean;
582    Fkind : String;
583    Fname : String;
584    Fsql : String;
585    FtableId : String;
586    FtablePropertiesJson : String;
587    FtablePropertiesJsonSchema : String;
588  Protected
589    //Property setters
590    Procedure Setattribution(AIndex : Integer; const AValue : String); virtual;
591    Procedure SetattributionLink(AIndex : Integer; const AValue : String); virtual;
592    Procedure SetbaseTableIds(AIndex : Integer; const AValue : TStringArray); virtual;
593    Procedure SetcolumnPropertiesJsonSchema(AIndex : Integer; const AValue : String); virtual;
594    Procedure Setcolumns(AIndex : Integer; const AValue : TTableTypecolumnsArray); virtual;
595    Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
596    Procedure SetisExportable(AIndex : Integer; const AValue : boolean); virtual;
597    Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
598    Procedure Setname(AIndex : Integer; const AValue : String); virtual;
599    Procedure Setsql(AIndex : Integer; const AValue : String); virtual;
600    Procedure SettableId(AIndex : Integer; const AValue : String); virtual;
601    Procedure SettablePropertiesJson(AIndex : Integer; const AValue : String); virtual;
602    Procedure SettablePropertiesJsonSchema(AIndex : Integer; const AValue : String); virtual;
603    //2.6.4. bug workaround
604    {$IFDEF VER2_6}
605    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
606    {$ENDIF VER2_6}
607  Public
608  Published
609    Property attribution : String Index 0 Read Fattribution Write Setattribution;
610    Property attributionLink : String Index 8 Read FattributionLink Write SetattributionLink;
611    Property baseTableIds : TStringArray Index 16 Read FbaseTableIds Write SetbaseTableIds;
612    Property columnPropertiesJsonSchema : String Index 24 Read FcolumnPropertiesJsonSchema Write SetcolumnPropertiesJsonSchema;
613    Property columns : TTableTypecolumnsArray Index 32 Read Fcolumns Write Setcolumns;
614    Property description : String Index 40 Read Fdescription Write Setdescription;
615    Property isExportable : boolean Index 48 Read FisExportable Write SetisExportable;
616    Property kind : String Index 56 Read Fkind Write Setkind;
617    Property name : String Index 64 Read Fname Write Setname;
618    Property sql : String Index 72 Read Fsql Write Setsql;
619    Property tableId : String Index 80 Read FtableId Write SettableId;
620    Property tablePropertiesJson : String Index 88 Read FtablePropertiesJson Write SettablePropertiesJson;
621    Property tablePropertiesJsonSchema : String Index 96 Read FtablePropertiesJsonSchema Write SettablePropertiesJsonSchema;
622  end;
623  TTableClass = Class of TTable;
624
625  { --------------------------------------------------------------------
626    TTableList
627    --------------------------------------------------------------------}
628
629  TTableList = Class(TGoogleBaseObject)
630  Private
631    Fitems : TTableListTypeitemsArray;
632    Fkind : String;
633    FnextPageToken : String;
634  Protected
635    //Property setters
636    Procedure Setitems(AIndex : Integer; const AValue : TTableListTypeitemsArray); virtual;
637    Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
638    Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
639    //2.6.4. bug workaround
640    {$IFDEF VER2_6}
641    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
642    {$ENDIF VER2_6}
643  Public
644  Published
645    Property items : TTableListTypeitemsArray Index 0 Read Fitems Write Setitems;
646    Property kind : String Index 8 Read Fkind Write Setkind;
647    Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
648  end;
649  TTableListClass = Class of TTableList;
650
651  { --------------------------------------------------------------------
652    TTask
653    --------------------------------------------------------------------}
654
655  TTask = Class(TGoogleBaseObject)
656  Private
657    Fkind : String;
658    Fprogress : String;
659    Fstarted : boolean;
660    FtaskId : String;
661    F_type : String;
662  Protected
663    Class Function ExportPropertyName(Const AName : String) : string; override;
664    //Property setters
665    Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
666    Procedure Setprogress(AIndex : Integer; const AValue : String); virtual;
667    Procedure Setstarted(AIndex : Integer; const AValue : boolean); virtual;
668    Procedure SettaskId(AIndex : Integer; const AValue : String); virtual;
669    Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
670  Public
671  Published
672    Property kind : String Index 0 Read Fkind Write Setkind;
673    Property progress : String Index 8 Read Fprogress Write Setprogress;
674    Property started : boolean Index 16 Read Fstarted Write Setstarted;
675    Property taskId : String Index 24 Read FtaskId Write SettaskId;
676    Property _type : String Index 32 Read F_type Write Set_type;
677  end;
678  TTaskClass = Class of TTask;
679
680  { --------------------------------------------------------------------
681    TTaskList
682    --------------------------------------------------------------------}
683
684  TTaskList = Class(TGoogleBaseObject)
685  Private
686    Fitems : TTaskListTypeitemsArray;
687    Fkind : String;
688    FnextPageToken : String;
689    FtotalItems : integer;
690  Protected
691    //Property setters
692    Procedure Setitems(AIndex : Integer; const AValue : TTaskListTypeitemsArray); virtual;
693    Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
694    Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
695    Procedure SettotalItems(AIndex : Integer; const AValue : integer); virtual;
696    //2.6.4. bug workaround
697    {$IFDEF VER2_6}
698    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
699    {$ENDIF VER2_6}
700  Public
701  Published
702    Property items : TTaskListTypeitemsArray Index 0 Read Fitems Write Setitems;
703    Property kind : String Index 8 Read Fkind Write Setkind;
704    Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
705    Property totalItems : integer Index 24 Read FtotalItems Write SettotalItems;
706  end;
707  TTaskListClass = Class of TTaskList;
708
709  { --------------------------------------------------------------------
710    TTemplate
711    --------------------------------------------------------------------}
712
713  TTemplate = Class(TGoogleBaseObject)
714  Private
715    FautomaticColumnNames : TStringArray;
716    Fbody : String;
717    Fkind : String;
718    Fname : String;
719    FtableId : String;
720    FtemplateId : integer;
721  Protected
722    //Property setters
723    Procedure SetautomaticColumnNames(AIndex : Integer; const AValue : TStringArray); virtual;
724    Procedure Setbody(AIndex : Integer; const AValue : String); virtual;
725    Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
726    Procedure Setname(AIndex : Integer; const AValue : String); virtual;
727    Procedure SettableId(AIndex : Integer; const AValue : String); virtual;
728    Procedure SettemplateId(AIndex : Integer; const AValue : integer); virtual;
729    //2.6.4. bug workaround
730    {$IFDEF VER2_6}
731    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
732    {$ENDIF VER2_6}
733  Public
734  Published
735    Property automaticColumnNames : TStringArray Index 0 Read FautomaticColumnNames Write SetautomaticColumnNames;
736    Property body : String Index 8 Read Fbody Write Setbody;
737    Property kind : String Index 16 Read Fkind Write Setkind;
738    Property name : String Index 24 Read Fname Write Setname;
739    Property tableId : String Index 32 Read FtableId Write SettableId;
740    Property templateId : integer Index 40 Read FtemplateId Write SettemplateId;
741  end;
742  TTemplateClass = Class of TTemplate;
743
744  { --------------------------------------------------------------------
745    TTemplateList
746    --------------------------------------------------------------------}
747
748  TTemplateList = Class(TGoogleBaseObject)
749  Private
750    Fitems : TTemplateListTypeitemsArray;
751    Fkind : String;
752    FnextPageToken : String;
753    FtotalItems : integer;
754  Protected
755    //Property setters
756    Procedure Setitems(AIndex : Integer; const AValue : TTemplateListTypeitemsArray); virtual;
757    Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
758    Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
759    Procedure SettotalItems(AIndex : Integer; const AValue : integer); virtual;
760    //2.6.4. bug workaround
761    {$IFDEF VER2_6}
762    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
763    {$ENDIF VER2_6}
764  Public
765  Published
766    Property items : TTemplateListTypeitemsArray Index 0 Read Fitems Write Setitems;
767    Property kind : String Index 8 Read Fkind Write Setkind;
768    Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
769    Property totalItems : integer Index 24 Read FtotalItems Write SettotalItems;
770  end;
771  TTemplateListClass = Class of TTemplateList;
772
773  { --------------------------------------------------------------------
774    TColumnResource
775    --------------------------------------------------------------------}
776
777
778  //Optional query Options for TColumnResource, method List
779
780  TColumnListOptions = Record
781    maxResults : integer;
782    pageToken : String;
783  end;
784
785  TColumnResource = Class(TGoogleResource)
786  Public
787    Class Function ResourceName : String; override;
788    Class Function DefaultAPI : TGoogleAPIClass; override;
789    Procedure Delete(columnId: string; tableId: string);
790    Function Get(columnId: string; tableId: string) : TColumn;
791    Function Insert(tableId: string; aColumn : TColumn) : TColumn;
792    Function List(tableId: string; AQuery : string  = '') : TColumnList;
793    Function List(tableId: string; AQuery : TColumnlistOptions) : TColumnList;
794    Function Patch(columnId: string; tableId: string; aColumn : TColumn) : TColumn;
795    Function Update(columnId: string; tableId: string; aColumn : TColumn) : TColumn;
796  end;
797
798
799  { --------------------------------------------------------------------
800    TQueryResource
801    --------------------------------------------------------------------}
802
803
804  //Optional query Options for TQueryResource, method Sql
805
806  TQuerySqlOptions = Record
807    hdrs : boolean;
808    sql : String;
809    typed : boolean;
810  end;
811
812
813  //Optional query Options for TQueryResource, method SqlGet
814
815  TQuerySqlGetOptions = Record
816    hdrs : boolean;
817    sql : String;
818    typed : boolean;
819  end;
820
821  TQueryResource = Class(TGoogleResource)
822  Public
823    Class Function ResourceName : String; override;
824    Class Function DefaultAPI : TGoogleAPIClass; override;
825    Function Sql(AQuery : string  = '') : TSqlresponse;
826    Function Sql(AQuery : TQuerysqlOptions) : TSqlresponse;
827    Function SqlGet(AQuery : string  = '') : TSqlresponse;
828    Function SqlGet(AQuery : TQuerysqlGetOptions) : TSqlresponse;
829  end;
830
831
832  { --------------------------------------------------------------------
833    TStyleResource
834    --------------------------------------------------------------------}
835
836
837  //Optional query Options for TStyleResource, method List
838
839  TStyleListOptions = Record
840    maxResults : integer;
841    pageToken : String;
842  end;
843
844  TStyleResource = Class(TGoogleResource)
845  Public
846    Class Function ResourceName : String; override;
847    Class Function DefaultAPI : TGoogleAPIClass; override;
848    Procedure Delete(styleId: integer; tableId: string);
849    Function Get(styleId: integer; tableId: string) : TStyleSetting;
850    Function Insert(tableId: string; aStyleSetting : TStyleSetting) : TStyleSetting;
851    Function List(tableId: string; AQuery : string  = '') : TStyleSettingList;
852    Function List(tableId: string; AQuery : TStylelistOptions) : TStyleSettingList;
853    Function Patch(styleId: integer; tableId: string; aStyleSetting : TStyleSetting) : TStyleSetting;
854    Function Update(styleId: integer; tableId: string; aStyleSetting : TStyleSetting) : TStyleSetting;
855  end;
856
857
858  { --------------------------------------------------------------------
859    TTableResource
860    --------------------------------------------------------------------}
861
862
863  //Optional query Options for TTableResource, method Copy
864
865  TTableCopyOptions = Record
866    copyPresentation : boolean;
867  end;
868
869
870  //Optional query Options for TTableResource, method ImportRows
871
872  TTableImportRowsOptions = Record
873    delimiter : String;
874    encoding : String;
875    endLine : integer;
876    isStrict : boolean;
877    startLine : integer;
878  end;
879
880
881  //Optional query Options for TTableResource, method ImportTable
882
883  TTableImportTableOptions = Record
884    delimiter : String;
885    encoding : String;
886    _name : String;
887  end;
888
889
890  //Optional query Options for TTableResource, method List
891
892  TTableListOptions = Record
893    maxResults : integer;
894    pageToken : String;
895  end;
896
897
898  //Optional query Options for TTableResource, method Patch
899
900  TTablePatchOptions = Record
901    replaceViewDefinition : boolean;
902  end;
903
904
905  //Optional query Options for TTableResource, method ReplaceRows
906
907  TTableReplaceRowsOptions = Record
908    delimiter : String;
909    encoding : String;
910    endLine : integer;
911    isStrict : boolean;
912    startLine : integer;
913  end;
914
915
916  //Optional query Options for TTableResource, method Update
917
918  TTableUpdateOptions = Record
919    replaceViewDefinition : boolean;
920  end;
921
922  TTableResource = Class(TGoogleResource)
923  Public
924    Class Function ResourceName : String; override;
925    Class Function DefaultAPI : TGoogleAPIClass; override;
926    Function Copy(tableId: string; AQuery : string  = '') : TTable;
927    Function Copy(tableId: string; AQuery : TTablecopyOptions) : TTable;
928    Procedure Delete(tableId: string);
929    Function Get(tableId: string) : TTable;
930    Function ImportRows(tableId: string; AQuery : string  = '') : TImport;
931    Function ImportRows(tableId: string; AQuery : TTableimportRowsOptions) : TImport;
932    Function ImportTable(AQuery : string  = '') : TTable;
933    Function ImportTable(AQuery : TTableimportTableOptions) : TTable;
934    Function Insert(aTable : TTable) : TTable;
935    Function List(AQuery : string  = '') : TTableList;
936    Function List(AQuery : TTablelistOptions) : TTableList;
937    Function Patch(tableId: string; aTable : TTable; AQuery : string  = '') : TTable;
938    Function Patch(tableId: string; aTable : TTable; AQuery : TTablepatchOptions) : TTable;
939    Function ReplaceRows(tableId: string; AQuery : string  = '') : TTask;
940    Function ReplaceRows(tableId: string; AQuery : TTablereplaceRowsOptions) : TTask;
941    Function Update(tableId: string; aTable : TTable; AQuery : string  = '') : TTable;
942    Function Update(tableId: string; aTable : TTable; AQuery : TTableupdateOptions) : TTable;
943  end;
944
945
946  { --------------------------------------------------------------------
947    TTaskResource
948    --------------------------------------------------------------------}
949
950
951  //Optional query Options for TTaskResource, method List
952
953  TTaskListOptions = Record
954    maxResults : integer;
955    pageToken : String;
956    startIndex : integer;
957  end;
958
959  TTaskResource = Class(TGoogleResource)
960  Public
961    Class Function ResourceName : String; override;
962    Class Function DefaultAPI : TGoogleAPIClass; override;
963    Procedure Delete(tableId: string; taskId: string);
964    Function Get(tableId: string; taskId: string) : TTask;
965    Function List(tableId: string; AQuery : string  = '') : TTaskList;
966    Function List(tableId: string; AQuery : TTasklistOptions) : TTaskList;
967  end;
968
969
970  { --------------------------------------------------------------------
971    TTemplateResource
972    --------------------------------------------------------------------}
973
974
975  //Optional query Options for TTemplateResource, method List
976
977  TTemplateListOptions = Record
978    maxResults : integer;
979    pageToken : String;
980  end;
981
982  TTemplateResource = Class(TGoogleResource)
983  Public
984    Class Function ResourceName : String; override;
985    Class Function DefaultAPI : TGoogleAPIClass; override;
986    Procedure Delete(tableId: string; templateId: integer);
987    Function Get(tableId: string; templateId: integer) : TTemplate;
988    Function Insert(tableId: string; aTemplate : TTemplate) : TTemplate;
989    Function List(tableId: string; AQuery : string  = '') : TTemplateList;
990    Function List(tableId: string; AQuery : TTemplatelistOptions) : TTemplateList;
991    Function Patch(tableId: string; templateId: integer; aTemplate : TTemplate) : TTemplate;
992    Function Update(tableId: string; templateId: integer; aTemplate : TTemplate) : TTemplate;
993  end;
994
995
996  { --------------------------------------------------------------------
997    TFusiontablesAPI
998    --------------------------------------------------------------------}
999
1000  TFusiontablesAPI = Class(TGoogleAPI)
1001  Private
1002    FColumnInstance : TColumnResource;
1003    FQueryInstance : TQueryResource;
1004    FStyleInstance : TStyleResource;
1005    FTableInstance : TTableResource;
1006    FTaskInstance : TTaskResource;
1007    FTemplateInstance : TTemplateResource;
1008    Function GetColumnInstance : TColumnResource;virtual;
1009    Function GetQueryInstance : TQueryResource;virtual;
1010    Function GetStyleInstance : TStyleResource;virtual;
1011    Function GetTableInstance : TTableResource;virtual;
1012    Function GetTaskInstance : TTaskResource;virtual;
1013    Function GetTemplateInstance : TTemplateResource;virtual;
1014  Public
1015    //Override class functions with API info
1016    Class Function APIName : String; override;
1017    Class Function APIVersion : String; override;
1018    Class Function APIRevision : String; override;
1019    Class Function APIID : String; override;
1020    Class Function APITitle : String; override;
1021    Class Function APIDescription : String; override;
1022    Class Function APIOwnerDomain : String; override;
1023    Class Function APIOwnerName : String; override;
1024    Class Function APIIcon16 : String; override;
1025    Class Function APIIcon32 : String; override;
1026    Class Function APIdocumentationLink : String; override;
1027    Class Function APIrootUrl : string; override;
1028    Class Function APIbasePath : string;override;
1029    Class Function APIbaseURL : String;override;
1030    Class Function APIProtocol : string;override;
1031    Class Function APIservicePath : string;override;
1032    Class Function APIbatchPath : String;override;
1033    Class Function APIAuthScopes : TScopeInfoArray;override;
1034    Class Function APINeedsAuth : Boolean;override;
1035    Class Procedure RegisterAPIResources; override;
1036    //Add create function for resources
1037    Function CreateColumnResource(AOwner : TComponent) : TColumnResource;virtual;overload;
1038    Function CreateColumnResource : TColumnResource;virtual;overload;
1039    Function CreateQueryResource(AOwner : TComponent) : TQueryResource;virtual;overload;
1040    Function CreateQueryResource : TQueryResource;virtual;overload;
1041    Function CreateStyleResource(AOwner : TComponent) : TStyleResource;virtual;overload;
1042    Function CreateStyleResource : TStyleResource;virtual;overload;
1043    Function CreateTableResource(AOwner : TComponent) : TTableResource;virtual;overload;
1044    Function CreateTableResource : TTableResource;virtual;overload;
1045    Function CreateTaskResource(AOwner : TComponent) : TTaskResource;virtual;overload;
1046    Function CreateTaskResource : TTaskResource;virtual;overload;
1047    Function CreateTemplateResource(AOwner : TComponent) : TTemplateResource;virtual;overload;
1048    Function CreateTemplateResource : TTemplateResource;virtual;overload;
1049    //Add default on-demand instances for resources
1050    Property ColumnResource : TColumnResource Read GetColumnInstance;
1051    Property QueryResource : TQueryResource Read GetQueryInstance;
1052    Property StyleResource : TStyleResource Read GetStyleInstance;
1053    Property TableResource : TTableResource Read GetTableInstance;
1054    Property TaskResource : TTaskResource Read GetTaskInstance;
1055    Property TemplateResource : TTemplateResource Read GetTemplateInstance;
1056  end;
1057
1058implementation
1059
1060
1061{ --------------------------------------------------------------------
1062  TBucket
1063  --------------------------------------------------------------------}
1064
1065
1066Procedure TBucket.Setcolor(AIndex : Integer; const AValue : String);
1067
1068begin
1069  If (Fcolor=AValue) then exit;
1070  Fcolor:=AValue;
1071  MarkPropertyChanged(AIndex);
1072end;
1073
1074
1075
1076Procedure TBucket.Seticon(AIndex : Integer; const AValue : String);
1077
1078begin
1079  If (Ficon=AValue) then exit;
1080  Ficon:=AValue;
1081  MarkPropertyChanged(AIndex);
1082end;
1083
1084
1085
1086Procedure TBucket.Setmax(AIndex : Integer; const AValue : double);
1087
1088begin
1089  If (Fmax=AValue) then exit;
1090  Fmax:=AValue;
1091  MarkPropertyChanged(AIndex);
1092end;
1093
1094
1095
1096Procedure TBucket.Setmin(AIndex : Integer; const AValue : double);
1097
1098begin
1099  If (Fmin=AValue) then exit;
1100  Fmin:=AValue;
1101  MarkPropertyChanged(AIndex);
1102end;
1103
1104
1105
1106Procedure TBucket.Setopacity(AIndex : Integer; const AValue : double);
1107
1108begin
1109  If (Fopacity=AValue) then exit;
1110  Fopacity:=AValue;
1111  MarkPropertyChanged(AIndex);
1112end;
1113
1114
1115
1116Procedure TBucket.Setweight(AIndex : Integer; const AValue : integer);
1117
1118begin
1119  If (Fweight=AValue) then exit;
1120  Fweight:=AValue;
1121  MarkPropertyChanged(AIndex);
1122end;
1123
1124
1125
1126
1127
1128{ --------------------------------------------------------------------
1129  TColumnTypebaseColumn
1130  --------------------------------------------------------------------}
1131
1132
1133Procedure TColumnTypebaseColumn.SetcolumnId(AIndex : Integer; const AValue : integer);
1134
1135begin
1136  If (FcolumnId=AValue) then exit;
1137  FcolumnId:=AValue;
1138  MarkPropertyChanged(AIndex);
1139end;
1140
1141
1142
1143Procedure TColumnTypebaseColumn.SettableIndex(AIndex : Integer; const AValue : integer);
1144
1145begin
1146  If (FtableIndex=AValue) then exit;
1147  FtableIndex:=AValue;
1148  MarkPropertyChanged(AIndex);
1149end;
1150
1151
1152
1153
1154
1155{ --------------------------------------------------------------------
1156  TColumn
1157  --------------------------------------------------------------------}
1158
1159
1160Procedure TColumn.SetbaseColumn(AIndex : Integer; const AValue : TColumnTypebaseColumn);
1161
1162begin
1163  If (FbaseColumn=AValue) then exit;
1164  FbaseColumn:=AValue;
1165  MarkPropertyChanged(AIndex);
1166end;
1167
1168
1169
1170Procedure TColumn.SetcolumnId(AIndex : Integer; const AValue : integer);
1171
1172begin
1173  If (FcolumnId=AValue) then exit;
1174  FcolumnId:=AValue;
1175  MarkPropertyChanged(AIndex);
1176end;
1177
1178
1179
1180Procedure TColumn.SetcolumnJsonSchema(AIndex : Integer; const AValue : String);
1181
1182begin
1183  If (FcolumnJsonSchema=AValue) then exit;
1184  FcolumnJsonSchema:=AValue;
1185  MarkPropertyChanged(AIndex);
1186end;
1187
1188
1189
1190Procedure TColumn.SetcolumnPropertiesJson(AIndex : Integer; const AValue : String);
1191
1192begin
1193  If (FcolumnPropertiesJson=AValue) then exit;
1194  FcolumnPropertiesJson:=AValue;
1195  MarkPropertyChanged(AIndex);
1196end;
1197
1198
1199
1200Procedure TColumn.Setdescription(AIndex : Integer; const AValue : String);
1201
1202begin
1203  If (Fdescription=AValue) then exit;
1204  Fdescription:=AValue;
1205  MarkPropertyChanged(AIndex);
1206end;
1207
1208
1209
1210Procedure TColumn.SetformatPattern(AIndex : Integer; const AValue : String);
1211
1212begin
1213  If (FformatPattern=AValue) then exit;
1214  FformatPattern:=AValue;
1215  MarkPropertyChanged(AIndex);
1216end;
1217
1218
1219
1220Procedure TColumn.SetgraphPredicate(AIndex : Integer; const AValue : String);
1221
1222begin
1223  If (FgraphPredicate=AValue) then exit;
1224  FgraphPredicate:=AValue;
1225  MarkPropertyChanged(AIndex);
1226end;
1227
1228
1229
1230Procedure TColumn.Setkind(AIndex : Integer; const AValue : String);
1231
1232begin
1233  If (Fkind=AValue) then exit;
1234  Fkind:=AValue;
1235  MarkPropertyChanged(AIndex);
1236end;
1237
1238
1239
1240Procedure TColumn.Setname(AIndex : Integer; const AValue : String);
1241
1242begin
1243  If (Fname=AValue) then exit;
1244  Fname:=AValue;
1245  MarkPropertyChanged(AIndex);
1246end;
1247
1248
1249
1250Procedure TColumn.Set_type(AIndex : Integer; const AValue : String);
1251
1252begin
1253  If (F_type=AValue) then exit;
1254  F_type:=AValue;
1255  MarkPropertyChanged(AIndex);
1256end;
1257
1258
1259
1260Procedure TColumn.SetvalidValues(AIndex : Integer; const AValue : TStringArray);
1261
1262begin
1263  If (FvalidValues=AValue) then exit;
1264  FvalidValues:=AValue;
1265  MarkPropertyChanged(AIndex);
1266end;
1267
1268
1269
1270Procedure TColumn.SetvalidateData(AIndex : Integer; const AValue : boolean);
1271
1272begin
1273  If (FvalidateData=AValue) then exit;
1274  FvalidateData:=AValue;
1275  MarkPropertyChanged(AIndex);
1276end;
1277
1278
1279
1280Class Function TColumn.ExportPropertyName(Const AName : String) :String;
1281
1282begin
1283  Case AName of
1284  '_type' : Result:='type';
1285  else
1286    Result:=Inherited ExportPropertyName(AName);
1287  end;
1288end;
1289
1290//2.6.4. bug workaround
1291{$IFDEF VER2_6}
1292Procedure TColumn.SetArrayLength(Const AName : String; ALength : Longint);
1293
1294begin
1295  Case AName of
1296  'validvalues' : SetLength(FvalidValues,ALength);
1297  else
1298    Inherited SetArrayLength(AName,ALength);
1299  end;
1300end;
1301{$ENDIF VER2_6}
1302
1303
1304
1305
1306{ --------------------------------------------------------------------
1307  TColumnList
1308  --------------------------------------------------------------------}
1309
1310
1311Procedure TColumnList.Setitems(AIndex : Integer; const AValue : TColumnListTypeitemsArray);
1312
1313begin
1314  If (Fitems=AValue) then exit;
1315  Fitems:=AValue;
1316  MarkPropertyChanged(AIndex);
1317end;
1318
1319
1320
1321Procedure TColumnList.Setkind(AIndex : Integer; const AValue : String);
1322
1323begin
1324  If (Fkind=AValue) then exit;
1325  Fkind:=AValue;
1326  MarkPropertyChanged(AIndex);
1327end;
1328
1329
1330
1331Procedure TColumnList.SetnextPageToken(AIndex : Integer; const AValue : String);
1332
1333begin
1334  If (FnextPageToken=AValue) then exit;
1335  FnextPageToken:=AValue;
1336  MarkPropertyChanged(AIndex);
1337end;
1338
1339
1340
1341Procedure TColumnList.SettotalItems(AIndex : Integer; const AValue : integer);
1342
1343begin
1344  If (FtotalItems=AValue) then exit;
1345  FtotalItems:=AValue;
1346  MarkPropertyChanged(AIndex);
1347end;
1348
1349
1350//2.6.4. bug workaround
1351{$IFDEF VER2_6}
1352Procedure TColumnList.SetArrayLength(Const AName : String; ALength : Longint);
1353
1354begin
1355  Case AName of
1356  'items' : SetLength(Fitems,ALength);
1357  else
1358    Inherited SetArrayLength(AName,ALength);
1359  end;
1360end;
1361{$ENDIF VER2_6}
1362
1363
1364
1365
1366{ --------------------------------------------------------------------
1367  TGeometry
1368  --------------------------------------------------------------------}
1369
1370
1371Procedure TGeometry.Setgeometries(AIndex : Integer; const AValue : TTJSONSchemaArray);
1372
1373begin
1374  If (Fgeometries=AValue) then exit;
1375  Fgeometries:=AValue;
1376  MarkPropertyChanged(AIndex);
1377end;
1378
1379
1380
1381Procedure TGeometry.Setgeometry(AIndex : Integer; const AValue : TJSONSchema);
1382
1383begin
1384  If (Fgeometry=AValue) then exit;
1385  Fgeometry:=AValue;
1386  MarkPropertyChanged(AIndex);
1387end;
1388
1389
1390
1391Procedure TGeometry.Set_type(AIndex : Integer; const AValue : String);
1392
1393begin
1394  If (F_type=AValue) then exit;
1395  F_type:=AValue;
1396  MarkPropertyChanged(AIndex);
1397end;
1398
1399
1400
1401Class Function TGeometry.ExportPropertyName(Const AName : String) :String;
1402
1403begin
1404  Case AName of
1405  '_type' : Result:='type';
1406  else
1407    Result:=Inherited ExportPropertyName(AName);
1408  end;
1409end;
1410
1411//2.6.4. bug workaround
1412{$IFDEF VER2_6}
1413Procedure TGeometry.SetArrayLength(Const AName : String; ALength : Longint);
1414
1415begin
1416  Case AName of
1417  'geometries' : SetLength(Fgeometries,ALength);
1418  else
1419    Inherited SetArrayLength(AName,ALength);
1420  end;
1421end;
1422{$ENDIF VER2_6}
1423
1424
1425
1426
1427{ --------------------------------------------------------------------
1428  TImport
1429  --------------------------------------------------------------------}
1430
1431
1432Procedure TImport.Setkind(AIndex : Integer; const AValue : String);
1433
1434begin
1435  If (Fkind=AValue) then exit;
1436  Fkind:=AValue;
1437  MarkPropertyChanged(AIndex);
1438end;
1439
1440
1441
1442Procedure TImport.SetnumRowsReceived(AIndex : Integer; const AValue : String);
1443
1444begin
1445  If (FnumRowsReceived=AValue) then exit;
1446  FnumRowsReceived:=AValue;
1447  MarkPropertyChanged(AIndex);
1448end;
1449
1450
1451
1452
1453
1454{ --------------------------------------------------------------------
1455  TLine
1456  --------------------------------------------------------------------}
1457
1458
1459Procedure TLine.Setcoordinates(AIndex : Integer; const AValue : TLineTypecoordinatesArray);
1460
1461begin
1462  If (Fcoordinates=AValue) then exit;
1463  Fcoordinates:=AValue;
1464  MarkPropertyChanged(AIndex);
1465end;
1466
1467
1468
1469Procedure TLine.Set_type(AIndex : Integer; const AValue : String);
1470
1471begin
1472  If (F_type=AValue) then exit;
1473  F_type:=AValue;
1474  MarkPropertyChanged(AIndex);
1475end;
1476
1477
1478
1479Class Function TLine.ExportPropertyName(Const AName : String) :String;
1480
1481begin
1482  Case AName of
1483  '_type' : Result:='type';
1484  else
1485    Result:=Inherited ExportPropertyName(AName);
1486  end;
1487end;
1488
1489//2.6.4. bug workaround
1490{$IFDEF VER2_6}
1491Procedure TLine.SetArrayLength(Const AName : String; ALength : Longint);
1492
1493begin
1494  Case AName of
1495  'coordinates' : SetLength(Fcoordinates,ALength);
1496  else
1497    Inherited SetArrayLength(AName,ALength);
1498  end;
1499end;
1500{$ENDIF VER2_6}
1501
1502
1503
1504
1505{ --------------------------------------------------------------------
1506  TLineStyle
1507  --------------------------------------------------------------------}
1508
1509
1510Procedure TLineStyle.SetstrokeColor(AIndex : Integer; const AValue : String);
1511
1512begin
1513  If (FstrokeColor=AValue) then exit;
1514  FstrokeColor:=AValue;
1515  MarkPropertyChanged(AIndex);
1516end;
1517
1518
1519
1520Procedure TLineStyle.SetstrokeColorStyler(AIndex : Integer; const AValue : TStyleFunction);
1521
1522begin
1523  If (FstrokeColorStyler=AValue) then exit;
1524  FstrokeColorStyler:=AValue;
1525  MarkPropertyChanged(AIndex);
1526end;
1527
1528
1529
1530Procedure TLineStyle.SetstrokeOpacity(AIndex : Integer; const AValue : double);
1531
1532begin
1533  If (FstrokeOpacity=AValue) then exit;
1534  FstrokeOpacity:=AValue;
1535  MarkPropertyChanged(AIndex);
1536end;
1537
1538
1539
1540Procedure TLineStyle.SetstrokeWeight(AIndex : Integer; const AValue : integer);
1541
1542begin
1543  If (FstrokeWeight=AValue) then exit;
1544  FstrokeWeight:=AValue;
1545  MarkPropertyChanged(AIndex);
1546end;
1547
1548
1549
1550Procedure TLineStyle.SetstrokeWeightStyler(AIndex : Integer; const AValue : TStyleFunction);
1551
1552begin
1553  If (FstrokeWeightStyler=AValue) then exit;
1554  FstrokeWeightStyler:=AValue;
1555  MarkPropertyChanged(AIndex);
1556end;
1557
1558
1559
1560
1561
1562{ --------------------------------------------------------------------
1563  TPoint
1564  --------------------------------------------------------------------}
1565
1566
1567Procedure TPoint.Setcoordinates(AIndex : Integer; const AValue : TdoubleArray);
1568
1569begin
1570  If (Fcoordinates=AValue) then exit;
1571  Fcoordinates:=AValue;
1572  MarkPropertyChanged(AIndex);
1573end;
1574
1575
1576
1577Procedure TPoint.Set_type(AIndex : Integer; const AValue : String);
1578
1579begin
1580  If (F_type=AValue) then exit;
1581  F_type:=AValue;
1582  MarkPropertyChanged(AIndex);
1583end;
1584
1585
1586
1587Class Function TPoint.ExportPropertyName(Const AName : String) :String;
1588
1589begin
1590  Case AName of
1591  '_type' : Result:='type';
1592  else
1593    Result:=Inherited ExportPropertyName(AName);
1594  end;
1595end;
1596
1597//2.6.4. bug workaround
1598{$IFDEF VER2_6}
1599Procedure TPoint.SetArrayLength(Const AName : String; ALength : Longint);
1600
1601begin
1602  Case AName of
1603  'coordinates' : SetLength(Fcoordinates,ALength);
1604  else
1605    Inherited SetArrayLength(AName,ALength);
1606  end;
1607end;
1608{$ENDIF VER2_6}
1609
1610
1611
1612
1613{ --------------------------------------------------------------------
1614  TPointStyle
1615  --------------------------------------------------------------------}
1616
1617
1618Procedure TPointStyle.SeticonName(AIndex : Integer; const AValue : String);
1619
1620begin
1621  If (FiconName=AValue) then exit;
1622  FiconName:=AValue;
1623  MarkPropertyChanged(AIndex);
1624end;
1625
1626
1627
1628Procedure TPointStyle.SeticonStyler(AIndex : Integer; const AValue : TStyleFunction);
1629
1630begin
1631  If (FiconStyler=AValue) then exit;
1632  FiconStyler:=AValue;
1633  MarkPropertyChanged(AIndex);
1634end;
1635
1636
1637
1638
1639
1640{ --------------------------------------------------------------------
1641  TPolygon
1642  --------------------------------------------------------------------}
1643
1644
1645Procedure TPolygon.Setcoordinates(AIndex : Integer; const AValue : TPolygonTypecoordinatesArray);
1646
1647begin
1648  If (Fcoordinates=AValue) then exit;
1649  Fcoordinates:=AValue;
1650  MarkPropertyChanged(AIndex);
1651end;
1652
1653
1654
1655Procedure TPolygon.Set_type(AIndex : Integer; const AValue : String);
1656
1657begin
1658  If (F_type=AValue) then exit;
1659  F_type:=AValue;
1660  MarkPropertyChanged(AIndex);
1661end;
1662
1663
1664
1665Class Function TPolygon.ExportPropertyName(Const AName : String) :String;
1666
1667begin
1668  Case AName of
1669  '_type' : Result:='type';
1670  else
1671    Result:=Inherited ExportPropertyName(AName);
1672  end;
1673end;
1674
1675//2.6.4. bug workaround
1676{$IFDEF VER2_6}
1677Procedure TPolygon.SetArrayLength(Const AName : String; ALength : Longint);
1678
1679begin
1680  Case AName of
1681  'coordinates' : SetLength(Fcoordinates,ALength);
1682  else
1683    Inherited SetArrayLength(AName,ALength);
1684  end;
1685end;
1686{$ENDIF VER2_6}
1687
1688
1689
1690
1691{ --------------------------------------------------------------------
1692  TPolygonStyle
1693  --------------------------------------------------------------------}
1694
1695
1696Procedure TPolygonStyle.SetfillColor(AIndex : Integer; const AValue : String);
1697
1698begin
1699  If (FfillColor=AValue) then exit;
1700  FfillColor:=AValue;
1701  MarkPropertyChanged(AIndex);
1702end;
1703
1704
1705
1706Procedure TPolygonStyle.SetfillColorStyler(AIndex : Integer; const AValue : TStyleFunction);
1707
1708begin
1709  If (FfillColorStyler=AValue) then exit;
1710  FfillColorStyler:=AValue;
1711  MarkPropertyChanged(AIndex);
1712end;
1713
1714
1715
1716Procedure TPolygonStyle.SetfillOpacity(AIndex : Integer; const AValue : double);
1717
1718begin
1719  If (FfillOpacity=AValue) then exit;
1720  FfillOpacity:=AValue;
1721  MarkPropertyChanged(AIndex);
1722end;
1723
1724
1725
1726Procedure TPolygonStyle.SetstrokeColor(AIndex : Integer; const AValue : String);
1727
1728begin
1729  If (FstrokeColor=AValue) then exit;
1730  FstrokeColor:=AValue;
1731  MarkPropertyChanged(AIndex);
1732end;
1733
1734
1735
1736Procedure TPolygonStyle.SetstrokeColorStyler(AIndex : Integer; const AValue : TStyleFunction);
1737
1738begin
1739  If (FstrokeColorStyler=AValue) then exit;
1740  FstrokeColorStyler:=AValue;
1741  MarkPropertyChanged(AIndex);
1742end;
1743
1744
1745
1746Procedure TPolygonStyle.SetstrokeOpacity(AIndex : Integer; const AValue : double);
1747
1748begin
1749  If (FstrokeOpacity=AValue) then exit;
1750  FstrokeOpacity:=AValue;
1751  MarkPropertyChanged(AIndex);
1752end;
1753
1754
1755
1756Procedure TPolygonStyle.SetstrokeWeight(AIndex : Integer; const AValue : integer);
1757
1758begin
1759  If (FstrokeWeight=AValue) then exit;
1760  FstrokeWeight:=AValue;
1761  MarkPropertyChanged(AIndex);
1762end;
1763
1764
1765
1766Procedure TPolygonStyle.SetstrokeWeightStyler(AIndex : Integer; const AValue : TStyleFunction);
1767
1768begin
1769  If (FstrokeWeightStyler=AValue) then exit;
1770  FstrokeWeightStyler:=AValue;
1771  MarkPropertyChanged(AIndex);
1772end;
1773
1774
1775
1776
1777
1778{ --------------------------------------------------------------------
1779  TSqlresponse
1780  --------------------------------------------------------------------}
1781
1782
1783Procedure TSqlresponse.Setcolumns(AIndex : Integer; const AValue : TStringArray);
1784
1785begin
1786  If (Fcolumns=AValue) then exit;
1787  Fcolumns:=AValue;
1788  MarkPropertyChanged(AIndex);
1789end;
1790
1791
1792
1793Procedure TSqlresponse.Setkind(AIndex : Integer; const AValue : String);
1794
1795begin
1796  If (Fkind=AValue) then exit;
1797  Fkind:=AValue;
1798  MarkPropertyChanged(AIndex);
1799end;
1800
1801
1802
1803Procedure TSqlresponse.Setrows(AIndex : Integer; const AValue : TSqlresponseTyperowsArray);
1804
1805begin
1806  If (Frows=AValue) then exit;
1807  Frows:=AValue;
1808  MarkPropertyChanged(AIndex);
1809end;
1810
1811
1812//2.6.4. bug workaround
1813{$IFDEF VER2_6}
1814Procedure TSqlresponse.SetArrayLength(Const AName : String; ALength : Longint);
1815
1816begin
1817  Case AName of
1818  'columns' : SetLength(Fcolumns,ALength);
1819  'rows' : SetLength(Frows,ALength);
1820  else
1821    Inherited SetArrayLength(AName,ALength);
1822  end;
1823end;
1824{$ENDIF VER2_6}
1825
1826
1827
1828
1829{ --------------------------------------------------------------------
1830  TStyleFunctionTypegradientTypecolorsItem
1831  --------------------------------------------------------------------}
1832
1833
1834Procedure TStyleFunctionTypegradientTypecolorsItem.Setcolor(AIndex : Integer; const AValue : String);
1835
1836begin
1837  If (Fcolor=AValue) then exit;
1838  Fcolor:=AValue;
1839  MarkPropertyChanged(AIndex);
1840end;
1841
1842
1843
1844Procedure TStyleFunctionTypegradientTypecolorsItem.Setopacity(AIndex : Integer; const AValue : double);
1845
1846begin
1847  If (Fopacity=AValue) then exit;
1848  Fopacity:=AValue;
1849  MarkPropertyChanged(AIndex);
1850end;
1851
1852
1853
1854
1855
1856{ --------------------------------------------------------------------
1857  TStyleFunctionTypegradient
1858  --------------------------------------------------------------------}
1859
1860
1861Procedure TStyleFunctionTypegradient.Setcolors(AIndex : Integer; const AValue : TStyleFunctionTypegradientTypecolorsArray);
1862
1863begin
1864  If (Fcolors=AValue) then exit;
1865  Fcolors:=AValue;
1866  MarkPropertyChanged(AIndex);
1867end;
1868
1869
1870
1871Procedure TStyleFunctionTypegradient.Setmax(AIndex : Integer; const AValue : double);
1872
1873begin
1874  If (Fmax=AValue) then exit;
1875  Fmax:=AValue;
1876  MarkPropertyChanged(AIndex);
1877end;
1878
1879
1880
1881Procedure TStyleFunctionTypegradient.Setmin(AIndex : Integer; const AValue : double);
1882
1883begin
1884  If (Fmin=AValue) then exit;
1885  Fmin:=AValue;
1886  MarkPropertyChanged(AIndex);
1887end;
1888
1889
1890//2.6.4. bug workaround
1891{$IFDEF VER2_6}
1892Procedure TStyleFunctionTypegradient.SetArrayLength(Const AName : String; ALength : Longint);
1893
1894begin
1895  Case AName of
1896  'colors' : SetLength(Fcolors,ALength);
1897  else
1898    Inherited SetArrayLength(AName,ALength);
1899  end;
1900end;
1901{$ENDIF VER2_6}
1902
1903
1904
1905
1906{ --------------------------------------------------------------------
1907  TStyleFunction
1908  --------------------------------------------------------------------}
1909
1910
1911Procedure TStyleFunction.Setbuckets(AIndex : Integer; const AValue : TStyleFunctionTypebucketsArray);
1912
1913begin
1914  If (Fbuckets=AValue) then exit;
1915  Fbuckets:=AValue;
1916  MarkPropertyChanged(AIndex);
1917end;
1918
1919
1920
1921Procedure TStyleFunction.SetcolumnName(AIndex : Integer; const AValue : String);
1922
1923begin
1924  If (FcolumnName=AValue) then exit;
1925  FcolumnName:=AValue;
1926  MarkPropertyChanged(AIndex);
1927end;
1928
1929
1930
1931Procedure TStyleFunction.Setgradient(AIndex : Integer; const AValue : TStyleFunctionTypegradient);
1932
1933begin
1934  If (Fgradient=AValue) then exit;
1935  Fgradient:=AValue;
1936  MarkPropertyChanged(AIndex);
1937end;
1938
1939
1940
1941Procedure TStyleFunction.Setkind(AIndex : Integer; const AValue : String);
1942
1943begin
1944  If (Fkind=AValue) then exit;
1945  Fkind:=AValue;
1946  MarkPropertyChanged(AIndex);
1947end;
1948
1949
1950//2.6.4. bug workaround
1951{$IFDEF VER2_6}
1952Procedure TStyleFunction.SetArrayLength(Const AName : String; ALength : Longint);
1953
1954begin
1955  Case AName of
1956  'buckets' : SetLength(Fbuckets,ALength);
1957  else
1958    Inherited SetArrayLength(AName,ALength);
1959  end;
1960end;
1961{$ENDIF VER2_6}
1962
1963
1964
1965
1966{ --------------------------------------------------------------------
1967  TStyleSetting
1968  --------------------------------------------------------------------}
1969
1970
1971Procedure TStyleSetting.Setkind(AIndex : Integer; const AValue : String);
1972
1973begin
1974  If (Fkind=AValue) then exit;
1975  Fkind:=AValue;
1976  MarkPropertyChanged(AIndex);
1977end;
1978
1979
1980
1981Procedure TStyleSetting.SetmarkerOptions(AIndex : Integer; const AValue : TPointStyle);
1982
1983begin
1984  If (FmarkerOptions=AValue) then exit;
1985  FmarkerOptions:=AValue;
1986  MarkPropertyChanged(AIndex);
1987end;
1988
1989
1990
1991Procedure TStyleSetting.Setname(AIndex : Integer; const AValue : String);
1992
1993begin
1994  If (Fname=AValue) then exit;
1995  Fname:=AValue;
1996  MarkPropertyChanged(AIndex);
1997end;
1998
1999
2000
2001Procedure TStyleSetting.SetpolygonOptions(AIndex : Integer; const AValue : TPolygonStyle);
2002
2003begin
2004  If (FpolygonOptions=AValue) then exit;
2005  FpolygonOptions:=AValue;
2006  MarkPropertyChanged(AIndex);
2007end;
2008
2009
2010
2011Procedure TStyleSetting.SetpolylineOptions(AIndex : Integer; const AValue : TLineStyle);
2012
2013begin
2014  If (FpolylineOptions=AValue) then exit;
2015  FpolylineOptions:=AValue;
2016  MarkPropertyChanged(AIndex);
2017end;
2018
2019
2020
2021Procedure TStyleSetting.SetstyleId(AIndex : Integer; const AValue : integer);
2022
2023begin
2024  If (FstyleId=AValue) then exit;
2025  FstyleId:=AValue;
2026  MarkPropertyChanged(AIndex);
2027end;
2028
2029
2030
2031Procedure TStyleSetting.SettableId(AIndex : Integer; const AValue : String);
2032
2033begin
2034  If (FtableId=AValue) then exit;
2035  FtableId:=AValue;
2036  MarkPropertyChanged(AIndex);
2037end;
2038
2039
2040
2041
2042
2043{ --------------------------------------------------------------------
2044  TStyleSettingList
2045  --------------------------------------------------------------------}
2046
2047
2048Procedure TStyleSettingList.Setitems(AIndex : Integer; const AValue : TStyleSettingListTypeitemsArray);
2049
2050begin
2051  If (Fitems=AValue) then exit;
2052  Fitems:=AValue;
2053  MarkPropertyChanged(AIndex);
2054end;
2055
2056
2057
2058Procedure TStyleSettingList.Setkind(AIndex : Integer; const AValue : String);
2059
2060begin
2061  If (Fkind=AValue) then exit;
2062  Fkind:=AValue;
2063  MarkPropertyChanged(AIndex);
2064end;
2065
2066
2067
2068Procedure TStyleSettingList.SetnextPageToken(AIndex : Integer; const AValue : String);
2069
2070begin
2071  If (FnextPageToken=AValue) then exit;
2072  FnextPageToken:=AValue;
2073  MarkPropertyChanged(AIndex);
2074end;
2075
2076
2077
2078Procedure TStyleSettingList.SettotalItems(AIndex : Integer; const AValue : integer);
2079
2080begin
2081  If (FtotalItems=AValue) then exit;
2082  FtotalItems:=AValue;
2083  MarkPropertyChanged(AIndex);
2084end;
2085
2086
2087//2.6.4. bug workaround
2088{$IFDEF VER2_6}
2089Procedure TStyleSettingList.SetArrayLength(Const AName : String; ALength : Longint);
2090
2091begin
2092  Case AName of
2093  'items' : SetLength(Fitems,ALength);
2094  else
2095    Inherited SetArrayLength(AName,ALength);
2096  end;
2097end;
2098{$ENDIF VER2_6}
2099
2100
2101
2102
2103{ --------------------------------------------------------------------
2104  TTable
2105  --------------------------------------------------------------------}
2106
2107
2108Procedure TTable.Setattribution(AIndex : Integer; const AValue : String);
2109
2110begin
2111  If (Fattribution=AValue) then exit;
2112  Fattribution:=AValue;
2113  MarkPropertyChanged(AIndex);
2114end;
2115
2116
2117
2118Procedure TTable.SetattributionLink(AIndex : Integer; const AValue : String);
2119
2120begin
2121  If (FattributionLink=AValue) then exit;
2122  FattributionLink:=AValue;
2123  MarkPropertyChanged(AIndex);
2124end;
2125
2126
2127
2128Procedure TTable.SetbaseTableIds(AIndex : Integer; const AValue : TStringArray);
2129
2130begin
2131  If (FbaseTableIds=AValue) then exit;
2132  FbaseTableIds:=AValue;
2133  MarkPropertyChanged(AIndex);
2134end;
2135
2136
2137
2138Procedure TTable.SetcolumnPropertiesJsonSchema(AIndex : Integer; const AValue : String);
2139
2140begin
2141  If (FcolumnPropertiesJsonSchema=AValue) then exit;
2142  FcolumnPropertiesJsonSchema:=AValue;
2143  MarkPropertyChanged(AIndex);
2144end;
2145
2146
2147
2148Procedure TTable.Setcolumns(AIndex : Integer; const AValue : TTableTypecolumnsArray);
2149
2150begin
2151  If (Fcolumns=AValue) then exit;
2152  Fcolumns:=AValue;
2153  MarkPropertyChanged(AIndex);
2154end;
2155
2156
2157
2158Procedure TTable.Setdescription(AIndex : Integer; const AValue : String);
2159
2160begin
2161  If (Fdescription=AValue) then exit;
2162  Fdescription:=AValue;
2163  MarkPropertyChanged(AIndex);
2164end;
2165
2166
2167
2168Procedure TTable.SetisExportable(AIndex : Integer; const AValue : boolean);
2169
2170begin
2171  If (FisExportable=AValue) then exit;
2172  FisExportable:=AValue;
2173  MarkPropertyChanged(AIndex);
2174end;
2175
2176
2177
2178Procedure TTable.Setkind(AIndex : Integer; const AValue : String);
2179
2180begin
2181  If (Fkind=AValue) then exit;
2182  Fkind:=AValue;
2183  MarkPropertyChanged(AIndex);
2184end;
2185
2186
2187
2188Procedure TTable.Setname(AIndex : Integer; const AValue : String);
2189
2190begin
2191  If (Fname=AValue) then exit;
2192  Fname:=AValue;
2193  MarkPropertyChanged(AIndex);
2194end;
2195
2196
2197
2198Procedure TTable.Setsql(AIndex : Integer; const AValue : String);
2199
2200begin
2201  If (Fsql=AValue) then exit;
2202  Fsql:=AValue;
2203  MarkPropertyChanged(AIndex);
2204end;
2205
2206
2207
2208Procedure TTable.SettableId(AIndex : Integer; const AValue : String);
2209
2210begin
2211  If (FtableId=AValue) then exit;
2212  FtableId:=AValue;
2213  MarkPropertyChanged(AIndex);
2214end;
2215
2216
2217
2218Procedure TTable.SettablePropertiesJson(AIndex : Integer; const AValue : String);
2219
2220begin
2221  If (FtablePropertiesJson=AValue) then exit;
2222  FtablePropertiesJson:=AValue;
2223  MarkPropertyChanged(AIndex);
2224end;
2225
2226
2227
2228Procedure TTable.SettablePropertiesJsonSchema(AIndex : Integer; const AValue : String);
2229
2230begin
2231  If (FtablePropertiesJsonSchema=AValue) then exit;
2232  FtablePropertiesJsonSchema:=AValue;
2233  MarkPropertyChanged(AIndex);
2234end;
2235
2236
2237//2.6.4. bug workaround
2238{$IFDEF VER2_6}
2239Procedure TTable.SetArrayLength(Const AName : String; ALength : Longint);
2240
2241begin
2242  Case AName of
2243  'basetableids' : SetLength(FbaseTableIds,ALength);
2244  'columns' : SetLength(Fcolumns,ALength);
2245  else
2246    Inherited SetArrayLength(AName,ALength);
2247  end;
2248end;
2249{$ENDIF VER2_6}
2250
2251
2252
2253
2254{ --------------------------------------------------------------------
2255  TTableList
2256  --------------------------------------------------------------------}
2257
2258
2259Procedure TTableList.Setitems(AIndex : Integer; const AValue : TTableListTypeitemsArray);
2260
2261begin
2262  If (Fitems=AValue) then exit;
2263  Fitems:=AValue;
2264  MarkPropertyChanged(AIndex);
2265end;
2266
2267
2268
2269Procedure TTableList.Setkind(AIndex : Integer; const AValue : String);
2270
2271begin
2272  If (Fkind=AValue) then exit;
2273  Fkind:=AValue;
2274  MarkPropertyChanged(AIndex);
2275end;
2276
2277
2278
2279Procedure TTableList.SetnextPageToken(AIndex : Integer; const AValue : String);
2280
2281begin
2282  If (FnextPageToken=AValue) then exit;
2283  FnextPageToken:=AValue;
2284  MarkPropertyChanged(AIndex);
2285end;
2286
2287
2288//2.6.4. bug workaround
2289{$IFDEF VER2_6}
2290Procedure TTableList.SetArrayLength(Const AName : String; ALength : Longint);
2291
2292begin
2293  Case AName of
2294  'items' : SetLength(Fitems,ALength);
2295  else
2296    Inherited SetArrayLength(AName,ALength);
2297  end;
2298end;
2299{$ENDIF VER2_6}
2300
2301
2302
2303
2304{ --------------------------------------------------------------------
2305  TTask
2306  --------------------------------------------------------------------}
2307
2308
2309Procedure TTask.Setkind(AIndex : Integer; const AValue : String);
2310
2311begin
2312  If (Fkind=AValue) then exit;
2313  Fkind:=AValue;
2314  MarkPropertyChanged(AIndex);
2315end;
2316
2317
2318
2319Procedure TTask.Setprogress(AIndex : Integer; const AValue : String);
2320
2321begin
2322  If (Fprogress=AValue) then exit;
2323  Fprogress:=AValue;
2324  MarkPropertyChanged(AIndex);
2325end;
2326
2327
2328
2329Procedure TTask.Setstarted(AIndex : Integer; const AValue : boolean);
2330
2331begin
2332  If (Fstarted=AValue) then exit;
2333  Fstarted:=AValue;
2334  MarkPropertyChanged(AIndex);
2335end;
2336
2337
2338
2339Procedure TTask.SettaskId(AIndex : Integer; const AValue : String);
2340
2341begin
2342  If (FtaskId=AValue) then exit;
2343  FtaskId:=AValue;
2344  MarkPropertyChanged(AIndex);
2345end;
2346
2347
2348
2349Procedure TTask.Set_type(AIndex : Integer; const AValue : String);
2350
2351begin
2352  If (F_type=AValue) then exit;
2353  F_type:=AValue;
2354  MarkPropertyChanged(AIndex);
2355end;
2356
2357
2358
2359Class Function TTask.ExportPropertyName(Const AName : String) :String;
2360
2361begin
2362  Case AName of
2363  '_type' : Result:='type';
2364  else
2365    Result:=Inherited ExportPropertyName(AName);
2366  end;
2367end;
2368
2369
2370
2371
2372{ --------------------------------------------------------------------
2373  TTaskList
2374  --------------------------------------------------------------------}
2375
2376
2377Procedure TTaskList.Setitems(AIndex : Integer; const AValue : TTaskListTypeitemsArray);
2378
2379begin
2380  If (Fitems=AValue) then exit;
2381  Fitems:=AValue;
2382  MarkPropertyChanged(AIndex);
2383end;
2384
2385
2386
2387Procedure TTaskList.Setkind(AIndex : Integer; const AValue : String);
2388
2389begin
2390  If (Fkind=AValue) then exit;
2391  Fkind:=AValue;
2392  MarkPropertyChanged(AIndex);
2393end;
2394
2395
2396
2397Procedure TTaskList.SetnextPageToken(AIndex : Integer; const AValue : String);
2398
2399begin
2400  If (FnextPageToken=AValue) then exit;
2401  FnextPageToken:=AValue;
2402  MarkPropertyChanged(AIndex);
2403end;
2404
2405
2406
2407Procedure TTaskList.SettotalItems(AIndex : Integer; const AValue : integer);
2408
2409begin
2410  If (FtotalItems=AValue) then exit;
2411  FtotalItems:=AValue;
2412  MarkPropertyChanged(AIndex);
2413end;
2414
2415
2416//2.6.4. bug workaround
2417{$IFDEF VER2_6}
2418Procedure TTaskList.SetArrayLength(Const AName : String; ALength : Longint);
2419
2420begin
2421  Case AName of
2422  'items' : SetLength(Fitems,ALength);
2423  else
2424    Inherited SetArrayLength(AName,ALength);
2425  end;
2426end;
2427{$ENDIF VER2_6}
2428
2429
2430
2431
2432{ --------------------------------------------------------------------
2433  TTemplate
2434  --------------------------------------------------------------------}
2435
2436
2437Procedure TTemplate.SetautomaticColumnNames(AIndex : Integer; const AValue : TStringArray);
2438
2439begin
2440  If (FautomaticColumnNames=AValue) then exit;
2441  FautomaticColumnNames:=AValue;
2442  MarkPropertyChanged(AIndex);
2443end;
2444
2445
2446
2447Procedure TTemplate.Setbody(AIndex : Integer; const AValue : String);
2448
2449begin
2450  If (Fbody=AValue) then exit;
2451  Fbody:=AValue;
2452  MarkPropertyChanged(AIndex);
2453end;
2454
2455
2456
2457Procedure TTemplate.Setkind(AIndex : Integer; const AValue : String);
2458
2459begin
2460  If (Fkind=AValue) then exit;
2461  Fkind:=AValue;
2462  MarkPropertyChanged(AIndex);
2463end;
2464
2465
2466
2467Procedure TTemplate.Setname(AIndex : Integer; const AValue : String);
2468
2469begin
2470  If (Fname=AValue) then exit;
2471  Fname:=AValue;
2472  MarkPropertyChanged(AIndex);
2473end;
2474
2475
2476
2477Procedure TTemplate.SettableId(AIndex : Integer; const AValue : String);
2478
2479begin
2480  If (FtableId=AValue) then exit;
2481  FtableId:=AValue;
2482  MarkPropertyChanged(AIndex);
2483end;
2484
2485
2486
2487Procedure TTemplate.SettemplateId(AIndex : Integer; const AValue : integer);
2488
2489begin
2490  If (FtemplateId=AValue) then exit;
2491  FtemplateId:=AValue;
2492  MarkPropertyChanged(AIndex);
2493end;
2494
2495
2496//2.6.4. bug workaround
2497{$IFDEF VER2_6}
2498Procedure TTemplate.SetArrayLength(Const AName : String; ALength : Longint);
2499
2500begin
2501  Case AName of
2502  'automaticcolumnnames' : SetLength(FautomaticColumnNames,ALength);
2503  else
2504    Inherited SetArrayLength(AName,ALength);
2505  end;
2506end;
2507{$ENDIF VER2_6}
2508
2509
2510
2511
2512{ --------------------------------------------------------------------
2513  TTemplateList
2514  --------------------------------------------------------------------}
2515
2516
2517Procedure TTemplateList.Setitems(AIndex : Integer; const AValue : TTemplateListTypeitemsArray);
2518
2519begin
2520  If (Fitems=AValue) then exit;
2521  Fitems:=AValue;
2522  MarkPropertyChanged(AIndex);
2523end;
2524
2525
2526
2527Procedure TTemplateList.Setkind(AIndex : Integer; const AValue : String);
2528
2529begin
2530  If (Fkind=AValue) then exit;
2531  Fkind:=AValue;
2532  MarkPropertyChanged(AIndex);
2533end;
2534
2535
2536
2537Procedure TTemplateList.SetnextPageToken(AIndex : Integer; const AValue : String);
2538
2539begin
2540  If (FnextPageToken=AValue) then exit;
2541  FnextPageToken:=AValue;
2542  MarkPropertyChanged(AIndex);
2543end;
2544
2545
2546
2547Procedure TTemplateList.SettotalItems(AIndex : Integer; const AValue : integer);
2548
2549begin
2550  If (FtotalItems=AValue) then exit;
2551  FtotalItems:=AValue;
2552  MarkPropertyChanged(AIndex);
2553end;
2554
2555
2556//2.6.4. bug workaround
2557{$IFDEF VER2_6}
2558Procedure TTemplateList.SetArrayLength(Const AName : String; ALength : Longint);
2559
2560begin
2561  Case AName of
2562  'items' : SetLength(Fitems,ALength);
2563  else
2564    Inherited SetArrayLength(AName,ALength);
2565  end;
2566end;
2567{$ENDIF VER2_6}
2568
2569
2570
2571
2572{ --------------------------------------------------------------------
2573  TColumnResource
2574  --------------------------------------------------------------------}
2575
2576
2577Class Function TColumnResource.ResourceName : String;
2578
2579begin
2580  Result:='column';
2581end;
2582
2583Class Function TColumnResource.DefaultAPI : TGoogleAPIClass;
2584
2585begin
2586  Result:=TfusiontablesAPI;
2587end;
2588
2589Procedure TColumnResource.Delete(columnId: string; tableId: string);
2590
2591Const
2592  _HTTPMethod = 'DELETE';
2593  _Path       = 'tables/{tableId}/columns/{columnId}';
2594  _Methodid   = 'fusiontables.column.delete';
2595
2596Var
2597  _P : String;
2598
2599begin
2600  _P:=SubstitutePath(_Path,['columnId',columnId,'tableId',tableId]);
2601  ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
2602end;
2603
2604Function TColumnResource.Get(columnId: string; tableId: string) : TColumn;
2605
2606Const
2607  _HTTPMethod = 'GET';
2608  _Path       = 'tables/{tableId}/columns/{columnId}';
2609  _Methodid   = 'fusiontables.column.get';
2610
2611Var
2612  _P : String;
2613
2614begin
2615  _P:=SubstitutePath(_Path,['columnId',columnId,'tableId',tableId]);
2616  Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TColumn) as TColumn;
2617end;
2618
2619Function TColumnResource.Insert(tableId: string; aColumn : TColumn) : TColumn;
2620
2621Const
2622  _HTTPMethod = 'POST';
2623  _Path       = 'tables/{tableId}/columns';
2624  _Methodid   = 'fusiontables.column.insert';
2625
2626Var
2627  _P : String;
2628
2629begin
2630  _P:=SubstitutePath(_Path,['tableId',tableId]);
2631  Result:=ServiceCall(_HTTPMethod,_P,'',aColumn,TColumn) as TColumn;
2632end;
2633
2634Function TColumnResource.List(tableId: string; AQuery : string = '') : TColumnList;
2635
2636Const
2637  _HTTPMethod = 'GET';
2638  _Path       = 'tables/{tableId}/columns';
2639  _Methodid   = 'fusiontables.column.list';
2640
2641Var
2642  _P : String;
2643
2644begin
2645  _P:=SubstitutePath(_Path,['tableId',tableId]);
2646  Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TColumnList) as TColumnList;
2647end;
2648
2649
2650Function TColumnResource.List(tableId: string; AQuery : TColumnlistOptions) : TColumnList;
2651
2652Var
2653  _Q : String;
2654
2655begin
2656  _Q:='';
2657  AddToQuery(_Q,'maxResults',AQuery.maxResults);
2658  AddToQuery(_Q,'pageToken',AQuery.pageToken);
2659  Result:=List(tableId,_Q);
2660end;
2661
2662Function TColumnResource.Patch(columnId: string; tableId: string; aColumn : TColumn) : TColumn;
2663
2664Const
2665  _HTTPMethod = 'PATCH';
2666  _Path       = 'tables/{tableId}/columns/{columnId}';
2667  _Methodid   = 'fusiontables.column.patch';
2668
2669Var
2670  _P : String;
2671
2672begin
2673  _P:=SubstitutePath(_Path,['columnId',columnId,'tableId',tableId]);
2674  Result:=ServiceCall(_HTTPMethod,_P,'',aColumn,TColumn) as TColumn;
2675end;
2676
2677Function TColumnResource.Update(columnId: string; tableId: string; aColumn : TColumn) : TColumn;
2678
2679Const
2680  _HTTPMethod = 'PUT';
2681  _Path       = 'tables/{tableId}/columns/{columnId}';
2682  _Methodid   = 'fusiontables.column.update';
2683
2684Var
2685  _P : String;
2686
2687begin
2688  _P:=SubstitutePath(_Path,['columnId',columnId,'tableId',tableId]);
2689  Result:=ServiceCall(_HTTPMethod,_P,'',aColumn,TColumn) as TColumn;
2690end;
2691
2692
2693
2694{ --------------------------------------------------------------------
2695  TQueryResource
2696  --------------------------------------------------------------------}
2697
2698
2699Class Function TQueryResource.ResourceName : String;
2700
2701begin
2702  Result:='query';
2703end;
2704
2705Class Function TQueryResource.DefaultAPI : TGoogleAPIClass;
2706
2707begin
2708  Result:=TfusiontablesAPI;
2709end;
2710
2711Function TQueryResource.Sql(AQuery : string = '') : TSqlresponse;
2712
2713Const
2714  _HTTPMethod = 'POST';
2715  _Path       = 'query';
2716  _Methodid   = 'fusiontables.query.sql';
2717
2718begin
2719  Result:=ServiceCall(_HTTPMethod,_Path,AQuery,Nil,TSqlresponse) as TSqlresponse;
2720end;
2721
2722
2723Function TQueryResource.Sql(AQuery : TQuerysqlOptions) : TSqlresponse;
2724
2725Var
2726  _Q : String;
2727
2728begin
2729  _Q:='';
2730  AddToQuery(_Q,'hdrs',AQuery.hdrs);
2731  AddToQuery(_Q,'sql',AQuery.sql);
2732  AddToQuery(_Q,'typed',AQuery.typed);
2733  Result:=Sql(_Q);
2734end;
2735
2736Function TQueryResource.SqlGet(AQuery : string = '') : TSqlresponse;
2737
2738Const
2739  _HTTPMethod = 'GET';
2740  _Path       = 'query';
2741  _Methodid   = 'fusiontables.query.sqlGet';
2742
2743begin
2744  Result:=ServiceCall(_HTTPMethod,_Path,AQuery,Nil,TSqlresponse) as TSqlresponse;
2745end;
2746
2747
2748Function TQueryResource.SqlGet(AQuery : TQuerysqlGetOptions) : TSqlresponse;
2749
2750Var
2751  _Q : String;
2752
2753begin
2754  _Q:='';
2755  AddToQuery(_Q,'hdrs',AQuery.hdrs);
2756  AddToQuery(_Q,'sql',AQuery.sql);
2757  AddToQuery(_Q,'typed',AQuery.typed);
2758  Result:=SqlGet(_Q);
2759end;
2760
2761
2762
2763{ --------------------------------------------------------------------
2764  TStyleResource
2765  --------------------------------------------------------------------}
2766
2767
2768Class Function TStyleResource.ResourceName : String;
2769
2770begin
2771  Result:='style';
2772end;
2773
2774Class Function TStyleResource.DefaultAPI : TGoogleAPIClass;
2775
2776begin
2777  Result:=TfusiontablesAPI;
2778end;
2779
2780Procedure TStyleResource.Delete(styleId: integer; tableId: string);
2781
2782Const
2783  _HTTPMethod = 'DELETE';
2784  _Path       = 'tables/{tableId}/styles/{styleId}';
2785  _Methodid   = 'fusiontables.style.delete';
2786
2787Var
2788  _P : String;
2789
2790begin
2791  _P:=SubstitutePath(_Path,['styleId',styleId,'tableId',tableId]);
2792  ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
2793end;
2794
2795Function TStyleResource.Get(styleId: integer; tableId: string) : TStyleSetting;
2796
2797Const
2798  _HTTPMethod = 'GET';
2799  _Path       = 'tables/{tableId}/styles/{styleId}';
2800  _Methodid   = 'fusiontables.style.get';
2801
2802Var
2803  _P : String;
2804
2805begin
2806  _P:=SubstitutePath(_Path,['styleId',styleId,'tableId',tableId]);
2807  Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TStyleSetting) as TStyleSetting;
2808end;
2809
2810Function TStyleResource.Insert(tableId: string; aStyleSetting : TStyleSetting) : TStyleSetting;
2811
2812Const
2813  _HTTPMethod = 'POST';
2814  _Path       = 'tables/{tableId}/styles';
2815  _Methodid   = 'fusiontables.style.insert';
2816
2817Var
2818  _P : String;
2819
2820begin
2821  _P:=SubstitutePath(_Path,['tableId',tableId]);
2822  Result:=ServiceCall(_HTTPMethod,_P,'',aStyleSetting,TStyleSetting) as TStyleSetting;
2823end;
2824
2825Function TStyleResource.List(tableId: string; AQuery : string = '') : TStyleSettingList;
2826
2827Const
2828  _HTTPMethod = 'GET';
2829  _Path       = 'tables/{tableId}/styles';
2830  _Methodid   = 'fusiontables.style.list';
2831
2832Var
2833  _P : String;
2834
2835begin
2836  _P:=SubstitutePath(_Path,['tableId',tableId]);
2837  Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TStyleSettingList) as TStyleSettingList;
2838end;
2839
2840
2841Function TStyleResource.List(tableId: string; AQuery : TStylelistOptions) : TStyleSettingList;
2842
2843Var
2844  _Q : String;
2845
2846begin
2847  _Q:='';
2848  AddToQuery(_Q,'maxResults',AQuery.maxResults);
2849  AddToQuery(_Q,'pageToken',AQuery.pageToken);
2850  Result:=List(tableId,_Q);
2851end;
2852
2853Function TStyleResource.Patch(styleId: integer; tableId: string; aStyleSetting : TStyleSetting) : TStyleSetting;
2854
2855Const
2856  _HTTPMethod = 'PATCH';
2857  _Path       = 'tables/{tableId}/styles/{styleId}';
2858  _Methodid   = 'fusiontables.style.patch';
2859
2860Var
2861  _P : String;
2862
2863begin
2864  _P:=SubstitutePath(_Path,['styleId',styleId,'tableId',tableId]);
2865  Result:=ServiceCall(_HTTPMethod,_P,'',aStyleSetting,TStyleSetting) as TStyleSetting;
2866end;
2867
2868Function TStyleResource.Update(styleId: integer; tableId: string; aStyleSetting : TStyleSetting) : TStyleSetting;
2869
2870Const
2871  _HTTPMethod = 'PUT';
2872  _Path       = 'tables/{tableId}/styles/{styleId}';
2873  _Methodid   = 'fusiontables.style.update';
2874
2875Var
2876  _P : String;
2877
2878begin
2879  _P:=SubstitutePath(_Path,['styleId',styleId,'tableId',tableId]);
2880  Result:=ServiceCall(_HTTPMethod,_P,'',aStyleSetting,TStyleSetting) as TStyleSetting;
2881end;
2882
2883
2884
2885{ --------------------------------------------------------------------
2886  TTableResource
2887  --------------------------------------------------------------------}
2888
2889
2890Class Function TTableResource.ResourceName : String;
2891
2892begin
2893  Result:='table';
2894end;
2895
2896Class Function TTableResource.DefaultAPI : TGoogleAPIClass;
2897
2898begin
2899  Result:=TfusiontablesAPI;
2900end;
2901
2902Function TTableResource.Copy(tableId: string; AQuery : string = '') : TTable;
2903
2904Const
2905  _HTTPMethod = 'POST';
2906  _Path       = 'tables/{tableId}/copy';
2907  _Methodid   = 'fusiontables.table.copy';
2908
2909Var
2910  _P : String;
2911
2912begin
2913  _P:=SubstitutePath(_Path,['tableId',tableId]);
2914  Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TTable) as TTable;
2915end;
2916
2917
2918Function TTableResource.Copy(tableId: string; AQuery : TTablecopyOptions) : TTable;
2919
2920Var
2921  _Q : String;
2922
2923begin
2924  _Q:='';
2925  AddToQuery(_Q,'copyPresentation',AQuery.copyPresentation);
2926  Result:=Copy(tableId,_Q);
2927end;
2928
2929Procedure TTableResource.Delete(tableId: string);
2930
2931Const
2932  _HTTPMethod = 'DELETE';
2933  _Path       = 'tables/{tableId}';
2934  _Methodid   = 'fusiontables.table.delete';
2935
2936Var
2937  _P : String;
2938
2939begin
2940  _P:=SubstitutePath(_Path,['tableId',tableId]);
2941  ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
2942end;
2943
2944Function TTableResource.Get(tableId: string) : TTable;
2945
2946Const
2947  _HTTPMethod = 'GET';
2948  _Path       = 'tables/{tableId}';
2949  _Methodid   = 'fusiontables.table.get';
2950
2951Var
2952  _P : String;
2953
2954begin
2955  _P:=SubstitutePath(_Path,['tableId',tableId]);
2956  Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TTable) as TTable;
2957end;
2958
2959Function TTableResource.ImportRows(tableId: string; AQuery : string = '') : TImport;
2960
2961Const
2962  _HTTPMethod = 'POST';
2963  _Path       = 'tables/{tableId}/import';
2964  _Methodid   = 'fusiontables.table.importRows';
2965
2966Var
2967  _P : String;
2968
2969begin
2970  _P:=SubstitutePath(_Path,['tableId',tableId]);
2971  Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TImport) as TImport;
2972end;
2973
2974
2975Function TTableResource.ImportRows(tableId: string; AQuery : TTableimportRowsOptions) : TImport;
2976
2977Var
2978  _Q : String;
2979
2980begin
2981  _Q:='';
2982  AddToQuery(_Q,'delimiter',AQuery.delimiter);
2983  AddToQuery(_Q,'encoding',AQuery.encoding);
2984  AddToQuery(_Q,'endLine',AQuery.endLine);
2985  AddToQuery(_Q,'isStrict',AQuery.isStrict);
2986  AddToQuery(_Q,'startLine',AQuery.startLine);
2987  Result:=ImportRows(tableId,_Q);
2988end;
2989
2990Function TTableResource.ImportTable(AQuery : string = '') : TTable;
2991
2992Const
2993  _HTTPMethod = 'POST';
2994  _Path       = 'tables/import';
2995  _Methodid   = 'fusiontables.table.importTable';
2996
2997begin
2998  Result:=ServiceCall(_HTTPMethod,_Path,AQuery,Nil,TTable) as TTable;
2999end;
3000
3001
3002Function TTableResource.ImportTable(AQuery : TTableimportTableOptions) : TTable;
3003
3004Var
3005  _Q : String;
3006
3007begin
3008  _Q:='';
3009  AddToQuery(_Q,'delimiter',AQuery.delimiter);
3010  AddToQuery(_Q,'encoding',AQuery.encoding);
3011  AddToQuery(_Q,'name',AQuery._name);
3012  Result:=ImportTable(_Q);
3013end;
3014
3015Function TTableResource.Insert(aTable : TTable) : TTable;
3016
3017Const
3018  _HTTPMethod = 'POST';
3019  _Path       = 'tables';
3020  _Methodid   = 'fusiontables.table.insert';
3021
3022begin
3023  Result:=ServiceCall(_HTTPMethod,_Path,'',aTable,TTable) as TTable;
3024end;
3025
3026Function TTableResource.List(AQuery : string = '') : TTableList;
3027
3028Const
3029  _HTTPMethod = 'GET';
3030  _Path       = 'tables';
3031  _Methodid   = 'fusiontables.table.list';
3032
3033begin
3034  Result:=ServiceCall(_HTTPMethod,_Path,AQuery,Nil,TTableList) as TTableList;
3035end;
3036
3037
3038Function TTableResource.List(AQuery : TTablelistOptions) : TTableList;
3039
3040Var
3041  _Q : String;
3042
3043begin
3044  _Q:='';
3045  AddToQuery(_Q,'maxResults',AQuery.maxResults);
3046  AddToQuery(_Q,'pageToken',AQuery.pageToken);
3047  Result:=List(_Q);
3048end;
3049
3050Function TTableResource.Patch(tableId: string; aTable : TTable; AQuery : string = '') : TTable;
3051
3052Const
3053  _HTTPMethod = 'PATCH';
3054  _Path       = 'tables/{tableId}';
3055  _Methodid   = 'fusiontables.table.patch';
3056
3057Var
3058  _P : String;
3059
3060begin
3061  _P:=SubstitutePath(_Path,['tableId',tableId]);
3062  Result:=ServiceCall(_HTTPMethod,_P,AQuery,aTable,TTable) as TTable;
3063end;
3064
3065
3066Function TTableResource.Patch(tableId: string; aTable : TTable; AQuery : TTablepatchOptions) : TTable;
3067
3068Var
3069  _Q : String;
3070
3071begin
3072  _Q:='';
3073  AddToQuery(_Q,'replaceViewDefinition',AQuery.replaceViewDefinition);
3074  Result:=Patch(tableId,aTable,_Q);
3075end;
3076
3077Function TTableResource.ReplaceRows(tableId: string; AQuery : string = '') : TTask;
3078
3079Const
3080  _HTTPMethod = 'POST';
3081  _Path       = 'tables/{tableId}/replace';
3082  _Methodid   = 'fusiontables.table.replaceRows';
3083
3084Var
3085  _P : String;
3086
3087begin
3088  _P:=SubstitutePath(_Path,['tableId',tableId]);
3089  Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TTask) as TTask;
3090end;
3091
3092
3093Function TTableResource.ReplaceRows(tableId: string; AQuery : TTablereplaceRowsOptions) : TTask;
3094
3095Var
3096  _Q : String;
3097
3098begin
3099  _Q:='';
3100  AddToQuery(_Q,'delimiter',AQuery.delimiter);
3101  AddToQuery(_Q,'encoding',AQuery.encoding);
3102  AddToQuery(_Q,'endLine',AQuery.endLine);
3103  AddToQuery(_Q,'isStrict',AQuery.isStrict);
3104  AddToQuery(_Q,'startLine',AQuery.startLine);
3105  Result:=ReplaceRows(tableId,_Q);
3106end;
3107
3108Function TTableResource.Update(tableId: string; aTable : TTable; AQuery : string = '') : TTable;
3109
3110Const
3111  _HTTPMethod = 'PUT';
3112  _Path       = 'tables/{tableId}';
3113  _Methodid   = 'fusiontables.table.update';
3114
3115Var
3116  _P : String;
3117
3118begin
3119  _P:=SubstitutePath(_Path,['tableId',tableId]);
3120  Result:=ServiceCall(_HTTPMethod,_P,AQuery,aTable,TTable) as TTable;
3121end;
3122
3123
3124Function TTableResource.Update(tableId: string; aTable : TTable; AQuery : TTableupdateOptions) : TTable;
3125
3126Var
3127  _Q : String;
3128
3129begin
3130  _Q:='';
3131  AddToQuery(_Q,'replaceViewDefinition',AQuery.replaceViewDefinition);
3132  Result:=Update(tableId,aTable,_Q);
3133end;
3134
3135
3136
3137{ --------------------------------------------------------------------
3138  TTaskResource
3139  --------------------------------------------------------------------}
3140
3141
3142Class Function TTaskResource.ResourceName : String;
3143
3144begin
3145  Result:='task';
3146end;
3147
3148Class Function TTaskResource.DefaultAPI : TGoogleAPIClass;
3149
3150begin
3151  Result:=TfusiontablesAPI;
3152end;
3153
3154Procedure TTaskResource.Delete(tableId: string; taskId: string);
3155
3156Const
3157  _HTTPMethod = 'DELETE';
3158  _Path       = 'tables/{tableId}/tasks/{taskId}';
3159  _Methodid   = 'fusiontables.task.delete';
3160
3161Var
3162  _P : String;
3163
3164begin
3165  _P:=SubstitutePath(_Path,['tableId',tableId,'taskId',taskId]);
3166  ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
3167end;
3168
3169Function TTaskResource.Get(tableId: string; taskId: string) : TTask;
3170
3171Const
3172  _HTTPMethod = 'GET';
3173  _Path       = 'tables/{tableId}/tasks/{taskId}';
3174  _Methodid   = 'fusiontables.task.get';
3175
3176Var
3177  _P : String;
3178
3179begin
3180  _P:=SubstitutePath(_Path,['tableId',tableId,'taskId',taskId]);
3181  Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TTask) as TTask;
3182end;
3183
3184Function TTaskResource.List(tableId: string; AQuery : string = '') : TTaskList;
3185
3186Const
3187  _HTTPMethod = 'GET';
3188  _Path       = 'tables/{tableId}/tasks';
3189  _Methodid   = 'fusiontables.task.list';
3190
3191Var
3192  _P : String;
3193
3194begin
3195  _P:=SubstitutePath(_Path,['tableId',tableId]);
3196  Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TTaskList) as TTaskList;
3197end;
3198
3199
3200Function TTaskResource.List(tableId: string; AQuery : TTasklistOptions) : TTaskList;
3201
3202Var
3203  _Q : String;
3204
3205begin
3206  _Q:='';
3207  AddToQuery(_Q,'maxResults',AQuery.maxResults);
3208  AddToQuery(_Q,'pageToken',AQuery.pageToken);
3209  AddToQuery(_Q,'startIndex',AQuery.startIndex);
3210  Result:=List(tableId,_Q);
3211end;
3212
3213
3214
3215{ --------------------------------------------------------------------
3216  TTemplateResource
3217  --------------------------------------------------------------------}
3218
3219
3220Class Function TTemplateResource.ResourceName : String;
3221
3222begin
3223  Result:='template';
3224end;
3225
3226Class Function TTemplateResource.DefaultAPI : TGoogleAPIClass;
3227
3228begin
3229  Result:=TfusiontablesAPI;
3230end;
3231
3232Procedure TTemplateResource.Delete(tableId: string; templateId: integer);
3233
3234Const
3235  _HTTPMethod = 'DELETE';
3236  _Path       = 'tables/{tableId}/templates/{templateId}';
3237  _Methodid   = 'fusiontables.template.delete';
3238
3239Var
3240  _P : String;
3241
3242begin
3243  _P:=SubstitutePath(_Path,['tableId',tableId,'templateId',templateId]);
3244  ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
3245end;
3246
3247Function TTemplateResource.Get(tableId: string; templateId: integer) : TTemplate;
3248
3249Const
3250  _HTTPMethod = 'GET';
3251  _Path       = 'tables/{tableId}/templates/{templateId}';
3252  _Methodid   = 'fusiontables.template.get';
3253
3254Var
3255  _P : String;
3256
3257begin
3258  _P:=SubstitutePath(_Path,['tableId',tableId,'templateId',templateId]);
3259  Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TTemplate) as TTemplate;
3260end;
3261
3262Function TTemplateResource.Insert(tableId: string; aTemplate : TTemplate) : TTemplate;
3263
3264Const
3265  _HTTPMethod = 'POST';
3266  _Path       = 'tables/{tableId}/templates';
3267  _Methodid   = 'fusiontables.template.insert';
3268
3269Var
3270  _P : String;
3271
3272begin
3273  _P:=SubstitutePath(_Path,['tableId',tableId]);
3274  Result:=ServiceCall(_HTTPMethod,_P,'',aTemplate,TTemplate) as TTemplate;
3275end;
3276
3277Function TTemplateResource.List(tableId: string; AQuery : string = '') : TTemplateList;
3278
3279Const
3280  _HTTPMethod = 'GET';
3281  _Path       = 'tables/{tableId}/templates';
3282  _Methodid   = 'fusiontables.template.list';
3283
3284Var
3285  _P : String;
3286
3287begin
3288  _P:=SubstitutePath(_Path,['tableId',tableId]);
3289  Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TTemplateList) as TTemplateList;
3290end;
3291
3292
3293Function TTemplateResource.List(tableId: string; AQuery : TTemplatelistOptions) : TTemplateList;
3294
3295Var
3296  _Q : String;
3297
3298begin
3299  _Q:='';
3300  AddToQuery(_Q,'maxResults',AQuery.maxResults);
3301  AddToQuery(_Q,'pageToken',AQuery.pageToken);
3302  Result:=List(tableId,_Q);
3303end;
3304
3305Function TTemplateResource.Patch(tableId: string; templateId: integer; aTemplate : TTemplate) : TTemplate;
3306
3307Const
3308  _HTTPMethod = 'PATCH';
3309  _Path       = 'tables/{tableId}/templates/{templateId}';
3310  _Methodid   = 'fusiontables.template.patch';
3311
3312Var
3313  _P : String;
3314
3315begin
3316  _P:=SubstitutePath(_Path,['tableId',tableId,'templateId',templateId]);
3317  Result:=ServiceCall(_HTTPMethod,_P,'',aTemplate,TTemplate) as TTemplate;
3318end;
3319
3320Function TTemplateResource.Update(tableId: string; templateId: integer; aTemplate : TTemplate) : TTemplate;
3321
3322Const
3323  _HTTPMethod = 'PUT';
3324  _Path       = 'tables/{tableId}/templates/{templateId}';
3325  _Methodid   = 'fusiontables.template.update';
3326
3327Var
3328  _P : String;
3329
3330begin
3331  _P:=SubstitutePath(_Path,['tableId',tableId,'templateId',templateId]);
3332  Result:=ServiceCall(_HTTPMethod,_P,'',aTemplate,TTemplate) as TTemplate;
3333end;
3334
3335
3336
3337{ --------------------------------------------------------------------
3338  TFusiontablesAPI
3339  --------------------------------------------------------------------}
3340
3341Class Function TFusiontablesAPI.APIName : String;
3342
3343begin
3344  Result:='fusiontables';
3345end;
3346
3347Class Function TFusiontablesAPI.APIVersion : String;
3348
3349begin
3350  Result:='v2';
3351end;
3352
3353Class Function TFusiontablesAPI.APIRevision : String;
3354
3355begin
3356  Result:='20160317';
3357end;
3358
3359Class Function TFusiontablesAPI.APIID : String;
3360
3361begin
3362  Result:='fusiontables:v2';
3363end;
3364
3365Class Function TFusiontablesAPI.APITitle : String;
3366
3367begin
3368  Result:='Fusion Tables API';
3369end;
3370
3371Class Function TFusiontablesAPI.APIDescription : String;
3372
3373begin
3374  Result:='API for working with Fusion Tables data.';
3375end;
3376
3377Class Function TFusiontablesAPI.APIOwnerDomain : String;
3378
3379begin
3380  Result:='google.com';
3381end;
3382
3383Class Function TFusiontablesAPI.APIOwnerName : String;
3384
3385begin
3386  Result:='Google';
3387end;
3388
3389Class Function TFusiontablesAPI.APIIcon16 : String;
3390
3391begin
3392  Result:='http://www.google.com/images/icons/product/search-16.gif';
3393end;
3394
3395Class Function TFusiontablesAPI.APIIcon32 : String;
3396
3397begin
3398  Result:='http://www.google.com/images/icons/product/search-32.gif';
3399end;
3400
3401Class Function TFusiontablesAPI.APIdocumentationLink : String;
3402
3403begin
3404  Result:='https://developers.google.com/fusiontables';
3405end;
3406
3407Class Function TFusiontablesAPI.APIrootUrl : string;
3408
3409begin
3410  Result:='https://www.googleapis.com/';
3411end;
3412
3413Class Function TFusiontablesAPI.APIbasePath : string;
3414
3415begin
3416  Result:='/fusiontables/v2/';
3417end;
3418
3419Class Function TFusiontablesAPI.APIbaseURL : String;
3420
3421begin
3422  Result:='https://www.googleapis.com/fusiontables/v2/';
3423end;
3424
3425Class Function TFusiontablesAPI.APIProtocol : string;
3426
3427begin
3428  Result:='rest';
3429end;
3430
3431Class Function TFusiontablesAPI.APIservicePath : string;
3432
3433begin
3434  Result:='fusiontables/v2/';
3435end;
3436
3437Class Function TFusiontablesAPI.APIbatchPath : String;
3438
3439begin
3440  Result:='batch';
3441end;
3442
3443Class Function TFusiontablesAPI.APIAuthScopes : TScopeInfoArray;
3444
3445begin
3446  SetLength(Result,2);
3447  Result[0].Name:='https://www.googleapis.com/auth/fusiontables';
3448  Result[0].Description:='Manage your Fusion Tables';
3449  Result[1].Name:='https://www.googleapis.com/auth/fusiontables.readonly';
3450  Result[1].Description:='View your Fusion Tables';
3451
3452end;
3453
3454Class Function TFusiontablesAPI.APINeedsAuth : Boolean;
3455
3456begin
3457  Result:=True;
3458end;
3459
3460Class Procedure TFusiontablesAPI.RegisterAPIResources;
3461
3462begin
3463  TBucket.RegisterObject;
3464  TColumnTypebaseColumn.RegisterObject;
3465  TColumn.RegisterObject;
3466  TColumnList.RegisterObject;
3467  TGeometry.RegisterObject;
3468  TImport.RegisterObject;
3469  TLine.RegisterObject;
3470  TLineStyle.RegisterObject;
3471  TPoint.RegisterObject;
3472  TPointStyle.RegisterObject;
3473  TPolygon.RegisterObject;
3474  TPolygonStyle.RegisterObject;
3475  TSqlresponse.RegisterObject;
3476  TStyleFunctionTypegradientTypecolorsItem.RegisterObject;
3477  TStyleFunctionTypegradient.RegisterObject;
3478  TStyleFunction.RegisterObject;
3479  TStyleSetting.RegisterObject;
3480  TStyleSettingList.RegisterObject;
3481  TTable.RegisterObject;
3482  TTableList.RegisterObject;
3483  TTask.RegisterObject;
3484  TTaskList.RegisterObject;
3485  TTemplate.RegisterObject;
3486  TTemplateList.RegisterObject;
3487end;
3488
3489
3490Function TFusiontablesAPI.GetColumnInstance : TColumnResource;
3491
3492begin
3493  if (FColumnInstance=Nil) then
3494    FColumnInstance:=CreateColumnResource;
3495  Result:=FColumnInstance;
3496end;
3497
3498Function TFusiontablesAPI.CreateColumnResource : TColumnResource;
3499
3500begin
3501  Result:=CreateColumnResource(Self);
3502end;
3503
3504
3505Function TFusiontablesAPI.CreateColumnResource(AOwner : TComponent) : TColumnResource;
3506
3507begin
3508  Result:=TColumnResource.Create(AOwner);
3509  Result.API:=Self.API;
3510end;
3511
3512
3513
3514Function TFusiontablesAPI.GetQueryInstance : TQueryResource;
3515
3516begin
3517  if (FQueryInstance=Nil) then
3518    FQueryInstance:=CreateQueryResource;
3519  Result:=FQueryInstance;
3520end;
3521
3522Function TFusiontablesAPI.CreateQueryResource : TQueryResource;
3523
3524begin
3525  Result:=CreateQueryResource(Self);
3526end;
3527
3528
3529Function TFusiontablesAPI.CreateQueryResource(AOwner : TComponent) : TQueryResource;
3530
3531begin
3532  Result:=TQueryResource.Create(AOwner);
3533  Result.API:=Self.API;
3534end;
3535
3536
3537
3538Function TFusiontablesAPI.GetStyleInstance : TStyleResource;
3539
3540begin
3541  if (FStyleInstance=Nil) then
3542    FStyleInstance:=CreateStyleResource;
3543  Result:=FStyleInstance;
3544end;
3545
3546Function TFusiontablesAPI.CreateStyleResource : TStyleResource;
3547
3548begin
3549  Result:=CreateStyleResource(Self);
3550end;
3551
3552
3553Function TFusiontablesAPI.CreateStyleResource(AOwner : TComponent) : TStyleResource;
3554
3555begin
3556  Result:=TStyleResource.Create(AOwner);
3557  Result.API:=Self.API;
3558end;
3559
3560
3561
3562Function TFusiontablesAPI.GetTableInstance : TTableResource;
3563
3564begin
3565  if (FTableInstance=Nil) then
3566    FTableInstance:=CreateTableResource;
3567  Result:=FTableInstance;
3568end;
3569
3570Function TFusiontablesAPI.CreateTableResource : TTableResource;
3571
3572begin
3573  Result:=CreateTableResource(Self);
3574end;
3575
3576
3577Function TFusiontablesAPI.CreateTableResource(AOwner : TComponent) : TTableResource;
3578
3579begin
3580  Result:=TTableResource.Create(AOwner);
3581  Result.API:=Self.API;
3582end;
3583
3584
3585
3586Function TFusiontablesAPI.GetTaskInstance : TTaskResource;
3587
3588begin
3589  if (FTaskInstance=Nil) then
3590    FTaskInstance:=CreateTaskResource;
3591  Result:=FTaskInstance;
3592end;
3593
3594Function TFusiontablesAPI.CreateTaskResource : TTaskResource;
3595
3596begin
3597  Result:=CreateTaskResource(Self);
3598end;
3599
3600
3601Function TFusiontablesAPI.CreateTaskResource(AOwner : TComponent) : TTaskResource;
3602
3603begin
3604  Result:=TTaskResource.Create(AOwner);
3605  Result.API:=Self.API;
3606end;
3607
3608
3609
3610Function TFusiontablesAPI.GetTemplateInstance : TTemplateResource;
3611
3612begin
3613  if (FTemplateInstance=Nil) then
3614    FTemplateInstance:=CreateTemplateResource;
3615  Result:=FTemplateInstance;
3616end;
3617
3618Function TFusiontablesAPI.CreateTemplateResource : TTemplateResource;
3619
3620begin
3621  Result:=CreateTemplateResource(Self);
3622end;
3623
3624
3625Function TFusiontablesAPI.CreateTemplateResource(AOwner : TComponent) : TTemplateResource;
3626
3627begin
3628  Result:=TTemplateResource.Create(AOwner);
3629  Result.API:=Self.API;
3630end;
3631
3632
3633
3634initialization
3635  TFusiontablesAPI.RegisterAPI;
3636end.
3637