googlecomputeaccounts.pp 71 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602
  1. unit googlecomputeaccounts;
  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:00
  14. {$MODE objfpc}
  15. {$H+}
  16. interface
  17. uses sysutils, classes, googleservice, restbase, googlebase;
  18. type
  19. //Top-level schema types
  20. TAuthorizedKeysView = Class;
  21. TGroup = Class;
  22. TGroupList = Class;
  23. TGroupsAddMemberRequest = Class;
  24. TGroupsRemoveMemberRequest = Class;
  25. TLinuxAccountViews = Class;
  26. TLinuxGetAuthorizedKeysViewResponse = Class;
  27. TLinuxGetLinuxAccountViewsResponse = Class;
  28. TLinuxGroupView = Class;
  29. TLinuxUserView = Class;
  30. TOperation = Class;
  31. TOperationList = Class;
  32. TPublicKey = Class;
  33. TUser = Class;
  34. TUserList = Class;
  35. TAuthorizedKeysViewArray = Array of TAuthorizedKeysView;
  36. TGroupArray = Array of TGroup;
  37. TGroupListArray = Array of TGroupList;
  38. TGroupsAddMemberRequestArray = Array of TGroupsAddMemberRequest;
  39. TGroupsRemoveMemberRequestArray = Array of TGroupsRemoveMemberRequest;
  40. TLinuxAccountViewsArray = Array of TLinuxAccountViews;
  41. TLinuxGetAuthorizedKeysViewResponseArray = Array of TLinuxGetAuthorizedKeysViewResponse;
  42. TLinuxGetLinuxAccountViewsResponseArray = Array of TLinuxGetLinuxAccountViewsResponse;
  43. TLinuxGroupViewArray = Array of TLinuxGroupView;
  44. TLinuxUserViewArray = Array of TLinuxUserView;
  45. TOperationArray = Array of TOperation;
  46. TOperationListArray = Array of TOperationList;
  47. TPublicKeyArray = Array of TPublicKey;
  48. TUserArray = Array of TUser;
  49. TUserListArray = Array of TUserList;
  50. //Anonymous types, using auto-generated names
  51. TOperationTypeerrorTypeerrorsItem = Class;
  52. TOperationTypeerror = Class;
  53. TOperationTypewarningsItemTypedataItem = Class;
  54. TOperationTypewarningsItem = Class;
  55. TGroupListTypeitemsArray = Array of TGroup;
  56. TLinuxAccountViewsTypegroupViewsArray = Array of TLinuxGroupView;
  57. TLinuxAccountViewsTypeuserViewsArray = Array of TLinuxUserView;
  58. TOperationTypeerrorTypeerrorsArray = Array of TOperationTypeerrorTypeerrorsItem;
  59. TOperationTypewarningsItemTypedataArray = Array of TOperationTypewarningsItemTypedataItem;
  60. TOperationTypewarningsArray = Array of TOperationTypewarningsItem;
  61. TOperationListTypeitemsArray = Array of TOperation;
  62. TUserTypepublicKeysArray = Array of TPublicKey;
  63. TUserListTypeitemsArray = Array of TUser;
  64. { --------------------------------------------------------------------
  65. TAuthorizedKeysView
  66. --------------------------------------------------------------------}
  67. TAuthorizedKeysView = Class(TGoogleBaseObject)
  68. Private
  69. Fkeys : TStringArray;
  70. Protected
  71. //Property setters
  72. Procedure Setkeys(AIndex : Integer; AValue : TStringArray); virtual;
  73. //2.6.4. bug workaround
  74. {$IFDEF VER2_6}
  75. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  76. {$ENDIF VER2_6}
  77. Public
  78. Published
  79. Property keys : TStringArray Index 0 Read Fkeys Write Setkeys;
  80. end;
  81. TAuthorizedKeysViewClass = Class of TAuthorizedKeysView;
  82. { --------------------------------------------------------------------
  83. TGroup
  84. --------------------------------------------------------------------}
  85. TGroup = Class(TGoogleBaseObject)
  86. Private
  87. FcreationTimestamp : String;
  88. Fdescription : String;
  89. Fid : String;
  90. Fkind : String;
  91. Fmembers : TStringArray;
  92. Fname : String;
  93. FselfLink : String;
  94. Protected
  95. //Property setters
  96. Procedure SetcreationTimestamp(AIndex : Integer; const AValue : String); virtual;
  97. Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
  98. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  99. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  100. Procedure Setmembers(AIndex : Integer; AValue : TStringArray); virtual;
  101. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  102. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  103. //2.6.4. bug workaround
  104. {$IFDEF VER2_6}
  105. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  106. {$ENDIF VER2_6}
  107. Public
  108. Published
  109. Property creationTimestamp : String Index 0 Read FcreationTimestamp Write SetcreationTimestamp;
  110. Property description : String Index 8 Read Fdescription Write Setdescription;
  111. Property id : String Index 16 Read Fid Write Setid;
  112. Property kind : String Index 24 Read Fkind Write Setkind;
  113. Property members : TStringArray Index 32 Read Fmembers Write Setmembers;
  114. Property name : String Index 40 Read Fname Write Setname;
  115. Property selfLink : String Index 48 Read FselfLink Write SetselfLink;
  116. end;
  117. TGroupClass = Class of TGroup;
  118. { --------------------------------------------------------------------
  119. TGroupList
  120. --------------------------------------------------------------------}
  121. TGroupList = Class(TGoogleBaseObject)
  122. Private
  123. Fid : String;
  124. Fitems : TGroupListTypeitemsArray;
  125. Fkind : String;
  126. FnextPageToken : String;
  127. FselfLink : String;
  128. Protected
  129. //Property setters
  130. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  131. Procedure Setitems(AIndex : Integer; AValue : TGroupListTypeitemsArray); virtual;
  132. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  133. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  134. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  135. //2.6.4. bug workaround
  136. {$IFDEF VER2_6}
  137. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  138. {$ENDIF VER2_6}
  139. Public
  140. Published
  141. Property id : String Index 0 Read Fid Write Setid;
  142. Property items : TGroupListTypeitemsArray Index 8 Read Fitems Write Setitems;
  143. Property kind : String Index 16 Read Fkind Write Setkind;
  144. Property nextPageToken : String Index 24 Read FnextPageToken Write SetnextPageToken;
  145. Property selfLink : String Index 32 Read FselfLink Write SetselfLink;
  146. end;
  147. TGroupListClass = Class of TGroupList;
  148. { --------------------------------------------------------------------
  149. TGroupsAddMemberRequest
  150. --------------------------------------------------------------------}
  151. TGroupsAddMemberRequest = Class(TGoogleBaseObject)
  152. Private
  153. Fusers : TStringArray;
  154. Protected
  155. //Property setters
  156. Procedure Setusers(AIndex : Integer; AValue : TStringArray); virtual;
  157. //2.6.4. bug workaround
  158. {$IFDEF VER2_6}
  159. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  160. {$ENDIF VER2_6}
  161. Public
  162. Published
  163. Property users : TStringArray Index 0 Read Fusers Write Setusers;
  164. end;
  165. TGroupsAddMemberRequestClass = Class of TGroupsAddMemberRequest;
  166. { --------------------------------------------------------------------
  167. TGroupsRemoveMemberRequest
  168. --------------------------------------------------------------------}
  169. TGroupsRemoveMemberRequest = Class(TGoogleBaseObject)
  170. Private
  171. Fusers : TStringArray;
  172. Protected
  173. //Property setters
  174. Procedure Setusers(AIndex : Integer; AValue : TStringArray); virtual;
  175. //2.6.4. bug workaround
  176. {$IFDEF VER2_6}
  177. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  178. {$ENDIF VER2_6}
  179. Public
  180. Published
  181. Property users : TStringArray Index 0 Read Fusers Write Setusers;
  182. end;
  183. TGroupsRemoveMemberRequestClass = Class of TGroupsRemoveMemberRequest;
  184. { --------------------------------------------------------------------
  185. TLinuxAccountViews
  186. --------------------------------------------------------------------}
  187. TLinuxAccountViews = Class(TGoogleBaseObject)
  188. Private
  189. FgroupViews : TLinuxAccountViewsTypegroupViewsArray;
  190. Fkind : String;
  191. FuserViews : TLinuxAccountViewsTypeuserViewsArray;
  192. Protected
  193. //Property setters
  194. Procedure SetgroupViews(AIndex : Integer; AValue : TLinuxAccountViewsTypegroupViewsArray); virtual;
  195. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  196. Procedure SetuserViews(AIndex : Integer; AValue : TLinuxAccountViewsTypeuserViewsArray); virtual;
  197. //2.6.4. bug workaround
  198. {$IFDEF VER2_6}
  199. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  200. {$ENDIF VER2_6}
  201. Public
  202. Published
  203. Property groupViews : TLinuxAccountViewsTypegroupViewsArray Index 0 Read FgroupViews Write SetgroupViews;
  204. Property kind : String Index 8 Read Fkind Write Setkind;
  205. Property userViews : TLinuxAccountViewsTypeuserViewsArray Index 16 Read FuserViews Write SetuserViews;
  206. end;
  207. TLinuxAccountViewsClass = Class of TLinuxAccountViews;
  208. { --------------------------------------------------------------------
  209. TLinuxGetAuthorizedKeysViewResponse
  210. --------------------------------------------------------------------}
  211. TLinuxGetAuthorizedKeysViewResponse = Class(TGoogleBaseObject)
  212. Private
  213. Fresource : TAuthorizedKeysView;
  214. Protected
  215. //Property setters
  216. Procedure Setresource(AIndex : Integer; AValue : TAuthorizedKeysView); virtual;
  217. Public
  218. Published
  219. Property resource : TAuthorizedKeysView Index 0 Read Fresource Write Setresource;
  220. end;
  221. TLinuxGetAuthorizedKeysViewResponseClass = Class of TLinuxGetAuthorizedKeysViewResponse;
  222. { --------------------------------------------------------------------
  223. TLinuxGetLinuxAccountViewsResponse
  224. --------------------------------------------------------------------}
  225. TLinuxGetLinuxAccountViewsResponse = Class(TGoogleBaseObject)
  226. Private
  227. Fresource : TLinuxAccountViews;
  228. Protected
  229. //Property setters
  230. Procedure Setresource(AIndex : Integer; AValue : TLinuxAccountViews); virtual;
  231. Public
  232. Published
  233. Property resource : TLinuxAccountViews Index 0 Read Fresource Write Setresource;
  234. end;
  235. TLinuxGetLinuxAccountViewsResponseClass = Class of TLinuxGetLinuxAccountViewsResponse;
  236. { --------------------------------------------------------------------
  237. TLinuxGroupView
  238. --------------------------------------------------------------------}
  239. TLinuxGroupView = Class(TGoogleBaseObject)
  240. Private
  241. Fgid : integer;
  242. FgroupName : String;
  243. Fmembers : TStringArray;
  244. Protected
  245. //Property setters
  246. Procedure Setgid(AIndex : Integer; AValue : integer); virtual;
  247. Procedure SetgroupName(AIndex : Integer; const AValue : String); virtual;
  248. Procedure Setmembers(AIndex : Integer; AValue : TStringArray); virtual;
  249. //2.6.4. bug workaround
  250. {$IFDEF VER2_6}
  251. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  252. {$ENDIF VER2_6}
  253. Public
  254. Published
  255. Property gid : integer Index 0 Read Fgid Write Setgid;
  256. Property groupName : String Index 8 Read FgroupName Write SetgroupName;
  257. Property members : TStringArray Index 16 Read Fmembers Write Setmembers;
  258. end;
  259. TLinuxGroupViewClass = Class of TLinuxGroupView;
  260. { --------------------------------------------------------------------
  261. TLinuxUserView
  262. --------------------------------------------------------------------}
  263. TLinuxUserView = Class(TGoogleBaseObject)
  264. Private
  265. Fgecos : String;
  266. Fgid : integer;
  267. FhomeDirectory : String;
  268. Fshell : String;
  269. Fuid : integer;
  270. Fusername : String;
  271. Protected
  272. //Property setters
  273. Procedure Setgecos(AIndex : Integer; const AValue : String); virtual;
  274. Procedure Setgid(AIndex : Integer; AValue : integer); virtual;
  275. Procedure SethomeDirectory(AIndex : Integer; const AValue : String); virtual;
  276. Procedure Setshell(AIndex : Integer; const AValue : String); virtual;
  277. Procedure Setuid(AIndex : Integer; AValue : integer); virtual;
  278. Procedure Setusername(AIndex : Integer; const AValue : String); virtual;
  279. Public
  280. Published
  281. Property gecos : String Index 0 Read Fgecos Write Setgecos;
  282. Property gid : integer Index 8 Read Fgid Write Setgid;
  283. Property homeDirectory : String Index 16 Read FhomeDirectory Write SethomeDirectory;
  284. Property shell : String Index 24 Read Fshell Write Setshell;
  285. Property uid : integer Index 32 Read Fuid Write Setuid;
  286. Property username : String Index 40 Read Fusername Write Setusername;
  287. end;
  288. TLinuxUserViewClass = Class of TLinuxUserView;
  289. { --------------------------------------------------------------------
  290. TOperationTypeerrorTypeerrorsItem
  291. --------------------------------------------------------------------}
  292. TOperationTypeerrorTypeerrorsItem = Class(TGoogleBaseObject)
  293. Private
  294. Fcode : String;
  295. Flocation : String;
  296. Fmessage : String;
  297. Protected
  298. //Property setters
  299. Procedure Setcode(AIndex : Integer; const AValue : String); virtual;
  300. Procedure Setlocation(AIndex : Integer; const AValue : String); virtual;
  301. Procedure Setmessage(AIndex : Integer; const AValue : String); virtual;
  302. Public
  303. Published
  304. Property code : String Index 0 Read Fcode Write Setcode;
  305. Property location : String Index 8 Read Flocation Write Setlocation;
  306. Property message : String Index 16 Read Fmessage Write Setmessage;
  307. end;
  308. TOperationTypeerrorTypeerrorsItemClass = Class of TOperationTypeerrorTypeerrorsItem;
  309. { --------------------------------------------------------------------
  310. TOperationTypeerror
  311. --------------------------------------------------------------------}
  312. TOperationTypeerror = Class(TGoogleBaseObject)
  313. Private
  314. Ferrors : TOperationTypeerrorTypeerrorsArray;
  315. Protected
  316. //Property setters
  317. Procedure Seterrors(AIndex : Integer; AValue : TOperationTypeerrorTypeerrorsArray); virtual;
  318. //2.6.4. bug workaround
  319. {$IFDEF VER2_6}
  320. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  321. {$ENDIF VER2_6}
  322. Public
  323. Published
  324. Property errors : TOperationTypeerrorTypeerrorsArray Index 0 Read Ferrors Write Seterrors;
  325. end;
  326. TOperationTypeerrorClass = Class of TOperationTypeerror;
  327. { --------------------------------------------------------------------
  328. TOperationTypewarningsItemTypedataItem
  329. --------------------------------------------------------------------}
  330. TOperationTypewarningsItemTypedataItem = Class(TGoogleBaseObject)
  331. Private
  332. Fkey : String;
  333. Fvalue : String;
  334. Protected
  335. //Property setters
  336. Procedure Setkey(AIndex : Integer; const AValue : String); virtual;
  337. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  338. Public
  339. Published
  340. Property key : String Index 0 Read Fkey Write Setkey;
  341. Property value : String Index 8 Read Fvalue Write Setvalue;
  342. end;
  343. TOperationTypewarningsItemTypedataItemClass = Class of TOperationTypewarningsItemTypedataItem;
  344. { --------------------------------------------------------------------
  345. TOperationTypewarningsItem
  346. --------------------------------------------------------------------}
  347. TOperationTypewarningsItem = Class(TGoogleBaseObject)
  348. Private
  349. Fcode : String;
  350. Fdata : TOperationTypewarningsItemTypedataArray;
  351. Fmessage : String;
  352. Protected
  353. //Property setters
  354. Procedure Setcode(AIndex : Integer; const AValue : String); virtual;
  355. Procedure Setdata(AIndex : Integer; AValue : TOperationTypewarningsItemTypedataArray); virtual;
  356. Procedure Setmessage(AIndex : Integer; const AValue : String); virtual;
  357. //2.6.4. bug workaround
  358. {$IFDEF VER2_6}
  359. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  360. {$ENDIF VER2_6}
  361. Public
  362. Published
  363. Property code : String Index 0 Read Fcode Write Setcode;
  364. Property data : TOperationTypewarningsItemTypedataArray Index 8 Read Fdata Write Setdata;
  365. Property message : String Index 16 Read Fmessage Write Setmessage;
  366. end;
  367. TOperationTypewarningsItemClass = Class of TOperationTypewarningsItem;
  368. { --------------------------------------------------------------------
  369. TOperation
  370. --------------------------------------------------------------------}
  371. TOperation = Class(TGoogleBaseObject)
  372. Private
  373. FclientOperationId : String;
  374. FcreationTimestamp : String;
  375. FendTime : String;
  376. Ferror : TOperationTypeerror;
  377. FhttpErrorMessage : String;
  378. FhttpErrorStatusCode : integer;
  379. Fid : String;
  380. FinsertTime : String;
  381. Fkind : String;
  382. Fname : String;
  383. FoperationType : String;
  384. Fprogress : integer;
  385. Fregion : String;
  386. FselfLink : String;
  387. FstartTime : String;
  388. Fstatus : String;
  389. FstatusMessage : String;
  390. FtargetId : String;
  391. FtargetLink : String;
  392. Fuser : String;
  393. Fwarnings : TOperationTypewarningsArray;
  394. Fzone : String;
  395. Protected
  396. //Property setters
  397. Procedure SetclientOperationId(AIndex : Integer; const AValue : String); virtual;
  398. Procedure SetcreationTimestamp(AIndex : Integer; const AValue : String); virtual;
  399. Procedure SetendTime(AIndex : Integer; const AValue : String); virtual;
  400. Procedure Seterror(AIndex : Integer; AValue : TOperationTypeerror); virtual;
  401. Procedure SethttpErrorMessage(AIndex : Integer; const AValue : String); virtual;
  402. Procedure SethttpErrorStatusCode(AIndex : Integer; AValue : integer); virtual;
  403. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  404. Procedure SetinsertTime(AIndex : Integer; const AValue : String); virtual;
  405. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  406. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  407. Procedure SetoperationType(AIndex : Integer; const AValue : String); virtual;
  408. Procedure Setprogress(AIndex : Integer; AValue : integer); virtual;
  409. Procedure Setregion(AIndex : Integer; const AValue : String); virtual;
  410. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  411. Procedure SetstartTime(AIndex : Integer; const AValue : String); virtual;
  412. Procedure Setstatus(AIndex : Integer; const AValue : String); virtual;
  413. Procedure SetstatusMessage(AIndex : Integer; const AValue : String); virtual;
  414. Procedure SettargetId(AIndex : Integer; const AValue : String); virtual;
  415. Procedure SettargetLink(AIndex : Integer; const AValue : String); virtual;
  416. Procedure Setuser(AIndex : Integer; const AValue : String); virtual;
  417. Procedure Setwarnings(AIndex : Integer; AValue : TOperationTypewarningsArray); virtual;
  418. Procedure Setzone(AIndex : Integer; const AValue : String); virtual;
  419. //2.6.4. bug workaround
  420. {$IFDEF VER2_6}
  421. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  422. {$ENDIF VER2_6}
  423. Public
  424. Published
  425. Property clientOperationId : String Index 0 Read FclientOperationId Write SetclientOperationId;
  426. Property creationTimestamp : String Index 8 Read FcreationTimestamp Write SetcreationTimestamp;
  427. Property endTime : String Index 16 Read FendTime Write SetendTime;
  428. Property error : TOperationTypeerror Index 24 Read Ferror Write Seterror;
  429. Property httpErrorMessage : String Index 32 Read FhttpErrorMessage Write SethttpErrorMessage;
  430. Property httpErrorStatusCode : integer Index 40 Read FhttpErrorStatusCode Write SethttpErrorStatusCode;
  431. Property id : String Index 48 Read Fid Write Setid;
  432. Property insertTime : String Index 56 Read FinsertTime Write SetinsertTime;
  433. Property kind : String Index 64 Read Fkind Write Setkind;
  434. Property name : String Index 72 Read Fname Write Setname;
  435. Property operationType : String Index 80 Read FoperationType Write SetoperationType;
  436. Property progress : integer Index 88 Read Fprogress Write Setprogress;
  437. Property region : String Index 96 Read Fregion Write Setregion;
  438. Property selfLink : String Index 104 Read FselfLink Write SetselfLink;
  439. Property startTime : String Index 112 Read FstartTime Write SetstartTime;
  440. Property status : String Index 120 Read Fstatus Write Setstatus;
  441. Property statusMessage : String Index 128 Read FstatusMessage Write SetstatusMessage;
  442. Property targetId : String Index 136 Read FtargetId Write SettargetId;
  443. Property targetLink : String Index 144 Read FtargetLink Write SettargetLink;
  444. Property user : String Index 152 Read Fuser Write Setuser;
  445. Property warnings : TOperationTypewarningsArray Index 160 Read Fwarnings Write Setwarnings;
  446. Property zone : String Index 168 Read Fzone Write Setzone;
  447. end;
  448. TOperationClass = Class of TOperation;
  449. { --------------------------------------------------------------------
  450. TOperationList
  451. --------------------------------------------------------------------}
  452. TOperationList = Class(TGoogleBaseObject)
  453. Private
  454. Fid : String;
  455. Fitems : TOperationListTypeitemsArray;
  456. Fkind : String;
  457. FnextPageToken : String;
  458. FselfLink : String;
  459. Protected
  460. //Property setters
  461. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  462. Procedure Setitems(AIndex : Integer; AValue : TOperationListTypeitemsArray); virtual;
  463. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  464. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  465. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  466. //2.6.4. bug workaround
  467. {$IFDEF VER2_6}
  468. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  469. {$ENDIF VER2_6}
  470. Public
  471. Published
  472. Property id : String Index 0 Read Fid Write Setid;
  473. Property items : TOperationListTypeitemsArray Index 8 Read Fitems Write Setitems;
  474. Property kind : String Index 16 Read Fkind Write Setkind;
  475. Property nextPageToken : String Index 24 Read FnextPageToken Write SetnextPageToken;
  476. Property selfLink : String Index 32 Read FselfLink Write SetselfLink;
  477. end;
  478. TOperationListClass = Class of TOperationList;
  479. { --------------------------------------------------------------------
  480. TPublicKey
  481. --------------------------------------------------------------------}
  482. TPublicKey = Class(TGoogleBaseObject)
  483. Private
  484. FcreationTimestamp : String;
  485. Fdescription : String;
  486. FexpirationTimestamp : String;
  487. Ffingerprint : String;
  488. Fkey : String;
  489. Protected
  490. //Property setters
  491. Procedure SetcreationTimestamp(AIndex : Integer; const AValue : String); virtual;
  492. Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
  493. Procedure SetexpirationTimestamp(AIndex : Integer; const AValue : String); virtual;
  494. Procedure Setfingerprint(AIndex : Integer; const AValue : String); virtual;
  495. Procedure Setkey(AIndex : Integer; const AValue : String); virtual;
  496. Public
  497. Published
  498. Property creationTimestamp : String Index 0 Read FcreationTimestamp Write SetcreationTimestamp;
  499. Property description : String Index 8 Read Fdescription Write Setdescription;
  500. Property expirationTimestamp : String Index 16 Read FexpirationTimestamp Write SetexpirationTimestamp;
  501. Property fingerprint : String Index 24 Read Ffingerprint Write Setfingerprint;
  502. Property key : String Index 32 Read Fkey Write Setkey;
  503. end;
  504. TPublicKeyClass = Class of TPublicKey;
  505. { --------------------------------------------------------------------
  506. TUser
  507. --------------------------------------------------------------------}
  508. TUser = Class(TGoogleBaseObject)
  509. Private
  510. FcreationTimestamp : String;
  511. Fdescription : String;
  512. Fgroups : TStringArray;
  513. Fid : String;
  514. Fkind : String;
  515. Fname : String;
  516. Fowner : String;
  517. FpublicKeys : TUserTypepublicKeysArray;
  518. FselfLink : String;
  519. Protected
  520. //Property setters
  521. Procedure SetcreationTimestamp(AIndex : Integer; const AValue : String); virtual;
  522. Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
  523. Procedure Setgroups(AIndex : Integer; AValue : TStringArray); virtual;
  524. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  525. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  526. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  527. Procedure Setowner(AIndex : Integer; const AValue : String); virtual;
  528. Procedure SetpublicKeys(AIndex : Integer; AValue : TUserTypepublicKeysArray); virtual;
  529. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  530. //2.6.4. bug workaround
  531. {$IFDEF VER2_6}
  532. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  533. {$ENDIF VER2_6}
  534. Public
  535. Published
  536. Property creationTimestamp : String Index 0 Read FcreationTimestamp Write SetcreationTimestamp;
  537. Property description : String Index 8 Read Fdescription Write Setdescription;
  538. Property groups : TStringArray Index 16 Read Fgroups Write Setgroups;
  539. Property id : String Index 24 Read Fid Write Setid;
  540. Property kind : String Index 32 Read Fkind Write Setkind;
  541. Property name : String Index 40 Read Fname Write Setname;
  542. Property owner : String Index 48 Read Fowner Write Setowner;
  543. Property publicKeys : TUserTypepublicKeysArray Index 56 Read FpublicKeys Write SetpublicKeys;
  544. Property selfLink : String Index 64 Read FselfLink Write SetselfLink;
  545. end;
  546. TUserClass = Class of TUser;
  547. { --------------------------------------------------------------------
  548. TUserList
  549. --------------------------------------------------------------------}
  550. TUserList = Class(TGoogleBaseObject)
  551. Private
  552. Fid : String;
  553. Fitems : TUserListTypeitemsArray;
  554. Fkind : String;
  555. FnextPageToken : String;
  556. FselfLink : String;
  557. Protected
  558. //Property setters
  559. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  560. Procedure Setitems(AIndex : Integer; AValue : TUserListTypeitemsArray); virtual;
  561. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  562. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  563. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  564. //2.6.4. bug workaround
  565. {$IFDEF VER2_6}
  566. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  567. {$ENDIF VER2_6}
  568. Public
  569. Published
  570. Property id : String Index 0 Read Fid Write Setid;
  571. Property items : TUserListTypeitemsArray Index 8 Read Fitems Write Setitems;
  572. Property kind : String Index 16 Read Fkind Write Setkind;
  573. Property nextPageToken : String Index 24 Read FnextPageToken Write SetnextPageToken;
  574. Property selfLink : String Index 32 Read FselfLink Write SetselfLink;
  575. end;
  576. TUserListClass = Class of TUserList;
  577. { --------------------------------------------------------------------
  578. TGlobalAccountsOperationsResource
  579. --------------------------------------------------------------------}
  580. //Optional query Options for TGlobalAccountsOperationsResource, method List
  581. TGlobalAccountsOperationsListOptions = Record
  582. filter : String;
  583. maxResults : integer;
  584. pageToken : String;
  585. end;
  586. TGlobalAccountsOperationsResource = Class(TGoogleResource)
  587. Public
  588. Class Function ResourceName : String; override;
  589. Class Function DefaultAPI : TGoogleAPIClass; override;
  590. Procedure Delete(operation: string; project: string);
  591. Function Get(operation: string; project: string) : TOperation;
  592. Function List(project: string; AQuery : string = '') : TOperationList;
  593. Function List(project: string; AQuery : TGlobalAccountsOperationslistOptions) : TOperationList;
  594. end;
  595. { --------------------------------------------------------------------
  596. TGroupsResource
  597. --------------------------------------------------------------------}
  598. //Optional query Options for TGroupsResource, method List
  599. TGroupsListOptions = Record
  600. filter : String;
  601. maxResults : integer;
  602. pageToken : String;
  603. end;
  604. TGroupsResource = Class(TGoogleResource)
  605. Public
  606. Class Function ResourceName : String; override;
  607. Class Function DefaultAPI : TGoogleAPIClass; override;
  608. Function AddMember(groupName: string; project: string; aGroupsAddMemberRequest : TGroupsAddMemberRequest) : TOperation;
  609. Function Delete(groupName: string; project: string) : TOperation;
  610. Function Get(groupName: string; project: string) : TGroup;
  611. Function Insert(project: string; aGroup : TGroup) : TOperation;
  612. Function List(project: string; AQuery : string = '') : TGroupList;
  613. Function List(project: string; AQuery : TGroupslistOptions) : TGroupList;
  614. Function RemoveMember(groupName: string; project: string; aGroupsRemoveMemberRequest : TGroupsRemoveMemberRequest) : TOperation;
  615. end;
  616. { --------------------------------------------------------------------
  617. TLinuxResource
  618. --------------------------------------------------------------------}
  619. //Optional query Options for TLinuxResource, method GetAuthorizedKeysView
  620. TLinuxGetAuthorizedKeysViewOptions = Record
  621. instance : String;
  622. end;
  623. //Optional query Options for TLinuxResource, method GetLinuxAccountViews
  624. TLinuxGetLinuxAccountViewsOptions = Record
  625. filter : String;
  626. instance : String;
  627. maxResults : integer;
  628. pageToken : String;
  629. user : String;
  630. end;
  631. TLinuxResource = Class(TGoogleResource)
  632. Public
  633. Class Function ResourceName : String; override;
  634. Class Function DefaultAPI : TGoogleAPIClass; override;
  635. Function GetAuthorizedKeysView(project: string; user: string; zone: string; AQuery : string = '') : TLinuxGetAuthorizedKeysViewResponse;
  636. Function GetAuthorizedKeysView(project: string; user: string; zone: string; AQuery : TLinuxgetAuthorizedKeysViewOptions) : TLinuxGetAuthorizedKeysViewResponse;
  637. Function GetLinuxAccountViews(project: string; zone: string; AQuery : string = '') : TLinuxGetLinuxAccountViewsResponse;
  638. Function GetLinuxAccountViews(project: string; zone: string; AQuery : TLinuxgetLinuxAccountViewsOptions) : TLinuxGetLinuxAccountViewsResponse;
  639. end;
  640. { --------------------------------------------------------------------
  641. TUsersResource
  642. --------------------------------------------------------------------}
  643. //Optional query Options for TUsersResource, method List
  644. TUsersListOptions = Record
  645. filter : String;
  646. maxResults : integer;
  647. pageToken : String;
  648. end;
  649. //Optional query Options for TUsersResource, method RemovePublicKey
  650. TUsersRemovePublicKeyOptions = Record
  651. fingerprint : String;
  652. end;
  653. TUsersResource = Class(TGoogleResource)
  654. Public
  655. Class Function ResourceName : String; override;
  656. Class Function DefaultAPI : TGoogleAPIClass; override;
  657. Function AddPublicKey(project: string; user: string; aPublicKey : TPublicKey) : TOperation;
  658. Function Delete(project: string; user: string) : TOperation;
  659. Function Get(project: string; user: string) : TUser;
  660. Function Insert(project: string; aUser : TUser) : TOperation;
  661. Function List(project: string; AQuery : string = '') : TUserList;
  662. Function List(project: string; AQuery : TUserslistOptions) : TUserList;
  663. Function RemovePublicKey(project: string; user: string; AQuery : string = '') : TOperation;
  664. Function RemovePublicKey(project: string; user: string; AQuery : TUsersremovePublicKeyOptions) : TOperation;
  665. end;
  666. { --------------------------------------------------------------------
  667. TComputeaccountsAPI
  668. --------------------------------------------------------------------}
  669. TComputeaccountsAPI = Class(TGoogleAPI)
  670. Private
  671. FGlobalAccountsOperationsInstance : TGlobalAccountsOperationsResource;
  672. FGroupsInstance : TGroupsResource;
  673. FLinuxInstance : TLinuxResource;
  674. FUsersInstance : TUsersResource;
  675. Function GetGlobalAccountsOperationsInstance : TGlobalAccountsOperationsResource;virtual;
  676. Function GetGroupsInstance : TGroupsResource;virtual;
  677. Function GetLinuxInstance : TLinuxResource;virtual;
  678. Function GetUsersInstance : TUsersResource;virtual;
  679. Public
  680. //Override class functions with API info
  681. Class Function APIName : String; override;
  682. Class Function APIVersion : String; override;
  683. Class Function APIRevision : String; override;
  684. Class Function APIID : String; override;
  685. Class Function APITitle : String; override;
  686. Class Function APIDescription : String; override;
  687. Class Function APIOwnerDomain : String; override;
  688. Class Function APIOwnerName : String; override;
  689. Class Function APIIcon16 : String; override;
  690. Class Function APIIcon32 : String; override;
  691. Class Function APIdocumentationLink : String; override;
  692. Class Function APIrootUrl : string; override;
  693. Class Function APIbasePath : string;override;
  694. Class Function APIbaseURL : String;override;
  695. Class Function APIProtocol : string;override;
  696. Class Function APIservicePath : string;override;
  697. Class Function APIbatchPath : String;override;
  698. Class Function APIAuthScopes : TScopeInfoArray;override;
  699. Class Function APINeedsAuth : Boolean;override;
  700. Class Procedure RegisterAPIResources; override;
  701. //Add create function for resources
  702. Function CreateGlobalAccountsOperationsResource(AOwner : TComponent) : TGlobalAccountsOperationsResource;virtual;overload;
  703. Function CreateGlobalAccountsOperationsResource : TGlobalAccountsOperationsResource;virtual;overload;
  704. Function CreateGroupsResource(AOwner : TComponent) : TGroupsResource;virtual;overload;
  705. Function CreateGroupsResource : TGroupsResource;virtual;overload;
  706. Function CreateLinuxResource(AOwner : TComponent) : TLinuxResource;virtual;overload;
  707. Function CreateLinuxResource : TLinuxResource;virtual;overload;
  708. Function CreateUsersResource(AOwner : TComponent) : TUsersResource;virtual;overload;
  709. Function CreateUsersResource : TUsersResource;virtual;overload;
  710. //Add default on-demand instances for resources
  711. Property GlobalAccountsOperationsResource : TGlobalAccountsOperationsResource Read GetGlobalAccountsOperationsInstance;
  712. Property GroupsResource : TGroupsResource Read GetGroupsInstance;
  713. Property LinuxResource : TLinuxResource Read GetLinuxInstance;
  714. Property UsersResource : TUsersResource Read GetUsersInstance;
  715. end;
  716. implementation
  717. { --------------------------------------------------------------------
  718. TAuthorizedKeysView
  719. --------------------------------------------------------------------}
  720. Procedure TAuthorizedKeysView.Setkeys(AIndex : Integer; AValue : TStringArray);
  721. begin
  722. If (Fkeys=AValue) then exit;
  723. Fkeys:=AValue;
  724. MarkPropertyChanged(AIndex);
  725. end;
  726. //2.6.4. bug workaround
  727. {$IFDEF VER2_6}
  728. Procedure TAuthorizedKeysView.SetArrayLength(Const AName : String; ALength : Longint);
  729. begin
  730. Case AName of
  731. 'keys' : SetLength(Fkeys,ALength);
  732. else
  733. Inherited SetArrayLength(AName,ALength);
  734. end;
  735. end;
  736. {$ENDIF VER2_6}
  737. { --------------------------------------------------------------------
  738. TGroup
  739. --------------------------------------------------------------------}
  740. Procedure TGroup.SetcreationTimestamp(AIndex : Integer; const AValue : String);
  741. begin
  742. If (FcreationTimestamp=AValue) then exit;
  743. FcreationTimestamp:=AValue;
  744. MarkPropertyChanged(AIndex);
  745. end;
  746. Procedure TGroup.Setdescription(AIndex : Integer; const AValue : String);
  747. begin
  748. If (Fdescription=AValue) then exit;
  749. Fdescription:=AValue;
  750. MarkPropertyChanged(AIndex);
  751. end;
  752. Procedure TGroup.Setid(AIndex : Integer; const AValue : String);
  753. begin
  754. If (Fid=AValue) then exit;
  755. Fid:=AValue;
  756. MarkPropertyChanged(AIndex);
  757. end;
  758. Procedure TGroup.Setkind(AIndex : Integer; const AValue : String);
  759. begin
  760. If (Fkind=AValue) then exit;
  761. Fkind:=AValue;
  762. MarkPropertyChanged(AIndex);
  763. end;
  764. Procedure TGroup.Setmembers(AIndex : Integer; AValue : TStringArray);
  765. begin
  766. If (Fmembers=AValue) then exit;
  767. Fmembers:=AValue;
  768. MarkPropertyChanged(AIndex);
  769. end;
  770. Procedure TGroup.Setname(AIndex : Integer; const AValue : String);
  771. begin
  772. If (Fname=AValue) then exit;
  773. Fname:=AValue;
  774. MarkPropertyChanged(AIndex);
  775. end;
  776. Procedure TGroup.SetselfLink(AIndex : Integer; const AValue : String);
  777. begin
  778. If (FselfLink=AValue) then exit;
  779. FselfLink:=AValue;
  780. MarkPropertyChanged(AIndex);
  781. end;
  782. //2.6.4. bug workaround
  783. {$IFDEF VER2_6}
  784. Procedure TGroup.SetArrayLength(Const AName : String; ALength : Longint);
  785. begin
  786. Case AName of
  787. 'members' : SetLength(Fmembers,ALength);
  788. else
  789. Inherited SetArrayLength(AName,ALength);
  790. end;
  791. end;
  792. {$ENDIF VER2_6}
  793. { --------------------------------------------------------------------
  794. TGroupList
  795. --------------------------------------------------------------------}
  796. Procedure TGroupList.Setid(AIndex : Integer; const AValue : String);
  797. begin
  798. If (Fid=AValue) then exit;
  799. Fid:=AValue;
  800. MarkPropertyChanged(AIndex);
  801. end;
  802. Procedure TGroupList.Setitems(AIndex : Integer; AValue : TGroupListTypeitemsArray);
  803. begin
  804. If (Fitems=AValue) then exit;
  805. Fitems:=AValue;
  806. MarkPropertyChanged(AIndex);
  807. end;
  808. Procedure TGroupList.Setkind(AIndex : Integer; const AValue : String);
  809. begin
  810. If (Fkind=AValue) then exit;
  811. Fkind:=AValue;
  812. MarkPropertyChanged(AIndex);
  813. end;
  814. Procedure TGroupList.SetnextPageToken(AIndex : Integer; const AValue : String);
  815. begin
  816. If (FnextPageToken=AValue) then exit;
  817. FnextPageToken:=AValue;
  818. MarkPropertyChanged(AIndex);
  819. end;
  820. Procedure TGroupList.SetselfLink(AIndex : Integer; const AValue : String);
  821. begin
  822. If (FselfLink=AValue) then exit;
  823. FselfLink:=AValue;
  824. MarkPropertyChanged(AIndex);
  825. end;
  826. //2.6.4. bug workaround
  827. {$IFDEF VER2_6}
  828. Procedure TGroupList.SetArrayLength(Const AName : String; ALength : Longint);
  829. begin
  830. Case AName of
  831. 'items' : SetLength(Fitems,ALength);
  832. else
  833. Inherited SetArrayLength(AName,ALength);
  834. end;
  835. end;
  836. {$ENDIF VER2_6}
  837. { --------------------------------------------------------------------
  838. TGroupsAddMemberRequest
  839. --------------------------------------------------------------------}
  840. Procedure TGroupsAddMemberRequest.Setusers(AIndex : Integer; AValue : TStringArray);
  841. begin
  842. If (Fusers=AValue) then exit;
  843. Fusers:=AValue;
  844. MarkPropertyChanged(AIndex);
  845. end;
  846. //2.6.4. bug workaround
  847. {$IFDEF VER2_6}
  848. Procedure TGroupsAddMemberRequest.SetArrayLength(Const AName : String; ALength : Longint);
  849. begin
  850. Case AName of
  851. 'users' : SetLength(Fusers,ALength);
  852. else
  853. Inherited SetArrayLength(AName,ALength);
  854. end;
  855. end;
  856. {$ENDIF VER2_6}
  857. { --------------------------------------------------------------------
  858. TGroupsRemoveMemberRequest
  859. --------------------------------------------------------------------}
  860. Procedure TGroupsRemoveMemberRequest.Setusers(AIndex : Integer; AValue : TStringArray);
  861. begin
  862. If (Fusers=AValue) then exit;
  863. Fusers:=AValue;
  864. MarkPropertyChanged(AIndex);
  865. end;
  866. //2.6.4. bug workaround
  867. {$IFDEF VER2_6}
  868. Procedure TGroupsRemoveMemberRequest.SetArrayLength(Const AName : String; ALength : Longint);
  869. begin
  870. Case AName of
  871. 'users' : SetLength(Fusers,ALength);
  872. else
  873. Inherited SetArrayLength(AName,ALength);
  874. end;
  875. end;
  876. {$ENDIF VER2_6}
  877. { --------------------------------------------------------------------
  878. TLinuxAccountViews
  879. --------------------------------------------------------------------}
  880. Procedure TLinuxAccountViews.SetgroupViews(AIndex : Integer; AValue : TLinuxAccountViewsTypegroupViewsArray);
  881. begin
  882. If (FgroupViews=AValue) then exit;
  883. FgroupViews:=AValue;
  884. MarkPropertyChanged(AIndex);
  885. end;
  886. Procedure TLinuxAccountViews.Setkind(AIndex : Integer; const AValue : String);
  887. begin
  888. If (Fkind=AValue) then exit;
  889. Fkind:=AValue;
  890. MarkPropertyChanged(AIndex);
  891. end;
  892. Procedure TLinuxAccountViews.SetuserViews(AIndex : Integer; AValue : TLinuxAccountViewsTypeuserViewsArray);
  893. begin
  894. If (FuserViews=AValue) then exit;
  895. FuserViews:=AValue;
  896. MarkPropertyChanged(AIndex);
  897. end;
  898. //2.6.4. bug workaround
  899. {$IFDEF VER2_6}
  900. Procedure TLinuxAccountViews.SetArrayLength(Const AName : String; ALength : Longint);
  901. begin
  902. Case AName of
  903. 'groupviews' : SetLength(FgroupViews,ALength);
  904. 'userviews' : SetLength(FuserViews,ALength);
  905. else
  906. Inherited SetArrayLength(AName,ALength);
  907. end;
  908. end;
  909. {$ENDIF VER2_6}
  910. { --------------------------------------------------------------------
  911. TLinuxGetAuthorizedKeysViewResponse
  912. --------------------------------------------------------------------}
  913. Procedure TLinuxGetAuthorizedKeysViewResponse.Setresource(AIndex : Integer; AValue : TAuthorizedKeysView);
  914. begin
  915. If (Fresource=AValue) then exit;
  916. Fresource:=AValue;
  917. MarkPropertyChanged(AIndex);
  918. end;
  919. { --------------------------------------------------------------------
  920. TLinuxGetLinuxAccountViewsResponse
  921. --------------------------------------------------------------------}
  922. Procedure TLinuxGetLinuxAccountViewsResponse.Setresource(AIndex : Integer; AValue : TLinuxAccountViews);
  923. begin
  924. If (Fresource=AValue) then exit;
  925. Fresource:=AValue;
  926. MarkPropertyChanged(AIndex);
  927. end;
  928. { --------------------------------------------------------------------
  929. TLinuxGroupView
  930. --------------------------------------------------------------------}
  931. Procedure TLinuxGroupView.Setgid(AIndex : Integer; AValue : integer);
  932. begin
  933. If (Fgid=AValue) then exit;
  934. Fgid:=AValue;
  935. MarkPropertyChanged(AIndex);
  936. end;
  937. Procedure TLinuxGroupView.SetgroupName(AIndex : Integer; const AValue : String);
  938. begin
  939. If (FgroupName=AValue) then exit;
  940. FgroupName:=AValue;
  941. MarkPropertyChanged(AIndex);
  942. end;
  943. Procedure TLinuxGroupView.Setmembers(AIndex : Integer; AValue : TStringArray);
  944. begin
  945. If (Fmembers=AValue) then exit;
  946. Fmembers:=AValue;
  947. MarkPropertyChanged(AIndex);
  948. end;
  949. //2.6.4. bug workaround
  950. {$IFDEF VER2_6}
  951. Procedure TLinuxGroupView.SetArrayLength(Const AName : String; ALength : Longint);
  952. begin
  953. Case AName of
  954. 'members' : SetLength(Fmembers,ALength);
  955. else
  956. Inherited SetArrayLength(AName,ALength);
  957. end;
  958. end;
  959. {$ENDIF VER2_6}
  960. { --------------------------------------------------------------------
  961. TLinuxUserView
  962. --------------------------------------------------------------------}
  963. Procedure TLinuxUserView.Setgecos(AIndex : Integer; const AValue : String);
  964. begin
  965. If (Fgecos=AValue) then exit;
  966. Fgecos:=AValue;
  967. MarkPropertyChanged(AIndex);
  968. end;
  969. Procedure TLinuxUserView.Setgid(AIndex : Integer; AValue : integer);
  970. begin
  971. If (Fgid=AValue) then exit;
  972. Fgid:=AValue;
  973. MarkPropertyChanged(AIndex);
  974. end;
  975. Procedure TLinuxUserView.SethomeDirectory(AIndex : Integer; const AValue : String);
  976. begin
  977. If (FhomeDirectory=AValue) then exit;
  978. FhomeDirectory:=AValue;
  979. MarkPropertyChanged(AIndex);
  980. end;
  981. Procedure TLinuxUserView.Setshell(AIndex : Integer; const AValue : String);
  982. begin
  983. If (Fshell=AValue) then exit;
  984. Fshell:=AValue;
  985. MarkPropertyChanged(AIndex);
  986. end;
  987. Procedure TLinuxUserView.Setuid(AIndex : Integer; AValue : integer);
  988. begin
  989. If (Fuid=AValue) then exit;
  990. Fuid:=AValue;
  991. MarkPropertyChanged(AIndex);
  992. end;
  993. Procedure TLinuxUserView.Setusername(AIndex : Integer; const AValue : String);
  994. begin
  995. If (Fusername=AValue) then exit;
  996. Fusername:=AValue;
  997. MarkPropertyChanged(AIndex);
  998. end;
  999. { --------------------------------------------------------------------
  1000. TOperationTypeerrorTypeerrorsItem
  1001. --------------------------------------------------------------------}
  1002. Procedure TOperationTypeerrorTypeerrorsItem.Setcode(AIndex : Integer; const AValue : String);
  1003. begin
  1004. If (Fcode=AValue) then exit;
  1005. Fcode:=AValue;
  1006. MarkPropertyChanged(AIndex);
  1007. end;
  1008. Procedure TOperationTypeerrorTypeerrorsItem.Setlocation(AIndex : Integer; const AValue : String);
  1009. begin
  1010. If (Flocation=AValue) then exit;
  1011. Flocation:=AValue;
  1012. MarkPropertyChanged(AIndex);
  1013. end;
  1014. Procedure TOperationTypeerrorTypeerrorsItem.Setmessage(AIndex : Integer; const AValue : String);
  1015. begin
  1016. If (Fmessage=AValue) then exit;
  1017. Fmessage:=AValue;
  1018. MarkPropertyChanged(AIndex);
  1019. end;
  1020. { --------------------------------------------------------------------
  1021. TOperationTypeerror
  1022. --------------------------------------------------------------------}
  1023. Procedure TOperationTypeerror.Seterrors(AIndex : Integer; AValue : TOperationTypeerrorTypeerrorsArray);
  1024. begin
  1025. If (Ferrors=AValue) then exit;
  1026. Ferrors:=AValue;
  1027. MarkPropertyChanged(AIndex);
  1028. end;
  1029. //2.6.4. bug workaround
  1030. {$IFDEF VER2_6}
  1031. Procedure TOperationTypeerror.SetArrayLength(Const AName : String; ALength : Longint);
  1032. begin
  1033. Case AName of
  1034. 'errors' : SetLength(Ferrors,ALength);
  1035. else
  1036. Inherited SetArrayLength(AName,ALength);
  1037. end;
  1038. end;
  1039. {$ENDIF VER2_6}
  1040. { --------------------------------------------------------------------
  1041. TOperationTypewarningsItemTypedataItem
  1042. --------------------------------------------------------------------}
  1043. Procedure TOperationTypewarningsItemTypedataItem.Setkey(AIndex : Integer; const AValue : String);
  1044. begin
  1045. If (Fkey=AValue) then exit;
  1046. Fkey:=AValue;
  1047. MarkPropertyChanged(AIndex);
  1048. end;
  1049. Procedure TOperationTypewarningsItemTypedataItem.Setvalue(AIndex : Integer; const AValue : String);
  1050. begin
  1051. If (Fvalue=AValue) then exit;
  1052. Fvalue:=AValue;
  1053. MarkPropertyChanged(AIndex);
  1054. end;
  1055. { --------------------------------------------------------------------
  1056. TOperationTypewarningsItem
  1057. --------------------------------------------------------------------}
  1058. Procedure TOperationTypewarningsItem.Setcode(AIndex : Integer; const AValue : String);
  1059. begin
  1060. If (Fcode=AValue) then exit;
  1061. Fcode:=AValue;
  1062. MarkPropertyChanged(AIndex);
  1063. end;
  1064. Procedure TOperationTypewarningsItem.Setdata(AIndex : Integer; AValue : TOperationTypewarningsItemTypedataArray);
  1065. begin
  1066. If (Fdata=AValue) then exit;
  1067. Fdata:=AValue;
  1068. MarkPropertyChanged(AIndex);
  1069. end;
  1070. Procedure TOperationTypewarningsItem.Setmessage(AIndex : Integer; const AValue : String);
  1071. begin
  1072. If (Fmessage=AValue) then exit;
  1073. Fmessage:=AValue;
  1074. MarkPropertyChanged(AIndex);
  1075. end;
  1076. //2.6.4. bug workaround
  1077. {$IFDEF VER2_6}
  1078. Procedure TOperationTypewarningsItem.SetArrayLength(Const AName : String; ALength : Longint);
  1079. begin
  1080. Case AName of
  1081. 'data' : SetLength(Fdata,ALength);
  1082. else
  1083. Inherited SetArrayLength(AName,ALength);
  1084. end;
  1085. end;
  1086. {$ENDIF VER2_6}
  1087. { --------------------------------------------------------------------
  1088. TOperation
  1089. --------------------------------------------------------------------}
  1090. Procedure TOperation.SetclientOperationId(AIndex : Integer; const AValue : String);
  1091. begin
  1092. If (FclientOperationId=AValue) then exit;
  1093. FclientOperationId:=AValue;
  1094. MarkPropertyChanged(AIndex);
  1095. end;
  1096. Procedure TOperation.SetcreationTimestamp(AIndex : Integer; const AValue : String);
  1097. begin
  1098. If (FcreationTimestamp=AValue) then exit;
  1099. FcreationTimestamp:=AValue;
  1100. MarkPropertyChanged(AIndex);
  1101. end;
  1102. Procedure TOperation.SetendTime(AIndex : Integer; const AValue : String);
  1103. begin
  1104. If (FendTime=AValue) then exit;
  1105. FendTime:=AValue;
  1106. MarkPropertyChanged(AIndex);
  1107. end;
  1108. Procedure TOperation.Seterror(AIndex : Integer; AValue : TOperationTypeerror);
  1109. begin
  1110. If (Ferror=AValue) then exit;
  1111. Ferror:=AValue;
  1112. MarkPropertyChanged(AIndex);
  1113. end;
  1114. Procedure TOperation.SethttpErrorMessage(AIndex : Integer; const AValue : String);
  1115. begin
  1116. If (FhttpErrorMessage=AValue) then exit;
  1117. FhttpErrorMessage:=AValue;
  1118. MarkPropertyChanged(AIndex);
  1119. end;
  1120. Procedure TOperation.SethttpErrorStatusCode(AIndex : Integer; AValue : integer);
  1121. begin
  1122. If (FhttpErrorStatusCode=AValue) then exit;
  1123. FhttpErrorStatusCode:=AValue;
  1124. MarkPropertyChanged(AIndex);
  1125. end;
  1126. Procedure TOperation.Setid(AIndex : Integer; const AValue : String);
  1127. begin
  1128. If (Fid=AValue) then exit;
  1129. Fid:=AValue;
  1130. MarkPropertyChanged(AIndex);
  1131. end;
  1132. Procedure TOperation.SetinsertTime(AIndex : Integer; const AValue : String);
  1133. begin
  1134. If (FinsertTime=AValue) then exit;
  1135. FinsertTime:=AValue;
  1136. MarkPropertyChanged(AIndex);
  1137. end;
  1138. Procedure TOperation.Setkind(AIndex : Integer; const AValue : String);
  1139. begin
  1140. If (Fkind=AValue) then exit;
  1141. Fkind:=AValue;
  1142. MarkPropertyChanged(AIndex);
  1143. end;
  1144. Procedure TOperation.Setname(AIndex : Integer; const AValue : String);
  1145. begin
  1146. If (Fname=AValue) then exit;
  1147. Fname:=AValue;
  1148. MarkPropertyChanged(AIndex);
  1149. end;
  1150. Procedure TOperation.SetoperationType(AIndex : Integer; const AValue : String);
  1151. begin
  1152. If (FoperationType=AValue) then exit;
  1153. FoperationType:=AValue;
  1154. MarkPropertyChanged(AIndex);
  1155. end;
  1156. Procedure TOperation.Setprogress(AIndex : Integer; AValue : integer);
  1157. begin
  1158. If (Fprogress=AValue) then exit;
  1159. Fprogress:=AValue;
  1160. MarkPropertyChanged(AIndex);
  1161. end;
  1162. Procedure TOperation.Setregion(AIndex : Integer; const AValue : String);
  1163. begin
  1164. If (Fregion=AValue) then exit;
  1165. Fregion:=AValue;
  1166. MarkPropertyChanged(AIndex);
  1167. end;
  1168. Procedure TOperation.SetselfLink(AIndex : Integer; const AValue : String);
  1169. begin
  1170. If (FselfLink=AValue) then exit;
  1171. FselfLink:=AValue;
  1172. MarkPropertyChanged(AIndex);
  1173. end;
  1174. Procedure TOperation.SetstartTime(AIndex : Integer; const AValue : String);
  1175. begin
  1176. If (FstartTime=AValue) then exit;
  1177. FstartTime:=AValue;
  1178. MarkPropertyChanged(AIndex);
  1179. end;
  1180. Procedure TOperation.Setstatus(AIndex : Integer; const AValue : String);
  1181. begin
  1182. If (Fstatus=AValue) then exit;
  1183. Fstatus:=AValue;
  1184. MarkPropertyChanged(AIndex);
  1185. end;
  1186. Procedure TOperation.SetstatusMessage(AIndex : Integer; const AValue : String);
  1187. begin
  1188. If (FstatusMessage=AValue) then exit;
  1189. FstatusMessage:=AValue;
  1190. MarkPropertyChanged(AIndex);
  1191. end;
  1192. Procedure TOperation.SettargetId(AIndex : Integer; const AValue : String);
  1193. begin
  1194. If (FtargetId=AValue) then exit;
  1195. FtargetId:=AValue;
  1196. MarkPropertyChanged(AIndex);
  1197. end;
  1198. Procedure TOperation.SettargetLink(AIndex : Integer; const AValue : String);
  1199. begin
  1200. If (FtargetLink=AValue) then exit;
  1201. FtargetLink:=AValue;
  1202. MarkPropertyChanged(AIndex);
  1203. end;
  1204. Procedure TOperation.Setuser(AIndex : Integer; const AValue : String);
  1205. begin
  1206. If (Fuser=AValue) then exit;
  1207. Fuser:=AValue;
  1208. MarkPropertyChanged(AIndex);
  1209. end;
  1210. Procedure TOperation.Setwarnings(AIndex : Integer; AValue : TOperationTypewarningsArray);
  1211. begin
  1212. If (Fwarnings=AValue) then exit;
  1213. Fwarnings:=AValue;
  1214. MarkPropertyChanged(AIndex);
  1215. end;
  1216. Procedure TOperation.Setzone(AIndex : Integer; const AValue : String);
  1217. begin
  1218. If (Fzone=AValue) then exit;
  1219. Fzone:=AValue;
  1220. MarkPropertyChanged(AIndex);
  1221. end;
  1222. //2.6.4. bug workaround
  1223. {$IFDEF VER2_6}
  1224. Procedure TOperation.SetArrayLength(Const AName : String; ALength : Longint);
  1225. begin
  1226. Case AName of
  1227. 'warnings' : SetLength(Fwarnings,ALength);
  1228. else
  1229. Inherited SetArrayLength(AName,ALength);
  1230. end;
  1231. end;
  1232. {$ENDIF VER2_6}
  1233. { --------------------------------------------------------------------
  1234. TOperationList
  1235. --------------------------------------------------------------------}
  1236. Procedure TOperationList.Setid(AIndex : Integer; const AValue : String);
  1237. begin
  1238. If (Fid=AValue) then exit;
  1239. Fid:=AValue;
  1240. MarkPropertyChanged(AIndex);
  1241. end;
  1242. Procedure TOperationList.Setitems(AIndex : Integer; AValue : TOperationListTypeitemsArray);
  1243. begin
  1244. If (Fitems=AValue) then exit;
  1245. Fitems:=AValue;
  1246. MarkPropertyChanged(AIndex);
  1247. end;
  1248. Procedure TOperationList.Setkind(AIndex : Integer; const AValue : String);
  1249. begin
  1250. If (Fkind=AValue) then exit;
  1251. Fkind:=AValue;
  1252. MarkPropertyChanged(AIndex);
  1253. end;
  1254. Procedure TOperationList.SetnextPageToken(AIndex : Integer; const AValue : String);
  1255. begin
  1256. If (FnextPageToken=AValue) then exit;
  1257. FnextPageToken:=AValue;
  1258. MarkPropertyChanged(AIndex);
  1259. end;
  1260. Procedure TOperationList.SetselfLink(AIndex : Integer; const AValue : String);
  1261. begin
  1262. If (FselfLink=AValue) then exit;
  1263. FselfLink:=AValue;
  1264. MarkPropertyChanged(AIndex);
  1265. end;
  1266. //2.6.4. bug workaround
  1267. {$IFDEF VER2_6}
  1268. Procedure TOperationList.SetArrayLength(Const AName : String; ALength : Longint);
  1269. begin
  1270. Case AName of
  1271. 'items' : SetLength(Fitems,ALength);
  1272. else
  1273. Inherited SetArrayLength(AName,ALength);
  1274. end;
  1275. end;
  1276. {$ENDIF VER2_6}
  1277. { --------------------------------------------------------------------
  1278. TPublicKey
  1279. --------------------------------------------------------------------}
  1280. Procedure TPublicKey.SetcreationTimestamp(AIndex : Integer; const AValue : String);
  1281. begin
  1282. If (FcreationTimestamp=AValue) then exit;
  1283. FcreationTimestamp:=AValue;
  1284. MarkPropertyChanged(AIndex);
  1285. end;
  1286. Procedure TPublicKey.Setdescription(AIndex : Integer; const AValue : String);
  1287. begin
  1288. If (Fdescription=AValue) then exit;
  1289. Fdescription:=AValue;
  1290. MarkPropertyChanged(AIndex);
  1291. end;
  1292. Procedure TPublicKey.SetexpirationTimestamp(AIndex : Integer; const AValue : String);
  1293. begin
  1294. If (FexpirationTimestamp=AValue) then exit;
  1295. FexpirationTimestamp:=AValue;
  1296. MarkPropertyChanged(AIndex);
  1297. end;
  1298. Procedure TPublicKey.Setfingerprint(AIndex : Integer; const AValue : String);
  1299. begin
  1300. If (Ffingerprint=AValue) then exit;
  1301. Ffingerprint:=AValue;
  1302. MarkPropertyChanged(AIndex);
  1303. end;
  1304. Procedure TPublicKey.Setkey(AIndex : Integer; const AValue : String);
  1305. begin
  1306. If (Fkey=AValue) then exit;
  1307. Fkey:=AValue;
  1308. MarkPropertyChanged(AIndex);
  1309. end;
  1310. { --------------------------------------------------------------------
  1311. TUser
  1312. --------------------------------------------------------------------}
  1313. Procedure TUser.SetcreationTimestamp(AIndex : Integer; const AValue : String);
  1314. begin
  1315. If (FcreationTimestamp=AValue) then exit;
  1316. FcreationTimestamp:=AValue;
  1317. MarkPropertyChanged(AIndex);
  1318. end;
  1319. Procedure TUser.Setdescription(AIndex : Integer; const AValue : String);
  1320. begin
  1321. If (Fdescription=AValue) then exit;
  1322. Fdescription:=AValue;
  1323. MarkPropertyChanged(AIndex);
  1324. end;
  1325. Procedure TUser.Setgroups(AIndex : Integer; AValue : TStringArray);
  1326. begin
  1327. If (Fgroups=AValue) then exit;
  1328. Fgroups:=AValue;
  1329. MarkPropertyChanged(AIndex);
  1330. end;
  1331. Procedure TUser.Setid(AIndex : Integer; const AValue : String);
  1332. begin
  1333. If (Fid=AValue) then exit;
  1334. Fid:=AValue;
  1335. MarkPropertyChanged(AIndex);
  1336. end;
  1337. Procedure TUser.Setkind(AIndex : Integer; const AValue : String);
  1338. begin
  1339. If (Fkind=AValue) then exit;
  1340. Fkind:=AValue;
  1341. MarkPropertyChanged(AIndex);
  1342. end;
  1343. Procedure TUser.Setname(AIndex : Integer; const AValue : String);
  1344. begin
  1345. If (Fname=AValue) then exit;
  1346. Fname:=AValue;
  1347. MarkPropertyChanged(AIndex);
  1348. end;
  1349. Procedure TUser.Setowner(AIndex : Integer; const AValue : String);
  1350. begin
  1351. If (Fowner=AValue) then exit;
  1352. Fowner:=AValue;
  1353. MarkPropertyChanged(AIndex);
  1354. end;
  1355. Procedure TUser.SetpublicKeys(AIndex : Integer; AValue : TUserTypepublicKeysArray);
  1356. begin
  1357. If (FpublicKeys=AValue) then exit;
  1358. FpublicKeys:=AValue;
  1359. MarkPropertyChanged(AIndex);
  1360. end;
  1361. Procedure TUser.SetselfLink(AIndex : Integer; const AValue : String);
  1362. begin
  1363. If (FselfLink=AValue) then exit;
  1364. FselfLink:=AValue;
  1365. MarkPropertyChanged(AIndex);
  1366. end;
  1367. //2.6.4. bug workaround
  1368. {$IFDEF VER2_6}
  1369. Procedure TUser.SetArrayLength(Const AName : String; ALength : Longint);
  1370. begin
  1371. Case AName of
  1372. 'groups' : SetLength(Fgroups,ALength);
  1373. 'publickeys' : SetLength(FpublicKeys,ALength);
  1374. else
  1375. Inherited SetArrayLength(AName,ALength);
  1376. end;
  1377. end;
  1378. {$ENDIF VER2_6}
  1379. { --------------------------------------------------------------------
  1380. TUserList
  1381. --------------------------------------------------------------------}
  1382. Procedure TUserList.Setid(AIndex : Integer; const AValue : String);
  1383. begin
  1384. If (Fid=AValue) then exit;
  1385. Fid:=AValue;
  1386. MarkPropertyChanged(AIndex);
  1387. end;
  1388. Procedure TUserList.Setitems(AIndex : Integer; AValue : TUserListTypeitemsArray);
  1389. begin
  1390. If (Fitems=AValue) then exit;
  1391. Fitems:=AValue;
  1392. MarkPropertyChanged(AIndex);
  1393. end;
  1394. Procedure TUserList.Setkind(AIndex : Integer; const AValue : String);
  1395. begin
  1396. If (Fkind=AValue) then exit;
  1397. Fkind:=AValue;
  1398. MarkPropertyChanged(AIndex);
  1399. end;
  1400. Procedure TUserList.SetnextPageToken(AIndex : Integer; const AValue : String);
  1401. begin
  1402. If (FnextPageToken=AValue) then exit;
  1403. FnextPageToken:=AValue;
  1404. MarkPropertyChanged(AIndex);
  1405. end;
  1406. Procedure TUserList.SetselfLink(AIndex : Integer; const AValue : String);
  1407. begin
  1408. If (FselfLink=AValue) then exit;
  1409. FselfLink:=AValue;
  1410. MarkPropertyChanged(AIndex);
  1411. end;
  1412. //2.6.4. bug workaround
  1413. {$IFDEF VER2_6}
  1414. Procedure TUserList.SetArrayLength(Const AName : String; ALength : Longint);
  1415. begin
  1416. Case AName of
  1417. 'items' : SetLength(Fitems,ALength);
  1418. else
  1419. Inherited SetArrayLength(AName,ALength);
  1420. end;
  1421. end;
  1422. {$ENDIF VER2_6}
  1423. { --------------------------------------------------------------------
  1424. TGlobalAccountsOperationsResource
  1425. --------------------------------------------------------------------}
  1426. Class Function TGlobalAccountsOperationsResource.ResourceName : String;
  1427. begin
  1428. Result:='globalAccountsOperations';
  1429. end;
  1430. Class Function TGlobalAccountsOperationsResource.DefaultAPI : TGoogleAPIClass;
  1431. begin
  1432. Result:=TcomputeaccountsAPI;
  1433. end;
  1434. Procedure TGlobalAccountsOperationsResource.Delete(operation: string; project: string);
  1435. Const
  1436. _HTTPMethod = 'DELETE';
  1437. _Path = '{project}/global/operations/{operation}';
  1438. _Methodid = 'computeaccounts.globalAccountsOperations.delete';
  1439. Var
  1440. _P : String;
  1441. begin
  1442. _P:=SubstitutePath(_Path,['operation',operation,'project',project]);
  1443. ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
  1444. end;
  1445. Function TGlobalAccountsOperationsResource.Get(operation: string; project: string) : TOperation;
  1446. Const
  1447. _HTTPMethod = 'GET';
  1448. _Path = '{project}/global/operations/{operation}';
  1449. _Methodid = 'computeaccounts.globalAccountsOperations.get';
  1450. Var
  1451. _P : String;
  1452. begin
  1453. _P:=SubstitutePath(_Path,['operation',operation,'project',project]);
  1454. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TOperation) as TOperation;
  1455. end;
  1456. Function TGlobalAccountsOperationsResource.List(project: string; AQuery : string = '') : TOperationList;
  1457. Const
  1458. _HTTPMethod = 'GET';
  1459. _Path = '{project}/global/operations';
  1460. _Methodid = 'computeaccounts.globalAccountsOperations.list';
  1461. Var
  1462. _P : String;
  1463. begin
  1464. _P:=SubstitutePath(_Path,['project',project]);
  1465. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TOperationList) as TOperationList;
  1466. end;
  1467. Function TGlobalAccountsOperationsResource.List(project: string; AQuery : TGlobalAccountsOperationslistOptions) : TOperationList;
  1468. Var
  1469. _Q : String;
  1470. begin
  1471. _Q:='';
  1472. AddToQuery(_Q,'filter',AQuery.filter);
  1473. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  1474. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  1475. Result:=List(project,_Q);
  1476. end;
  1477. { --------------------------------------------------------------------
  1478. TGroupsResource
  1479. --------------------------------------------------------------------}
  1480. Class Function TGroupsResource.ResourceName : String;
  1481. begin
  1482. Result:='groups';
  1483. end;
  1484. Class Function TGroupsResource.DefaultAPI : TGoogleAPIClass;
  1485. begin
  1486. Result:=TcomputeaccountsAPI;
  1487. end;
  1488. Function TGroupsResource.AddMember(groupName: string; project: string; aGroupsAddMemberRequest : TGroupsAddMemberRequest) : TOperation;
  1489. Const
  1490. _HTTPMethod = 'POST';
  1491. _Path = '{project}/global/groups/{groupName}/addMember';
  1492. _Methodid = 'computeaccounts.groups.addMember';
  1493. Var
  1494. _P : String;
  1495. begin
  1496. _P:=SubstitutePath(_Path,['groupName',groupName,'project',project]);
  1497. Result:=ServiceCall(_HTTPMethod,_P,'',aGroupsAddMemberRequest,TOperation) as TOperation;
  1498. end;
  1499. Function TGroupsResource.Delete(groupName: string; project: string) : TOperation;
  1500. Const
  1501. _HTTPMethod = 'DELETE';
  1502. _Path = '{project}/global/groups/{groupName}';
  1503. _Methodid = 'computeaccounts.groups.delete';
  1504. Var
  1505. _P : String;
  1506. begin
  1507. _P:=SubstitutePath(_Path,['groupName',groupName,'project',project]);
  1508. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TOperation) as TOperation;
  1509. end;
  1510. Function TGroupsResource.Get(groupName: string; project: string) : TGroup;
  1511. Const
  1512. _HTTPMethod = 'GET';
  1513. _Path = '{project}/global/groups/{groupName}';
  1514. _Methodid = 'computeaccounts.groups.get';
  1515. Var
  1516. _P : String;
  1517. begin
  1518. _P:=SubstitutePath(_Path,['groupName',groupName,'project',project]);
  1519. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TGroup) as TGroup;
  1520. end;
  1521. Function TGroupsResource.Insert(project: string; aGroup : TGroup) : TOperation;
  1522. Const
  1523. _HTTPMethod = 'POST';
  1524. _Path = '{project}/global/groups';
  1525. _Methodid = 'computeaccounts.groups.insert';
  1526. Var
  1527. _P : String;
  1528. begin
  1529. _P:=SubstitutePath(_Path,['project',project]);
  1530. Result:=ServiceCall(_HTTPMethod,_P,'',aGroup,TOperation) as TOperation;
  1531. end;
  1532. Function TGroupsResource.List(project: string; AQuery : string = '') : TGroupList;
  1533. Const
  1534. _HTTPMethod = 'GET';
  1535. _Path = '{project}/global/groups';
  1536. _Methodid = 'computeaccounts.groups.list';
  1537. Var
  1538. _P : String;
  1539. begin
  1540. _P:=SubstitutePath(_Path,['project',project]);
  1541. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TGroupList) as TGroupList;
  1542. end;
  1543. Function TGroupsResource.List(project: string; AQuery : TGroupslistOptions) : TGroupList;
  1544. Var
  1545. _Q : String;
  1546. begin
  1547. _Q:='';
  1548. AddToQuery(_Q,'filter',AQuery.filter);
  1549. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  1550. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  1551. Result:=List(project,_Q);
  1552. end;
  1553. Function TGroupsResource.RemoveMember(groupName: string; project: string; aGroupsRemoveMemberRequest : TGroupsRemoveMemberRequest) : TOperation;
  1554. Const
  1555. _HTTPMethod = 'POST';
  1556. _Path = '{project}/global/groups/{groupName}/removeMember';
  1557. _Methodid = 'computeaccounts.groups.removeMember';
  1558. Var
  1559. _P : String;
  1560. begin
  1561. _P:=SubstitutePath(_Path,['groupName',groupName,'project',project]);
  1562. Result:=ServiceCall(_HTTPMethod,_P,'',aGroupsRemoveMemberRequest,TOperation) as TOperation;
  1563. end;
  1564. { --------------------------------------------------------------------
  1565. TLinuxResource
  1566. --------------------------------------------------------------------}
  1567. Class Function TLinuxResource.ResourceName : String;
  1568. begin
  1569. Result:='linux';
  1570. end;
  1571. Class Function TLinuxResource.DefaultAPI : TGoogleAPIClass;
  1572. begin
  1573. Result:=TcomputeaccountsAPI;
  1574. end;
  1575. Function TLinuxResource.GetAuthorizedKeysView(project: string; user: string; zone: string; AQuery : string = '') : TLinuxGetAuthorizedKeysViewResponse;
  1576. Const
  1577. _HTTPMethod = 'POST';
  1578. _Path = '{project}/zones/{zone}/authorizedKeysView/{user}';
  1579. _Methodid = 'computeaccounts.linux.getAuthorizedKeysView';
  1580. Var
  1581. _P : String;
  1582. begin
  1583. _P:=SubstitutePath(_Path,['project',project,'user',user,'zone',zone]);
  1584. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TLinuxGetAuthorizedKeysViewResponse) as TLinuxGetAuthorizedKeysViewResponse;
  1585. end;
  1586. Function TLinuxResource.GetAuthorizedKeysView(project: string; user: string; zone: string; AQuery : TLinuxgetAuthorizedKeysViewOptions) : TLinuxGetAuthorizedKeysViewResponse;
  1587. Var
  1588. _Q : String;
  1589. begin
  1590. _Q:='';
  1591. AddToQuery(_Q,'instance',AQuery.instance);
  1592. Result:=GetAuthorizedKeysView(project,user,zone,_Q);
  1593. end;
  1594. Function TLinuxResource.GetLinuxAccountViews(project: string; zone: string; AQuery : string = '') : TLinuxGetLinuxAccountViewsResponse;
  1595. Const
  1596. _HTTPMethod = 'POST';
  1597. _Path = '{project}/zones/{zone}/linuxAccountViews';
  1598. _Methodid = 'computeaccounts.linux.getLinuxAccountViews';
  1599. Var
  1600. _P : String;
  1601. begin
  1602. _P:=SubstitutePath(_Path,['project',project,'zone',zone]);
  1603. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TLinuxGetLinuxAccountViewsResponse) as TLinuxGetLinuxAccountViewsResponse;
  1604. end;
  1605. Function TLinuxResource.GetLinuxAccountViews(project: string; zone: string; AQuery : TLinuxgetLinuxAccountViewsOptions) : TLinuxGetLinuxAccountViewsResponse;
  1606. Var
  1607. _Q : String;
  1608. begin
  1609. _Q:='';
  1610. AddToQuery(_Q,'filter',AQuery.filter);
  1611. AddToQuery(_Q,'instance',AQuery.instance);
  1612. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  1613. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  1614. AddToQuery(_Q,'user',AQuery.user);
  1615. Result:=GetLinuxAccountViews(project,zone,_Q);
  1616. end;
  1617. { --------------------------------------------------------------------
  1618. TUsersResource
  1619. --------------------------------------------------------------------}
  1620. Class Function TUsersResource.ResourceName : String;
  1621. begin
  1622. Result:='users';
  1623. end;
  1624. Class Function TUsersResource.DefaultAPI : TGoogleAPIClass;
  1625. begin
  1626. Result:=TcomputeaccountsAPI;
  1627. end;
  1628. Function TUsersResource.AddPublicKey(project: string; user: string; aPublicKey : TPublicKey) : TOperation;
  1629. Const
  1630. _HTTPMethod = 'POST';
  1631. _Path = '{project}/global/users/{user}/addPublicKey';
  1632. _Methodid = 'computeaccounts.users.addPublicKey';
  1633. Var
  1634. _P : String;
  1635. begin
  1636. _P:=SubstitutePath(_Path,['project',project,'user',user]);
  1637. Result:=ServiceCall(_HTTPMethod,_P,'',aPublicKey,TOperation) as TOperation;
  1638. end;
  1639. Function TUsersResource.Delete(project: string; user: string) : TOperation;
  1640. Const
  1641. _HTTPMethod = 'DELETE';
  1642. _Path = '{project}/global/users/{user}';
  1643. _Methodid = 'computeaccounts.users.delete';
  1644. Var
  1645. _P : String;
  1646. begin
  1647. _P:=SubstitutePath(_Path,['project',project,'user',user]);
  1648. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TOperation) as TOperation;
  1649. end;
  1650. Function TUsersResource.Get(project: string; user: string) : TUser;
  1651. Const
  1652. _HTTPMethod = 'GET';
  1653. _Path = '{project}/global/users/{user}';
  1654. _Methodid = 'computeaccounts.users.get';
  1655. Var
  1656. _P : String;
  1657. begin
  1658. _P:=SubstitutePath(_Path,['project',project,'user',user]);
  1659. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TUser) as TUser;
  1660. end;
  1661. Function TUsersResource.Insert(project: string; aUser : TUser) : TOperation;
  1662. Const
  1663. _HTTPMethod = 'POST';
  1664. _Path = '{project}/global/users';
  1665. _Methodid = 'computeaccounts.users.insert';
  1666. Var
  1667. _P : String;
  1668. begin
  1669. _P:=SubstitutePath(_Path,['project',project]);
  1670. Result:=ServiceCall(_HTTPMethod,_P,'',aUser,TOperation) as TOperation;
  1671. end;
  1672. Function TUsersResource.List(project: string; AQuery : string = '') : TUserList;
  1673. Const
  1674. _HTTPMethod = 'GET';
  1675. _Path = '{project}/global/users';
  1676. _Methodid = 'computeaccounts.users.list';
  1677. Var
  1678. _P : String;
  1679. begin
  1680. _P:=SubstitutePath(_Path,['project',project]);
  1681. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TUserList) as TUserList;
  1682. end;
  1683. Function TUsersResource.List(project: string; AQuery : TUserslistOptions) : TUserList;
  1684. Var
  1685. _Q : String;
  1686. begin
  1687. _Q:='';
  1688. AddToQuery(_Q,'filter',AQuery.filter);
  1689. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  1690. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  1691. Result:=List(project,_Q);
  1692. end;
  1693. Function TUsersResource.RemovePublicKey(project: string; user: string; AQuery : string = '') : TOperation;
  1694. Const
  1695. _HTTPMethod = 'POST';
  1696. _Path = '{project}/global/users/{user}/removePublicKey';
  1697. _Methodid = 'computeaccounts.users.removePublicKey';
  1698. Var
  1699. _P : String;
  1700. begin
  1701. _P:=SubstitutePath(_Path,['project',project,'user',user]);
  1702. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TOperation) as TOperation;
  1703. end;
  1704. Function TUsersResource.RemovePublicKey(project: string; user: string; AQuery : TUsersremovePublicKeyOptions) : TOperation;
  1705. Var
  1706. _Q : String;
  1707. begin
  1708. _Q:='';
  1709. AddToQuery(_Q,'fingerprint',AQuery.fingerprint);
  1710. Result:=RemovePublicKey(project,user,_Q);
  1711. end;
  1712. { --------------------------------------------------------------------
  1713. TComputeaccountsAPI
  1714. --------------------------------------------------------------------}
  1715. Class Function TComputeaccountsAPI.APIName : String;
  1716. begin
  1717. Result:='computeaccounts';
  1718. end;
  1719. Class Function TComputeaccountsAPI.APIVersion : String;
  1720. begin
  1721. Result:='alpha';
  1722. end;
  1723. Class Function TComputeaccountsAPI.APIRevision : String;
  1724. begin
  1725. Result:='20150423';
  1726. end;
  1727. Class Function TComputeaccountsAPI.APIID : String;
  1728. begin
  1729. Result:='computeaccounts:alpha';
  1730. end;
  1731. Class Function TComputeaccountsAPI.APITitle : String;
  1732. begin
  1733. Result:='Compute Accounts API';
  1734. end;
  1735. Class Function TComputeaccountsAPI.APIDescription : String;
  1736. begin
  1737. Result:='API for the Google Compute Accounts service.';
  1738. end;
  1739. Class Function TComputeaccountsAPI.APIOwnerDomain : String;
  1740. begin
  1741. Result:='google.com';
  1742. end;
  1743. Class Function TComputeaccountsAPI.APIOwnerName : String;
  1744. begin
  1745. Result:='Google';
  1746. end;
  1747. Class Function TComputeaccountsAPI.APIIcon16 : String;
  1748. begin
  1749. Result:='https://www.google.com/images/icons/product/compute_engine-16.png';
  1750. end;
  1751. Class Function TComputeaccountsAPI.APIIcon32 : String;
  1752. begin
  1753. Result:='https://www.google.com/images/icons/product/compute_engine-32.png';
  1754. end;
  1755. Class Function TComputeaccountsAPI.APIdocumentationLink : String;
  1756. begin
  1757. Result:='https://cloud.google.com/compute/docs/access/user-accounts/api/latest/';
  1758. end;
  1759. Class Function TComputeaccountsAPI.APIrootUrl : string;
  1760. begin
  1761. Result:='https://www.googleapis.com:443/';
  1762. end;
  1763. Class Function TComputeaccountsAPI.APIbasePath : string;
  1764. begin
  1765. Result:='/computeaccounts/alpha/projects/';
  1766. end;
  1767. Class Function TComputeaccountsAPI.APIbaseURL : String;
  1768. begin
  1769. Result:='https://www.googleapis.com:443/computeaccounts/alpha/projects/';
  1770. end;
  1771. Class Function TComputeaccountsAPI.APIProtocol : string;
  1772. begin
  1773. Result:='rest';
  1774. end;
  1775. Class Function TComputeaccountsAPI.APIservicePath : string;
  1776. begin
  1777. Result:='computeaccounts/alpha/projects/';
  1778. end;
  1779. Class Function TComputeaccountsAPI.APIbatchPath : String;
  1780. begin
  1781. Result:='batch';
  1782. end;
  1783. Class Function TComputeaccountsAPI.APIAuthScopes : TScopeInfoArray;
  1784. begin
  1785. SetLength(Result,3);
  1786. Result[0].Name:='https://www.googleapis.com/auth/cloud-platform';
  1787. Result[0].Description:='View and manage your data across Google Cloud Platform services';
  1788. Result[1].Name:='https://www.googleapis.com/auth/computeaccounts';
  1789. Result[1].Description:='Manage your Google Compute Accounts';
  1790. Result[2].Name:='https://www.googleapis.com/auth/computeaccounts.readonly';
  1791. Result[2].Description:='View your Google Compute Accounts';
  1792. end;
  1793. Class Function TComputeaccountsAPI.APINeedsAuth : Boolean;
  1794. begin
  1795. Result:=True;
  1796. end;
  1797. Class Procedure TComputeaccountsAPI.RegisterAPIResources;
  1798. begin
  1799. TAuthorizedKeysView.RegisterObject;
  1800. TGroup.RegisterObject;
  1801. TGroupList.RegisterObject;
  1802. TGroupsAddMemberRequest.RegisterObject;
  1803. TGroupsRemoveMemberRequest.RegisterObject;
  1804. TLinuxAccountViews.RegisterObject;
  1805. TLinuxGetAuthorizedKeysViewResponse.RegisterObject;
  1806. TLinuxGetLinuxAccountViewsResponse.RegisterObject;
  1807. TLinuxGroupView.RegisterObject;
  1808. TLinuxUserView.RegisterObject;
  1809. TOperationTypeerrorTypeerrorsItem.RegisterObject;
  1810. TOperationTypeerror.RegisterObject;
  1811. TOperationTypewarningsItemTypedataItem.RegisterObject;
  1812. TOperationTypewarningsItem.RegisterObject;
  1813. TOperation.RegisterObject;
  1814. TOperationList.RegisterObject;
  1815. TPublicKey.RegisterObject;
  1816. TUser.RegisterObject;
  1817. TUserList.RegisterObject;
  1818. end;
  1819. Function TComputeaccountsAPI.GetGlobalAccountsOperationsInstance : TGlobalAccountsOperationsResource;
  1820. begin
  1821. if (FGlobalAccountsOperationsInstance=Nil) then
  1822. FGlobalAccountsOperationsInstance:=CreateGlobalAccountsOperationsResource;
  1823. Result:=FGlobalAccountsOperationsInstance;
  1824. end;
  1825. Function TComputeaccountsAPI.CreateGlobalAccountsOperationsResource : TGlobalAccountsOperationsResource;
  1826. begin
  1827. Result:=CreateGlobalAccountsOperationsResource(Self);
  1828. end;
  1829. Function TComputeaccountsAPI.CreateGlobalAccountsOperationsResource(AOwner : TComponent) : TGlobalAccountsOperationsResource;
  1830. begin
  1831. Result:=TGlobalAccountsOperationsResource.Create(AOwner);
  1832. Result.API:=Self.API;
  1833. end;
  1834. Function TComputeaccountsAPI.GetGroupsInstance : TGroupsResource;
  1835. begin
  1836. if (FGroupsInstance=Nil) then
  1837. FGroupsInstance:=CreateGroupsResource;
  1838. Result:=FGroupsInstance;
  1839. end;
  1840. Function TComputeaccountsAPI.CreateGroupsResource : TGroupsResource;
  1841. begin
  1842. Result:=CreateGroupsResource(Self);
  1843. end;
  1844. Function TComputeaccountsAPI.CreateGroupsResource(AOwner : TComponent) : TGroupsResource;
  1845. begin
  1846. Result:=TGroupsResource.Create(AOwner);
  1847. Result.API:=Self.API;
  1848. end;
  1849. Function TComputeaccountsAPI.GetLinuxInstance : TLinuxResource;
  1850. begin
  1851. if (FLinuxInstance=Nil) then
  1852. FLinuxInstance:=CreateLinuxResource;
  1853. Result:=FLinuxInstance;
  1854. end;
  1855. Function TComputeaccountsAPI.CreateLinuxResource : TLinuxResource;
  1856. begin
  1857. Result:=CreateLinuxResource(Self);
  1858. end;
  1859. Function TComputeaccountsAPI.CreateLinuxResource(AOwner : TComponent) : TLinuxResource;
  1860. begin
  1861. Result:=TLinuxResource.Create(AOwner);
  1862. Result.API:=Self.API;
  1863. end;
  1864. Function TComputeaccountsAPI.GetUsersInstance : TUsersResource;
  1865. begin
  1866. if (FUsersInstance=Nil) then
  1867. FUsersInstance:=CreateUsersResource;
  1868. Result:=FUsersInstance;
  1869. end;
  1870. Function TComputeaccountsAPI.CreateUsersResource : TUsersResource;
  1871. begin
  1872. Result:=CreateUsersResource(Self);
  1873. end;
  1874. Function TComputeaccountsAPI.CreateUsersResource(AOwner : TComponent) : TUsersResource;
  1875. begin
  1876. Result:=TUsersResource.Create(AOwner);
  1877. Result.API:=Self.API;
  1878. end;
  1879. initialization
  1880. TComputeaccountsAPI.RegisterAPI;
  1881. end.