googlecloudmonitoring.pp 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952
  1. unit googlecloudmonitoring;
  2. {
  3. **********************************************************************
  4. This file is part of the Free Component Library (FCL)
  5. Copyright (c) 2015 The free pascal team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************
  12. }
  13. //Generated on: 16-5-15 08:53:00
  14. {$MODE objfpc}
  15. {$H+}
  16. interface
  17. uses sysutils, classes, googleservice, restbase, googlebase;
  18. type
  19. //Top-level schema types
  20. TDeleteMetricDescriptorResponse = Class;
  21. TListMetricDescriptorsRequest = Class;
  22. TListMetricDescriptorsResponse = Class;
  23. TListTimeseriesDescriptorsRequest = Class;
  24. TListTimeseriesDescriptorsResponse = Class;
  25. TListTimeseriesRequest = Class;
  26. TListTimeseriesResponse = Class;
  27. TMetricDescriptor = Class;
  28. TMetricDescriptorLabelDescriptor = Class;
  29. TMetricDescriptorTypeDescriptor = Class;
  30. TPoint = Class;
  31. TPointDistribution = Class;
  32. TPointDistributionBucket = Class;
  33. TPointDistributionOverflowBucket = Class;
  34. TPointDistributionUnderflowBucket = Class;
  35. TTimeseries = Class;
  36. TTimeseriesDescriptor = Class;
  37. TTimeseriesDescriptorLabel = Class;
  38. TTimeseriesPoint = Class;
  39. TWriteTimeseriesRequest = Class;
  40. TWriteTimeseriesResponse = Class;
  41. TDeleteMetricDescriptorResponseArray = Array of TDeleteMetricDescriptorResponse;
  42. TListMetricDescriptorsRequestArray = Array of TListMetricDescriptorsRequest;
  43. TListMetricDescriptorsResponseArray = Array of TListMetricDescriptorsResponse;
  44. TListTimeseriesDescriptorsRequestArray = Array of TListTimeseriesDescriptorsRequest;
  45. TListTimeseriesDescriptorsResponseArray = Array of TListTimeseriesDescriptorsResponse;
  46. TListTimeseriesRequestArray = Array of TListTimeseriesRequest;
  47. TListTimeseriesResponseArray = Array of TListTimeseriesResponse;
  48. TMetricDescriptorArray = Array of TMetricDescriptor;
  49. TMetricDescriptorLabelDescriptorArray = Array of TMetricDescriptorLabelDescriptor;
  50. TMetricDescriptorTypeDescriptorArray = Array of TMetricDescriptorTypeDescriptor;
  51. TPointArray = Array of TPoint;
  52. TPointDistributionArray = Array of TPointDistribution;
  53. TPointDistributionBucketArray = Array of TPointDistributionBucket;
  54. TPointDistributionOverflowBucketArray = Array of TPointDistributionOverflowBucket;
  55. TPointDistributionUnderflowBucketArray = Array of TPointDistributionUnderflowBucket;
  56. TTimeseriesArray = Array of TTimeseries;
  57. TTimeseriesDescriptorArray = Array of TTimeseriesDescriptor;
  58. TTimeseriesDescriptorLabelArray = Array of TTimeseriesDescriptorLabel;
  59. TTimeseriesPointArray = Array of TTimeseriesPoint;
  60. TWriteTimeseriesRequestArray = Array of TWriteTimeseriesRequest;
  61. TWriteTimeseriesResponseArray = Array of TWriteTimeseriesResponse;
  62. //Anonymous types, using auto-generated names
  63. TTimeseriesDescriptorTypelabels = Class;
  64. TWriteTimeseriesRequestTypecommonLabels = Class;
  65. TListMetricDescriptorsResponseTypemetricsArray = Array of TMetricDescriptor;
  66. TListTimeseriesDescriptorsResponseTypetimeseriesArray = Array of TTimeseriesDescriptor;
  67. TListTimeseriesResponseTypetimeseriesArray = Array of TTimeseries;
  68. TMetricDescriptorTypelabelsArray = Array of TMetricDescriptorLabelDescriptor;
  69. TPointDistributionTypebucketsArray = Array of TPointDistributionBucket;
  70. TTimeseriesTypepointsArray = Array of TPoint;
  71. TWriteTimeseriesRequestTypetimeseriesArray = Array of TTimeseriesPoint;
  72. { --------------------------------------------------------------------
  73. TDeleteMetricDescriptorResponse
  74. --------------------------------------------------------------------}
  75. TDeleteMetricDescriptorResponse = Class(TGoogleBaseObject)
  76. Private
  77. Fkind : String;
  78. Protected
  79. //Property setters
  80. Procedure Setkind(AIndex : Integer; AValue : String); virtual;
  81. Public
  82. Published
  83. Property kind : String Index 0 Read Fkind Write Setkind;
  84. end;
  85. TDeleteMetricDescriptorResponseClass = Class of TDeleteMetricDescriptorResponse;
  86. { --------------------------------------------------------------------
  87. TListMetricDescriptorsRequest
  88. --------------------------------------------------------------------}
  89. TListMetricDescriptorsRequest = Class(TGoogleBaseObject)
  90. Private
  91. Fkind : String;
  92. Protected
  93. //Property setters
  94. Procedure Setkind(AIndex : Integer; AValue : String); virtual;
  95. Public
  96. Published
  97. Property kind : String Index 0 Read Fkind Write Setkind;
  98. end;
  99. TListMetricDescriptorsRequestClass = Class of TListMetricDescriptorsRequest;
  100. { --------------------------------------------------------------------
  101. TListMetricDescriptorsResponse
  102. --------------------------------------------------------------------}
  103. TListMetricDescriptorsResponse = Class(TGoogleBaseObject)
  104. Private
  105. Fkind : String;
  106. Fmetrics : TListMetricDescriptorsResponseTypemetricsArray;
  107. FnextPageToken : String;
  108. Protected
  109. //Property setters
  110. Procedure Setkind(AIndex : Integer; AValue : String); virtual;
  111. Procedure Setmetrics(AIndex : Integer; AValue : TListMetricDescriptorsResponseTypemetricsArray); virtual;
  112. Procedure SetnextPageToken(AIndex : Integer; AValue : String); virtual;
  113. //2.6.4. bug workaround
  114. {$IFDEF VER2_6}
  115. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  116. {$ENDIF VER2_6}
  117. Public
  118. Published
  119. Property kind : String Index 0 Read Fkind Write Setkind;
  120. Property metrics : TListMetricDescriptorsResponseTypemetricsArray Index 8 Read Fmetrics Write Setmetrics;
  121. Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
  122. end;
  123. TListMetricDescriptorsResponseClass = Class of TListMetricDescriptorsResponse;
  124. { --------------------------------------------------------------------
  125. TListTimeseriesDescriptorsRequest
  126. --------------------------------------------------------------------}
  127. TListTimeseriesDescriptorsRequest = Class(TGoogleBaseObject)
  128. Private
  129. Fkind : String;
  130. Protected
  131. //Property setters
  132. Procedure Setkind(AIndex : Integer; AValue : String); virtual;
  133. Public
  134. Published
  135. Property kind : String Index 0 Read Fkind Write Setkind;
  136. end;
  137. TListTimeseriesDescriptorsRequestClass = Class of TListTimeseriesDescriptorsRequest;
  138. { --------------------------------------------------------------------
  139. TListTimeseriesDescriptorsResponse
  140. --------------------------------------------------------------------}
  141. TListTimeseriesDescriptorsResponse = Class(TGoogleBaseObject)
  142. Private
  143. Fkind : String;
  144. FnextPageToken : String;
  145. Foldest : TDatetime;
  146. Ftimeseries : TListTimeseriesDescriptorsResponseTypetimeseriesArray;
  147. Fyoungest : TDatetime;
  148. Protected
  149. //Property setters
  150. Procedure Setkind(AIndex : Integer; AValue : String); virtual;
  151. Procedure SetnextPageToken(AIndex : Integer; AValue : String); virtual;
  152. Procedure Setoldest(AIndex : Integer; AValue : TDatetime); virtual;
  153. Procedure Settimeseries(AIndex : Integer; AValue : TListTimeseriesDescriptorsResponseTypetimeseriesArray); virtual;
  154. Procedure Setyoungest(AIndex : Integer; AValue : TDatetime); virtual;
  155. //2.6.4. bug workaround
  156. {$IFDEF VER2_6}
  157. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  158. {$ENDIF VER2_6}
  159. Public
  160. Published
  161. Property kind : String Index 0 Read Fkind Write Setkind;
  162. Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
  163. Property oldest : TDatetime Index 16 Read Foldest Write Setoldest;
  164. Property timeseries : TListTimeseriesDescriptorsResponseTypetimeseriesArray Index 24 Read Ftimeseries Write Settimeseries;
  165. Property youngest : TDatetime Index 32 Read Fyoungest Write Setyoungest;
  166. end;
  167. TListTimeseriesDescriptorsResponseClass = Class of TListTimeseriesDescriptorsResponse;
  168. { --------------------------------------------------------------------
  169. TListTimeseriesRequest
  170. --------------------------------------------------------------------}
  171. TListTimeseriesRequest = Class(TGoogleBaseObject)
  172. Private
  173. Fkind : String;
  174. Protected
  175. //Property setters
  176. Procedure Setkind(AIndex : Integer; AValue : String); virtual;
  177. Public
  178. Published
  179. Property kind : String Index 0 Read Fkind Write Setkind;
  180. end;
  181. TListTimeseriesRequestClass = Class of TListTimeseriesRequest;
  182. { --------------------------------------------------------------------
  183. TListTimeseriesResponse
  184. --------------------------------------------------------------------}
  185. TListTimeseriesResponse = Class(TGoogleBaseObject)
  186. Private
  187. Fkind : String;
  188. FnextPageToken : String;
  189. Foldest : TDatetime;
  190. Ftimeseries : TListTimeseriesResponseTypetimeseriesArray;
  191. Fyoungest : TDatetime;
  192. Protected
  193. //Property setters
  194. Procedure Setkind(AIndex : Integer; AValue : String); virtual;
  195. Procedure SetnextPageToken(AIndex : Integer; AValue : String); virtual;
  196. Procedure Setoldest(AIndex : Integer; AValue : TDatetime); virtual;
  197. Procedure Settimeseries(AIndex : Integer; AValue : TListTimeseriesResponseTypetimeseriesArray); virtual;
  198. Procedure Setyoungest(AIndex : Integer; AValue : TDatetime); virtual;
  199. //2.6.4. bug workaround
  200. {$IFDEF VER2_6}
  201. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  202. {$ENDIF VER2_6}
  203. Public
  204. Published
  205. Property kind : String Index 0 Read Fkind Write Setkind;
  206. Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
  207. Property oldest : TDatetime Index 16 Read Foldest Write Setoldest;
  208. Property timeseries : TListTimeseriesResponseTypetimeseriesArray Index 24 Read Ftimeseries Write Settimeseries;
  209. Property youngest : TDatetime Index 32 Read Fyoungest Write Setyoungest;
  210. end;
  211. TListTimeseriesResponseClass = Class of TListTimeseriesResponse;
  212. { --------------------------------------------------------------------
  213. TMetricDescriptor
  214. --------------------------------------------------------------------}
  215. TMetricDescriptor = Class(TGoogleBaseObject)
  216. Private
  217. Fdescription : String;
  218. Flabels : TMetricDescriptorTypelabelsArray;
  219. Fname : String;
  220. Fproject : String;
  221. FtypeDescriptor : TMetricDescriptorTypeDescriptor;
  222. Protected
  223. //Property setters
  224. Procedure Setdescription(AIndex : Integer; AValue : String); virtual;
  225. Procedure Setlabels(AIndex : Integer; AValue : TMetricDescriptorTypelabelsArray); virtual;
  226. Procedure Setname(AIndex : Integer; AValue : String); virtual;
  227. Procedure Setproject(AIndex : Integer; AValue : String); virtual;
  228. Procedure SettypeDescriptor(AIndex : Integer; AValue : TMetricDescriptorTypeDescriptor); virtual;
  229. //2.6.4. bug workaround
  230. {$IFDEF VER2_6}
  231. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  232. {$ENDIF VER2_6}
  233. Public
  234. Published
  235. Property description : String Index 0 Read Fdescription Write Setdescription;
  236. Property labels : TMetricDescriptorTypelabelsArray Index 8 Read Flabels Write Setlabels;
  237. Property name : String Index 16 Read Fname Write Setname;
  238. Property project : String Index 24 Read Fproject Write Setproject;
  239. Property typeDescriptor : TMetricDescriptorTypeDescriptor Index 32 Read FtypeDescriptor Write SettypeDescriptor;
  240. end;
  241. TMetricDescriptorClass = Class of TMetricDescriptor;
  242. { --------------------------------------------------------------------
  243. TMetricDescriptorLabelDescriptor
  244. --------------------------------------------------------------------}
  245. TMetricDescriptorLabelDescriptor = Class(TGoogleBaseObject)
  246. Private
  247. Fdescription : String;
  248. Fkey : String;
  249. Protected
  250. //Property setters
  251. Procedure Setdescription(AIndex : Integer; AValue : String); virtual;
  252. Procedure Setkey(AIndex : Integer; AValue : String); virtual;
  253. Public
  254. Published
  255. Property description : String Index 0 Read Fdescription Write Setdescription;
  256. Property key : String Index 8 Read Fkey Write Setkey;
  257. end;
  258. TMetricDescriptorLabelDescriptorClass = Class of TMetricDescriptorLabelDescriptor;
  259. { --------------------------------------------------------------------
  260. TMetricDescriptorTypeDescriptor
  261. --------------------------------------------------------------------}
  262. TMetricDescriptorTypeDescriptor = Class(TGoogleBaseObject)
  263. Private
  264. FmetricType : String;
  265. FvalueType : String;
  266. Protected
  267. //Property setters
  268. Procedure SetmetricType(AIndex : Integer; AValue : String); virtual;
  269. Procedure SetvalueType(AIndex : Integer; AValue : String); virtual;
  270. Public
  271. Published
  272. Property metricType : String Index 0 Read FmetricType Write SetmetricType;
  273. Property valueType : String Index 8 Read FvalueType Write SetvalueType;
  274. end;
  275. TMetricDescriptorTypeDescriptorClass = Class of TMetricDescriptorTypeDescriptor;
  276. { --------------------------------------------------------------------
  277. TPoint
  278. --------------------------------------------------------------------}
  279. TPoint = Class(TGoogleBaseObject)
  280. Private
  281. FboolValue : boolean;
  282. FdistributionValue : TPointDistribution;
  283. FdoubleValue : double;
  284. F_end : TDatetime;
  285. Fint64Value : String;
  286. Fstart : TDatetime;
  287. FstringValue : String;
  288. Protected
  289. Class Function ExportPropertyName(Const AName : String) : string; override;
  290. //Property setters
  291. Procedure SetboolValue(AIndex : Integer; AValue : boolean); virtual;
  292. Procedure SetdistributionValue(AIndex : Integer; AValue : TPointDistribution); virtual;
  293. Procedure SetdoubleValue(AIndex : Integer; AValue : double); virtual;
  294. Procedure Set_end(AIndex : Integer; AValue : TDatetime); virtual;
  295. Procedure Setint64Value(AIndex : Integer; AValue : String); virtual;
  296. Procedure Setstart(AIndex : Integer; AValue : TDatetime); virtual;
  297. Procedure SetstringValue(AIndex : Integer; AValue : String); virtual;
  298. Public
  299. Published
  300. Property boolValue : boolean Index 0 Read FboolValue Write SetboolValue;
  301. Property distributionValue : TPointDistribution Index 8 Read FdistributionValue Write SetdistributionValue;
  302. Property doubleValue : double Index 16 Read FdoubleValue Write SetdoubleValue;
  303. Property _end : TDatetime Index 24 Read F_end Write Set_end;
  304. Property int64Value : String Index 32 Read Fint64Value Write Setint64Value;
  305. Property start : TDatetime Index 40 Read Fstart Write Setstart;
  306. Property stringValue : String Index 48 Read FstringValue Write SetstringValue;
  307. end;
  308. TPointClass = Class of TPoint;
  309. { --------------------------------------------------------------------
  310. TPointDistribution
  311. --------------------------------------------------------------------}
  312. TPointDistribution = Class(TGoogleBaseObject)
  313. Private
  314. Fbuckets : TPointDistributionTypebucketsArray;
  315. FoverflowBucket : TPointDistributionOverflowBucket;
  316. FunderflowBucket : TPointDistributionUnderflowBucket;
  317. Protected
  318. //Property setters
  319. Procedure Setbuckets(AIndex : Integer; AValue : TPointDistributionTypebucketsArray); virtual;
  320. Procedure SetoverflowBucket(AIndex : Integer; AValue : TPointDistributionOverflowBucket); virtual;
  321. Procedure SetunderflowBucket(AIndex : Integer; AValue : TPointDistributionUnderflowBucket); virtual;
  322. //2.6.4. bug workaround
  323. {$IFDEF VER2_6}
  324. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  325. {$ENDIF VER2_6}
  326. Public
  327. Published
  328. Property buckets : TPointDistributionTypebucketsArray Index 0 Read Fbuckets Write Setbuckets;
  329. Property overflowBucket : TPointDistributionOverflowBucket Index 8 Read FoverflowBucket Write SetoverflowBucket;
  330. Property underflowBucket : TPointDistributionUnderflowBucket Index 16 Read FunderflowBucket Write SetunderflowBucket;
  331. end;
  332. TPointDistributionClass = Class of TPointDistribution;
  333. { --------------------------------------------------------------------
  334. TPointDistributionBucket
  335. --------------------------------------------------------------------}
  336. TPointDistributionBucket = Class(TGoogleBaseObject)
  337. Private
  338. Fcount : String;
  339. FlowerBound : double;
  340. FupperBound : double;
  341. Protected
  342. //Property setters
  343. Procedure Setcount(AIndex : Integer; AValue : String); virtual;
  344. Procedure SetlowerBound(AIndex : Integer; AValue : double); virtual;
  345. Procedure SetupperBound(AIndex : Integer; AValue : double); virtual;
  346. Public
  347. Published
  348. Property count : String Index 0 Read Fcount Write Setcount;
  349. Property lowerBound : double Index 8 Read FlowerBound Write SetlowerBound;
  350. Property upperBound : double Index 16 Read FupperBound Write SetupperBound;
  351. end;
  352. TPointDistributionBucketClass = Class of TPointDistributionBucket;
  353. { --------------------------------------------------------------------
  354. TPointDistributionOverflowBucket
  355. --------------------------------------------------------------------}
  356. TPointDistributionOverflowBucket = Class(TGoogleBaseObject)
  357. Private
  358. Fcount : String;
  359. FlowerBound : double;
  360. Protected
  361. //Property setters
  362. Procedure Setcount(AIndex : Integer; AValue : String); virtual;
  363. Procedure SetlowerBound(AIndex : Integer; AValue : double); virtual;
  364. Public
  365. Published
  366. Property count : String Index 0 Read Fcount Write Setcount;
  367. Property lowerBound : double Index 8 Read FlowerBound Write SetlowerBound;
  368. end;
  369. TPointDistributionOverflowBucketClass = Class of TPointDistributionOverflowBucket;
  370. { --------------------------------------------------------------------
  371. TPointDistributionUnderflowBucket
  372. --------------------------------------------------------------------}
  373. TPointDistributionUnderflowBucket = Class(TGoogleBaseObject)
  374. Private
  375. Fcount : String;
  376. FupperBound : double;
  377. Protected
  378. //Property setters
  379. Procedure Setcount(AIndex : Integer; AValue : String); virtual;
  380. Procedure SetupperBound(AIndex : Integer; AValue : double); virtual;
  381. Public
  382. Published
  383. Property count : String Index 0 Read Fcount Write Setcount;
  384. Property upperBound : double Index 8 Read FupperBound Write SetupperBound;
  385. end;
  386. TPointDistributionUnderflowBucketClass = Class of TPointDistributionUnderflowBucket;
  387. { --------------------------------------------------------------------
  388. TTimeseries
  389. --------------------------------------------------------------------}
  390. TTimeseries = Class(TGoogleBaseObject)
  391. Private
  392. Fpoints : TTimeseriesTypepointsArray;
  393. FtimeseriesDesc : TTimeseriesDescriptor;
  394. Protected
  395. //Property setters
  396. Procedure Setpoints(AIndex : Integer; AValue : TTimeseriesTypepointsArray); virtual;
  397. Procedure SettimeseriesDesc(AIndex : Integer; AValue : TTimeseriesDescriptor); virtual;
  398. //2.6.4. bug workaround
  399. {$IFDEF VER2_6}
  400. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  401. {$ENDIF VER2_6}
  402. Public
  403. Published
  404. Property points : TTimeseriesTypepointsArray Index 0 Read Fpoints Write Setpoints;
  405. Property timeseriesDesc : TTimeseriesDescriptor Index 8 Read FtimeseriesDesc Write SettimeseriesDesc;
  406. end;
  407. TTimeseriesClass = Class of TTimeseries;
  408. { --------------------------------------------------------------------
  409. TTimeseriesDescriptorTypelabels
  410. --------------------------------------------------------------------}
  411. TTimeseriesDescriptorTypelabels = Class(TGoogleBaseObject)
  412. Private
  413. Protected
  414. //Property setters
  415. Public
  416. Class Function AllowAdditionalProperties : Boolean; override;
  417. Published
  418. end;
  419. TTimeseriesDescriptorTypelabelsClass = Class of TTimeseriesDescriptorTypelabels;
  420. { --------------------------------------------------------------------
  421. TTimeseriesDescriptor
  422. --------------------------------------------------------------------}
  423. TTimeseriesDescriptor = Class(TGoogleBaseObject)
  424. Private
  425. Flabels : TTimeseriesDescriptorTypelabels;
  426. Fmetric : String;
  427. Fproject : String;
  428. Protected
  429. //Property setters
  430. Procedure Setlabels(AIndex : Integer; AValue : TTimeseriesDescriptorTypelabels); virtual;
  431. Procedure Setmetric(AIndex : Integer; AValue : String); virtual;
  432. Procedure Setproject(AIndex : Integer; AValue : String); virtual;
  433. Public
  434. Published
  435. Property labels : TTimeseriesDescriptorTypelabels Index 0 Read Flabels Write Setlabels;
  436. Property metric : String Index 8 Read Fmetric Write Setmetric;
  437. Property project : String Index 16 Read Fproject Write Setproject;
  438. end;
  439. TTimeseriesDescriptorClass = Class of TTimeseriesDescriptor;
  440. { --------------------------------------------------------------------
  441. TTimeseriesDescriptorLabel
  442. --------------------------------------------------------------------}
  443. TTimeseriesDescriptorLabel = Class(TGoogleBaseObject)
  444. Private
  445. Fkey : String;
  446. Fvalue : String;
  447. Protected
  448. //Property setters
  449. Procedure Setkey(AIndex : Integer; AValue : String); virtual;
  450. Procedure Setvalue(AIndex : Integer; AValue : String); virtual;
  451. Public
  452. Published
  453. Property key : String Index 0 Read Fkey Write Setkey;
  454. Property value : String Index 8 Read Fvalue Write Setvalue;
  455. end;
  456. TTimeseriesDescriptorLabelClass = Class of TTimeseriesDescriptorLabel;
  457. { --------------------------------------------------------------------
  458. TTimeseriesPoint
  459. --------------------------------------------------------------------}
  460. TTimeseriesPoint = Class(TGoogleBaseObject)
  461. Private
  462. Fpoint : TPoint;
  463. FtimeseriesDesc : TTimeseriesDescriptor;
  464. Protected
  465. //Property setters
  466. Procedure Setpoint(AIndex : Integer; AValue : TPoint); virtual;
  467. Procedure SettimeseriesDesc(AIndex : Integer; AValue : TTimeseriesDescriptor); virtual;
  468. Public
  469. Published
  470. Property point : TPoint Index 0 Read Fpoint Write Setpoint;
  471. Property timeseriesDesc : TTimeseriesDescriptor Index 8 Read FtimeseriesDesc Write SettimeseriesDesc;
  472. end;
  473. TTimeseriesPointClass = Class of TTimeseriesPoint;
  474. { --------------------------------------------------------------------
  475. TWriteTimeseriesRequestTypecommonLabels
  476. --------------------------------------------------------------------}
  477. TWriteTimeseriesRequestTypecommonLabels = Class(TGoogleBaseObject)
  478. Private
  479. Protected
  480. //Property setters
  481. Public
  482. Class Function AllowAdditionalProperties : Boolean; override;
  483. Published
  484. end;
  485. TWriteTimeseriesRequestTypecommonLabelsClass = Class of TWriteTimeseriesRequestTypecommonLabels;
  486. { --------------------------------------------------------------------
  487. TWriteTimeseriesRequest
  488. --------------------------------------------------------------------}
  489. TWriteTimeseriesRequest = Class(TGoogleBaseObject)
  490. Private
  491. FcommonLabels : TWriteTimeseriesRequestTypecommonLabels;
  492. Ftimeseries : TWriteTimeseriesRequestTypetimeseriesArray;
  493. Protected
  494. //Property setters
  495. Procedure SetcommonLabels(AIndex : Integer; AValue : TWriteTimeseriesRequestTypecommonLabels); virtual;
  496. Procedure Settimeseries(AIndex : Integer; AValue : TWriteTimeseriesRequestTypetimeseriesArray); virtual;
  497. //2.6.4. bug workaround
  498. {$IFDEF VER2_6}
  499. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  500. {$ENDIF VER2_6}
  501. Public
  502. Published
  503. Property commonLabels : TWriteTimeseriesRequestTypecommonLabels Index 0 Read FcommonLabels Write SetcommonLabels;
  504. Property timeseries : TWriteTimeseriesRequestTypetimeseriesArray Index 8 Read Ftimeseries Write Settimeseries;
  505. end;
  506. TWriteTimeseriesRequestClass = Class of TWriteTimeseriesRequest;
  507. { --------------------------------------------------------------------
  508. TWriteTimeseriesResponse
  509. --------------------------------------------------------------------}
  510. TWriteTimeseriesResponse = Class(TGoogleBaseObject)
  511. Private
  512. Fkind : String;
  513. Protected
  514. //Property setters
  515. Procedure Setkind(AIndex : Integer; AValue : String); virtual;
  516. Public
  517. Published
  518. Property kind : String Index 0 Read Fkind Write Setkind;
  519. end;
  520. TWriteTimeseriesResponseClass = Class of TWriteTimeseriesResponse;
  521. { --------------------------------------------------------------------
  522. TMetricDescriptorsResource
  523. --------------------------------------------------------------------}
  524. //Optional query Options for TMetricDescriptorsResource, method List
  525. TMetricDescriptorsListOptions = Record
  526. count : integer;
  527. pageToken : String;
  528. query : String;
  529. end;
  530. TMetricDescriptorsResource = Class(TGoogleResource)
  531. Public
  532. Class Function ResourceName : String; override;
  533. Class Function DefaultAPI : TGoogleAPIClass; override;
  534. Function Create(project: string; aMetricDescriptor : TMetricDescriptor) : TMetricDescriptor;overload;
  535. Function Delete(metric: string; project: string) : TDeleteMetricDescriptorResponse;
  536. Function List(project: string; aListMetricDescriptorsRequest : TListMetricDescriptorsRequest; AQuery : string = '') : TListMetricDescriptorsResponse;
  537. Function List(project: string; aListMetricDescriptorsRequest : TListMetricDescriptorsRequest; AQuery : TMetricDescriptorslistOptions) : TListMetricDescriptorsResponse;
  538. end;
  539. { --------------------------------------------------------------------
  540. TTimeseriesResource
  541. --------------------------------------------------------------------}
  542. //Optional query Options for TTimeseriesResource, method List
  543. TTimeseriesListOptions = Record
  544. aggregator : String;
  545. count : integer;
  546. labels : String;
  547. oldest : String;
  548. pageToken : String;
  549. timespan : String;
  550. window : String;
  551. youngest : String;
  552. end;
  553. TTimeseriesResource = Class(TGoogleResource)
  554. Public
  555. Class Function ResourceName : String; override;
  556. Class Function DefaultAPI : TGoogleAPIClass; override;
  557. Function List(metric: string; project: string; aListTimeseriesRequest : TListTimeseriesRequest; AQuery : string = '') : TListTimeseriesResponse;
  558. Function List(metric: string; project: string; aListTimeseriesRequest : TListTimeseriesRequest; AQuery : TTimeserieslistOptions) : TListTimeseriesResponse;
  559. Function Write(project: string; aWriteTimeseriesRequest : TWriteTimeseriesRequest) : TWriteTimeseriesResponse;
  560. end;
  561. { --------------------------------------------------------------------
  562. TTimeseriesDescriptorsResource
  563. --------------------------------------------------------------------}
  564. //Optional query Options for TTimeseriesDescriptorsResource, method List
  565. TTimeseriesDescriptorsListOptions = Record
  566. aggregator : String;
  567. count : integer;
  568. labels : String;
  569. oldest : String;
  570. pageToken : String;
  571. timespan : String;
  572. window : String;
  573. youngest : String;
  574. end;
  575. TTimeseriesDescriptorsResource = Class(TGoogleResource)
  576. Public
  577. Class Function ResourceName : String; override;
  578. Class Function DefaultAPI : TGoogleAPIClass; override;
  579. Function List(metric: string; project: string; aListTimeseriesDescriptorsRequest : TListTimeseriesDescriptorsRequest; AQuery : string = '') : TListTimeseriesDescriptorsResponse;
  580. Function List(metric: string; project: string; aListTimeseriesDescriptorsRequest : TListTimeseriesDescriptorsRequest; AQuery : TTimeseriesDescriptorslistOptions) : TListTimeseriesDescriptorsResponse;
  581. end;
  582. { --------------------------------------------------------------------
  583. TCloudmonitoringAPI
  584. --------------------------------------------------------------------}
  585. TCloudmonitoringAPI = Class(TGoogleAPI)
  586. Private
  587. FMetricDescriptorsInstance : TMetricDescriptorsResource;
  588. FTimeseriesInstance : TTimeseriesResource;
  589. FTimeseriesDescriptorsInstance : TTimeseriesDescriptorsResource;
  590. Function GetMetricDescriptorsInstance : TMetricDescriptorsResource;virtual;
  591. Function GetTimeseriesInstance : TTimeseriesResource;virtual;
  592. Function GetTimeseriesDescriptorsInstance : TTimeseriesDescriptorsResource;virtual;
  593. Public
  594. //Override class functions with API info
  595. Class Function APIName : String; override;
  596. Class Function APIVersion : String; override;
  597. Class Function APIRevision : String; override;
  598. Class Function APIID : String; override;
  599. Class Function APITitle : String; override;
  600. Class Function APIDescription : String; override;
  601. Class Function APIOwnerDomain : String; override;
  602. Class Function APIOwnerName : String; override;
  603. Class Function APIIcon16 : String; override;
  604. Class Function APIIcon32 : String; override;
  605. Class Function APIdocumentationLink : String; override;
  606. Class Function APIrootUrl : string; override;
  607. Class Function APIbasePath : string;override;
  608. Class Function APIbaseURL : String;override;
  609. Class Function APIProtocol : string;override;
  610. Class Function APIservicePath : string;override;
  611. Class Function APIbatchPath : String;override;
  612. Class Function APIAuthScopes : TScopeInfoArray;override;
  613. Class Function APINeedsAuth : Boolean;override;
  614. Class Procedure RegisterAPIResources; override;
  615. //Add create function for resources
  616. Function CreateMetricDescriptorsResource(AOwner : TComponent) : TMetricDescriptorsResource;virtual;overload;
  617. Function CreateMetricDescriptorsResource : TMetricDescriptorsResource;virtual;overload;
  618. Function CreateTimeseriesResource(AOwner : TComponent) : TTimeseriesResource;virtual;overload;
  619. Function CreateTimeseriesResource : TTimeseriesResource;virtual;overload;
  620. Function CreateTimeseriesDescriptorsResource(AOwner : TComponent) : TTimeseriesDescriptorsResource;virtual;overload;
  621. Function CreateTimeseriesDescriptorsResource : TTimeseriesDescriptorsResource;virtual;overload;
  622. //Add default on-demand instances for resources
  623. Property MetricDescriptorsResource : TMetricDescriptorsResource Read GetMetricDescriptorsInstance;
  624. Property TimeseriesResource : TTimeseriesResource Read GetTimeseriesInstance;
  625. Property TimeseriesDescriptorsResource : TTimeseriesDescriptorsResource Read GetTimeseriesDescriptorsInstance;
  626. end;
  627. implementation
  628. { --------------------------------------------------------------------
  629. TDeleteMetricDescriptorResponse
  630. --------------------------------------------------------------------}
  631. Procedure TDeleteMetricDescriptorResponse.Setkind(AIndex : Integer; AValue : String);
  632. begin
  633. If (Fkind=AValue) then exit;
  634. Fkind:=AValue;
  635. MarkPropertyChanged(AIndex);
  636. end;
  637. { --------------------------------------------------------------------
  638. TListMetricDescriptorsRequest
  639. --------------------------------------------------------------------}
  640. Procedure TListMetricDescriptorsRequest.Setkind(AIndex : Integer; AValue : String);
  641. begin
  642. If (Fkind=AValue) then exit;
  643. Fkind:=AValue;
  644. MarkPropertyChanged(AIndex);
  645. end;
  646. { --------------------------------------------------------------------
  647. TListMetricDescriptorsResponse
  648. --------------------------------------------------------------------}
  649. Procedure TListMetricDescriptorsResponse.Setkind(AIndex : Integer; AValue : String);
  650. begin
  651. If (Fkind=AValue) then exit;
  652. Fkind:=AValue;
  653. MarkPropertyChanged(AIndex);
  654. end;
  655. Procedure TListMetricDescriptorsResponse.Setmetrics(AIndex : Integer; AValue : TListMetricDescriptorsResponseTypemetricsArray);
  656. begin
  657. If (Fmetrics=AValue) then exit;
  658. Fmetrics:=AValue;
  659. MarkPropertyChanged(AIndex);
  660. end;
  661. Procedure TListMetricDescriptorsResponse.SetnextPageToken(AIndex : Integer; AValue : String);
  662. begin
  663. If (FnextPageToken=AValue) then exit;
  664. FnextPageToken:=AValue;
  665. MarkPropertyChanged(AIndex);
  666. end;
  667. //2.6.4. bug workaround
  668. {$IFDEF VER2_6}
  669. Procedure TListMetricDescriptorsResponse.SetArrayLength(Const AName : String; ALength : Longint);
  670. begin
  671. Case AName of
  672. 'metrics' : SetLength(Fmetrics,ALength);
  673. else
  674. Inherited SetArrayLength(AName,ALength);
  675. end;
  676. end;
  677. {$ENDIF VER2_6}
  678. { --------------------------------------------------------------------
  679. TListTimeseriesDescriptorsRequest
  680. --------------------------------------------------------------------}
  681. Procedure TListTimeseriesDescriptorsRequest.Setkind(AIndex : Integer; AValue : String);
  682. begin
  683. If (Fkind=AValue) then exit;
  684. Fkind:=AValue;
  685. MarkPropertyChanged(AIndex);
  686. end;
  687. { --------------------------------------------------------------------
  688. TListTimeseriesDescriptorsResponse
  689. --------------------------------------------------------------------}
  690. Procedure TListTimeseriesDescriptorsResponse.Setkind(AIndex : Integer; AValue : String);
  691. begin
  692. If (Fkind=AValue) then exit;
  693. Fkind:=AValue;
  694. MarkPropertyChanged(AIndex);
  695. end;
  696. Procedure TListTimeseriesDescriptorsResponse.SetnextPageToken(AIndex : Integer; AValue : String);
  697. begin
  698. If (FnextPageToken=AValue) then exit;
  699. FnextPageToken:=AValue;
  700. MarkPropertyChanged(AIndex);
  701. end;
  702. Procedure TListTimeseriesDescriptorsResponse.Setoldest(AIndex : Integer; AValue : TDatetime);
  703. begin
  704. If (Foldest=AValue) then exit;
  705. Foldest:=AValue;
  706. MarkPropertyChanged(AIndex);
  707. end;
  708. Procedure TListTimeseriesDescriptorsResponse.Settimeseries(AIndex : Integer; AValue : TListTimeseriesDescriptorsResponseTypetimeseriesArray);
  709. begin
  710. If (Ftimeseries=AValue) then exit;
  711. Ftimeseries:=AValue;
  712. MarkPropertyChanged(AIndex);
  713. end;
  714. Procedure TListTimeseriesDescriptorsResponse.Setyoungest(AIndex : Integer; AValue : TDatetime);
  715. begin
  716. If (Fyoungest=AValue) then exit;
  717. Fyoungest:=AValue;
  718. MarkPropertyChanged(AIndex);
  719. end;
  720. //2.6.4. bug workaround
  721. {$IFDEF VER2_6}
  722. Procedure TListTimeseriesDescriptorsResponse.SetArrayLength(Const AName : String; ALength : Longint);
  723. begin
  724. Case AName of
  725. 'timeseries' : SetLength(Ftimeseries,ALength);
  726. else
  727. Inherited SetArrayLength(AName,ALength);
  728. end;
  729. end;
  730. {$ENDIF VER2_6}
  731. { --------------------------------------------------------------------
  732. TListTimeseriesRequest
  733. --------------------------------------------------------------------}
  734. Procedure TListTimeseriesRequest.Setkind(AIndex : Integer; AValue : String);
  735. begin
  736. If (Fkind=AValue) then exit;
  737. Fkind:=AValue;
  738. MarkPropertyChanged(AIndex);
  739. end;
  740. { --------------------------------------------------------------------
  741. TListTimeseriesResponse
  742. --------------------------------------------------------------------}
  743. Procedure TListTimeseriesResponse.Setkind(AIndex : Integer; AValue : String);
  744. begin
  745. If (Fkind=AValue) then exit;
  746. Fkind:=AValue;
  747. MarkPropertyChanged(AIndex);
  748. end;
  749. Procedure TListTimeseriesResponse.SetnextPageToken(AIndex : Integer; AValue : String);
  750. begin
  751. If (FnextPageToken=AValue) then exit;
  752. FnextPageToken:=AValue;
  753. MarkPropertyChanged(AIndex);
  754. end;
  755. Procedure TListTimeseriesResponse.Setoldest(AIndex : Integer; AValue : TDatetime);
  756. begin
  757. If (Foldest=AValue) then exit;
  758. Foldest:=AValue;
  759. MarkPropertyChanged(AIndex);
  760. end;
  761. Procedure TListTimeseriesResponse.Settimeseries(AIndex : Integer; AValue : TListTimeseriesResponseTypetimeseriesArray);
  762. begin
  763. If (Ftimeseries=AValue) then exit;
  764. Ftimeseries:=AValue;
  765. MarkPropertyChanged(AIndex);
  766. end;
  767. Procedure TListTimeseriesResponse.Setyoungest(AIndex : Integer; AValue : TDatetime);
  768. begin
  769. If (Fyoungest=AValue) then exit;
  770. Fyoungest:=AValue;
  771. MarkPropertyChanged(AIndex);
  772. end;
  773. //2.6.4. bug workaround
  774. {$IFDEF VER2_6}
  775. Procedure TListTimeseriesResponse.SetArrayLength(Const AName : String; ALength : Longint);
  776. begin
  777. Case AName of
  778. 'timeseries' : SetLength(Ftimeseries,ALength);
  779. else
  780. Inherited SetArrayLength(AName,ALength);
  781. end;
  782. end;
  783. {$ENDIF VER2_6}
  784. { --------------------------------------------------------------------
  785. TMetricDescriptor
  786. --------------------------------------------------------------------}
  787. Procedure TMetricDescriptor.Setdescription(AIndex : Integer; AValue : String);
  788. begin
  789. If (Fdescription=AValue) then exit;
  790. Fdescription:=AValue;
  791. MarkPropertyChanged(AIndex);
  792. end;
  793. Procedure TMetricDescriptor.Setlabels(AIndex : Integer; AValue : TMetricDescriptorTypelabelsArray);
  794. begin
  795. If (Flabels=AValue) then exit;
  796. Flabels:=AValue;
  797. MarkPropertyChanged(AIndex);
  798. end;
  799. Procedure TMetricDescriptor.Setname(AIndex : Integer; AValue : String);
  800. begin
  801. If (Fname=AValue) then exit;
  802. Fname:=AValue;
  803. MarkPropertyChanged(AIndex);
  804. end;
  805. Procedure TMetricDescriptor.Setproject(AIndex : Integer; AValue : String);
  806. begin
  807. If (Fproject=AValue) then exit;
  808. Fproject:=AValue;
  809. MarkPropertyChanged(AIndex);
  810. end;
  811. Procedure TMetricDescriptor.SettypeDescriptor(AIndex : Integer; AValue : TMetricDescriptorTypeDescriptor);
  812. begin
  813. If (FtypeDescriptor=AValue) then exit;
  814. FtypeDescriptor:=AValue;
  815. MarkPropertyChanged(AIndex);
  816. end;
  817. //2.6.4. bug workaround
  818. {$IFDEF VER2_6}
  819. Procedure TMetricDescriptor.SetArrayLength(Const AName : String; ALength : Longint);
  820. begin
  821. Case AName of
  822. 'labels' : SetLength(Flabels,ALength);
  823. else
  824. Inherited SetArrayLength(AName,ALength);
  825. end;
  826. end;
  827. {$ENDIF VER2_6}
  828. { --------------------------------------------------------------------
  829. TMetricDescriptorLabelDescriptor
  830. --------------------------------------------------------------------}
  831. Procedure TMetricDescriptorLabelDescriptor.Setdescription(AIndex : Integer; AValue : String);
  832. begin
  833. If (Fdescription=AValue) then exit;
  834. Fdescription:=AValue;
  835. MarkPropertyChanged(AIndex);
  836. end;
  837. Procedure TMetricDescriptorLabelDescriptor.Setkey(AIndex : Integer; AValue : String);
  838. begin
  839. If (Fkey=AValue) then exit;
  840. Fkey:=AValue;
  841. MarkPropertyChanged(AIndex);
  842. end;
  843. { --------------------------------------------------------------------
  844. TMetricDescriptorTypeDescriptor
  845. --------------------------------------------------------------------}
  846. Procedure TMetricDescriptorTypeDescriptor.SetmetricType(AIndex : Integer; AValue : String);
  847. begin
  848. If (FmetricType=AValue) then exit;
  849. FmetricType:=AValue;
  850. MarkPropertyChanged(AIndex);
  851. end;
  852. Procedure TMetricDescriptorTypeDescriptor.SetvalueType(AIndex : Integer; AValue : String);
  853. begin
  854. If (FvalueType=AValue) then exit;
  855. FvalueType:=AValue;
  856. MarkPropertyChanged(AIndex);
  857. end;
  858. { --------------------------------------------------------------------
  859. TPoint
  860. --------------------------------------------------------------------}
  861. Procedure TPoint.SetboolValue(AIndex : Integer; AValue : boolean);
  862. begin
  863. If (FboolValue=AValue) then exit;
  864. FboolValue:=AValue;
  865. MarkPropertyChanged(AIndex);
  866. end;
  867. Procedure TPoint.SetdistributionValue(AIndex : Integer; AValue : TPointDistribution);
  868. begin
  869. If (FdistributionValue=AValue) then exit;
  870. FdistributionValue:=AValue;
  871. MarkPropertyChanged(AIndex);
  872. end;
  873. Procedure TPoint.SetdoubleValue(AIndex : Integer; AValue : double);
  874. begin
  875. If (FdoubleValue=AValue) then exit;
  876. FdoubleValue:=AValue;
  877. MarkPropertyChanged(AIndex);
  878. end;
  879. Procedure TPoint.Set_end(AIndex : Integer; AValue : TDatetime);
  880. begin
  881. If (F_end=AValue) then exit;
  882. F_end:=AValue;
  883. MarkPropertyChanged(AIndex);
  884. end;
  885. Procedure TPoint.Setint64Value(AIndex : Integer; AValue : String);
  886. begin
  887. If (Fint64Value=AValue) then exit;
  888. Fint64Value:=AValue;
  889. MarkPropertyChanged(AIndex);
  890. end;
  891. Procedure TPoint.Setstart(AIndex : Integer; AValue : TDatetime);
  892. begin
  893. If (Fstart=AValue) then exit;
  894. Fstart:=AValue;
  895. MarkPropertyChanged(AIndex);
  896. end;
  897. Procedure TPoint.SetstringValue(AIndex : Integer; AValue : String);
  898. begin
  899. If (FstringValue=AValue) then exit;
  900. FstringValue:=AValue;
  901. MarkPropertyChanged(AIndex);
  902. end;
  903. Class Function TPoint.ExportPropertyName(Const AName : String) :String;
  904. begin
  905. Case AName of
  906. '_end' : Result:='end';
  907. else
  908. Result:=Inherited ExportPropertyName(AName);
  909. end;
  910. end;
  911. { --------------------------------------------------------------------
  912. TPointDistribution
  913. --------------------------------------------------------------------}
  914. Procedure TPointDistribution.Setbuckets(AIndex : Integer; AValue : TPointDistributionTypebucketsArray);
  915. begin
  916. If (Fbuckets=AValue) then exit;
  917. Fbuckets:=AValue;
  918. MarkPropertyChanged(AIndex);
  919. end;
  920. Procedure TPointDistribution.SetoverflowBucket(AIndex : Integer; AValue : TPointDistributionOverflowBucket);
  921. begin
  922. If (FoverflowBucket=AValue) then exit;
  923. FoverflowBucket:=AValue;
  924. MarkPropertyChanged(AIndex);
  925. end;
  926. Procedure TPointDistribution.SetunderflowBucket(AIndex : Integer; AValue : TPointDistributionUnderflowBucket);
  927. begin
  928. If (FunderflowBucket=AValue) then exit;
  929. FunderflowBucket:=AValue;
  930. MarkPropertyChanged(AIndex);
  931. end;
  932. //2.6.4. bug workaround
  933. {$IFDEF VER2_6}
  934. Procedure TPointDistribution.SetArrayLength(Const AName : String; ALength : Longint);
  935. begin
  936. Case AName of
  937. 'buckets' : SetLength(Fbuckets,ALength);
  938. else
  939. Inherited SetArrayLength(AName,ALength);
  940. end;
  941. end;
  942. {$ENDIF VER2_6}
  943. { --------------------------------------------------------------------
  944. TPointDistributionBucket
  945. --------------------------------------------------------------------}
  946. Procedure TPointDistributionBucket.Setcount(AIndex : Integer; AValue : String);
  947. begin
  948. If (Fcount=AValue) then exit;
  949. Fcount:=AValue;
  950. MarkPropertyChanged(AIndex);
  951. end;
  952. Procedure TPointDistributionBucket.SetlowerBound(AIndex : Integer; AValue : double);
  953. begin
  954. If (FlowerBound=AValue) then exit;
  955. FlowerBound:=AValue;
  956. MarkPropertyChanged(AIndex);
  957. end;
  958. Procedure TPointDistributionBucket.SetupperBound(AIndex : Integer; AValue : double);
  959. begin
  960. If (FupperBound=AValue) then exit;
  961. FupperBound:=AValue;
  962. MarkPropertyChanged(AIndex);
  963. end;
  964. { --------------------------------------------------------------------
  965. TPointDistributionOverflowBucket
  966. --------------------------------------------------------------------}
  967. Procedure TPointDistributionOverflowBucket.Setcount(AIndex : Integer; AValue : String);
  968. begin
  969. If (Fcount=AValue) then exit;
  970. Fcount:=AValue;
  971. MarkPropertyChanged(AIndex);
  972. end;
  973. Procedure TPointDistributionOverflowBucket.SetlowerBound(AIndex : Integer; AValue : double);
  974. begin
  975. If (FlowerBound=AValue) then exit;
  976. FlowerBound:=AValue;
  977. MarkPropertyChanged(AIndex);
  978. end;
  979. { --------------------------------------------------------------------
  980. TPointDistributionUnderflowBucket
  981. --------------------------------------------------------------------}
  982. Procedure TPointDistributionUnderflowBucket.Setcount(AIndex : Integer; AValue : String);
  983. begin
  984. If (Fcount=AValue) then exit;
  985. Fcount:=AValue;
  986. MarkPropertyChanged(AIndex);
  987. end;
  988. Procedure TPointDistributionUnderflowBucket.SetupperBound(AIndex : Integer; AValue : double);
  989. begin
  990. If (FupperBound=AValue) then exit;
  991. FupperBound:=AValue;
  992. MarkPropertyChanged(AIndex);
  993. end;
  994. { --------------------------------------------------------------------
  995. TTimeseries
  996. --------------------------------------------------------------------}
  997. Procedure TTimeseries.Setpoints(AIndex : Integer; AValue : TTimeseriesTypepointsArray);
  998. begin
  999. If (Fpoints=AValue) then exit;
  1000. Fpoints:=AValue;
  1001. MarkPropertyChanged(AIndex);
  1002. end;
  1003. Procedure TTimeseries.SettimeseriesDesc(AIndex : Integer; AValue : TTimeseriesDescriptor);
  1004. begin
  1005. If (FtimeseriesDesc=AValue) then exit;
  1006. FtimeseriesDesc:=AValue;
  1007. MarkPropertyChanged(AIndex);
  1008. end;
  1009. //2.6.4. bug workaround
  1010. {$IFDEF VER2_6}
  1011. Procedure TTimeseries.SetArrayLength(Const AName : String; ALength : Longint);
  1012. begin
  1013. Case AName of
  1014. 'points' : SetLength(Fpoints,ALength);
  1015. else
  1016. Inherited SetArrayLength(AName,ALength);
  1017. end;
  1018. end;
  1019. {$ENDIF VER2_6}
  1020. { --------------------------------------------------------------------
  1021. TTimeseriesDescriptorTypelabels
  1022. --------------------------------------------------------------------}
  1023. Class Function TTimeseriesDescriptorTypelabels.AllowAdditionalProperties : Boolean;
  1024. begin
  1025. Result:=True;
  1026. end;
  1027. { --------------------------------------------------------------------
  1028. TTimeseriesDescriptor
  1029. --------------------------------------------------------------------}
  1030. Procedure TTimeseriesDescriptor.Setlabels(AIndex : Integer; AValue : TTimeseriesDescriptorTypelabels);
  1031. begin
  1032. If (Flabels=AValue) then exit;
  1033. Flabels:=AValue;
  1034. MarkPropertyChanged(AIndex);
  1035. end;
  1036. Procedure TTimeseriesDescriptor.Setmetric(AIndex : Integer; AValue : String);
  1037. begin
  1038. If (Fmetric=AValue) then exit;
  1039. Fmetric:=AValue;
  1040. MarkPropertyChanged(AIndex);
  1041. end;
  1042. Procedure TTimeseriesDescriptor.Setproject(AIndex : Integer; AValue : String);
  1043. begin
  1044. If (Fproject=AValue) then exit;
  1045. Fproject:=AValue;
  1046. MarkPropertyChanged(AIndex);
  1047. end;
  1048. { --------------------------------------------------------------------
  1049. TTimeseriesDescriptorLabel
  1050. --------------------------------------------------------------------}
  1051. Procedure TTimeseriesDescriptorLabel.Setkey(AIndex : Integer; AValue : String);
  1052. begin
  1053. If (Fkey=AValue) then exit;
  1054. Fkey:=AValue;
  1055. MarkPropertyChanged(AIndex);
  1056. end;
  1057. Procedure TTimeseriesDescriptorLabel.Setvalue(AIndex : Integer; AValue : String);
  1058. begin
  1059. If (Fvalue=AValue) then exit;
  1060. Fvalue:=AValue;
  1061. MarkPropertyChanged(AIndex);
  1062. end;
  1063. { --------------------------------------------------------------------
  1064. TTimeseriesPoint
  1065. --------------------------------------------------------------------}
  1066. Procedure TTimeseriesPoint.Setpoint(AIndex : Integer; AValue : TPoint);
  1067. begin
  1068. If (Fpoint=AValue) then exit;
  1069. Fpoint:=AValue;
  1070. MarkPropertyChanged(AIndex);
  1071. end;
  1072. Procedure TTimeseriesPoint.SettimeseriesDesc(AIndex : Integer; AValue : TTimeseriesDescriptor);
  1073. begin
  1074. If (FtimeseriesDesc=AValue) then exit;
  1075. FtimeseriesDesc:=AValue;
  1076. MarkPropertyChanged(AIndex);
  1077. end;
  1078. { --------------------------------------------------------------------
  1079. TWriteTimeseriesRequestTypecommonLabels
  1080. --------------------------------------------------------------------}
  1081. Class Function TWriteTimeseriesRequestTypecommonLabels.AllowAdditionalProperties : Boolean;
  1082. begin
  1083. Result:=True;
  1084. end;
  1085. { --------------------------------------------------------------------
  1086. TWriteTimeseriesRequest
  1087. --------------------------------------------------------------------}
  1088. Procedure TWriteTimeseriesRequest.SetcommonLabels(AIndex : Integer; AValue : TWriteTimeseriesRequestTypecommonLabels);
  1089. begin
  1090. If (FcommonLabels=AValue) then exit;
  1091. FcommonLabels:=AValue;
  1092. MarkPropertyChanged(AIndex);
  1093. end;
  1094. Procedure TWriteTimeseriesRequest.Settimeseries(AIndex : Integer; AValue : TWriteTimeseriesRequestTypetimeseriesArray);
  1095. begin
  1096. If (Ftimeseries=AValue) then exit;
  1097. Ftimeseries:=AValue;
  1098. MarkPropertyChanged(AIndex);
  1099. end;
  1100. //2.6.4. bug workaround
  1101. {$IFDEF VER2_6}
  1102. Procedure TWriteTimeseriesRequest.SetArrayLength(Const AName : String; ALength : Longint);
  1103. begin
  1104. Case AName of
  1105. 'timeseries' : SetLength(Ftimeseries,ALength);
  1106. else
  1107. Inherited SetArrayLength(AName,ALength);
  1108. end;
  1109. end;
  1110. {$ENDIF VER2_6}
  1111. { --------------------------------------------------------------------
  1112. TWriteTimeseriesResponse
  1113. --------------------------------------------------------------------}
  1114. Procedure TWriteTimeseriesResponse.Setkind(AIndex : Integer; AValue : String);
  1115. begin
  1116. If (Fkind=AValue) then exit;
  1117. Fkind:=AValue;
  1118. MarkPropertyChanged(AIndex);
  1119. end;
  1120. { --------------------------------------------------------------------
  1121. TMetricDescriptorsResource
  1122. --------------------------------------------------------------------}
  1123. Class Function TMetricDescriptorsResource.ResourceName : String;
  1124. begin
  1125. Result:='metricDescriptors';
  1126. end;
  1127. Class Function TMetricDescriptorsResource.DefaultAPI : TGoogleAPIClass;
  1128. begin
  1129. Result:=TcloudmonitoringAPI;
  1130. end;
  1131. Function TMetricDescriptorsResource.Create(project: string; aMetricDescriptor : TMetricDescriptor) : TMetricDescriptor;
  1132. Const
  1133. _HTTPMethod = 'POST';
  1134. _Path = '{project}/metricDescriptors';
  1135. _Methodid = 'cloudmonitoring.metricDescriptors.create';
  1136. Var
  1137. _P : String;
  1138. begin
  1139. _P:=SubstitutePath(_Path,['project',project]);
  1140. Result:=ServiceCall(_HTTPMethod,_P,'',aMetricDescriptor,TMetricDescriptor) as TMetricDescriptor;
  1141. end;
  1142. Function TMetricDescriptorsResource.Delete(metric: string; project: string) : TDeleteMetricDescriptorResponse;
  1143. Const
  1144. _HTTPMethod = 'DELETE';
  1145. _Path = '{project}/metricDescriptors/{metric}';
  1146. _Methodid = 'cloudmonitoring.metricDescriptors.delete';
  1147. Var
  1148. _P : String;
  1149. begin
  1150. _P:=SubstitutePath(_Path,['metric',metric,'project',project]);
  1151. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TDeleteMetricDescriptorResponse) as TDeleteMetricDescriptorResponse;
  1152. end;
  1153. Function TMetricDescriptorsResource.List(project: string; aListMetricDescriptorsRequest : TListMetricDescriptorsRequest; AQuery : string = '') : TListMetricDescriptorsResponse;
  1154. Const
  1155. _HTTPMethod = 'GET';
  1156. _Path = '{project}/metricDescriptors';
  1157. _Methodid = 'cloudmonitoring.metricDescriptors.list';
  1158. Var
  1159. _P : String;
  1160. begin
  1161. _P:=SubstitutePath(_Path,['project',project]);
  1162. Result:=ServiceCall(_HTTPMethod,_P,AQuery,aListMetricDescriptorsRequest,TListMetricDescriptorsResponse) as TListMetricDescriptorsResponse;
  1163. end;
  1164. Function TMetricDescriptorsResource.List(project: string; aListMetricDescriptorsRequest : TListMetricDescriptorsRequest; AQuery : TMetricDescriptorslistOptions) : TListMetricDescriptorsResponse;
  1165. Var
  1166. _Q : String;
  1167. begin
  1168. _Q:='';
  1169. AddToQuery(_Q,'count',AQuery.count);
  1170. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  1171. AddToQuery(_Q,'query',AQuery.query);
  1172. Result:=List(project,aListMetricDescriptorsRequest,_Q);
  1173. end;
  1174. { --------------------------------------------------------------------
  1175. TTimeseriesResource
  1176. --------------------------------------------------------------------}
  1177. Class Function TTimeseriesResource.ResourceName : String;
  1178. begin
  1179. Result:='timeseries';
  1180. end;
  1181. Class Function TTimeseriesResource.DefaultAPI : TGoogleAPIClass;
  1182. begin
  1183. Result:=TcloudmonitoringAPI;
  1184. end;
  1185. Function TTimeseriesResource.List(metric: string; project: string; aListTimeseriesRequest : TListTimeseriesRequest; AQuery : string = '') : TListTimeseriesResponse;
  1186. Const
  1187. _HTTPMethod = 'GET';
  1188. _Path = '{project}/timeseries/{metric}';
  1189. _Methodid = 'cloudmonitoring.timeseries.list';
  1190. Var
  1191. _P : String;
  1192. begin
  1193. _P:=SubstitutePath(_Path,['metric',metric,'project',project]);
  1194. Result:=ServiceCall(_HTTPMethod,_P,AQuery,aListTimeseriesRequest,TListTimeseriesResponse) as TListTimeseriesResponse;
  1195. end;
  1196. Function TTimeseriesResource.List(metric: string; project: string; aListTimeseriesRequest : TListTimeseriesRequest; AQuery : TTimeserieslistOptions) : TListTimeseriesResponse;
  1197. Var
  1198. _Q : String;
  1199. begin
  1200. _Q:='';
  1201. AddToQuery(_Q,'aggregator',AQuery.aggregator);
  1202. AddToQuery(_Q,'count',AQuery.count);
  1203. AddToQuery(_Q,'labels',AQuery.labels);
  1204. AddToQuery(_Q,'oldest',AQuery.oldest);
  1205. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  1206. AddToQuery(_Q,'timespan',AQuery.timespan);
  1207. AddToQuery(_Q,'window',AQuery.window);
  1208. AddToQuery(_Q,'youngest',AQuery.youngest);
  1209. Result:=List(metric,project,aListTimeseriesRequest,_Q);
  1210. end;
  1211. Function TTimeseriesResource.Write(project: string; aWriteTimeseriesRequest : TWriteTimeseriesRequest) : TWriteTimeseriesResponse;
  1212. Const
  1213. _HTTPMethod = 'POST';
  1214. _Path = '{project}/timeseries:write';
  1215. _Methodid = 'cloudmonitoring.timeseries.write';
  1216. Var
  1217. _P : String;
  1218. begin
  1219. _P:=SubstitutePath(_Path,['project',project]);
  1220. Result:=ServiceCall(_HTTPMethod,_P,'',aWriteTimeseriesRequest,TWriteTimeseriesResponse) as TWriteTimeseriesResponse;
  1221. end;
  1222. { --------------------------------------------------------------------
  1223. TTimeseriesDescriptorsResource
  1224. --------------------------------------------------------------------}
  1225. Class Function TTimeseriesDescriptorsResource.ResourceName : String;
  1226. begin
  1227. Result:='timeseriesDescriptors';
  1228. end;
  1229. Class Function TTimeseriesDescriptorsResource.DefaultAPI : TGoogleAPIClass;
  1230. begin
  1231. Result:=TcloudmonitoringAPI;
  1232. end;
  1233. Function TTimeseriesDescriptorsResource.List(metric: string; project: string; aListTimeseriesDescriptorsRequest : TListTimeseriesDescriptorsRequest; AQuery : string = '') : TListTimeseriesDescriptorsResponse;
  1234. Const
  1235. _HTTPMethod = 'GET';
  1236. _Path = '{project}/timeseriesDescriptors/{metric}';
  1237. _Methodid = 'cloudmonitoring.timeseriesDescriptors.list';
  1238. Var
  1239. _P : String;
  1240. begin
  1241. _P:=SubstitutePath(_Path,['metric',metric,'project',project]);
  1242. Result:=ServiceCall(_HTTPMethod,_P,AQuery,aListTimeseriesDescriptorsRequest,TListTimeseriesDescriptorsResponse) as TListTimeseriesDescriptorsResponse;
  1243. end;
  1244. Function TTimeseriesDescriptorsResource.List(metric: string; project: string; aListTimeseriesDescriptorsRequest : TListTimeseriesDescriptorsRequest; AQuery : TTimeseriesDescriptorslistOptions) : TListTimeseriesDescriptorsResponse;
  1245. Var
  1246. _Q : String;
  1247. begin
  1248. _Q:='';
  1249. AddToQuery(_Q,'aggregator',AQuery.aggregator);
  1250. AddToQuery(_Q,'count',AQuery.count);
  1251. AddToQuery(_Q,'labels',AQuery.labels);
  1252. AddToQuery(_Q,'oldest',AQuery.oldest);
  1253. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  1254. AddToQuery(_Q,'timespan',AQuery.timespan);
  1255. AddToQuery(_Q,'window',AQuery.window);
  1256. AddToQuery(_Q,'youngest',AQuery.youngest);
  1257. Result:=List(metric,project,aListTimeseriesDescriptorsRequest,_Q);
  1258. end;
  1259. { --------------------------------------------------------------------
  1260. TCloudmonitoringAPI
  1261. --------------------------------------------------------------------}
  1262. Class Function TCloudmonitoringAPI.APIName : String;
  1263. begin
  1264. Result:='cloudmonitoring';
  1265. end;
  1266. Class Function TCloudmonitoringAPI.APIVersion : String;
  1267. begin
  1268. Result:='v2beta2';
  1269. end;
  1270. Class Function TCloudmonitoringAPI.APIRevision : String;
  1271. begin
  1272. Result:='20150210';
  1273. end;
  1274. Class Function TCloudmonitoringAPI.APIID : String;
  1275. begin
  1276. Result:='cloudmonitoring:v2beta2';
  1277. end;
  1278. Class Function TCloudmonitoringAPI.APITitle : String;
  1279. begin
  1280. Result:='Cloud Monitoring API';
  1281. end;
  1282. Class Function TCloudmonitoringAPI.APIDescription : String;
  1283. begin
  1284. Result:='API for accessing Google Cloud and API monitoring data.';
  1285. end;
  1286. Class Function TCloudmonitoringAPI.APIOwnerDomain : String;
  1287. begin
  1288. Result:='google.com';
  1289. end;
  1290. Class Function TCloudmonitoringAPI.APIOwnerName : String;
  1291. begin
  1292. Result:='Google';
  1293. end;
  1294. Class Function TCloudmonitoringAPI.APIIcon16 : String;
  1295. begin
  1296. Result:='http://www.google.com/images/icons/product/search-16.gif';
  1297. end;
  1298. Class Function TCloudmonitoringAPI.APIIcon32 : String;
  1299. begin
  1300. Result:='http://www.google.com/images/icons/product/search-32.gif';
  1301. end;
  1302. Class Function TCloudmonitoringAPI.APIdocumentationLink : String;
  1303. begin
  1304. Result:='https://cloud.google.com/monitoring/v2beta2/';
  1305. end;
  1306. Class Function TCloudmonitoringAPI.APIrootUrl : string;
  1307. begin
  1308. Result:='https://www.googleapis.com:443/';
  1309. end;
  1310. Class Function TCloudmonitoringAPI.APIbasePath : string;
  1311. begin
  1312. Result:='/cloudmonitoring/v2beta2/projects/';
  1313. end;
  1314. Class Function TCloudmonitoringAPI.APIbaseURL : String;
  1315. begin
  1316. Result:='https://www.googleapis.com:443/cloudmonitoring/v2beta2/projects/';
  1317. end;
  1318. Class Function TCloudmonitoringAPI.APIProtocol : string;
  1319. begin
  1320. Result:='rest';
  1321. end;
  1322. Class Function TCloudmonitoringAPI.APIservicePath : string;
  1323. begin
  1324. Result:='cloudmonitoring/v2beta2/projects/';
  1325. end;
  1326. Class Function TCloudmonitoringAPI.APIbatchPath : String;
  1327. begin
  1328. Result:='batch';
  1329. end;
  1330. Class Function TCloudmonitoringAPI.APIAuthScopes : TScopeInfoArray;
  1331. begin
  1332. SetLength(Result,1);
  1333. Result[0].Name:='https://www.googleapis.com/auth/monitoring';
  1334. Result[0].Description:='View and write monitoring data for all of your Google and third-party Cloud and API projects';
  1335. end;
  1336. Class Function TCloudmonitoringAPI.APINeedsAuth : Boolean;
  1337. begin
  1338. Result:=True;
  1339. end;
  1340. Class Procedure TCloudmonitoringAPI.RegisterAPIResources;
  1341. begin
  1342. TDeleteMetricDescriptorResponse.RegisterObject;
  1343. TListMetricDescriptorsRequest.RegisterObject;
  1344. TListMetricDescriptorsResponse.RegisterObject;
  1345. TListTimeseriesDescriptorsRequest.RegisterObject;
  1346. TListTimeseriesDescriptorsResponse.RegisterObject;
  1347. TListTimeseriesRequest.RegisterObject;
  1348. TListTimeseriesResponse.RegisterObject;
  1349. TMetricDescriptor.RegisterObject;
  1350. TMetricDescriptorLabelDescriptor.RegisterObject;
  1351. TMetricDescriptorTypeDescriptor.RegisterObject;
  1352. TPoint.RegisterObject;
  1353. TPointDistribution.RegisterObject;
  1354. TPointDistributionBucket.RegisterObject;
  1355. TPointDistributionOverflowBucket.RegisterObject;
  1356. TPointDistributionUnderflowBucket.RegisterObject;
  1357. TTimeseries.RegisterObject;
  1358. TTimeseriesDescriptorTypelabels.RegisterObject;
  1359. TTimeseriesDescriptor.RegisterObject;
  1360. TTimeseriesDescriptorLabel.RegisterObject;
  1361. TTimeseriesPoint.RegisterObject;
  1362. TWriteTimeseriesRequestTypecommonLabels.RegisterObject;
  1363. TWriteTimeseriesRequest.RegisterObject;
  1364. TWriteTimeseriesResponse.RegisterObject;
  1365. end;
  1366. Function TCloudmonitoringAPI.GetMetricDescriptorsInstance : TMetricDescriptorsResource;
  1367. begin
  1368. if (FMetricDescriptorsInstance=Nil) then
  1369. FMetricDescriptorsInstance:=CreateMetricDescriptorsResource;
  1370. Result:=FMetricDescriptorsInstance;
  1371. end;
  1372. Function TCloudmonitoringAPI.CreateMetricDescriptorsResource : TMetricDescriptorsResource;
  1373. begin
  1374. Result:=CreateMetricDescriptorsResource(Self);
  1375. end;
  1376. Function TCloudmonitoringAPI.CreateMetricDescriptorsResource(AOwner : TComponent) : TMetricDescriptorsResource;
  1377. begin
  1378. Result:=TMetricDescriptorsResource.Create(AOwner);
  1379. Result.API:=Self.API;
  1380. end;
  1381. Function TCloudmonitoringAPI.GetTimeseriesInstance : TTimeseriesResource;
  1382. begin
  1383. if (FTimeseriesInstance=Nil) then
  1384. FTimeseriesInstance:=CreateTimeseriesResource;
  1385. Result:=FTimeseriesInstance;
  1386. end;
  1387. Function TCloudmonitoringAPI.CreateTimeseriesResource : TTimeseriesResource;
  1388. begin
  1389. Result:=CreateTimeseriesResource(Self);
  1390. end;
  1391. Function TCloudmonitoringAPI.CreateTimeseriesResource(AOwner : TComponent) : TTimeseriesResource;
  1392. begin
  1393. Result:=TTimeseriesResource.Create(AOwner);
  1394. Result.API:=Self.API;
  1395. end;
  1396. Function TCloudmonitoringAPI.GetTimeseriesDescriptorsInstance : TTimeseriesDescriptorsResource;
  1397. begin
  1398. if (FTimeseriesDescriptorsInstance=Nil) then
  1399. FTimeseriesDescriptorsInstance:=CreateTimeseriesDescriptorsResource;
  1400. Result:=FTimeseriesDescriptorsInstance;
  1401. end;
  1402. Function TCloudmonitoringAPI.CreateTimeseriesDescriptorsResource : TTimeseriesDescriptorsResource;
  1403. begin
  1404. Result:=CreateTimeseriesDescriptorsResource(Self);
  1405. end;
  1406. Function TCloudmonitoringAPI.CreateTimeseriesDescriptorsResource(AOwner : TComponent) : TTimeseriesDescriptorsResource;
  1407. begin
  1408. Result:=TTimeseriesDescriptorsResource.Create(AOwner);
  1409. Result.API:=Self.API;
  1410. end;
  1411. initialization
  1412. TCloudmonitoringAPI.RegisterAPI;
  1413. end.