googleserviceregistry.pp 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416
  1. unit googleserviceregistry;
  2. {$MODE objfpc}
  3. {$H+}
  4. interface
  5. uses sysutils, classes, googleservice, restbase, googlebase;
  6. type
  7. //Top-level schema types
  8. TEndpoint = Class;
  9. TEndpointEndpointVisibility = Class;
  10. TEndpointsListResponse = Class;
  11. TOperation = Class;
  12. TOperationsListResponse = Class;
  13. TEndpointArray = Array of TEndpoint;
  14. TEndpointEndpointVisibilityArray = Array of TEndpointEndpointVisibility;
  15. TEndpointsListResponseArray = Array of TEndpointsListResponse;
  16. TOperationArray = Array of TOperation;
  17. TOperationsListResponseArray = Array of TOperationsListResponse;
  18. //Anonymous types, using auto-generated names
  19. TOperationTypeerrorTypeerrorsItem = Class;
  20. TOperationTypeerror = Class;
  21. TOperationTypewarningsItemTypedataItem = Class;
  22. TOperationTypewarningsItem = Class;
  23. TEndpointsListResponseTypeendpointsArray = Array of TEndpoint;
  24. TOperationTypeerrorTypeerrorsArray = Array of TOperationTypeerrorTypeerrorsItem;
  25. TOperationTypewarningsItemTypedataArray = Array of TOperationTypewarningsItemTypedataItem;
  26. TOperationTypewarningsArray = Array of TOperationTypewarningsItem;
  27. TOperationsListResponseTypeoperationsArray = Array of TOperation;
  28. { --------------------------------------------------------------------
  29. TEndpoint
  30. --------------------------------------------------------------------}
  31. TEndpoint = Class(TGoogleBaseObject)
  32. Private
  33. Faddress : String;
  34. FcreationTimestamp : String;
  35. Fdescription : String;
  36. Ffingerprint : String;
  37. Fid : String;
  38. Fname : String;
  39. Fport : integer;
  40. FselfLink : String;
  41. Fstate : String;
  42. Fvisibility : TEndpointEndpointVisibility;
  43. Protected
  44. //Property setters
  45. Procedure Setaddress(AIndex : Integer; const AValue : String); virtual;
  46. Procedure SetcreationTimestamp(AIndex : Integer; const AValue : String); virtual;
  47. Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
  48. Procedure Setfingerprint(AIndex : Integer; const AValue : String); virtual;
  49. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  50. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  51. Procedure Setport(AIndex : Integer; const AValue : integer); virtual;
  52. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  53. Procedure Setstate(AIndex : Integer; const AValue : String); virtual;
  54. Procedure Setvisibility(AIndex : Integer; const AValue : TEndpointEndpointVisibility); virtual;
  55. Public
  56. Published
  57. Property address : String Index 0 Read Faddress Write Setaddress;
  58. Property creationTimestamp : String Index 8 Read FcreationTimestamp Write SetcreationTimestamp;
  59. Property description : String Index 16 Read Fdescription Write Setdescription;
  60. Property fingerprint : String Index 24 Read Ffingerprint Write Setfingerprint;
  61. Property id : String Index 32 Read Fid Write Setid;
  62. Property name : String Index 40 Read Fname Write Setname;
  63. Property port : integer Index 48 Read Fport Write Setport;
  64. Property selfLink : String Index 56 Read FselfLink Write SetselfLink;
  65. Property state : String Index 64 Read Fstate Write Setstate;
  66. Property visibility : TEndpointEndpointVisibility Index 72 Read Fvisibility Write Setvisibility;
  67. end;
  68. TEndpointClass = Class of TEndpoint;
  69. { --------------------------------------------------------------------
  70. TEndpointEndpointVisibility
  71. --------------------------------------------------------------------}
  72. TEndpointEndpointVisibility = Class(TGoogleBaseObject)
  73. Private
  74. FinternalDnsName : String;
  75. Fnetworks : TStringArray;
  76. Protected
  77. //Property setters
  78. Procedure SetinternalDnsName(AIndex : Integer; const AValue : String); virtual;
  79. Procedure Setnetworks(AIndex : Integer; const AValue : TStringArray); virtual;
  80. //2.6.4. bug workaround
  81. {$IFDEF VER2_6}
  82. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  83. {$ENDIF VER2_6}
  84. Public
  85. Published
  86. Property internalDnsName : String Index 0 Read FinternalDnsName Write SetinternalDnsName;
  87. Property networks : TStringArray Index 8 Read Fnetworks Write Setnetworks;
  88. end;
  89. TEndpointEndpointVisibilityClass = Class of TEndpointEndpointVisibility;
  90. { --------------------------------------------------------------------
  91. TEndpointsListResponse
  92. --------------------------------------------------------------------}
  93. TEndpointsListResponse = Class(TGoogleBaseObject)
  94. Private
  95. Fendpoints : TEndpointsListResponseTypeendpointsArray;
  96. FnextPageToken : String;
  97. Protected
  98. //Property setters
  99. Procedure Setendpoints(AIndex : Integer; const AValue : TEndpointsListResponseTypeendpointsArray); virtual;
  100. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  101. //2.6.4. bug workaround
  102. {$IFDEF VER2_6}
  103. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  104. {$ENDIF VER2_6}
  105. Public
  106. Published
  107. Property endpoints : TEndpointsListResponseTypeendpointsArray Index 0 Read Fendpoints Write Setendpoints;
  108. Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
  109. end;
  110. TEndpointsListResponseClass = Class of TEndpointsListResponse;
  111. { --------------------------------------------------------------------
  112. TOperationTypeerrorTypeerrorsItem
  113. --------------------------------------------------------------------}
  114. TOperationTypeerrorTypeerrorsItem = Class(TGoogleBaseObject)
  115. Private
  116. Fcode : String;
  117. Flocation : String;
  118. Fmessage : String;
  119. Protected
  120. //Property setters
  121. Procedure Setcode(AIndex : Integer; const AValue : String); virtual;
  122. Procedure Setlocation(AIndex : Integer; const AValue : String); virtual;
  123. Procedure Setmessage(AIndex : Integer; const AValue : String); virtual;
  124. Public
  125. Published
  126. Property code : String Index 0 Read Fcode Write Setcode;
  127. Property location : String Index 8 Read Flocation Write Setlocation;
  128. Property message : String Index 16 Read Fmessage Write Setmessage;
  129. end;
  130. TOperationTypeerrorTypeerrorsItemClass = Class of TOperationTypeerrorTypeerrorsItem;
  131. { --------------------------------------------------------------------
  132. TOperationTypeerror
  133. --------------------------------------------------------------------}
  134. TOperationTypeerror = Class(TGoogleBaseObject)
  135. Private
  136. Ferrors : TOperationTypeerrorTypeerrorsArray;
  137. Protected
  138. //Property setters
  139. Procedure Seterrors(AIndex : Integer; const AValue : TOperationTypeerrorTypeerrorsArray); virtual;
  140. //2.6.4. bug workaround
  141. {$IFDEF VER2_6}
  142. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  143. {$ENDIF VER2_6}
  144. Public
  145. Published
  146. Property errors : TOperationTypeerrorTypeerrorsArray Index 0 Read Ferrors Write Seterrors;
  147. end;
  148. TOperationTypeerrorClass = Class of TOperationTypeerror;
  149. { --------------------------------------------------------------------
  150. TOperationTypewarningsItemTypedataItem
  151. --------------------------------------------------------------------}
  152. TOperationTypewarningsItemTypedataItem = Class(TGoogleBaseObject)
  153. Private
  154. Fkey : String;
  155. Fvalue : String;
  156. Protected
  157. //Property setters
  158. Procedure Setkey(AIndex : Integer; const AValue : String); virtual;
  159. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  160. Public
  161. Published
  162. Property key : String Index 0 Read Fkey Write Setkey;
  163. Property value : String Index 8 Read Fvalue Write Setvalue;
  164. end;
  165. TOperationTypewarningsItemTypedataItemClass = Class of TOperationTypewarningsItemTypedataItem;
  166. { --------------------------------------------------------------------
  167. TOperationTypewarningsItem
  168. --------------------------------------------------------------------}
  169. TOperationTypewarningsItem = Class(TGoogleBaseObject)
  170. Private
  171. Fcode : String;
  172. Fdata : TOperationTypewarningsItemTypedataArray;
  173. Fmessage : String;
  174. Protected
  175. //Property setters
  176. Procedure Setcode(AIndex : Integer; const AValue : String); virtual;
  177. Procedure Setdata(AIndex : Integer; const AValue : TOperationTypewarningsItemTypedataArray); virtual;
  178. Procedure Setmessage(AIndex : Integer; const AValue : String); virtual;
  179. //2.6.4. bug workaround
  180. {$IFDEF VER2_6}
  181. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  182. {$ENDIF VER2_6}
  183. Public
  184. Published
  185. Property code : String Index 0 Read Fcode Write Setcode;
  186. Property data : TOperationTypewarningsItemTypedataArray Index 8 Read Fdata Write Setdata;
  187. Property message : String Index 16 Read Fmessage Write Setmessage;
  188. end;
  189. TOperationTypewarningsItemClass = Class of TOperationTypewarningsItem;
  190. { --------------------------------------------------------------------
  191. TOperation
  192. --------------------------------------------------------------------}
  193. TOperation = Class(TGoogleBaseObject)
  194. Private
  195. FclientOperationId : String;
  196. FcreationTimestamp : String;
  197. Fdescription : String;
  198. FendTime : String;
  199. Ferror : TOperationTypeerror;
  200. FhttpErrorMessage : String;
  201. FhttpErrorStatusCode : integer;
  202. Fid : String;
  203. FinsertTime : String;
  204. Fkind : String;
  205. Fname : String;
  206. FoperationType : String;
  207. Fprogress : integer;
  208. Fregion : String;
  209. FselfLink : String;
  210. FstartTime : String;
  211. Fstatus : String;
  212. FstatusMessage : String;
  213. FtargetId : String;
  214. FtargetLink : String;
  215. Fuser : String;
  216. Fwarnings : TOperationTypewarningsArray;
  217. Fzone : String;
  218. Protected
  219. //Property setters
  220. Procedure SetclientOperationId(AIndex : Integer; const AValue : String); virtual;
  221. Procedure SetcreationTimestamp(AIndex : Integer; const AValue : String); virtual;
  222. Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
  223. Procedure SetendTime(AIndex : Integer; const AValue : String); virtual;
  224. Procedure Seterror(AIndex : Integer; const AValue : TOperationTypeerror); virtual;
  225. Procedure SethttpErrorMessage(AIndex : Integer; const AValue : String); virtual;
  226. Procedure SethttpErrorStatusCode(AIndex : Integer; const AValue : integer); virtual;
  227. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  228. Procedure SetinsertTime(AIndex : Integer; const AValue : String); virtual;
  229. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  230. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  231. Procedure SetoperationType(AIndex : Integer; const AValue : String); virtual;
  232. Procedure Setprogress(AIndex : Integer; const AValue : integer); virtual;
  233. Procedure Setregion(AIndex : Integer; const AValue : String); virtual;
  234. Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
  235. Procedure SetstartTime(AIndex : Integer; const AValue : String); virtual;
  236. Procedure Setstatus(AIndex : Integer; const AValue : String); virtual;
  237. Procedure SetstatusMessage(AIndex : Integer; const AValue : String); virtual;
  238. Procedure SettargetId(AIndex : Integer; const AValue : String); virtual;
  239. Procedure SettargetLink(AIndex : Integer; const AValue : String); virtual;
  240. Procedure Setuser(AIndex : Integer; const AValue : String); virtual;
  241. Procedure Setwarnings(AIndex : Integer; const AValue : TOperationTypewarningsArray); virtual;
  242. Procedure Setzone(AIndex : Integer; const AValue : String); virtual;
  243. //2.6.4. bug workaround
  244. {$IFDEF VER2_6}
  245. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  246. {$ENDIF VER2_6}
  247. Public
  248. Published
  249. Property clientOperationId : String Index 0 Read FclientOperationId Write SetclientOperationId;
  250. Property creationTimestamp : String Index 8 Read FcreationTimestamp Write SetcreationTimestamp;
  251. Property description : String Index 16 Read Fdescription Write Setdescription;
  252. Property endTime : String Index 24 Read FendTime Write SetendTime;
  253. Property error : TOperationTypeerror Index 32 Read Ferror Write Seterror;
  254. Property httpErrorMessage : String Index 40 Read FhttpErrorMessage Write SethttpErrorMessage;
  255. Property httpErrorStatusCode : integer Index 48 Read FhttpErrorStatusCode Write SethttpErrorStatusCode;
  256. Property id : String Index 56 Read Fid Write Setid;
  257. Property insertTime : String Index 64 Read FinsertTime Write SetinsertTime;
  258. Property kind : String Index 72 Read Fkind Write Setkind;
  259. Property name : String Index 80 Read Fname Write Setname;
  260. Property operationType : String Index 88 Read FoperationType Write SetoperationType;
  261. Property progress : integer Index 96 Read Fprogress Write Setprogress;
  262. Property region : String Index 104 Read Fregion Write Setregion;
  263. Property selfLink : String Index 112 Read FselfLink Write SetselfLink;
  264. Property startTime : String Index 120 Read FstartTime Write SetstartTime;
  265. Property status : String Index 128 Read Fstatus Write Setstatus;
  266. Property statusMessage : String Index 136 Read FstatusMessage Write SetstatusMessage;
  267. Property targetId : String Index 144 Read FtargetId Write SettargetId;
  268. Property targetLink : String Index 152 Read FtargetLink Write SettargetLink;
  269. Property user : String Index 160 Read Fuser Write Setuser;
  270. Property warnings : TOperationTypewarningsArray Index 168 Read Fwarnings Write Setwarnings;
  271. Property zone : String Index 176 Read Fzone Write Setzone;
  272. end;
  273. TOperationClass = Class of TOperation;
  274. { --------------------------------------------------------------------
  275. TOperationsListResponse
  276. --------------------------------------------------------------------}
  277. TOperationsListResponse = Class(TGoogleBaseObject)
  278. Private
  279. FnextPageToken : String;
  280. Foperations : TOperationsListResponseTypeoperationsArray;
  281. Protected
  282. //Property setters
  283. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  284. Procedure Setoperations(AIndex : Integer; const AValue : TOperationsListResponseTypeoperationsArray); virtual;
  285. //2.6.4. bug workaround
  286. {$IFDEF VER2_6}
  287. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  288. {$ENDIF VER2_6}
  289. Public
  290. Published
  291. Property nextPageToken : String Index 0 Read FnextPageToken Write SetnextPageToken;
  292. Property operations : TOperationsListResponseTypeoperationsArray Index 8 Read Foperations Write Setoperations;
  293. end;
  294. TOperationsListResponseClass = Class of TOperationsListResponse;
  295. { --------------------------------------------------------------------
  296. TEndpointsResource
  297. --------------------------------------------------------------------}
  298. //Optional query Options for TEndpointsResource, method List
  299. TEndpointsListOptions = Record
  300. filter : String;
  301. maxResults : integer;
  302. orderBy : String;
  303. pageToken : String;
  304. end;
  305. TEndpointsResource = Class(TGoogleResource)
  306. Public
  307. Class Function ResourceName : String; override;
  308. Class Function DefaultAPI : TGoogleAPIClass; override;
  309. Function Delete(endpoint: string; project: string) : TOperation;
  310. Function Get(endpoint: string; project: string) : TEndpoint;
  311. Function Insert(project: string; aEndpoint : TEndpoint) : TOperation;
  312. Function List(project: string; AQuery : string = '') : TEndpointsListResponse;
  313. Function List(project: string; AQuery : TEndpointslistOptions) : TEndpointsListResponse;
  314. Function Patch(endpoint: string; project: string; aEndpoint : TEndpoint) : TOperation;
  315. Function Update(endpoint: string; project: string; aEndpoint : TEndpoint) : TOperation;
  316. end;
  317. { --------------------------------------------------------------------
  318. TOperationsResource
  319. --------------------------------------------------------------------}
  320. //Optional query Options for TOperationsResource, method List
  321. TOperationsListOptions = Record
  322. filter : String;
  323. maxResults : integer;
  324. orderBy : String;
  325. pageToken : String;
  326. end;
  327. TOperationsResource = Class(TGoogleResource)
  328. Public
  329. Class Function ResourceName : String; override;
  330. Class Function DefaultAPI : TGoogleAPIClass; override;
  331. Function Get(operation: string; project: string) : TOperation;
  332. Function List(project: string; AQuery : string = '') : TOperationsListResponse;
  333. Function List(project: string; AQuery : TOperationslistOptions) : TOperationsListResponse;
  334. end;
  335. { --------------------------------------------------------------------
  336. TServiceregistryAPI
  337. --------------------------------------------------------------------}
  338. TServiceregistryAPI = Class(TGoogleAPI)
  339. Private
  340. FEndpointsInstance : TEndpointsResource;
  341. FOperationsInstance : TOperationsResource;
  342. Function GetEndpointsInstance : TEndpointsResource;virtual;
  343. Function GetOperationsInstance : TOperationsResource;virtual;
  344. Public
  345. //Override class functions with API info
  346. Class Function APIName : String; override;
  347. Class Function APIVersion : String; override;
  348. Class Function APIRevision : String; override;
  349. Class Function APIID : String; override;
  350. Class Function APITitle : String; override;
  351. Class Function APIDescription : String; override;
  352. Class Function APIOwnerDomain : String; override;
  353. Class Function APIOwnerName : String; override;
  354. Class Function APIIcon16 : String; override;
  355. Class Function APIIcon32 : String; override;
  356. Class Function APIdocumentationLink : String; override;
  357. Class Function APIrootUrl : string; override;
  358. Class Function APIbasePath : string;override;
  359. Class Function APIbaseURL : String;override;
  360. Class Function APIProtocol : string;override;
  361. Class Function APIservicePath : string;override;
  362. Class Function APIbatchPath : String;override;
  363. Class Function APIAuthScopes : TScopeInfoArray;override;
  364. Class Function APINeedsAuth : Boolean;override;
  365. Class Procedure RegisterAPIResources; override;
  366. //Add create function for resources
  367. Function CreateEndpointsResource(AOwner : TComponent) : TEndpointsResource;virtual;overload;
  368. Function CreateEndpointsResource : TEndpointsResource;virtual;overload;
  369. Function CreateOperationsResource(AOwner : TComponent) : TOperationsResource;virtual;overload;
  370. Function CreateOperationsResource : TOperationsResource;virtual;overload;
  371. //Add default on-demand instances for resources
  372. Property EndpointsResource : TEndpointsResource Read GetEndpointsInstance;
  373. Property OperationsResource : TOperationsResource Read GetOperationsInstance;
  374. end;
  375. implementation
  376. { --------------------------------------------------------------------
  377. TEndpoint
  378. --------------------------------------------------------------------}
  379. Procedure TEndpoint.Setaddress(AIndex : Integer; const AValue : String);
  380. begin
  381. If (Faddress=AValue) then exit;
  382. Faddress:=AValue;
  383. MarkPropertyChanged(AIndex);
  384. end;
  385. Procedure TEndpoint.SetcreationTimestamp(AIndex : Integer; const AValue : String);
  386. begin
  387. If (FcreationTimestamp=AValue) then exit;
  388. FcreationTimestamp:=AValue;
  389. MarkPropertyChanged(AIndex);
  390. end;
  391. Procedure TEndpoint.Setdescription(AIndex : Integer; const AValue : String);
  392. begin
  393. If (Fdescription=AValue) then exit;
  394. Fdescription:=AValue;
  395. MarkPropertyChanged(AIndex);
  396. end;
  397. Procedure TEndpoint.Setfingerprint(AIndex : Integer; const AValue : String);
  398. begin
  399. If (Ffingerprint=AValue) then exit;
  400. Ffingerprint:=AValue;
  401. MarkPropertyChanged(AIndex);
  402. end;
  403. Procedure TEndpoint.Setid(AIndex : Integer; const AValue : String);
  404. begin
  405. If (Fid=AValue) then exit;
  406. Fid:=AValue;
  407. MarkPropertyChanged(AIndex);
  408. end;
  409. Procedure TEndpoint.Setname(AIndex : Integer; const AValue : String);
  410. begin
  411. If (Fname=AValue) then exit;
  412. Fname:=AValue;
  413. MarkPropertyChanged(AIndex);
  414. end;
  415. Procedure TEndpoint.Setport(AIndex : Integer; const AValue : integer);
  416. begin
  417. If (Fport=AValue) then exit;
  418. Fport:=AValue;
  419. MarkPropertyChanged(AIndex);
  420. end;
  421. Procedure TEndpoint.SetselfLink(AIndex : Integer; const AValue : String);
  422. begin
  423. If (FselfLink=AValue) then exit;
  424. FselfLink:=AValue;
  425. MarkPropertyChanged(AIndex);
  426. end;
  427. Procedure TEndpoint.Setstate(AIndex : Integer; const AValue : String);
  428. begin
  429. If (Fstate=AValue) then exit;
  430. Fstate:=AValue;
  431. MarkPropertyChanged(AIndex);
  432. end;
  433. Procedure TEndpoint.Setvisibility(AIndex : Integer; const AValue : TEndpointEndpointVisibility);
  434. begin
  435. If (Fvisibility=AValue) then exit;
  436. Fvisibility:=AValue;
  437. MarkPropertyChanged(AIndex);
  438. end;
  439. { --------------------------------------------------------------------
  440. TEndpointEndpointVisibility
  441. --------------------------------------------------------------------}
  442. Procedure TEndpointEndpointVisibility.SetinternalDnsName(AIndex : Integer; const AValue : String);
  443. begin
  444. If (FinternalDnsName=AValue) then exit;
  445. FinternalDnsName:=AValue;
  446. MarkPropertyChanged(AIndex);
  447. end;
  448. Procedure TEndpointEndpointVisibility.Setnetworks(AIndex : Integer; const AValue : TStringArray);
  449. begin
  450. If (Fnetworks=AValue) then exit;
  451. Fnetworks:=AValue;
  452. MarkPropertyChanged(AIndex);
  453. end;
  454. //2.6.4. bug workaround
  455. {$IFDEF VER2_6}
  456. Procedure TEndpointEndpointVisibility.SetArrayLength(Const AName : String; ALength : Longint);
  457. begin
  458. Case AName of
  459. 'networks' : SetLength(Fnetworks,ALength);
  460. else
  461. Inherited SetArrayLength(AName,ALength);
  462. end;
  463. end;
  464. {$ENDIF VER2_6}
  465. { --------------------------------------------------------------------
  466. TEndpointsListResponse
  467. --------------------------------------------------------------------}
  468. Procedure TEndpointsListResponse.Setendpoints(AIndex : Integer; const AValue : TEndpointsListResponseTypeendpointsArray);
  469. begin
  470. If (Fendpoints=AValue) then exit;
  471. Fendpoints:=AValue;
  472. MarkPropertyChanged(AIndex);
  473. end;
  474. Procedure TEndpointsListResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
  475. begin
  476. If (FnextPageToken=AValue) then exit;
  477. FnextPageToken:=AValue;
  478. MarkPropertyChanged(AIndex);
  479. end;
  480. //2.6.4. bug workaround
  481. {$IFDEF VER2_6}
  482. Procedure TEndpointsListResponse.SetArrayLength(Const AName : String; ALength : Longint);
  483. begin
  484. Case AName of
  485. 'endpoints' : SetLength(Fendpoints,ALength);
  486. else
  487. Inherited SetArrayLength(AName,ALength);
  488. end;
  489. end;
  490. {$ENDIF VER2_6}
  491. { --------------------------------------------------------------------
  492. TOperationTypeerrorTypeerrorsItem
  493. --------------------------------------------------------------------}
  494. Procedure TOperationTypeerrorTypeerrorsItem.Setcode(AIndex : Integer; const AValue : String);
  495. begin
  496. If (Fcode=AValue) then exit;
  497. Fcode:=AValue;
  498. MarkPropertyChanged(AIndex);
  499. end;
  500. Procedure TOperationTypeerrorTypeerrorsItem.Setlocation(AIndex : Integer; const AValue : String);
  501. begin
  502. If (Flocation=AValue) then exit;
  503. Flocation:=AValue;
  504. MarkPropertyChanged(AIndex);
  505. end;
  506. Procedure TOperationTypeerrorTypeerrorsItem.Setmessage(AIndex : Integer; const AValue : String);
  507. begin
  508. If (Fmessage=AValue) then exit;
  509. Fmessage:=AValue;
  510. MarkPropertyChanged(AIndex);
  511. end;
  512. { --------------------------------------------------------------------
  513. TOperationTypeerror
  514. --------------------------------------------------------------------}
  515. Procedure TOperationTypeerror.Seterrors(AIndex : Integer; const AValue : TOperationTypeerrorTypeerrorsArray);
  516. begin
  517. If (Ferrors=AValue) then exit;
  518. Ferrors:=AValue;
  519. MarkPropertyChanged(AIndex);
  520. end;
  521. //2.6.4. bug workaround
  522. {$IFDEF VER2_6}
  523. Procedure TOperationTypeerror.SetArrayLength(Const AName : String; ALength : Longint);
  524. begin
  525. Case AName of
  526. 'errors' : SetLength(Ferrors,ALength);
  527. else
  528. Inherited SetArrayLength(AName,ALength);
  529. end;
  530. end;
  531. {$ENDIF VER2_6}
  532. { --------------------------------------------------------------------
  533. TOperationTypewarningsItemTypedataItem
  534. --------------------------------------------------------------------}
  535. Procedure TOperationTypewarningsItemTypedataItem.Setkey(AIndex : Integer; const AValue : String);
  536. begin
  537. If (Fkey=AValue) then exit;
  538. Fkey:=AValue;
  539. MarkPropertyChanged(AIndex);
  540. end;
  541. Procedure TOperationTypewarningsItemTypedataItem.Setvalue(AIndex : Integer; const AValue : String);
  542. begin
  543. If (Fvalue=AValue) then exit;
  544. Fvalue:=AValue;
  545. MarkPropertyChanged(AIndex);
  546. end;
  547. { --------------------------------------------------------------------
  548. TOperationTypewarningsItem
  549. --------------------------------------------------------------------}
  550. Procedure TOperationTypewarningsItem.Setcode(AIndex : Integer; const AValue : String);
  551. begin
  552. If (Fcode=AValue) then exit;
  553. Fcode:=AValue;
  554. MarkPropertyChanged(AIndex);
  555. end;
  556. Procedure TOperationTypewarningsItem.Setdata(AIndex : Integer; const AValue : TOperationTypewarningsItemTypedataArray);
  557. begin
  558. If (Fdata=AValue) then exit;
  559. Fdata:=AValue;
  560. MarkPropertyChanged(AIndex);
  561. end;
  562. Procedure TOperationTypewarningsItem.Setmessage(AIndex : Integer; const AValue : String);
  563. begin
  564. If (Fmessage=AValue) then exit;
  565. Fmessage:=AValue;
  566. MarkPropertyChanged(AIndex);
  567. end;
  568. //2.6.4. bug workaround
  569. {$IFDEF VER2_6}
  570. Procedure TOperationTypewarningsItem.SetArrayLength(Const AName : String; ALength : Longint);
  571. begin
  572. Case AName of
  573. 'data' : SetLength(Fdata,ALength);
  574. else
  575. Inherited SetArrayLength(AName,ALength);
  576. end;
  577. end;
  578. {$ENDIF VER2_6}
  579. { --------------------------------------------------------------------
  580. TOperation
  581. --------------------------------------------------------------------}
  582. Procedure TOperation.SetclientOperationId(AIndex : Integer; const AValue : String);
  583. begin
  584. If (FclientOperationId=AValue) then exit;
  585. FclientOperationId:=AValue;
  586. MarkPropertyChanged(AIndex);
  587. end;
  588. Procedure TOperation.SetcreationTimestamp(AIndex : Integer; const AValue : String);
  589. begin
  590. If (FcreationTimestamp=AValue) then exit;
  591. FcreationTimestamp:=AValue;
  592. MarkPropertyChanged(AIndex);
  593. end;
  594. Procedure TOperation.Setdescription(AIndex : Integer; const AValue : String);
  595. begin
  596. If (Fdescription=AValue) then exit;
  597. Fdescription:=AValue;
  598. MarkPropertyChanged(AIndex);
  599. end;
  600. Procedure TOperation.SetendTime(AIndex : Integer; const AValue : String);
  601. begin
  602. If (FendTime=AValue) then exit;
  603. FendTime:=AValue;
  604. MarkPropertyChanged(AIndex);
  605. end;
  606. Procedure TOperation.Seterror(AIndex : Integer; const AValue : TOperationTypeerror);
  607. begin
  608. If (Ferror=AValue) then exit;
  609. Ferror:=AValue;
  610. MarkPropertyChanged(AIndex);
  611. end;
  612. Procedure TOperation.SethttpErrorMessage(AIndex : Integer; const AValue : String);
  613. begin
  614. If (FhttpErrorMessage=AValue) then exit;
  615. FhttpErrorMessage:=AValue;
  616. MarkPropertyChanged(AIndex);
  617. end;
  618. Procedure TOperation.SethttpErrorStatusCode(AIndex : Integer; const AValue : integer);
  619. begin
  620. If (FhttpErrorStatusCode=AValue) then exit;
  621. FhttpErrorStatusCode:=AValue;
  622. MarkPropertyChanged(AIndex);
  623. end;
  624. Procedure TOperation.Setid(AIndex : Integer; const AValue : String);
  625. begin
  626. If (Fid=AValue) then exit;
  627. Fid:=AValue;
  628. MarkPropertyChanged(AIndex);
  629. end;
  630. Procedure TOperation.SetinsertTime(AIndex : Integer; const AValue : String);
  631. begin
  632. If (FinsertTime=AValue) then exit;
  633. FinsertTime:=AValue;
  634. MarkPropertyChanged(AIndex);
  635. end;
  636. Procedure TOperation.Setkind(AIndex : Integer; const AValue : String);
  637. begin
  638. If (Fkind=AValue) then exit;
  639. Fkind:=AValue;
  640. MarkPropertyChanged(AIndex);
  641. end;
  642. Procedure TOperation.Setname(AIndex : Integer; const AValue : String);
  643. begin
  644. If (Fname=AValue) then exit;
  645. Fname:=AValue;
  646. MarkPropertyChanged(AIndex);
  647. end;
  648. Procedure TOperation.SetoperationType(AIndex : Integer; const AValue : String);
  649. begin
  650. If (FoperationType=AValue) then exit;
  651. FoperationType:=AValue;
  652. MarkPropertyChanged(AIndex);
  653. end;
  654. Procedure TOperation.Setprogress(AIndex : Integer; const AValue : integer);
  655. begin
  656. If (Fprogress=AValue) then exit;
  657. Fprogress:=AValue;
  658. MarkPropertyChanged(AIndex);
  659. end;
  660. Procedure TOperation.Setregion(AIndex : Integer; const AValue : String);
  661. begin
  662. If (Fregion=AValue) then exit;
  663. Fregion:=AValue;
  664. MarkPropertyChanged(AIndex);
  665. end;
  666. Procedure TOperation.SetselfLink(AIndex : Integer; const AValue : String);
  667. begin
  668. If (FselfLink=AValue) then exit;
  669. FselfLink:=AValue;
  670. MarkPropertyChanged(AIndex);
  671. end;
  672. Procedure TOperation.SetstartTime(AIndex : Integer; const AValue : String);
  673. begin
  674. If (FstartTime=AValue) then exit;
  675. FstartTime:=AValue;
  676. MarkPropertyChanged(AIndex);
  677. end;
  678. Procedure TOperation.Setstatus(AIndex : Integer; const AValue : String);
  679. begin
  680. If (Fstatus=AValue) then exit;
  681. Fstatus:=AValue;
  682. MarkPropertyChanged(AIndex);
  683. end;
  684. Procedure TOperation.SetstatusMessage(AIndex : Integer; const AValue : String);
  685. begin
  686. If (FstatusMessage=AValue) then exit;
  687. FstatusMessage:=AValue;
  688. MarkPropertyChanged(AIndex);
  689. end;
  690. Procedure TOperation.SettargetId(AIndex : Integer; const AValue : String);
  691. begin
  692. If (FtargetId=AValue) then exit;
  693. FtargetId:=AValue;
  694. MarkPropertyChanged(AIndex);
  695. end;
  696. Procedure TOperation.SettargetLink(AIndex : Integer; const AValue : String);
  697. begin
  698. If (FtargetLink=AValue) then exit;
  699. FtargetLink:=AValue;
  700. MarkPropertyChanged(AIndex);
  701. end;
  702. Procedure TOperation.Setuser(AIndex : Integer; const AValue : String);
  703. begin
  704. If (Fuser=AValue) then exit;
  705. Fuser:=AValue;
  706. MarkPropertyChanged(AIndex);
  707. end;
  708. Procedure TOperation.Setwarnings(AIndex : Integer; const AValue : TOperationTypewarningsArray);
  709. begin
  710. If (Fwarnings=AValue) then exit;
  711. Fwarnings:=AValue;
  712. MarkPropertyChanged(AIndex);
  713. end;
  714. Procedure TOperation.Setzone(AIndex : Integer; const AValue : String);
  715. begin
  716. If (Fzone=AValue) then exit;
  717. Fzone:=AValue;
  718. MarkPropertyChanged(AIndex);
  719. end;
  720. //2.6.4. bug workaround
  721. {$IFDEF VER2_6}
  722. Procedure TOperation.SetArrayLength(Const AName : String; ALength : Longint);
  723. begin
  724. Case AName of
  725. 'warnings' : SetLength(Fwarnings,ALength);
  726. else
  727. Inherited SetArrayLength(AName,ALength);
  728. end;
  729. end;
  730. {$ENDIF VER2_6}
  731. { --------------------------------------------------------------------
  732. TOperationsListResponse
  733. --------------------------------------------------------------------}
  734. Procedure TOperationsListResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
  735. begin
  736. If (FnextPageToken=AValue) then exit;
  737. FnextPageToken:=AValue;
  738. MarkPropertyChanged(AIndex);
  739. end;
  740. Procedure TOperationsListResponse.Setoperations(AIndex : Integer; const AValue : TOperationsListResponseTypeoperationsArray);
  741. begin
  742. If (Foperations=AValue) then exit;
  743. Foperations:=AValue;
  744. MarkPropertyChanged(AIndex);
  745. end;
  746. //2.6.4. bug workaround
  747. {$IFDEF VER2_6}
  748. Procedure TOperationsListResponse.SetArrayLength(Const AName : String; ALength : Longint);
  749. begin
  750. Case AName of
  751. 'operations' : SetLength(Foperations,ALength);
  752. else
  753. Inherited SetArrayLength(AName,ALength);
  754. end;
  755. end;
  756. {$ENDIF VER2_6}
  757. { --------------------------------------------------------------------
  758. TEndpointsResource
  759. --------------------------------------------------------------------}
  760. Class Function TEndpointsResource.ResourceName : String;
  761. begin
  762. Result:='endpoints';
  763. end;
  764. Class Function TEndpointsResource.DefaultAPI : TGoogleAPIClass;
  765. begin
  766. Result:=TserviceregistryAPI;
  767. end;
  768. Function TEndpointsResource.Delete(endpoint: string; project: string) : TOperation;
  769. Const
  770. _HTTPMethod = 'DELETE';
  771. _Path = '{project}/global/endpoints/{endpoint}';
  772. _Methodid = 'serviceregistry.endpoints.delete';
  773. Var
  774. _P : String;
  775. begin
  776. _P:=SubstitutePath(_Path,['endpoint',endpoint,'project',project]);
  777. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TOperation) as TOperation;
  778. end;
  779. Function TEndpointsResource.Get(endpoint: string; project: string) : TEndpoint;
  780. Const
  781. _HTTPMethod = 'GET';
  782. _Path = '{project}/global/endpoints/{endpoint}';
  783. _Methodid = 'serviceregistry.endpoints.get';
  784. Var
  785. _P : String;
  786. begin
  787. _P:=SubstitutePath(_Path,['endpoint',endpoint,'project',project]);
  788. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEndpoint) as TEndpoint;
  789. end;
  790. Function TEndpointsResource.Insert(project: string; aEndpoint : TEndpoint) : TOperation;
  791. Const
  792. _HTTPMethod = 'POST';
  793. _Path = '{project}/global/endpoints';
  794. _Methodid = 'serviceregistry.endpoints.insert';
  795. Var
  796. _P : String;
  797. begin
  798. _P:=SubstitutePath(_Path,['project',project]);
  799. Result:=ServiceCall(_HTTPMethod,_P,'',aEndpoint,TOperation) as TOperation;
  800. end;
  801. Function TEndpointsResource.List(project: string; AQuery : string = '') : TEndpointsListResponse;
  802. Const
  803. _HTTPMethod = 'GET';
  804. _Path = '{project}/global/endpoints';
  805. _Methodid = 'serviceregistry.endpoints.list';
  806. Var
  807. _P : String;
  808. begin
  809. _P:=SubstitutePath(_Path,['project',project]);
  810. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TEndpointsListResponse) as TEndpointsListResponse;
  811. end;
  812. Function TEndpointsResource.List(project: string; AQuery : TEndpointslistOptions) : TEndpointsListResponse;
  813. Var
  814. _Q : String;
  815. begin
  816. _Q:='';
  817. AddToQuery(_Q,'filter',AQuery.filter);
  818. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  819. AddToQuery(_Q,'orderBy',AQuery.orderBy);
  820. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  821. Result:=List(project,_Q);
  822. end;
  823. Function TEndpointsResource.Patch(endpoint: string; project: string; aEndpoint : TEndpoint) : TOperation;
  824. Const
  825. _HTTPMethod = 'PATCH';
  826. _Path = '{project}/global/endpoints/{endpoint}';
  827. _Methodid = 'serviceregistry.endpoints.patch';
  828. Var
  829. _P : String;
  830. begin
  831. _P:=SubstitutePath(_Path,['endpoint',endpoint,'project',project]);
  832. Result:=ServiceCall(_HTTPMethod,_P,'',aEndpoint,TOperation) as TOperation;
  833. end;
  834. Function TEndpointsResource.Update(endpoint: string; project: string; aEndpoint : TEndpoint) : TOperation;
  835. Const
  836. _HTTPMethod = 'PUT';
  837. _Path = '{project}/global/endpoints/{endpoint}';
  838. _Methodid = 'serviceregistry.endpoints.update';
  839. Var
  840. _P : String;
  841. begin
  842. _P:=SubstitutePath(_Path,['endpoint',endpoint,'project',project]);
  843. Result:=ServiceCall(_HTTPMethod,_P,'',aEndpoint,TOperation) as TOperation;
  844. end;
  845. { --------------------------------------------------------------------
  846. TOperationsResource
  847. --------------------------------------------------------------------}
  848. Class Function TOperationsResource.ResourceName : String;
  849. begin
  850. Result:='operations';
  851. end;
  852. Class Function TOperationsResource.DefaultAPI : TGoogleAPIClass;
  853. begin
  854. Result:=TserviceregistryAPI;
  855. end;
  856. Function TOperationsResource.Get(operation: string; project: string) : TOperation;
  857. Const
  858. _HTTPMethod = 'GET';
  859. _Path = '{project}/global/operations/{operation}';
  860. _Methodid = 'serviceregistry.operations.get';
  861. Var
  862. _P : String;
  863. begin
  864. _P:=SubstitutePath(_Path,['operation',operation,'project',project]);
  865. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TOperation) as TOperation;
  866. end;
  867. Function TOperationsResource.List(project: string; AQuery : string = '') : TOperationsListResponse;
  868. Const
  869. _HTTPMethod = 'GET';
  870. _Path = '{project}/global/operations';
  871. _Methodid = 'serviceregistry.operations.list';
  872. Var
  873. _P : String;
  874. begin
  875. _P:=SubstitutePath(_Path,['project',project]);
  876. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TOperationsListResponse) as TOperationsListResponse;
  877. end;
  878. Function TOperationsResource.List(project: string; AQuery : TOperationslistOptions) : TOperationsListResponse;
  879. Var
  880. _Q : String;
  881. begin
  882. _Q:='';
  883. AddToQuery(_Q,'filter',AQuery.filter);
  884. AddToQuery(_Q,'maxResults',AQuery.maxResults);
  885. AddToQuery(_Q,'orderBy',AQuery.orderBy);
  886. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  887. Result:=List(project,_Q);
  888. end;
  889. { --------------------------------------------------------------------
  890. TServiceregistryAPI
  891. --------------------------------------------------------------------}
  892. Class Function TServiceregistryAPI.APIName : String;
  893. begin
  894. Result:='serviceregistry';
  895. end;
  896. Class Function TServiceregistryAPI.APIVersion : String;
  897. begin
  898. Result:='alpha';
  899. end;
  900. Class Function TServiceregistryAPI.APIRevision : String;
  901. begin
  902. Result:='20160516';
  903. end;
  904. Class Function TServiceregistryAPI.APIID : String;
  905. begin
  906. Result:='serviceregistry:alpha';
  907. end;
  908. Class Function TServiceregistryAPI.APITitle : String;
  909. begin
  910. Result:='Google Cloud Service Registry API';
  911. end;
  912. Class Function TServiceregistryAPI.APIDescription : String;
  913. begin
  914. Result:='Manages service endpoints in Service Registry and provides integration with DNS for service discovery and name resolution.';
  915. end;
  916. Class Function TServiceregistryAPI.APIOwnerDomain : String;
  917. begin
  918. Result:='google.com';
  919. end;
  920. Class Function TServiceregistryAPI.APIOwnerName : String;
  921. begin
  922. Result:='Google';
  923. end;
  924. Class Function TServiceregistryAPI.APIIcon16 : String;
  925. begin
  926. Result:='http://www.google.com/images/icons/product/search-16.gif';
  927. end;
  928. Class Function TServiceregistryAPI.APIIcon32 : String;
  929. begin
  930. Result:='http://www.google.com/images/icons/product/search-32.gif';
  931. end;
  932. Class Function TServiceregistryAPI.APIdocumentationLink : String;
  933. begin
  934. Result:='https://cloud.google.com/service-registry/';
  935. end;
  936. Class Function TServiceregistryAPI.APIrootUrl : string;
  937. begin
  938. Result:='https://www.googleapis.com/';
  939. end;
  940. Class Function TServiceregistryAPI.APIbasePath : string;
  941. begin
  942. Result:='/serviceregistry/alpha/projects/';
  943. end;
  944. Class Function TServiceregistryAPI.APIbaseURL : String;
  945. begin
  946. Result:='https://www.googleapis.com/serviceregistry/alpha/projects/';
  947. end;
  948. Class Function TServiceregistryAPI.APIProtocol : string;
  949. begin
  950. Result:='rest';
  951. end;
  952. Class Function TServiceregistryAPI.APIservicePath : string;
  953. begin
  954. Result:='serviceregistry/alpha/projects/';
  955. end;
  956. Class Function TServiceregistryAPI.APIbatchPath : String;
  957. begin
  958. Result:='batch';
  959. end;
  960. Class Function TServiceregistryAPI.APIAuthScopes : TScopeInfoArray;
  961. begin
  962. SetLength(Result,4);
  963. Result[0].Name:='https://www.googleapis.com/auth/cloud-platform';
  964. Result[0].Description:='View and manage your data across Google Cloud Platform services';
  965. Result[1].Name:='https://www.googleapis.com/auth/cloud-platform.read-only';
  966. Result[1].Description:='View your data across Google Cloud Platform services';
  967. Result[2].Name:='https://www.googleapis.com/auth/ndev.cloudman';
  968. Result[2].Description:='View and manage your Google Cloud Platform management resources and deployment status information';
  969. Result[3].Name:='https://www.googleapis.com/auth/ndev.cloudman.readonly';
  970. Result[3].Description:='View your Google Cloud Platform management resources and deployment status information';
  971. end;
  972. Class Function TServiceregistryAPI.APINeedsAuth : Boolean;
  973. begin
  974. Result:=True;
  975. end;
  976. Class Procedure TServiceregistryAPI.RegisterAPIResources;
  977. begin
  978. TEndpoint.RegisterObject;
  979. TEndpointEndpointVisibility.RegisterObject;
  980. TEndpointsListResponse.RegisterObject;
  981. TOperationTypeerrorTypeerrorsItem.RegisterObject;
  982. TOperationTypeerror.RegisterObject;
  983. TOperationTypewarningsItemTypedataItem.RegisterObject;
  984. TOperationTypewarningsItem.RegisterObject;
  985. TOperation.RegisterObject;
  986. TOperationsListResponse.RegisterObject;
  987. end;
  988. Function TServiceregistryAPI.GetEndpointsInstance : TEndpointsResource;
  989. begin
  990. if (FEndpointsInstance=Nil) then
  991. FEndpointsInstance:=CreateEndpointsResource;
  992. Result:=FEndpointsInstance;
  993. end;
  994. Function TServiceregistryAPI.CreateEndpointsResource : TEndpointsResource;
  995. begin
  996. Result:=CreateEndpointsResource(Self);
  997. end;
  998. Function TServiceregistryAPI.CreateEndpointsResource(AOwner : TComponent) : TEndpointsResource;
  999. begin
  1000. Result:=TEndpointsResource.Create(AOwner);
  1001. Result.API:=Self.API;
  1002. end;
  1003. Function TServiceregistryAPI.GetOperationsInstance : TOperationsResource;
  1004. begin
  1005. if (FOperationsInstance=Nil) then
  1006. FOperationsInstance:=CreateOperationsResource;
  1007. Result:=FOperationsInstance;
  1008. end;
  1009. Function TServiceregistryAPI.CreateOperationsResource : TOperationsResource;
  1010. begin
  1011. Result:=CreateOperationsResource(Self);
  1012. end;
  1013. Function TServiceregistryAPI.CreateOperationsResource(AOwner : TComponent) : TOperationsResource;
  1014. begin
  1015. Result:=TOperationsResource.Create(AOwner);
  1016. Result.API:=Self.API;
  1017. end;
  1018. initialization
  1019. TServiceregistryAPI.RegisterAPI;
  1020. end.