1unit googlepubsub;
2{$MODE objfpc}
3{$H+}
4
5interface
6
7uses sysutils, classes, googleservice, restbase, googlebase;
8
9type
10
11  //Top-level schema types
12  TSetIamPolicyRequest = Class;
13  TPolicy = Class;
14  TBinding = Class;
15  TTestIamPermissionsRequest = Class;
16  TTestIamPermissionsResponse = Class;
17  TTopic = Class;
18  TPublishRequest = Class;
19  TPubsubMessage = Class;
20  TPublishResponse = Class;
21  TListTopicsResponse = Class;
22  TListTopicSubscriptionsResponse = Class;
23  TEmpty = Class;
24  TSubscription = Class;
25  TPushConfig = Class;
26  TListSubscriptionsResponse = Class;
27  TModifyAckDeadlineRequest = Class;
28  TAcknowledgeRequest = Class;
29  TPullRequest = Class;
30  TPullResponse = Class;
31  TReceivedMessage = Class;
32  TModifyPushConfigRequest = Class;
33  TSetIamPolicyRequestArray = Array of TSetIamPolicyRequest;
34  TPolicyArray = Array of TPolicy;
35  TBindingArray = Array of TBinding;
36  TTestIamPermissionsRequestArray = Array of TTestIamPermissionsRequest;
37  TTestIamPermissionsResponseArray = Array of TTestIamPermissionsResponse;
38  TTopicArray = Array of TTopic;
39  TPublishRequestArray = Array of TPublishRequest;
40  TPubsubMessageArray = Array of TPubsubMessage;
41  TPublishResponseArray = Array of TPublishResponse;
42  TListTopicsResponseArray = Array of TListTopicsResponse;
43  TListTopicSubscriptionsResponseArray = Array of TListTopicSubscriptionsResponse;
44  TEmptyArray = Array of TEmpty;
45  TSubscriptionArray = Array of TSubscription;
46  TPushConfigArray = Array of TPushConfig;
47  TListSubscriptionsResponseArray = Array of TListSubscriptionsResponse;
48  TModifyAckDeadlineRequestArray = Array of TModifyAckDeadlineRequest;
49  TAcknowledgeRequestArray = Array of TAcknowledgeRequest;
50  TPullRequestArray = Array of TPullRequest;
51  TPullResponseArray = Array of TPullResponse;
52  TReceivedMessageArray = Array of TReceivedMessage;
53  TModifyPushConfigRequestArray = Array of TModifyPushConfigRequest;
54  //Anonymous types, using auto-generated names
55  TPubsubMessageTypeattributes = Class;
56  TPushConfigTypeattributes = Class;
57  TPolicyTypebindingsArray = Array of TBinding;
58  TPublishRequestTypemessagesArray = Array of TPubsubMessage;
59  TListTopicsResponseTypetopicsArray = Array of TTopic;
60  TListSubscriptionsResponseTypesubscriptionsArray = Array of TSubscription;
61  TPullResponseTypereceivedMessagesArray = Array of TReceivedMessage;
62
63  { --------------------------------------------------------------------
64    TSetIamPolicyRequest
65    --------------------------------------------------------------------}
66
67  TSetIamPolicyRequest = Class(TGoogleBaseObject)
68  Private
69    Fpolicy : TPolicy;
70  Protected
71    //Property setters
72    Procedure Setpolicy(AIndex : Integer; const AValue : TPolicy); virtual;
73  Public
74  Published
75    Property policy : TPolicy Index 0 Read Fpolicy Write Setpolicy;
76  end;
77  TSetIamPolicyRequestClass = Class of TSetIamPolicyRequest;
78
79  { --------------------------------------------------------------------
80    TPolicy
81    --------------------------------------------------------------------}
82
83  TPolicy = Class(TGoogleBaseObject)
84  Private
85    Fversion : integer;
86    Fbindings : TPolicyTypebindingsArray;
87    Fetag : String;
88  Protected
89    //Property setters
90    Procedure Setversion(AIndex : Integer; const AValue : integer); virtual;
91    Procedure Setbindings(AIndex : Integer; const AValue : TPolicyTypebindingsArray); virtual;
92    Procedure Setetag(AIndex : Integer; const AValue : String); virtual;
93    //2.6.4. bug workaround
94    {$IFDEF VER2_6}
95    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
96    {$ENDIF VER2_6}
97  Public
98  Published
99    Property version : integer Index 0 Read Fversion Write Setversion;
100    Property bindings : TPolicyTypebindingsArray Index 8 Read Fbindings Write Setbindings;
101    Property etag : String Index 16 Read Fetag Write Setetag;
102  end;
103  TPolicyClass = Class of TPolicy;
104
105  { --------------------------------------------------------------------
106    TBinding
107    --------------------------------------------------------------------}
108
109  TBinding = Class(TGoogleBaseObject)
110  Private
111    Frole : String;
112    Fmembers : TStringArray;
113  Protected
114    //Property setters
115    Procedure Setrole(AIndex : Integer; const AValue : String); virtual;
116    Procedure Setmembers(AIndex : Integer; const AValue : TStringArray); virtual;
117    //2.6.4. bug workaround
118    {$IFDEF VER2_6}
119    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
120    {$ENDIF VER2_6}
121  Public
122  Published
123    Property role : String Index 0 Read Frole Write Setrole;
124    Property members : TStringArray Index 8 Read Fmembers Write Setmembers;
125  end;
126  TBindingClass = Class of TBinding;
127
128  { --------------------------------------------------------------------
129    TTestIamPermissionsRequest
130    --------------------------------------------------------------------}
131
132  TTestIamPermissionsRequest = Class(TGoogleBaseObject)
133  Private
134    Fpermissions : TStringArray;
135  Protected
136    //Property setters
137    Procedure Setpermissions(AIndex : Integer; const AValue : TStringArray); virtual;
138    //2.6.4. bug workaround
139    {$IFDEF VER2_6}
140    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
141    {$ENDIF VER2_6}
142  Public
143  Published
144    Property permissions : TStringArray Index 0 Read Fpermissions Write Setpermissions;
145  end;
146  TTestIamPermissionsRequestClass = Class of TTestIamPermissionsRequest;
147
148  { --------------------------------------------------------------------
149    TTestIamPermissionsResponse
150    --------------------------------------------------------------------}
151
152  TTestIamPermissionsResponse = Class(TGoogleBaseObject)
153  Private
154    Fpermissions : TStringArray;
155  Protected
156    //Property setters
157    Procedure Setpermissions(AIndex : Integer; const AValue : TStringArray); virtual;
158    //2.6.4. bug workaround
159    {$IFDEF VER2_6}
160    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
161    {$ENDIF VER2_6}
162  Public
163  Published
164    Property permissions : TStringArray Index 0 Read Fpermissions Write Setpermissions;
165  end;
166  TTestIamPermissionsResponseClass = Class of TTestIamPermissionsResponse;
167
168  { --------------------------------------------------------------------
169    TTopic
170    --------------------------------------------------------------------}
171
172  TTopic = Class(TGoogleBaseObject)
173  Private
174    Fname : String;
175  Protected
176    //Property setters
177    Procedure Setname(AIndex : Integer; const AValue : String); virtual;
178  Public
179  Published
180    Property name : String Index 0 Read Fname Write Setname;
181  end;
182  TTopicClass = Class of TTopic;
183
184  { --------------------------------------------------------------------
185    TPublishRequest
186    --------------------------------------------------------------------}
187
188  TPublishRequest = Class(TGoogleBaseObject)
189  Private
190    Fmessages : TPublishRequestTypemessagesArray;
191  Protected
192    //Property setters
193    Procedure Setmessages(AIndex : Integer; const AValue : TPublishRequestTypemessagesArray); virtual;
194    //2.6.4. bug workaround
195    {$IFDEF VER2_6}
196    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
197    {$ENDIF VER2_6}
198  Public
199  Published
200    Property messages : TPublishRequestTypemessagesArray Index 0 Read Fmessages Write Setmessages;
201  end;
202  TPublishRequestClass = Class of TPublishRequest;
203
204  { --------------------------------------------------------------------
205    TPubsubMessageTypeattributes
206    --------------------------------------------------------------------}
207
208  TPubsubMessageTypeattributes = Class(TGoogleBaseObject)
209  Private
210  Protected
211    //Property setters
212  Public
213    Class Function AllowAdditionalProperties : Boolean; override;
214  Published
215  end;
216  TPubsubMessageTypeattributesClass = Class of TPubsubMessageTypeattributes;
217
218  { --------------------------------------------------------------------
219    TPubsubMessage
220    --------------------------------------------------------------------}
221
222  TPubsubMessage = Class(TGoogleBaseObject)
223  Private
224    Fdata : String;
225    Fattributes : TPubsubMessageTypeattributes;
226    FmessageId : String;
227    FpublishTime : String;
228  Protected
229    //Property setters
230    Procedure Setdata(AIndex : Integer; const AValue : String); virtual;
231    Procedure Setattributes(AIndex : Integer; const AValue : TPubsubMessageTypeattributes); virtual;
232    Procedure SetmessageId(AIndex : Integer; const AValue : String); virtual;
233    Procedure SetpublishTime(AIndex : Integer; const AValue : String); virtual;
234  Public
235  Published
236    Property data : String Index 0 Read Fdata Write Setdata;
237    Property attributes : TPubsubMessageTypeattributes Index 8 Read Fattributes Write Setattributes;
238    Property messageId : String Index 16 Read FmessageId Write SetmessageId;
239    Property publishTime : String Index 24 Read FpublishTime Write SetpublishTime;
240  end;
241  TPubsubMessageClass = Class of TPubsubMessage;
242
243  { --------------------------------------------------------------------
244    TPublishResponse
245    --------------------------------------------------------------------}
246
247  TPublishResponse = Class(TGoogleBaseObject)
248  Private
249    FmessageIds : TStringArray;
250  Protected
251    //Property setters
252    Procedure SetmessageIds(AIndex : Integer; const AValue : TStringArray); virtual;
253    //2.6.4. bug workaround
254    {$IFDEF VER2_6}
255    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
256    {$ENDIF VER2_6}
257  Public
258  Published
259    Property messageIds : TStringArray Index 0 Read FmessageIds Write SetmessageIds;
260  end;
261  TPublishResponseClass = Class of TPublishResponse;
262
263  { --------------------------------------------------------------------
264    TListTopicsResponse
265    --------------------------------------------------------------------}
266
267  TListTopicsResponse = Class(TGoogleBaseObject)
268  Private
269    Ftopics : TListTopicsResponseTypetopicsArray;
270    FnextPageToken : String;
271  Protected
272    //Property setters
273    Procedure Settopics(AIndex : Integer; const AValue : TListTopicsResponseTypetopicsArray); virtual;
274    Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
275    //2.6.4. bug workaround
276    {$IFDEF VER2_6}
277    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
278    {$ENDIF VER2_6}
279  Public
280  Published
281    Property topics : TListTopicsResponseTypetopicsArray Index 0 Read Ftopics Write Settopics;
282    Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
283  end;
284  TListTopicsResponseClass = Class of TListTopicsResponse;
285
286  { --------------------------------------------------------------------
287    TListTopicSubscriptionsResponse
288    --------------------------------------------------------------------}
289
290  TListTopicSubscriptionsResponse = Class(TGoogleBaseObject)
291  Private
292    Fsubscriptions : TStringArray;
293    FnextPageToken : String;
294  Protected
295    //Property setters
296    Procedure Setsubscriptions(AIndex : Integer; const AValue : TStringArray); virtual;
297    Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
298    //2.6.4. bug workaround
299    {$IFDEF VER2_6}
300    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
301    {$ENDIF VER2_6}
302  Public
303  Published
304    Property subscriptions : TStringArray Index 0 Read Fsubscriptions Write Setsubscriptions;
305    Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
306  end;
307  TListTopicSubscriptionsResponseClass = Class of TListTopicSubscriptionsResponse;
308
309  { --------------------------------------------------------------------
310    TEmpty
311    --------------------------------------------------------------------}
312
313  TEmpty = Class(TGoogleBaseObject)
314  Private
315  Protected
316    //Property setters
317  Public
318  Published
319  end;
320  TEmptyClass = Class of TEmpty;
321
322  { --------------------------------------------------------------------
323    TSubscription
324    --------------------------------------------------------------------}
325
326  TSubscription = Class(TGoogleBaseObject)
327  Private
328    Fname : String;
329    Ftopic : String;
330    FpushConfig : TPushConfig;
331    FackDeadlineSeconds : integer;
332  Protected
333    //Property setters
334    Procedure Setname(AIndex : Integer; const AValue : String); virtual;
335    Procedure Settopic(AIndex : Integer; const AValue : String); virtual;
336    Procedure SetpushConfig(AIndex : Integer; const AValue : TPushConfig); virtual;
337    Procedure SetackDeadlineSeconds(AIndex : Integer; const AValue : integer); virtual;
338  Public
339  Published
340    Property name : String Index 0 Read Fname Write Setname;
341    Property topic : String Index 8 Read Ftopic Write Settopic;
342    Property pushConfig : TPushConfig Index 16 Read FpushConfig Write SetpushConfig;
343    Property ackDeadlineSeconds : integer Index 24 Read FackDeadlineSeconds Write SetackDeadlineSeconds;
344  end;
345  TSubscriptionClass = Class of TSubscription;
346
347  { --------------------------------------------------------------------
348    TPushConfigTypeattributes
349    --------------------------------------------------------------------}
350
351  TPushConfigTypeattributes = Class(TGoogleBaseObject)
352  Private
353  Protected
354    //Property setters
355  Public
356    Class Function AllowAdditionalProperties : Boolean; override;
357  Published
358  end;
359  TPushConfigTypeattributesClass = Class of TPushConfigTypeattributes;
360
361  { --------------------------------------------------------------------
362    TPushConfig
363    --------------------------------------------------------------------}
364
365  TPushConfig = Class(TGoogleBaseObject)
366  Private
367    FpushEndpoint : String;
368    Fattributes : TPushConfigTypeattributes;
369  Protected
370    //Property setters
371    Procedure SetpushEndpoint(AIndex : Integer; const AValue : String); virtual;
372    Procedure Setattributes(AIndex : Integer; const AValue : TPushConfigTypeattributes); virtual;
373  Public
374  Published
375    Property pushEndpoint : String Index 0 Read FpushEndpoint Write SetpushEndpoint;
376    Property attributes : TPushConfigTypeattributes Index 8 Read Fattributes Write Setattributes;
377  end;
378  TPushConfigClass = Class of TPushConfig;
379
380  { --------------------------------------------------------------------
381    TListSubscriptionsResponse
382    --------------------------------------------------------------------}
383
384  TListSubscriptionsResponse = Class(TGoogleBaseObject)
385  Private
386    Fsubscriptions : TListSubscriptionsResponseTypesubscriptionsArray;
387    FnextPageToken : String;
388  Protected
389    //Property setters
390    Procedure Setsubscriptions(AIndex : Integer; const AValue : TListSubscriptionsResponseTypesubscriptionsArray); virtual;
391    Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
392    //2.6.4. bug workaround
393    {$IFDEF VER2_6}
394    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
395    {$ENDIF VER2_6}
396  Public
397  Published
398    Property subscriptions : TListSubscriptionsResponseTypesubscriptionsArray Index 0 Read Fsubscriptions Write Setsubscriptions;
399    Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
400  end;
401  TListSubscriptionsResponseClass = Class of TListSubscriptionsResponse;
402
403  { --------------------------------------------------------------------
404    TModifyAckDeadlineRequest
405    --------------------------------------------------------------------}
406
407  TModifyAckDeadlineRequest = Class(TGoogleBaseObject)
408  Private
409    FackIds : TStringArray;
410    FackDeadlineSeconds : integer;
411  Protected
412    //Property setters
413    Procedure SetackIds(AIndex : Integer; const AValue : TStringArray); virtual;
414    Procedure SetackDeadlineSeconds(AIndex : Integer; const AValue : integer); virtual;
415    //2.6.4. bug workaround
416    {$IFDEF VER2_6}
417    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
418    {$ENDIF VER2_6}
419  Public
420  Published
421    Property ackIds : TStringArray Index 0 Read FackIds Write SetackIds;
422    Property ackDeadlineSeconds : integer Index 8 Read FackDeadlineSeconds Write SetackDeadlineSeconds;
423  end;
424  TModifyAckDeadlineRequestClass = Class of TModifyAckDeadlineRequest;
425
426  { --------------------------------------------------------------------
427    TAcknowledgeRequest
428    --------------------------------------------------------------------}
429
430  TAcknowledgeRequest = Class(TGoogleBaseObject)
431  Private
432    FackIds : TStringArray;
433  Protected
434    //Property setters
435    Procedure SetackIds(AIndex : Integer; const AValue : TStringArray); virtual;
436    //2.6.4. bug workaround
437    {$IFDEF VER2_6}
438    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
439    {$ENDIF VER2_6}
440  Public
441  Published
442    Property ackIds : TStringArray Index 0 Read FackIds Write SetackIds;
443  end;
444  TAcknowledgeRequestClass = Class of TAcknowledgeRequest;
445
446  { --------------------------------------------------------------------
447    TPullRequest
448    --------------------------------------------------------------------}
449
450  TPullRequest = Class(TGoogleBaseObject)
451  Private
452    FreturnImmediately : boolean;
453    FmaxMessages : integer;
454  Protected
455    //Property setters
456    Procedure SetreturnImmediately(AIndex : Integer; const AValue : boolean); virtual;
457    Procedure SetmaxMessages(AIndex : Integer; const AValue : integer); virtual;
458  Public
459  Published
460    Property returnImmediately : boolean Index 0 Read FreturnImmediately Write SetreturnImmediately;
461    Property maxMessages : integer Index 8 Read FmaxMessages Write SetmaxMessages;
462  end;
463  TPullRequestClass = Class of TPullRequest;
464
465  { --------------------------------------------------------------------
466    TPullResponse
467    --------------------------------------------------------------------}
468
469  TPullResponse = Class(TGoogleBaseObject)
470  Private
471    FreceivedMessages : TPullResponseTypereceivedMessagesArray;
472  Protected
473    //Property setters
474    Procedure SetreceivedMessages(AIndex : Integer; const AValue : TPullResponseTypereceivedMessagesArray); virtual;
475    //2.6.4. bug workaround
476    {$IFDEF VER2_6}
477    Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
478    {$ENDIF VER2_6}
479  Public
480  Published
481    Property receivedMessages : TPullResponseTypereceivedMessagesArray Index 0 Read FreceivedMessages Write SetreceivedMessages;
482  end;
483  TPullResponseClass = Class of TPullResponse;
484
485  { --------------------------------------------------------------------
486    TReceivedMessage
487    --------------------------------------------------------------------}
488
489  TReceivedMessage = Class(TGoogleBaseObject)
490  Private
491    FackId : String;
492    Fmessage : TPubsubMessage;
493  Protected
494    //Property setters
495    Procedure SetackId(AIndex : Integer; const AValue : String); virtual;
496    Procedure Setmessage(AIndex : Integer; const AValue : TPubsubMessage); virtual;
497  Public
498  Published
499    Property ackId : String Index 0 Read FackId Write SetackId;
500    Property message : TPubsubMessage Index 8 Read Fmessage Write Setmessage;
501  end;
502  TReceivedMessageClass = Class of TReceivedMessage;
503
504  { --------------------------------------------------------------------
505    TModifyPushConfigRequest
506    --------------------------------------------------------------------}
507
508  TModifyPushConfigRequest = Class(TGoogleBaseObject)
509  Private
510    FpushConfig : TPushConfig;
511  Protected
512    //Property setters
513    Procedure SetpushConfig(AIndex : Integer; const AValue : TPushConfig); virtual;
514  Public
515  Published
516    Property pushConfig : TPushConfig Index 0 Read FpushConfig Write SetpushConfig;
517  end;
518  TModifyPushConfigRequestClass = Class of TModifyPushConfigRequest;
519
520  { --------------------------------------------------------------------
521    TProjectsTopicsSubscriptionsResource
522    --------------------------------------------------------------------}
523
524
525  //Optional query Options for TProjectsTopicsSubscriptionsResource, method List
526
527  TProjectsTopicsSubscriptionsListOptions = Record
528    pageSize : integer;
529    pageToken : String;
530  end;
531
532  TProjectsTopicsSubscriptionsResource = Class(TGoogleResource)
533  Public
534    Class Function ResourceName : String; override;
535    Class Function DefaultAPI : TGoogleAPIClass; override;
536    Function List(topic: string; AQuery : string  = '') : TListTopicSubscriptionsResponse;
537    Function List(topic: string; AQuery : TProjectsTopicsSubscriptionslistOptions) : TListTopicSubscriptionsResponse;
538  end;
539
540
541  { --------------------------------------------------------------------
542    TProjectsTopicsResource
543    --------------------------------------------------------------------}
544
545
546  //Optional query Options for TProjectsTopicsResource, method List
547
548  TProjectsTopicsListOptions = Record
549    pageSize : integer;
550    pageToken : String;
551  end;
552
553  TProjectsTopicsResource = Class(TGoogleResource)
554  Private
555    FSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
556    Function GetSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;virtual;
557  Public
558    Class Function ResourceName : String; override;
559    Class Function DefaultAPI : TGoogleAPIClass; override;
560    Function SetIamPolicy(resource: string; aSetIamPolicyRequest : TSetIamPolicyRequest) : TPolicy;
561    Function GetIamPolicy(resource: string) : TPolicy;
562    Function TestIamPermissions(resource: string; aTestIamPermissionsRequest : TTestIamPermissionsRequest) : TTestIamPermissionsResponse;
563    Function Create(_name: string; aTopic : TTopic) : TTopic;overload;
564    Function Publish(topic: string; aPublishRequest : TPublishRequest) : TPublishResponse;
565    Function Get(topic: string) : TTopic;
566    Function List(project: string; AQuery : string  = '') : TListTopicsResponse;
567    Function List(project: string; AQuery : TProjectsTopicslistOptions) : TListTopicsResponse;
568    Function Delete(topic: string) : TEmpty;
569    Function CreateSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;virtual;overload;
570    Function CreateSubscriptionsResource : TProjectsTopicsSubscriptionsResource;virtual;overload;
571    Property SubscriptionsResource : TProjectsTopicsSubscriptionsResource Read GetSubscriptionsInstance;
572  end;
573
574
575  { --------------------------------------------------------------------
576    TProjectsSubscriptionsResource
577    --------------------------------------------------------------------}
578
579
580  //Optional query Options for TProjectsSubscriptionsResource, method List
581
582  TProjectsSubscriptionsListOptions = Record
583    pageSize : integer;
584    pageToken : String;
585  end;
586
587  TProjectsSubscriptionsResource = Class(TGoogleResource)
588  Public
589    Class Function ResourceName : String; override;
590    Class Function DefaultAPI : TGoogleAPIClass; override;
591    Function SetIamPolicy(resource: string; aSetIamPolicyRequest : TSetIamPolicyRequest) : TPolicy;
592    Function GetIamPolicy(resource: string) : TPolicy;
593    Function TestIamPermissions(resource: string; aTestIamPermissionsRequest : TTestIamPermissionsRequest) : TTestIamPermissionsResponse;
594    Function Create(_name: string; aSubscription : TSubscription) : TSubscription;overload;
595    Function Get(subscription: string) : TSubscription;
596    Function List(project: string; AQuery : string  = '') : TListSubscriptionsResponse;
597    Function List(project: string; AQuery : TProjectsSubscriptionslistOptions) : TListSubscriptionsResponse;
598    Function Delete(subscription: string) : TEmpty;
599    Function ModifyAckDeadline(subscription: string; aModifyAckDeadlineRequest : TModifyAckDeadlineRequest) : TEmpty;
600    Function Acknowledge(subscription: string; aAcknowledgeRequest : TAcknowledgeRequest) : TEmpty;
601    Function Pull(subscription: string; aPullRequest : TPullRequest) : TPullResponse;
602    Function ModifyPushConfig(subscription: string; aModifyPushConfigRequest : TModifyPushConfigRequest) : TEmpty;
603  end;
604
605
606  { --------------------------------------------------------------------
607    TProjectsResource
608    --------------------------------------------------------------------}
609
610  TProjectsResource = Class(TGoogleResource)
611  Private
612    FTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
613    FTopicsInstance : TProjectsTopicsResource;
614    FSubscriptionsInstance : TProjectsSubscriptionsResource;
615    Function GetTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;virtual;
616    Function GetTopicsInstance : TProjectsTopicsResource;virtual;
617    Function GetSubscriptionsInstance : TProjectsSubscriptionsResource;virtual;
618  Public
619    Class Function ResourceName : String; override;
620    Class Function DefaultAPI : TGoogleAPIClass; override;
621    Function CreateTopicsSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;virtual;overload;
622    Function CreateTopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource;virtual;overload;
623    Function CreateTopicsResource(AOwner : TComponent) : TProjectsTopicsResource;virtual;overload;
624    Function CreateTopicsResource : TProjectsTopicsResource;virtual;overload;
625    Function CreateSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;virtual;overload;
626    Function CreateSubscriptionsResource : TProjectsSubscriptionsResource;virtual;overload;
627    Property TopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource Read GetTopicsSubscriptionsInstance;
628    Property TopicsResource : TProjectsTopicsResource Read GetTopicsInstance;
629    Property SubscriptionsResource : TProjectsSubscriptionsResource Read GetSubscriptionsInstance;
630  end;
631
632
633  { --------------------------------------------------------------------
634    TPubsubAPI
635    --------------------------------------------------------------------}
636
637  TPubsubAPI = Class(TGoogleAPI)
638  Private
639    FProjectsTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
640    FProjectsTopicsInstance : TProjectsTopicsResource;
641    FProjectsSubscriptionsInstance : TProjectsSubscriptionsResource;
642    FProjectsInstance : TProjectsResource;
643    Function GetProjectsTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;virtual;
644    Function GetProjectsTopicsInstance : TProjectsTopicsResource;virtual;
645    Function GetProjectsSubscriptionsInstance : TProjectsSubscriptionsResource;virtual;
646    Function GetProjectsInstance : TProjectsResource;virtual;
647  Public
648    //Override class functions with API info
649    Class Function APIName : String; override;
650    Class Function APIVersion : String; override;
651    Class Function APIRevision : String; override;
652    Class Function APIID : String; override;
653    Class Function APITitle : String; override;
654    Class Function APIDescription : String; override;
655    Class Function APIOwnerDomain : String; override;
656    Class Function APIOwnerName : String; override;
657    Class Function APIIcon16 : String; override;
658    Class Function APIIcon32 : String; override;
659    Class Function APIdocumentationLink : String; override;
660    Class Function APIrootUrl : string; override;
661    Class Function APIbasePath : string;override;
662    Class Function APIbaseURL : String;override;
663    Class Function APIProtocol : string;override;
664    Class Function APIservicePath : string;override;
665    Class Function APIbatchPath : String;override;
666    Class Function APIAuthScopes : TScopeInfoArray;override;
667    Class Function APINeedsAuth : Boolean;override;
668    Class Procedure RegisterAPIResources; override;
669    //Add create function for resources
670    Function CreateProjectsTopicsSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;virtual;overload;
671    Function CreateProjectsTopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource;virtual;overload;
672    Function CreateProjectsTopicsResource(AOwner : TComponent) : TProjectsTopicsResource;virtual;overload;
673    Function CreateProjectsTopicsResource : TProjectsTopicsResource;virtual;overload;
674    Function CreateProjectsSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;virtual;overload;
675    Function CreateProjectsSubscriptionsResource : TProjectsSubscriptionsResource;virtual;overload;
676    Function CreateProjectsResource(AOwner : TComponent) : TProjectsResource;virtual;overload;
677    Function CreateProjectsResource : TProjectsResource;virtual;overload;
678    //Add default on-demand instances for resources
679    Property ProjectsTopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource Read GetProjectsTopicsSubscriptionsInstance;
680    Property ProjectsTopicsResource : TProjectsTopicsResource Read GetProjectsTopicsInstance;
681    Property ProjectsSubscriptionsResource : TProjectsSubscriptionsResource Read GetProjectsSubscriptionsInstance;
682    Property ProjectsResource : TProjectsResource Read GetProjectsInstance;
683  end;
684
685implementation
686
687
688{ --------------------------------------------------------------------
689  TSetIamPolicyRequest
690  --------------------------------------------------------------------}
691
692
693Procedure TSetIamPolicyRequest.Setpolicy(AIndex : Integer; const AValue : TPolicy);
694
695begin
696  If (Fpolicy=AValue) then exit;
697  Fpolicy:=AValue;
698  MarkPropertyChanged(AIndex);
699end;
700
701
702
703
704
705{ --------------------------------------------------------------------
706  TPolicy
707  --------------------------------------------------------------------}
708
709
710Procedure TPolicy.Setversion(AIndex : Integer; const AValue : integer);
711
712begin
713  If (Fversion=AValue) then exit;
714  Fversion:=AValue;
715  MarkPropertyChanged(AIndex);
716end;
717
718
719
720Procedure TPolicy.Setbindings(AIndex : Integer; const AValue : TPolicyTypebindingsArray);
721
722begin
723  If (Fbindings=AValue) then exit;
724  Fbindings:=AValue;
725  MarkPropertyChanged(AIndex);
726end;
727
728
729
730Procedure TPolicy.Setetag(AIndex : Integer; const AValue : String);
731
732begin
733  If (Fetag=AValue) then exit;
734  Fetag:=AValue;
735  MarkPropertyChanged(AIndex);
736end;
737
738
739//2.6.4. bug workaround
740{$IFDEF VER2_6}
741Procedure TPolicy.SetArrayLength(Const AName : String; ALength : Longint);
742
743begin
744  Case AName of
745  'bindings' : SetLength(Fbindings,ALength);
746  else
747    Inherited SetArrayLength(AName,ALength);
748  end;
749end;
750{$ENDIF VER2_6}
751
752
753
754
755{ --------------------------------------------------------------------
756  TBinding
757  --------------------------------------------------------------------}
758
759
760Procedure TBinding.Setrole(AIndex : Integer; const AValue : String);
761
762begin
763  If (Frole=AValue) then exit;
764  Frole:=AValue;
765  MarkPropertyChanged(AIndex);
766end;
767
768
769
770Procedure TBinding.Setmembers(AIndex : Integer; const AValue : TStringArray);
771
772begin
773  If (Fmembers=AValue) then exit;
774  Fmembers:=AValue;
775  MarkPropertyChanged(AIndex);
776end;
777
778
779//2.6.4. bug workaround
780{$IFDEF VER2_6}
781Procedure TBinding.SetArrayLength(Const AName : String; ALength : Longint);
782
783begin
784  Case AName of
785  'members' : SetLength(Fmembers,ALength);
786  else
787    Inherited SetArrayLength(AName,ALength);
788  end;
789end;
790{$ENDIF VER2_6}
791
792
793
794
795{ --------------------------------------------------------------------
796  TTestIamPermissionsRequest
797  --------------------------------------------------------------------}
798
799
800Procedure TTestIamPermissionsRequest.Setpermissions(AIndex : Integer; const AValue : TStringArray);
801
802begin
803  If (Fpermissions=AValue) then exit;
804  Fpermissions:=AValue;
805  MarkPropertyChanged(AIndex);
806end;
807
808
809//2.6.4. bug workaround
810{$IFDEF VER2_6}
811Procedure TTestIamPermissionsRequest.SetArrayLength(Const AName : String; ALength : Longint);
812
813begin
814  Case AName of
815  'permissions' : SetLength(Fpermissions,ALength);
816  else
817    Inherited SetArrayLength(AName,ALength);
818  end;
819end;
820{$ENDIF VER2_6}
821
822
823
824
825{ --------------------------------------------------------------------
826  TTestIamPermissionsResponse
827  --------------------------------------------------------------------}
828
829
830Procedure TTestIamPermissionsResponse.Setpermissions(AIndex : Integer; const AValue : TStringArray);
831
832begin
833  If (Fpermissions=AValue) then exit;
834  Fpermissions:=AValue;
835  MarkPropertyChanged(AIndex);
836end;
837
838
839//2.6.4. bug workaround
840{$IFDEF VER2_6}
841Procedure TTestIamPermissionsResponse.SetArrayLength(Const AName : String; ALength : Longint);
842
843begin
844  Case AName of
845  'permissions' : SetLength(Fpermissions,ALength);
846  else
847    Inherited SetArrayLength(AName,ALength);
848  end;
849end;
850{$ENDIF VER2_6}
851
852
853
854
855{ --------------------------------------------------------------------
856  TTopic
857  --------------------------------------------------------------------}
858
859
860Procedure TTopic.Setname(AIndex : Integer; const AValue : String);
861
862begin
863  If (Fname=AValue) then exit;
864  Fname:=AValue;
865  MarkPropertyChanged(AIndex);
866end;
867
868
869
870
871
872{ --------------------------------------------------------------------
873  TPublishRequest
874  --------------------------------------------------------------------}
875
876
877Procedure TPublishRequest.Setmessages(AIndex : Integer; const AValue : TPublishRequestTypemessagesArray);
878
879begin
880  If (Fmessages=AValue) then exit;
881  Fmessages:=AValue;
882  MarkPropertyChanged(AIndex);
883end;
884
885
886//2.6.4. bug workaround
887{$IFDEF VER2_6}
888Procedure TPublishRequest.SetArrayLength(Const AName : String; ALength : Longint);
889
890begin
891  Case AName of
892  'messages' : SetLength(Fmessages,ALength);
893  else
894    Inherited SetArrayLength(AName,ALength);
895  end;
896end;
897{$ENDIF VER2_6}
898
899
900
901
902{ --------------------------------------------------------------------
903  TPubsubMessageTypeattributes
904  --------------------------------------------------------------------}
905
906
907Class Function TPubsubMessageTypeattributes.AllowAdditionalProperties : Boolean;
908
909begin
910  Result:=True;
911end;
912
913
914
915{ --------------------------------------------------------------------
916  TPubsubMessage
917  --------------------------------------------------------------------}
918
919
920Procedure TPubsubMessage.Setdata(AIndex : Integer; const AValue : String);
921
922begin
923  If (Fdata=AValue) then exit;
924  Fdata:=AValue;
925  MarkPropertyChanged(AIndex);
926end;
927
928
929
930Procedure TPubsubMessage.Setattributes(AIndex : Integer; const AValue : TPubsubMessageTypeattributes);
931
932begin
933  If (Fattributes=AValue) then exit;
934  Fattributes:=AValue;
935  MarkPropertyChanged(AIndex);
936end;
937
938
939
940Procedure TPubsubMessage.SetmessageId(AIndex : Integer; const AValue : String);
941
942begin
943  If (FmessageId=AValue) then exit;
944  FmessageId:=AValue;
945  MarkPropertyChanged(AIndex);
946end;
947
948
949
950Procedure TPubsubMessage.SetpublishTime(AIndex : Integer; const AValue : String);
951
952begin
953  If (FpublishTime=AValue) then exit;
954  FpublishTime:=AValue;
955  MarkPropertyChanged(AIndex);
956end;
957
958
959
960
961
962{ --------------------------------------------------------------------
963  TPublishResponse
964  --------------------------------------------------------------------}
965
966
967Procedure TPublishResponse.SetmessageIds(AIndex : Integer; const AValue : TStringArray);
968
969begin
970  If (FmessageIds=AValue) then exit;
971  FmessageIds:=AValue;
972  MarkPropertyChanged(AIndex);
973end;
974
975
976//2.6.4. bug workaround
977{$IFDEF VER2_6}
978Procedure TPublishResponse.SetArrayLength(Const AName : String; ALength : Longint);
979
980begin
981  Case AName of
982  'messageids' : SetLength(FmessageIds,ALength);
983  else
984    Inherited SetArrayLength(AName,ALength);
985  end;
986end;
987{$ENDIF VER2_6}
988
989
990
991
992{ --------------------------------------------------------------------
993  TListTopicsResponse
994  --------------------------------------------------------------------}
995
996
997Procedure TListTopicsResponse.Settopics(AIndex : Integer; const AValue : TListTopicsResponseTypetopicsArray);
998
999begin
1000  If (Ftopics=AValue) then exit;
1001  Ftopics:=AValue;
1002  MarkPropertyChanged(AIndex);
1003end;
1004
1005
1006
1007Procedure TListTopicsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
1008
1009begin
1010  If (FnextPageToken=AValue) then exit;
1011  FnextPageToken:=AValue;
1012  MarkPropertyChanged(AIndex);
1013end;
1014
1015
1016//2.6.4. bug workaround
1017{$IFDEF VER2_6}
1018Procedure TListTopicsResponse.SetArrayLength(Const AName : String; ALength : Longint);
1019
1020begin
1021  Case AName of
1022  'topics' : SetLength(Ftopics,ALength);
1023  else
1024    Inherited SetArrayLength(AName,ALength);
1025  end;
1026end;
1027{$ENDIF VER2_6}
1028
1029
1030
1031
1032{ --------------------------------------------------------------------
1033  TListTopicSubscriptionsResponse
1034  --------------------------------------------------------------------}
1035
1036
1037Procedure TListTopicSubscriptionsResponse.Setsubscriptions(AIndex : Integer; const AValue : TStringArray);
1038
1039begin
1040  If (Fsubscriptions=AValue) then exit;
1041  Fsubscriptions:=AValue;
1042  MarkPropertyChanged(AIndex);
1043end;
1044
1045
1046
1047Procedure TListTopicSubscriptionsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
1048
1049begin
1050  If (FnextPageToken=AValue) then exit;
1051  FnextPageToken:=AValue;
1052  MarkPropertyChanged(AIndex);
1053end;
1054
1055
1056//2.6.4. bug workaround
1057{$IFDEF VER2_6}
1058Procedure TListTopicSubscriptionsResponse.SetArrayLength(Const AName : String; ALength : Longint);
1059
1060begin
1061  Case AName of
1062  'subscriptions' : SetLength(Fsubscriptions,ALength);
1063  else
1064    Inherited SetArrayLength(AName,ALength);
1065  end;
1066end;
1067{$ENDIF VER2_6}
1068
1069
1070
1071
1072{ --------------------------------------------------------------------
1073  TEmpty
1074  --------------------------------------------------------------------}
1075
1076
1077
1078
1079{ --------------------------------------------------------------------
1080  TSubscription
1081  --------------------------------------------------------------------}
1082
1083
1084Procedure TSubscription.Setname(AIndex : Integer; const AValue : String);
1085
1086begin
1087  If (Fname=AValue) then exit;
1088  Fname:=AValue;
1089  MarkPropertyChanged(AIndex);
1090end;
1091
1092
1093
1094Procedure TSubscription.Settopic(AIndex : Integer; const AValue : String);
1095
1096begin
1097  If (Ftopic=AValue) then exit;
1098  Ftopic:=AValue;
1099  MarkPropertyChanged(AIndex);
1100end;
1101
1102
1103
1104Procedure TSubscription.SetpushConfig(AIndex : Integer; const AValue : TPushConfig);
1105
1106begin
1107  If (FpushConfig=AValue) then exit;
1108  FpushConfig:=AValue;
1109  MarkPropertyChanged(AIndex);
1110end;
1111
1112
1113
1114Procedure TSubscription.SetackDeadlineSeconds(AIndex : Integer; const AValue : integer);
1115
1116begin
1117  If (FackDeadlineSeconds=AValue) then exit;
1118  FackDeadlineSeconds:=AValue;
1119  MarkPropertyChanged(AIndex);
1120end;
1121
1122
1123
1124
1125
1126{ --------------------------------------------------------------------
1127  TPushConfigTypeattributes
1128  --------------------------------------------------------------------}
1129
1130
1131Class Function TPushConfigTypeattributes.AllowAdditionalProperties : Boolean;
1132
1133begin
1134  Result:=True;
1135end;
1136
1137
1138
1139{ --------------------------------------------------------------------
1140  TPushConfig
1141  --------------------------------------------------------------------}
1142
1143
1144Procedure TPushConfig.SetpushEndpoint(AIndex : Integer; const AValue : String);
1145
1146begin
1147  If (FpushEndpoint=AValue) then exit;
1148  FpushEndpoint:=AValue;
1149  MarkPropertyChanged(AIndex);
1150end;
1151
1152
1153
1154Procedure TPushConfig.Setattributes(AIndex : Integer; const AValue : TPushConfigTypeattributes);
1155
1156begin
1157  If (Fattributes=AValue) then exit;
1158  Fattributes:=AValue;
1159  MarkPropertyChanged(AIndex);
1160end;
1161
1162
1163
1164
1165
1166{ --------------------------------------------------------------------
1167  TListSubscriptionsResponse
1168  --------------------------------------------------------------------}
1169
1170
1171Procedure TListSubscriptionsResponse.Setsubscriptions(AIndex : Integer; const AValue : TListSubscriptionsResponseTypesubscriptionsArray);
1172
1173begin
1174  If (Fsubscriptions=AValue) then exit;
1175  Fsubscriptions:=AValue;
1176  MarkPropertyChanged(AIndex);
1177end;
1178
1179
1180
1181Procedure TListSubscriptionsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
1182
1183begin
1184  If (FnextPageToken=AValue) then exit;
1185  FnextPageToken:=AValue;
1186  MarkPropertyChanged(AIndex);
1187end;
1188
1189
1190//2.6.4. bug workaround
1191{$IFDEF VER2_6}
1192Procedure TListSubscriptionsResponse.SetArrayLength(Const AName : String; ALength : Longint);
1193
1194begin
1195  Case AName of
1196  'subscriptions' : SetLength(Fsubscriptions,ALength);
1197  else
1198    Inherited SetArrayLength(AName,ALength);
1199  end;
1200end;
1201{$ENDIF VER2_6}
1202
1203
1204
1205
1206{ --------------------------------------------------------------------
1207  TModifyAckDeadlineRequest
1208  --------------------------------------------------------------------}
1209
1210
1211Procedure TModifyAckDeadlineRequest.SetackIds(AIndex : Integer; const AValue : TStringArray);
1212
1213begin
1214  If (FackIds=AValue) then exit;
1215  FackIds:=AValue;
1216  MarkPropertyChanged(AIndex);
1217end;
1218
1219
1220
1221Procedure TModifyAckDeadlineRequest.SetackDeadlineSeconds(AIndex : Integer; const AValue : integer);
1222
1223begin
1224  If (FackDeadlineSeconds=AValue) then exit;
1225  FackDeadlineSeconds:=AValue;
1226  MarkPropertyChanged(AIndex);
1227end;
1228
1229
1230//2.6.4. bug workaround
1231{$IFDEF VER2_6}
1232Procedure TModifyAckDeadlineRequest.SetArrayLength(Const AName : String; ALength : Longint);
1233
1234begin
1235  Case AName of
1236  'ackids' : SetLength(FackIds,ALength);
1237  else
1238    Inherited SetArrayLength(AName,ALength);
1239  end;
1240end;
1241{$ENDIF VER2_6}
1242
1243
1244
1245
1246{ --------------------------------------------------------------------
1247  TAcknowledgeRequest
1248  --------------------------------------------------------------------}
1249
1250
1251Procedure TAcknowledgeRequest.SetackIds(AIndex : Integer; const AValue : TStringArray);
1252
1253begin
1254  If (FackIds=AValue) then exit;
1255  FackIds:=AValue;
1256  MarkPropertyChanged(AIndex);
1257end;
1258
1259
1260//2.6.4. bug workaround
1261{$IFDEF VER2_6}
1262Procedure TAcknowledgeRequest.SetArrayLength(Const AName : String; ALength : Longint);
1263
1264begin
1265  Case AName of
1266  'ackids' : SetLength(FackIds,ALength);
1267  else
1268    Inherited SetArrayLength(AName,ALength);
1269  end;
1270end;
1271{$ENDIF VER2_6}
1272
1273
1274
1275
1276{ --------------------------------------------------------------------
1277  TPullRequest
1278  --------------------------------------------------------------------}
1279
1280
1281Procedure TPullRequest.SetreturnImmediately(AIndex : Integer; const AValue : boolean);
1282
1283begin
1284  If (FreturnImmediately=AValue) then exit;
1285  FreturnImmediately:=AValue;
1286  MarkPropertyChanged(AIndex);
1287end;
1288
1289
1290
1291Procedure TPullRequest.SetmaxMessages(AIndex : Integer; const AValue : integer);
1292
1293begin
1294  If (FmaxMessages=AValue) then exit;
1295  FmaxMessages:=AValue;
1296  MarkPropertyChanged(AIndex);
1297end;
1298
1299
1300
1301
1302
1303{ --------------------------------------------------------------------
1304  TPullResponse
1305  --------------------------------------------------------------------}
1306
1307
1308Procedure TPullResponse.SetreceivedMessages(AIndex : Integer; const AValue : TPullResponseTypereceivedMessagesArray);
1309
1310begin
1311  If (FreceivedMessages=AValue) then exit;
1312  FreceivedMessages:=AValue;
1313  MarkPropertyChanged(AIndex);
1314end;
1315
1316
1317//2.6.4. bug workaround
1318{$IFDEF VER2_6}
1319Procedure TPullResponse.SetArrayLength(Const AName : String; ALength : Longint);
1320
1321begin
1322  Case AName of
1323  'receivedmessages' : SetLength(FreceivedMessages,ALength);
1324  else
1325    Inherited SetArrayLength(AName,ALength);
1326  end;
1327end;
1328{$ENDIF VER2_6}
1329
1330
1331
1332
1333{ --------------------------------------------------------------------
1334  TReceivedMessage
1335  --------------------------------------------------------------------}
1336
1337
1338Procedure TReceivedMessage.SetackId(AIndex : Integer; const AValue : String);
1339
1340begin
1341  If (FackId=AValue) then exit;
1342  FackId:=AValue;
1343  MarkPropertyChanged(AIndex);
1344end;
1345
1346
1347
1348Procedure TReceivedMessage.Setmessage(AIndex : Integer; const AValue : TPubsubMessage);
1349
1350begin
1351  If (Fmessage=AValue) then exit;
1352  Fmessage:=AValue;
1353  MarkPropertyChanged(AIndex);
1354end;
1355
1356
1357
1358
1359
1360{ --------------------------------------------------------------------
1361  TModifyPushConfigRequest
1362  --------------------------------------------------------------------}
1363
1364
1365Procedure TModifyPushConfigRequest.SetpushConfig(AIndex : Integer; const AValue : TPushConfig);
1366
1367begin
1368  If (FpushConfig=AValue) then exit;
1369  FpushConfig:=AValue;
1370  MarkPropertyChanged(AIndex);
1371end;
1372
1373
1374
1375
1376
1377{ --------------------------------------------------------------------
1378  TProjectsTopicsSubscriptionsResource
1379  --------------------------------------------------------------------}
1380
1381
1382Class Function TProjectsTopicsSubscriptionsResource.ResourceName : String;
1383
1384begin
1385  Result:='subscriptions';
1386end;
1387
1388Class Function TProjectsTopicsSubscriptionsResource.DefaultAPI : TGoogleAPIClass;
1389
1390begin
1391  Result:=TpubsubAPI;
1392end;
1393
1394Function TProjectsTopicsSubscriptionsResource.List(topic: string; AQuery : string = '') : TListTopicSubscriptionsResponse;
1395
1396Const
1397  _HTTPMethod = 'GET';
1398  _Path       = 'v1/{+topic}/subscriptions';
1399  _Methodid   = 'pubsub.projects.topics.subscriptions.list';
1400
1401Var
1402  _P : String;
1403
1404begin
1405  _P:=SubstitutePath(_Path,['topic',topic]);
1406  Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListTopicSubscriptionsResponse) as TListTopicSubscriptionsResponse;
1407end;
1408
1409
1410Function TProjectsTopicsSubscriptionsResource.List(topic: string; AQuery : TProjectsTopicsSubscriptionslistOptions) : TListTopicSubscriptionsResponse;
1411
1412Var
1413  _Q : String;
1414
1415begin
1416  _Q:='';
1417  AddToQuery(_Q,'pageSize',AQuery.pageSize);
1418  AddToQuery(_Q,'pageToken',AQuery.pageToken);
1419  Result:=List(topic,_Q);
1420end;
1421
1422
1423
1424{ --------------------------------------------------------------------
1425  TProjectsTopicsResource
1426  --------------------------------------------------------------------}
1427
1428
1429Class Function TProjectsTopicsResource.ResourceName : String;
1430
1431begin
1432  Result:='topics';
1433end;
1434
1435Class Function TProjectsTopicsResource.DefaultAPI : TGoogleAPIClass;
1436
1437begin
1438  Result:=TpubsubAPI;
1439end;
1440
1441Function TProjectsTopicsResource.SetIamPolicy(resource: string; aSetIamPolicyRequest : TSetIamPolicyRequest) : TPolicy;
1442
1443Const
1444  _HTTPMethod = 'POST';
1445  _Path       = 'v1/{+resource}:setIamPolicy';
1446  _Methodid   = 'pubsub.projects.topics.setIamPolicy';
1447
1448Var
1449  _P : String;
1450
1451begin
1452  _P:=SubstitutePath(_Path,['resource',resource]);
1453  Result:=ServiceCall(_HTTPMethod,_P,'',aSetIamPolicyRequest,TPolicy) as TPolicy;
1454end;
1455
1456Function TProjectsTopicsResource.GetIamPolicy(resource: string) : TPolicy;
1457
1458Const
1459  _HTTPMethod = 'GET';
1460  _Path       = 'v1/{+resource}:getIamPolicy';
1461  _Methodid   = 'pubsub.projects.topics.getIamPolicy';
1462
1463Var
1464  _P : String;
1465
1466begin
1467  _P:=SubstitutePath(_Path,['resource',resource]);
1468  Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TPolicy) as TPolicy;
1469end;
1470
1471Function TProjectsTopicsResource.TestIamPermissions(resource: string; aTestIamPermissionsRequest : TTestIamPermissionsRequest) : TTestIamPermissionsResponse;
1472
1473Const
1474  _HTTPMethod = 'POST';
1475  _Path       = 'v1/{+resource}:testIamPermissions';
1476  _Methodid   = 'pubsub.projects.topics.testIamPermissions';
1477
1478Var
1479  _P : String;
1480
1481begin
1482  _P:=SubstitutePath(_Path,['resource',resource]);
1483  Result:=ServiceCall(_HTTPMethod,_P,'',aTestIamPermissionsRequest,TTestIamPermissionsResponse) as TTestIamPermissionsResponse;
1484end;
1485
1486Function TProjectsTopicsResource.Create(_name: string; aTopic : TTopic) : TTopic;
1487
1488Const
1489  _HTTPMethod = 'PUT';
1490  _Path       = 'v1/{+name}';
1491  _Methodid   = 'pubsub.projects.topics.create';
1492
1493Var
1494  _P : String;
1495
1496begin
1497  _P:=SubstitutePath(_Path,['name',_name]);
1498  Result:=ServiceCall(_HTTPMethod,_P,'',aTopic,TTopic) as TTopic;
1499end;
1500
1501Function TProjectsTopicsResource.Publish(topic: string; aPublishRequest : TPublishRequest) : TPublishResponse;
1502
1503Const
1504  _HTTPMethod = 'POST';
1505  _Path       = 'v1/{+topic}:publish';
1506  _Methodid   = 'pubsub.projects.topics.publish';
1507
1508Var
1509  _P : String;
1510
1511begin
1512  _P:=SubstitutePath(_Path,['topic',topic]);
1513  Result:=ServiceCall(_HTTPMethod,_P,'',aPublishRequest,TPublishResponse) as TPublishResponse;
1514end;
1515
1516Function TProjectsTopicsResource.Get(topic: string) : TTopic;
1517
1518Const
1519  _HTTPMethod = 'GET';
1520  _Path       = 'v1/{+topic}';
1521  _Methodid   = 'pubsub.projects.topics.get';
1522
1523Var
1524  _P : String;
1525
1526begin
1527  _P:=SubstitutePath(_Path,['topic',topic]);
1528  Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TTopic) as TTopic;
1529end;
1530
1531Function TProjectsTopicsResource.List(project: string; AQuery : string = '') : TListTopicsResponse;
1532
1533Const
1534  _HTTPMethod = 'GET';
1535  _Path       = 'v1/{+project}/topics';
1536  _Methodid   = 'pubsub.projects.topics.list';
1537
1538Var
1539  _P : String;
1540
1541begin
1542  _P:=SubstitutePath(_Path,['project',project]);
1543  Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListTopicsResponse) as TListTopicsResponse;
1544end;
1545
1546
1547Function TProjectsTopicsResource.List(project: string; AQuery : TProjectsTopicslistOptions) : TListTopicsResponse;
1548
1549Var
1550  _Q : String;
1551
1552begin
1553  _Q:='';
1554  AddToQuery(_Q,'pageSize',AQuery.pageSize);
1555  AddToQuery(_Q,'pageToken',AQuery.pageToken);
1556  Result:=List(project,_Q);
1557end;
1558
1559Function TProjectsTopicsResource.Delete(topic: string) : TEmpty;
1560
1561Const
1562  _HTTPMethod = 'DELETE';
1563  _Path       = 'v1/{+topic}';
1564  _Methodid   = 'pubsub.projects.topics.delete';
1565
1566Var
1567  _P : String;
1568
1569begin
1570  _P:=SubstitutePath(_Path,['topic',topic]);
1571  Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
1572end;
1573
1574
1575
1576Function TProjectsTopicsResource.GetSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
1577
1578begin
1579  if (FSubscriptionsInstance=Nil) then
1580    FSubscriptionsInstance:=CreateSubscriptionsResource;
1581  Result:=FSubscriptionsInstance;
1582end;
1583
1584Function TProjectsTopicsResource.CreateSubscriptionsResource : TProjectsTopicsSubscriptionsResource;
1585
1586begin
1587  Result:=CreateSubscriptionsResource(Self);
1588end;
1589
1590
1591Function TProjectsTopicsResource.CreateSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;
1592
1593begin
1594  Result:=TProjectsTopicsSubscriptionsResource.Create(AOwner);
1595  Result.API:=Self.API;
1596end;
1597
1598
1599
1600{ --------------------------------------------------------------------
1601  TProjectsSubscriptionsResource
1602  --------------------------------------------------------------------}
1603
1604
1605Class Function TProjectsSubscriptionsResource.ResourceName : String;
1606
1607begin
1608  Result:='subscriptions';
1609end;
1610
1611Class Function TProjectsSubscriptionsResource.DefaultAPI : TGoogleAPIClass;
1612
1613begin
1614  Result:=TpubsubAPI;
1615end;
1616
1617Function TProjectsSubscriptionsResource.SetIamPolicy(resource: string; aSetIamPolicyRequest : TSetIamPolicyRequest) : TPolicy;
1618
1619Const
1620  _HTTPMethod = 'POST';
1621  _Path       = 'v1/{+resource}:setIamPolicy';
1622  _Methodid   = 'pubsub.projects.subscriptions.setIamPolicy';
1623
1624Var
1625  _P : String;
1626
1627begin
1628  _P:=SubstitutePath(_Path,['resource',resource]);
1629  Result:=ServiceCall(_HTTPMethod,_P,'',aSetIamPolicyRequest,TPolicy) as TPolicy;
1630end;
1631
1632Function TProjectsSubscriptionsResource.GetIamPolicy(resource: string) : TPolicy;
1633
1634Const
1635  _HTTPMethod = 'GET';
1636  _Path       = 'v1/{+resource}:getIamPolicy';
1637  _Methodid   = 'pubsub.projects.subscriptions.getIamPolicy';
1638
1639Var
1640  _P : String;
1641
1642begin
1643  _P:=SubstitutePath(_Path,['resource',resource]);
1644  Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TPolicy) as TPolicy;
1645end;
1646
1647Function TProjectsSubscriptionsResource.TestIamPermissions(resource: string; aTestIamPermissionsRequest : TTestIamPermissionsRequest) : TTestIamPermissionsResponse;
1648
1649Const
1650  _HTTPMethod = 'POST';
1651  _Path       = 'v1/{+resource}:testIamPermissions';
1652  _Methodid   = 'pubsub.projects.subscriptions.testIamPermissions';
1653
1654Var
1655  _P : String;
1656
1657begin
1658  _P:=SubstitutePath(_Path,['resource',resource]);
1659  Result:=ServiceCall(_HTTPMethod,_P,'',aTestIamPermissionsRequest,TTestIamPermissionsResponse) as TTestIamPermissionsResponse;
1660end;
1661
1662Function TProjectsSubscriptionsResource.Create(_name: string; aSubscription : TSubscription) : TSubscription;
1663
1664Const
1665  _HTTPMethod = 'PUT';
1666  _Path       = 'v1/{+name}';
1667  _Methodid   = 'pubsub.projects.subscriptions.create';
1668
1669Var
1670  _P : String;
1671
1672begin
1673  _P:=SubstitutePath(_Path,['name',_name]);
1674  Result:=ServiceCall(_HTTPMethod,_P,'',aSubscription,TSubscription) as TSubscription;
1675end;
1676
1677Function TProjectsSubscriptionsResource.Get(subscription: string) : TSubscription;
1678
1679Const
1680  _HTTPMethod = 'GET';
1681  _Path       = 'v1/{+subscription}';
1682  _Methodid   = 'pubsub.projects.subscriptions.get';
1683
1684Var
1685  _P : String;
1686
1687begin
1688  _P:=SubstitutePath(_Path,['subscription',subscription]);
1689  Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TSubscription) as TSubscription;
1690end;
1691
1692Function TProjectsSubscriptionsResource.List(project: string; AQuery : string = '') : TListSubscriptionsResponse;
1693
1694Const
1695  _HTTPMethod = 'GET';
1696  _Path       = 'v1/{+project}/subscriptions';
1697  _Methodid   = 'pubsub.projects.subscriptions.list';
1698
1699Var
1700  _P : String;
1701
1702begin
1703  _P:=SubstitutePath(_Path,['project',project]);
1704  Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListSubscriptionsResponse) as TListSubscriptionsResponse;
1705end;
1706
1707
1708Function TProjectsSubscriptionsResource.List(project: string; AQuery : TProjectsSubscriptionslistOptions) : TListSubscriptionsResponse;
1709
1710Var
1711  _Q : String;
1712
1713begin
1714  _Q:='';
1715  AddToQuery(_Q,'pageSize',AQuery.pageSize);
1716  AddToQuery(_Q,'pageToken',AQuery.pageToken);
1717  Result:=List(project,_Q);
1718end;
1719
1720Function TProjectsSubscriptionsResource.Delete(subscription: string) : TEmpty;
1721
1722Const
1723  _HTTPMethod = 'DELETE';
1724  _Path       = 'v1/{+subscription}';
1725  _Methodid   = 'pubsub.projects.subscriptions.delete';
1726
1727Var
1728  _P : String;
1729
1730begin
1731  _P:=SubstitutePath(_Path,['subscription',subscription]);
1732  Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
1733end;
1734
1735Function TProjectsSubscriptionsResource.ModifyAckDeadline(subscription: string; aModifyAckDeadlineRequest : TModifyAckDeadlineRequest) : TEmpty;
1736
1737Const
1738  _HTTPMethod = 'POST';
1739  _Path       = 'v1/{+subscription}:modifyAckDeadline';
1740  _Methodid   = 'pubsub.projects.subscriptions.modifyAckDeadline';
1741
1742Var
1743  _P : String;
1744
1745begin
1746  _P:=SubstitutePath(_Path,['subscription',subscription]);
1747  Result:=ServiceCall(_HTTPMethod,_P,'',aModifyAckDeadlineRequest,TEmpty) as TEmpty;
1748end;
1749
1750Function TProjectsSubscriptionsResource.Acknowledge(subscription: string; aAcknowledgeRequest : TAcknowledgeRequest) : TEmpty;
1751
1752Const
1753  _HTTPMethod = 'POST';
1754  _Path       = 'v1/{+subscription}:acknowledge';
1755  _Methodid   = 'pubsub.projects.subscriptions.acknowledge';
1756
1757Var
1758  _P : String;
1759
1760begin
1761  _P:=SubstitutePath(_Path,['subscription',subscription]);
1762  Result:=ServiceCall(_HTTPMethod,_P,'',aAcknowledgeRequest,TEmpty) as TEmpty;
1763end;
1764
1765Function TProjectsSubscriptionsResource.Pull(subscription: string; aPullRequest : TPullRequest) : TPullResponse;
1766
1767Const
1768  _HTTPMethod = 'POST';
1769  _Path       = 'v1/{+subscription}:pull';
1770  _Methodid   = 'pubsub.projects.subscriptions.pull';
1771
1772Var
1773  _P : String;
1774
1775begin
1776  _P:=SubstitutePath(_Path,['subscription',subscription]);
1777  Result:=ServiceCall(_HTTPMethod,_P,'',aPullRequest,TPullResponse) as TPullResponse;
1778end;
1779
1780Function TProjectsSubscriptionsResource.ModifyPushConfig(subscription: string; aModifyPushConfigRequest : TModifyPushConfigRequest) : TEmpty;
1781
1782Const
1783  _HTTPMethod = 'POST';
1784  _Path       = 'v1/{+subscription}:modifyPushConfig';
1785  _Methodid   = 'pubsub.projects.subscriptions.modifyPushConfig';
1786
1787Var
1788  _P : String;
1789
1790begin
1791  _P:=SubstitutePath(_Path,['subscription',subscription]);
1792  Result:=ServiceCall(_HTTPMethod,_P,'',aModifyPushConfigRequest,TEmpty) as TEmpty;
1793end;
1794
1795
1796
1797{ --------------------------------------------------------------------
1798  TProjectsResource
1799  --------------------------------------------------------------------}
1800
1801
1802Class Function TProjectsResource.ResourceName : String;
1803
1804begin
1805  Result:='projects';
1806end;
1807
1808Class Function TProjectsResource.DefaultAPI : TGoogleAPIClass;
1809
1810begin
1811  Result:=TpubsubAPI;
1812end;
1813
1814
1815
1816Function TProjectsResource.GetTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
1817
1818begin
1819  if (FTopicsSubscriptionsInstance=Nil) then
1820    FTopicsSubscriptionsInstance:=CreateTopicsSubscriptionsResource;
1821  Result:=FTopicsSubscriptionsInstance;
1822end;
1823
1824Function TProjectsResource.CreateTopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource;
1825
1826begin
1827  Result:=CreateTopicsSubscriptionsResource(Self);
1828end;
1829
1830
1831Function TProjectsResource.CreateTopicsSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;
1832
1833begin
1834  Result:=TProjectsTopicsSubscriptionsResource.Create(AOwner);
1835  Result.API:=Self.API;
1836end;
1837
1838
1839
1840Function TProjectsResource.GetTopicsInstance : TProjectsTopicsResource;
1841
1842begin
1843  if (FTopicsInstance=Nil) then
1844    FTopicsInstance:=CreateTopicsResource;
1845  Result:=FTopicsInstance;
1846end;
1847
1848Function TProjectsResource.CreateTopicsResource : TProjectsTopicsResource;
1849
1850begin
1851  Result:=CreateTopicsResource(Self);
1852end;
1853
1854
1855Function TProjectsResource.CreateTopicsResource(AOwner : TComponent) : TProjectsTopicsResource;
1856
1857begin
1858  Result:=TProjectsTopicsResource.Create(AOwner);
1859  Result.API:=Self.API;
1860end;
1861
1862
1863
1864Function TProjectsResource.GetSubscriptionsInstance : TProjectsSubscriptionsResource;
1865
1866begin
1867  if (FSubscriptionsInstance=Nil) then
1868    FSubscriptionsInstance:=CreateSubscriptionsResource;
1869  Result:=FSubscriptionsInstance;
1870end;
1871
1872Function TProjectsResource.CreateSubscriptionsResource : TProjectsSubscriptionsResource;
1873
1874begin
1875  Result:=CreateSubscriptionsResource(Self);
1876end;
1877
1878
1879Function TProjectsResource.CreateSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;
1880
1881begin
1882  Result:=TProjectsSubscriptionsResource.Create(AOwner);
1883  Result.API:=Self.API;
1884end;
1885
1886
1887
1888{ --------------------------------------------------------------------
1889  TPubsubAPI
1890  --------------------------------------------------------------------}
1891
1892Class Function TPubsubAPI.APIName : String;
1893
1894begin
1895  Result:='pubsub';
1896end;
1897
1898Class Function TPubsubAPI.APIVersion : String;
1899
1900begin
1901  Result:='v1';
1902end;
1903
1904Class Function TPubsubAPI.APIRevision : String;
1905
1906begin
1907  Result:='20160317';
1908end;
1909
1910Class Function TPubsubAPI.APIID : String;
1911
1912begin
1913  Result:='pubsub:v1';
1914end;
1915
1916Class Function TPubsubAPI.APITitle : String;
1917
1918begin
1919  Result:='Google Cloud Pub/Sub API';
1920end;
1921
1922Class Function TPubsubAPI.APIDescription : String;
1923
1924begin
1925  Result:='Provides reliable, many-to-many, asynchronous messaging between applications.';
1926end;
1927
1928Class Function TPubsubAPI.APIOwnerDomain : String;
1929
1930begin
1931  Result:='google.com';
1932end;
1933
1934Class Function TPubsubAPI.APIOwnerName : String;
1935
1936begin
1937  Result:='Google';
1938end;
1939
1940Class Function TPubsubAPI.APIIcon16 : String;
1941
1942begin
1943  Result:='http://www.google.com/images/icons/product/search-16.gif';
1944end;
1945
1946Class Function TPubsubAPI.APIIcon32 : String;
1947
1948begin
1949  Result:='http://www.google.com/images/icons/product/search-32.gif';
1950end;
1951
1952Class Function TPubsubAPI.APIdocumentationLink : String;
1953
1954begin
1955  Result:='https://cloud.google.com/pubsub/docs';
1956end;
1957
1958Class Function TPubsubAPI.APIrootUrl : string;
1959
1960begin
1961  Result:='https://pubsub.googleapis.com/';
1962end;
1963
1964Class Function TPubsubAPI.APIbasePath : string;
1965
1966begin
1967  Result:='';
1968end;
1969
1970Class Function TPubsubAPI.APIbaseURL : String;
1971
1972begin
1973  Result:='https://pubsub.googleapis.com/';
1974end;
1975
1976Class Function TPubsubAPI.APIProtocol : string;
1977
1978begin
1979  Result:='rest';
1980end;
1981
1982Class Function TPubsubAPI.APIservicePath : string;
1983
1984begin
1985  Result:='';
1986end;
1987
1988Class Function TPubsubAPI.APIbatchPath : String;
1989
1990begin
1991  Result:='batch';
1992end;
1993
1994Class Function TPubsubAPI.APIAuthScopes : TScopeInfoArray;
1995
1996begin
1997  SetLength(Result,2);
1998  Result[0].Name:='https://www.googleapis.com/auth/cloud-platform';
1999  Result[0].Description:='View and manage your data across Google Cloud Platform services';
2000  Result[1].Name:='https://www.googleapis.com/auth/pubsub';
2001  Result[1].Description:='View and manage Pub/Sub topics and subscriptions';
2002
2003end;
2004
2005Class Function TPubsubAPI.APINeedsAuth : Boolean;
2006
2007begin
2008  Result:=True;
2009end;
2010
2011Class Procedure TPubsubAPI.RegisterAPIResources;
2012
2013begin
2014  TSetIamPolicyRequest.RegisterObject;
2015  TPolicy.RegisterObject;
2016  TBinding.RegisterObject;
2017  TTestIamPermissionsRequest.RegisterObject;
2018  TTestIamPermissionsResponse.RegisterObject;
2019  TTopic.RegisterObject;
2020  TPublishRequest.RegisterObject;
2021  TPubsubMessageTypeattributes.RegisterObject;
2022  TPubsubMessage.RegisterObject;
2023  TPublishResponse.RegisterObject;
2024  TListTopicsResponse.RegisterObject;
2025  TListTopicSubscriptionsResponse.RegisterObject;
2026  TEmpty.RegisterObject;
2027  TSubscription.RegisterObject;
2028  TPushConfigTypeattributes.RegisterObject;
2029  TPushConfig.RegisterObject;
2030  TListSubscriptionsResponse.RegisterObject;
2031  TModifyAckDeadlineRequest.RegisterObject;
2032  TAcknowledgeRequest.RegisterObject;
2033  TPullRequest.RegisterObject;
2034  TPullResponse.RegisterObject;
2035  TReceivedMessage.RegisterObject;
2036  TModifyPushConfigRequest.RegisterObject;
2037end;
2038
2039
2040Function TPubsubAPI.GetProjectsTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
2041
2042begin
2043  if (FProjectsTopicsSubscriptionsInstance=Nil) then
2044    FProjectsTopicsSubscriptionsInstance:=CreateProjectsTopicsSubscriptionsResource;
2045  Result:=FProjectsTopicsSubscriptionsInstance;
2046end;
2047
2048Function TPubsubAPI.CreateProjectsTopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource;
2049
2050begin
2051  Result:=CreateProjectsTopicsSubscriptionsResource(Self);
2052end;
2053
2054
2055Function TPubsubAPI.CreateProjectsTopicsSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;
2056
2057begin
2058  Result:=TProjectsTopicsSubscriptionsResource.Create(AOwner);
2059  Result.API:=Self.API;
2060end;
2061
2062
2063
2064Function TPubsubAPI.GetProjectsTopicsInstance : TProjectsTopicsResource;
2065
2066begin
2067  if (FProjectsTopicsInstance=Nil) then
2068    FProjectsTopicsInstance:=CreateProjectsTopicsResource;
2069  Result:=FProjectsTopicsInstance;
2070end;
2071
2072Function TPubsubAPI.CreateProjectsTopicsResource : TProjectsTopicsResource;
2073
2074begin
2075  Result:=CreateProjectsTopicsResource(Self);
2076end;
2077
2078
2079Function TPubsubAPI.CreateProjectsTopicsResource(AOwner : TComponent) : TProjectsTopicsResource;
2080
2081begin
2082  Result:=TProjectsTopicsResource.Create(AOwner);
2083  Result.API:=Self.API;
2084end;
2085
2086
2087
2088Function TPubsubAPI.GetProjectsSubscriptionsInstance : TProjectsSubscriptionsResource;
2089
2090begin
2091  if (FProjectsSubscriptionsInstance=Nil) then
2092    FProjectsSubscriptionsInstance:=CreateProjectsSubscriptionsResource;
2093  Result:=FProjectsSubscriptionsInstance;
2094end;
2095
2096Function TPubsubAPI.CreateProjectsSubscriptionsResource : TProjectsSubscriptionsResource;
2097
2098begin
2099  Result:=CreateProjectsSubscriptionsResource(Self);
2100end;
2101
2102
2103Function TPubsubAPI.CreateProjectsSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;
2104
2105begin
2106  Result:=TProjectsSubscriptionsResource.Create(AOwner);
2107  Result.API:=Self.API;
2108end;
2109
2110
2111
2112Function TPubsubAPI.GetProjectsInstance : TProjectsResource;
2113
2114begin
2115  if (FProjectsInstance=Nil) then
2116    FProjectsInstance:=CreateProjectsResource;
2117  Result:=FProjectsInstance;
2118end;
2119
2120Function TPubsubAPI.CreateProjectsResource : TProjectsResource;
2121
2122begin
2123  Result:=CreateProjectsResource(Self);
2124end;
2125
2126
2127Function TPubsubAPI.CreateProjectsResource(AOwner : TComponent) : TProjectsResource;
2128
2129begin
2130  Result:=TProjectsResource.Create(AOwner);
2131  Result.API:=Self.API;
2132end;
2133
2134
2135
2136initialization
2137  TPubsubAPI.RegisterAPI;
2138end.
2139