googleresourceviews.pp 59 KB

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