| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138 |
- unit googlepubsub;
- {$MODE objfpc}
- {$H+}
- interface
- uses sysutils, classes, googleservice, restbase, googlebase;
- type
-
- //Top-level schema types
- TSetIamPolicyRequest = Class;
- TPolicy = Class;
- TBinding = Class;
- TTestIamPermissionsRequest = Class;
- TTestIamPermissionsResponse = Class;
- TTopic = Class;
- TPublishRequest = Class;
- TPubsubMessage = Class;
- TPublishResponse = Class;
- TListTopicsResponse = Class;
- TListTopicSubscriptionsResponse = Class;
- TEmpty = Class;
- TSubscription = Class;
- TPushConfig = Class;
- TListSubscriptionsResponse = Class;
- TModifyAckDeadlineRequest = Class;
- TAcknowledgeRequest = Class;
- TPullRequest = Class;
- TPullResponse = Class;
- TReceivedMessage = Class;
- TModifyPushConfigRequest = Class;
- TSetIamPolicyRequestArray = Array of TSetIamPolicyRequest;
- TPolicyArray = Array of TPolicy;
- TBindingArray = Array of TBinding;
- TTestIamPermissionsRequestArray = Array of TTestIamPermissionsRequest;
- TTestIamPermissionsResponseArray = Array of TTestIamPermissionsResponse;
- TTopicArray = Array of TTopic;
- TPublishRequestArray = Array of TPublishRequest;
- TPubsubMessageArray = Array of TPubsubMessage;
- TPublishResponseArray = Array of TPublishResponse;
- TListTopicsResponseArray = Array of TListTopicsResponse;
- TListTopicSubscriptionsResponseArray = Array of TListTopicSubscriptionsResponse;
- TEmptyArray = Array of TEmpty;
- TSubscriptionArray = Array of TSubscription;
- TPushConfigArray = Array of TPushConfig;
- TListSubscriptionsResponseArray = Array of TListSubscriptionsResponse;
- TModifyAckDeadlineRequestArray = Array of TModifyAckDeadlineRequest;
- TAcknowledgeRequestArray = Array of TAcknowledgeRequest;
- TPullRequestArray = Array of TPullRequest;
- TPullResponseArray = Array of TPullResponse;
- TReceivedMessageArray = Array of TReceivedMessage;
- TModifyPushConfigRequestArray = Array of TModifyPushConfigRequest;
- //Anonymous types, using auto-generated names
- TPubsubMessageTypeattributes = Class;
- TPushConfigTypeattributes = Class;
- TPolicyTypebindingsArray = Array of TBinding;
- TPublishRequestTypemessagesArray = Array of TPubsubMessage;
- TListTopicsResponseTypetopicsArray = Array of TTopic;
- TListSubscriptionsResponseTypesubscriptionsArray = Array of TSubscription;
- TPullResponseTypereceivedMessagesArray = Array of TReceivedMessage;
-
- { --------------------------------------------------------------------
- TSetIamPolicyRequest
- --------------------------------------------------------------------}
-
- TSetIamPolicyRequest = Class(TGoogleBaseObject)
- Private
- Fpolicy : TPolicy;
- Protected
- //Property setters
- Procedure Setpolicy(AIndex : Integer; const AValue : TPolicy); virtual;
- Public
- Published
- Property policy : TPolicy Index 0 Read Fpolicy Write Setpolicy;
- end;
- TSetIamPolicyRequestClass = Class of TSetIamPolicyRequest;
-
- { --------------------------------------------------------------------
- TPolicy
- --------------------------------------------------------------------}
-
- TPolicy = Class(TGoogleBaseObject)
- Private
- Fversion : integer;
- Fbindings : TPolicyTypebindingsArray;
- Fetag : String;
- Protected
- //Property setters
- Procedure Setversion(AIndex : Integer; const AValue : integer); virtual;
- Procedure Setbindings(AIndex : Integer; const AValue : TPolicyTypebindingsArray); virtual;
- Procedure Setetag(AIndex : Integer; const AValue : String); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property version : integer Index 0 Read Fversion Write Setversion;
- Property bindings : TPolicyTypebindingsArray Index 8 Read Fbindings Write Setbindings;
- Property etag : String Index 16 Read Fetag Write Setetag;
- end;
- TPolicyClass = Class of TPolicy;
-
- { --------------------------------------------------------------------
- TBinding
- --------------------------------------------------------------------}
-
- TBinding = Class(TGoogleBaseObject)
- Private
- Frole : String;
- Fmembers : TStringArray;
- Protected
- //Property setters
- Procedure Setrole(AIndex : Integer; const AValue : String); virtual;
- Procedure Setmembers(AIndex : Integer; const AValue : TStringArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property role : String Index 0 Read Frole Write Setrole;
- Property members : TStringArray Index 8 Read Fmembers Write Setmembers;
- end;
- TBindingClass = Class of TBinding;
-
- { --------------------------------------------------------------------
- TTestIamPermissionsRequest
- --------------------------------------------------------------------}
-
- TTestIamPermissionsRequest = Class(TGoogleBaseObject)
- Private
- Fpermissions : TStringArray;
- Protected
- //Property setters
- Procedure Setpermissions(AIndex : Integer; const AValue : TStringArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property permissions : TStringArray Index 0 Read Fpermissions Write Setpermissions;
- end;
- TTestIamPermissionsRequestClass = Class of TTestIamPermissionsRequest;
-
- { --------------------------------------------------------------------
- TTestIamPermissionsResponse
- --------------------------------------------------------------------}
-
- TTestIamPermissionsResponse = Class(TGoogleBaseObject)
- Private
- Fpermissions : TStringArray;
- Protected
- //Property setters
- Procedure Setpermissions(AIndex : Integer; const AValue : TStringArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property permissions : TStringArray Index 0 Read Fpermissions Write Setpermissions;
- end;
- TTestIamPermissionsResponseClass = Class of TTestIamPermissionsResponse;
-
- { --------------------------------------------------------------------
- TTopic
- --------------------------------------------------------------------}
-
- TTopic = Class(TGoogleBaseObject)
- Private
- Fname : String;
- Protected
- //Property setters
- Procedure Setname(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property name : String Index 0 Read Fname Write Setname;
- end;
- TTopicClass = Class of TTopic;
-
- { --------------------------------------------------------------------
- TPublishRequest
- --------------------------------------------------------------------}
-
- TPublishRequest = Class(TGoogleBaseObject)
- Private
- Fmessages : TPublishRequestTypemessagesArray;
- Protected
- //Property setters
- Procedure Setmessages(AIndex : Integer; const AValue : TPublishRequestTypemessagesArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property messages : TPublishRequestTypemessagesArray Index 0 Read Fmessages Write Setmessages;
- end;
- TPublishRequestClass = Class of TPublishRequest;
-
- { --------------------------------------------------------------------
- TPubsubMessageTypeattributes
- --------------------------------------------------------------------}
-
- TPubsubMessageTypeattributes = Class(TGoogleBaseObject)
- Private
- Protected
- //Property setters
- Public
- Class Function AllowAdditionalProperties : Boolean; override;
- Published
- end;
- TPubsubMessageTypeattributesClass = Class of TPubsubMessageTypeattributes;
-
- { --------------------------------------------------------------------
- TPubsubMessage
- --------------------------------------------------------------------}
-
- TPubsubMessage = Class(TGoogleBaseObject)
- Private
- Fdata : String;
- Fattributes : TPubsubMessageTypeattributes;
- FmessageId : String;
- FpublishTime : String;
- Protected
- //Property setters
- Procedure Setdata(AIndex : Integer; const AValue : String); virtual;
- Procedure Setattributes(AIndex : Integer; const AValue : TPubsubMessageTypeattributes); virtual;
- Procedure SetmessageId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetpublishTime(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property data : String Index 0 Read Fdata Write Setdata;
- Property attributes : TPubsubMessageTypeattributes Index 8 Read Fattributes Write Setattributes;
- Property messageId : String Index 16 Read FmessageId Write SetmessageId;
- Property publishTime : String Index 24 Read FpublishTime Write SetpublishTime;
- end;
- TPubsubMessageClass = Class of TPubsubMessage;
-
- { --------------------------------------------------------------------
- TPublishResponse
- --------------------------------------------------------------------}
-
- TPublishResponse = Class(TGoogleBaseObject)
- Private
- FmessageIds : TStringArray;
- Protected
- //Property setters
- Procedure SetmessageIds(AIndex : Integer; const AValue : TStringArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property messageIds : TStringArray Index 0 Read FmessageIds Write SetmessageIds;
- end;
- TPublishResponseClass = Class of TPublishResponse;
-
- { --------------------------------------------------------------------
- TListTopicsResponse
- --------------------------------------------------------------------}
-
- TListTopicsResponse = Class(TGoogleBaseObject)
- Private
- Ftopics : TListTopicsResponseTypetopicsArray;
- FnextPageToken : String;
- Protected
- //Property setters
- Procedure Settopics(AIndex : Integer; const AValue : TListTopicsResponseTypetopicsArray); virtual;
- Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property topics : TListTopicsResponseTypetopicsArray Index 0 Read Ftopics Write Settopics;
- Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
- end;
- TListTopicsResponseClass = Class of TListTopicsResponse;
-
- { --------------------------------------------------------------------
- TListTopicSubscriptionsResponse
- --------------------------------------------------------------------}
-
- TListTopicSubscriptionsResponse = Class(TGoogleBaseObject)
- Private
- Fsubscriptions : TStringArray;
- FnextPageToken : String;
- Protected
- //Property setters
- Procedure Setsubscriptions(AIndex : Integer; const AValue : TStringArray); virtual;
- Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property subscriptions : TStringArray Index 0 Read Fsubscriptions Write Setsubscriptions;
- Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
- end;
- TListTopicSubscriptionsResponseClass = Class of TListTopicSubscriptionsResponse;
-
- { --------------------------------------------------------------------
- TEmpty
- --------------------------------------------------------------------}
-
- TEmpty = Class(TGoogleBaseObject)
- Private
- Protected
- //Property setters
- Public
- Published
- end;
- TEmptyClass = Class of TEmpty;
-
- { --------------------------------------------------------------------
- TSubscription
- --------------------------------------------------------------------}
-
- TSubscription = Class(TGoogleBaseObject)
- Private
- Fname : String;
- Ftopic : String;
- FpushConfig : TPushConfig;
- FackDeadlineSeconds : integer;
- Protected
- //Property setters
- Procedure Setname(AIndex : Integer; const AValue : String); virtual;
- Procedure Settopic(AIndex : Integer; const AValue : String); virtual;
- Procedure SetpushConfig(AIndex : Integer; const AValue : TPushConfig); virtual;
- Procedure SetackDeadlineSeconds(AIndex : Integer; const AValue : integer); virtual;
- Public
- Published
- Property name : String Index 0 Read Fname Write Setname;
- Property topic : String Index 8 Read Ftopic Write Settopic;
- Property pushConfig : TPushConfig Index 16 Read FpushConfig Write SetpushConfig;
- Property ackDeadlineSeconds : integer Index 24 Read FackDeadlineSeconds Write SetackDeadlineSeconds;
- end;
- TSubscriptionClass = Class of TSubscription;
-
- { --------------------------------------------------------------------
- TPushConfigTypeattributes
- --------------------------------------------------------------------}
-
- TPushConfigTypeattributes = Class(TGoogleBaseObject)
- Private
- Protected
- //Property setters
- Public
- Class Function AllowAdditionalProperties : Boolean; override;
- Published
- end;
- TPushConfigTypeattributesClass = Class of TPushConfigTypeattributes;
-
- { --------------------------------------------------------------------
- TPushConfig
- --------------------------------------------------------------------}
-
- TPushConfig = Class(TGoogleBaseObject)
- Private
- FpushEndpoint : String;
- Fattributes : TPushConfigTypeattributes;
- Protected
- //Property setters
- Procedure SetpushEndpoint(AIndex : Integer; const AValue : String); virtual;
- Procedure Setattributes(AIndex : Integer; const AValue : TPushConfigTypeattributes); virtual;
- Public
- Published
- Property pushEndpoint : String Index 0 Read FpushEndpoint Write SetpushEndpoint;
- Property attributes : TPushConfigTypeattributes Index 8 Read Fattributes Write Setattributes;
- end;
- TPushConfigClass = Class of TPushConfig;
-
- { --------------------------------------------------------------------
- TListSubscriptionsResponse
- --------------------------------------------------------------------}
-
- TListSubscriptionsResponse = Class(TGoogleBaseObject)
- Private
- Fsubscriptions : TListSubscriptionsResponseTypesubscriptionsArray;
- FnextPageToken : String;
- Protected
- //Property setters
- Procedure Setsubscriptions(AIndex : Integer; const AValue : TListSubscriptionsResponseTypesubscriptionsArray); virtual;
- Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property subscriptions : TListSubscriptionsResponseTypesubscriptionsArray Index 0 Read Fsubscriptions Write Setsubscriptions;
- Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
- end;
- TListSubscriptionsResponseClass = Class of TListSubscriptionsResponse;
-
- { --------------------------------------------------------------------
- TModifyAckDeadlineRequest
- --------------------------------------------------------------------}
-
- TModifyAckDeadlineRequest = Class(TGoogleBaseObject)
- Private
- FackIds : TStringArray;
- FackDeadlineSeconds : integer;
- Protected
- //Property setters
- Procedure SetackIds(AIndex : Integer; const AValue : TStringArray); virtual;
- Procedure SetackDeadlineSeconds(AIndex : Integer; const AValue : integer); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property ackIds : TStringArray Index 0 Read FackIds Write SetackIds;
- Property ackDeadlineSeconds : integer Index 8 Read FackDeadlineSeconds Write SetackDeadlineSeconds;
- end;
- TModifyAckDeadlineRequestClass = Class of TModifyAckDeadlineRequest;
-
- { --------------------------------------------------------------------
- TAcknowledgeRequest
- --------------------------------------------------------------------}
-
- TAcknowledgeRequest = Class(TGoogleBaseObject)
- Private
- FackIds : TStringArray;
- Protected
- //Property setters
- Procedure SetackIds(AIndex : Integer; const AValue : TStringArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property ackIds : TStringArray Index 0 Read FackIds Write SetackIds;
- end;
- TAcknowledgeRequestClass = Class of TAcknowledgeRequest;
-
- { --------------------------------------------------------------------
- TPullRequest
- --------------------------------------------------------------------}
-
- TPullRequest = Class(TGoogleBaseObject)
- Private
- FreturnImmediately : boolean;
- FmaxMessages : integer;
- Protected
- //Property setters
- Procedure SetreturnImmediately(AIndex : Integer; const AValue : boolean); virtual;
- Procedure SetmaxMessages(AIndex : Integer; const AValue : integer); virtual;
- Public
- Published
- Property returnImmediately : boolean Index 0 Read FreturnImmediately Write SetreturnImmediately;
- Property maxMessages : integer Index 8 Read FmaxMessages Write SetmaxMessages;
- end;
- TPullRequestClass = Class of TPullRequest;
-
- { --------------------------------------------------------------------
- TPullResponse
- --------------------------------------------------------------------}
-
- TPullResponse = Class(TGoogleBaseObject)
- Private
- FreceivedMessages : TPullResponseTypereceivedMessagesArray;
- Protected
- //Property setters
- Procedure SetreceivedMessages(AIndex : Integer; const AValue : TPullResponseTypereceivedMessagesArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property receivedMessages : TPullResponseTypereceivedMessagesArray Index 0 Read FreceivedMessages Write SetreceivedMessages;
- end;
- TPullResponseClass = Class of TPullResponse;
-
- { --------------------------------------------------------------------
- TReceivedMessage
- --------------------------------------------------------------------}
-
- TReceivedMessage = Class(TGoogleBaseObject)
- Private
- FackId : String;
- Fmessage : TPubsubMessage;
- Protected
- //Property setters
- Procedure SetackId(AIndex : Integer; const AValue : String); virtual;
- Procedure Setmessage(AIndex : Integer; const AValue : TPubsubMessage); virtual;
- Public
- Published
- Property ackId : String Index 0 Read FackId Write SetackId;
- Property message : TPubsubMessage Index 8 Read Fmessage Write Setmessage;
- end;
- TReceivedMessageClass = Class of TReceivedMessage;
-
- { --------------------------------------------------------------------
- TModifyPushConfigRequest
- --------------------------------------------------------------------}
-
- TModifyPushConfigRequest = Class(TGoogleBaseObject)
- Private
- FpushConfig : TPushConfig;
- Protected
- //Property setters
- Procedure SetpushConfig(AIndex : Integer; const AValue : TPushConfig); virtual;
- Public
- Published
- Property pushConfig : TPushConfig Index 0 Read FpushConfig Write SetpushConfig;
- end;
- TModifyPushConfigRequestClass = Class of TModifyPushConfigRequest;
-
- { --------------------------------------------------------------------
- TProjectsTopicsSubscriptionsResource
- --------------------------------------------------------------------}
-
-
- //Optional query Options for TProjectsTopicsSubscriptionsResource, method List
-
- TProjectsTopicsSubscriptionsListOptions = Record
- pageSize : integer;
- pageToken : String;
- end;
-
- TProjectsTopicsSubscriptionsResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function List(topic: string; AQuery : string = '') : TListTopicSubscriptionsResponse;
- Function List(topic: string; AQuery : TProjectsTopicsSubscriptionslistOptions) : TListTopicSubscriptionsResponse;
- end;
-
-
- { --------------------------------------------------------------------
- TProjectsTopicsResource
- --------------------------------------------------------------------}
-
-
- //Optional query Options for TProjectsTopicsResource, method List
-
- TProjectsTopicsListOptions = Record
- pageSize : integer;
- pageToken : String;
- end;
-
- TProjectsTopicsResource = Class(TGoogleResource)
- Private
- FSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
- Function GetSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;virtual;
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function SetIamPolicy(resource: string; aSetIamPolicyRequest : TSetIamPolicyRequest) : TPolicy;
- Function GetIamPolicy(resource: string) : TPolicy;
- Function TestIamPermissions(resource: string; aTestIamPermissionsRequest : TTestIamPermissionsRequest) : TTestIamPermissionsResponse;
- Function Create(_name: string; aTopic : TTopic) : TTopic;overload;
- Function Publish(topic: string; aPublishRequest : TPublishRequest) : TPublishResponse;
- Function Get(topic: string) : TTopic;
- Function List(project: string; AQuery : string = '') : TListTopicsResponse;
- Function List(project: string; AQuery : TProjectsTopicslistOptions) : TListTopicsResponse;
- Function Delete(topic: string) : TEmpty;
- Function CreateSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;virtual;overload;
- Function CreateSubscriptionsResource : TProjectsTopicsSubscriptionsResource;virtual;overload;
- Property SubscriptionsResource : TProjectsTopicsSubscriptionsResource Read GetSubscriptionsInstance;
- end;
-
-
- { --------------------------------------------------------------------
- TProjectsSubscriptionsResource
- --------------------------------------------------------------------}
-
-
- //Optional query Options for TProjectsSubscriptionsResource, method List
-
- TProjectsSubscriptionsListOptions = Record
- pageSize : integer;
- pageToken : String;
- end;
-
- TProjectsSubscriptionsResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function SetIamPolicy(resource: string; aSetIamPolicyRequest : TSetIamPolicyRequest) : TPolicy;
- Function GetIamPolicy(resource: string) : TPolicy;
- Function TestIamPermissions(resource: string; aTestIamPermissionsRequest : TTestIamPermissionsRequest) : TTestIamPermissionsResponse;
- Function Create(_name: string; aSubscription : TSubscription) : TSubscription;overload;
- Function Get(subscription: string) : TSubscription;
- Function List(project: string; AQuery : string = '') : TListSubscriptionsResponse;
- Function List(project: string; AQuery : TProjectsSubscriptionslistOptions) : TListSubscriptionsResponse;
- Function Delete(subscription: string) : TEmpty;
- Function ModifyAckDeadline(subscription: string; aModifyAckDeadlineRequest : TModifyAckDeadlineRequest) : TEmpty;
- Function Acknowledge(subscription: string; aAcknowledgeRequest : TAcknowledgeRequest) : TEmpty;
- Function Pull(subscription: string; aPullRequest : TPullRequest) : TPullResponse;
- Function ModifyPushConfig(subscription: string; aModifyPushConfigRequest : TModifyPushConfigRequest) : TEmpty;
- end;
-
-
- { --------------------------------------------------------------------
- TProjectsResource
- --------------------------------------------------------------------}
-
- TProjectsResource = Class(TGoogleResource)
- Private
- FTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
- FTopicsInstance : TProjectsTopicsResource;
- FSubscriptionsInstance : TProjectsSubscriptionsResource;
- Function GetTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;virtual;
- Function GetTopicsInstance : TProjectsTopicsResource;virtual;
- Function GetSubscriptionsInstance : TProjectsSubscriptionsResource;virtual;
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function CreateTopicsSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;virtual;overload;
- Function CreateTopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource;virtual;overload;
- Function CreateTopicsResource(AOwner : TComponent) : TProjectsTopicsResource;virtual;overload;
- Function CreateTopicsResource : TProjectsTopicsResource;virtual;overload;
- Function CreateSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;virtual;overload;
- Function CreateSubscriptionsResource : TProjectsSubscriptionsResource;virtual;overload;
- Property TopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource Read GetTopicsSubscriptionsInstance;
- Property TopicsResource : TProjectsTopicsResource Read GetTopicsInstance;
- Property SubscriptionsResource : TProjectsSubscriptionsResource Read GetSubscriptionsInstance;
- end;
-
-
- { --------------------------------------------------------------------
- TPubsubAPI
- --------------------------------------------------------------------}
-
- TPubsubAPI = Class(TGoogleAPI)
- Private
- FProjectsTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
- FProjectsTopicsInstance : TProjectsTopicsResource;
- FProjectsSubscriptionsInstance : TProjectsSubscriptionsResource;
- FProjectsInstance : TProjectsResource;
- Function GetProjectsTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;virtual;
- Function GetProjectsTopicsInstance : TProjectsTopicsResource;virtual;
- Function GetProjectsSubscriptionsInstance : TProjectsSubscriptionsResource;virtual;
- Function GetProjectsInstance : TProjectsResource;virtual;
- Public
- //Override class functions with API info
- Class Function APIName : String; override;
- Class Function APIVersion : String; override;
- Class Function APIRevision : String; override;
- Class Function APIID : String; override;
- Class Function APITitle : String; override;
- Class Function APIDescription : String; override;
- Class Function APIOwnerDomain : String; override;
- Class Function APIOwnerName : String; override;
- Class Function APIIcon16 : String; override;
- Class Function APIIcon32 : String; override;
- Class Function APIdocumentationLink : String; override;
- Class Function APIrootUrl : string; override;
- Class Function APIbasePath : string;override;
- Class Function APIbaseURL : String;override;
- Class Function APIProtocol : string;override;
- Class Function APIservicePath : string;override;
- Class Function APIbatchPath : String;override;
- Class Function APIAuthScopes : TScopeInfoArray;override;
- Class Function APINeedsAuth : Boolean;override;
- Class Procedure RegisterAPIResources; override;
- //Add create function for resources
- Function CreateProjectsTopicsSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;virtual;overload;
- Function CreateProjectsTopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource;virtual;overload;
- Function CreateProjectsTopicsResource(AOwner : TComponent) : TProjectsTopicsResource;virtual;overload;
- Function CreateProjectsTopicsResource : TProjectsTopicsResource;virtual;overload;
- Function CreateProjectsSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;virtual;overload;
- Function CreateProjectsSubscriptionsResource : TProjectsSubscriptionsResource;virtual;overload;
- Function CreateProjectsResource(AOwner : TComponent) : TProjectsResource;virtual;overload;
- Function CreateProjectsResource : TProjectsResource;virtual;overload;
- //Add default on-demand instances for resources
- Property ProjectsTopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource Read GetProjectsTopicsSubscriptionsInstance;
- Property ProjectsTopicsResource : TProjectsTopicsResource Read GetProjectsTopicsInstance;
- Property ProjectsSubscriptionsResource : TProjectsSubscriptionsResource Read GetProjectsSubscriptionsInstance;
- Property ProjectsResource : TProjectsResource Read GetProjectsInstance;
- end;
- implementation
- { --------------------------------------------------------------------
- TSetIamPolicyRequest
- --------------------------------------------------------------------}
- Procedure TSetIamPolicyRequest.Setpolicy(AIndex : Integer; const AValue : TPolicy);
- begin
- If (Fpolicy=AValue) then exit;
- Fpolicy:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TPolicy
- --------------------------------------------------------------------}
- Procedure TPolicy.Setversion(AIndex : Integer; const AValue : integer);
- begin
- If (Fversion=AValue) then exit;
- Fversion:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TPolicy.Setbindings(AIndex : Integer; const AValue : TPolicyTypebindingsArray);
- begin
- If (Fbindings=AValue) then exit;
- Fbindings:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TPolicy.Setetag(AIndex : Integer; const AValue : String);
- begin
- If (Fetag=AValue) then exit;
- Fetag:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TPolicy.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'bindings' : SetLength(Fbindings,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TBinding
- --------------------------------------------------------------------}
- Procedure TBinding.Setrole(AIndex : Integer; const AValue : String);
- begin
- If (Frole=AValue) then exit;
- Frole:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TBinding.Setmembers(AIndex : Integer; const AValue : TStringArray);
- begin
- If (Fmembers=AValue) then exit;
- Fmembers:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TBinding.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'members' : SetLength(Fmembers,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TTestIamPermissionsRequest
- --------------------------------------------------------------------}
- Procedure TTestIamPermissionsRequest.Setpermissions(AIndex : Integer; const AValue : TStringArray);
- begin
- If (Fpermissions=AValue) then exit;
- Fpermissions:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TTestIamPermissionsRequest.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'permissions' : SetLength(Fpermissions,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TTestIamPermissionsResponse
- --------------------------------------------------------------------}
- Procedure TTestIamPermissionsResponse.Setpermissions(AIndex : Integer; const AValue : TStringArray);
- begin
- If (Fpermissions=AValue) then exit;
- Fpermissions:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TTestIamPermissionsResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'permissions' : SetLength(Fpermissions,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TTopic
- --------------------------------------------------------------------}
- Procedure TTopic.Setname(AIndex : Integer; const AValue : String);
- begin
- If (Fname=AValue) then exit;
- Fname:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TPublishRequest
- --------------------------------------------------------------------}
- Procedure TPublishRequest.Setmessages(AIndex : Integer; const AValue : TPublishRequestTypemessagesArray);
- begin
- If (Fmessages=AValue) then exit;
- Fmessages:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TPublishRequest.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'messages' : SetLength(Fmessages,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TPubsubMessageTypeattributes
- --------------------------------------------------------------------}
- Class Function TPubsubMessageTypeattributes.AllowAdditionalProperties : Boolean;
- begin
- Result:=True;
- end;
- { --------------------------------------------------------------------
- TPubsubMessage
- --------------------------------------------------------------------}
- Procedure TPubsubMessage.Setdata(AIndex : Integer; const AValue : String);
- begin
- If (Fdata=AValue) then exit;
- Fdata:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TPubsubMessage.Setattributes(AIndex : Integer; const AValue : TPubsubMessageTypeattributes);
- begin
- If (Fattributes=AValue) then exit;
- Fattributes:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TPubsubMessage.SetmessageId(AIndex : Integer; const AValue : String);
- begin
- If (FmessageId=AValue) then exit;
- FmessageId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TPubsubMessage.SetpublishTime(AIndex : Integer; const AValue : String);
- begin
- If (FpublishTime=AValue) then exit;
- FpublishTime:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TPublishResponse
- --------------------------------------------------------------------}
- Procedure TPublishResponse.SetmessageIds(AIndex : Integer; const AValue : TStringArray);
- begin
- If (FmessageIds=AValue) then exit;
- FmessageIds:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TPublishResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'messageids' : SetLength(FmessageIds,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TListTopicsResponse
- --------------------------------------------------------------------}
- Procedure TListTopicsResponse.Settopics(AIndex : Integer; const AValue : TListTopicsResponseTypetopicsArray);
- begin
- If (Ftopics=AValue) then exit;
- Ftopics:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListTopicsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
- begin
- If (FnextPageToken=AValue) then exit;
- FnextPageToken:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TListTopicsResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'topics' : SetLength(Ftopics,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TListTopicSubscriptionsResponse
- --------------------------------------------------------------------}
- Procedure TListTopicSubscriptionsResponse.Setsubscriptions(AIndex : Integer; const AValue : TStringArray);
- begin
- If (Fsubscriptions=AValue) then exit;
- Fsubscriptions:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListTopicSubscriptionsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
- begin
- If (FnextPageToken=AValue) then exit;
- FnextPageToken:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TListTopicSubscriptionsResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'subscriptions' : SetLength(Fsubscriptions,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TEmpty
- --------------------------------------------------------------------}
- { --------------------------------------------------------------------
- TSubscription
- --------------------------------------------------------------------}
- Procedure TSubscription.Setname(AIndex : Integer; const AValue : String);
- begin
- If (Fname=AValue) then exit;
- Fname:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TSubscription.Settopic(AIndex : Integer; const AValue : String);
- begin
- If (Ftopic=AValue) then exit;
- Ftopic:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TSubscription.SetpushConfig(AIndex : Integer; const AValue : TPushConfig);
- begin
- If (FpushConfig=AValue) then exit;
- FpushConfig:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TSubscription.SetackDeadlineSeconds(AIndex : Integer; const AValue : integer);
- begin
- If (FackDeadlineSeconds=AValue) then exit;
- FackDeadlineSeconds:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TPushConfigTypeattributes
- --------------------------------------------------------------------}
- Class Function TPushConfigTypeattributes.AllowAdditionalProperties : Boolean;
- begin
- Result:=True;
- end;
- { --------------------------------------------------------------------
- TPushConfig
- --------------------------------------------------------------------}
- Procedure TPushConfig.SetpushEndpoint(AIndex : Integer; const AValue : String);
- begin
- If (FpushEndpoint=AValue) then exit;
- FpushEndpoint:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TPushConfig.Setattributes(AIndex : Integer; const AValue : TPushConfigTypeattributes);
- begin
- If (Fattributes=AValue) then exit;
- Fattributes:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TListSubscriptionsResponse
- --------------------------------------------------------------------}
- Procedure TListSubscriptionsResponse.Setsubscriptions(AIndex : Integer; const AValue : TListSubscriptionsResponseTypesubscriptionsArray);
- begin
- If (Fsubscriptions=AValue) then exit;
- Fsubscriptions:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListSubscriptionsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
- begin
- If (FnextPageToken=AValue) then exit;
- FnextPageToken:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TListSubscriptionsResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'subscriptions' : SetLength(Fsubscriptions,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TModifyAckDeadlineRequest
- --------------------------------------------------------------------}
- Procedure TModifyAckDeadlineRequest.SetackIds(AIndex : Integer; const AValue : TStringArray);
- begin
- If (FackIds=AValue) then exit;
- FackIds:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TModifyAckDeadlineRequest.SetackDeadlineSeconds(AIndex : Integer; const AValue : integer);
- begin
- If (FackDeadlineSeconds=AValue) then exit;
- FackDeadlineSeconds:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TModifyAckDeadlineRequest.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'ackids' : SetLength(FackIds,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TAcknowledgeRequest
- --------------------------------------------------------------------}
- Procedure TAcknowledgeRequest.SetackIds(AIndex : Integer; const AValue : TStringArray);
- begin
- If (FackIds=AValue) then exit;
- FackIds:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TAcknowledgeRequest.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'ackids' : SetLength(FackIds,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TPullRequest
- --------------------------------------------------------------------}
- Procedure TPullRequest.SetreturnImmediately(AIndex : Integer; const AValue : boolean);
- begin
- If (FreturnImmediately=AValue) then exit;
- FreturnImmediately:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TPullRequest.SetmaxMessages(AIndex : Integer; const AValue : integer);
- begin
- If (FmaxMessages=AValue) then exit;
- FmaxMessages:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TPullResponse
- --------------------------------------------------------------------}
- Procedure TPullResponse.SetreceivedMessages(AIndex : Integer; const AValue : TPullResponseTypereceivedMessagesArray);
- begin
- If (FreceivedMessages=AValue) then exit;
- FreceivedMessages:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TPullResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'receivedmessages' : SetLength(FreceivedMessages,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TReceivedMessage
- --------------------------------------------------------------------}
- Procedure TReceivedMessage.SetackId(AIndex : Integer; const AValue : String);
- begin
- If (FackId=AValue) then exit;
- FackId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReceivedMessage.Setmessage(AIndex : Integer; const AValue : TPubsubMessage);
- begin
- If (Fmessage=AValue) then exit;
- Fmessage:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TModifyPushConfigRequest
- --------------------------------------------------------------------}
- Procedure TModifyPushConfigRequest.SetpushConfig(AIndex : Integer; const AValue : TPushConfig);
- begin
- If (FpushConfig=AValue) then exit;
- FpushConfig:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TProjectsTopicsSubscriptionsResource
- --------------------------------------------------------------------}
- Class Function TProjectsTopicsSubscriptionsResource.ResourceName : String;
- begin
- Result:='subscriptions';
- end;
- Class Function TProjectsTopicsSubscriptionsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TpubsubAPI;
- end;
- Function TProjectsTopicsSubscriptionsResource.List(topic: string; AQuery : string = '') : TListTopicSubscriptionsResponse;
- Const
- _HTTPMethod = 'GET';
- _Path = 'v1/{+topic}/subscriptions';
- _Methodid = 'pubsub.projects.topics.subscriptions.list';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['topic',topic]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListTopicSubscriptionsResponse) as TListTopicSubscriptionsResponse;
- end;
- Function TProjectsTopicsSubscriptionsResource.List(topic: string; AQuery : TProjectsTopicsSubscriptionslistOptions) : TListTopicSubscriptionsResponse;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'pageSize',AQuery.pageSize);
- AddToQuery(_Q,'pageToken',AQuery.pageToken);
- Result:=List(topic,_Q);
- end;
- { --------------------------------------------------------------------
- TProjectsTopicsResource
- --------------------------------------------------------------------}
- Class Function TProjectsTopicsResource.ResourceName : String;
- begin
- Result:='topics';
- end;
- Class Function TProjectsTopicsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TpubsubAPI;
- end;
- Function TProjectsTopicsResource.SetIamPolicy(resource: string; aSetIamPolicyRequest : TSetIamPolicyRequest) : TPolicy;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+resource}:setIamPolicy';
- _Methodid = 'pubsub.projects.topics.setIamPolicy';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['resource',resource]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aSetIamPolicyRequest,TPolicy) as TPolicy;
- end;
- Function TProjectsTopicsResource.GetIamPolicy(resource: string) : TPolicy;
- Const
- _HTTPMethod = 'GET';
- _Path = 'v1/{+resource}:getIamPolicy';
- _Methodid = 'pubsub.projects.topics.getIamPolicy';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['resource',resource]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TPolicy) as TPolicy;
- end;
- Function TProjectsTopicsResource.TestIamPermissions(resource: string; aTestIamPermissionsRequest : TTestIamPermissionsRequest) : TTestIamPermissionsResponse;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+resource}:testIamPermissions';
- _Methodid = 'pubsub.projects.topics.testIamPermissions';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['resource',resource]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aTestIamPermissionsRequest,TTestIamPermissionsResponse) as TTestIamPermissionsResponse;
- end;
- Function TProjectsTopicsResource.Create(_name: string; aTopic : TTopic) : TTopic;
- Const
- _HTTPMethod = 'PUT';
- _Path = 'v1/{+name}';
- _Methodid = 'pubsub.projects.topics.create';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['name',_name]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aTopic,TTopic) as TTopic;
- end;
- Function TProjectsTopicsResource.Publish(topic: string; aPublishRequest : TPublishRequest) : TPublishResponse;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+topic}:publish';
- _Methodid = 'pubsub.projects.topics.publish';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['topic',topic]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aPublishRequest,TPublishResponse) as TPublishResponse;
- end;
- Function TProjectsTopicsResource.Get(topic: string) : TTopic;
- Const
- _HTTPMethod = 'GET';
- _Path = 'v1/{+topic}';
- _Methodid = 'pubsub.projects.topics.get';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['topic',topic]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TTopic) as TTopic;
- end;
- Function TProjectsTopicsResource.List(project: string; AQuery : string = '') : TListTopicsResponse;
- Const
- _HTTPMethod = 'GET';
- _Path = 'v1/{+project}/topics';
- _Methodid = 'pubsub.projects.topics.list';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['project',project]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListTopicsResponse) as TListTopicsResponse;
- end;
- Function TProjectsTopicsResource.List(project: string; AQuery : TProjectsTopicslistOptions) : TListTopicsResponse;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'pageSize',AQuery.pageSize);
- AddToQuery(_Q,'pageToken',AQuery.pageToken);
- Result:=List(project,_Q);
- end;
- Function TProjectsTopicsResource.Delete(topic: string) : TEmpty;
- Const
- _HTTPMethod = 'DELETE';
- _Path = 'v1/{+topic}';
- _Methodid = 'pubsub.projects.topics.delete';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['topic',topic]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
- end;
- Function TProjectsTopicsResource.GetSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
- begin
- if (FSubscriptionsInstance=Nil) then
- FSubscriptionsInstance:=CreateSubscriptionsResource;
- Result:=FSubscriptionsInstance;
- end;
- Function TProjectsTopicsResource.CreateSubscriptionsResource : TProjectsTopicsSubscriptionsResource;
- begin
- Result:=CreateSubscriptionsResource(Self);
- end;
- Function TProjectsTopicsResource.CreateSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;
- begin
- Result:=TProjectsTopicsSubscriptionsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- { --------------------------------------------------------------------
- TProjectsSubscriptionsResource
- --------------------------------------------------------------------}
- Class Function TProjectsSubscriptionsResource.ResourceName : String;
- begin
- Result:='subscriptions';
- end;
- Class Function TProjectsSubscriptionsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TpubsubAPI;
- end;
- Function TProjectsSubscriptionsResource.SetIamPolicy(resource: string; aSetIamPolicyRequest : TSetIamPolicyRequest) : TPolicy;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+resource}:setIamPolicy';
- _Methodid = 'pubsub.projects.subscriptions.setIamPolicy';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['resource',resource]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aSetIamPolicyRequest,TPolicy) as TPolicy;
- end;
- Function TProjectsSubscriptionsResource.GetIamPolicy(resource: string) : TPolicy;
- Const
- _HTTPMethod = 'GET';
- _Path = 'v1/{+resource}:getIamPolicy';
- _Methodid = 'pubsub.projects.subscriptions.getIamPolicy';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['resource',resource]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TPolicy) as TPolicy;
- end;
- Function TProjectsSubscriptionsResource.TestIamPermissions(resource: string; aTestIamPermissionsRequest : TTestIamPermissionsRequest) : TTestIamPermissionsResponse;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+resource}:testIamPermissions';
- _Methodid = 'pubsub.projects.subscriptions.testIamPermissions';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['resource',resource]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aTestIamPermissionsRequest,TTestIamPermissionsResponse) as TTestIamPermissionsResponse;
- end;
- Function TProjectsSubscriptionsResource.Create(_name: string; aSubscription : TSubscription) : TSubscription;
- Const
- _HTTPMethod = 'PUT';
- _Path = 'v1/{+name}';
- _Methodid = 'pubsub.projects.subscriptions.create';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['name',_name]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aSubscription,TSubscription) as TSubscription;
- end;
- Function TProjectsSubscriptionsResource.Get(subscription: string) : TSubscription;
- Const
- _HTTPMethod = 'GET';
- _Path = 'v1/{+subscription}';
- _Methodid = 'pubsub.projects.subscriptions.get';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['subscription',subscription]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TSubscription) as TSubscription;
- end;
- Function TProjectsSubscriptionsResource.List(project: string; AQuery : string = '') : TListSubscriptionsResponse;
- Const
- _HTTPMethod = 'GET';
- _Path = 'v1/{+project}/subscriptions';
- _Methodid = 'pubsub.projects.subscriptions.list';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['project',project]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListSubscriptionsResponse) as TListSubscriptionsResponse;
- end;
- Function TProjectsSubscriptionsResource.List(project: string; AQuery : TProjectsSubscriptionslistOptions) : TListSubscriptionsResponse;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'pageSize',AQuery.pageSize);
- AddToQuery(_Q,'pageToken',AQuery.pageToken);
- Result:=List(project,_Q);
- end;
- Function TProjectsSubscriptionsResource.Delete(subscription: string) : TEmpty;
- Const
- _HTTPMethod = 'DELETE';
- _Path = 'v1/{+subscription}';
- _Methodid = 'pubsub.projects.subscriptions.delete';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['subscription',subscription]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
- end;
- Function TProjectsSubscriptionsResource.ModifyAckDeadline(subscription: string; aModifyAckDeadlineRequest : TModifyAckDeadlineRequest) : TEmpty;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+subscription}:modifyAckDeadline';
- _Methodid = 'pubsub.projects.subscriptions.modifyAckDeadline';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['subscription',subscription]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aModifyAckDeadlineRequest,TEmpty) as TEmpty;
- end;
- Function TProjectsSubscriptionsResource.Acknowledge(subscription: string; aAcknowledgeRequest : TAcknowledgeRequest) : TEmpty;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+subscription}:acknowledge';
- _Methodid = 'pubsub.projects.subscriptions.acknowledge';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['subscription',subscription]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aAcknowledgeRequest,TEmpty) as TEmpty;
- end;
- Function TProjectsSubscriptionsResource.Pull(subscription: string; aPullRequest : TPullRequest) : TPullResponse;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+subscription}:pull';
- _Methodid = 'pubsub.projects.subscriptions.pull';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['subscription',subscription]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aPullRequest,TPullResponse) as TPullResponse;
- end;
- Function TProjectsSubscriptionsResource.ModifyPushConfig(subscription: string; aModifyPushConfigRequest : TModifyPushConfigRequest) : TEmpty;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v1/{+subscription}:modifyPushConfig';
- _Methodid = 'pubsub.projects.subscriptions.modifyPushConfig';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['subscription',subscription]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aModifyPushConfigRequest,TEmpty) as TEmpty;
- end;
- { --------------------------------------------------------------------
- TProjectsResource
- --------------------------------------------------------------------}
- Class Function TProjectsResource.ResourceName : String;
- begin
- Result:='projects';
- end;
- Class Function TProjectsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TpubsubAPI;
- end;
- Function TProjectsResource.GetTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
- begin
- if (FTopicsSubscriptionsInstance=Nil) then
- FTopicsSubscriptionsInstance:=CreateTopicsSubscriptionsResource;
- Result:=FTopicsSubscriptionsInstance;
- end;
- Function TProjectsResource.CreateTopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource;
- begin
- Result:=CreateTopicsSubscriptionsResource(Self);
- end;
- Function TProjectsResource.CreateTopicsSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;
- begin
- Result:=TProjectsTopicsSubscriptionsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TProjectsResource.GetTopicsInstance : TProjectsTopicsResource;
- begin
- if (FTopicsInstance=Nil) then
- FTopicsInstance:=CreateTopicsResource;
- Result:=FTopicsInstance;
- end;
- Function TProjectsResource.CreateTopicsResource : TProjectsTopicsResource;
- begin
- Result:=CreateTopicsResource(Self);
- end;
- Function TProjectsResource.CreateTopicsResource(AOwner : TComponent) : TProjectsTopicsResource;
- begin
- Result:=TProjectsTopicsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TProjectsResource.GetSubscriptionsInstance : TProjectsSubscriptionsResource;
- begin
- if (FSubscriptionsInstance=Nil) then
- FSubscriptionsInstance:=CreateSubscriptionsResource;
- Result:=FSubscriptionsInstance;
- end;
- Function TProjectsResource.CreateSubscriptionsResource : TProjectsSubscriptionsResource;
- begin
- Result:=CreateSubscriptionsResource(Self);
- end;
- Function TProjectsResource.CreateSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;
- begin
- Result:=TProjectsSubscriptionsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- { --------------------------------------------------------------------
- TPubsubAPI
- --------------------------------------------------------------------}
- Class Function TPubsubAPI.APIName : String;
- begin
- Result:='pubsub';
- end;
- Class Function TPubsubAPI.APIVersion : String;
- begin
- Result:='v1';
- end;
- Class Function TPubsubAPI.APIRevision : String;
- begin
- Result:='20160317';
- end;
- Class Function TPubsubAPI.APIID : String;
- begin
- Result:='pubsub:v1';
- end;
- Class Function TPubsubAPI.APITitle : String;
- begin
- Result:='Google Cloud Pub/Sub API';
- end;
- Class Function TPubsubAPI.APIDescription : String;
- begin
- Result:='Provides reliable, many-to-many, asynchronous messaging between applications.';
- end;
- Class Function TPubsubAPI.APIOwnerDomain : String;
- begin
- Result:='google.com';
- end;
- Class Function TPubsubAPI.APIOwnerName : String;
- begin
- Result:='Google';
- end;
- Class Function TPubsubAPI.APIIcon16 : String;
- begin
- Result:='http://www.google.com/images/icons/product/search-16.gif';
- end;
- Class Function TPubsubAPI.APIIcon32 : String;
- begin
- Result:='http://www.google.com/images/icons/product/search-32.gif';
- end;
- Class Function TPubsubAPI.APIdocumentationLink : String;
- begin
- Result:='https://cloud.google.com/pubsub/docs';
- end;
- Class Function TPubsubAPI.APIrootUrl : string;
- begin
- Result:='https://pubsub.googleapis.com/';
- end;
- Class Function TPubsubAPI.APIbasePath : string;
- begin
- Result:='';
- end;
- Class Function TPubsubAPI.APIbaseURL : String;
- begin
- Result:='https://pubsub.googleapis.com/';
- end;
- Class Function TPubsubAPI.APIProtocol : string;
- begin
- Result:='rest';
- end;
- Class Function TPubsubAPI.APIservicePath : string;
- begin
- Result:='';
- end;
- Class Function TPubsubAPI.APIbatchPath : String;
- begin
- Result:='batch';
- end;
- Class Function TPubsubAPI.APIAuthScopes : TScopeInfoArray;
- begin
- SetLength(Result,2);
- Result[0].Name:='https://www.googleapis.com/auth/cloud-platform';
- Result[0].Description:='View and manage your data across Google Cloud Platform services';
- Result[1].Name:='https://www.googleapis.com/auth/pubsub';
- Result[1].Description:='View and manage Pub/Sub topics and subscriptions';
-
- end;
- Class Function TPubsubAPI.APINeedsAuth : Boolean;
- begin
- Result:=True;
- end;
- Class Procedure TPubsubAPI.RegisterAPIResources;
- begin
- TSetIamPolicyRequest.RegisterObject;
- TPolicy.RegisterObject;
- TBinding.RegisterObject;
- TTestIamPermissionsRequest.RegisterObject;
- TTestIamPermissionsResponse.RegisterObject;
- TTopic.RegisterObject;
- TPublishRequest.RegisterObject;
- TPubsubMessageTypeattributes.RegisterObject;
- TPubsubMessage.RegisterObject;
- TPublishResponse.RegisterObject;
- TListTopicsResponse.RegisterObject;
- TListTopicSubscriptionsResponse.RegisterObject;
- TEmpty.RegisterObject;
- TSubscription.RegisterObject;
- TPushConfigTypeattributes.RegisterObject;
- TPushConfig.RegisterObject;
- TListSubscriptionsResponse.RegisterObject;
- TModifyAckDeadlineRequest.RegisterObject;
- TAcknowledgeRequest.RegisterObject;
- TPullRequest.RegisterObject;
- TPullResponse.RegisterObject;
- TReceivedMessage.RegisterObject;
- TModifyPushConfigRequest.RegisterObject;
- end;
- Function TPubsubAPI.GetProjectsTopicsSubscriptionsInstance : TProjectsTopicsSubscriptionsResource;
- begin
- if (FProjectsTopicsSubscriptionsInstance=Nil) then
- FProjectsTopicsSubscriptionsInstance:=CreateProjectsTopicsSubscriptionsResource;
- Result:=FProjectsTopicsSubscriptionsInstance;
- end;
- Function TPubsubAPI.CreateProjectsTopicsSubscriptionsResource : TProjectsTopicsSubscriptionsResource;
- begin
- Result:=CreateProjectsTopicsSubscriptionsResource(Self);
- end;
- Function TPubsubAPI.CreateProjectsTopicsSubscriptionsResource(AOwner : TComponent) : TProjectsTopicsSubscriptionsResource;
- begin
- Result:=TProjectsTopicsSubscriptionsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TPubsubAPI.GetProjectsTopicsInstance : TProjectsTopicsResource;
- begin
- if (FProjectsTopicsInstance=Nil) then
- FProjectsTopicsInstance:=CreateProjectsTopicsResource;
- Result:=FProjectsTopicsInstance;
- end;
- Function TPubsubAPI.CreateProjectsTopicsResource : TProjectsTopicsResource;
- begin
- Result:=CreateProjectsTopicsResource(Self);
- end;
- Function TPubsubAPI.CreateProjectsTopicsResource(AOwner : TComponent) : TProjectsTopicsResource;
- begin
- Result:=TProjectsTopicsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TPubsubAPI.GetProjectsSubscriptionsInstance : TProjectsSubscriptionsResource;
- begin
- if (FProjectsSubscriptionsInstance=Nil) then
- FProjectsSubscriptionsInstance:=CreateProjectsSubscriptionsResource;
- Result:=FProjectsSubscriptionsInstance;
- end;
- Function TPubsubAPI.CreateProjectsSubscriptionsResource : TProjectsSubscriptionsResource;
- begin
- Result:=CreateProjectsSubscriptionsResource(Self);
- end;
- Function TPubsubAPI.CreateProjectsSubscriptionsResource(AOwner : TComponent) : TProjectsSubscriptionsResource;
- begin
- Result:=TProjectsSubscriptionsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TPubsubAPI.GetProjectsInstance : TProjectsResource;
- begin
- if (FProjectsInstance=Nil) then
- FProjectsInstance:=CreateProjectsResource;
- Result:=FProjectsInstance;
- end;
- Function TPubsubAPI.CreateProjectsResource : TProjectsResource;
- begin
- Result:=CreateProjectsResource(Self);
- end;
- Function TPubsubAPI.CreateProjectsResource(AOwner : TComponent) : TProjectsResource;
- begin
- Result:=TProjectsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- initialization
- TPubsubAPI.RegisterAPI;
- end.
|