googleruntimeconfig.pp 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862
  1. unit googleruntimeconfig;
  2. {$MODE objfpc}
  3. {$H+}
  4. interface
  5. uses sysutils, classes, googleservice, restbase, googlebase;
  6. type
  7. //Top-level schema types
  8. TStatus = Class;
  9. TListConfigsResponse = Class;
  10. TVariable = Class;
  11. TOperation = Class;
  12. TWaiter = Class;
  13. TRuntimeConfig = Class;
  14. TListWaitersResponse = Class;
  15. TEndCondition = Class;
  16. TCardinality = Class;
  17. TEmpty = Class;
  18. TWatchVariableRequest = Class;
  19. TListVariablesResponse = Class;
  20. TStatusArray = Array of TStatus;
  21. TListConfigsResponseArray = Array of TListConfigsResponse;
  22. TVariableArray = Array of TVariable;
  23. TOperationArray = Array of TOperation;
  24. TWaiterArray = Array of TWaiter;
  25. TRuntimeConfigArray = Array of TRuntimeConfig;
  26. TListWaitersResponseArray = Array of TListWaitersResponse;
  27. TEndConditionArray = Array of TEndCondition;
  28. TCardinalityArray = Array of TCardinality;
  29. TEmptyArray = Array of TEmpty;
  30. TWatchVariableRequestArray = Array of TWatchVariableRequest;
  31. TListVariablesResponseArray = Array of TListVariablesResponse;
  32. //Anonymous types, using auto-generated names
  33. TStatusTypedetailsItem = Class;
  34. TOperationTypemetadata = Class;
  35. TOperationTyperesponse = Class;
  36. TStatusTypedetailsArray = Array of TStatusTypedetailsItem;
  37. TListConfigsResponseTypeconfigsArray = Array of TRuntimeConfig;
  38. TListWaitersResponseTypewaitersArray = Array of TWaiter;
  39. TListVariablesResponseTypevariablesArray = Array of TVariable;
  40. { --------------------------------------------------------------------
  41. TStatusTypedetailsItem
  42. --------------------------------------------------------------------}
  43. TStatusTypedetailsItem = Class(TGoogleBaseObject)
  44. Private
  45. Protected
  46. //Property setters
  47. Public
  48. Class Function AllowAdditionalProperties : Boolean; override;
  49. Published
  50. end;
  51. TStatusTypedetailsItemClass = Class of TStatusTypedetailsItem;
  52. { --------------------------------------------------------------------
  53. TStatus
  54. --------------------------------------------------------------------}
  55. TStatus = Class(TGoogleBaseObject)
  56. Private
  57. Fcode : integer;
  58. Fdetails : TStatusTypedetailsArray;
  59. Fmessage : String;
  60. Protected
  61. //Property setters
  62. Procedure Setcode(AIndex : Integer; const AValue : integer); virtual;
  63. Procedure Setdetails(AIndex : Integer; const AValue : TStatusTypedetailsArray); virtual;
  64. Procedure Setmessage(AIndex : Integer; const AValue : String); virtual;
  65. //2.6.4. bug workaround
  66. {$IFDEF VER2_6}
  67. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  68. {$ENDIF VER2_6}
  69. Public
  70. Published
  71. Property code : integer Index 0 Read Fcode Write Setcode;
  72. Property details : TStatusTypedetailsArray Index 8 Read Fdetails Write Setdetails;
  73. Property message : String Index 16 Read Fmessage Write Setmessage;
  74. end;
  75. TStatusClass = Class of TStatus;
  76. { --------------------------------------------------------------------
  77. TListConfigsResponse
  78. --------------------------------------------------------------------}
  79. TListConfigsResponse = Class(TGoogleBaseObject)
  80. Private
  81. FnextPageToken : String;
  82. Fconfigs : TListConfigsResponseTypeconfigsArray;
  83. Protected
  84. //Property setters
  85. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  86. Procedure Setconfigs(AIndex : Integer; const AValue : TListConfigsResponseTypeconfigsArray); virtual;
  87. //2.6.4. bug workaround
  88. {$IFDEF VER2_6}
  89. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  90. {$ENDIF VER2_6}
  91. Public
  92. Published
  93. Property nextPageToken : String Index 0 Read FnextPageToken Write SetnextPageToken;
  94. Property configs : TListConfigsResponseTypeconfigsArray Index 8 Read Fconfigs Write Setconfigs;
  95. end;
  96. TListConfigsResponseClass = Class of TListConfigsResponse;
  97. { --------------------------------------------------------------------
  98. TVariable
  99. --------------------------------------------------------------------}
  100. TVariable = Class(TGoogleBaseObject)
  101. Private
  102. Fvalue : String;
  103. FupdateTime : String;
  104. Fstate : String;
  105. Fname : String;
  106. Protected
  107. //Property setters
  108. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  109. Procedure SetupdateTime(AIndex : Integer; const AValue : String); virtual;
  110. Procedure Setstate(AIndex : Integer; const AValue : String); virtual;
  111. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  112. Public
  113. Published
  114. Property value : String Index 0 Read Fvalue Write Setvalue;
  115. Property updateTime : String Index 8 Read FupdateTime Write SetupdateTime;
  116. Property state : String Index 16 Read Fstate Write Setstate;
  117. Property name : String Index 24 Read Fname Write Setname;
  118. end;
  119. TVariableClass = Class of TVariable;
  120. { --------------------------------------------------------------------
  121. TOperationTypemetadata
  122. --------------------------------------------------------------------}
  123. TOperationTypemetadata = Class(TGoogleBaseObject)
  124. Private
  125. Protected
  126. //Property setters
  127. Public
  128. Class Function AllowAdditionalProperties : Boolean; override;
  129. Published
  130. end;
  131. TOperationTypemetadataClass = Class of TOperationTypemetadata;
  132. { --------------------------------------------------------------------
  133. TOperationTyperesponse
  134. --------------------------------------------------------------------}
  135. TOperationTyperesponse = Class(TGoogleBaseObject)
  136. Private
  137. Protected
  138. //Property setters
  139. Public
  140. Class Function AllowAdditionalProperties : Boolean; override;
  141. Published
  142. end;
  143. TOperationTyperesponseClass = Class of TOperationTyperesponse;
  144. { --------------------------------------------------------------------
  145. TOperation
  146. --------------------------------------------------------------------}
  147. TOperation = Class(TGoogleBaseObject)
  148. Private
  149. Ferror : TStatus;
  150. Fdone : boolean;
  151. Fmetadata : TOperationTypemetadata;
  152. Fresponse : TOperationTyperesponse;
  153. Fname : String;
  154. Protected
  155. //Property setters
  156. Procedure Seterror(AIndex : Integer; const AValue : TStatus); virtual;
  157. Procedure Setdone(AIndex : Integer; const AValue : boolean); virtual;
  158. Procedure Setmetadata(AIndex : Integer; const AValue : TOperationTypemetadata); virtual;
  159. Procedure Setresponse(AIndex : Integer; const AValue : TOperationTyperesponse); virtual;
  160. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  161. Public
  162. Published
  163. Property error : TStatus Index 0 Read Ferror Write Seterror;
  164. Property done : boolean Index 8 Read Fdone Write Setdone;
  165. Property metadata : TOperationTypemetadata Index 16 Read Fmetadata Write Setmetadata;
  166. Property response : TOperationTyperesponse Index 24 Read Fresponse Write Setresponse;
  167. Property name : String Index 32 Read Fname Write Setname;
  168. end;
  169. TOperationClass = Class of TOperation;
  170. { --------------------------------------------------------------------
  171. TWaiter
  172. --------------------------------------------------------------------}
  173. TWaiter = Class(TGoogleBaseObject)
  174. Private
  175. Ftimeout : String;
  176. Fsuccess : TEndCondition;
  177. Ffailure : TEndCondition;
  178. FcreateTime : String;
  179. Fname : String;
  180. Ferror : TStatus;
  181. Fdone : boolean;
  182. Protected
  183. //Property setters
  184. Procedure Settimeout(AIndex : Integer; const AValue : String); virtual;
  185. Procedure Setsuccess(AIndex : Integer; const AValue : TEndCondition); virtual;
  186. Procedure Setfailure(AIndex : Integer; const AValue : TEndCondition); virtual;
  187. Procedure SetcreateTime(AIndex : Integer; const AValue : String); virtual;
  188. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  189. Procedure Seterror(AIndex : Integer; const AValue : TStatus); virtual;
  190. Procedure Setdone(AIndex : Integer; const AValue : boolean); virtual;
  191. Public
  192. Published
  193. Property timeout : String Index 0 Read Ftimeout Write Settimeout;
  194. Property success : TEndCondition Index 8 Read Fsuccess Write Setsuccess;
  195. Property failure : TEndCondition Index 16 Read Ffailure Write Setfailure;
  196. Property createTime : String Index 24 Read FcreateTime Write SetcreateTime;
  197. Property name : String Index 32 Read Fname Write Setname;
  198. Property error : TStatus Index 40 Read Ferror Write Seterror;
  199. Property done : boolean Index 48 Read Fdone Write Setdone;
  200. end;
  201. TWaiterClass = Class of TWaiter;
  202. { --------------------------------------------------------------------
  203. TRuntimeConfig
  204. --------------------------------------------------------------------}
  205. TRuntimeConfig = Class(TGoogleBaseObject)
  206. Private
  207. Fdescription : String;
  208. Fname : String;
  209. Protected
  210. //Property setters
  211. Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
  212. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  213. Public
  214. Published
  215. Property description : String Index 0 Read Fdescription Write Setdescription;
  216. Property name : String Index 8 Read Fname Write Setname;
  217. end;
  218. TRuntimeConfigClass = Class of TRuntimeConfig;
  219. { --------------------------------------------------------------------
  220. TListWaitersResponse
  221. --------------------------------------------------------------------}
  222. TListWaitersResponse = Class(TGoogleBaseObject)
  223. Private
  224. FnextPageToken : String;
  225. Fwaiters : TListWaitersResponseTypewaitersArray;
  226. Protected
  227. //Property setters
  228. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  229. Procedure Setwaiters(AIndex : Integer; const AValue : TListWaitersResponseTypewaitersArray); virtual;
  230. //2.6.4. bug workaround
  231. {$IFDEF VER2_6}
  232. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  233. {$ENDIF VER2_6}
  234. Public
  235. Published
  236. Property nextPageToken : String Index 0 Read FnextPageToken Write SetnextPageToken;
  237. Property waiters : TListWaitersResponseTypewaitersArray Index 8 Read Fwaiters Write Setwaiters;
  238. end;
  239. TListWaitersResponseClass = Class of TListWaitersResponse;
  240. { --------------------------------------------------------------------
  241. TEndCondition
  242. --------------------------------------------------------------------}
  243. TEndCondition = Class(TGoogleBaseObject)
  244. Private
  245. Fcardinality : TCardinality;
  246. Protected
  247. //Property setters
  248. Procedure Setcardinality(AIndex : Integer; const AValue : TCardinality); virtual;
  249. Public
  250. Published
  251. Property cardinality : TCardinality Index 0 Read Fcardinality Write Setcardinality;
  252. end;
  253. TEndConditionClass = Class of TEndCondition;
  254. { --------------------------------------------------------------------
  255. TCardinality
  256. --------------------------------------------------------------------}
  257. TCardinality = Class(TGoogleBaseObject)
  258. Private
  259. Fpath : String;
  260. Fnumber : integer;
  261. Protected
  262. //Property setters
  263. Procedure Setpath(AIndex : Integer; const AValue : String); virtual;
  264. Procedure Setnumber(AIndex : Integer; const AValue : integer); virtual;
  265. Public
  266. Published
  267. Property path : String Index 0 Read Fpath Write Setpath;
  268. Property number : integer Index 8 Read Fnumber Write Setnumber;
  269. end;
  270. TCardinalityClass = Class of TCardinality;
  271. { --------------------------------------------------------------------
  272. TEmpty
  273. --------------------------------------------------------------------}
  274. TEmpty = Class(TGoogleBaseObject)
  275. Private
  276. Protected
  277. //Property setters
  278. Public
  279. Published
  280. end;
  281. TEmptyClass = Class of TEmpty;
  282. { --------------------------------------------------------------------
  283. TWatchVariableRequest
  284. --------------------------------------------------------------------}
  285. TWatchVariableRequest = Class(TGoogleBaseObject)
  286. Private
  287. FnewerThan : String;
  288. Protected
  289. //Property setters
  290. Procedure SetnewerThan(AIndex : Integer; const AValue : String); virtual;
  291. Public
  292. Published
  293. Property newerThan : String Index 0 Read FnewerThan Write SetnewerThan;
  294. end;
  295. TWatchVariableRequestClass = Class of TWatchVariableRequest;
  296. { --------------------------------------------------------------------
  297. TListVariablesResponse
  298. --------------------------------------------------------------------}
  299. TListVariablesResponse = Class(TGoogleBaseObject)
  300. Private
  301. Fvariables : TListVariablesResponseTypevariablesArray;
  302. FnextPageToken : String;
  303. Protected
  304. //Property setters
  305. Procedure Setvariables(AIndex : Integer; const AValue : TListVariablesResponseTypevariablesArray); virtual;
  306. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  307. //2.6.4. bug workaround
  308. {$IFDEF VER2_6}
  309. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  310. {$ENDIF VER2_6}
  311. Public
  312. Published
  313. Property variables : TListVariablesResponseTypevariablesArray Index 0 Read Fvariables Write Setvariables;
  314. Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
  315. end;
  316. TListVariablesResponseClass = Class of TListVariablesResponse;
  317. { --------------------------------------------------------------------
  318. TProjectsConfigsVariablesResource
  319. --------------------------------------------------------------------}
  320. //Optional query Options for TProjectsConfigsVariablesResource, method List
  321. TProjectsConfigsVariablesListOptions = Record
  322. pageSize : integer;
  323. filter : String;
  324. pageToken : String;
  325. end;
  326. //Optional query Options for TProjectsConfigsVariablesResource, method Delete
  327. TProjectsConfigsVariablesDeleteOptions = Record
  328. recursive : boolean;
  329. end;
  330. TProjectsConfigsVariablesResource = Class(TGoogleResource)
  331. Public
  332. Class Function ResourceName : String; override;
  333. Class Function DefaultAPI : TGoogleAPIClass; override;
  334. Function Watch(_name: string; aWatchVariableRequest : TWatchVariableRequest) : TVariable;
  335. Function List(parent: string; AQuery : string = '') : TListVariablesResponse;
  336. Function List(parent: string; AQuery : TProjectsConfigsVariableslistOptions) : TListVariablesResponse;
  337. Function Get(_name: string) : TVariable;
  338. Function Create(parent: string; aVariable : TVariable) : TVariable;overload;
  339. Function Update(_name: string; aVariable : TVariable) : TVariable;
  340. Function Delete(_name: string; AQuery : string = '') : TEmpty;
  341. Function Delete(_name: string; AQuery : TProjectsConfigsVariablesdeleteOptions) : TEmpty;
  342. end;
  343. { --------------------------------------------------------------------
  344. TProjectsConfigsWaitersResource
  345. --------------------------------------------------------------------}
  346. //Optional query Options for TProjectsConfigsWaitersResource, method List
  347. TProjectsConfigsWaitersListOptions = Record
  348. pageSize : integer;
  349. pageToken : String;
  350. end;
  351. TProjectsConfigsWaitersResource = Class(TGoogleResource)
  352. Public
  353. Class Function ResourceName : String; override;
  354. Class Function DefaultAPI : TGoogleAPIClass; override;
  355. Function Get(_name: string) : TWaiter;
  356. Function Create(parent: string; aWaiter : TWaiter) : TOperation;overload;
  357. Function List(parent: string; AQuery : string = '') : TListWaitersResponse;
  358. Function List(parent: string; AQuery : TProjectsConfigsWaiterslistOptions) : TListWaitersResponse;
  359. Function Delete(_name: string) : TEmpty;
  360. end;
  361. { --------------------------------------------------------------------
  362. TProjectsConfigsOperationsResource
  363. --------------------------------------------------------------------}
  364. TProjectsConfigsOperationsResource = Class(TGoogleResource)
  365. Public
  366. Class Function ResourceName : String; override;
  367. Class Function DefaultAPI : TGoogleAPIClass; override;
  368. Function Get(_name: string) : TOperation;
  369. end;
  370. { --------------------------------------------------------------------
  371. TProjectsConfigsResource
  372. --------------------------------------------------------------------}
  373. //Optional query Options for TProjectsConfigsResource, method List
  374. TProjectsConfigsListOptions = Record
  375. pageSize : integer;
  376. pageToken : String;
  377. end;
  378. TProjectsConfigsResource = Class(TGoogleResource)
  379. Private
  380. FVariablesInstance : TProjectsConfigsVariablesResource;
  381. FWaitersInstance : TProjectsConfigsWaitersResource;
  382. FOperationsInstance : TProjectsConfigsOperationsResource;
  383. Function GetVariablesInstance : TProjectsConfigsVariablesResource;virtual;
  384. Function GetWaitersInstance : TProjectsConfigsWaitersResource;virtual;
  385. Function GetOperationsInstance : TProjectsConfigsOperationsResource;virtual;
  386. Public
  387. Class Function ResourceName : String; override;
  388. Class Function DefaultAPI : TGoogleAPIClass; override;
  389. Function Update(_name: string; aRuntimeConfig : TRuntimeConfig) : TRuntimeConfig;
  390. Function Get(_name: string) : TRuntimeConfig;
  391. Function Create(parent: string; aRuntimeConfig : TRuntimeConfig) : TRuntimeConfig;overload;
  392. Function List(parent: string; AQuery : string = '') : TListConfigsResponse;
  393. Function List(parent: string; AQuery : TProjectsConfigslistOptions) : TListConfigsResponse;
  394. Function Delete(_name: string) : TEmpty;
  395. Function CreateVariablesResource(AOwner : TComponent) : TProjectsConfigsVariablesResource;virtual;overload;
  396. Function CreateVariablesResource : TProjectsConfigsVariablesResource;virtual;overload;
  397. Function CreateWaitersResource(AOwner : TComponent) : TProjectsConfigsWaitersResource;virtual;overload;
  398. Function CreateWaitersResource : TProjectsConfigsWaitersResource;virtual;overload;
  399. Function CreateOperationsResource(AOwner : TComponent) : TProjectsConfigsOperationsResource;virtual;overload;
  400. Function CreateOperationsResource : TProjectsConfigsOperationsResource;virtual;overload;
  401. Property VariablesResource : TProjectsConfigsVariablesResource Read GetVariablesInstance;
  402. Property WaitersResource : TProjectsConfigsWaitersResource Read GetWaitersInstance;
  403. Property OperationsResource : TProjectsConfigsOperationsResource Read GetOperationsInstance;
  404. end;
  405. { --------------------------------------------------------------------
  406. TProjectsResource
  407. --------------------------------------------------------------------}
  408. TProjectsResource = Class(TGoogleResource)
  409. Private
  410. FConfigsVariablesInstance : TProjectsConfigsVariablesResource;
  411. FConfigsWaitersInstance : TProjectsConfigsWaitersResource;
  412. FConfigsOperationsInstance : TProjectsConfigsOperationsResource;
  413. FConfigsInstance : TProjectsConfigsResource;
  414. Function GetConfigsVariablesInstance : TProjectsConfigsVariablesResource;virtual;
  415. Function GetConfigsWaitersInstance : TProjectsConfigsWaitersResource;virtual;
  416. Function GetConfigsOperationsInstance : TProjectsConfigsOperationsResource;virtual;
  417. Function GetConfigsInstance : TProjectsConfigsResource;virtual;
  418. Public
  419. Class Function ResourceName : String; override;
  420. Class Function DefaultAPI : TGoogleAPIClass; override;
  421. Function CreateConfigsVariablesResource(AOwner : TComponent) : TProjectsConfigsVariablesResource;virtual;overload;
  422. Function CreateConfigsVariablesResource : TProjectsConfigsVariablesResource;virtual;overload;
  423. Function CreateConfigsWaitersResource(AOwner : TComponent) : TProjectsConfigsWaitersResource;virtual;overload;
  424. Function CreateConfigsWaitersResource : TProjectsConfigsWaitersResource;virtual;overload;
  425. Function CreateConfigsOperationsResource(AOwner : TComponent) : TProjectsConfigsOperationsResource;virtual;overload;
  426. Function CreateConfigsOperationsResource : TProjectsConfigsOperationsResource;virtual;overload;
  427. Function CreateConfigsResource(AOwner : TComponent) : TProjectsConfigsResource;virtual;overload;
  428. Function CreateConfigsResource : TProjectsConfigsResource;virtual;overload;
  429. Property ConfigsVariablesResource : TProjectsConfigsVariablesResource Read GetConfigsVariablesInstance;
  430. Property ConfigsWaitersResource : TProjectsConfigsWaitersResource Read GetConfigsWaitersInstance;
  431. Property ConfigsOperationsResource : TProjectsConfigsOperationsResource Read GetConfigsOperationsInstance;
  432. Property ConfigsResource : TProjectsConfigsResource Read GetConfigsInstance;
  433. end;
  434. { --------------------------------------------------------------------
  435. TRuntimeconfigAPI
  436. --------------------------------------------------------------------}
  437. TRuntimeconfigAPI = Class(TGoogleAPI)
  438. Private
  439. FProjectsConfigsVariablesInstance : TProjectsConfigsVariablesResource;
  440. FProjectsConfigsWaitersInstance : TProjectsConfigsWaitersResource;
  441. FProjectsConfigsOperationsInstance : TProjectsConfigsOperationsResource;
  442. FProjectsConfigsInstance : TProjectsConfigsResource;
  443. FProjectsInstance : TProjectsResource;
  444. Function GetProjectsConfigsVariablesInstance : TProjectsConfigsVariablesResource;virtual;
  445. Function GetProjectsConfigsWaitersInstance : TProjectsConfigsWaitersResource;virtual;
  446. Function GetProjectsConfigsOperationsInstance : TProjectsConfigsOperationsResource;virtual;
  447. Function GetProjectsConfigsInstance : TProjectsConfigsResource;virtual;
  448. Function GetProjectsInstance : TProjectsResource;virtual;
  449. Public
  450. //Override class functions with API info
  451. Class Function APIName : String; override;
  452. Class Function APIVersion : String; override;
  453. Class Function APIRevision : String; override;
  454. Class Function APIID : String; override;
  455. Class Function APITitle : String; override;
  456. Class Function APIDescription : String; override;
  457. Class Function APIOwnerDomain : String; override;
  458. Class Function APIOwnerName : String; override;
  459. Class Function APIIcon16 : String; override;
  460. Class Function APIIcon32 : String; override;
  461. Class Function APIdocumentationLink : String; override;
  462. Class Function APIrootUrl : string; override;
  463. Class Function APIbasePath : string;override;
  464. Class Function APIbaseURL : String;override;
  465. Class Function APIProtocol : string;override;
  466. Class Function APIservicePath : string;override;
  467. Class Function APIbatchPath : String;override;
  468. Class Function APIAuthScopes : TScopeInfoArray;override;
  469. Class Function APINeedsAuth : Boolean;override;
  470. Class Procedure RegisterAPIResources; override;
  471. //Add create function for resources
  472. Function CreateProjectsConfigsVariablesResource(AOwner : TComponent) : TProjectsConfigsVariablesResource;virtual;overload;
  473. Function CreateProjectsConfigsVariablesResource : TProjectsConfigsVariablesResource;virtual;overload;
  474. Function CreateProjectsConfigsWaitersResource(AOwner : TComponent) : TProjectsConfigsWaitersResource;virtual;overload;
  475. Function CreateProjectsConfigsWaitersResource : TProjectsConfigsWaitersResource;virtual;overload;
  476. Function CreateProjectsConfigsOperationsResource(AOwner : TComponent) : TProjectsConfigsOperationsResource;virtual;overload;
  477. Function CreateProjectsConfigsOperationsResource : TProjectsConfigsOperationsResource;virtual;overload;
  478. Function CreateProjectsConfigsResource(AOwner : TComponent) : TProjectsConfigsResource;virtual;overload;
  479. Function CreateProjectsConfigsResource : TProjectsConfigsResource;virtual;overload;
  480. Function CreateProjectsResource(AOwner : TComponent) : TProjectsResource;virtual;overload;
  481. Function CreateProjectsResource : TProjectsResource;virtual;overload;
  482. //Add default on-demand instances for resources
  483. Property ProjectsConfigsVariablesResource : TProjectsConfigsVariablesResource Read GetProjectsConfigsVariablesInstance;
  484. Property ProjectsConfigsWaitersResource : TProjectsConfigsWaitersResource Read GetProjectsConfigsWaitersInstance;
  485. Property ProjectsConfigsOperationsResource : TProjectsConfigsOperationsResource Read GetProjectsConfigsOperationsInstance;
  486. Property ProjectsConfigsResource : TProjectsConfigsResource Read GetProjectsConfigsInstance;
  487. Property ProjectsResource : TProjectsResource Read GetProjectsInstance;
  488. end;
  489. implementation
  490. { --------------------------------------------------------------------
  491. TStatusTypedetailsItem
  492. --------------------------------------------------------------------}
  493. Class Function TStatusTypedetailsItem.AllowAdditionalProperties : Boolean;
  494. begin
  495. Result:=True;
  496. end;
  497. { --------------------------------------------------------------------
  498. TStatus
  499. --------------------------------------------------------------------}
  500. Procedure TStatus.Setcode(AIndex : Integer; const AValue : integer);
  501. begin
  502. If (Fcode=AValue) then exit;
  503. Fcode:=AValue;
  504. MarkPropertyChanged(AIndex);
  505. end;
  506. Procedure TStatus.Setdetails(AIndex : Integer; const AValue : TStatusTypedetailsArray);
  507. begin
  508. If (Fdetails=AValue) then exit;
  509. Fdetails:=AValue;
  510. MarkPropertyChanged(AIndex);
  511. end;
  512. Procedure TStatus.Setmessage(AIndex : Integer; const AValue : String);
  513. begin
  514. If (Fmessage=AValue) then exit;
  515. Fmessage:=AValue;
  516. MarkPropertyChanged(AIndex);
  517. end;
  518. //2.6.4. bug workaround
  519. {$IFDEF VER2_6}
  520. Procedure TStatus.SetArrayLength(Const AName : String; ALength : Longint);
  521. begin
  522. Case AName of
  523. 'details' : SetLength(Fdetails,ALength);
  524. else
  525. Inherited SetArrayLength(AName,ALength);
  526. end;
  527. end;
  528. {$ENDIF VER2_6}
  529. { --------------------------------------------------------------------
  530. TListConfigsResponse
  531. --------------------------------------------------------------------}
  532. Procedure TListConfigsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
  533. begin
  534. If (FnextPageToken=AValue) then exit;
  535. FnextPageToken:=AValue;
  536. MarkPropertyChanged(AIndex);
  537. end;
  538. Procedure TListConfigsResponse.Setconfigs(AIndex : Integer; const AValue : TListConfigsResponseTypeconfigsArray);
  539. begin
  540. If (Fconfigs=AValue) then exit;
  541. Fconfigs:=AValue;
  542. MarkPropertyChanged(AIndex);
  543. end;
  544. //2.6.4. bug workaround
  545. {$IFDEF VER2_6}
  546. Procedure TListConfigsResponse.SetArrayLength(Const AName : String; ALength : Longint);
  547. begin
  548. Case AName of
  549. 'configs' : SetLength(Fconfigs,ALength);
  550. else
  551. Inherited SetArrayLength(AName,ALength);
  552. end;
  553. end;
  554. {$ENDIF VER2_6}
  555. { --------------------------------------------------------------------
  556. TVariable
  557. --------------------------------------------------------------------}
  558. Procedure TVariable.Setvalue(AIndex : Integer; const AValue : String);
  559. begin
  560. If (Fvalue=AValue) then exit;
  561. Fvalue:=AValue;
  562. MarkPropertyChanged(AIndex);
  563. end;
  564. Procedure TVariable.SetupdateTime(AIndex : Integer; const AValue : String);
  565. begin
  566. If (FupdateTime=AValue) then exit;
  567. FupdateTime:=AValue;
  568. MarkPropertyChanged(AIndex);
  569. end;
  570. Procedure TVariable.Setstate(AIndex : Integer; const AValue : String);
  571. begin
  572. If (Fstate=AValue) then exit;
  573. Fstate:=AValue;
  574. MarkPropertyChanged(AIndex);
  575. end;
  576. Procedure TVariable.Setname(AIndex : Integer; const AValue : String);
  577. begin
  578. If (Fname=AValue) then exit;
  579. Fname:=AValue;
  580. MarkPropertyChanged(AIndex);
  581. end;
  582. { --------------------------------------------------------------------
  583. TOperationTypemetadata
  584. --------------------------------------------------------------------}
  585. Class Function TOperationTypemetadata.AllowAdditionalProperties : Boolean;
  586. begin
  587. Result:=True;
  588. end;
  589. { --------------------------------------------------------------------
  590. TOperationTyperesponse
  591. --------------------------------------------------------------------}
  592. Class Function TOperationTyperesponse.AllowAdditionalProperties : Boolean;
  593. begin
  594. Result:=True;
  595. end;
  596. { --------------------------------------------------------------------
  597. TOperation
  598. --------------------------------------------------------------------}
  599. Procedure TOperation.Seterror(AIndex : Integer; const AValue : TStatus);
  600. begin
  601. If (Ferror=AValue) then exit;
  602. Ferror:=AValue;
  603. MarkPropertyChanged(AIndex);
  604. end;
  605. Procedure TOperation.Setdone(AIndex : Integer; const AValue : boolean);
  606. begin
  607. If (Fdone=AValue) then exit;
  608. Fdone:=AValue;
  609. MarkPropertyChanged(AIndex);
  610. end;
  611. Procedure TOperation.Setmetadata(AIndex : Integer; const AValue : TOperationTypemetadata);
  612. begin
  613. If (Fmetadata=AValue) then exit;
  614. Fmetadata:=AValue;
  615. MarkPropertyChanged(AIndex);
  616. end;
  617. Procedure TOperation.Setresponse(AIndex : Integer; const AValue : TOperationTyperesponse);
  618. begin
  619. If (Fresponse=AValue) then exit;
  620. Fresponse:=AValue;
  621. MarkPropertyChanged(AIndex);
  622. end;
  623. Procedure TOperation.Setname(AIndex : Integer; const AValue : String);
  624. begin
  625. If (Fname=AValue) then exit;
  626. Fname:=AValue;
  627. MarkPropertyChanged(AIndex);
  628. end;
  629. { --------------------------------------------------------------------
  630. TWaiter
  631. --------------------------------------------------------------------}
  632. Procedure TWaiter.Settimeout(AIndex : Integer; const AValue : String);
  633. begin
  634. If (Ftimeout=AValue) then exit;
  635. Ftimeout:=AValue;
  636. MarkPropertyChanged(AIndex);
  637. end;
  638. Procedure TWaiter.Setsuccess(AIndex : Integer; const AValue : TEndCondition);
  639. begin
  640. If (Fsuccess=AValue) then exit;
  641. Fsuccess:=AValue;
  642. MarkPropertyChanged(AIndex);
  643. end;
  644. Procedure TWaiter.Setfailure(AIndex : Integer; const AValue : TEndCondition);
  645. begin
  646. If (Ffailure=AValue) then exit;
  647. Ffailure:=AValue;
  648. MarkPropertyChanged(AIndex);
  649. end;
  650. Procedure TWaiter.SetcreateTime(AIndex : Integer; const AValue : String);
  651. begin
  652. If (FcreateTime=AValue) then exit;
  653. FcreateTime:=AValue;
  654. MarkPropertyChanged(AIndex);
  655. end;
  656. Procedure TWaiter.Setname(AIndex : Integer; const AValue : String);
  657. begin
  658. If (Fname=AValue) then exit;
  659. Fname:=AValue;
  660. MarkPropertyChanged(AIndex);
  661. end;
  662. Procedure TWaiter.Seterror(AIndex : Integer; const AValue : TStatus);
  663. begin
  664. If (Ferror=AValue) then exit;
  665. Ferror:=AValue;
  666. MarkPropertyChanged(AIndex);
  667. end;
  668. Procedure TWaiter.Setdone(AIndex : Integer; const AValue : boolean);
  669. begin
  670. If (Fdone=AValue) then exit;
  671. Fdone:=AValue;
  672. MarkPropertyChanged(AIndex);
  673. end;
  674. { --------------------------------------------------------------------
  675. TRuntimeConfig
  676. --------------------------------------------------------------------}
  677. Procedure TRuntimeConfig.Setdescription(AIndex : Integer; const AValue : String);
  678. begin
  679. If (Fdescription=AValue) then exit;
  680. Fdescription:=AValue;
  681. MarkPropertyChanged(AIndex);
  682. end;
  683. Procedure TRuntimeConfig.Setname(AIndex : Integer; const AValue : String);
  684. begin
  685. If (Fname=AValue) then exit;
  686. Fname:=AValue;
  687. MarkPropertyChanged(AIndex);
  688. end;
  689. { --------------------------------------------------------------------
  690. TListWaitersResponse
  691. --------------------------------------------------------------------}
  692. Procedure TListWaitersResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
  693. begin
  694. If (FnextPageToken=AValue) then exit;
  695. FnextPageToken:=AValue;
  696. MarkPropertyChanged(AIndex);
  697. end;
  698. Procedure TListWaitersResponse.Setwaiters(AIndex : Integer; const AValue : TListWaitersResponseTypewaitersArray);
  699. begin
  700. If (Fwaiters=AValue) then exit;
  701. Fwaiters:=AValue;
  702. MarkPropertyChanged(AIndex);
  703. end;
  704. //2.6.4. bug workaround
  705. {$IFDEF VER2_6}
  706. Procedure TListWaitersResponse.SetArrayLength(Const AName : String; ALength : Longint);
  707. begin
  708. Case AName of
  709. 'waiters' : SetLength(Fwaiters,ALength);
  710. else
  711. Inherited SetArrayLength(AName,ALength);
  712. end;
  713. end;
  714. {$ENDIF VER2_6}
  715. { --------------------------------------------------------------------
  716. TEndCondition
  717. --------------------------------------------------------------------}
  718. Procedure TEndCondition.Setcardinality(AIndex : Integer; const AValue : TCardinality);
  719. begin
  720. If (Fcardinality=AValue) then exit;
  721. Fcardinality:=AValue;
  722. MarkPropertyChanged(AIndex);
  723. end;
  724. { --------------------------------------------------------------------
  725. TCardinality
  726. --------------------------------------------------------------------}
  727. Procedure TCardinality.Setpath(AIndex : Integer; const AValue : String);
  728. begin
  729. If (Fpath=AValue) then exit;
  730. Fpath:=AValue;
  731. MarkPropertyChanged(AIndex);
  732. end;
  733. Procedure TCardinality.Setnumber(AIndex : Integer; const AValue : integer);
  734. begin
  735. If (Fnumber=AValue) then exit;
  736. Fnumber:=AValue;
  737. MarkPropertyChanged(AIndex);
  738. end;
  739. { --------------------------------------------------------------------
  740. TEmpty
  741. --------------------------------------------------------------------}
  742. { --------------------------------------------------------------------
  743. TWatchVariableRequest
  744. --------------------------------------------------------------------}
  745. Procedure TWatchVariableRequest.SetnewerThan(AIndex : Integer; const AValue : String);
  746. begin
  747. If (FnewerThan=AValue) then exit;
  748. FnewerThan:=AValue;
  749. MarkPropertyChanged(AIndex);
  750. end;
  751. { --------------------------------------------------------------------
  752. TListVariablesResponse
  753. --------------------------------------------------------------------}
  754. Procedure TListVariablesResponse.Setvariables(AIndex : Integer; const AValue : TListVariablesResponseTypevariablesArray);
  755. begin
  756. If (Fvariables=AValue) then exit;
  757. Fvariables:=AValue;
  758. MarkPropertyChanged(AIndex);
  759. end;
  760. Procedure TListVariablesResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
  761. begin
  762. If (FnextPageToken=AValue) then exit;
  763. FnextPageToken:=AValue;
  764. MarkPropertyChanged(AIndex);
  765. end;
  766. //2.6.4. bug workaround
  767. {$IFDEF VER2_6}
  768. Procedure TListVariablesResponse.SetArrayLength(Const AName : String; ALength : Longint);
  769. begin
  770. Case AName of
  771. 'variables' : SetLength(Fvariables,ALength);
  772. else
  773. Inherited SetArrayLength(AName,ALength);
  774. end;
  775. end;
  776. {$ENDIF VER2_6}
  777. { --------------------------------------------------------------------
  778. TProjectsConfigsVariablesResource
  779. --------------------------------------------------------------------}
  780. Class Function TProjectsConfigsVariablesResource.ResourceName : String;
  781. begin
  782. Result:='variables';
  783. end;
  784. Class Function TProjectsConfigsVariablesResource.DefaultAPI : TGoogleAPIClass;
  785. begin
  786. Result:=TruntimeconfigAPI;
  787. end;
  788. Function TProjectsConfigsVariablesResource.Watch(_name: string; aWatchVariableRequest : TWatchVariableRequest) : TVariable;
  789. Const
  790. _HTTPMethod = 'POST';
  791. _Path = 'v1beta1/{+name}:watch';
  792. _Methodid = 'runtimeconfig.projects.configs.variables.watch';
  793. Var
  794. _P : String;
  795. begin
  796. _P:=SubstitutePath(_Path,['name',_name]);
  797. Result:=ServiceCall(_HTTPMethod,_P,'',aWatchVariableRequest,TVariable) as TVariable;
  798. end;
  799. Function TProjectsConfigsVariablesResource.List(parent: string; AQuery : string = '') : TListVariablesResponse;
  800. Const
  801. _HTTPMethod = 'GET';
  802. _Path = 'v1beta1/{+parent}/variables';
  803. _Methodid = 'runtimeconfig.projects.configs.variables.list';
  804. Var
  805. _P : String;
  806. begin
  807. _P:=SubstitutePath(_Path,['parent',parent]);
  808. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListVariablesResponse) as TListVariablesResponse;
  809. end;
  810. Function TProjectsConfigsVariablesResource.List(parent: string; AQuery : TProjectsConfigsVariableslistOptions) : TListVariablesResponse;
  811. Var
  812. _Q : String;
  813. begin
  814. _Q:='';
  815. AddToQuery(_Q,'pageSize',AQuery.pageSize);
  816. AddToQuery(_Q,'filter',AQuery.filter);
  817. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  818. Result:=List(parent,_Q);
  819. end;
  820. Function TProjectsConfigsVariablesResource.Get(_name: string) : TVariable;
  821. Const
  822. _HTTPMethod = 'GET';
  823. _Path = 'v1beta1/{+name}';
  824. _Methodid = 'runtimeconfig.projects.configs.variables.get';
  825. Var
  826. _P : String;
  827. begin
  828. _P:=SubstitutePath(_Path,['name',_name]);
  829. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TVariable) as TVariable;
  830. end;
  831. Function TProjectsConfigsVariablesResource.Create(parent: string; aVariable : TVariable) : TVariable;
  832. Const
  833. _HTTPMethod = 'POST';
  834. _Path = 'v1beta1/{+parent}/variables';
  835. _Methodid = 'runtimeconfig.projects.configs.variables.create';
  836. Var
  837. _P : String;
  838. begin
  839. _P:=SubstitutePath(_Path,['parent',parent]);
  840. Result:=ServiceCall(_HTTPMethod,_P,'',aVariable,TVariable) as TVariable;
  841. end;
  842. Function TProjectsConfigsVariablesResource.Update(_name: string; aVariable : TVariable) : TVariable;
  843. Const
  844. _HTTPMethod = 'PUT';
  845. _Path = 'v1beta1/{+name}';
  846. _Methodid = 'runtimeconfig.projects.configs.variables.update';
  847. Var
  848. _P : String;
  849. begin
  850. _P:=SubstitutePath(_Path,['name',_name]);
  851. Result:=ServiceCall(_HTTPMethod,_P,'',aVariable,TVariable) as TVariable;
  852. end;
  853. Function TProjectsConfigsVariablesResource.Delete(_name: string; AQuery : string = '') : TEmpty;
  854. Const
  855. _HTTPMethod = 'DELETE';
  856. _Path = 'v1beta1/{+name}';
  857. _Methodid = 'runtimeconfig.projects.configs.variables.delete';
  858. Var
  859. _P : String;
  860. begin
  861. _P:=SubstitutePath(_Path,['name',_name]);
  862. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TEmpty) as TEmpty;
  863. end;
  864. Function TProjectsConfigsVariablesResource.Delete(_name: string; AQuery : TProjectsConfigsVariablesdeleteOptions) : TEmpty;
  865. Var
  866. _Q : String;
  867. begin
  868. _Q:='';
  869. AddToQuery(_Q,'recursive',AQuery.recursive);
  870. Result:=Delete(_name,_Q);
  871. end;
  872. { --------------------------------------------------------------------
  873. TProjectsConfigsWaitersResource
  874. --------------------------------------------------------------------}
  875. Class Function TProjectsConfigsWaitersResource.ResourceName : String;
  876. begin
  877. Result:='waiters';
  878. end;
  879. Class Function TProjectsConfigsWaitersResource.DefaultAPI : TGoogleAPIClass;
  880. begin
  881. Result:=TruntimeconfigAPI;
  882. end;
  883. Function TProjectsConfigsWaitersResource.Get(_name: string) : TWaiter;
  884. Const
  885. _HTTPMethod = 'GET';
  886. _Path = 'v1beta1/{+name}';
  887. _Methodid = 'runtimeconfig.projects.configs.waiters.get';
  888. Var
  889. _P : String;
  890. begin
  891. _P:=SubstitutePath(_Path,['name',_name]);
  892. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TWaiter) as TWaiter;
  893. end;
  894. Function TProjectsConfigsWaitersResource.Create(parent: string; aWaiter : TWaiter) : TOperation;
  895. Const
  896. _HTTPMethod = 'POST';
  897. _Path = 'v1beta1/{+parent}/waiters';
  898. _Methodid = 'runtimeconfig.projects.configs.waiters.create';
  899. Var
  900. _P : String;
  901. begin
  902. _P:=SubstitutePath(_Path,['parent',parent]);
  903. Result:=ServiceCall(_HTTPMethod,_P,'',aWaiter,TOperation) as TOperation;
  904. end;
  905. Function TProjectsConfigsWaitersResource.List(parent: string; AQuery : string = '') : TListWaitersResponse;
  906. Const
  907. _HTTPMethod = 'GET';
  908. _Path = 'v1beta1/{+parent}/waiters';
  909. _Methodid = 'runtimeconfig.projects.configs.waiters.list';
  910. Var
  911. _P : String;
  912. begin
  913. _P:=SubstitutePath(_Path,['parent',parent]);
  914. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListWaitersResponse) as TListWaitersResponse;
  915. end;
  916. Function TProjectsConfigsWaitersResource.List(parent: string; AQuery : TProjectsConfigsWaiterslistOptions) : TListWaitersResponse;
  917. Var
  918. _Q : String;
  919. begin
  920. _Q:='';
  921. AddToQuery(_Q,'pageSize',AQuery.pageSize);
  922. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  923. Result:=List(parent,_Q);
  924. end;
  925. Function TProjectsConfigsWaitersResource.Delete(_name: string) : TEmpty;
  926. Const
  927. _HTTPMethod = 'DELETE';
  928. _Path = 'v1beta1/{+name}';
  929. _Methodid = 'runtimeconfig.projects.configs.waiters.delete';
  930. Var
  931. _P : String;
  932. begin
  933. _P:=SubstitutePath(_Path,['name',_name]);
  934. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
  935. end;
  936. { --------------------------------------------------------------------
  937. TProjectsConfigsOperationsResource
  938. --------------------------------------------------------------------}
  939. Class Function TProjectsConfigsOperationsResource.ResourceName : String;
  940. begin
  941. Result:='operations';
  942. end;
  943. Class Function TProjectsConfigsOperationsResource.DefaultAPI : TGoogleAPIClass;
  944. begin
  945. Result:=TruntimeconfigAPI;
  946. end;
  947. Function TProjectsConfigsOperationsResource.Get(_name: string) : TOperation;
  948. Const
  949. _HTTPMethod = 'GET';
  950. _Path = 'v1beta1/{+name}';
  951. _Methodid = 'runtimeconfig.projects.configs.operations.get';
  952. Var
  953. _P : String;
  954. begin
  955. _P:=SubstitutePath(_Path,['name',_name]);
  956. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TOperation) as TOperation;
  957. end;
  958. { --------------------------------------------------------------------
  959. TProjectsConfigsResource
  960. --------------------------------------------------------------------}
  961. Class Function TProjectsConfigsResource.ResourceName : String;
  962. begin
  963. Result:='configs';
  964. end;
  965. Class Function TProjectsConfigsResource.DefaultAPI : TGoogleAPIClass;
  966. begin
  967. Result:=TruntimeconfigAPI;
  968. end;
  969. Function TProjectsConfigsResource.Update(_name: string; aRuntimeConfig : TRuntimeConfig) : TRuntimeConfig;
  970. Const
  971. _HTTPMethod = 'PUT';
  972. _Path = 'v1beta1/{+name}';
  973. _Methodid = 'runtimeconfig.projects.configs.update';
  974. Var
  975. _P : String;
  976. begin
  977. _P:=SubstitutePath(_Path,['name',_name]);
  978. Result:=ServiceCall(_HTTPMethod,_P,'',aRuntimeConfig,TRuntimeConfig) as TRuntimeConfig;
  979. end;
  980. Function TProjectsConfigsResource.Get(_name: string) : TRuntimeConfig;
  981. Const
  982. _HTTPMethod = 'GET';
  983. _Path = 'v1beta1/{+name}';
  984. _Methodid = 'runtimeconfig.projects.configs.get';
  985. Var
  986. _P : String;
  987. begin
  988. _P:=SubstitutePath(_Path,['name',_name]);
  989. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TRuntimeConfig) as TRuntimeConfig;
  990. end;
  991. Function TProjectsConfigsResource.Create(parent: string; aRuntimeConfig : TRuntimeConfig) : TRuntimeConfig;
  992. Const
  993. _HTTPMethod = 'POST';
  994. _Path = 'v1beta1/{+parent}/configs';
  995. _Methodid = 'runtimeconfig.projects.configs.create';
  996. Var
  997. _P : String;
  998. begin
  999. _P:=SubstitutePath(_Path,['parent',parent]);
  1000. Result:=ServiceCall(_HTTPMethod,_P,'',aRuntimeConfig,TRuntimeConfig) as TRuntimeConfig;
  1001. end;
  1002. Function TProjectsConfigsResource.List(parent: string; AQuery : string = '') : TListConfigsResponse;
  1003. Const
  1004. _HTTPMethod = 'GET';
  1005. _Path = 'v1beta1/{+parent}/configs';
  1006. _Methodid = 'runtimeconfig.projects.configs.list';
  1007. Var
  1008. _P : String;
  1009. begin
  1010. _P:=SubstitutePath(_Path,['parent',parent]);
  1011. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListConfigsResponse) as TListConfigsResponse;
  1012. end;
  1013. Function TProjectsConfigsResource.List(parent: string; AQuery : TProjectsConfigslistOptions) : TListConfigsResponse;
  1014. Var
  1015. _Q : String;
  1016. begin
  1017. _Q:='';
  1018. AddToQuery(_Q,'pageSize',AQuery.pageSize);
  1019. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  1020. Result:=List(parent,_Q);
  1021. end;
  1022. Function TProjectsConfigsResource.Delete(_name: string) : TEmpty;
  1023. Const
  1024. _HTTPMethod = 'DELETE';
  1025. _Path = 'v1beta1/{+name}';
  1026. _Methodid = 'runtimeconfig.projects.configs.delete';
  1027. Var
  1028. _P : String;
  1029. begin
  1030. _P:=SubstitutePath(_Path,['name',_name]);
  1031. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
  1032. end;
  1033. Function TProjectsConfigsResource.GetVariablesInstance : TProjectsConfigsVariablesResource;
  1034. begin
  1035. if (FVariablesInstance=Nil) then
  1036. FVariablesInstance:=CreateVariablesResource;
  1037. Result:=FVariablesInstance;
  1038. end;
  1039. Function TProjectsConfigsResource.CreateVariablesResource : TProjectsConfigsVariablesResource;
  1040. begin
  1041. Result:=CreateVariablesResource(Self);
  1042. end;
  1043. Function TProjectsConfigsResource.CreateVariablesResource(AOwner : TComponent) : TProjectsConfigsVariablesResource;
  1044. begin
  1045. Result:=TProjectsConfigsVariablesResource.Create(AOwner);
  1046. Result.API:=Self.API;
  1047. end;
  1048. Function TProjectsConfigsResource.GetWaitersInstance : TProjectsConfigsWaitersResource;
  1049. begin
  1050. if (FWaitersInstance=Nil) then
  1051. FWaitersInstance:=CreateWaitersResource;
  1052. Result:=FWaitersInstance;
  1053. end;
  1054. Function TProjectsConfigsResource.CreateWaitersResource : TProjectsConfigsWaitersResource;
  1055. begin
  1056. Result:=CreateWaitersResource(Self);
  1057. end;
  1058. Function TProjectsConfigsResource.CreateWaitersResource(AOwner : TComponent) : TProjectsConfigsWaitersResource;
  1059. begin
  1060. Result:=TProjectsConfigsWaitersResource.Create(AOwner);
  1061. Result.API:=Self.API;
  1062. end;
  1063. Function TProjectsConfigsResource.GetOperationsInstance : TProjectsConfigsOperationsResource;
  1064. begin
  1065. if (FOperationsInstance=Nil) then
  1066. FOperationsInstance:=CreateOperationsResource;
  1067. Result:=FOperationsInstance;
  1068. end;
  1069. Function TProjectsConfigsResource.CreateOperationsResource : TProjectsConfigsOperationsResource;
  1070. begin
  1071. Result:=CreateOperationsResource(Self);
  1072. end;
  1073. Function TProjectsConfigsResource.CreateOperationsResource(AOwner : TComponent) : TProjectsConfigsOperationsResource;
  1074. begin
  1075. Result:=TProjectsConfigsOperationsResource.Create(AOwner);
  1076. Result.API:=Self.API;
  1077. end;
  1078. { --------------------------------------------------------------------
  1079. TProjectsResource
  1080. --------------------------------------------------------------------}
  1081. Class Function TProjectsResource.ResourceName : String;
  1082. begin
  1083. Result:='projects';
  1084. end;
  1085. Class Function TProjectsResource.DefaultAPI : TGoogleAPIClass;
  1086. begin
  1087. Result:=TruntimeconfigAPI;
  1088. end;
  1089. Function TProjectsResource.GetConfigsVariablesInstance : TProjectsConfigsVariablesResource;
  1090. begin
  1091. if (FConfigsVariablesInstance=Nil) then
  1092. FConfigsVariablesInstance:=CreateConfigsVariablesResource;
  1093. Result:=FConfigsVariablesInstance;
  1094. end;
  1095. Function TProjectsResource.CreateConfigsVariablesResource : TProjectsConfigsVariablesResource;
  1096. begin
  1097. Result:=CreateConfigsVariablesResource(Self);
  1098. end;
  1099. Function TProjectsResource.CreateConfigsVariablesResource(AOwner : TComponent) : TProjectsConfigsVariablesResource;
  1100. begin
  1101. Result:=TProjectsConfigsVariablesResource.Create(AOwner);
  1102. Result.API:=Self.API;
  1103. end;
  1104. Function TProjectsResource.GetConfigsWaitersInstance : TProjectsConfigsWaitersResource;
  1105. begin
  1106. if (FConfigsWaitersInstance=Nil) then
  1107. FConfigsWaitersInstance:=CreateConfigsWaitersResource;
  1108. Result:=FConfigsWaitersInstance;
  1109. end;
  1110. Function TProjectsResource.CreateConfigsWaitersResource : TProjectsConfigsWaitersResource;
  1111. begin
  1112. Result:=CreateConfigsWaitersResource(Self);
  1113. end;
  1114. Function TProjectsResource.CreateConfigsWaitersResource(AOwner : TComponent) : TProjectsConfigsWaitersResource;
  1115. begin
  1116. Result:=TProjectsConfigsWaitersResource.Create(AOwner);
  1117. Result.API:=Self.API;
  1118. end;
  1119. Function TProjectsResource.GetConfigsOperationsInstance : TProjectsConfigsOperationsResource;
  1120. begin
  1121. if (FConfigsOperationsInstance=Nil) then
  1122. FConfigsOperationsInstance:=CreateConfigsOperationsResource;
  1123. Result:=FConfigsOperationsInstance;
  1124. end;
  1125. Function TProjectsResource.CreateConfigsOperationsResource : TProjectsConfigsOperationsResource;
  1126. begin
  1127. Result:=CreateConfigsOperationsResource(Self);
  1128. end;
  1129. Function TProjectsResource.CreateConfigsOperationsResource(AOwner : TComponent) : TProjectsConfigsOperationsResource;
  1130. begin
  1131. Result:=TProjectsConfigsOperationsResource.Create(AOwner);
  1132. Result.API:=Self.API;
  1133. end;
  1134. Function TProjectsResource.GetConfigsInstance : TProjectsConfigsResource;
  1135. begin
  1136. if (FConfigsInstance=Nil) then
  1137. FConfigsInstance:=CreateConfigsResource;
  1138. Result:=FConfigsInstance;
  1139. end;
  1140. Function TProjectsResource.CreateConfigsResource : TProjectsConfigsResource;
  1141. begin
  1142. Result:=CreateConfigsResource(Self);
  1143. end;
  1144. Function TProjectsResource.CreateConfigsResource(AOwner : TComponent) : TProjectsConfigsResource;
  1145. begin
  1146. Result:=TProjectsConfigsResource.Create(AOwner);
  1147. Result.API:=Self.API;
  1148. end;
  1149. { --------------------------------------------------------------------
  1150. TRuntimeconfigAPI
  1151. --------------------------------------------------------------------}
  1152. Class Function TRuntimeconfigAPI.APIName : String;
  1153. begin
  1154. Result:='runtimeconfig';
  1155. end;
  1156. Class Function TRuntimeconfigAPI.APIVersion : String;
  1157. begin
  1158. Result:='v1beta1';
  1159. end;
  1160. Class Function TRuntimeconfigAPI.APIRevision : String;
  1161. begin
  1162. Result:='20160518';
  1163. end;
  1164. Class Function TRuntimeconfigAPI.APIID : String;
  1165. begin
  1166. Result:='runtimeconfig:v1beta1';
  1167. end;
  1168. Class Function TRuntimeconfigAPI.APITitle : String;
  1169. begin
  1170. Result:='Google Cloud RuntimeConfig API';
  1171. end;
  1172. Class Function TRuntimeconfigAPI.APIDescription : String;
  1173. begin
  1174. Result:='Provides capabilities for dynamic configuration and coordination for applications running on Google Cloud Platform.';
  1175. end;
  1176. Class Function TRuntimeconfigAPI.APIOwnerDomain : String;
  1177. begin
  1178. Result:='google.com';
  1179. end;
  1180. Class Function TRuntimeconfigAPI.APIOwnerName : String;
  1181. begin
  1182. Result:='Google';
  1183. end;
  1184. Class Function TRuntimeconfigAPI.APIIcon16 : String;
  1185. begin
  1186. Result:='http://www.google.com/images/icons/product/search-16.gif';
  1187. end;
  1188. Class Function TRuntimeconfigAPI.APIIcon32 : String;
  1189. begin
  1190. Result:='http://www.google.com/images/icons/product/search-32.gif';
  1191. end;
  1192. Class Function TRuntimeconfigAPI.APIdocumentationLink : String;
  1193. begin
  1194. Result:='https://cloud.google.com/deployment-manager/docs/';
  1195. end;
  1196. Class Function TRuntimeconfigAPI.APIrootUrl : string;
  1197. begin
  1198. Result:='https://runtimeconfig.googleapis.com/';
  1199. end;
  1200. Class Function TRuntimeconfigAPI.APIbasePath : string;
  1201. begin
  1202. Result:='';
  1203. end;
  1204. Class Function TRuntimeconfigAPI.APIbaseURL : String;
  1205. begin
  1206. Result:='https://runtimeconfig.googleapis.com/';
  1207. end;
  1208. Class Function TRuntimeconfigAPI.APIProtocol : string;
  1209. begin
  1210. Result:='rest';
  1211. end;
  1212. Class Function TRuntimeconfigAPI.APIservicePath : string;
  1213. begin
  1214. Result:='';
  1215. end;
  1216. Class Function TRuntimeconfigAPI.APIbatchPath : String;
  1217. begin
  1218. Result:='batch';
  1219. end;
  1220. Class Function TRuntimeconfigAPI.APIAuthScopes : TScopeInfoArray;
  1221. begin
  1222. SetLength(Result,2);
  1223. Result[0].Name:='https://www.googleapis.com/auth/cloud-platform';
  1224. Result[0].Description:='View and manage your data across Google Cloud Platform services';
  1225. Result[1].Name:='https://www.googleapis.com/auth/cloudruntimeconfig';
  1226. Result[1].Description:='Manage your Google Cloud Platform services'' runtime configuration';
  1227. end;
  1228. Class Function TRuntimeconfigAPI.APINeedsAuth : Boolean;
  1229. begin
  1230. Result:=True;
  1231. end;
  1232. Class Procedure TRuntimeconfigAPI.RegisterAPIResources;
  1233. begin
  1234. TStatusTypedetailsItem.RegisterObject;
  1235. TStatus.RegisterObject;
  1236. TListConfigsResponse.RegisterObject;
  1237. TVariable.RegisterObject;
  1238. TOperationTypemetadata.RegisterObject;
  1239. TOperationTyperesponse.RegisterObject;
  1240. TOperation.RegisterObject;
  1241. TWaiter.RegisterObject;
  1242. TRuntimeConfig.RegisterObject;
  1243. TListWaitersResponse.RegisterObject;
  1244. TEndCondition.RegisterObject;
  1245. TCardinality.RegisterObject;
  1246. TEmpty.RegisterObject;
  1247. TWatchVariableRequest.RegisterObject;
  1248. TListVariablesResponse.RegisterObject;
  1249. end;
  1250. Function TRuntimeconfigAPI.GetProjectsConfigsVariablesInstance : TProjectsConfigsVariablesResource;
  1251. begin
  1252. if (FProjectsConfigsVariablesInstance=Nil) then
  1253. FProjectsConfigsVariablesInstance:=CreateProjectsConfigsVariablesResource;
  1254. Result:=FProjectsConfigsVariablesInstance;
  1255. end;
  1256. Function TRuntimeconfigAPI.CreateProjectsConfigsVariablesResource : TProjectsConfigsVariablesResource;
  1257. begin
  1258. Result:=CreateProjectsConfigsVariablesResource(Self);
  1259. end;
  1260. Function TRuntimeconfigAPI.CreateProjectsConfigsVariablesResource(AOwner : TComponent) : TProjectsConfigsVariablesResource;
  1261. begin
  1262. Result:=TProjectsConfigsVariablesResource.Create(AOwner);
  1263. Result.API:=Self.API;
  1264. end;
  1265. Function TRuntimeconfigAPI.GetProjectsConfigsWaitersInstance : TProjectsConfigsWaitersResource;
  1266. begin
  1267. if (FProjectsConfigsWaitersInstance=Nil) then
  1268. FProjectsConfigsWaitersInstance:=CreateProjectsConfigsWaitersResource;
  1269. Result:=FProjectsConfigsWaitersInstance;
  1270. end;
  1271. Function TRuntimeconfigAPI.CreateProjectsConfigsWaitersResource : TProjectsConfigsWaitersResource;
  1272. begin
  1273. Result:=CreateProjectsConfigsWaitersResource(Self);
  1274. end;
  1275. Function TRuntimeconfigAPI.CreateProjectsConfigsWaitersResource(AOwner : TComponent) : TProjectsConfigsWaitersResource;
  1276. begin
  1277. Result:=TProjectsConfigsWaitersResource.Create(AOwner);
  1278. Result.API:=Self.API;
  1279. end;
  1280. Function TRuntimeconfigAPI.GetProjectsConfigsOperationsInstance : TProjectsConfigsOperationsResource;
  1281. begin
  1282. if (FProjectsConfigsOperationsInstance=Nil) then
  1283. FProjectsConfigsOperationsInstance:=CreateProjectsConfigsOperationsResource;
  1284. Result:=FProjectsConfigsOperationsInstance;
  1285. end;
  1286. Function TRuntimeconfigAPI.CreateProjectsConfigsOperationsResource : TProjectsConfigsOperationsResource;
  1287. begin
  1288. Result:=CreateProjectsConfigsOperationsResource(Self);
  1289. end;
  1290. Function TRuntimeconfigAPI.CreateProjectsConfigsOperationsResource(AOwner : TComponent) : TProjectsConfigsOperationsResource;
  1291. begin
  1292. Result:=TProjectsConfigsOperationsResource.Create(AOwner);
  1293. Result.API:=Self.API;
  1294. end;
  1295. Function TRuntimeconfigAPI.GetProjectsConfigsInstance : TProjectsConfigsResource;
  1296. begin
  1297. if (FProjectsConfigsInstance=Nil) then
  1298. FProjectsConfigsInstance:=CreateProjectsConfigsResource;
  1299. Result:=FProjectsConfigsInstance;
  1300. end;
  1301. Function TRuntimeconfigAPI.CreateProjectsConfigsResource : TProjectsConfigsResource;
  1302. begin
  1303. Result:=CreateProjectsConfigsResource(Self);
  1304. end;
  1305. Function TRuntimeconfigAPI.CreateProjectsConfigsResource(AOwner : TComponent) : TProjectsConfigsResource;
  1306. begin
  1307. Result:=TProjectsConfigsResource.Create(AOwner);
  1308. Result.API:=Self.API;
  1309. end;
  1310. Function TRuntimeconfigAPI.GetProjectsInstance : TProjectsResource;
  1311. begin
  1312. if (FProjectsInstance=Nil) then
  1313. FProjectsInstance:=CreateProjectsResource;
  1314. Result:=FProjectsInstance;
  1315. end;
  1316. Function TRuntimeconfigAPI.CreateProjectsResource : TProjectsResource;
  1317. begin
  1318. Result:=CreateProjectsResource(Self);
  1319. end;
  1320. Function TRuntimeconfigAPI.CreateProjectsResource(AOwner : TComponent) : TProjectsResource;
  1321. begin
  1322. Result:=TProjectsResource.Create(AOwner);
  1323. Result.API:=Self.API;
  1324. end;
  1325. initialization
  1326. TRuntimeconfigAPI.RegisterAPI;
  1327. end.