googlereplicapoolupdater.pp 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002
  1. unit googlereplicapoolupdater;
  2. {$MODE objfpc}
  3. {$H+}
  4. interface
  5. uses sysutils, classes, googleservice, restbase, googlebase;
  6. type
  7. //Top-level schema types
  8. TInstanceUpdate = Class;
  9. TInstanceUpdateList = Class;
  10. TOperation = Class;
  11. TOperationList = Class;
  12. TRollingUpdate = Class;
  13. TRollingUpdateList = Class;
  14. TInstanceUpdateArray = Array of TInstanceUpdate;
  15. TInstanceUpdateListArray = Array of TInstanceUpdateList;
  16. TOperationArray = Array of TOperation;
  17. TOperationListArray = Array of TOperationList;
  18. TRollingUpdateArray = Array of TRollingUpdate;
  19. TRollingUpdateListArray = Array of TRollingUpdateList;
  20. //Anonymous types, using auto-generated names
  21. TInstanceUpdateTypeerrorTypeerrorsItem = Class;
  22. TInstanceUpdateTypeerror = Class;
  23. TOperationTypeerrorTypeerrorsItem = Class;
  24. TOperationTypeerror = Class;
  25. TOperationTypewarningsItemTypedataItem = Class;
  26. TOperationTypewarningsItem = Class;
  27. TRollingUpdateTypeerrorTypeerrorsItem = Class;
  28. TRollingUpdateTypeerror = Class;
  29. TRollingUpdateTypepolicy = Class;
  30. TInstanceUpdateTypeerrorTypeerrorsArray = Array of TInstanceUpdateTypeerrorTypeerrorsItem;
  31. TInstanceUpdateListTypeitemsArray = Array of TInstanceUpdate;
  32. TOperationTypeerrorTypeerrorsArray = Array of TOperationTypeerrorTypeerrorsItem;
  33. TOperationTypewarningsItemTypedataArray = Array of TOperationTypewarningsItemTypedataItem;
  34. TOperationTypewarningsArray = Array of TOperationTypewarningsItem;
  35. TOperationListTypeitemsArray = Array of TOperation;
  36. TRollingUpdateTypeerrorTypeerrorsArray = Array of TRollingUpdateTypeerrorTypeerrorsItem;
  37. TRollingUpdateListTypeitemsArray = Array of TRollingUpdate;
  38. { --------------------------------------------------------------------
  39. TInstanceUpdateTypeerrorTypeerrorsItem
  40. --------------------------------------------------------------------}
  41. TInstanceUpdateTypeerrorTypeerrorsItem = Class(TGoogleBaseObject)
  42. Private
  43. Fcode : String;
  44. Flocation : String;
  45. Fmessage : String;
  46. Protected
  47. //Property setters
  48. Procedure Setcode(AIndex : Integer; const AValue : String); virtual;
  49. Procedure Setlocation(AIndex : Integer; const AValue : String); virtual;
  50. Procedure Setmessage(AIndex : Integer; const AValue : String); virtual;
  51. Public
  52. Published
  53. Property code : String Index 0 Read Fcode Write Setcode;
  54. Property location : String Index 8 Read Flocation Write Setlocation;
  55. Property message : String Index 16 Read Fmessage Write Setmessage;
  56. end;
  57. TInstanceUpdateTypeerrorTypeerrorsItemClass = Class of TInstanceUpdateTypeerrorTypeerrorsItem;
  58. { --------------------------------------------------------------------
  59. TInstanceUpdateTypeerror
  60. --------------------------------------------------------------------}
  61. TInstanceUpdateTypeerror = Class(TGoogleBaseObject)
  62. Private
  63. Ferrors : TInstanceUpdateTypeerrorTypeerrorsArray;
  64. Protected
  65. //Property setters
  66. Procedure Seterrors(AIndex : Integer; const AValue : TInstanceUpdateTypeerrorTypeerrorsArray); virtual;
  67. //2.6.4. bug workaround
  68. {$IFDEF VER2_6}
  69. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  70. {$ENDIF VER2_6}
  71. Public
  72. Published
  73. Property errors : TInstanceUpdateTypeerrorTypeerrorsArray Index 0 Read Ferrors Write Seterrors;
  74. end;
  75. TInstanceUpdateTypeerrorClass = Class of TInstanceUpdateTypeerror;
  76. { --------------------------------------------------------------------
  77. TInstanceUpdate
  78. --------------------------------------------------------------------}
  79. TInstanceUpdate = Class(TGoogleBaseObject)
  80. Private
  81. Ferror : TInstanceUpdateTypeerror;
  82. Finstance : String;
  83. Fstatus : String;
  84. Protected
  85. //Property setters
  86. Procedure Seterror(AIndex : Integer; const AValue : TInstanceUpdateTypeerror); virtual;
  87. Procedure Setinstance(AIndex : Integer; const AValue : String); virtual;
  88. Procedure Setstatus(AIndex : Integer; const AValue : String); virtual;
  89. Public
  90. Published
  91. Property error : TInstanceUpdateTypeerror Index 0 Read Ferror Write Seterror;
  92. Property instance : String Index 8 Read Finstance Write Setinstance;
  93. Property status : String Index 16 Read Fstatus Write Setstatus;
  94. end;
  95. TInstanceUpdateClass = Class of TInstanceUpdate;
  96. { --------------------------------------------------------------------
  97. TInstanceUpdateList
  98. --------------------------------------------------------------------}
  99. TInstanceUpdateList = Class(TGoogleBaseObject)
  100. Private
  101. Fitems : TInstanceUpdateListTypeitemsArray;
  102. Fkind : String;
  103. FnextPageToken : String;
  104. FselfLink : String;
  105. Protected
  106. //Property setters
  107. Procedure Setitems(AIndex : Integer; const AValue : TInstanceUpdateListTypeitemsArray); virtual;
  108. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  109. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  110. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  111. //2.6.4. bug workaround
  112. {$IFDEF VER2_6}
  113. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  114. {$ENDIF VER2_6}
  115. Public
  116. Published
  117. Property items : TInstanceUpdateListTypeitemsArray Index 0 Read Fitems Write Setitems;
  118. Property kind : String Index 8 Read Fkind Write Setkind;
  119. Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
  120. Property selfLink : String Index 24 Read FselfLink Write SetselfLink;
  121. end;
  122. TInstanceUpdateListClass = Class of TInstanceUpdateList;
  123. { --------------------------------------------------------------------
  124. TOperationTypeerrorTypeerrorsItem
  125. --------------------------------------------------------------------}
  126. TOperationTypeerrorTypeerrorsItem = Class(TGoogleBaseObject)
  127. Private
  128. Fcode : String;
  129. Flocation : String;
  130. Fmessage : String;
  131. Protected
  132. //Property setters
  133. Procedure Setcode(AIndex : Integer; const AValue : String); virtual;
  134. Procedure Setlocation(AIndex : Integer; const AValue : String); virtual;
  135. Procedure Setmessage(AIndex : Integer; const AValue : String); virtual;
  136. Public
  137. Published
  138. Property code : String Index 0 Read Fcode Write Setcode;
  139. Property location : String Index 8 Read Flocation Write Setlocation;
  140. Property message : String Index 16 Read Fmessage Write Setmessage;
  141. end;
  142. TOperationTypeerrorTypeerrorsItemClass = Class of TOperationTypeerrorTypeerrorsItem;
  143. { --------------------------------------------------------------------
  144. TOperationTypeerror
  145. --------------------------------------------------------------------}
  146. TOperationTypeerror = Class(TGoogleBaseObject)
  147. Private
  148. Ferrors : TOperationTypeerrorTypeerrorsArray;
  149. Protected
  150. //Property setters
  151. Procedure Seterrors(AIndex : Integer; const AValue : TOperationTypeerrorTypeerrorsArray); virtual;
  152. //2.6.4. bug workaround
  153. {$IFDEF VER2_6}
  154. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  155. {$ENDIF VER2_6}
  156. Public
  157. Published
  158. Property errors : TOperationTypeerrorTypeerrorsArray Index 0 Read Ferrors Write Seterrors;
  159. end;
  160. TOperationTypeerrorClass = Class of TOperationTypeerror;
  161. { --------------------------------------------------------------------
  162. TOperationTypewarningsItemTypedataItem
  163. --------------------------------------------------------------------}
  164. TOperationTypewarningsItemTypedataItem = Class(TGoogleBaseObject)
  165. Private
  166. Fkey : String;
  167. Fvalue : String;
  168. Protected
  169. //Property setters
  170. Procedure Setkey(AIndex : Integer; const AValue : String); virtual;
  171. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  172. Public
  173. Published
  174. Property key : String Index 0 Read Fkey Write Setkey;
  175. Property value : String Index 8 Read Fvalue Write Setvalue;
  176. end;
  177. TOperationTypewarningsItemTypedataItemClass = Class of TOperationTypewarningsItemTypedataItem;
  178. { --------------------------------------------------------------------
  179. TOperationTypewarningsItem
  180. --------------------------------------------------------------------}
  181. TOperationTypewarningsItem = Class(TGoogleBaseObject)
  182. Private
  183. Fcode : String;
  184. Fdata : TOperationTypewarningsItemTypedataArray;
  185. Fmessage : String;
  186. Protected
  187. //Property setters
  188. Procedure Setcode(AIndex : Integer; const AValue : String); virtual;
  189. Procedure Setdata(AIndex : Integer; const AValue : TOperationTypewarningsItemTypedataArray); virtual;
  190. Procedure Setmessage(AIndex : Integer; const AValue : String); 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 code : String Index 0 Read Fcode Write Setcode;
  198. Property data : TOperationTypewarningsItemTypedataArray Index 8 Read Fdata Write Setdata;
  199. Property message : String Index 16 Read Fmessage Write Setmessage;
  200. end;
  201. TOperationTypewarningsItemClass = Class of TOperationTypewarningsItem;
  202. { --------------------------------------------------------------------
  203. TOperation
  204. --------------------------------------------------------------------}
  205. TOperation = Class(TGoogleBaseObject)
  206. Private
  207. FclientOperationId : String;
  208. FcreationTimestamp : String;
  209. FendTime : String;
  210. Ferror : TOperationTypeerror;
  211. FhttpErrorMessage : String;
  212. FhttpErrorStatusCode : integer;
  213. Fid : String;
  214. FinsertTime : String;
  215. Fkind : String;
  216. Fname : String;
  217. FoperationType : String;
  218. Fprogress : integer;
  219. Fregion : String;
  220. FselfLink : String;
  221. FstartTime : String;
  222. Fstatus : String;
  223. FstatusMessage : String;
  224. FtargetId : String;
  225. FtargetLink : String;
  226. Fuser : String;
  227. Fwarnings : TOperationTypewarningsArray;
  228. Fzone : String;
  229. Protected
  230. //Property setters
  231. Procedure SetclientOperationId(AIndex : Integer; const AValue : String); virtual;
  232. Procedure SetcreationTimestamp(AIndex : Integer; const AValue : String); virtual;
  233. Procedure SetendTime(AIndex : Integer; const AValue : String); virtual;
  234. Procedure Seterror(AIndex : Integer; const AValue : TOperationTypeerror); virtual;
  235. Procedure SethttpErrorMessage(AIndex : Integer; const AValue : String); virtual;
  236. Procedure SethttpErrorStatusCode(AIndex : Integer; const AValue : integer); virtual;
  237. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  238. Procedure SetinsertTime(AIndex : Integer; const AValue : String); virtual;
  239. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  240. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  241. Procedure SetoperationType(AIndex : Integer; const AValue : String); virtual;
  242. Procedure Setprogress(AIndex : Integer; const AValue : integer); virtual;
  243. Procedure Setregion(AIndex : Integer; const AValue : String); virtual;
  244. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  245. Procedure SetstartTime(AIndex : Integer; const AValue : String); virtual;
  246. Procedure Setstatus(AIndex : Integer; const AValue : String); virtual;
  247. Procedure SetstatusMessage(AIndex : Integer; const AValue : String); virtual;
  248. Procedure SettargetId(AIndex : Integer; const AValue : String); virtual;
  249. Procedure SettargetLink(AIndex : Integer; const AValue : String); virtual;
  250. Procedure Setuser(AIndex : Integer; const AValue : String); virtual;
  251. Procedure Setwarnings(AIndex : Integer; const AValue : TOperationTypewarningsArray); virtual;
  252. Procedure Setzone(AIndex : Integer; const AValue : String); virtual;
  253. //2.6.4. bug workaround
  254. {$IFDEF VER2_6}
  255. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  256. {$ENDIF VER2_6}
  257. Public
  258. Published
  259. Property clientOperationId : String Index 0 Read FclientOperationId Write SetclientOperationId;
  260. Property creationTimestamp : String Index 8 Read FcreationTimestamp Write SetcreationTimestamp;
  261. Property endTime : String Index 16 Read FendTime Write SetendTime;
  262. Property error : TOperationTypeerror Index 24 Read Ferror Write Seterror;
  263. Property httpErrorMessage : String Index 32 Read FhttpErrorMessage Write SethttpErrorMessage;
  264. Property httpErrorStatusCode : integer Index 40 Read FhttpErrorStatusCode Write SethttpErrorStatusCode;
  265. Property id : String Index 48 Read Fid Write Setid;
  266. Property insertTime : String Index 56 Read FinsertTime Write SetinsertTime;
  267. Property kind : String Index 64 Read Fkind Write Setkind;
  268. Property name : String Index 72 Read Fname Write Setname;
  269. Property operationType : String Index 80 Read FoperationType Write SetoperationType;
  270. Property progress : integer Index 88 Read Fprogress Write Setprogress;
  271. Property region : String Index 96 Read Fregion Write Setregion;
  272. Property selfLink : String Index 104 Read FselfLink Write SetselfLink;
  273. Property startTime : String Index 112 Read FstartTime Write SetstartTime;
  274. Property status : String Index 120 Read Fstatus Write Setstatus;
  275. Property statusMessage : String Index 128 Read FstatusMessage Write SetstatusMessage;
  276. Property targetId : String Index 136 Read FtargetId Write SettargetId;
  277. Property targetLink : String Index 144 Read FtargetLink Write SettargetLink;
  278. Property user : String Index 152 Read Fuser Write Setuser;
  279. Property warnings : TOperationTypewarningsArray Index 160 Read Fwarnings Write Setwarnings;
  280. Property zone : String Index 168 Read Fzone Write Setzone;
  281. end;
  282. TOperationClass = Class of TOperation;
  283. { --------------------------------------------------------------------
  284. TOperationList
  285. --------------------------------------------------------------------}
  286. TOperationList = Class(TGoogleBaseObject)
  287. Private
  288. Fid : String;
  289. Fitems : TOperationListTypeitemsArray;
  290. Fkind : String;
  291. FnextPageToken : String;
  292. FselfLink : String;
  293. Protected
  294. //Property setters
  295. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  296. Procedure Setitems(AIndex : Integer; const AValue : TOperationListTypeitemsArray); virtual;
  297. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  298. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  299. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  300. //2.6.4. bug workaround
  301. {$IFDEF VER2_6}
  302. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  303. {$ENDIF VER2_6}
  304. Public
  305. Published
  306. Property id : String Index 0 Read Fid Write Setid;
  307. Property items : TOperationListTypeitemsArray Index 8 Read Fitems Write Setitems;
  308. Property kind : String Index 16 Read Fkind Write Setkind;
  309. Property nextPageToken : String Index 24 Read FnextPageToken Write SetnextPageToken;
  310. Property selfLink : String Index 32 Read FselfLink Write SetselfLink;
  311. end;
  312. TOperationListClass = Class of TOperationList;
  313. { --------------------------------------------------------------------
  314. TRollingUpdateTypeerrorTypeerrorsItem
  315. --------------------------------------------------------------------}
  316. TRollingUpdateTypeerrorTypeerrorsItem = Class(TGoogleBaseObject)
  317. Private
  318. Fcode : String;
  319. Flocation : String;
  320. Fmessage : String;
  321. Protected
  322. //Property setters
  323. Procedure Setcode(AIndex : Integer; const AValue : String); virtual;
  324. Procedure Setlocation(AIndex : Integer; const AValue : String); virtual;
  325. Procedure Setmessage(AIndex : Integer; const AValue : String); virtual;
  326. Public
  327. Published
  328. Property code : String Index 0 Read Fcode Write Setcode;
  329. Property location : String Index 8 Read Flocation Write Setlocation;
  330. Property message : String Index 16 Read Fmessage Write Setmessage;
  331. end;
  332. TRollingUpdateTypeerrorTypeerrorsItemClass = Class of TRollingUpdateTypeerrorTypeerrorsItem;
  333. { --------------------------------------------------------------------
  334. TRollingUpdateTypeerror
  335. --------------------------------------------------------------------}
  336. TRollingUpdateTypeerror = Class(TGoogleBaseObject)
  337. Private
  338. Ferrors : TRollingUpdateTypeerrorTypeerrorsArray;
  339. Protected
  340. //Property setters
  341. Procedure Seterrors(AIndex : Integer; const AValue : TRollingUpdateTypeerrorTypeerrorsArray); virtual;
  342. //2.6.4. bug workaround
  343. {$IFDEF VER2_6}
  344. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  345. {$ENDIF VER2_6}
  346. Public
  347. Published
  348. Property errors : TRollingUpdateTypeerrorTypeerrorsArray Index 0 Read Ferrors Write Seterrors;
  349. end;
  350. TRollingUpdateTypeerrorClass = Class of TRollingUpdateTypeerror;
  351. { --------------------------------------------------------------------
  352. TRollingUpdateTypepolicy
  353. --------------------------------------------------------------------}
  354. TRollingUpdateTypepolicy = Class(TGoogleBaseObject)
  355. Private
  356. FautoPauseAfterInstances : integer;
  357. FinstanceStartupTimeoutSec : integer;
  358. FmaxNumConcurrentInstances : integer;
  359. FmaxNumFailedInstances : integer;
  360. FminInstanceUpdateTimeSec : integer;
  361. Protected
  362. //Property setters
  363. Procedure SetautoPauseAfterInstances(AIndex : Integer; const AValue : integer); virtual;
  364. Procedure SetinstanceStartupTimeoutSec(AIndex : Integer; const AValue : integer); virtual;
  365. Procedure SetmaxNumConcurrentInstances(AIndex : Integer; const AValue : integer); virtual;
  366. Procedure SetmaxNumFailedInstances(AIndex : Integer; const AValue : integer); virtual;
  367. Procedure SetminInstanceUpdateTimeSec(AIndex : Integer; const AValue : integer); virtual;
  368. Public
  369. Published
  370. Property autoPauseAfterInstances : integer Index 0 Read FautoPauseAfterInstances Write SetautoPauseAfterInstances;
  371. Property instanceStartupTimeoutSec : integer Index 8 Read FinstanceStartupTimeoutSec Write SetinstanceStartupTimeoutSec;
  372. Property maxNumConcurrentInstances : integer Index 16 Read FmaxNumConcurrentInstances Write SetmaxNumConcurrentInstances;
  373. Property maxNumFailedInstances : integer Index 24 Read FmaxNumFailedInstances Write SetmaxNumFailedInstances;
  374. Property minInstanceUpdateTimeSec : integer Index 32 Read FminInstanceUpdateTimeSec Write SetminInstanceUpdateTimeSec;
  375. end;
  376. TRollingUpdateTypepolicyClass = Class of TRollingUpdateTypepolicy;
  377. { --------------------------------------------------------------------
  378. TRollingUpdate
  379. --------------------------------------------------------------------}
  380. TRollingUpdate = Class(TGoogleBaseObject)
  381. Private
  382. FactionType : String;
  383. FcreationTimestamp : String;
  384. Fdescription : String;
  385. Ferror : TRollingUpdateTypeerror;
  386. Fid : String;
  387. FinstanceGroup : String;
  388. FinstanceGroupManager : String;
  389. FinstanceTemplate : String;
  390. Fkind : String;
  391. FoldInstanceTemplate : String;
  392. Fpolicy : TRollingUpdateTypepolicy;
  393. Fprogress : integer;
  394. FselfLink : String;
  395. Fstatus : String;
  396. FstatusMessage : String;
  397. Fuser : String;
  398. Protected
  399. //Property setters
  400. Procedure SetactionType(AIndex : Integer; const AValue : String); virtual;
  401. Procedure SetcreationTimestamp(AIndex : Integer; const AValue : String); virtual;
  402. Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
  403. Procedure Seterror(AIndex : Integer; const AValue : TRollingUpdateTypeerror); virtual;
  404. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  405. Procedure SetinstanceGroup(AIndex : Integer; const AValue : String); virtual;
  406. Procedure SetinstanceGroupManager(AIndex : Integer; const AValue : String); virtual;
  407. Procedure SetinstanceTemplate(AIndex : Integer; const AValue : String); virtual;
  408. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  409. Procedure SetoldInstanceTemplate(AIndex : Integer; const AValue : String); virtual;
  410. Procedure Setpolicy(AIndex : Integer; const AValue : TRollingUpdateTypepolicy); virtual;
  411. Procedure Setprogress(AIndex : Integer; const AValue : integer); virtual;
  412. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  413. Procedure Setstatus(AIndex : Integer; const AValue : String); virtual;
  414. Procedure SetstatusMessage(AIndex : Integer; const AValue : String); virtual;
  415. Procedure Setuser(AIndex : Integer; const AValue : String); virtual;
  416. Public
  417. Published
  418. Property actionType : String Index 0 Read FactionType Write SetactionType;
  419. Property creationTimestamp : String Index 8 Read FcreationTimestamp Write SetcreationTimestamp;
  420. Property description : String Index 16 Read Fdescription Write Setdescription;
  421. Property error : TRollingUpdateTypeerror Index 24 Read Ferror Write Seterror;
  422. Property id : String Index 32 Read Fid Write Setid;
  423. Property instanceGroup : String Index 40 Read FinstanceGroup Write SetinstanceGroup;
  424. Property instanceGroupManager : String Index 48 Read FinstanceGroupManager Write SetinstanceGroupManager;
  425. Property instanceTemplate : String Index 56 Read FinstanceTemplate Write SetinstanceTemplate;
  426. Property kind : String Index 64 Read Fkind Write Setkind;
  427. Property oldInstanceTemplate : String Index 72 Read FoldInstanceTemplate Write SetoldInstanceTemplate;
  428. Property policy : TRollingUpdateTypepolicy Index 80 Read Fpolicy Write Setpolicy;
  429. Property progress : integer Index 88 Read Fprogress Write Setprogress;
  430. Property selfLink : String Index 96 Read FselfLink Write SetselfLink;
  431. Property status : String Index 104 Read Fstatus Write Setstatus;
  432. Property statusMessage : String Index 112 Read FstatusMessage Write SetstatusMessage;
  433. Property user : String Index 120 Read Fuser Write Setuser;
  434. end;
  435. TRollingUpdateClass = Class of TRollingUpdate;
  436. { --------------------------------------------------------------------
  437. TRollingUpdateList
  438. --------------------------------------------------------------------}
  439. TRollingUpdateList = Class(TGoogleBaseObject)
  440. Private
  441. Fitems : TRollingUpdateListTypeitemsArray;
  442. Fkind : String;
  443. FnextPageToken : String;
  444. FselfLink : String;
  445. Protected
  446. //Property setters
  447. Procedure Setitems(AIndex : Integer; const AValue : TRollingUpdateListTypeitemsArray); virtual;
  448. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  449. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  450. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  451. //2.6.4. bug workaround
  452. {$IFDEF VER2_6}
  453. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  454. {$ENDIF VER2_6}
  455. Public
  456. Published
  457. Property items : TRollingUpdateListTypeitemsArray Index 0 Read Fitems Write Setitems;
  458. Property kind : String Index 8 Read Fkind Write Setkind;
  459. Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
  460. Property selfLink : String Index 24 Read FselfLink Write SetselfLink;
  461. end;
  462. TRollingUpdateListClass = Class of TRollingUpdateList;
  463. { --------------------------------------------------------------------
  464. TRollingUpdatesResource
  465. --------------------------------------------------------------------}
  466. //Optional query Options for TRollingUpdatesResource, method List
  467. TRollingUpdatesListOptions = Record
  468. filter : String;
  469. maxResults : integer;
  470. pageToken : String;
  471. end;
  472. //Optional query Options for TRollingUpdatesResource, method ListInstanceUpdates
  473. TRollingUpdatesListInstanceUpdatesOptions = Record
  474. filter : String;
  475. maxResults : integer;
  476. pageToken : String;
  477. end;
  478. TRollingUpdatesResource = Class(TGoogleResource)
  479. Public
  480. Class Function ResourceName : String; override;
  481. Class Function DefaultAPI : TGoogleAPIClass; override;
  482. Function Cancel(project: string; rollingUpdate: string; zone: string) : TOperation;
  483. Function Get(project: string; rollingUpdate: string; zone: string) : TRollingUpdate;
  484. Function Insert(project: string; zone: string; aRollingUpdate : TRollingUpdate) : TOperation;
  485. Function List(project: string; zone: string; AQuery : string = '') : TRollingUpdateList;
  486. Function List(project: string; zone: string; AQuery : TRollingUpdateslistOptions) : TRollingUpdateList;
  487. Function ListInstanceUpdates(project: string; rollingUpdate: string; zone: string; AQuery : string = '') : TInstanceUpdateList;
  488. Function ListInstanceUpdates(project: string; rollingUpdate: string; zone: string; AQuery : TRollingUpdateslistInstanceUpdatesOptions) : TInstanceUpdateList;
  489. Function Pause(project: string; rollingUpdate: string; zone: string) : TOperation;
  490. Function Resume(project: string; rollingUpdate: string; zone: string) : TOperation;
  491. Function Rollback(project: string; rollingUpdate: string; zone: string) : TOperation;
  492. end;
  493. { --------------------------------------------------------------------
  494. TZoneOperationsResource
  495. --------------------------------------------------------------------}
  496. //Optional query Options for TZoneOperationsResource, method List
  497. TZoneOperationsListOptions = Record
  498. filter : String;
  499. maxResults : integer;
  500. pageToken : String;
  501. end;
  502. TZoneOperationsResource = Class(TGoogleResource)
  503. Public
  504. Class Function ResourceName : String; override;
  505. Class Function DefaultAPI : TGoogleAPIClass; override;
  506. Function Get(operation: string; project: string; zone: string) : TOperation;
  507. Function List(project: string; zone: string; AQuery : string = '') : TOperationList;
  508. Function List(project: string; zone: string; AQuery : TZoneOperationslistOptions) : TOperationList;
  509. end;
  510. { --------------------------------------------------------------------
  511. TReplicapoolupdaterAPI
  512. --------------------------------------------------------------------}
  513. TReplicapoolupdaterAPI = Class(TGoogleAPI)
  514. Private
  515. FRollingUpdatesInstance : TRollingUpdatesResource;
  516. FZoneOperationsInstance : TZoneOperationsResource;
  517. Function GetRollingUpdatesInstance : TRollingUpdatesResource;virtual;
  518. Function GetZoneOperationsInstance : TZoneOperationsResource;virtual;
  519. Public
  520. //Override class functions with API info
  521. Class Function APIName : String; override;
  522. Class Function APIVersion : String; override;
  523. Class Function APIRevision : String; override;
  524. Class Function APIID : String; override;
  525. Class Function APITitle : String; override;
  526. Class Function APIDescription : String; override;
  527. Class Function APIOwnerDomain : String; override;
  528. Class Function APIOwnerName : String; override;
  529. Class Function APIIcon16 : String; override;
  530. Class Function APIIcon32 : String; override;
  531. Class Function APIdocumentationLink : String; override;
  532. Class Function APIrootUrl : string; override;
  533. Class Function APIbasePath : string;override;
  534. Class Function APIbaseURL : String;override;
  535. Class Function APIProtocol : string;override;
  536. Class Function APIservicePath : string;override;
  537. Class Function APIbatchPath : String;override;
  538. Class Function APIAuthScopes : TScopeInfoArray;override;
  539. Class Function APINeedsAuth : Boolean;override;
  540. Class Procedure RegisterAPIResources; override;
  541. //Add create function for resources
  542. Function CreateRollingUpdatesResource(AOwner : TComponent) : TRollingUpdatesResource;virtual;overload;
  543. Function CreateRollingUpdatesResource : TRollingUpdatesResource;virtual;overload;
  544. Function CreateZoneOperationsResource(AOwner : TComponent) : TZoneOperationsResource;virtual;overload;
  545. Function CreateZoneOperationsResource : TZoneOperationsResource;virtual;overload;
  546. //Add default on-demand instances for resources
  547. Property RollingUpdatesResource : TRollingUpdatesResource Read GetRollingUpdatesInstance;
  548. Property ZoneOperationsResource : TZoneOperationsResource Read GetZoneOperationsInstance;
  549. end;
  550. implementation
  551. { --------------------------------------------------------------------
  552. TInstanceUpdateTypeerrorTypeerrorsItem
  553. --------------------------------------------------------------------}
  554. Procedure TInstanceUpdateTypeerrorTypeerrorsItem.Setcode(AIndex : Integer; const AValue : String);
  555. begin
  556. If (Fcode=AValue) then exit;
  557. Fcode:=AValue;
  558. MarkPropertyChanged(AIndex);
  559. end;
  560. Procedure TInstanceUpdateTypeerrorTypeerrorsItem.Setlocation(AIndex : Integer; const AValue : String);
  561. begin
  562. If (Flocation=AValue) then exit;
  563. Flocation:=AValue;
  564. MarkPropertyChanged(AIndex);
  565. end;
  566. Procedure TInstanceUpdateTypeerrorTypeerrorsItem.Setmessage(AIndex : Integer; const AValue : String);
  567. begin
  568. If (Fmessage=AValue) then exit;
  569. Fmessage:=AValue;
  570. MarkPropertyChanged(AIndex);
  571. end;
  572. { --------------------------------------------------------------------
  573. TInstanceUpdateTypeerror
  574. --------------------------------------------------------------------}
  575. Procedure TInstanceUpdateTypeerror.Seterrors(AIndex : Integer; const AValue : TInstanceUpdateTypeerrorTypeerrorsArray);
  576. begin
  577. If (Ferrors=AValue) then exit;
  578. Ferrors:=AValue;
  579. MarkPropertyChanged(AIndex);
  580. end;
  581. //2.6.4. bug workaround
  582. {$IFDEF VER2_6}
  583. Procedure TInstanceUpdateTypeerror.SetArrayLength(Const AName : String; ALength : Longint);
  584. begin
  585. Case AName of
  586. 'errors' : SetLength(Ferrors,ALength);
  587. else
  588. Inherited SetArrayLength(AName,ALength);
  589. end;
  590. end;
  591. {$ENDIF VER2_6}
  592. { --------------------------------------------------------------------
  593. TInstanceUpdate
  594. --------------------------------------------------------------------}
  595. Procedure TInstanceUpdate.Seterror(AIndex : Integer; const AValue : TInstanceUpdateTypeerror);
  596. begin
  597. If (Ferror=AValue) then exit;
  598. Ferror:=AValue;
  599. MarkPropertyChanged(AIndex);
  600. end;
  601. Procedure TInstanceUpdate.Setinstance(AIndex : Integer; const AValue : String);
  602. begin
  603. If (Finstance=AValue) then exit;
  604. Finstance:=AValue;
  605. MarkPropertyChanged(AIndex);
  606. end;
  607. Procedure TInstanceUpdate.Setstatus(AIndex : Integer; const AValue : String);
  608. begin
  609. If (Fstatus=AValue) then exit;
  610. Fstatus:=AValue;
  611. MarkPropertyChanged(AIndex);
  612. end;
  613. { --------------------------------------------------------------------
  614. TInstanceUpdateList
  615. --------------------------------------------------------------------}
  616. Procedure TInstanceUpdateList.Setitems(AIndex : Integer; const AValue : TInstanceUpdateListTypeitemsArray);
  617. begin
  618. If (Fitems=AValue) then exit;
  619. Fitems:=AValue;
  620. MarkPropertyChanged(AIndex);
  621. end;
  622. Procedure TInstanceUpdateList.Setkind(AIndex : Integer; const AValue : String);
  623. begin
  624. If (Fkind=AValue) then exit;
  625. Fkind:=AValue;
  626. MarkPropertyChanged(AIndex);
  627. end;
  628. Procedure TInstanceUpdateList.SetnextPageToken(AIndex : Integer; const AValue : String);
  629. begin
  630. If (FnextPageToken=AValue) then exit;
  631. FnextPageToken:=AValue;
  632. MarkPropertyChanged(AIndex);
  633. end;
  634. Procedure TInstanceUpdateList.SetselfLink(AIndex : Integer; const AValue : String);
  635. begin
  636. If (FselfLink=AValue) then exit;
  637. FselfLink:=AValue;
  638. MarkPropertyChanged(AIndex);
  639. end;
  640. //2.6.4. bug workaround
  641. {$IFDEF VER2_6}
  642. Procedure TInstanceUpdateList.SetArrayLength(Const AName : String; ALength : Longint);
  643. begin
  644. Case AName of
  645. 'items' : SetLength(Fitems,ALength);
  646. else
  647. Inherited SetArrayLength(AName,ALength);
  648. end;
  649. end;
  650. {$ENDIF VER2_6}
  651. { --------------------------------------------------------------------
  652. TOperationTypeerrorTypeerrorsItem
  653. --------------------------------------------------------------------}
  654. Procedure TOperationTypeerrorTypeerrorsItem.Setcode(AIndex : Integer; const AValue : String);
  655. begin
  656. If (Fcode=AValue) then exit;
  657. Fcode:=AValue;
  658. MarkPropertyChanged(AIndex);
  659. end;
  660. Procedure TOperationTypeerrorTypeerrorsItem.Setlocation(AIndex : Integer; const AValue : String);
  661. begin
  662. If (Flocation=AValue) then exit;
  663. Flocation:=AValue;
  664. MarkPropertyChanged(AIndex);
  665. end;
  666. Procedure TOperationTypeerrorTypeerrorsItem.Setmessage(AIndex : Integer; const AValue : String);
  667. begin
  668. If (Fmessage=AValue) then exit;
  669. Fmessage:=AValue;
  670. MarkPropertyChanged(AIndex);
  671. end;
  672. { --------------------------------------------------------------------
  673. TOperationTypeerror
  674. --------------------------------------------------------------------}
  675. Procedure TOperationTypeerror.Seterrors(AIndex : Integer; const AValue : TOperationTypeerrorTypeerrorsArray);
  676. begin
  677. If (Ferrors=AValue) then exit;
  678. Ferrors:=AValue;
  679. MarkPropertyChanged(AIndex);
  680. end;
  681. //2.6.4. bug workaround
  682. {$IFDEF VER2_6}
  683. Procedure TOperationTypeerror.SetArrayLength(Const AName : String; ALength : Longint);
  684. begin
  685. Case AName of
  686. 'errors' : SetLength(Ferrors,ALength);
  687. else
  688. Inherited SetArrayLength(AName,ALength);
  689. end;
  690. end;
  691. {$ENDIF VER2_6}
  692. { --------------------------------------------------------------------
  693. TOperationTypewarningsItemTypedataItem
  694. --------------------------------------------------------------------}
  695. Procedure TOperationTypewarningsItemTypedataItem.Setkey(AIndex : Integer; const AValue : String);
  696. begin
  697. If (Fkey=AValue) then exit;
  698. Fkey:=AValue;
  699. MarkPropertyChanged(AIndex);
  700. end;
  701. Procedure TOperationTypewarningsItemTypedataItem.Setvalue(AIndex : Integer; const AValue : String);
  702. begin
  703. If (Fvalue=AValue) then exit;
  704. Fvalue:=AValue;
  705. MarkPropertyChanged(AIndex);
  706. end;
  707. { --------------------------------------------------------------------
  708. TOperationTypewarningsItem
  709. --------------------------------------------------------------------}
  710. Procedure TOperationTypewarningsItem.Setcode(AIndex : Integer; const AValue : String);
  711. begin
  712. If (Fcode=AValue) then exit;
  713. Fcode:=AValue;
  714. MarkPropertyChanged(AIndex);
  715. end;
  716. Procedure TOperationTypewarningsItem.Setdata(AIndex : Integer; const AValue : TOperationTypewarningsItemTypedataArray);
  717. begin
  718. If (Fdata=AValue) then exit;
  719. Fdata:=AValue;
  720. MarkPropertyChanged(AIndex);
  721. end;
  722. Procedure TOperationTypewarningsItem.Setmessage(AIndex : Integer; const AValue : String);
  723. begin
  724. If (Fmessage=AValue) then exit;
  725. Fmessage:=AValue;
  726. MarkPropertyChanged(AIndex);
  727. end;
  728. //2.6.4. bug workaround
  729. {$IFDEF VER2_6}
  730. Procedure TOperationTypewarningsItem.SetArrayLength(Const AName : String; ALength : Longint);
  731. begin
  732. Case AName of
  733. 'data' : SetLength(Fdata,ALength);
  734. else
  735. Inherited SetArrayLength(AName,ALength);
  736. end;
  737. end;
  738. {$ENDIF VER2_6}
  739. { --------------------------------------------------------------------
  740. TOperation
  741. --------------------------------------------------------------------}
  742. Procedure TOperation.SetclientOperationId(AIndex : Integer; const AValue : String);
  743. begin
  744. If (FclientOperationId=AValue) then exit;
  745. FclientOperationId:=AValue;
  746. MarkPropertyChanged(AIndex);
  747. end;
  748. Procedure TOperation.SetcreationTimestamp(AIndex : Integer; const AValue : String);
  749. begin
  750. If (FcreationTimestamp=AValue) then exit;
  751. FcreationTimestamp:=AValue;
  752. MarkPropertyChanged(AIndex);
  753. end;
  754. Procedure TOperation.SetendTime(AIndex : Integer; const AValue : String);
  755. begin
  756. If (FendTime=AValue) then exit;
  757. FendTime:=AValue;
  758. MarkPropertyChanged(AIndex);
  759. end;
  760. Procedure TOperation.Seterror(AIndex : Integer; const AValue : TOperationTypeerror);
  761. begin
  762. If (Ferror=AValue) then exit;
  763. Ferror:=AValue;
  764. MarkPropertyChanged(AIndex);
  765. end;
  766. Procedure TOperation.SethttpErrorMessage(AIndex : Integer; const AValue : String);
  767. begin
  768. If (FhttpErrorMessage=AValue) then exit;
  769. FhttpErrorMessage:=AValue;
  770. MarkPropertyChanged(AIndex);
  771. end;
  772. Procedure TOperation.SethttpErrorStatusCode(AIndex : Integer; const AValue : integer);
  773. begin
  774. If (FhttpErrorStatusCode=AValue) then exit;
  775. FhttpErrorStatusCode:=AValue;
  776. MarkPropertyChanged(AIndex);
  777. end;
  778. Procedure TOperation.Setid(AIndex : Integer; const AValue : String);
  779. begin
  780. If (Fid=AValue) then exit;
  781. Fid:=AValue;
  782. MarkPropertyChanged(AIndex);
  783. end;
  784. Procedure TOperation.SetinsertTime(AIndex : Integer; const AValue : String);
  785. begin
  786. If (FinsertTime=AValue) then exit;
  787. FinsertTime:=AValue;
  788. MarkPropertyChanged(AIndex);
  789. end;
  790. Procedure TOperation.Setkind(AIndex : Integer; const AValue : String);
  791. begin
  792. If (Fkind=AValue) then exit;
  793. Fkind:=AValue;
  794. MarkPropertyChanged(AIndex);
  795. end;
  796. Procedure TOperation.Setname(AIndex : Integer; const AValue : String);
  797. begin
  798. If (Fname=AValue) then exit;
  799. Fname:=AValue;
  800. MarkPropertyChanged(AIndex);
  801. end;
  802. Procedure TOperation.SetoperationType(AIndex : Integer; const AValue : String);
  803. begin
  804. If (FoperationType=AValue) then exit;
  805. FoperationType:=AValue;
  806. MarkPropertyChanged(AIndex);
  807. end;
  808. Procedure TOperation.Setprogress(AIndex : Integer; const AValue : integer);
  809. begin
  810. If (Fprogress=AValue) then exit;
  811. Fprogress:=AValue;
  812. MarkPropertyChanged(AIndex);
  813. end;
  814. Procedure TOperation.Setregion(AIndex : Integer; const AValue : String);
  815. begin
  816. If (Fregion=AValue) then exit;
  817. Fregion:=AValue;
  818. MarkPropertyChanged(AIndex);
  819. end;
  820. Procedure TOperation.SetselfLink(AIndex : Integer; const AValue : String);
  821. begin
  822. If (FselfLink=AValue) then exit;
  823. FselfLink:=AValue;
  824. MarkPropertyChanged(AIndex);
  825. end;
  826. Procedure TOperation.SetstartTime(AIndex : Integer; const AValue : String);
  827. begin
  828. If (FstartTime=AValue) then exit;
  829. FstartTime:=AValue;
  830. MarkPropertyChanged(AIndex);
  831. end;
  832. Procedure TOperation.Setstatus(AIndex : Integer; const AValue : String);
  833. begin
  834. If (Fstatus=AValue) then exit;
  835. Fstatus:=AValue;
  836. MarkPropertyChanged(AIndex);
  837. end;
  838. Procedure TOperation.SetstatusMessage(AIndex : Integer; const AValue : String);
  839. begin
  840. If (FstatusMessage=AValue) then exit;
  841. FstatusMessage:=AValue;
  842. MarkPropertyChanged(AIndex);
  843. end;
  844. Procedure TOperation.SettargetId(AIndex : Integer; const AValue : String);
  845. begin
  846. If (FtargetId=AValue) then exit;
  847. FtargetId:=AValue;
  848. MarkPropertyChanged(AIndex);
  849. end;
  850. Procedure TOperation.SettargetLink(AIndex : Integer; const AValue : String);
  851. begin
  852. If (FtargetLink=AValue) then exit;
  853. FtargetLink:=AValue;
  854. MarkPropertyChanged(AIndex);
  855. end;
  856. Procedure TOperation.Setuser(AIndex : Integer; const AValue : String);
  857. begin
  858. If (Fuser=AValue) then exit;
  859. Fuser:=AValue;
  860. MarkPropertyChanged(AIndex);
  861. end;
  862. Procedure TOperation.Setwarnings(AIndex : Integer; const AValue : TOperationTypewarningsArray);
  863. begin
  864. If (Fwarnings=AValue) then exit;
  865. Fwarnings:=AValue;
  866. MarkPropertyChanged(AIndex);
  867. end;
  868. Procedure TOperation.Setzone(AIndex : Integer; const AValue : String);
  869. begin
  870. If (Fzone=AValue) then exit;
  871. Fzone:=AValue;
  872. MarkPropertyChanged(AIndex);
  873. end;
  874. //2.6.4. bug workaround
  875. {$IFDEF VER2_6}
  876. Procedure TOperation.SetArrayLength(Const AName : String; ALength : Longint);
  877. begin
  878. Case AName of
  879. 'warnings' : SetLength(Fwarnings,ALength);
  880. else
  881. Inherited SetArrayLength(AName,ALength);
  882. end;
  883. end;
  884. {$ENDIF VER2_6}
  885. { --------------------------------------------------------------------
  886. TOperationList
  887. --------------------------------------------------------------------}
  888. Procedure TOperationList.Setid(AIndex : Integer; const AValue : String);
  889. begin
  890. If (Fid=AValue) then exit;
  891. Fid:=AValue;
  892. MarkPropertyChanged(AIndex);
  893. end;
  894. Procedure TOperationList.Setitems(AIndex : Integer; const AValue : TOperationListTypeitemsArray);
  895. begin
  896. If (Fitems=AValue) then exit;
  897. Fitems:=AValue;
  898. MarkPropertyChanged(AIndex);
  899. end;
  900. Procedure TOperationList.Setkind(AIndex : Integer; const AValue : String);
  901. begin
  902. If (Fkind=AValue) then exit;
  903. Fkind:=AValue;
  904. MarkPropertyChanged(AIndex);
  905. end;
  906. Procedure TOperationList.SetnextPageToken(AIndex : Integer; const AValue : String);
  907. begin
  908. If (FnextPageToken=AValue) then exit;
  909. FnextPageToken:=AValue;
  910. MarkPropertyChanged(AIndex);
  911. end;
  912. Procedure TOperationList.SetselfLink(AIndex : Integer; const AValue : String);
  913. begin
  914. If (FselfLink=AValue) then exit;
  915. FselfLink:=AValue;
  916. MarkPropertyChanged(AIndex);
  917. end;
  918. //2.6.4. bug workaround
  919. {$IFDEF VER2_6}
  920. Procedure TOperationList.SetArrayLength(Const AName : String; ALength : Longint);
  921. begin
  922. Case AName of
  923. 'items' : SetLength(Fitems,ALength);
  924. else
  925. Inherited SetArrayLength(AName,ALength);
  926. end;
  927. end;
  928. {$ENDIF VER2_6}
  929. { --------------------------------------------------------------------
  930. TRollingUpdateTypeerrorTypeerrorsItem
  931. --------------------------------------------------------------------}
  932. Procedure TRollingUpdateTypeerrorTypeerrorsItem.Setcode(AIndex : Integer; const AValue : String);
  933. begin
  934. If (Fcode=AValue) then exit;
  935. Fcode:=AValue;
  936. MarkPropertyChanged(AIndex);
  937. end;
  938. Procedure TRollingUpdateTypeerrorTypeerrorsItem.Setlocation(AIndex : Integer; const AValue : String);
  939. begin
  940. If (Flocation=AValue) then exit;
  941. Flocation:=AValue;
  942. MarkPropertyChanged(AIndex);
  943. end;
  944. Procedure TRollingUpdateTypeerrorTypeerrorsItem.Setmessage(AIndex : Integer; const AValue : String);
  945. begin
  946. If (Fmessage=AValue) then exit;
  947. Fmessage:=AValue;
  948. MarkPropertyChanged(AIndex);
  949. end;
  950. { --------------------------------------------------------------------
  951. TRollingUpdateTypeerror
  952. --------------------------------------------------------------------}
  953. Procedure TRollingUpdateTypeerror.Seterrors(AIndex : Integer; const AValue : TRollingUpdateTypeerrorTypeerrorsArray);
  954. begin
  955. If (Ferrors=AValue) then exit;
  956. Ferrors:=AValue;
  957. MarkPropertyChanged(AIndex);
  958. end;
  959. //2.6.4. bug workaround
  960. {$IFDEF VER2_6}
  961. Procedure TRollingUpdateTypeerror.SetArrayLength(Const AName : String; ALength : Longint);
  962. begin
  963. Case AName of
  964. 'errors' : SetLength(Ferrors,ALength);
  965. else
  966. Inherited SetArrayLength(AName,ALength);
  967. end;
  968. end;
  969. {$ENDIF VER2_6}
  970. { --------------------------------------------------------------------
  971. TRollingUpdateTypepolicy
  972. --------------------------------------------------------------------}
  973. Procedure TRollingUpdateTypepolicy.SetautoPauseAfterInstances(AIndex : Integer; const AValue : integer);
  974. begin
  975. If (FautoPauseAfterInstances=AValue) then exit;
  976. FautoPauseAfterInstances:=AValue;
  977. MarkPropertyChanged(AIndex);
  978. end;
  979. Procedure TRollingUpdateTypepolicy.SetinstanceStartupTimeoutSec(AIndex : Integer; const AValue : integer);
  980. begin
  981. If (FinstanceStartupTimeoutSec=AValue) then exit;
  982. FinstanceStartupTimeoutSec:=AValue;
  983. MarkPropertyChanged(AIndex);
  984. end;
  985. Procedure TRollingUpdateTypepolicy.SetmaxNumConcurrentInstances(AIndex : Integer; const AValue : integer);
  986. begin
  987. If (FmaxNumConcurrentInstances=AValue) then exit;
  988. FmaxNumConcurrentInstances:=AValue;
  989. MarkPropertyChanged(AIndex);
  990. end;
  991. Procedure TRollingUpdateTypepolicy.SetmaxNumFailedInstances(AIndex : Integer; const AValue : integer);
  992. begin
  993. If (FmaxNumFailedInstances=AValue) then exit;
  994. FmaxNumFailedInstances:=AValue;
  995. MarkPropertyChanged(AIndex);
  996. end;
  997. Procedure TRollingUpdateTypepolicy.SetminInstanceUpdateTimeSec(AIndex : Integer; const AValue : integer);
  998. begin
  999. If (FminInstanceUpdateTimeSec=AValue) then exit;
  1000. FminInstanceUpdateTimeSec:=AValue;
  1001. MarkPropertyChanged(AIndex);
  1002. end;
  1003. { --------------------------------------------------------------------
  1004. TRollingUpdate
  1005. --------------------------------------------------------------------}
  1006. Procedure TRollingUpdate.SetactionType(AIndex : Integer; const AValue : String);
  1007. begin
  1008. If (FactionType=AValue) then exit;
  1009. FactionType:=AValue;
  1010. MarkPropertyChanged(AIndex);
  1011. end;
  1012. Procedure TRollingUpdate.SetcreationTimestamp(AIndex : Integer; const AValue : String);
  1013. begin
  1014. If (FcreationTimestamp=AValue) then exit;
  1015. FcreationTimestamp:=AValue;
  1016. MarkPropertyChanged(AIndex);
  1017. end;
  1018. Procedure TRollingUpdate.Setdescription(AIndex : Integer; const AValue : String);
  1019. begin
  1020. If (Fdescription=AValue) then exit;
  1021. Fdescription:=AValue;
  1022. MarkPropertyChanged(AIndex);
  1023. end;
  1024. Procedure TRollingUpdate.Seterror(AIndex : Integer; const AValue : TRollingUpdateTypeerror);
  1025. begin
  1026. If (Ferror=AValue) then exit;
  1027. Ferror:=AValue;
  1028. MarkPropertyChanged(AIndex);
  1029. end;
  1030. Procedure TRollingUpdate.Setid(AIndex : Integer; const AValue : String);
  1031. begin
  1032. If (Fid=AValue) then exit;
  1033. Fid:=AValue;
  1034. MarkPropertyChanged(AIndex);
  1035. end;
  1036. Procedure TRollingUpdate.SetinstanceGroup(AIndex : Integer; const AValue : String);
  1037. begin
  1038. If (FinstanceGroup=AValue) then exit;
  1039. FinstanceGroup:=AValue;
  1040. MarkPropertyChanged(AIndex);
  1041. end;
  1042. Procedure TRollingUpdate.SetinstanceGroupManager(AIndex : Integer; const AValue : String);
  1043. begin
  1044. If (FinstanceGroupManager=AValue) then exit;
  1045. FinstanceGroupManager:=AValue;
  1046. MarkPropertyChanged(AIndex);
  1047. end;
  1048. Procedure TRollingUpdate.SetinstanceTemplate(AIndex : Integer; const AValue : String);
  1049. begin
  1050. If (FinstanceTemplate=AValue) then exit;
  1051. FinstanceTemplate:=AValue;
  1052. MarkPropertyChanged(AIndex);
  1053. end;
  1054. Procedure TRollingUpdate.Setkind(AIndex : Integer; const AValue : String);
  1055. begin
  1056. If (Fkind=AValue) then exit;
  1057. Fkind:=AValue;
  1058. MarkPropertyChanged(AIndex);
  1059. end;
  1060. Procedure TRollingUpdate.SetoldInstanceTemplate(AIndex : Integer; const AValue : String);
  1061. begin
  1062. If (FoldInstanceTemplate=AValue) then exit;
  1063. FoldInstanceTemplate:=AValue;
  1064. MarkPropertyChanged(AIndex);
  1065. end;
  1066. Procedure TRollingUpdate.Setpolicy(AIndex : Integer; const AValue : TRollingUpdateTypepolicy);
  1067. begin
  1068. If (Fpolicy=AValue) then exit;
  1069. Fpolicy:=AValue;
  1070. MarkPropertyChanged(AIndex);
  1071. end;
  1072. Procedure TRollingUpdate.Setprogress(AIndex : Integer; const AValue : integer);
  1073. begin
  1074. If (Fprogress=AValue) then exit;
  1075. Fprogress:=AValue;
  1076. MarkPropertyChanged(AIndex);
  1077. end;
  1078. Procedure TRollingUpdate.SetselfLink(AIndex : Integer; const AValue : String);
  1079. begin
  1080. If (FselfLink=AValue) then exit;
  1081. FselfLink:=AValue;
  1082. MarkPropertyChanged(AIndex);
  1083. end;
  1084. Procedure TRollingUpdate.Setstatus(AIndex : Integer; const AValue : String);
  1085. begin
  1086. If (Fstatus=AValue) then exit;
  1087. Fstatus:=AValue;
  1088. MarkPropertyChanged(AIndex);
  1089. end;
  1090. Procedure TRollingUpdate.SetstatusMessage(AIndex : Integer; const AValue : String);
  1091. begin
  1092. If (FstatusMessage=AValue) then exit;
  1093. FstatusMessage:=AValue;
  1094. MarkPropertyChanged(AIndex);
  1095. end;
  1096. Procedure TRollingUpdate.Setuser(AIndex : Integer; const AValue : String);
  1097. begin
  1098. If (Fuser=AValue) then exit;
  1099. Fuser:=AValue;
  1100. MarkPropertyChanged(AIndex);
  1101. end;
  1102. { --------------------------------------------------------------------
  1103. TRollingUpdateList
  1104. --------------------------------------------------------------------}
  1105. Procedure TRollingUpdateList.Setitems(AIndex : Integer; const AValue : TRollingUpdateListTypeitemsArray);
  1106. begin
  1107. If (Fitems=AValue) then exit;
  1108. Fitems:=AValue;
  1109. MarkPropertyChanged(AIndex);
  1110. end;
  1111. Procedure TRollingUpdateList.Setkind(AIndex : Integer; const AValue : String);
  1112. begin
  1113. If (Fkind=AValue) then exit;
  1114. Fkind:=AValue;
  1115. MarkPropertyChanged(AIndex);
  1116. end;
  1117. Procedure TRollingUpdateList.SetnextPageToken(AIndex : Integer; const AValue : String);
  1118. begin
  1119. If (FnextPageToken=AValue) then exit;
  1120. FnextPageToken:=AValue;
  1121. MarkPropertyChanged(AIndex);
  1122. end;
  1123. Procedure TRollingUpdateList.SetselfLink(AIndex : Integer; const AValue : String);
  1124. begin
  1125. If (FselfLink=AValue) then exit;
  1126. FselfLink:=AValue;
  1127. MarkPropertyChanged(AIndex);
  1128. end;
  1129. //2.6.4. bug workaround
  1130. {$IFDEF VER2_6}
  1131. Procedure TRollingUpdateList.SetArrayLength(Const AName : String; ALength : Longint);
  1132. begin
  1133. Case AName of
  1134. 'items' : SetLength(Fitems,ALength);
  1135. else
  1136. Inherited SetArrayLength(AName,ALength);
  1137. end;
  1138. end;
  1139. {$ENDIF VER2_6}
  1140. { --------------------------------------------------------------------
  1141. TRollingUpdatesResource
  1142. --------------------------------------------------------------------}
  1143. Class Function TRollingUpdatesResource.ResourceName : String;
  1144. begin
  1145. Result:='rollingUpdates';
  1146. end;
  1147. Class Function TRollingUpdatesResource.DefaultAPI : TGoogleAPIClass;
  1148. begin
  1149. Result:=TreplicapoolupdaterAPI;
  1150. end;
  1151. Function TRollingUpdatesResource.Cancel(project: string; rollingUpdate: string; zone: string) : TOperation;
  1152. Const
  1153. _HTTPMethod = 'POST';
  1154. _Path = '{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/cancel';
  1155. _Methodid = 'replicapoolupdater.rollingUpdates.cancel';
  1156. Var
  1157. _P : String;
  1158. begin
  1159. _P:=SubstitutePath(_Path,['project',project,'rollingUpdate',rollingUpdate,'zone',zone]);
  1160. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TOperation) as TOperation;
  1161. end;
  1162. Function TRollingUpdatesResource.Get(project: string; rollingUpdate: string; zone: string) : TRollingUpdate;
  1163. Const
  1164. _HTTPMethod = 'GET';
  1165. _Path = '{project}/zones/{zone}/rollingUpdates/{rollingUpdate}';
  1166. _Methodid = 'replicapoolupdater.rollingUpdates.get';
  1167. Var
  1168. _P : String;
  1169. begin
  1170. _P:=SubstitutePath(_Path,['project',project,'rollingUpdate',rollingUpdate,'zone',zone]);
  1171. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TRollingUpdate) as TRollingUpdate;
  1172. end;
  1173. Function TRollingUpdatesResource.Insert(project: string; zone: string; aRollingUpdate : TRollingUpdate) : TOperation;
  1174. Const
  1175. _HTTPMethod = 'POST';
  1176. _Path = '{project}/zones/{zone}/rollingUpdates';
  1177. _Methodid = 'replicapoolupdater.rollingUpdates.insert';
  1178. Var
  1179. _P : String;
  1180. begin
  1181. _P:=SubstitutePath(_Path,['project',project,'zone',zone]);
  1182. Result:=ServiceCall(_HTTPMethod,_P,'',aRollingUpdate,TOperation) as TOperation;
  1183. end;
  1184. Function TRollingUpdatesResource.List(project: string; zone: string; AQuery : string = '') : TRollingUpdateList;
  1185. Const
  1186. _HTTPMethod = 'GET';
  1187. _Path = '{project}/zones/{zone}/rollingUpdates';
  1188. _Methodid = 'replicapoolupdater.rollingUpdates.list';
  1189. Var
  1190. _P : String;
  1191. begin
  1192. _P:=SubstitutePath(_Path,['project',project,'zone',zone]);
  1193. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TRollingUpdateList) as TRollingUpdateList;
  1194. end;
  1195. Function TRollingUpdatesResource.List(project: string; zone: string; AQuery : TRollingUpdateslistOptions) : TRollingUpdateList;
  1196. Var
  1197. _Q : String;
  1198. begin
  1199. _Q:='';
  1200. AddToQuery(_Q,'filter',AQuery.filter);
  1201. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  1202. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  1203. Result:=List(project,zone,_Q);
  1204. end;
  1205. Function TRollingUpdatesResource.ListInstanceUpdates(project: string; rollingUpdate: string; zone: string; AQuery : string = '') : TInstanceUpdateList;
  1206. Const
  1207. _HTTPMethod = 'GET';
  1208. _Path = '{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/instanceUpdates';
  1209. _Methodid = 'replicapoolupdater.rollingUpdates.listInstanceUpdates';
  1210. Var
  1211. _P : String;
  1212. begin
  1213. _P:=SubstitutePath(_Path,['project',project,'rollingUpdate',rollingUpdate,'zone',zone]);
  1214. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TInstanceUpdateList) as TInstanceUpdateList;
  1215. end;
  1216. Function TRollingUpdatesResource.ListInstanceUpdates(project: string; rollingUpdate: string; zone: string; AQuery : TRollingUpdateslistInstanceUpdatesOptions) : TInstanceUpdateList;
  1217. Var
  1218. _Q : String;
  1219. begin
  1220. _Q:='';
  1221. AddToQuery(_Q,'filter',AQuery.filter);
  1222. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  1223. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  1224. Result:=ListInstanceUpdates(project,rollingUpdate,zone,_Q);
  1225. end;
  1226. Function TRollingUpdatesResource.Pause(project: string; rollingUpdate: string; zone: string) : TOperation;
  1227. Const
  1228. _HTTPMethod = 'POST';
  1229. _Path = '{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/pause';
  1230. _Methodid = 'replicapoolupdater.rollingUpdates.pause';
  1231. Var
  1232. _P : String;
  1233. begin
  1234. _P:=SubstitutePath(_Path,['project',project,'rollingUpdate',rollingUpdate,'zone',zone]);
  1235. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TOperation) as TOperation;
  1236. end;
  1237. Function TRollingUpdatesResource.Resume(project: string; rollingUpdate: string; zone: string) : TOperation;
  1238. Const
  1239. _HTTPMethod = 'POST';
  1240. _Path = '{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/resume';
  1241. _Methodid = 'replicapoolupdater.rollingUpdates.resume';
  1242. Var
  1243. _P : String;
  1244. begin
  1245. _P:=SubstitutePath(_Path,['project',project,'rollingUpdate',rollingUpdate,'zone',zone]);
  1246. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TOperation) as TOperation;
  1247. end;
  1248. Function TRollingUpdatesResource.Rollback(project: string; rollingUpdate: string; zone: string) : TOperation;
  1249. Const
  1250. _HTTPMethod = 'POST';
  1251. _Path = '{project}/zones/{zone}/rollingUpdates/{rollingUpdate}/rollback';
  1252. _Methodid = 'replicapoolupdater.rollingUpdates.rollback';
  1253. Var
  1254. _P : String;
  1255. begin
  1256. _P:=SubstitutePath(_Path,['project',project,'rollingUpdate',rollingUpdate,'zone',zone]);
  1257. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TOperation) as TOperation;
  1258. end;
  1259. { --------------------------------------------------------------------
  1260. TZoneOperationsResource
  1261. --------------------------------------------------------------------}
  1262. Class Function TZoneOperationsResource.ResourceName : String;
  1263. begin
  1264. Result:='zoneOperations';
  1265. end;
  1266. Class Function TZoneOperationsResource.DefaultAPI : TGoogleAPIClass;
  1267. begin
  1268. Result:=TreplicapoolupdaterAPI;
  1269. end;
  1270. Function TZoneOperationsResource.Get(operation: string; project: string; zone: string) : TOperation;
  1271. Const
  1272. _HTTPMethod = 'GET';
  1273. _Path = '{project}/zones/{zone}/operations/{operation}';
  1274. _Methodid = 'replicapoolupdater.zoneOperations.get';
  1275. Var
  1276. _P : String;
  1277. begin
  1278. _P:=SubstitutePath(_Path,['operation',operation,'project',project,'zone',zone]);
  1279. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TOperation) as TOperation;
  1280. end;
  1281. Function TZoneOperationsResource.List(project: string; zone: string; AQuery : string = '') : TOperationList;
  1282. Const
  1283. _HTTPMethod = 'GET';
  1284. _Path = '{project}/zones/{zone}/operations';
  1285. _Methodid = 'replicapoolupdater.zoneOperations.list';
  1286. Var
  1287. _P : String;
  1288. begin
  1289. _P:=SubstitutePath(_Path,['project',project,'zone',zone]);
  1290. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TOperationList) as TOperationList;
  1291. end;
  1292. Function TZoneOperationsResource.List(project: string; zone: string; AQuery : TZoneOperationslistOptions) : TOperationList;
  1293. Var
  1294. _Q : String;
  1295. begin
  1296. _Q:='';
  1297. AddToQuery(_Q,'filter',AQuery.filter);
  1298. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  1299. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  1300. Result:=List(project,zone,_Q);
  1301. end;
  1302. { --------------------------------------------------------------------
  1303. TReplicapoolupdaterAPI
  1304. --------------------------------------------------------------------}
  1305. Class Function TReplicapoolupdaterAPI.APIName : String;
  1306. begin
  1307. Result:='replicapoolupdater';
  1308. end;
  1309. Class Function TReplicapoolupdaterAPI.APIVersion : String;
  1310. begin
  1311. Result:='v1beta1';
  1312. end;
  1313. Class Function TReplicapoolupdaterAPI.APIRevision : String;
  1314. begin
  1315. Result:='20160229';
  1316. end;
  1317. Class Function TReplicapoolupdaterAPI.APIID : String;
  1318. begin
  1319. Result:='replicapoolupdater:v1beta1';
  1320. end;
  1321. Class Function TReplicapoolupdaterAPI.APITitle : String;
  1322. begin
  1323. Result:='Google Compute Engine Instance Group Updater API';
  1324. end;
  1325. Class Function TReplicapoolupdaterAPI.APIDescription : String;
  1326. begin
  1327. Result:='Updates groups of Compute Engine instances.';
  1328. end;
  1329. Class Function TReplicapoolupdaterAPI.APIOwnerDomain : String;
  1330. begin
  1331. Result:='google.com';
  1332. end;
  1333. Class Function TReplicapoolupdaterAPI.APIOwnerName : String;
  1334. begin
  1335. Result:='Google';
  1336. end;
  1337. Class Function TReplicapoolupdaterAPI.APIIcon16 : String;
  1338. begin
  1339. Result:='http://www.google.com/images/icons/product/search-16.gif';
  1340. end;
  1341. Class Function TReplicapoolupdaterAPI.APIIcon32 : String;
  1342. begin
  1343. Result:='http://www.google.com/images/icons/product/search-32.gif';
  1344. end;
  1345. Class Function TReplicapoolupdaterAPI.APIdocumentationLink : String;
  1346. begin
  1347. Result:='https://cloud.google.com/compute/docs/instance-groups/manager/#applying_rolling_updates_using_the_updater_service';
  1348. end;
  1349. Class Function TReplicapoolupdaterAPI.APIrootUrl : string;
  1350. begin
  1351. Result:='https://www.googleapis.com/';
  1352. end;
  1353. Class Function TReplicapoolupdaterAPI.APIbasePath : string;
  1354. begin
  1355. Result:='/replicapoolupdater/v1beta1/projects/';
  1356. end;
  1357. Class Function TReplicapoolupdaterAPI.APIbaseURL : String;
  1358. begin
  1359. Result:='https://www.googleapis.com/replicapoolupdater/v1beta1/projects/';
  1360. end;
  1361. Class Function TReplicapoolupdaterAPI.APIProtocol : string;
  1362. begin
  1363. Result:='rest';
  1364. end;
  1365. Class Function TReplicapoolupdaterAPI.APIservicePath : string;
  1366. begin
  1367. Result:='replicapoolupdater/v1beta1/projects/';
  1368. end;
  1369. Class Function TReplicapoolupdaterAPI.APIbatchPath : String;
  1370. begin
  1371. Result:='batch';
  1372. end;
  1373. Class Function TReplicapoolupdaterAPI.APIAuthScopes : TScopeInfoArray;
  1374. begin
  1375. SetLength(Result,4);
  1376. Result[0].Name:='https://www.googleapis.com/auth/cloud-platform';
  1377. Result[0].Description:='View and manage your data across Google Cloud Platform services';
  1378. Result[1].Name:='https://www.googleapis.com/auth/cloud-platform.read-only';
  1379. Result[1].Description:='View your data across Google Cloud Platform services';
  1380. Result[2].Name:='https://www.googleapis.com/auth/replicapool';
  1381. Result[2].Description:='View and manage replica pools';
  1382. Result[3].Name:='https://www.googleapis.com/auth/replicapool.readonly';
  1383. Result[3].Description:='View replica pools';
  1384. end;
  1385. Class Function TReplicapoolupdaterAPI.APINeedsAuth : Boolean;
  1386. begin
  1387. Result:=True;
  1388. end;
  1389. Class Procedure TReplicapoolupdaterAPI.RegisterAPIResources;
  1390. begin
  1391. TInstanceUpdateTypeerrorTypeerrorsItem.RegisterObject;
  1392. TInstanceUpdateTypeerror.RegisterObject;
  1393. TInstanceUpdate.RegisterObject;
  1394. TInstanceUpdateList.RegisterObject;
  1395. TOperationTypeerrorTypeerrorsItem.RegisterObject;
  1396. TOperationTypeerror.RegisterObject;
  1397. TOperationTypewarningsItemTypedataItem.RegisterObject;
  1398. TOperationTypewarningsItem.RegisterObject;
  1399. TOperation.RegisterObject;
  1400. TOperationList.RegisterObject;
  1401. TRollingUpdateTypeerrorTypeerrorsItem.RegisterObject;
  1402. TRollingUpdateTypeerror.RegisterObject;
  1403. TRollingUpdateTypepolicy.RegisterObject;
  1404. TRollingUpdate.RegisterObject;
  1405. TRollingUpdateList.RegisterObject;
  1406. end;
  1407. Function TReplicapoolupdaterAPI.GetRollingUpdatesInstance : TRollingUpdatesResource;
  1408. begin
  1409. if (FRollingUpdatesInstance=Nil) then
  1410. FRollingUpdatesInstance:=CreateRollingUpdatesResource;
  1411. Result:=FRollingUpdatesInstance;
  1412. end;
  1413. Function TReplicapoolupdaterAPI.CreateRollingUpdatesResource : TRollingUpdatesResource;
  1414. begin
  1415. Result:=CreateRollingUpdatesResource(Self);
  1416. end;
  1417. Function TReplicapoolupdaterAPI.CreateRollingUpdatesResource(AOwner : TComponent) : TRollingUpdatesResource;
  1418. begin
  1419. Result:=TRollingUpdatesResource.Create(AOwner);
  1420. Result.API:=Self.API;
  1421. end;
  1422. Function TReplicapoolupdaterAPI.GetZoneOperationsInstance : TZoneOperationsResource;
  1423. begin
  1424. if (FZoneOperationsInstance=Nil) then
  1425. FZoneOperationsInstance:=CreateZoneOperationsResource;
  1426. Result:=FZoneOperationsInstance;
  1427. end;
  1428. Function TReplicapoolupdaterAPI.CreateZoneOperationsResource : TZoneOperationsResource;
  1429. begin
  1430. Result:=CreateZoneOperationsResource(Self);
  1431. end;
  1432. Function TReplicapoolupdaterAPI.CreateZoneOperationsResource(AOwner : TComponent) : TZoneOperationsResource;
  1433. begin
  1434. Result:=TZoneOperationsResource.Create(AOwner);
  1435. Result.API:=Self.API;
  1436. end;
  1437. initialization
  1438. TReplicapoolupdaterAPI.RegisterAPI;
  1439. end.