googlefusiontables.pp 95 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651
  1. unit googlefusiontables;
  2. {
  3. **********************************************************************
  4. This file is part of the Free Component Library (FCL)
  5. Copyright (c) 2015 The free pascal team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************
  12. }
  13. //Generated on: 16-5-15 08:53:03
  14. {$MODE objfpc}
  15. {$H+}
  16. interface
  17. uses sysutils, classes, googleservice, restbase, googlebase;
  18. type
  19. //Top-level schema types
  20. TBucket = Class;
  21. TColumn = Class;
  22. TColumnList = Class;
  23. TGeometry = Class;
  24. TImport = Class;
  25. TLine = Class;
  26. TLineStyle = Class;
  27. TPoint = Class;
  28. TPointStyle = Class;
  29. TPolygon = Class;
  30. TPolygonStyle = Class;
  31. TSqlresponse = Class;
  32. TStyleFunction = Class;
  33. TStyleSetting = Class;
  34. TStyleSettingList = Class;
  35. TTable = Class;
  36. TTableList = Class;
  37. TTask = Class;
  38. TTaskList = Class;
  39. TTemplate = Class;
  40. TTemplateList = Class;
  41. TBucketArray = Array of TBucket;
  42. TColumnArray = Array of TColumn;
  43. TColumnListArray = Array of TColumnList;
  44. TGeometryArray = Array of TGeometry;
  45. TImportArray = Array of TImport;
  46. TLineArray = Array of TLine;
  47. TLineStyleArray = Array of TLineStyle;
  48. TPointArray = Array of TPoint;
  49. TPointStyleArray = Array of TPointStyle;
  50. TPolygonArray = Array of TPolygon;
  51. TPolygonStyleArray = Array of TPolygonStyle;
  52. TSqlresponseArray = Array of TSqlresponse;
  53. TStyleFunctionArray = Array of TStyleFunction;
  54. TStyleSettingArray = Array of TStyleSetting;
  55. TStyleSettingListArray = Array of TStyleSettingList;
  56. TTableArray = Array of TTable;
  57. TTableListArray = Array of TTableList;
  58. TTaskArray = Array of TTask;
  59. TTaskListArray = Array of TTaskList;
  60. TTemplateArray = Array of TTemplate;
  61. TTemplateListArray = Array of TTemplateList;
  62. //Anonymous types, using auto-generated names
  63. TColumnTypebaseColumn = Class;
  64. TStyleFunctionTypegradientTypecolorsItem = Class;
  65. TStyleFunctionTypegradient = Class;
  66. TColumnListTypeitemsArray = Array of TColumn;
  67. TLineTypecoordinatesArray = Array of TdoubleArray;
  68. TPolygonTypecoordinatesItemArray = Array of TdoubleArray;
  69. TPolygonTypecoordinatesArray = Array of TPolygonTypecoordinatesItemArray;
  70. TSqlresponseTyperowsArray = Array of TTJSONSchemaArray;
  71. TStyleFunctionTypebucketsArray = Array of TBucket;
  72. TStyleFunctionTypegradientTypecolorsArray = Array of TStyleFunctionTypegradientTypecolorsItem;
  73. TStyleSettingListTypeitemsArray = Array of TStyleSetting;
  74. TTableTypecolumnsArray = Array of TColumn;
  75. TTableListTypeitemsArray = Array of TTable;
  76. TTaskListTypeitemsArray = Array of TTask;
  77. TTemplateListTypeitemsArray = Array of TTemplate;
  78. { --------------------------------------------------------------------
  79. TBucket
  80. --------------------------------------------------------------------}
  81. TBucket = Class(TGoogleBaseObject)
  82. Private
  83. Fcolor : String;
  84. Ficon : String;
  85. Fmax : double;
  86. Fmin : double;
  87. Fopacity : double;
  88. Fweight : integer;
  89. Protected
  90. //Property setters
  91. Procedure Setcolor(AIndex : Integer; const AValue : String); virtual;
  92. Procedure Seticon(AIndex : Integer; const AValue : String); virtual;
  93. Procedure Setmax(AIndex : Integer; AValue : double); virtual;
  94. Procedure Setmin(AIndex : Integer; AValue : double); virtual;
  95. Procedure Setopacity(AIndex : Integer; AValue : double); virtual;
  96. Procedure Setweight(AIndex : Integer; AValue : integer); virtual;
  97. Public
  98. Published
  99. Property color : String Index 0 Read Fcolor Write Setcolor;
  100. Property icon : String Index 8 Read Ficon Write Seticon;
  101. Property max : double Index 16 Read Fmax Write Setmax;
  102. Property min : double Index 24 Read Fmin Write Setmin;
  103. Property opacity : double Index 32 Read Fopacity Write Setopacity;
  104. Property weight : integer Index 40 Read Fweight Write Setweight;
  105. end;
  106. TBucketClass = Class of TBucket;
  107. { --------------------------------------------------------------------
  108. TColumnTypebaseColumn
  109. --------------------------------------------------------------------}
  110. TColumnTypebaseColumn = Class(TGoogleBaseObject)
  111. Private
  112. FcolumnId : integer;
  113. FtableIndex : integer;
  114. Protected
  115. //Property setters
  116. Procedure SetcolumnId(AIndex : Integer; AValue : integer); virtual;
  117. Procedure SettableIndex(AIndex : Integer; AValue : integer); virtual;
  118. Public
  119. Published
  120. Property columnId : integer Index 0 Read FcolumnId Write SetcolumnId;
  121. Property tableIndex : integer Index 8 Read FtableIndex Write SettableIndex;
  122. end;
  123. TColumnTypebaseColumnClass = Class of TColumnTypebaseColumn;
  124. { --------------------------------------------------------------------
  125. TColumn
  126. --------------------------------------------------------------------}
  127. TColumn = Class(TGoogleBaseObject)
  128. Private
  129. FbaseColumn : TColumnTypebaseColumn;
  130. FcolumnId : integer;
  131. FcolumnJsonSchema : String;
  132. FcolumnPropertiesJson : String;
  133. Fdescription : String;
  134. FformatPattern : String;
  135. FgraphPredicate : String;
  136. Fkind : String;
  137. Fname : String;
  138. F_type : String;
  139. FvalidValues : TStringArray;
  140. FvalidateData : boolean;
  141. Protected
  142. Class Function ExportPropertyName(Const AName : String) : string; override;
  143. //Property setters
  144. Procedure SetbaseColumn(AIndex : Integer; AValue : TColumnTypebaseColumn); virtual;
  145. Procedure SetcolumnId(AIndex : Integer; AValue : integer); virtual;
  146. Procedure SetcolumnJsonSchema(AIndex : Integer; const AValue : String); virtual;
  147. Procedure SetcolumnPropertiesJson(AIndex : Integer; const AValue : String); virtual;
  148. Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
  149. Procedure SetformatPattern(AIndex : Integer; const AValue : String); virtual;
  150. Procedure SetgraphPredicate(AIndex : Integer; const AValue : String); virtual;
  151. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  152. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  153. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  154. Procedure SetvalidValues(AIndex : Integer; AValue : TStringArray); virtual;
  155. Procedure SetvalidateData(AIndex : Integer; AValue : boolean); virtual;
  156. //2.6.4. bug workaround
  157. {$IFDEF VER2_6}
  158. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  159. {$ENDIF VER2_6}
  160. Public
  161. Published
  162. Property baseColumn : TColumnTypebaseColumn Index 0 Read FbaseColumn Write SetbaseColumn;
  163. Property columnId : integer Index 8 Read FcolumnId Write SetcolumnId;
  164. Property columnJsonSchema : String Index 16 Read FcolumnJsonSchema Write SetcolumnJsonSchema;
  165. Property columnPropertiesJson : String Index 24 Read FcolumnPropertiesJson Write SetcolumnPropertiesJson;
  166. Property description : String Index 32 Read Fdescription Write Setdescription;
  167. Property formatPattern : String Index 40 Read FformatPattern Write SetformatPattern;
  168. Property graphPredicate : String Index 48 Read FgraphPredicate Write SetgraphPredicate;
  169. Property kind : String Index 56 Read Fkind Write Setkind;
  170. Property name : String Index 64 Read Fname Write Setname;
  171. Property _type : String Index 72 Read F_type Write Set_type;
  172. Property validValues : TStringArray Index 80 Read FvalidValues Write SetvalidValues;
  173. Property validateData : boolean Index 88 Read FvalidateData Write SetvalidateData;
  174. end;
  175. TColumnClass = Class of TColumn;
  176. { --------------------------------------------------------------------
  177. TColumnList
  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; 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; 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. TGeometry
  205. --------------------------------------------------------------------}
  206. TGeometry = Class(TGoogleBaseObject)
  207. Private
  208. Fgeometries : TTJSONSchemaArray;
  209. Fgeometry : TJSONSchema;
  210. F_type : String;
  211. Protected
  212. Class Function ExportPropertyName(Const AName : String) : string; override;
  213. //Property setters
  214. Procedure Setgeometries(AIndex : Integer; AValue : TTJSONSchemaArray); virtual;
  215. Procedure Setgeometry(AIndex : Integer; AValue : TJSONSchema); virtual;
  216. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  217. //2.6.4. bug workaround
  218. {$IFDEF VER2_6}
  219. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  220. {$ENDIF VER2_6}
  221. Public
  222. Published
  223. Property geometries : TTJSONSchemaArray Index 0 Read Fgeometries Write Setgeometries;
  224. Property geometry : TJSONSchema Index 8 Read Fgeometry Write Setgeometry;
  225. Property _type : String Index 16 Read F_type Write Set_type;
  226. end;
  227. TGeometryClass = Class of TGeometry;
  228. { --------------------------------------------------------------------
  229. TImport
  230. --------------------------------------------------------------------}
  231. TImport = Class(TGoogleBaseObject)
  232. Private
  233. Fkind : String;
  234. FnumRowsReceived : String;
  235. Protected
  236. //Property setters
  237. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  238. Procedure SetnumRowsReceived(AIndex : Integer; const AValue : String); virtual;
  239. Public
  240. Published
  241. Property kind : String Index 0 Read Fkind Write Setkind;
  242. Property numRowsReceived : String Index 8 Read FnumRowsReceived Write SetnumRowsReceived;
  243. end;
  244. TImportClass = Class of TImport;
  245. { --------------------------------------------------------------------
  246. TLine
  247. --------------------------------------------------------------------}
  248. TLine = Class(TGoogleBaseObject)
  249. Private
  250. Fcoordinates : TLineTypecoordinatesArray;
  251. F_type : String;
  252. Protected
  253. Class Function ExportPropertyName(Const AName : String) : string; override;
  254. //Property setters
  255. Procedure Setcoordinates(AIndex : Integer; AValue : TLineTypecoordinatesArray); virtual;
  256. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  257. //2.6.4. bug workaround
  258. {$IFDEF VER2_6}
  259. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  260. {$ENDIF VER2_6}
  261. Public
  262. Published
  263. Property coordinates : TLineTypecoordinatesArray Index 0 Read Fcoordinates Write Setcoordinates;
  264. Property _type : String Index 8 Read F_type Write Set_type;
  265. end;
  266. TLineClass = Class of TLine;
  267. { --------------------------------------------------------------------
  268. TLineStyle
  269. --------------------------------------------------------------------}
  270. TLineStyle = Class(TGoogleBaseObject)
  271. Private
  272. FstrokeColor : String;
  273. FstrokeColorStyler : TStyleFunction;
  274. FstrokeOpacity : double;
  275. FstrokeWeight : integer;
  276. FstrokeWeightStyler : TStyleFunction;
  277. Protected
  278. //Property setters
  279. Procedure SetstrokeColor(AIndex : Integer; const AValue : String); virtual;
  280. Procedure SetstrokeColorStyler(AIndex : Integer; AValue : TStyleFunction); virtual;
  281. Procedure SetstrokeOpacity(AIndex : Integer; AValue : double); virtual;
  282. Procedure SetstrokeWeight(AIndex : Integer; AValue : integer); virtual;
  283. Procedure SetstrokeWeightStyler(AIndex : Integer; AValue : TStyleFunction); virtual;
  284. Public
  285. Published
  286. Property strokeColor : String Index 0 Read FstrokeColor Write SetstrokeColor;
  287. Property strokeColorStyler : TStyleFunction Index 8 Read FstrokeColorStyler Write SetstrokeColorStyler;
  288. Property strokeOpacity : double Index 16 Read FstrokeOpacity Write SetstrokeOpacity;
  289. Property strokeWeight : integer Index 24 Read FstrokeWeight Write SetstrokeWeight;
  290. Property strokeWeightStyler : TStyleFunction Index 32 Read FstrokeWeightStyler Write SetstrokeWeightStyler;
  291. end;
  292. TLineStyleClass = Class of TLineStyle;
  293. { --------------------------------------------------------------------
  294. TPoint
  295. --------------------------------------------------------------------}
  296. TPoint = Class(TGoogleBaseObject)
  297. Private
  298. Fcoordinates : TdoubleArray;
  299. F_type : String;
  300. Protected
  301. Class Function ExportPropertyName(Const AName : String) : string; override;
  302. //Property setters
  303. Procedure Setcoordinates(AIndex : Integer; AValue : TdoubleArray); virtual;
  304. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  305. //2.6.4. bug workaround
  306. {$IFDEF VER2_6}
  307. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  308. {$ENDIF VER2_6}
  309. Public
  310. Published
  311. Property coordinates : TdoubleArray Index 0 Read Fcoordinates Write Setcoordinates;
  312. Property _type : String Index 8 Read F_type Write Set_type;
  313. end;
  314. TPointClass = Class of TPoint;
  315. { --------------------------------------------------------------------
  316. TPointStyle
  317. --------------------------------------------------------------------}
  318. TPointStyle = Class(TGoogleBaseObject)
  319. Private
  320. FiconName : String;
  321. FiconStyler : TStyleFunction;
  322. Protected
  323. //Property setters
  324. Procedure SeticonName(AIndex : Integer; const AValue : String); virtual;
  325. Procedure SeticonStyler(AIndex : Integer; AValue : TStyleFunction); virtual;
  326. Public
  327. Published
  328. Property iconName : String Index 0 Read FiconName Write SeticonName;
  329. Property iconStyler : TStyleFunction Index 8 Read FiconStyler Write SeticonStyler;
  330. end;
  331. TPointStyleClass = Class of TPointStyle;
  332. { --------------------------------------------------------------------
  333. TPolygon
  334. --------------------------------------------------------------------}
  335. TPolygon = Class(TGoogleBaseObject)
  336. Private
  337. Fcoordinates : TPolygonTypecoordinatesArray;
  338. F_type : String;
  339. Protected
  340. Class Function ExportPropertyName(Const AName : String) : string; override;
  341. //Property setters
  342. Procedure Setcoordinates(AIndex : Integer; AValue : TPolygonTypecoordinatesArray); virtual;
  343. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  344. //2.6.4. bug workaround
  345. {$IFDEF VER2_6}
  346. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  347. {$ENDIF VER2_6}
  348. Public
  349. Published
  350. Property coordinates : TPolygonTypecoordinatesArray Index 0 Read Fcoordinates Write Setcoordinates;
  351. Property _type : String Index 8 Read F_type Write Set_type;
  352. end;
  353. TPolygonClass = Class of TPolygon;
  354. { --------------------------------------------------------------------
  355. TPolygonStyle
  356. --------------------------------------------------------------------}
  357. TPolygonStyle = Class(TGoogleBaseObject)
  358. Private
  359. FfillColor : String;
  360. FfillColorStyler : TStyleFunction;
  361. FfillOpacity : double;
  362. FstrokeColor : String;
  363. FstrokeColorStyler : TStyleFunction;
  364. FstrokeOpacity : double;
  365. FstrokeWeight : integer;
  366. FstrokeWeightStyler : TStyleFunction;
  367. Protected
  368. //Property setters
  369. Procedure SetfillColor(AIndex : Integer; const AValue : String); virtual;
  370. Procedure SetfillColorStyler(AIndex : Integer; AValue : TStyleFunction); virtual;
  371. Procedure SetfillOpacity(AIndex : Integer; AValue : double); virtual;
  372. Procedure SetstrokeColor(AIndex : Integer; const AValue : String); virtual;
  373. Procedure SetstrokeColorStyler(AIndex : Integer; AValue : TStyleFunction); virtual;
  374. Procedure SetstrokeOpacity(AIndex : Integer; AValue : double); virtual;
  375. Procedure SetstrokeWeight(AIndex : Integer; AValue : integer); virtual;
  376. Procedure SetstrokeWeightStyler(AIndex : Integer; AValue : TStyleFunction); virtual;
  377. Public
  378. Published
  379. Property fillColor : String Index 0 Read FfillColor Write SetfillColor;
  380. Property fillColorStyler : TStyleFunction Index 8 Read FfillColorStyler Write SetfillColorStyler;
  381. Property fillOpacity : double Index 16 Read FfillOpacity Write SetfillOpacity;
  382. Property strokeColor : String Index 24 Read FstrokeColor Write SetstrokeColor;
  383. Property strokeColorStyler : TStyleFunction Index 32 Read FstrokeColorStyler Write SetstrokeColorStyler;
  384. Property strokeOpacity : double Index 40 Read FstrokeOpacity Write SetstrokeOpacity;
  385. Property strokeWeight : integer Index 48 Read FstrokeWeight Write SetstrokeWeight;
  386. Property strokeWeightStyler : TStyleFunction Index 56 Read FstrokeWeightStyler Write SetstrokeWeightStyler;
  387. end;
  388. TPolygonStyleClass = Class of TPolygonStyle;
  389. { --------------------------------------------------------------------
  390. TSqlresponse
  391. --------------------------------------------------------------------}
  392. TSqlresponse = Class(TGoogleBaseObject)
  393. Private
  394. Fcolumns : TStringArray;
  395. Fkind : String;
  396. Frows : TSqlresponseTyperowsArray;
  397. Protected
  398. //Property setters
  399. Procedure Setcolumns(AIndex : Integer; AValue : TStringArray); virtual;
  400. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  401. Procedure Setrows(AIndex : Integer; AValue : TSqlresponseTyperowsArray); virtual;
  402. //2.6.4. bug workaround
  403. {$IFDEF VER2_6}
  404. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  405. {$ENDIF VER2_6}
  406. Public
  407. Published
  408. Property columns : TStringArray Index 0 Read Fcolumns Write Setcolumns;
  409. Property kind : String Index 8 Read Fkind Write Setkind;
  410. Property rows : TSqlresponseTyperowsArray Index 16 Read Frows Write Setrows;
  411. end;
  412. TSqlresponseClass = Class of TSqlresponse;
  413. { --------------------------------------------------------------------
  414. TStyleFunctionTypegradientTypecolorsItem
  415. --------------------------------------------------------------------}
  416. TStyleFunctionTypegradientTypecolorsItem = Class(TGoogleBaseObject)
  417. Private
  418. Fcolor : String;
  419. Fopacity : double;
  420. Protected
  421. //Property setters
  422. Procedure Setcolor(AIndex : Integer; const AValue : String); virtual;
  423. Procedure Setopacity(AIndex : Integer; AValue : double); virtual;
  424. Public
  425. Published
  426. Property color : String Index 0 Read Fcolor Write Setcolor;
  427. Property opacity : double Index 8 Read Fopacity Write Setopacity;
  428. end;
  429. TStyleFunctionTypegradientTypecolorsItemClass = Class of TStyleFunctionTypegradientTypecolorsItem;
  430. { --------------------------------------------------------------------
  431. TStyleFunctionTypegradient
  432. --------------------------------------------------------------------}
  433. TStyleFunctionTypegradient = Class(TGoogleBaseObject)
  434. Private
  435. Fcolors : TStyleFunctionTypegradientTypecolorsArray;
  436. Fmax : double;
  437. Fmin : double;
  438. Protected
  439. //Property setters
  440. Procedure Setcolors(AIndex : Integer; AValue : TStyleFunctionTypegradientTypecolorsArray); virtual;
  441. Procedure Setmax(AIndex : Integer; AValue : double); virtual;
  442. Procedure Setmin(AIndex : Integer; AValue : double); virtual;
  443. //2.6.4. bug workaround
  444. {$IFDEF VER2_6}
  445. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  446. {$ENDIF VER2_6}
  447. Public
  448. Published
  449. Property colors : TStyleFunctionTypegradientTypecolorsArray Index 0 Read Fcolors Write Setcolors;
  450. Property max : double Index 8 Read Fmax Write Setmax;
  451. Property min : double Index 16 Read Fmin Write Setmin;
  452. end;
  453. TStyleFunctionTypegradientClass = Class of TStyleFunctionTypegradient;
  454. { --------------------------------------------------------------------
  455. TStyleFunction
  456. --------------------------------------------------------------------}
  457. TStyleFunction = Class(TGoogleBaseObject)
  458. Private
  459. Fbuckets : TStyleFunctionTypebucketsArray;
  460. FcolumnName : String;
  461. Fgradient : TStyleFunctionTypegradient;
  462. Fkind : String;
  463. Protected
  464. //Property setters
  465. Procedure Setbuckets(AIndex : Integer; AValue : TStyleFunctionTypebucketsArray); virtual;
  466. Procedure SetcolumnName(AIndex : Integer; const AValue : String); virtual;
  467. Procedure Setgradient(AIndex : Integer; AValue : TStyleFunctionTypegradient); virtual;
  468. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  469. //2.6.4. bug workaround
  470. {$IFDEF VER2_6}
  471. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  472. {$ENDIF VER2_6}
  473. Public
  474. Published
  475. Property buckets : TStyleFunctionTypebucketsArray Index 0 Read Fbuckets Write Setbuckets;
  476. Property columnName : String Index 8 Read FcolumnName Write SetcolumnName;
  477. Property gradient : TStyleFunctionTypegradient Index 16 Read Fgradient Write Setgradient;
  478. Property kind : String Index 24 Read Fkind Write Setkind;
  479. end;
  480. TStyleFunctionClass = Class of TStyleFunction;
  481. { --------------------------------------------------------------------
  482. TStyleSetting
  483. --------------------------------------------------------------------}
  484. TStyleSetting = Class(TGoogleBaseObject)
  485. Private
  486. Fkind : String;
  487. FmarkerOptions : TPointStyle;
  488. Fname : String;
  489. FpolygonOptions : TPolygonStyle;
  490. FpolylineOptions : TLineStyle;
  491. FstyleId : integer;
  492. FtableId : String;
  493. Protected
  494. //Property setters
  495. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  496. Procedure SetmarkerOptions(AIndex : Integer; AValue : TPointStyle); virtual;
  497. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  498. Procedure SetpolygonOptions(AIndex : Integer; AValue : TPolygonStyle); virtual;
  499. Procedure SetpolylineOptions(AIndex : Integer; AValue : TLineStyle); virtual;
  500. Procedure SetstyleId(AIndex : Integer; AValue : integer); virtual;
  501. Procedure SettableId(AIndex : Integer; const AValue : String); virtual;
  502. Public
  503. Published
  504. Property kind : String Index 0 Read Fkind Write Setkind;
  505. Property markerOptions : TPointStyle Index 8 Read FmarkerOptions Write SetmarkerOptions;
  506. Property name : String Index 16 Read Fname Write Setname;
  507. Property polygonOptions : TPolygonStyle Index 24 Read FpolygonOptions Write SetpolygonOptions;
  508. Property polylineOptions : TLineStyle Index 32 Read FpolylineOptions Write SetpolylineOptions;
  509. Property styleId : integer Index 40 Read FstyleId Write SetstyleId;
  510. Property tableId : String Index 48 Read FtableId Write SettableId;
  511. end;
  512. TStyleSettingClass = Class of TStyleSetting;
  513. { --------------------------------------------------------------------
  514. TStyleSettingList
  515. --------------------------------------------------------------------}
  516. TStyleSettingList = Class(TGoogleBaseObject)
  517. Private
  518. Fitems : TStyleSettingListTypeitemsArray;
  519. Fkind : String;
  520. FnextPageToken : String;
  521. FtotalItems : integer;
  522. Protected
  523. //Property setters
  524. Procedure Setitems(AIndex : Integer; AValue : TStyleSettingListTypeitemsArray); virtual;
  525. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  526. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  527. Procedure SettotalItems(AIndex : Integer; AValue : integer); virtual;
  528. //2.6.4. bug workaround
  529. {$IFDEF VER2_6}
  530. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  531. {$ENDIF VER2_6}
  532. Public
  533. Published
  534. Property items : TStyleSettingListTypeitemsArray Index 0 Read Fitems Write Setitems;
  535. Property kind : String Index 8 Read Fkind Write Setkind;
  536. Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
  537. Property totalItems : integer Index 24 Read FtotalItems Write SettotalItems;
  538. end;
  539. TStyleSettingListClass = Class of TStyleSettingList;
  540. { --------------------------------------------------------------------
  541. TTable
  542. --------------------------------------------------------------------}
  543. TTable = Class(TGoogleBaseObject)
  544. Private
  545. Fattribution : String;
  546. FattributionLink : String;
  547. FbaseTableIds : TStringArray;
  548. FcolumnPropertiesJsonSchema : String;
  549. Fcolumns : TTableTypecolumnsArray;
  550. Fdescription : String;
  551. FisExportable : boolean;
  552. Fkind : String;
  553. Fname : String;
  554. Fsql : String;
  555. FtableId : String;
  556. FtablePropertiesJson : String;
  557. FtablePropertiesJsonSchema : String;
  558. Protected
  559. //Property setters
  560. Procedure Setattribution(AIndex : Integer; const AValue : String); virtual;
  561. Procedure SetattributionLink(AIndex : Integer; const AValue : String); virtual;
  562. Procedure SetbaseTableIds(AIndex : Integer; AValue : TStringArray); virtual;
  563. Procedure SetcolumnPropertiesJsonSchema(AIndex : Integer; const AValue : String); virtual;
  564. Procedure Setcolumns(AIndex : Integer; AValue : TTableTypecolumnsArray); virtual;
  565. Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
  566. Procedure SetisExportable(AIndex : Integer; AValue : boolean); virtual;
  567. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  568. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  569. Procedure Setsql(AIndex : Integer; const AValue : String); virtual;
  570. Procedure SettableId(AIndex : Integer; const AValue : String); virtual;
  571. Procedure SettablePropertiesJson(AIndex : Integer; const AValue : String); virtual;
  572. Procedure SettablePropertiesJsonSchema(AIndex : Integer; const AValue : String); virtual;
  573. //2.6.4. bug workaround
  574. {$IFDEF VER2_6}
  575. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  576. {$ENDIF VER2_6}
  577. Public
  578. Published
  579. Property attribution : String Index 0 Read Fattribution Write Setattribution;
  580. Property attributionLink : String Index 8 Read FattributionLink Write SetattributionLink;
  581. Property baseTableIds : TStringArray Index 16 Read FbaseTableIds Write SetbaseTableIds;
  582. Property columnPropertiesJsonSchema : String Index 24 Read FcolumnPropertiesJsonSchema Write SetcolumnPropertiesJsonSchema;
  583. Property columns : TTableTypecolumnsArray Index 32 Read Fcolumns Write Setcolumns;
  584. Property description : String Index 40 Read Fdescription Write Setdescription;
  585. Property isExportable : boolean Index 48 Read FisExportable Write SetisExportable;
  586. Property kind : String Index 56 Read Fkind Write Setkind;
  587. Property name : String Index 64 Read Fname Write Setname;
  588. Property sql : String Index 72 Read Fsql Write Setsql;
  589. Property tableId : String Index 80 Read FtableId Write SettableId;
  590. Property tablePropertiesJson : String Index 88 Read FtablePropertiesJson Write SettablePropertiesJson;
  591. Property tablePropertiesJsonSchema : String Index 96 Read FtablePropertiesJsonSchema Write SettablePropertiesJsonSchema;
  592. end;
  593. TTableClass = Class of TTable;
  594. { --------------------------------------------------------------------
  595. TTableList
  596. --------------------------------------------------------------------}
  597. TTableList = Class(TGoogleBaseObject)
  598. Private
  599. Fitems : TTableListTypeitemsArray;
  600. Fkind : String;
  601. FnextPageToken : String;
  602. Protected
  603. //Property setters
  604. Procedure Setitems(AIndex : Integer; AValue : TTableListTypeitemsArray); virtual;
  605. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  606. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  607. //2.6.4. bug workaround
  608. {$IFDEF VER2_6}
  609. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  610. {$ENDIF VER2_6}
  611. Public
  612. Published
  613. Property items : TTableListTypeitemsArray Index 0 Read Fitems Write Setitems;
  614. Property kind : String Index 8 Read Fkind Write Setkind;
  615. Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
  616. end;
  617. TTableListClass = Class of TTableList;
  618. { --------------------------------------------------------------------
  619. TTask
  620. --------------------------------------------------------------------}
  621. TTask = Class(TGoogleBaseObject)
  622. Private
  623. Fkind : String;
  624. Fprogress : String;
  625. Fstarted : boolean;
  626. FtaskId : String;
  627. F_type : String;
  628. Protected
  629. Class Function ExportPropertyName(Const AName : String) : string; override;
  630. //Property setters
  631. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  632. Procedure Setprogress(AIndex : Integer; const AValue : String); virtual;
  633. Procedure Setstarted(AIndex : Integer; AValue : boolean); virtual;
  634. Procedure SettaskId(AIndex : Integer; const AValue : String); virtual;
  635. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  636. Public
  637. Published
  638. Property kind : String Index 0 Read Fkind Write Setkind;
  639. Property progress : String Index 8 Read Fprogress Write Setprogress;
  640. Property started : boolean Index 16 Read Fstarted Write Setstarted;
  641. Property taskId : String Index 24 Read FtaskId Write SettaskId;
  642. Property _type : String Index 32 Read F_type Write Set_type;
  643. end;
  644. TTaskClass = Class of TTask;
  645. { --------------------------------------------------------------------
  646. TTaskList
  647. --------------------------------------------------------------------}
  648. TTaskList = Class(TGoogleBaseObject)
  649. Private
  650. Fitems : TTaskListTypeitemsArray;
  651. Fkind : String;
  652. FnextPageToken : String;
  653. FtotalItems : integer;
  654. Protected
  655. //Property setters
  656. Procedure Setitems(AIndex : Integer; AValue : TTaskListTypeitemsArray); virtual;
  657. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  658. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  659. Procedure SettotalItems(AIndex : Integer; AValue : integer); virtual;
  660. //2.6.4. bug workaround
  661. {$IFDEF VER2_6}
  662. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  663. {$ENDIF VER2_6}
  664. Public
  665. Published
  666. Property items : TTaskListTypeitemsArray Index 0 Read Fitems Write Setitems;
  667. Property kind : String Index 8 Read Fkind Write Setkind;
  668. Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
  669. Property totalItems : integer Index 24 Read FtotalItems Write SettotalItems;
  670. end;
  671. TTaskListClass = Class of TTaskList;
  672. { --------------------------------------------------------------------
  673. TTemplate
  674. --------------------------------------------------------------------}
  675. TTemplate = Class(TGoogleBaseObject)
  676. Private
  677. FautomaticColumnNames : TStringArray;
  678. Fbody : String;
  679. Fkind : String;
  680. Fname : String;
  681. FtableId : String;
  682. FtemplateId : integer;
  683. Protected
  684. //Property setters
  685. Procedure SetautomaticColumnNames(AIndex : Integer; AValue : TStringArray); virtual;
  686. Procedure Setbody(AIndex : Integer; const AValue : String); virtual;
  687. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  688. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  689. Procedure SettableId(AIndex : Integer; const AValue : String); virtual;
  690. Procedure SettemplateId(AIndex : Integer; AValue : integer); virtual;
  691. //2.6.4. bug workaround
  692. {$IFDEF VER2_6}
  693. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  694. {$ENDIF VER2_6}
  695. Public
  696. Published
  697. Property automaticColumnNames : TStringArray Index 0 Read FautomaticColumnNames Write SetautomaticColumnNames;
  698. Property body : String Index 8 Read Fbody Write Setbody;
  699. Property kind : String Index 16 Read Fkind Write Setkind;
  700. Property name : String Index 24 Read Fname Write Setname;
  701. Property tableId : String Index 32 Read FtableId Write SettableId;
  702. Property templateId : integer Index 40 Read FtemplateId Write SettemplateId;
  703. end;
  704. TTemplateClass = Class of TTemplate;
  705. { --------------------------------------------------------------------
  706. TTemplateList
  707. --------------------------------------------------------------------}
  708. TTemplateList = Class(TGoogleBaseObject)
  709. Private
  710. Fitems : TTemplateListTypeitemsArray;
  711. Fkind : String;
  712. FnextPageToken : String;
  713. FtotalItems : integer;
  714. Protected
  715. //Property setters
  716. Procedure Setitems(AIndex : Integer; AValue : TTemplateListTypeitemsArray); virtual;
  717. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  718. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  719. Procedure SettotalItems(AIndex : Integer; AValue : integer); virtual;
  720. //2.6.4. bug workaround
  721. {$IFDEF VER2_6}
  722. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  723. {$ENDIF VER2_6}
  724. Public
  725. Published
  726. Property items : TTemplateListTypeitemsArray Index 0 Read Fitems Write Setitems;
  727. Property kind : String Index 8 Read Fkind Write Setkind;
  728. Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
  729. Property totalItems : integer Index 24 Read FtotalItems Write SettotalItems;
  730. end;
  731. TTemplateListClass = Class of TTemplateList;
  732. { --------------------------------------------------------------------
  733. TColumnResource
  734. --------------------------------------------------------------------}
  735. //Optional query Options for TColumnResource, method List
  736. TColumnListOptions = Record
  737. maxResults : integer;
  738. pageToken : String;
  739. end;
  740. TColumnResource = Class(TGoogleResource)
  741. Public
  742. Class Function ResourceName : String; override;
  743. Class Function DefaultAPI : TGoogleAPIClass; override;
  744. Procedure Delete(columnId: string; tableId: string);
  745. Function Get(columnId: string; tableId: string) : TColumn;
  746. Function Insert(tableId: string; aColumn : TColumn) : TColumn;
  747. Function List(tableId: string; AQuery : string = '') : TColumnList;
  748. Function List(tableId: string; AQuery : TColumnlistOptions) : TColumnList;
  749. Function Patch(columnId: string; tableId: string; aColumn : TColumn) : TColumn;
  750. Function Update(columnId: string; tableId: string; aColumn : TColumn) : TColumn;
  751. end;
  752. { --------------------------------------------------------------------
  753. TQueryResource
  754. --------------------------------------------------------------------}
  755. //Optional query Options for TQueryResource, method Sql
  756. TQuerySqlOptions = Record
  757. hdrs : boolean;
  758. sql : String;
  759. typed : boolean;
  760. end;
  761. //Optional query Options for TQueryResource, method SqlGet
  762. TQuerySqlGetOptions = Record
  763. hdrs : boolean;
  764. sql : String;
  765. typed : boolean;
  766. end;
  767. TQueryResource = Class(TGoogleResource)
  768. Public
  769. Class Function ResourceName : String; override;
  770. Class Function DefaultAPI : TGoogleAPIClass; override;
  771. Function Sql(AQuery : string = '') : TSqlresponse;
  772. Function Sql(AQuery : TQuerysqlOptions) : TSqlresponse;
  773. Function SqlGet(AQuery : string = '') : TSqlresponse;
  774. Function SqlGet(AQuery : TQuerysqlGetOptions) : TSqlresponse;
  775. end;
  776. { --------------------------------------------------------------------
  777. TStyleResource
  778. --------------------------------------------------------------------}
  779. //Optional query Options for TStyleResource, method List
  780. TStyleListOptions = Record
  781. maxResults : integer;
  782. pageToken : String;
  783. end;
  784. TStyleResource = Class(TGoogleResource)
  785. Public
  786. Class Function ResourceName : String; override;
  787. Class Function DefaultAPI : TGoogleAPIClass; override;
  788. Procedure Delete(styleId: integer; tableId: string);
  789. Function Get(styleId: integer; tableId: string) : TStyleSetting;
  790. Function Insert(tableId: string; aStyleSetting : TStyleSetting) : TStyleSetting;
  791. Function List(tableId: string; AQuery : string = '') : TStyleSettingList;
  792. Function List(tableId: string; AQuery : TStylelistOptions) : TStyleSettingList;
  793. Function Patch(styleId: integer; tableId: string; aStyleSetting : TStyleSetting) : TStyleSetting;
  794. Function Update(styleId: integer; tableId: string; aStyleSetting : TStyleSetting) : TStyleSetting;
  795. end;
  796. { --------------------------------------------------------------------
  797. TTableResource
  798. --------------------------------------------------------------------}
  799. //Optional query Options for TTableResource, method Copy
  800. TTableCopyOptions = Record
  801. copyPresentation : boolean;
  802. end;
  803. //Optional query Options for TTableResource, method ImportRows
  804. TTableImportRowsOptions = Record
  805. delimiter : String;
  806. encoding : String;
  807. endLine : integer;
  808. isStrict : boolean;
  809. startLine : integer;
  810. end;
  811. //Optional query Options for TTableResource, method ImportTable
  812. TTableImportTableOptions = Record
  813. delimiter : String;
  814. encoding : String;
  815. _name : String;
  816. end;
  817. //Optional query Options for TTableResource, method List
  818. TTableListOptions = Record
  819. maxResults : integer;
  820. pageToken : String;
  821. end;
  822. //Optional query Options for TTableResource, method Patch
  823. TTablePatchOptions = Record
  824. replaceViewDefinition : boolean;
  825. end;
  826. //Optional query Options for TTableResource, method ReplaceRows
  827. TTableReplaceRowsOptions = Record
  828. delimiter : String;
  829. encoding : String;
  830. endLine : integer;
  831. isStrict : boolean;
  832. startLine : integer;
  833. end;
  834. //Optional query Options for TTableResource, method Update
  835. TTableUpdateOptions = Record
  836. replaceViewDefinition : boolean;
  837. end;
  838. TTableResource = Class(TGoogleResource)
  839. Public
  840. Class Function ResourceName : String; override;
  841. Class Function DefaultAPI : TGoogleAPIClass; override;
  842. Function Copy(tableId: string; AQuery : string = '') : TTable;
  843. Function Copy(tableId: string; AQuery : TTablecopyOptions) : TTable;
  844. Procedure Delete(tableId: string);
  845. Function Get(tableId: string) : TTable;
  846. Function ImportRows(tableId: string; AQuery : string = '') : TImport;
  847. Function ImportRows(tableId: string; AQuery : TTableimportRowsOptions) : TImport;
  848. Function ImportTable(AQuery : string = '') : TTable;
  849. Function ImportTable(AQuery : TTableimportTableOptions) : TTable;
  850. Function Insert(aTable : TTable) : TTable;
  851. Function List(AQuery : string = '') : TTableList;
  852. Function List(AQuery : TTablelistOptions) : TTableList;
  853. Function Patch(tableId: string; aTable : TTable; AQuery : string = '') : TTable;
  854. Function Patch(tableId: string; aTable : TTable; AQuery : TTablepatchOptions) : TTable;
  855. Function ReplaceRows(tableId: string; AQuery : string = '') : TTask;
  856. Function ReplaceRows(tableId: string; AQuery : TTablereplaceRowsOptions) : TTask;
  857. Function Update(tableId: string; aTable : TTable; AQuery : string = '') : TTable;
  858. Function Update(tableId: string; aTable : TTable; AQuery : TTableupdateOptions) : TTable;
  859. end;
  860. { --------------------------------------------------------------------
  861. TTaskResource
  862. --------------------------------------------------------------------}
  863. //Optional query Options for TTaskResource, method List
  864. TTaskListOptions = Record
  865. maxResults : integer;
  866. pageToken : String;
  867. startIndex : integer;
  868. end;
  869. TTaskResource = Class(TGoogleResource)
  870. Public
  871. Class Function ResourceName : String; override;
  872. Class Function DefaultAPI : TGoogleAPIClass; override;
  873. Procedure Delete(tableId: string; taskId: string);
  874. Function Get(tableId: string; taskId: string) : TTask;
  875. Function List(tableId: string; AQuery : string = '') : TTaskList;
  876. Function List(tableId: string; AQuery : TTasklistOptions) : TTaskList;
  877. end;
  878. { --------------------------------------------------------------------
  879. TTemplateResource
  880. --------------------------------------------------------------------}
  881. //Optional query Options for TTemplateResource, method List
  882. TTemplateListOptions = Record
  883. maxResults : integer;
  884. pageToken : String;
  885. end;
  886. TTemplateResource = Class(TGoogleResource)
  887. Public
  888. Class Function ResourceName : String; override;
  889. Class Function DefaultAPI : TGoogleAPIClass; override;
  890. Procedure Delete(tableId: string; templateId: integer);
  891. Function Get(tableId: string; templateId: integer) : TTemplate;
  892. Function Insert(tableId: string; aTemplate : TTemplate) : TTemplate;
  893. Function List(tableId: string; AQuery : string = '') : TTemplateList;
  894. Function List(tableId: string; AQuery : TTemplatelistOptions) : TTemplateList;
  895. Function Patch(tableId: string; templateId: integer; aTemplate : TTemplate) : TTemplate;
  896. Function Update(tableId: string; templateId: integer; aTemplate : TTemplate) : TTemplate;
  897. end;
  898. { --------------------------------------------------------------------
  899. TFusiontablesAPI
  900. --------------------------------------------------------------------}
  901. TFusiontablesAPI = Class(TGoogleAPI)
  902. Private
  903. FColumnInstance : TColumnResource;
  904. FQueryInstance : TQueryResource;
  905. FStyleInstance : TStyleResource;
  906. FTableInstance : TTableResource;
  907. FTaskInstance : TTaskResource;
  908. FTemplateInstance : TTemplateResource;
  909. Function GetColumnInstance : TColumnResource;virtual;
  910. Function GetQueryInstance : TQueryResource;virtual;
  911. Function GetStyleInstance : TStyleResource;virtual;
  912. Function GetTableInstance : TTableResource;virtual;
  913. Function GetTaskInstance : TTaskResource;virtual;
  914. Function GetTemplateInstance : TTemplateResource;virtual;
  915. Public
  916. //Override class functions with API info
  917. Class Function APIName : String; override;
  918. Class Function APIVersion : String; override;
  919. Class Function APIRevision : String; override;
  920. Class Function APIID : String; override;
  921. Class Function APITitle : String; override;
  922. Class Function APIDescription : String; override;
  923. Class Function APIOwnerDomain : String; override;
  924. Class Function APIOwnerName : String; override;
  925. Class Function APIIcon16 : String; override;
  926. Class Function APIIcon32 : String; override;
  927. Class Function APIdocumentationLink : String; override;
  928. Class Function APIrootUrl : string; override;
  929. Class Function APIbasePath : string;override;
  930. Class Function APIbaseURL : String;override;
  931. Class Function APIProtocol : string;override;
  932. Class Function APIservicePath : string;override;
  933. Class Function APIbatchPath : String;override;
  934. Class Function APIAuthScopes : TScopeInfoArray;override;
  935. Class Function APINeedsAuth : Boolean;override;
  936. Class Procedure RegisterAPIResources; override;
  937. //Add create function for resources
  938. Function CreateColumnResource(AOwner : TComponent) : TColumnResource;virtual;overload;
  939. Function CreateColumnResource : TColumnResource;virtual;overload;
  940. Function CreateQueryResource(AOwner : TComponent) : TQueryResource;virtual;overload;
  941. Function CreateQueryResource : TQueryResource;virtual;overload;
  942. Function CreateStyleResource(AOwner : TComponent) : TStyleResource;virtual;overload;
  943. Function CreateStyleResource : TStyleResource;virtual;overload;
  944. Function CreateTableResource(AOwner : TComponent) : TTableResource;virtual;overload;
  945. Function CreateTableResource : TTableResource;virtual;overload;
  946. Function CreateTaskResource(AOwner : TComponent) : TTaskResource;virtual;overload;
  947. Function CreateTaskResource : TTaskResource;virtual;overload;
  948. Function CreateTemplateResource(AOwner : TComponent) : TTemplateResource;virtual;overload;
  949. Function CreateTemplateResource : TTemplateResource;virtual;overload;
  950. //Add default on-demand instances for resources
  951. Property ColumnResource : TColumnResource Read GetColumnInstance;
  952. Property QueryResource : TQueryResource Read GetQueryInstance;
  953. Property StyleResource : TStyleResource Read GetStyleInstance;
  954. Property TableResource : TTableResource Read GetTableInstance;
  955. Property TaskResource : TTaskResource Read GetTaskInstance;
  956. Property TemplateResource : TTemplateResource Read GetTemplateInstance;
  957. end;
  958. implementation
  959. { --------------------------------------------------------------------
  960. TBucket
  961. --------------------------------------------------------------------}
  962. Procedure TBucket.Setcolor(AIndex : Integer; const AValue : String);
  963. begin
  964. If (Fcolor=AValue) then exit;
  965. Fcolor:=AValue;
  966. MarkPropertyChanged(AIndex);
  967. end;
  968. Procedure TBucket.Seticon(AIndex : Integer; const AValue : String);
  969. begin
  970. If (Ficon=AValue) then exit;
  971. Ficon:=AValue;
  972. MarkPropertyChanged(AIndex);
  973. end;
  974. Procedure TBucket.Setmax(AIndex : Integer; AValue : double);
  975. begin
  976. If (Fmax=AValue) then exit;
  977. Fmax:=AValue;
  978. MarkPropertyChanged(AIndex);
  979. end;
  980. Procedure TBucket.Setmin(AIndex : Integer; AValue : double);
  981. begin
  982. If (Fmin=AValue) then exit;
  983. Fmin:=AValue;
  984. MarkPropertyChanged(AIndex);
  985. end;
  986. Procedure TBucket.Setopacity(AIndex : Integer; AValue : double);
  987. begin
  988. If (Fopacity=AValue) then exit;
  989. Fopacity:=AValue;
  990. MarkPropertyChanged(AIndex);
  991. end;
  992. Procedure TBucket.Setweight(AIndex : Integer; AValue : integer);
  993. begin
  994. If (Fweight=AValue) then exit;
  995. Fweight:=AValue;
  996. MarkPropertyChanged(AIndex);
  997. end;
  998. { --------------------------------------------------------------------
  999. TColumnTypebaseColumn
  1000. --------------------------------------------------------------------}
  1001. Procedure TColumnTypebaseColumn.SetcolumnId(AIndex : Integer; AValue : integer);
  1002. begin
  1003. If (FcolumnId=AValue) then exit;
  1004. FcolumnId:=AValue;
  1005. MarkPropertyChanged(AIndex);
  1006. end;
  1007. Procedure TColumnTypebaseColumn.SettableIndex(AIndex : Integer; AValue : integer);
  1008. begin
  1009. If (FtableIndex=AValue) then exit;
  1010. FtableIndex:=AValue;
  1011. MarkPropertyChanged(AIndex);
  1012. end;
  1013. { --------------------------------------------------------------------
  1014. TColumn
  1015. --------------------------------------------------------------------}
  1016. Procedure TColumn.SetbaseColumn(AIndex : Integer; AValue : TColumnTypebaseColumn);
  1017. begin
  1018. If (FbaseColumn=AValue) then exit;
  1019. FbaseColumn:=AValue;
  1020. MarkPropertyChanged(AIndex);
  1021. end;
  1022. Procedure TColumn.SetcolumnId(AIndex : Integer; AValue : integer);
  1023. begin
  1024. If (FcolumnId=AValue) then exit;
  1025. FcolumnId:=AValue;
  1026. MarkPropertyChanged(AIndex);
  1027. end;
  1028. Procedure TColumn.SetcolumnJsonSchema(AIndex : Integer; const AValue : String);
  1029. begin
  1030. If (FcolumnJsonSchema=AValue) then exit;
  1031. FcolumnJsonSchema:=AValue;
  1032. MarkPropertyChanged(AIndex);
  1033. end;
  1034. Procedure TColumn.SetcolumnPropertiesJson(AIndex : Integer; const AValue : String);
  1035. begin
  1036. If (FcolumnPropertiesJson=AValue) then exit;
  1037. FcolumnPropertiesJson:=AValue;
  1038. MarkPropertyChanged(AIndex);
  1039. end;
  1040. Procedure TColumn.Setdescription(AIndex : Integer; const AValue : String);
  1041. begin
  1042. If (Fdescription=AValue) then exit;
  1043. Fdescription:=AValue;
  1044. MarkPropertyChanged(AIndex);
  1045. end;
  1046. Procedure TColumn.SetformatPattern(AIndex : Integer; const AValue : String);
  1047. begin
  1048. If (FformatPattern=AValue) then exit;
  1049. FformatPattern:=AValue;
  1050. MarkPropertyChanged(AIndex);
  1051. end;
  1052. Procedure TColumn.SetgraphPredicate(AIndex : Integer; const AValue : String);
  1053. begin
  1054. If (FgraphPredicate=AValue) then exit;
  1055. FgraphPredicate:=AValue;
  1056. MarkPropertyChanged(AIndex);
  1057. end;
  1058. Procedure TColumn.Setkind(AIndex : Integer; const AValue : String);
  1059. begin
  1060. If (Fkind=AValue) then exit;
  1061. Fkind:=AValue;
  1062. MarkPropertyChanged(AIndex);
  1063. end;
  1064. Procedure TColumn.Setname(AIndex : Integer; const AValue : String);
  1065. begin
  1066. If (Fname=AValue) then exit;
  1067. Fname:=AValue;
  1068. MarkPropertyChanged(AIndex);
  1069. end;
  1070. Procedure TColumn.Set_type(AIndex : Integer; const AValue : String);
  1071. begin
  1072. If (F_type=AValue) then exit;
  1073. F_type:=AValue;
  1074. MarkPropertyChanged(AIndex);
  1075. end;
  1076. Procedure TColumn.SetvalidValues(AIndex : Integer; AValue : TStringArray);
  1077. begin
  1078. If (FvalidValues=AValue) then exit;
  1079. FvalidValues:=AValue;
  1080. MarkPropertyChanged(AIndex);
  1081. end;
  1082. Procedure TColumn.SetvalidateData(AIndex : Integer; AValue : boolean);
  1083. begin
  1084. If (FvalidateData=AValue) then exit;
  1085. FvalidateData:=AValue;
  1086. MarkPropertyChanged(AIndex);
  1087. end;
  1088. Class Function TColumn.ExportPropertyName(Const AName : String) :String;
  1089. begin
  1090. Case AName of
  1091. '_type' : Result:='type';
  1092. else
  1093. Result:=Inherited ExportPropertyName(AName);
  1094. end;
  1095. end;
  1096. //2.6.4. bug workaround
  1097. {$IFDEF VER2_6}
  1098. Procedure TColumn.SetArrayLength(Const AName : String; ALength : Longint);
  1099. begin
  1100. Case AName of
  1101. 'validvalues' : SetLength(FvalidValues,ALength);
  1102. else
  1103. Inherited SetArrayLength(AName,ALength);
  1104. end;
  1105. end;
  1106. {$ENDIF VER2_6}
  1107. { --------------------------------------------------------------------
  1108. TColumnList
  1109. --------------------------------------------------------------------}
  1110. Procedure TColumnList.Setitems(AIndex : Integer; AValue : TColumnListTypeitemsArray);
  1111. begin
  1112. If (Fitems=AValue) then exit;
  1113. Fitems:=AValue;
  1114. MarkPropertyChanged(AIndex);
  1115. end;
  1116. Procedure TColumnList.Setkind(AIndex : Integer; const AValue : String);
  1117. begin
  1118. If (Fkind=AValue) then exit;
  1119. Fkind:=AValue;
  1120. MarkPropertyChanged(AIndex);
  1121. end;
  1122. Procedure TColumnList.SetnextPageToken(AIndex : Integer; const AValue : String);
  1123. begin
  1124. If (FnextPageToken=AValue) then exit;
  1125. FnextPageToken:=AValue;
  1126. MarkPropertyChanged(AIndex);
  1127. end;
  1128. Procedure TColumnList.SettotalItems(AIndex : Integer; AValue : integer);
  1129. begin
  1130. If (FtotalItems=AValue) then exit;
  1131. FtotalItems:=AValue;
  1132. MarkPropertyChanged(AIndex);
  1133. end;
  1134. //2.6.4. bug workaround
  1135. {$IFDEF VER2_6}
  1136. Procedure TColumnList.SetArrayLength(Const AName : String; ALength : Longint);
  1137. begin
  1138. Case AName of
  1139. 'items' : SetLength(Fitems,ALength);
  1140. else
  1141. Inherited SetArrayLength(AName,ALength);
  1142. end;
  1143. end;
  1144. {$ENDIF VER2_6}
  1145. { --------------------------------------------------------------------
  1146. TGeometry
  1147. --------------------------------------------------------------------}
  1148. Procedure TGeometry.Setgeometries(AIndex : Integer; AValue : TTJSONSchemaArray);
  1149. begin
  1150. If (Fgeometries=AValue) then exit;
  1151. Fgeometries:=AValue;
  1152. MarkPropertyChanged(AIndex);
  1153. end;
  1154. Procedure TGeometry.Setgeometry(AIndex : Integer; AValue : TJSONSchema);
  1155. begin
  1156. If (Fgeometry=AValue) then exit;
  1157. Fgeometry:=AValue;
  1158. MarkPropertyChanged(AIndex);
  1159. end;
  1160. Procedure TGeometry.Set_type(AIndex : Integer; const AValue : String);
  1161. begin
  1162. If (F_type=AValue) then exit;
  1163. F_type:=AValue;
  1164. MarkPropertyChanged(AIndex);
  1165. end;
  1166. Class Function TGeometry.ExportPropertyName(Const AName : String) :String;
  1167. begin
  1168. Case AName of
  1169. '_type' : Result:='type';
  1170. else
  1171. Result:=Inherited ExportPropertyName(AName);
  1172. end;
  1173. end;
  1174. //2.6.4. bug workaround
  1175. {$IFDEF VER2_6}
  1176. Procedure TGeometry.SetArrayLength(Const AName : String; ALength : Longint);
  1177. begin
  1178. Case AName of
  1179. 'geometries' : SetLength(Fgeometries,ALength);
  1180. else
  1181. Inherited SetArrayLength(AName,ALength);
  1182. end;
  1183. end;
  1184. {$ENDIF VER2_6}
  1185. { --------------------------------------------------------------------
  1186. TImport
  1187. --------------------------------------------------------------------}
  1188. Procedure TImport.Setkind(AIndex : Integer; const AValue : String);
  1189. begin
  1190. If (Fkind=AValue) then exit;
  1191. Fkind:=AValue;
  1192. MarkPropertyChanged(AIndex);
  1193. end;
  1194. Procedure TImport.SetnumRowsReceived(AIndex : Integer; const AValue : String);
  1195. begin
  1196. If (FnumRowsReceived=AValue) then exit;
  1197. FnumRowsReceived:=AValue;
  1198. MarkPropertyChanged(AIndex);
  1199. end;
  1200. { --------------------------------------------------------------------
  1201. TLine
  1202. --------------------------------------------------------------------}
  1203. Procedure TLine.Setcoordinates(AIndex : Integer; AValue : TLineTypecoordinatesArray);
  1204. begin
  1205. If (Fcoordinates=AValue) then exit;
  1206. Fcoordinates:=AValue;
  1207. MarkPropertyChanged(AIndex);
  1208. end;
  1209. Procedure TLine.Set_type(AIndex : Integer; const AValue : String);
  1210. begin
  1211. If (F_type=AValue) then exit;
  1212. F_type:=AValue;
  1213. MarkPropertyChanged(AIndex);
  1214. end;
  1215. Class Function TLine.ExportPropertyName(Const AName : String) :String;
  1216. begin
  1217. Case AName of
  1218. '_type' : Result:='type';
  1219. else
  1220. Result:=Inherited ExportPropertyName(AName);
  1221. end;
  1222. end;
  1223. //2.6.4. bug workaround
  1224. {$IFDEF VER2_6}
  1225. Procedure TLine.SetArrayLength(Const AName : String; ALength : Longint);
  1226. begin
  1227. Case AName of
  1228. 'coordinates' : SetLength(Fcoordinates,ALength);
  1229. else
  1230. Inherited SetArrayLength(AName,ALength);
  1231. end;
  1232. end;
  1233. {$ENDIF VER2_6}
  1234. { --------------------------------------------------------------------
  1235. TLineStyle
  1236. --------------------------------------------------------------------}
  1237. Procedure TLineStyle.SetstrokeColor(AIndex : Integer; const AValue : String);
  1238. begin
  1239. If (FstrokeColor=AValue) then exit;
  1240. FstrokeColor:=AValue;
  1241. MarkPropertyChanged(AIndex);
  1242. end;
  1243. Procedure TLineStyle.SetstrokeColorStyler(AIndex : Integer; AValue : TStyleFunction);
  1244. begin
  1245. If (FstrokeColorStyler=AValue) then exit;
  1246. FstrokeColorStyler:=AValue;
  1247. MarkPropertyChanged(AIndex);
  1248. end;
  1249. Procedure TLineStyle.SetstrokeOpacity(AIndex : Integer; AValue : double);
  1250. begin
  1251. If (FstrokeOpacity=AValue) then exit;
  1252. FstrokeOpacity:=AValue;
  1253. MarkPropertyChanged(AIndex);
  1254. end;
  1255. Procedure TLineStyle.SetstrokeWeight(AIndex : Integer; AValue : integer);
  1256. begin
  1257. If (FstrokeWeight=AValue) then exit;
  1258. FstrokeWeight:=AValue;
  1259. MarkPropertyChanged(AIndex);
  1260. end;
  1261. Procedure TLineStyle.SetstrokeWeightStyler(AIndex : Integer; AValue : TStyleFunction);
  1262. begin
  1263. If (FstrokeWeightStyler=AValue) then exit;
  1264. FstrokeWeightStyler:=AValue;
  1265. MarkPropertyChanged(AIndex);
  1266. end;
  1267. { --------------------------------------------------------------------
  1268. TPoint
  1269. --------------------------------------------------------------------}
  1270. Procedure TPoint.Setcoordinates(AIndex : Integer; AValue : TdoubleArray);
  1271. begin
  1272. If (Fcoordinates=AValue) then exit;
  1273. Fcoordinates:=AValue;
  1274. MarkPropertyChanged(AIndex);
  1275. end;
  1276. Procedure TPoint.Set_type(AIndex : Integer; const AValue : String);
  1277. begin
  1278. If (F_type=AValue) then exit;
  1279. F_type:=AValue;
  1280. MarkPropertyChanged(AIndex);
  1281. end;
  1282. Class Function TPoint.ExportPropertyName(Const AName : String) :String;
  1283. begin
  1284. Case AName of
  1285. '_type' : Result:='type';
  1286. else
  1287. Result:=Inherited ExportPropertyName(AName);
  1288. end;
  1289. end;
  1290. //2.6.4. bug workaround
  1291. {$IFDEF VER2_6}
  1292. Procedure TPoint.SetArrayLength(Const AName : String; ALength : Longint);
  1293. begin
  1294. Case AName of
  1295. 'coordinates' : SetLength(Fcoordinates,ALength);
  1296. else
  1297. Inherited SetArrayLength(AName,ALength);
  1298. end;
  1299. end;
  1300. {$ENDIF VER2_6}
  1301. { --------------------------------------------------------------------
  1302. TPointStyle
  1303. --------------------------------------------------------------------}
  1304. Procedure TPointStyle.SeticonName(AIndex : Integer; const AValue : String);
  1305. begin
  1306. If (FiconName=AValue) then exit;
  1307. FiconName:=AValue;
  1308. MarkPropertyChanged(AIndex);
  1309. end;
  1310. Procedure TPointStyle.SeticonStyler(AIndex : Integer; AValue : TStyleFunction);
  1311. begin
  1312. If (FiconStyler=AValue) then exit;
  1313. FiconStyler:=AValue;
  1314. MarkPropertyChanged(AIndex);
  1315. end;
  1316. { --------------------------------------------------------------------
  1317. TPolygon
  1318. --------------------------------------------------------------------}
  1319. Procedure TPolygon.Setcoordinates(AIndex : Integer; AValue : TPolygonTypecoordinatesArray);
  1320. begin
  1321. If (Fcoordinates=AValue) then exit;
  1322. Fcoordinates:=AValue;
  1323. MarkPropertyChanged(AIndex);
  1324. end;
  1325. Procedure TPolygon.Set_type(AIndex : Integer; const AValue : String);
  1326. begin
  1327. If (F_type=AValue) then exit;
  1328. F_type:=AValue;
  1329. MarkPropertyChanged(AIndex);
  1330. end;
  1331. Class Function TPolygon.ExportPropertyName(Const AName : String) :String;
  1332. begin
  1333. Case AName of
  1334. '_type' : Result:='type';
  1335. else
  1336. Result:=Inherited ExportPropertyName(AName);
  1337. end;
  1338. end;
  1339. //2.6.4. bug workaround
  1340. {$IFDEF VER2_6}
  1341. Procedure TPolygon.SetArrayLength(Const AName : String; ALength : Longint);
  1342. begin
  1343. Case AName of
  1344. 'coordinates' : SetLength(Fcoordinates,ALength);
  1345. else
  1346. Inherited SetArrayLength(AName,ALength);
  1347. end;
  1348. end;
  1349. {$ENDIF VER2_6}
  1350. { --------------------------------------------------------------------
  1351. TPolygonStyle
  1352. --------------------------------------------------------------------}
  1353. Procedure TPolygonStyle.SetfillColor(AIndex : Integer; const AValue : String);
  1354. begin
  1355. If (FfillColor=AValue) then exit;
  1356. FfillColor:=AValue;
  1357. MarkPropertyChanged(AIndex);
  1358. end;
  1359. Procedure TPolygonStyle.SetfillColorStyler(AIndex : Integer; AValue : TStyleFunction);
  1360. begin
  1361. If (FfillColorStyler=AValue) then exit;
  1362. FfillColorStyler:=AValue;
  1363. MarkPropertyChanged(AIndex);
  1364. end;
  1365. Procedure TPolygonStyle.SetfillOpacity(AIndex : Integer; AValue : double);
  1366. begin
  1367. If (FfillOpacity=AValue) then exit;
  1368. FfillOpacity:=AValue;
  1369. MarkPropertyChanged(AIndex);
  1370. end;
  1371. Procedure TPolygonStyle.SetstrokeColor(AIndex : Integer; const AValue : String);
  1372. begin
  1373. If (FstrokeColor=AValue) then exit;
  1374. FstrokeColor:=AValue;
  1375. MarkPropertyChanged(AIndex);
  1376. end;
  1377. Procedure TPolygonStyle.SetstrokeColorStyler(AIndex : Integer; AValue : TStyleFunction);
  1378. begin
  1379. If (FstrokeColorStyler=AValue) then exit;
  1380. FstrokeColorStyler:=AValue;
  1381. MarkPropertyChanged(AIndex);
  1382. end;
  1383. Procedure TPolygonStyle.SetstrokeOpacity(AIndex : Integer; AValue : double);
  1384. begin
  1385. If (FstrokeOpacity=AValue) then exit;
  1386. FstrokeOpacity:=AValue;
  1387. MarkPropertyChanged(AIndex);
  1388. end;
  1389. Procedure TPolygonStyle.SetstrokeWeight(AIndex : Integer; AValue : integer);
  1390. begin
  1391. If (FstrokeWeight=AValue) then exit;
  1392. FstrokeWeight:=AValue;
  1393. MarkPropertyChanged(AIndex);
  1394. end;
  1395. Procedure TPolygonStyle.SetstrokeWeightStyler(AIndex : Integer; AValue : TStyleFunction);
  1396. begin
  1397. If (FstrokeWeightStyler=AValue) then exit;
  1398. FstrokeWeightStyler:=AValue;
  1399. MarkPropertyChanged(AIndex);
  1400. end;
  1401. { --------------------------------------------------------------------
  1402. TSqlresponse
  1403. --------------------------------------------------------------------}
  1404. Procedure TSqlresponse.Setcolumns(AIndex : Integer; AValue : TStringArray);
  1405. begin
  1406. If (Fcolumns=AValue) then exit;
  1407. Fcolumns:=AValue;
  1408. MarkPropertyChanged(AIndex);
  1409. end;
  1410. Procedure TSqlresponse.Setkind(AIndex : Integer; const AValue : String);
  1411. begin
  1412. If (Fkind=AValue) then exit;
  1413. Fkind:=AValue;
  1414. MarkPropertyChanged(AIndex);
  1415. end;
  1416. Procedure TSqlresponse.Setrows(AIndex : Integer; AValue : TSqlresponseTyperowsArray);
  1417. begin
  1418. If (Frows=AValue) then exit;
  1419. Frows:=AValue;
  1420. MarkPropertyChanged(AIndex);
  1421. end;
  1422. //2.6.4. bug workaround
  1423. {$IFDEF VER2_6}
  1424. Procedure TSqlresponse.SetArrayLength(Const AName : String; ALength : Longint);
  1425. begin
  1426. Case AName of
  1427. 'columns' : SetLength(Fcolumns,ALength);
  1428. 'rows' : SetLength(Frows,ALength);
  1429. else
  1430. Inherited SetArrayLength(AName,ALength);
  1431. end;
  1432. end;
  1433. {$ENDIF VER2_6}
  1434. { --------------------------------------------------------------------
  1435. TStyleFunctionTypegradientTypecolorsItem
  1436. --------------------------------------------------------------------}
  1437. Procedure TStyleFunctionTypegradientTypecolorsItem.Setcolor(AIndex : Integer; const AValue : String);
  1438. begin
  1439. If (Fcolor=AValue) then exit;
  1440. Fcolor:=AValue;
  1441. MarkPropertyChanged(AIndex);
  1442. end;
  1443. Procedure TStyleFunctionTypegradientTypecolorsItem.Setopacity(AIndex : Integer; AValue : double);
  1444. begin
  1445. If (Fopacity=AValue) then exit;
  1446. Fopacity:=AValue;
  1447. MarkPropertyChanged(AIndex);
  1448. end;
  1449. { --------------------------------------------------------------------
  1450. TStyleFunctionTypegradient
  1451. --------------------------------------------------------------------}
  1452. Procedure TStyleFunctionTypegradient.Setcolors(AIndex : Integer; AValue : TStyleFunctionTypegradientTypecolorsArray);
  1453. begin
  1454. If (Fcolors=AValue) then exit;
  1455. Fcolors:=AValue;
  1456. MarkPropertyChanged(AIndex);
  1457. end;
  1458. Procedure TStyleFunctionTypegradient.Setmax(AIndex : Integer; AValue : double);
  1459. begin
  1460. If (Fmax=AValue) then exit;
  1461. Fmax:=AValue;
  1462. MarkPropertyChanged(AIndex);
  1463. end;
  1464. Procedure TStyleFunctionTypegradient.Setmin(AIndex : Integer; AValue : double);
  1465. begin
  1466. If (Fmin=AValue) then exit;
  1467. Fmin:=AValue;
  1468. MarkPropertyChanged(AIndex);
  1469. end;
  1470. //2.6.4. bug workaround
  1471. {$IFDEF VER2_6}
  1472. Procedure TStyleFunctionTypegradient.SetArrayLength(Const AName : String; ALength : Longint);
  1473. begin
  1474. Case AName of
  1475. 'colors' : SetLength(Fcolors,ALength);
  1476. else
  1477. Inherited SetArrayLength(AName,ALength);
  1478. end;
  1479. end;
  1480. {$ENDIF VER2_6}
  1481. { --------------------------------------------------------------------
  1482. TStyleFunction
  1483. --------------------------------------------------------------------}
  1484. Procedure TStyleFunction.Setbuckets(AIndex : Integer; AValue : TStyleFunctionTypebucketsArray);
  1485. begin
  1486. If (Fbuckets=AValue) then exit;
  1487. Fbuckets:=AValue;
  1488. MarkPropertyChanged(AIndex);
  1489. end;
  1490. Procedure TStyleFunction.SetcolumnName(AIndex : Integer; const AValue : String);
  1491. begin
  1492. If (FcolumnName=AValue) then exit;
  1493. FcolumnName:=AValue;
  1494. MarkPropertyChanged(AIndex);
  1495. end;
  1496. Procedure TStyleFunction.Setgradient(AIndex : Integer; AValue : TStyleFunctionTypegradient);
  1497. begin
  1498. If (Fgradient=AValue) then exit;
  1499. Fgradient:=AValue;
  1500. MarkPropertyChanged(AIndex);
  1501. end;
  1502. Procedure TStyleFunction.Setkind(AIndex : Integer; const AValue : String);
  1503. begin
  1504. If (Fkind=AValue) then exit;
  1505. Fkind:=AValue;
  1506. MarkPropertyChanged(AIndex);
  1507. end;
  1508. //2.6.4. bug workaround
  1509. {$IFDEF VER2_6}
  1510. Procedure TStyleFunction.SetArrayLength(Const AName : String; ALength : Longint);
  1511. begin
  1512. Case AName of
  1513. 'buckets' : SetLength(Fbuckets,ALength);
  1514. else
  1515. Inherited SetArrayLength(AName,ALength);
  1516. end;
  1517. end;
  1518. {$ENDIF VER2_6}
  1519. { --------------------------------------------------------------------
  1520. TStyleSetting
  1521. --------------------------------------------------------------------}
  1522. Procedure TStyleSetting.Setkind(AIndex : Integer; const AValue : String);
  1523. begin
  1524. If (Fkind=AValue) then exit;
  1525. Fkind:=AValue;
  1526. MarkPropertyChanged(AIndex);
  1527. end;
  1528. Procedure TStyleSetting.SetmarkerOptions(AIndex : Integer; AValue : TPointStyle);
  1529. begin
  1530. If (FmarkerOptions=AValue) then exit;
  1531. FmarkerOptions:=AValue;
  1532. MarkPropertyChanged(AIndex);
  1533. end;
  1534. Procedure TStyleSetting.Setname(AIndex : Integer; const AValue : String);
  1535. begin
  1536. If (Fname=AValue) then exit;
  1537. Fname:=AValue;
  1538. MarkPropertyChanged(AIndex);
  1539. end;
  1540. Procedure TStyleSetting.SetpolygonOptions(AIndex : Integer; AValue : TPolygonStyle);
  1541. begin
  1542. If (FpolygonOptions=AValue) then exit;
  1543. FpolygonOptions:=AValue;
  1544. MarkPropertyChanged(AIndex);
  1545. end;
  1546. Procedure TStyleSetting.SetpolylineOptions(AIndex : Integer; AValue : TLineStyle);
  1547. begin
  1548. If (FpolylineOptions=AValue) then exit;
  1549. FpolylineOptions:=AValue;
  1550. MarkPropertyChanged(AIndex);
  1551. end;
  1552. Procedure TStyleSetting.SetstyleId(AIndex : Integer; AValue : integer);
  1553. begin
  1554. If (FstyleId=AValue) then exit;
  1555. FstyleId:=AValue;
  1556. MarkPropertyChanged(AIndex);
  1557. end;
  1558. Procedure TStyleSetting.SettableId(AIndex : Integer; const AValue : String);
  1559. begin
  1560. If (FtableId=AValue) then exit;
  1561. FtableId:=AValue;
  1562. MarkPropertyChanged(AIndex);
  1563. end;
  1564. { --------------------------------------------------------------------
  1565. TStyleSettingList
  1566. --------------------------------------------------------------------}
  1567. Procedure TStyleSettingList.Setitems(AIndex : Integer; AValue : TStyleSettingListTypeitemsArray);
  1568. begin
  1569. If (Fitems=AValue) then exit;
  1570. Fitems:=AValue;
  1571. MarkPropertyChanged(AIndex);
  1572. end;
  1573. Procedure TStyleSettingList.Setkind(AIndex : Integer; const AValue : String);
  1574. begin
  1575. If (Fkind=AValue) then exit;
  1576. Fkind:=AValue;
  1577. MarkPropertyChanged(AIndex);
  1578. end;
  1579. Procedure TStyleSettingList.SetnextPageToken(AIndex : Integer; const AValue : String);
  1580. begin
  1581. If (FnextPageToken=AValue) then exit;
  1582. FnextPageToken:=AValue;
  1583. MarkPropertyChanged(AIndex);
  1584. end;
  1585. Procedure TStyleSettingList.SettotalItems(AIndex : Integer; AValue : integer);
  1586. begin
  1587. If (FtotalItems=AValue) then exit;
  1588. FtotalItems:=AValue;
  1589. MarkPropertyChanged(AIndex);
  1590. end;
  1591. //2.6.4. bug workaround
  1592. {$IFDEF VER2_6}
  1593. Procedure TStyleSettingList.SetArrayLength(Const AName : String; ALength : Longint);
  1594. begin
  1595. Case AName of
  1596. 'items' : SetLength(Fitems,ALength);
  1597. else
  1598. Inherited SetArrayLength(AName,ALength);
  1599. end;
  1600. end;
  1601. {$ENDIF VER2_6}
  1602. { --------------------------------------------------------------------
  1603. TTable
  1604. --------------------------------------------------------------------}
  1605. Procedure TTable.Setattribution(AIndex : Integer; const AValue : String);
  1606. begin
  1607. If (Fattribution=AValue) then exit;
  1608. Fattribution:=AValue;
  1609. MarkPropertyChanged(AIndex);
  1610. end;
  1611. Procedure TTable.SetattributionLink(AIndex : Integer; const AValue : String);
  1612. begin
  1613. If (FattributionLink=AValue) then exit;
  1614. FattributionLink:=AValue;
  1615. MarkPropertyChanged(AIndex);
  1616. end;
  1617. Procedure TTable.SetbaseTableIds(AIndex : Integer; AValue : TStringArray);
  1618. begin
  1619. If (FbaseTableIds=AValue) then exit;
  1620. FbaseTableIds:=AValue;
  1621. MarkPropertyChanged(AIndex);
  1622. end;
  1623. Procedure TTable.SetcolumnPropertiesJsonSchema(AIndex : Integer; const AValue : String);
  1624. begin
  1625. If (FcolumnPropertiesJsonSchema=AValue) then exit;
  1626. FcolumnPropertiesJsonSchema:=AValue;
  1627. MarkPropertyChanged(AIndex);
  1628. end;
  1629. Procedure TTable.Setcolumns(AIndex : Integer; AValue : TTableTypecolumnsArray);
  1630. begin
  1631. If (Fcolumns=AValue) then exit;
  1632. Fcolumns:=AValue;
  1633. MarkPropertyChanged(AIndex);
  1634. end;
  1635. Procedure TTable.Setdescription(AIndex : Integer; const AValue : String);
  1636. begin
  1637. If (Fdescription=AValue) then exit;
  1638. Fdescription:=AValue;
  1639. MarkPropertyChanged(AIndex);
  1640. end;
  1641. Procedure TTable.SetisExportable(AIndex : Integer; AValue : boolean);
  1642. begin
  1643. If (FisExportable=AValue) then exit;
  1644. FisExportable:=AValue;
  1645. MarkPropertyChanged(AIndex);
  1646. end;
  1647. Procedure TTable.Setkind(AIndex : Integer; const AValue : String);
  1648. begin
  1649. If (Fkind=AValue) then exit;
  1650. Fkind:=AValue;
  1651. MarkPropertyChanged(AIndex);
  1652. end;
  1653. Procedure TTable.Setname(AIndex : Integer; const AValue : String);
  1654. begin
  1655. If (Fname=AValue) then exit;
  1656. Fname:=AValue;
  1657. MarkPropertyChanged(AIndex);
  1658. end;
  1659. Procedure TTable.Setsql(AIndex : Integer; const AValue : String);
  1660. begin
  1661. If (Fsql=AValue) then exit;
  1662. Fsql:=AValue;
  1663. MarkPropertyChanged(AIndex);
  1664. end;
  1665. Procedure TTable.SettableId(AIndex : Integer; const AValue : String);
  1666. begin
  1667. If (FtableId=AValue) then exit;
  1668. FtableId:=AValue;
  1669. MarkPropertyChanged(AIndex);
  1670. end;
  1671. Procedure TTable.SettablePropertiesJson(AIndex : Integer; const AValue : String);
  1672. begin
  1673. If (FtablePropertiesJson=AValue) then exit;
  1674. FtablePropertiesJson:=AValue;
  1675. MarkPropertyChanged(AIndex);
  1676. end;
  1677. Procedure TTable.SettablePropertiesJsonSchema(AIndex : Integer; const AValue : String);
  1678. begin
  1679. If (FtablePropertiesJsonSchema=AValue) then exit;
  1680. FtablePropertiesJsonSchema:=AValue;
  1681. MarkPropertyChanged(AIndex);
  1682. end;
  1683. //2.6.4. bug workaround
  1684. {$IFDEF VER2_6}
  1685. Procedure TTable.SetArrayLength(Const AName : String; ALength : Longint);
  1686. begin
  1687. Case AName of
  1688. 'basetableids' : SetLength(FbaseTableIds,ALength);
  1689. 'columns' : SetLength(Fcolumns,ALength);
  1690. else
  1691. Inherited SetArrayLength(AName,ALength);
  1692. end;
  1693. end;
  1694. {$ENDIF VER2_6}
  1695. { --------------------------------------------------------------------
  1696. TTableList
  1697. --------------------------------------------------------------------}
  1698. Procedure TTableList.Setitems(AIndex : Integer; AValue : TTableListTypeitemsArray);
  1699. begin
  1700. If (Fitems=AValue) then exit;
  1701. Fitems:=AValue;
  1702. MarkPropertyChanged(AIndex);
  1703. end;
  1704. Procedure TTableList.Setkind(AIndex : Integer; const AValue : String);
  1705. begin
  1706. If (Fkind=AValue) then exit;
  1707. Fkind:=AValue;
  1708. MarkPropertyChanged(AIndex);
  1709. end;
  1710. Procedure TTableList.SetnextPageToken(AIndex : Integer; const AValue : String);
  1711. begin
  1712. If (FnextPageToken=AValue) then exit;
  1713. FnextPageToken:=AValue;
  1714. MarkPropertyChanged(AIndex);
  1715. end;
  1716. //2.6.4. bug workaround
  1717. {$IFDEF VER2_6}
  1718. Procedure TTableList.SetArrayLength(Const AName : String; ALength : Longint);
  1719. begin
  1720. Case AName of
  1721. 'items' : SetLength(Fitems,ALength);
  1722. else
  1723. Inherited SetArrayLength(AName,ALength);
  1724. end;
  1725. end;
  1726. {$ENDIF VER2_6}
  1727. { --------------------------------------------------------------------
  1728. TTask
  1729. --------------------------------------------------------------------}
  1730. Procedure TTask.Setkind(AIndex : Integer; const AValue : String);
  1731. begin
  1732. If (Fkind=AValue) then exit;
  1733. Fkind:=AValue;
  1734. MarkPropertyChanged(AIndex);
  1735. end;
  1736. Procedure TTask.Setprogress(AIndex : Integer; const AValue : String);
  1737. begin
  1738. If (Fprogress=AValue) then exit;
  1739. Fprogress:=AValue;
  1740. MarkPropertyChanged(AIndex);
  1741. end;
  1742. Procedure TTask.Setstarted(AIndex : Integer; AValue : boolean);
  1743. begin
  1744. If (Fstarted=AValue) then exit;
  1745. Fstarted:=AValue;
  1746. MarkPropertyChanged(AIndex);
  1747. end;
  1748. Procedure TTask.SettaskId(AIndex : Integer; const AValue : String);
  1749. begin
  1750. If (FtaskId=AValue) then exit;
  1751. FtaskId:=AValue;
  1752. MarkPropertyChanged(AIndex);
  1753. end;
  1754. Procedure TTask.Set_type(AIndex : Integer; const AValue : String);
  1755. begin
  1756. If (F_type=AValue) then exit;
  1757. F_type:=AValue;
  1758. MarkPropertyChanged(AIndex);
  1759. end;
  1760. Class Function TTask.ExportPropertyName(Const AName : String) :String;
  1761. begin
  1762. Case AName of
  1763. '_type' : Result:='type';
  1764. else
  1765. Result:=Inherited ExportPropertyName(AName);
  1766. end;
  1767. end;
  1768. { --------------------------------------------------------------------
  1769. TTaskList
  1770. --------------------------------------------------------------------}
  1771. Procedure TTaskList.Setitems(AIndex : Integer; AValue : TTaskListTypeitemsArray);
  1772. begin
  1773. If (Fitems=AValue) then exit;
  1774. Fitems:=AValue;
  1775. MarkPropertyChanged(AIndex);
  1776. end;
  1777. Procedure TTaskList.Setkind(AIndex : Integer; const AValue : String);
  1778. begin
  1779. If (Fkind=AValue) then exit;
  1780. Fkind:=AValue;
  1781. MarkPropertyChanged(AIndex);
  1782. end;
  1783. Procedure TTaskList.SetnextPageToken(AIndex : Integer; const AValue : String);
  1784. begin
  1785. If (FnextPageToken=AValue) then exit;
  1786. FnextPageToken:=AValue;
  1787. MarkPropertyChanged(AIndex);
  1788. end;
  1789. Procedure TTaskList.SettotalItems(AIndex : Integer; AValue : integer);
  1790. begin
  1791. If (FtotalItems=AValue) then exit;
  1792. FtotalItems:=AValue;
  1793. MarkPropertyChanged(AIndex);
  1794. end;
  1795. //2.6.4. bug workaround
  1796. {$IFDEF VER2_6}
  1797. Procedure TTaskList.SetArrayLength(Const AName : String; ALength : Longint);
  1798. begin
  1799. Case AName of
  1800. 'items' : SetLength(Fitems,ALength);
  1801. else
  1802. Inherited SetArrayLength(AName,ALength);
  1803. end;
  1804. end;
  1805. {$ENDIF VER2_6}
  1806. { --------------------------------------------------------------------
  1807. TTemplate
  1808. --------------------------------------------------------------------}
  1809. Procedure TTemplate.SetautomaticColumnNames(AIndex : Integer; AValue : TStringArray);
  1810. begin
  1811. If (FautomaticColumnNames=AValue) then exit;
  1812. FautomaticColumnNames:=AValue;
  1813. MarkPropertyChanged(AIndex);
  1814. end;
  1815. Procedure TTemplate.Setbody(AIndex : Integer; const AValue : String);
  1816. begin
  1817. If (Fbody=AValue) then exit;
  1818. Fbody:=AValue;
  1819. MarkPropertyChanged(AIndex);
  1820. end;
  1821. Procedure TTemplate.Setkind(AIndex : Integer; const AValue : String);
  1822. begin
  1823. If (Fkind=AValue) then exit;
  1824. Fkind:=AValue;
  1825. MarkPropertyChanged(AIndex);
  1826. end;
  1827. Procedure TTemplate.Setname(AIndex : Integer; const AValue : String);
  1828. begin
  1829. If (Fname=AValue) then exit;
  1830. Fname:=AValue;
  1831. MarkPropertyChanged(AIndex);
  1832. end;
  1833. Procedure TTemplate.SettableId(AIndex : Integer; const AValue : String);
  1834. begin
  1835. If (FtableId=AValue) then exit;
  1836. FtableId:=AValue;
  1837. MarkPropertyChanged(AIndex);
  1838. end;
  1839. Procedure TTemplate.SettemplateId(AIndex : Integer; AValue : integer);
  1840. begin
  1841. If (FtemplateId=AValue) then exit;
  1842. FtemplateId:=AValue;
  1843. MarkPropertyChanged(AIndex);
  1844. end;
  1845. //2.6.4. bug workaround
  1846. {$IFDEF VER2_6}
  1847. Procedure TTemplate.SetArrayLength(Const AName : String; ALength : Longint);
  1848. begin
  1849. Case AName of
  1850. 'automaticcolumnnames' : SetLength(FautomaticColumnNames,ALength);
  1851. else
  1852. Inherited SetArrayLength(AName,ALength);
  1853. end;
  1854. end;
  1855. {$ENDIF VER2_6}
  1856. { --------------------------------------------------------------------
  1857. TTemplateList
  1858. --------------------------------------------------------------------}
  1859. Procedure TTemplateList.Setitems(AIndex : Integer; AValue : TTemplateListTypeitemsArray);
  1860. begin
  1861. If (Fitems=AValue) then exit;
  1862. Fitems:=AValue;
  1863. MarkPropertyChanged(AIndex);
  1864. end;
  1865. Procedure TTemplateList.Setkind(AIndex : Integer; const AValue : String);
  1866. begin
  1867. If (Fkind=AValue) then exit;
  1868. Fkind:=AValue;
  1869. MarkPropertyChanged(AIndex);
  1870. end;
  1871. Procedure TTemplateList.SetnextPageToken(AIndex : Integer; const AValue : String);
  1872. begin
  1873. If (FnextPageToken=AValue) then exit;
  1874. FnextPageToken:=AValue;
  1875. MarkPropertyChanged(AIndex);
  1876. end;
  1877. Procedure TTemplateList.SettotalItems(AIndex : Integer; AValue : integer);
  1878. begin
  1879. If (FtotalItems=AValue) then exit;
  1880. FtotalItems:=AValue;
  1881. MarkPropertyChanged(AIndex);
  1882. end;
  1883. //2.6.4. bug workaround
  1884. {$IFDEF VER2_6}
  1885. Procedure TTemplateList.SetArrayLength(Const AName : String; ALength : Longint);
  1886. begin
  1887. Case AName of
  1888. 'items' : SetLength(Fitems,ALength);
  1889. else
  1890. Inherited SetArrayLength(AName,ALength);
  1891. end;
  1892. end;
  1893. {$ENDIF VER2_6}
  1894. { --------------------------------------------------------------------
  1895. TColumnResource
  1896. --------------------------------------------------------------------}
  1897. Class Function TColumnResource.ResourceName : String;
  1898. begin
  1899. Result:='column';
  1900. end;
  1901. Class Function TColumnResource.DefaultAPI : TGoogleAPIClass;
  1902. begin
  1903. Result:=TfusiontablesAPI;
  1904. end;
  1905. Procedure TColumnResource.Delete(columnId: string; tableId: string);
  1906. Const
  1907. _HTTPMethod = 'DELETE';
  1908. _Path = 'tables/{tableId}/columns/{columnId}';
  1909. _Methodid = 'fusiontables.column.delete';
  1910. Var
  1911. _P : String;
  1912. begin
  1913. _P:=SubstitutePath(_Path,['columnId',columnId,'tableId',tableId]);
  1914. ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
  1915. end;
  1916. Function TColumnResource.Get(columnId: string; tableId: string) : TColumn;
  1917. Const
  1918. _HTTPMethod = 'GET';
  1919. _Path = 'tables/{tableId}/columns/{columnId}';
  1920. _Methodid = 'fusiontables.column.get';
  1921. Var
  1922. _P : String;
  1923. begin
  1924. _P:=SubstitutePath(_Path,['columnId',columnId,'tableId',tableId]);
  1925. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TColumn) as TColumn;
  1926. end;
  1927. Function TColumnResource.Insert(tableId: string; aColumn : TColumn) : TColumn;
  1928. Const
  1929. _HTTPMethod = 'POST';
  1930. _Path = 'tables/{tableId}/columns';
  1931. _Methodid = 'fusiontables.column.insert';
  1932. Var
  1933. _P : String;
  1934. begin
  1935. _P:=SubstitutePath(_Path,['tableId',tableId]);
  1936. Result:=ServiceCall(_HTTPMethod,_P,'',aColumn,TColumn) as TColumn;
  1937. end;
  1938. Function TColumnResource.List(tableId: string; AQuery : string = '') : TColumnList;
  1939. Const
  1940. _HTTPMethod = 'GET';
  1941. _Path = 'tables/{tableId}/columns';
  1942. _Methodid = 'fusiontables.column.list';
  1943. Var
  1944. _P : String;
  1945. begin
  1946. _P:=SubstitutePath(_Path,['tableId',tableId]);
  1947. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TColumnList) as TColumnList;
  1948. end;
  1949. Function TColumnResource.List(tableId: string; AQuery : TColumnlistOptions) : TColumnList;
  1950. Var
  1951. _Q : String;
  1952. begin
  1953. _Q:='';
  1954. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  1955. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  1956. Result:=List(tableId,_Q);
  1957. end;
  1958. Function TColumnResource.Patch(columnId: string; tableId: string; aColumn : TColumn) : TColumn;
  1959. Const
  1960. _HTTPMethod = 'PATCH';
  1961. _Path = 'tables/{tableId}/columns/{columnId}';
  1962. _Methodid = 'fusiontables.column.patch';
  1963. Var
  1964. _P : String;
  1965. begin
  1966. _P:=SubstitutePath(_Path,['columnId',columnId,'tableId',tableId]);
  1967. Result:=ServiceCall(_HTTPMethod,_P,'',aColumn,TColumn) as TColumn;
  1968. end;
  1969. Function TColumnResource.Update(columnId: string; tableId: string; aColumn : TColumn) : TColumn;
  1970. Const
  1971. _HTTPMethod = 'PUT';
  1972. _Path = 'tables/{tableId}/columns/{columnId}';
  1973. _Methodid = 'fusiontables.column.update';
  1974. Var
  1975. _P : String;
  1976. begin
  1977. _P:=SubstitutePath(_Path,['columnId',columnId,'tableId',tableId]);
  1978. Result:=ServiceCall(_HTTPMethod,_P,'',aColumn,TColumn) as TColumn;
  1979. end;
  1980. { --------------------------------------------------------------------
  1981. TQueryResource
  1982. --------------------------------------------------------------------}
  1983. Class Function TQueryResource.ResourceName : String;
  1984. begin
  1985. Result:='query';
  1986. end;
  1987. Class Function TQueryResource.DefaultAPI : TGoogleAPIClass;
  1988. begin
  1989. Result:=TfusiontablesAPI;
  1990. end;
  1991. Function TQueryResource.Sql(AQuery : string = '') : TSqlresponse;
  1992. Const
  1993. _HTTPMethod = 'POST';
  1994. _Path = 'query';
  1995. _Methodid = 'fusiontables.query.sql';
  1996. begin
  1997. Result:=ServiceCall(_HTTPMethod,_Path,AQuery,Nil,TSqlresponse) as TSqlresponse;
  1998. end;
  1999. Function TQueryResource.Sql(AQuery : TQuerysqlOptions) : TSqlresponse;
  2000. Var
  2001. _Q : String;
  2002. begin
  2003. _Q:='';
  2004. AddToQuery(_Q,'hdrs',AQuery.hdrs);
  2005. AddToQuery(_Q,'sql',AQuery.sql);
  2006. AddToQuery(_Q,'typed',AQuery.typed);
  2007. Result:=Sql(_Q);
  2008. end;
  2009. Function TQueryResource.SqlGet(AQuery : string = '') : TSqlresponse;
  2010. Const
  2011. _HTTPMethod = 'GET';
  2012. _Path = 'query';
  2013. _Methodid = 'fusiontables.query.sqlGet';
  2014. begin
  2015. Result:=ServiceCall(_HTTPMethod,_Path,AQuery,Nil,TSqlresponse) as TSqlresponse;
  2016. end;
  2017. Function TQueryResource.SqlGet(AQuery : TQuerysqlGetOptions) : TSqlresponse;
  2018. Var
  2019. _Q : String;
  2020. begin
  2021. _Q:='';
  2022. AddToQuery(_Q,'hdrs',AQuery.hdrs);
  2023. AddToQuery(_Q,'sql',AQuery.sql);
  2024. AddToQuery(_Q,'typed',AQuery.typed);
  2025. Result:=SqlGet(_Q);
  2026. end;
  2027. { --------------------------------------------------------------------
  2028. TStyleResource
  2029. --------------------------------------------------------------------}
  2030. Class Function TStyleResource.ResourceName : String;
  2031. begin
  2032. Result:='style';
  2033. end;
  2034. Class Function TStyleResource.DefaultAPI : TGoogleAPIClass;
  2035. begin
  2036. Result:=TfusiontablesAPI;
  2037. end;
  2038. Procedure TStyleResource.Delete(styleId: integer; tableId: string);
  2039. Const
  2040. _HTTPMethod = 'DELETE';
  2041. _Path = 'tables/{tableId}/styles/{styleId}';
  2042. _Methodid = 'fusiontables.style.delete';
  2043. Var
  2044. _P : String;
  2045. begin
  2046. _P:=SubstitutePath(_Path,['styleId',styleId,'tableId',tableId]);
  2047. ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
  2048. end;
  2049. Function TStyleResource.Get(styleId: integer; tableId: string) : TStyleSetting;
  2050. Const
  2051. _HTTPMethod = 'GET';
  2052. _Path = 'tables/{tableId}/styles/{styleId}';
  2053. _Methodid = 'fusiontables.style.get';
  2054. Var
  2055. _P : String;
  2056. begin
  2057. _P:=SubstitutePath(_Path,['styleId',styleId,'tableId',tableId]);
  2058. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TStyleSetting) as TStyleSetting;
  2059. end;
  2060. Function TStyleResource.Insert(tableId: string; aStyleSetting : TStyleSetting) : TStyleSetting;
  2061. Const
  2062. _HTTPMethod = 'POST';
  2063. _Path = 'tables/{tableId}/styles';
  2064. _Methodid = 'fusiontables.style.insert';
  2065. Var
  2066. _P : String;
  2067. begin
  2068. _P:=SubstitutePath(_Path,['tableId',tableId]);
  2069. Result:=ServiceCall(_HTTPMethod,_P,'',aStyleSetting,TStyleSetting) as TStyleSetting;
  2070. end;
  2071. Function TStyleResource.List(tableId: string; AQuery : string = '') : TStyleSettingList;
  2072. Const
  2073. _HTTPMethod = 'GET';
  2074. _Path = 'tables/{tableId}/styles';
  2075. _Methodid = 'fusiontables.style.list';
  2076. Var
  2077. _P : String;
  2078. begin
  2079. _P:=SubstitutePath(_Path,['tableId',tableId]);
  2080. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TStyleSettingList) as TStyleSettingList;
  2081. end;
  2082. Function TStyleResource.List(tableId: string; AQuery : TStylelistOptions) : TStyleSettingList;
  2083. Var
  2084. _Q : String;
  2085. begin
  2086. _Q:='';
  2087. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  2088. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2089. Result:=List(tableId,_Q);
  2090. end;
  2091. Function TStyleResource.Patch(styleId: integer; tableId: string; aStyleSetting : TStyleSetting) : TStyleSetting;
  2092. Const
  2093. _HTTPMethod = 'PATCH';
  2094. _Path = 'tables/{tableId}/styles/{styleId}';
  2095. _Methodid = 'fusiontables.style.patch';
  2096. Var
  2097. _P : String;
  2098. begin
  2099. _P:=SubstitutePath(_Path,['styleId',styleId,'tableId',tableId]);
  2100. Result:=ServiceCall(_HTTPMethod,_P,'',aStyleSetting,TStyleSetting) as TStyleSetting;
  2101. end;
  2102. Function TStyleResource.Update(styleId: integer; tableId: string; aStyleSetting : TStyleSetting) : TStyleSetting;
  2103. Const
  2104. _HTTPMethod = 'PUT';
  2105. _Path = 'tables/{tableId}/styles/{styleId}';
  2106. _Methodid = 'fusiontables.style.update';
  2107. Var
  2108. _P : String;
  2109. begin
  2110. _P:=SubstitutePath(_Path,['styleId',styleId,'tableId',tableId]);
  2111. Result:=ServiceCall(_HTTPMethod,_P,'',aStyleSetting,TStyleSetting) as TStyleSetting;
  2112. end;
  2113. { --------------------------------------------------------------------
  2114. TTableResource
  2115. --------------------------------------------------------------------}
  2116. Class Function TTableResource.ResourceName : String;
  2117. begin
  2118. Result:='table';
  2119. end;
  2120. Class Function TTableResource.DefaultAPI : TGoogleAPIClass;
  2121. begin
  2122. Result:=TfusiontablesAPI;
  2123. end;
  2124. Function TTableResource.Copy(tableId: string; AQuery : string = '') : TTable;
  2125. Const
  2126. _HTTPMethod = 'POST';
  2127. _Path = 'tables/{tableId}/copy';
  2128. _Methodid = 'fusiontables.table.copy';
  2129. Var
  2130. _P : String;
  2131. begin
  2132. _P:=SubstitutePath(_Path,['tableId',tableId]);
  2133. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TTable) as TTable;
  2134. end;
  2135. Function TTableResource.Copy(tableId: string; AQuery : TTablecopyOptions) : TTable;
  2136. Var
  2137. _Q : String;
  2138. begin
  2139. _Q:='';
  2140. AddToQuery(_Q,'copyPresentation',AQuery.copyPresentation);
  2141. Result:=Copy(tableId,_Q);
  2142. end;
  2143. Procedure TTableResource.Delete(tableId: string);
  2144. Const
  2145. _HTTPMethod = 'DELETE';
  2146. _Path = 'tables/{tableId}';
  2147. _Methodid = 'fusiontables.table.delete';
  2148. Var
  2149. _P : String;
  2150. begin
  2151. _P:=SubstitutePath(_Path,['tableId',tableId]);
  2152. ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
  2153. end;
  2154. Function TTableResource.Get(tableId: string) : TTable;
  2155. Const
  2156. _HTTPMethod = 'GET';
  2157. _Path = 'tables/{tableId}';
  2158. _Methodid = 'fusiontables.table.get';
  2159. Var
  2160. _P : String;
  2161. begin
  2162. _P:=SubstitutePath(_Path,['tableId',tableId]);
  2163. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TTable) as TTable;
  2164. end;
  2165. Function TTableResource.ImportRows(tableId: string; AQuery : string = '') : TImport;
  2166. Const
  2167. _HTTPMethod = 'POST';
  2168. _Path = 'tables/{tableId}/import';
  2169. _Methodid = 'fusiontables.table.importRows';
  2170. Var
  2171. _P : String;
  2172. begin
  2173. _P:=SubstitutePath(_Path,['tableId',tableId]);
  2174. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TImport) as TImport;
  2175. end;
  2176. Function TTableResource.ImportRows(tableId: string; AQuery : TTableimportRowsOptions) : TImport;
  2177. Var
  2178. _Q : String;
  2179. begin
  2180. _Q:='';
  2181. AddToQuery(_Q,'delimiter',AQuery.delimiter);
  2182. AddToQuery(_Q,'encoding',AQuery.encoding);
  2183. AddToQuery(_Q,'endLine',AQuery.endLine);
  2184. AddToQuery(_Q,'isStrict',AQuery.isStrict);
  2185. AddToQuery(_Q,'startLine',AQuery.startLine);
  2186. Result:=ImportRows(tableId,_Q);
  2187. end;
  2188. Function TTableResource.ImportTable(AQuery : string = '') : TTable;
  2189. Const
  2190. _HTTPMethod = 'POST';
  2191. _Path = 'tables/import';
  2192. _Methodid = 'fusiontables.table.importTable';
  2193. begin
  2194. Result:=ServiceCall(_HTTPMethod,_Path,AQuery,Nil,TTable) as TTable;
  2195. end;
  2196. Function TTableResource.ImportTable(AQuery : TTableimportTableOptions) : TTable;
  2197. Var
  2198. _Q : String;
  2199. begin
  2200. _Q:='';
  2201. AddToQuery(_Q,'delimiter',AQuery.delimiter);
  2202. AddToQuery(_Q,'encoding',AQuery.encoding);
  2203. AddToQuery(_Q,'name',AQuery._name);
  2204. Result:=ImportTable(_Q);
  2205. end;
  2206. Function TTableResource.Insert(aTable : TTable) : TTable;
  2207. Const
  2208. _HTTPMethod = 'POST';
  2209. _Path = 'tables';
  2210. _Methodid = 'fusiontables.table.insert';
  2211. begin
  2212. Result:=ServiceCall(_HTTPMethod,_Path,'',aTable,TTable) as TTable;
  2213. end;
  2214. Function TTableResource.List(AQuery : string = '') : TTableList;
  2215. Const
  2216. _HTTPMethod = 'GET';
  2217. _Path = 'tables';
  2218. _Methodid = 'fusiontables.table.list';
  2219. begin
  2220. Result:=ServiceCall(_HTTPMethod,_Path,AQuery,Nil,TTableList) as TTableList;
  2221. end;
  2222. Function TTableResource.List(AQuery : TTablelistOptions) : TTableList;
  2223. Var
  2224. _Q : String;
  2225. begin
  2226. _Q:='';
  2227. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  2228. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2229. Result:=List(_Q);
  2230. end;
  2231. Function TTableResource.Patch(tableId: string; aTable : TTable; AQuery : string = '') : TTable;
  2232. Const
  2233. _HTTPMethod = 'PATCH';
  2234. _Path = 'tables/{tableId}';
  2235. _Methodid = 'fusiontables.table.patch';
  2236. Var
  2237. _P : String;
  2238. begin
  2239. _P:=SubstitutePath(_Path,['tableId',tableId]);
  2240. Result:=ServiceCall(_HTTPMethod,_P,AQuery,aTable,TTable) as TTable;
  2241. end;
  2242. Function TTableResource.Patch(tableId: string; aTable : TTable; AQuery : TTablepatchOptions) : TTable;
  2243. Var
  2244. _Q : String;
  2245. begin
  2246. _Q:='';
  2247. AddToQuery(_Q,'replaceViewDefinition',AQuery.replaceViewDefinition);
  2248. Result:=Patch(tableId,aTable,_Q);
  2249. end;
  2250. Function TTableResource.ReplaceRows(tableId: string; AQuery : string = '') : TTask;
  2251. Const
  2252. _HTTPMethod = 'POST';
  2253. _Path = 'tables/{tableId}/replace';
  2254. _Methodid = 'fusiontables.table.replaceRows';
  2255. Var
  2256. _P : String;
  2257. begin
  2258. _P:=SubstitutePath(_Path,['tableId',tableId]);
  2259. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TTask) as TTask;
  2260. end;
  2261. Function TTableResource.ReplaceRows(tableId: string; AQuery : TTablereplaceRowsOptions) : TTask;
  2262. Var
  2263. _Q : String;
  2264. begin
  2265. _Q:='';
  2266. AddToQuery(_Q,'delimiter',AQuery.delimiter);
  2267. AddToQuery(_Q,'encoding',AQuery.encoding);
  2268. AddToQuery(_Q,'endLine',AQuery.endLine);
  2269. AddToQuery(_Q,'isStrict',AQuery.isStrict);
  2270. AddToQuery(_Q,'startLine',AQuery.startLine);
  2271. Result:=ReplaceRows(tableId,_Q);
  2272. end;
  2273. Function TTableResource.Update(tableId: string; aTable : TTable; AQuery : string = '') : TTable;
  2274. Const
  2275. _HTTPMethod = 'PUT';
  2276. _Path = 'tables/{tableId}';
  2277. _Methodid = 'fusiontables.table.update';
  2278. Var
  2279. _P : String;
  2280. begin
  2281. _P:=SubstitutePath(_Path,['tableId',tableId]);
  2282. Result:=ServiceCall(_HTTPMethod,_P,AQuery,aTable,TTable) as TTable;
  2283. end;
  2284. Function TTableResource.Update(tableId: string; aTable : TTable; AQuery : TTableupdateOptions) : TTable;
  2285. Var
  2286. _Q : String;
  2287. begin
  2288. _Q:='';
  2289. AddToQuery(_Q,'replaceViewDefinition',AQuery.replaceViewDefinition);
  2290. Result:=Update(tableId,aTable,_Q);
  2291. end;
  2292. { --------------------------------------------------------------------
  2293. TTaskResource
  2294. --------------------------------------------------------------------}
  2295. Class Function TTaskResource.ResourceName : String;
  2296. begin
  2297. Result:='task';
  2298. end;
  2299. Class Function TTaskResource.DefaultAPI : TGoogleAPIClass;
  2300. begin
  2301. Result:=TfusiontablesAPI;
  2302. end;
  2303. Procedure TTaskResource.Delete(tableId: string; taskId: string);
  2304. Const
  2305. _HTTPMethod = 'DELETE';
  2306. _Path = 'tables/{tableId}/tasks/{taskId}';
  2307. _Methodid = 'fusiontables.task.delete';
  2308. Var
  2309. _P : String;
  2310. begin
  2311. _P:=SubstitutePath(_Path,['tableId',tableId,'taskId',taskId]);
  2312. ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
  2313. end;
  2314. Function TTaskResource.Get(tableId: string; taskId: string) : TTask;
  2315. Const
  2316. _HTTPMethod = 'GET';
  2317. _Path = 'tables/{tableId}/tasks/{taskId}';
  2318. _Methodid = 'fusiontables.task.get';
  2319. Var
  2320. _P : String;
  2321. begin
  2322. _P:=SubstitutePath(_Path,['tableId',tableId,'taskId',taskId]);
  2323. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TTask) as TTask;
  2324. end;
  2325. Function TTaskResource.List(tableId: string; AQuery : string = '') : TTaskList;
  2326. Const
  2327. _HTTPMethod = 'GET';
  2328. _Path = 'tables/{tableId}/tasks';
  2329. _Methodid = 'fusiontables.task.list';
  2330. Var
  2331. _P : String;
  2332. begin
  2333. _P:=SubstitutePath(_Path,['tableId',tableId]);
  2334. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TTaskList) as TTaskList;
  2335. end;
  2336. Function TTaskResource.List(tableId: string; AQuery : TTasklistOptions) : TTaskList;
  2337. Var
  2338. _Q : String;
  2339. begin
  2340. _Q:='';
  2341. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  2342. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2343. AddToQuery(_Q,'startIndex',AQuery.startIndex);
  2344. Result:=List(tableId,_Q);
  2345. end;
  2346. { --------------------------------------------------------------------
  2347. TTemplateResource
  2348. --------------------------------------------------------------------}
  2349. Class Function TTemplateResource.ResourceName : String;
  2350. begin
  2351. Result:='template';
  2352. end;
  2353. Class Function TTemplateResource.DefaultAPI : TGoogleAPIClass;
  2354. begin
  2355. Result:=TfusiontablesAPI;
  2356. end;
  2357. Procedure TTemplateResource.Delete(tableId: string; templateId: integer);
  2358. Const
  2359. _HTTPMethod = 'DELETE';
  2360. _Path = 'tables/{tableId}/templates/{templateId}';
  2361. _Methodid = 'fusiontables.template.delete';
  2362. Var
  2363. _P : String;
  2364. begin
  2365. _P:=SubstitutePath(_Path,['tableId',tableId,'templateId',templateId]);
  2366. ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
  2367. end;
  2368. Function TTemplateResource.Get(tableId: string; templateId: integer) : TTemplate;
  2369. Const
  2370. _HTTPMethod = 'GET';
  2371. _Path = 'tables/{tableId}/templates/{templateId}';
  2372. _Methodid = 'fusiontables.template.get';
  2373. Var
  2374. _P : String;
  2375. begin
  2376. _P:=SubstitutePath(_Path,['tableId',tableId,'templateId',templateId]);
  2377. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TTemplate) as TTemplate;
  2378. end;
  2379. Function TTemplateResource.Insert(tableId: string; aTemplate : TTemplate) : TTemplate;
  2380. Const
  2381. _HTTPMethod = 'POST';
  2382. _Path = 'tables/{tableId}/templates';
  2383. _Methodid = 'fusiontables.template.insert';
  2384. Var
  2385. _P : String;
  2386. begin
  2387. _P:=SubstitutePath(_Path,['tableId',tableId]);
  2388. Result:=ServiceCall(_HTTPMethod,_P,'',aTemplate,TTemplate) as TTemplate;
  2389. end;
  2390. Function TTemplateResource.List(tableId: string; AQuery : string = '') : TTemplateList;
  2391. Const
  2392. _HTTPMethod = 'GET';
  2393. _Path = 'tables/{tableId}/templates';
  2394. _Methodid = 'fusiontables.template.list';
  2395. Var
  2396. _P : String;
  2397. begin
  2398. _P:=SubstitutePath(_Path,['tableId',tableId]);
  2399. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TTemplateList) as TTemplateList;
  2400. end;
  2401. Function TTemplateResource.List(tableId: string; AQuery : TTemplatelistOptions) : TTemplateList;
  2402. Var
  2403. _Q : String;
  2404. begin
  2405. _Q:='';
  2406. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  2407. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2408. Result:=List(tableId,_Q);
  2409. end;
  2410. Function TTemplateResource.Patch(tableId: string; templateId: integer; aTemplate : TTemplate) : TTemplate;
  2411. Const
  2412. _HTTPMethod = 'PATCH';
  2413. _Path = 'tables/{tableId}/templates/{templateId}';
  2414. _Methodid = 'fusiontables.template.patch';
  2415. Var
  2416. _P : String;
  2417. begin
  2418. _P:=SubstitutePath(_Path,['tableId',tableId,'templateId',templateId]);
  2419. Result:=ServiceCall(_HTTPMethod,_P,'',aTemplate,TTemplate) as TTemplate;
  2420. end;
  2421. Function TTemplateResource.Update(tableId: string; templateId: integer; aTemplate : TTemplate) : TTemplate;
  2422. Const
  2423. _HTTPMethod = 'PUT';
  2424. _Path = 'tables/{tableId}/templates/{templateId}';
  2425. _Methodid = 'fusiontables.template.update';
  2426. Var
  2427. _P : String;
  2428. begin
  2429. _P:=SubstitutePath(_Path,['tableId',tableId,'templateId',templateId]);
  2430. Result:=ServiceCall(_HTTPMethod,_P,'',aTemplate,TTemplate) as TTemplate;
  2431. end;
  2432. { --------------------------------------------------------------------
  2433. TFusiontablesAPI
  2434. --------------------------------------------------------------------}
  2435. Class Function TFusiontablesAPI.APIName : String;
  2436. begin
  2437. Result:='fusiontables';
  2438. end;
  2439. Class Function TFusiontablesAPI.APIVersion : String;
  2440. begin
  2441. Result:='v2';
  2442. end;
  2443. Class Function TFusiontablesAPI.APIRevision : String;
  2444. begin
  2445. Result:='20150326';
  2446. end;
  2447. Class Function TFusiontablesAPI.APIID : String;
  2448. begin
  2449. Result:='fusiontables:v2';
  2450. end;
  2451. Class Function TFusiontablesAPI.APITitle : String;
  2452. begin
  2453. Result:='Fusion Tables API';
  2454. end;
  2455. Class Function TFusiontablesAPI.APIDescription : String;
  2456. begin
  2457. Result:='API for working with Fusion Tables data.';
  2458. end;
  2459. Class Function TFusiontablesAPI.APIOwnerDomain : String;
  2460. begin
  2461. Result:='google.com';
  2462. end;
  2463. Class Function TFusiontablesAPI.APIOwnerName : String;
  2464. begin
  2465. Result:='Google';
  2466. end;
  2467. Class Function TFusiontablesAPI.APIIcon16 : String;
  2468. begin
  2469. Result:='http://www.google.com/images/icons/product/search-16.gif';
  2470. end;
  2471. Class Function TFusiontablesAPI.APIIcon32 : String;
  2472. begin
  2473. Result:='http://www.google.com/images/icons/product/search-32.gif';
  2474. end;
  2475. Class Function TFusiontablesAPI.APIdocumentationLink : String;
  2476. begin
  2477. Result:='https://developers.google.com/fusiontables';
  2478. end;
  2479. Class Function TFusiontablesAPI.APIrootUrl : string;
  2480. begin
  2481. Result:='https://www.googleapis.com:443/';
  2482. end;
  2483. Class Function TFusiontablesAPI.APIbasePath : string;
  2484. begin
  2485. Result:='/fusiontables/v2/';
  2486. end;
  2487. Class Function TFusiontablesAPI.APIbaseURL : String;
  2488. begin
  2489. Result:='https://www.googleapis.com:443/fusiontables/v2/';
  2490. end;
  2491. Class Function TFusiontablesAPI.APIProtocol : string;
  2492. begin
  2493. Result:='rest';
  2494. end;
  2495. Class Function TFusiontablesAPI.APIservicePath : string;
  2496. begin
  2497. Result:='fusiontables/v2/';
  2498. end;
  2499. Class Function TFusiontablesAPI.APIbatchPath : String;
  2500. begin
  2501. Result:='batch';
  2502. end;
  2503. Class Function TFusiontablesAPI.APIAuthScopes : TScopeInfoArray;
  2504. begin
  2505. SetLength(Result,2);
  2506. Result[0].Name:='https://www.googleapis.com/auth/fusiontables';
  2507. Result[0].Description:='Manage your Fusion Tables';
  2508. Result[1].Name:='https://www.googleapis.com/auth/fusiontables.readonly';
  2509. Result[1].Description:='View your Fusion Tables';
  2510. end;
  2511. Class Function TFusiontablesAPI.APINeedsAuth : Boolean;
  2512. begin
  2513. Result:=True;
  2514. end;
  2515. Class Procedure TFusiontablesAPI.RegisterAPIResources;
  2516. begin
  2517. TBucket.RegisterObject;
  2518. TColumnTypebaseColumn.RegisterObject;
  2519. TColumn.RegisterObject;
  2520. TColumnList.RegisterObject;
  2521. TGeometry.RegisterObject;
  2522. TImport.RegisterObject;
  2523. TLine.RegisterObject;
  2524. TLineStyle.RegisterObject;
  2525. TPoint.RegisterObject;
  2526. TPointStyle.RegisterObject;
  2527. TPolygon.RegisterObject;
  2528. TPolygonStyle.RegisterObject;
  2529. TSqlresponse.RegisterObject;
  2530. TStyleFunctionTypegradientTypecolorsItem.RegisterObject;
  2531. TStyleFunctionTypegradient.RegisterObject;
  2532. TStyleFunction.RegisterObject;
  2533. TStyleSetting.RegisterObject;
  2534. TStyleSettingList.RegisterObject;
  2535. TTable.RegisterObject;
  2536. TTableList.RegisterObject;
  2537. TTask.RegisterObject;
  2538. TTaskList.RegisterObject;
  2539. TTemplate.RegisterObject;
  2540. TTemplateList.RegisterObject;
  2541. end;
  2542. Function TFusiontablesAPI.GetColumnInstance : TColumnResource;
  2543. begin
  2544. if (FColumnInstance=Nil) then
  2545. FColumnInstance:=CreateColumnResource;
  2546. Result:=FColumnInstance;
  2547. end;
  2548. Function TFusiontablesAPI.CreateColumnResource : TColumnResource;
  2549. begin
  2550. Result:=CreateColumnResource(Self);
  2551. end;
  2552. Function TFusiontablesAPI.CreateColumnResource(AOwner : TComponent) : TColumnResource;
  2553. begin
  2554. Result:=TColumnResource.Create(AOwner);
  2555. Result.API:=Self.API;
  2556. end;
  2557. Function TFusiontablesAPI.GetQueryInstance : TQueryResource;
  2558. begin
  2559. if (FQueryInstance=Nil) then
  2560. FQueryInstance:=CreateQueryResource;
  2561. Result:=FQueryInstance;
  2562. end;
  2563. Function TFusiontablesAPI.CreateQueryResource : TQueryResource;
  2564. begin
  2565. Result:=CreateQueryResource(Self);
  2566. end;
  2567. Function TFusiontablesAPI.CreateQueryResource(AOwner : TComponent) : TQueryResource;
  2568. begin
  2569. Result:=TQueryResource.Create(AOwner);
  2570. Result.API:=Self.API;
  2571. end;
  2572. Function TFusiontablesAPI.GetStyleInstance : TStyleResource;
  2573. begin
  2574. if (FStyleInstance=Nil) then
  2575. FStyleInstance:=CreateStyleResource;
  2576. Result:=FStyleInstance;
  2577. end;
  2578. Function TFusiontablesAPI.CreateStyleResource : TStyleResource;
  2579. begin
  2580. Result:=CreateStyleResource(Self);
  2581. end;
  2582. Function TFusiontablesAPI.CreateStyleResource(AOwner : TComponent) : TStyleResource;
  2583. begin
  2584. Result:=TStyleResource.Create(AOwner);
  2585. Result.API:=Self.API;
  2586. end;
  2587. Function TFusiontablesAPI.GetTableInstance : TTableResource;
  2588. begin
  2589. if (FTableInstance=Nil) then
  2590. FTableInstance:=CreateTableResource;
  2591. Result:=FTableInstance;
  2592. end;
  2593. Function TFusiontablesAPI.CreateTableResource : TTableResource;
  2594. begin
  2595. Result:=CreateTableResource(Self);
  2596. end;
  2597. Function TFusiontablesAPI.CreateTableResource(AOwner : TComponent) : TTableResource;
  2598. begin
  2599. Result:=TTableResource.Create(AOwner);
  2600. Result.API:=Self.API;
  2601. end;
  2602. Function TFusiontablesAPI.GetTaskInstance : TTaskResource;
  2603. begin
  2604. if (FTaskInstance=Nil) then
  2605. FTaskInstance:=CreateTaskResource;
  2606. Result:=FTaskInstance;
  2607. end;
  2608. Function TFusiontablesAPI.CreateTaskResource : TTaskResource;
  2609. begin
  2610. Result:=CreateTaskResource(Self);
  2611. end;
  2612. Function TFusiontablesAPI.CreateTaskResource(AOwner : TComponent) : TTaskResource;
  2613. begin
  2614. Result:=TTaskResource.Create(AOwner);
  2615. Result.API:=Self.API;
  2616. end;
  2617. Function TFusiontablesAPI.GetTemplateInstance : TTemplateResource;
  2618. begin
  2619. if (FTemplateInstance=Nil) then
  2620. FTemplateInstance:=CreateTemplateResource;
  2621. Result:=FTemplateInstance;
  2622. end;
  2623. Function TFusiontablesAPI.CreateTemplateResource : TTemplateResource;
  2624. begin
  2625. Result:=CreateTemplateResource(Self);
  2626. end;
  2627. Function TFusiontablesAPI.CreateTemplateResource(AOwner : TComponent) : TTemplateResource;
  2628. begin
  2629. Result:=TTemplateResource.Create(AOwner);
  2630. Result.API:=Self.API;
  2631. end;
  2632. initialization
  2633. TFusiontablesAPI.RegisterAPI;
  2634. end.