googledoubleclickbidmanager.pp 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214
  1. unit googledoubleclickbidmanager;
  2. {$MODE objfpc}
  3. {$H+}
  4. interface
  5. uses sysutils, classes, googleservice, restbase, googlebase;
  6. type
  7. //Top-level schema types
  8. TDownloadLineItemsRequest = Class;
  9. TDownloadLineItemsResponse = Class;
  10. TFilterPair = Class;
  11. TListQueriesResponse = Class;
  12. TListReportsResponse = Class;
  13. TNote = Class;
  14. TNotifyProposalChangeRequest = Class;
  15. TParameters = Class;
  16. TQuery = Class;
  17. TQueryMetadata = Class;
  18. TQuerySchedule = Class;
  19. TReport = Class;
  20. TReportFailure = Class;
  21. TReportKey = Class;
  22. TReportMetadata = Class;
  23. TReportStatus = Class;
  24. TRowStatus = Class;
  25. TRunQueryRequest = Class;
  26. TUploadLineItemsRequest = Class;
  27. TUploadLineItemsResponse = Class;
  28. TUploadStatus = Class;
  29. TDownloadLineItemsRequestArray = Array of TDownloadLineItemsRequest;
  30. TDownloadLineItemsResponseArray = Array of TDownloadLineItemsResponse;
  31. TFilterPairArray = Array of TFilterPair;
  32. TListQueriesResponseArray = Array of TListQueriesResponse;
  33. TListReportsResponseArray = Array of TListReportsResponse;
  34. TNoteArray = Array of TNote;
  35. TNotifyProposalChangeRequestArray = Array of TNotifyProposalChangeRequest;
  36. TParametersArray = Array of TParameters;
  37. TQueryArray = Array of TQuery;
  38. TQueryMetadataArray = Array of TQueryMetadata;
  39. TQueryScheduleArray = Array of TQuerySchedule;
  40. TReportArray = Array of TReport;
  41. TReportFailureArray = Array of TReportFailure;
  42. TReportKeyArray = Array of TReportKey;
  43. TReportMetadataArray = Array of TReportMetadata;
  44. TReportStatusArray = Array of TReportStatus;
  45. TRowStatusArray = Array of TRowStatus;
  46. TRunQueryRequestArray = Array of TRunQueryRequest;
  47. TUploadLineItemsRequestArray = Array of TUploadLineItemsRequest;
  48. TUploadLineItemsResponseArray = Array of TUploadLineItemsResponse;
  49. TUploadStatusArray = Array of TUploadStatus;
  50. //Anonymous types, using auto-generated names
  51. TListQueriesResponseTypequeriesArray = Array of TQuery;
  52. TListReportsResponseTypereportsArray = Array of TReport;
  53. TNotifyProposalChangeRequestTypenotesArray = Array of TNote;
  54. TParametersTypefiltersArray = Array of TFilterPair;
  55. TUploadStatusTyperowStatusArray = Array of TRowStatus;
  56. { --------------------------------------------------------------------
  57. TDownloadLineItemsRequest
  58. --------------------------------------------------------------------}
  59. TDownloadLineItemsRequest = Class(TGoogleBaseObject)
  60. Private
  61. FfileSpec : String;
  62. FfilterIds : TStringArray;
  63. FfilterType : String;
  64. Fformat : String;
  65. Protected
  66. //Property setters
  67. Procedure SetfileSpec(AIndex : Integer; const AValue : String); virtual;
  68. Procedure SetfilterIds(AIndex : Integer; const AValue : TStringArray); virtual;
  69. Procedure SetfilterType(AIndex : Integer; const AValue : String); virtual;
  70. Procedure Setformat(AIndex : Integer; const AValue : String); virtual;
  71. //2.6.4. bug workaround
  72. {$IFDEF VER2_6}
  73. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  74. {$ENDIF VER2_6}
  75. Public
  76. Published
  77. Property fileSpec : String Index 0 Read FfileSpec Write SetfileSpec;
  78. Property filterIds : TStringArray Index 8 Read FfilterIds Write SetfilterIds;
  79. Property filterType : String Index 16 Read FfilterType Write SetfilterType;
  80. Property format : String Index 24 Read Fformat Write Setformat;
  81. end;
  82. TDownloadLineItemsRequestClass = Class of TDownloadLineItemsRequest;
  83. { --------------------------------------------------------------------
  84. TDownloadLineItemsResponse
  85. --------------------------------------------------------------------}
  86. TDownloadLineItemsResponse = Class(TGoogleBaseObject)
  87. Private
  88. FlineItems : String;
  89. Protected
  90. //Property setters
  91. Procedure SetlineItems(AIndex : Integer; const AValue : String); virtual;
  92. Public
  93. Published
  94. Property lineItems : String Index 0 Read FlineItems Write SetlineItems;
  95. end;
  96. TDownloadLineItemsResponseClass = Class of TDownloadLineItemsResponse;
  97. { --------------------------------------------------------------------
  98. TFilterPair
  99. --------------------------------------------------------------------}
  100. TFilterPair = Class(TGoogleBaseObject)
  101. Private
  102. F_type : String;
  103. Fvalue : String;
  104. Protected
  105. Class Function ExportPropertyName(Const AName : String) : string; override;
  106. //Property setters
  107. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  108. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  109. Public
  110. Published
  111. Property _type : String Index 0 Read F_type Write Set_type;
  112. Property value : String Index 8 Read Fvalue Write Setvalue;
  113. end;
  114. TFilterPairClass = Class of TFilterPair;
  115. { --------------------------------------------------------------------
  116. TListQueriesResponse
  117. --------------------------------------------------------------------}
  118. TListQueriesResponse = Class(TGoogleBaseObject)
  119. Private
  120. Fkind : String;
  121. Fqueries : TListQueriesResponseTypequeriesArray;
  122. Protected
  123. //Property setters
  124. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  125. Procedure Setqueries(AIndex : Integer; const AValue : TListQueriesResponseTypequeriesArray); virtual;
  126. //2.6.4. bug workaround
  127. {$IFDEF VER2_6}
  128. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  129. {$ENDIF VER2_6}
  130. Public
  131. Published
  132. Property kind : String Index 0 Read Fkind Write Setkind;
  133. Property queries : TListQueriesResponseTypequeriesArray Index 8 Read Fqueries Write Setqueries;
  134. end;
  135. TListQueriesResponseClass = Class of TListQueriesResponse;
  136. { --------------------------------------------------------------------
  137. TListReportsResponse
  138. --------------------------------------------------------------------}
  139. TListReportsResponse = Class(TGoogleBaseObject)
  140. Private
  141. Fkind : String;
  142. Freports : TListReportsResponseTypereportsArray;
  143. Protected
  144. //Property setters
  145. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  146. Procedure Setreports(AIndex : Integer; const AValue : TListReportsResponseTypereportsArray); virtual;
  147. //2.6.4. bug workaround
  148. {$IFDEF VER2_6}
  149. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  150. {$ENDIF VER2_6}
  151. Public
  152. Published
  153. Property kind : String Index 0 Read Fkind Write Setkind;
  154. Property reports : TListReportsResponseTypereportsArray Index 8 Read Freports Write Setreports;
  155. end;
  156. TListReportsResponseClass = Class of TListReportsResponse;
  157. { --------------------------------------------------------------------
  158. TNote
  159. --------------------------------------------------------------------}
  160. TNote = Class(TGoogleBaseObject)
  161. Private
  162. Fid : String;
  163. Fmessage : String;
  164. Fsource : String;
  165. Ftimestamp : String;
  166. Fusername : String;
  167. Protected
  168. //Property setters
  169. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  170. Procedure Setmessage(AIndex : Integer; const AValue : String); virtual;
  171. Procedure Setsource(AIndex : Integer; const AValue : String); virtual;
  172. Procedure Settimestamp(AIndex : Integer; const AValue : String); virtual;
  173. Procedure Setusername(AIndex : Integer; const AValue : String); virtual;
  174. Public
  175. Published
  176. Property id : String Index 0 Read Fid Write Setid;
  177. Property message : String Index 8 Read Fmessage Write Setmessage;
  178. Property source : String Index 16 Read Fsource Write Setsource;
  179. Property timestamp : String Index 24 Read Ftimestamp Write Settimestamp;
  180. Property username : String Index 32 Read Fusername Write Setusername;
  181. end;
  182. TNoteClass = Class of TNote;
  183. { --------------------------------------------------------------------
  184. TNotifyProposalChangeRequest
  185. --------------------------------------------------------------------}
  186. TNotifyProposalChangeRequest = Class(TGoogleBaseObject)
  187. Private
  188. Faction : String;
  189. Fhref : String;
  190. Fid : String;
  191. Fnotes : TNotifyProposalChangeRequestTypenotesArray;
  192. Ftoken : String;
  193. Protected
  194. //Property setters
  195. Procedure Setaction(AIndex : Integer; const AValue : String); virtual;
  196. Procedure Sethref(AIndex : Integer; const AValue : String); virtual;
  197. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  198. Procedure Setnotes(AIndex : Integer; const AValue : TNotifyProposalChangeRequestTypenotesArray); virtual;
  199. Procedure Settoken(AIndex : Integer; const AValue : String); virtual;
  200. //2.6.4. bug workaround
  201. {$IFDEF VER2_6}
  202. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  203. {$ENDIF VER2_6}
  204. Public
  205. Published
  206. Property action : String Index 0 Read Faction Write Setaction;
  207. Property href : String Index 8 Read Fhref Write Sethref;
  208. Property id : String Index 16 Read Fid Write Setid;
  209. Property notes : TNotifyProposalChangeRequestTypenotesArray Index 24 Read Fnotes Write Setnotes;
  210. Property token : String Index 32 Read Ftoken Write Settoken;
  211. end;
  212. TNotifyProposalChangeRequestClass = Class of TNotifyProposalChangeRequest;
  213. { --------------------------------------------------------------------
  214. TParameters
  215. --------------------------------------------------------------------}
  216. TParameters = Class(TGoogleBaseObject)
  217. Private
  218. Ffilters : TParametersTypefiltersArray;
  219. FgroupBys : TStringArray;
  220. FincludeInviteData : boolean;
  221. Fmetrics : TStringArray;
  222. F_type : String;
  223. Protected
  224. Class Function ExportPropertyName(Const AName : String) : string; override;
  225. //Property setters
  226. Procedure Setfilters(AIndex : Integer; const AValue : TParametersTypefiltersArray); virtual;
  227. Procedure SetgroupBys(AIndex : Integer; const AValue : TStringArray); virtual;
  228. Procedure SetincludeInviteData(AIndex : Integer; const AValue : boolean); virtual;
  229. Procedure Setmetrics(AIndex : Integer; const AValue : TStringArray); virtual;
  230. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  231. //2.6.4. bug workaround
  232. {$IFDEF VER2_6}
  233. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  234. {$ENDIF VER2_6}
  235. Public
  236. Published
  237. Property filters : TParametersTypefiltersArray Index 0 Read Ffilters Write Setfilters;
  238. Property groupBys : TStringArray Index 8 Read FgroupBys Write SetgroupBys;
  239. Property includeInviteData : boolean Index 16 Read FincludeInviteData Write SetincludeInviteData;
  240. Property metrics : TStringArray Index 24 Read Fmetrics Write Setmetrics;
  241. Property _type : String Index 32 Read F_type Write Set_type;
  242. end;
  243. TParametersClass = Class of TParameters;
  244. { --------------------------------------------------------------------
  245. TQuery
  246. --------------------------------------------------------------------}
  247. TQuery = Class(TGoogleBaseObject)
  248. Private
  249. Fkind : String;
  250. Fmetadata : TQueryMetadata;
  251. Fparams : TParameters;
  252. FqueryId : String;
  253. FreportDataEndTimeMs : String;
  254. FreportDataStartTimeMs : String;
  255. Fschedule : TQuerySchedule;
  256. FtimezoneCode : String;
  257. Protected
  258. //Property setters
  259. Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
  260. Procedure Setmetadata(AIndex : Integer; const AValue : TQueryMetadata); virtual;
  261. Procedure Setparams(AIndex : Integer; const AValue : TParameters); virtual;
  262. Procedure SetqueryId(AIndex : Integer; const AValue : String); virtual;
  263. Procedure SetreportDataEndTimeMs(AIndex : Integer; const AValue : String); virtual;
  264. Procedure SetreportDataStartTimeMs(AIndex : Integer; const AValue : String); virtual;
  265. Procedure Setschedule(AIndex : Integer; const AValue : TQuerySchedule); virtual;
  266. Procedure SettimezoneCode(AIndex : Integer; const AValue : String); virtual;
  267. Public
  268. Published
  269. Property kind : String Index 0 Read Fkind Write Setkind;
  270. Property metadata : TQueryMetadata Index 8 Read Fmetadata Write Setmetadata;
  271. Property params : TParameters Index 16 Read Fparams Write Setparams;
  272. Property queryId : String Index 24 Read FqueryId Write SetqueryId;
  273. Property reportDataEndTimeMs : String Index 32 Read FreportDataEndTimeMs Write SetreportDataEndTimeMs;
  274. Property reportDataStartTimeMs : String Index 40 Read FreportDataStartTimeMs Write SetreportDataStartTimeMs;
  275. Property schedule : TQuerySchedule Index 48 Read Fschedule Write Setschedule;
  276. Property timezoneCode : String Index 56 Read FtimezoneCode Write SettimezoneCode;
  277. end;
  278. TQueryClass = Class of TQuery;
  279. { --------------------------------------------------------------------
  280. TQueryMetadata
  281. --------------------------------------------------------------------}
  282. TQueryMetadata = Class(TGoogleBaseObject)
  283. Private
  284. FdataRange : String;
  285. Fformat : String;
  286. FgoogleCloudStoragePathForLatestReport : String;
  287. FgoogleDrivePathForLatestReport : String;
  288. FlatestReportRunTimeMs : String;
  289. Flocale : String;
  290. FreportCount : integer;
  291. Frunning : boolean;
  292. FsendNotification : boolean;
  293. FshareEmailAddress : TStringArray;
  294. Ftitle : String;
  295. Protected
  296. //Property setters
  297. Procedure SetdataRange(AIndex : Integer; const AValue : String); virtual;
  298. Procedure Setformat(AIndex : Integer; const AValue : String); virtual;
  299. Procedure SetgoogleCloudStoragePathForLatestReport(AIndex : Integer; const AValue : String); virtual;
  300. Procedure SetgoogleDrivePathForLatestReport(AIndex : Integer; const AValue : String); virtual;
  301. Procedure SetlatestReportRunTimeMs(AIndex : Integer; const AValue : String); virtual;
  302. Procedure Setlocale(AIndex : Integer; const AValue : String); virtual;
  303. Procedure SetreportCount(AIndex : Integer; const AValue : integer); virtual;
  304. Procedure Setrunning(AIndex : Integer; const AValue : boolean); virtual;
  305. Procedure SetsendNotification(AIndex : Integer; const AValue : boolean); virtual;
  306. Procedure SetshareEmailAddress(AIndex : Integer; const AValue : TStringArray); virtual;
  307. Procedure Settitle(AIndex : Integer; const AValue : String); virtual;
  308. //2.6.4. bug workaround
  309. {$IFDEF VER2_6}
  310. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  311. {$ENDIF VER2_6}
  312. Public
  313. Published
  314. Property dataRange : String Index 0 Read FdataRange Write SetdataRange;
  315. Property format : String Index 8 Read Fformat Write Setformat;
  316. Property googleCloudStoragePathForLatestReport : String Index 16 Read FgoogleCloudStoragePathForLatestReport Write SetgoogleCloudStoragePathForLatestReport;
  317. Property googleDrivePathForLatestReport : String Index 24 Read FgoogleDrivePathForLatestReport Write SetgoogleDrivePathForLatestReport;
  318. Property latestReportRunTimeMs : String Index 32 Read FlatestReportRunTimeMs Write SetlatestReportRunTimeMs;
  319. Property locale : String Index 40 Read Flocale Write Setlocale;
  320. Property reportCount : integer Index 48 Read FreportCount Write SetreportCount;
  321. Property running : boolean Index 56 Read Frunning Write Setrunning;
  322. Property sendNotification : boolean Index 64 Read FsendNotification Write SetsendNotification;
  323. Property shareEmailAddress : TStringArray Index 72 Read FshareEmailAddress Write SetshareEmailAddress;
  324. Property title : String Index 80 Read Ftitle Write Settitle;
  325. end;
  326. TQueryMetadataClass = Class of TQueryMetadata;
  327. { --------------------------------------------------------------------
  328. TQuerySchedule
  329. --------------------------------------------------------------------}
  330. TQuerySchedule = Class(TGoogleBaseObject)
  331. Private
  332. FendTimeMs : String;
  333. Ffrequency : String;
  334. FnextRunMinuteOfDay : integer;
  335. FnextRunTimezoneCode : String;
  336. Protected
  337. //Property setters
  338. Procedure SetendTimeMs(AIndex : Integer; const AValue : String); virtual;
  339. Procedure Setfrequency(AIndex : Integer; const AValue : String); virtual;
  340. Procedure SetnextRunMinuteOfDay(AIndex : Integer; const AValue : integer); virtual;
  341. Procedure SetnextRunTimezoneCode(AIndex : Integer; const AValue : String); virtual;
  342. Public
  343. Published
  344. Property endTimeMs : String Index 0 Read FendTimeMs Write SetendTimeMs;
  345. Property frequency : String Index 8 Read Ffrequency Write Setfrequency;
  346. Property nextRunMinuteOfDay : integer Index 16 Read FnextRunMinuteOfDay Write SetnextRunMinuteOfDay;
  347. Property nextRunTimezoneCode : String Index 24 Read FnextRunTimezoneCode Write SetnextRunTimezoneCode;
  348. end;
  349. TQueryScheduleClass = Class of TQuerySchedule;
  350. { --------------------------------------------------------------------
  351. TReport
  352. --------------------------------------------------------------------}
  353. TReport = Class(TGoogleBaseObject)
  354. Private
  355. Fkey : TReportKey;
  356. Fmetadata : TReportMetadata;
  357. Fparams : TParameters;
  358. Protected
  359. //Property setters
  360. Procedure Setkey(AIndex : Integer; const AValue : TReportKey); virtual;
  361. Procedure Setmetadata(AIndex : Integer; const AValue : TReportMetadata); virtual;
  362. Procedure Setparams(AIndex : Integer; const AValue : TParameters); virtual;
  363. Public
  364. Published
  365. Property key : TReportKey Index 0 Read Fkey Write Setkey;
  366. Property metadata : TReportMetadata Index 8 Read Fmetadata Write Setmetadata;
  367. Property params : TParameters Index 16 Read Fparams Write Setparams;
  368. end;
  369. TReportClass = Class of TReport;
  370. { --------------------------------------------------------------------
  371. TReportFailure
  372. --------------------------------------------------------------------}
  373. TReportFailure = Class(TGoogleBaseObject)
  374. Private
  375. FerrorCode : String;
  376. Protected
  377. //Property setters
  378. Procedure SeterrorCode(AIndex : Integer; const AValue : String); virtual;
  379. Public
  380. Published
  381. Property errorCode : String Index 0 Read FerrorCode Write SeterrorCode;
  382. end;
  383. TReportFailureClass = Class of TReportFailure;
  384. { --------------------------------------------------------------------
  385. TReportKey
  386. --------------------------------------------------------------------}
  387. TReportKey = Class(TGoogleBaseObject)
  388. Private
  389. FqueryId : String;
  390. FreportId : String;
  391. Protected
  392. //Property setters
  393. Procedure SetqueryId(AIndex : Integer; const AValue : String); virtual;
  394. Procedure SetreportId(AIndex : Integer; const AValue : String); virtual;
  395. Public
  396. Published
  397. Property queryId : String Index 0 Read FqueryId Write SetqueryId;
  398. Property reportId : String Index 8 Read FreportId Write SetreportId;
  399. end;
  400. TReportKeyClass = Class of TReportKey;
  401. { --------------------------------------------------------------------
  402. TReportMetadata
  403. --------------------------------------------------------------------}
  404. TReportMetadata = Class(TGoogleBaseObject)
  405. Private
  406. FgoogleCloudStoragePath : String;
  407. FreportDataEndTimeMs : String;
  408. FreportDataStartTimeMs : String;
  409. Fstatus : TReportStatus;
  410. Protected
  411. //Property setters
  412. Procedure SetgoogleCloudStoragePath(AIndex : Integer; const AValue : String); virtual;
  413. Procedure SetreportDataEndTimeMs(AIndex : Integer; const AValue : String); virtual;
  414. Procedure SetreportDataStartTimeMs(AIndex : Integer; const AValue : String); virtual;
  415. Procedure Setstatus(AIndex : Integer; const AValue : TReportStatus); virtual;
  416. Public
  417. Published
  418. Property googleCloudStoragePath : String Index 0 Read FgoogleCloudStoragePath Write SetgoogleCloudStoragePath;
  419. Property reportDataEndTimeMs : String Index 8 Read FreportDataEndTimeMs Write SetreportDataEndTimeMs;
  420. Property reportDataStartTimeMs : String Index 16 Read FreportDataStartTimeMs Write SetreportDataStartTimeMs;
  421. Property status : TReportStatus Index 24 Read Fstatus Write Setstatus;
  422. end;
  423. TReportMetadataClass = Class of TReportMetadata;
  424. { --------------------------------------------------------------------
  425. TReportStatus
  426. --------------------------------------------------------------------}
  427. TReportStatus = Class(TGoogleBaseObject)
  428. Private
  429. Ffailure : TReportFailure;
  430. FfinishTimeMs : String;
  431. Fformat : String;
  432. Fstate : String;
  433. Protected
  434. //Property setters
  435. Procedure Setfailure(AIndex : Integer; const AValue : TReportFailure); virtual;
  436. Procedure SetfinishTimeMs(AIndex : Integer; const AValue : String); virtual;
  437. Procedure Setformat(AIndex : Integer; const AValue : String); virtual;
  438. Procedure Setstate(AIndex : Integer; const AValue : String); virtual;
  439. Public
  440. Published
  441. Property failure : TReportFailure Index 0 Read Ffailure Write Setfailure;
  442. Property finishTimeMs : String Index 8 Read FfinishTimeMs Write SetfinishTimeMs;
  443. Property format : String Index 16 Read Fformat Write Setformat;
  444. Property state : String Index 24 Read Fstate Write Setstate;
  445. end;
  446. TReportStatusClass = Class of TReportStatus;
  447. { --------------------------------------------------------------------
  448. TRowStatus
  449. --------------------------------------------------------------------}
  450. TRowStatus = Class(TGoogleBaseObject)
  451. Private
  452. Fchanged : boolean;
  453. FentityId : String;
  454. FentityName : String;
  455. Ferrors : TStringArray;
  456. Fpersisted : boolean;
  457. FrowNumber : integer;
  458. Protected
  459. //Property setters
  460. Procedure Setchanged(AIndex : Integer; const AValue : boolean); virtual;
  461. Procedure SetentityId(AIndex : Integer; const AValue : String); virtual;
  462. Procedure SetentityName(AIndex : Integer; const AValue : String); virtual;
  463. Procedure Seterrors(AIndex : Integer; const AValue : TStringArray); virtual;
  464. Procedure Setpersisted(AIndex : Integer; const AValue : boolean); virtual;
  465. Procedure SetrowNumber(AIndex : Integer; const AValue : integer); virtual;
  466. //2.6.4. bug workaround
  467. {$IFDEF VER2_6}
  468. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  469. {$ENDIF VER2_6}
  470. Public
  471. Published
  472. Property changed : boolean Index 0 Read Fchanged Write Setchanged;
  473. Property entityId : String Index 8 Read FentityId Write SetentityId;
  474. Property entityName : String Index 16 Read FentityName Write SetentityName;
  475. Property errors : TStringArray Index 24 Read Ferrors Write Seterrors;
  476. Property persisted : boolean Index 32 Read Fpersisted Write Setpersisted;
  477. Property rowNumber : integer Index 40 Read FrowNumber Write SetrowNumber;
  478. end;
  479. TRowStatusClass = Class of TRowStatus;
  480. { --------------------------------------------------------------------
  481. TRunQueryRequest
  482. --------------------------------------------------------------------}
  483. TRunQueryRequest = Class(TGoogleBaseObject)
  484. Private
  485. FdataRange : String;
  486. FreportDataEndTimeMs : String;
  487. FreportDataStartTimeMs : String;
  488. FtimezoneCode : String;
  489. Protected
  490. //Property setters
  491. Procedure SetdataRange(AIndex : Integer; const AValue : String); virtual;
  492. Procedure SetreportDataEndTimeMs(AIndex : Integer; const AValue : String); virtual;
  493. Procedure SetreportDataStartTimeMs(AIndex : Integer; const AValue : String); virtual;
  494. Procedure SettimezoneCode(AIndex : Integer; const AValue : String); virtual;
  495. Public
  496. Published
  497. Property dataRange : String Index 0 Read FdataRange Write SetdataRange;
  498. Property reportDataEndTimeMs : String Index 8 Read FreportDataEndTimeMs Write SetreportDataEndTimeMs;
  499. Property reportDataStartTimeMs : String Index 16 Read FreportDataStartTimeMs Write SetreportDataStartTimeMs;
  500. Property timezoneCode : String Index 24 Read FtimezoneCode Write SettimezoneCode;
  501. end;
  502. TRunQueryRequestClass = Class of TRunQueryRequest;
  503. { --------------------------------------------------------------------
  504. TUploadLineItemsRequest
  505. --------------------------------------------------------------------}
  506. TUploadLineItemsRequest = Class(TGoogleBaseObject)
  507. Private
  508. FdryRun : boolean;
  509. Fformat : String;
  510. FlineItems : String;
  511. Protected
  512. //Property setters
  513. Procedure SetdryRun(AIndex : Integer; const AValue : boolean); virtual;
  514. Procedure Setformat(AIndex : Integer; const AValue : String); virtual;
  515. Procedure SetlineItems(AIndex : Integer; const AValue : String); virtual;
  516. Public
  517. Published
  518. Property dryRun : boolean Index 0 Read FdryRun Write SetdryRun;
  519. Property format : String Index 8 Read Fformat Write Setformat;
  520. Property lineItems : String Index 16 Read FlineItems Write SetlineItems;
  521. end;
  522. TUploadLineItemsRequestClass = Class of TUploadLineItemsRequest;
  523. { --------------------------------------------------------------------
  524. TUploadLineItemsResponse
  525. --------------------------------------------------------------------}
  526. TUploadLineItemsResponse = Class(TGoogleBaseObject)
  527. Private
  528. FuploadStatus : TUploadStatus;
  529. Protected
  530. //Property setters
  531. Procedure SetuploadStatus(AIndex : Integer; const AValue : TUploadStatus); virtual;
  532. Public
  533. Published
  534. Property uploadStatus : TUploadStatus Index 0 Read FuploadStatus Write SetuploadStatus;
  535. end;
  536. TUploadLineItemsResponseClass = Class of TUploadLineItemsResponse;
  537. { --------------------------------------------------------------------
  538. TUploadStatus
  539. --------------------------------------------------------------------}
  540. TUploadStatus = Class(TGoogleBaseObject)
  541. Private
  542. Ferrors : TStringArray;
  543. FrowStatus : TUploadStatusTyperowStatusArray;
  544. Protected
  545. //Property setters
  546. Procedure Seterrors(AIndex : Integer; const AValue : TStringArray); virtual;
  547. Procedure SetrowStatus(AIndex : Integer; const AValue : TUploadStatusTyperowStatusArray); virtual;
  548. //2.6.4. bug workaround
  549. {$IFDEF VER2_6}
  550. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  551. {$ENDIF VER2_6}
  552. Public
  553. Published
  554. Property errors : TStringArray Index 0 Read Ferrors Write Seterrors;
  555. Property rowStatus : TUploadStatusTyperowStatusArray Index 8 Read FrowStatus Write SetrowStatus;
  556. end;
  557. TUploadStatusClass = Class of TUploadStatus;
  558. { --------------------------------------------------------------------
  559. TLineitemsResource
  560. --------------------------------------------------------------------}
  561. TLineitemsResource = Class(TGoogleResource)
  562. Public
  563. Class Function ResourceName : String; override;
  564. Class Function DefaultAPI : TGoogleAPIClass; override;
  565. Function Downloadlineitems(aDownloadLineItemsRequest : TDownloadLineItemsRequest) : TDownloadLineItemsResponse;
  566. Function Uploadlineitems(aUploadLineItemsRequest : TUploadLineItemsRequest) : TUploadLineItemsResponse;
  567. end;
  568. { --------------------------------------------------------------------
  569. TQueriesResource
  570. --------------------------------------------------------------------}
  571. TQueriesResource = Class(TGoogleResource)
  572. Public
  573. Class Function ResourceName : String; override;
  574. Class Function DefaultAPI : TGoogleAPIClass; override;
  575. Function Createquery(aQuery : TQuery) : TQuery;
  576. Procedure Deletequery(queryId: string);
  577. Function Getquery(queryId: string) : TQuery;
  578. Function Listqueries : TListQueriesResponse;
  579. Procedure Runquery(queryId: string; aRunQueryRequest : TRunQueryRequest);
  580. end;
  581. { --------------------------------------------------------------------
  582. TReportsResource
  583. --------------------------------------------------------------------}
  584. TReportsResource = Class(TGoogleResource)
  585. Public
  586. Class Function ResourceName : String; override;
  587. Class Function DefaultAPI : TGoogleAPIClass; override;
  588. Function Listreports(queryId: string) : TListReportsResponse;
  589. end;
  590. { --------------------------------------------------------------------
  591. TRubiconResource
  592. --------------------------------------------------------------------}
  593. TRubiconResource = Class(TGoogleResource)
  594. Public
  595. Class Function ResourceName : String; override;
  596. Class Function DefaultAPI : TGoogleAPIClass; override;
  597. Procedure Notifyproposalchange(aNotifyProposalChangeRequest : TNotifyProposalChangeRequest);
  598. end;
  599. { --------------------------------------------------------------------
  600. TDoubleclickbidmanagerAPI
  601. --------------------------------------------------------------------}
  602. TDoubleclickbidmanagerAPI = Class(TGoogleAPI)
  603. Private
  604. FLineitemsInstance : TLineitemsResource;
  605. FQueriesInstance : TQueriesResource;
  606. FReportsInstance : TReportsResource;
  607. FRubiconInstance : TRubiconResource;
  608. Function GetLineitemsInstance : TLineitemsResource;virtual;
  609. Function GetQueriesInstance : TQueriesResource;virtual;
  610. Function GetReportsInstance : TReportsResource;virtual;
  611. Function GetRubiconInstance : TRubiconResource;virtual;
  612. Public
  613. //Override class functions with API info
  614. Class Function APIName : String; override;
  615. Class Function APIVersion : String; override;
  616. Class Function APIRevision : String; override;
  617. Class Function APIID : String; override;
  618. Class Function APITitle : String; override;
  619. Class Function APIDescription : String; override;
  620. Class Function APIOwnerDomain : String; override;
  621. Class Function APIOwnerName : String; override;
  622. Class Function APIIcon16 : String; override;
  623. Class Function APIIcon32 : String; override;
  624. Class Function APIdocumentationLink : String; override;
  625. Class Function APIrootUrl : string; override;
  626. Class Function APIbasePath : string;override;
  627. Class Function APIbaseURL : String;override;
  628. Class Function APIProtocol : string;override;
  629. Class Function APIservicePath : string;override;
  630. Class Function APIbatchPath : String;override;
  631. Class Function APIAuthScopes : TScopeInfoArray;override;
  632. Class Function APINeedsAuth : Boolean;override;
  633. Class Procedure RegisterAPIResources; override;
  634. //Add create function for resources
  635. Function CreateLineitemsResource(AOwner : TComponent) : TLineitemsResource;virtual;overload;
  636. Function CreateLineitemsResource : TLineitemsResource;virtual;overload;
  637. Function CreateQueriesResource(AOwner : TComponent) : TQueriesResource;virtual;overload;
  638. Function CreateQueriesResource : TQueriesResource;virtual;overload;
  639. Function CreateReportsResource(AOwner : TComponent) : TReportsResource;virtual;overload;
  640. Function CreateReportsResource : TReportsResource;virtual;overload;
  641. Function CreateRubiconResource(AOwner : TComponent) : TRubiconResource;virtual;overload;
  642. Function CreateRubiconResource : TRubiconResource;virtual;overload;
  643. //Add default on-demand instances for resources
  644. Property LineitemsResource : TLineitemsResource Read GetLineitemsInstance;
  645. Property QueriesResource : TQueriesResource Read GetQueriesInstance;
  646. Property ReportsResource : TReportsResource Read GetReportsInstance;
  647. Property RubiconResource : TRubiconResource Read GetRubiconInstance;
  648. end;
  649. implementation
  650. { --------------------------------------------------------------------
  651. TDownloadLineItemsRequest
  652. --------------------------------------------------------------------}
  653. Procedure TDownloadLineItemsRequest.SetfileSpec(AIndex : Integer; const AValue : String);
  654. begin
  655. If (FfileSpec=AValue) then exit;
  656. FfileSpec:=AValue;
  657. MarkPropertyChanged(AIndex);
  658. end;
  659. Procedure TDownloadLineItemsRequest.SetfilterIds(AIndex : Integer; const AValue : TStringArray);
  660. begin
  661. If (FfilterIds=AValue) then exit;
  662. FfilterIds:=AValue;
  663. MarkPropertyChanged(AIndex);
  664. end;
  665. Procedure TDownloadLineItemsRequest.SetfilterType(AIndex : Integer; const AValue : String);
  666. begin
  667. If (FfilterType=AValue) then exit;
  668. FfilterType:=AValue;
  669. MarkPropertyChanged(AIndex);
  670. end;
  671. Procedure TDownloadLineItemsRequest.Setformat(AIndex : Integer; const AValue : String);
  672. begin
  673. If (Fformat=AValue) then exit;
  674. Fformat:=AValue;
  675. MarkPropertyChanged(AIndex);
  676. end;
  677. //2.6.4. bug workaround
  678. {$IFDEF VER2_6}
  679. Procedure TDownloadLineItemsRequest.SetArrayLength(Const AName : String; ALength : Longint);
  680. begin
  681. Case AName of
  682. 'filterids' : SetLength(FfilterIds,ALength);
  683. else
  684. Inherited SetArrayLength(AName,ALength);
  685. end;
  686. end;
  687. {$ENDIF VER2_6}
  688. { --------------------------------------------------------------------
  689. TDownloadLineItemsResponse
  690. --------------------------------------------------------------------}
  691. Procedure TDownloadLineItemsResponse.SetlineItems(AIndex : Integer; const AValue : String);
  692. begin
  693. If (FlineItems=AValue) then exit;
  694. FlineItems:=AValue;
  695. MarkPropertyChanged(AIndex);
  696. end;
  697. { --------------------------------------------------------------------
  698. TFilterPair
  699. --------------------------------------------------------------------}
  700. Procedure TFilterPair.Set_type(AIndex : Integer; const AValue : String);
  701. begin
  702. If (F_type=AValue) then exit;
  703. F_type:=AValue;
  704. MarkPropertyChanged(AIndex);
  705. end;
  706. Procedure TFilterPair.Setvalue(AIndex : Integer; const AValue : String);
  707. begin
  708. If (Fvalue=AValue) then exit;
  709. Fvalue:=AValue;
  710. MarkPropertyChanged(AIndex);
  711. end;
  712. Class Function TFilterPair.ExportPropertyName(Const AName : String) :String;
  713. begin
  714. Case AName of
  715. '_type' : Result:='type';
  716. else
  717. Result:=Inherited ExportPropertyName(AName);
  718. end;
  719. end;
  720. { --------------------------------------------------------------------
  721. TListQueriesResponse
  722. --------------------------------------------------------------------}
  723. Procedure TListQueriesResponse.Setkind(AIndex : Integer; const AValue : String);
  724. begin
  725. If (Fkind=AValue) then exit;
  726. Fkind:=AValue;
  727. MarkPropertyChanged(AIndex);
  728. end;
  729. Procedure TListQueriesResponse.Setqueries(AIndex : Integer; const AValue : TListQueriesResponseTypequeriesArray);
  730. begin
  731. If (Fqueries=AValue) then exit;
  732. Fqueries:=AValue;
  733. MarkPropertyChanged(AIndex);
  734. end;
  735. //2.6.4. bug workaround
  736. {$IFDEF VER2_6}
  737. Procedure TListQueriesResponse.SetArrayLength(Const AName : String; ALength : Longint);
  738. begin
  739. Case AName of
  740. 'queries' : SetLength(Fqueries,ALength);
  741. else
  742. Inherited SetArrayLength(AName,ALength);
  743. end;
  744. end;
  745. {$ENDIF VER2_6}
  746. { --------------------------------------------------------------------
  747. TListReportsResponse
  748. --------------------------------------------------------------------}
  749. Procedure TListReportsResponse.Setkind(AIndex : Integer; const AValue : String);
  750. begin
  751. If (Fkind=AValue) then exit;
  752. Fkind:=AValue;
  753. MarkPropertyChanged(AIndex);
  754. end;
  755. Procedure TListReportsResponse.Setreports(AIndex : Integer; const AValue : TListReportsResponseTypereportsArray);
  756. begin
  757. If (Freports=AValue) then exit;
  758. Freports:=AValue;
  759. MarkPropertyChanged(AIndex);
  760. end;
  761. //2.6.4. bug workaround
  762. {$IFDEF VER2_6}
  763. Procedure TListReportsResponse.SetArrayLength(Const AName : String; ALength : Longint);
  764. begin
  765. Case AName of
  766. 'reports' : SetLength(Freports,ALength);
  767. else
  768. Inherited SetArrayLength(AName,ALength);
  769. end;
  770. end;
  771. {$ENDIF VER2_6}
  772. { --------------------------------------------------------------------
  773. TNote
  774. --------------------------------------------------------------------}
  775. Procedure TNote.Setid(AIndex : Integer; const AValue : String);
  776. begin
  777. If (Fid=AValue) then exit;
  778. Fid:=AValue;
  779. MarkPropertyChanged(AIndex);
  780. end;
  781. Procedure TNote.Setmessage(AIndex : Integer; const AValue : String);
  782. begin
  783. If (Fmessage=AValue) then exit;
  784. Fmessage:=AValue;
  785. MarkPropertyChanged(AIndex);
  786. end;
  787. Procedure TNote.Setsource(AIndex : Integer; const AValue : String);
  788. begin
  789. If (Fsource=AValue) then exit;
  790. Fsource:=AValue;
  791. MarkPropertyChanged(AIndex);
  792. end;
  793. Procedure TNote.Settimestamp(AIndex : Integer; const AValue : String);
  794. begin
  795. If (Ftimestamp=AValue) then exit;
  796. Ftimestamp:=AValue;
  797. MarkPropertyChanged(AIndex);
  798. end;
  799. Procedure TNote.Setusername(AIndex : Integer; const AValue : String);
  800. begin
  801. If (Fusername=AValue) then exit;
  802. Fusername:=AValue;
  803. MarkPropertyChanged(AIndex);
  804. end;
  805. { --------------------------------------------------------------------
  806. TNotifyProposalChangeRequest
  807. --------------------------------------------------------------------}
  808. Procedure TNotifyProposalChangeRequest.Setaction(AIndex : Integer; const AValue : String);
  809. begin
  810. If (Faction=AValue) then exit;
  811. Faction:=AValue;
  812. MarkPropertyChanged(AIndex);
  813. end;
  814. Procedure TNotifyProposalChangeRequest.Sethref(AIndex : Integer; const AValue : String);
  815. begin
  816. If (Fhref=AValue) then exit;
  817. Fhref:=AValue;
  818. MarkPropertyChanged(AIndex);
  819. end;
  820. Procedure TNotifyProposalChangeRequest.Setid(AIndex : Integer; const AValue : String);
  821. begin
  822. If (Fid=AValue) then exit;
  823. Fid:=AValue;
  824. MarkPropertyChanged(AIndex);
  825. end;
  826. Procedure TNotifyProposalChangeRequest.Setnotes(AIndex : Integer; const AValue : TNotifyProposalChangeRequestTypenotesArray);
  827. begin
  828. If (Fnotes=AValue) then exit;
  829. Fnotes:=AValue;
  830. MarkPropertyChanged(AIndex);
  831. end;
  832. Procedure TNotifyProposalChangeRequest.Settoken(AIndex : Integer; const AValue : String);
  833. begin
  834. If (Ftoken=AValue) then exit;
  835. Ftoken:=AValue;
  836. MarkPropertyChanged(AIndex);
  837. end;
  838. //2.6.4. bug workaround
  839. {$IFDEF VER2_6}
  840. Procedure TNotifyProposalChangeRequest.SetArrayLength(Const AName : String; ALength : Longint);
  841. begin
  842. Case AName of
  843. 'notes' : SetLength(Fnotes,ALength);
  844. else
  845. Inherited SetArrayLength(AName,ALength);
  846. end;
  847. end;
  848. {$ENDIF VER2_6}
  849. { --------------------------------------------------------------------
  850. TParameters
  851. --------------------------------------------------------------------}
  852. Procedure TParameters.Setfilters(AIndex : Integer; const AValue : TParametersTypefiltersArray);
  853. begin
  854. If (Ffilters=AValue) then exit;
  855. Ffilters:=AValue;
  856. MarkPropertyChanged(AIndex);
  857. end;
  858. Procedure TParameters.SetgroupBys(AIndex : Integer; const AValue : TStringArray);
  859. begin
  860. If (FgroupBys=AValue) then exit;
  861. FgroupBys:=AValue;
  862. MarkPropertyChanged(AIndex);
  863. end;
  864. Procedure TParameters.SetincludeInviteData(AIndex : Integer; const AValue : boolean);
  865. begin
  866. If (FincludeInviteData=AValue) then exit;
  867. FincludeInviteData:=AValue;
  868. MarkPropertyChanged(AIndex);
  869. end;
  870. Procedure TParameters.Setmetrics(AIndex : Integer; const AValue : TStringArray);
  871. begin
  872. If (Fmetrics=AValue) then exit;
  873. Fmetrics:=AValue;
  874. MarkPropertyChanged(AIndex);
  875. end;
  876. Procedure TParameters.Set_type(AIndex : Integer; const AValue : String);
  877. begin
  878. If (F_type=AValue) then exit;
  879. F_type:=AValue;
  880. MarkPropertyChanged(AIndex);
  881. end;
  882. Class Function TParameters.ExportPropertyName(Const AName : String) :String;
  883. begin
  884. Case AName of
  885. '_type' : Result:='type';
  886. else
  887. Result:=Inherited ExportPropertyName(AName);
  888. end;
  889. end;
  890. //2.6.4. bug workaround
  891. {$IFDEF VER2_6}
  892. Procedure TParameters.SetArrayLength(Const AName : String; ALength : Longint);
  893. begin
  894. Case AName of
  895. 'filters' : SetLength(Ffilters,ALength);
  896. 'groupbys' : SetLength(FgroupBys,ALength);
  897. 'metrics' : SetLength(Fmetrics,ALength);
  898. else
  899. Inherited SetArrayLength(AName,ALength);
  900. end;
  901. end;
  902. {$ENDIF VER2_6}
  903. { --------------------------------------------------------------------
  904. TQuery
  905. --------------------------------------------------------------------}
  906. Procedure TQuery.Setkind(AIndex : Integer; const AValue : String);
  907. begin
  908. If (Fkind=AValue) then exit;
  909. Fkind:=AValue;
  910. MarkPropertyChanged(AIndex);
  911. end;
  912. Procedure TQuery.Setmetadata(AIndex : Integer; const AValue : TQueryMetadata);
  913. begin
  914. If (Fmetadata=AValue) then exit;
  915. Fmetadata:=AValue;
  916. MarkPropertyChanged(AIndex);
  917. end;
  918. Procedure TQuery.Setparams(AIndex : Integer; const AValue : TParameters);
  919. begin
  920. If (Fparams=AValue) then exit;
  921. Fparams:=AValue;
  922. MarkPropertyChanged(AIndex);
  923. end;
  924. Procedure TQuery.SetqueryId(AIndex : Integer; const AValue : String);
  925. begin
  926. If (FqueryId=AValue) then exit;
  927. FqueryId:=AValue;
  928. MarkPropertyChanged(AIndex);
  929. end;
  930. Procedure TQuery.SetreportDataEndTimeMs(AIndex : Integer; const AValue : String);
  931. begin
  932. If (FreportDataEndTimeMs=AValue) then exit;
  933. FreportDataEndTimeMs:=AValue;
  934. MarkPropertyChanged(AIndex);
  935. end;
  936. Procedure TQuery.SetreportDataStartTimeMs(AIndex : Integer; const AValue : String);
  937. begin
  938. If (FreportDataStartTimeMs=AValue) then exit;
  939. FreportDataStartTimeMs:=AValue;
  940. MarkPropertyChanged(AIndex);
  941. end;
  942. Procedure TQuery.Setschedule(AIndex : Integer; const AValue : TQuerySchedule);
  943. begin
  944. If (Fschedule=AValue) then exit;
  945. Fschedule:=AValue;
  946. MarkPropertyChanged(AIndex);
  947. end;
  948. Procedure TQuery.SettimezoneCode(AIndex : Integer; const AValue : String);
  949. begin
  950. If (FtimezoneCode=AValue) then exit;
  951. FtimezoneCode:=AValue;
  952. MarkPropertyChanged(AIndex);
  953. end;
  954. { --------------------------------------------------------------------
  955. TQueryMetadata
  956. --------------------------------------------------------------------}
  957. Procedure TQueryMetadata.SetdataRange(AIndex : Integer; const AValue : String);
  958. begin
  959. If (FdataRange=AValue) then exit;
  960. FdataRange:=AValue;
  961. MarkPropertyChanged(AIndex);
  962. end;
  963. Procedure TQueryMetadata.Setformat(AIndex : Integer; const AValue : String);
  964. begin
  965. If (Fformat=AValue) then exit;
  966. Fformat:=AValue;
  967. MarkPropertyChanged(AIndex);
  968. end;
  969. Procedure TQueryMetadata.SetgoogleCloudStoragePathForLatestReport(AIndex : Integer; const AValue : String);
  970. begin
  971. If (FgoogleCloudStoragePathForLatestReport=AValue) then exit;
  972. FgoogleCloudStoragePathForLatestReport:=AValue;
  973. MarkPropertyChanged(AIndex);
  974. end;
  975. Procedure TQueryMetadata.SetgoogleDrivePathForLatestReport(AIndex : Integer; const AValue : String);
  976. begin
  977. If (FgoogleDrivePathForLatestReport=AValue) then exit;
  978. FgoogleDrivePathForLatestReport:=AValue;
  979. MarkPropertyChanged(AIndex);
  980. end;
  981. Procedure TQueryMetadata.SetlatestReportRunTimeMs(AIndex : Integer; const AValue : String);
  982. begin
  983. If (FlatestReportRunTimeMs=AValue) then exit;
  984. FlatestReportRunTimeMs:=AValue;
  985. MarkPropertyChanged(AIndex);
  986. end;
  987. Procedure TQueryMetadata.Setlocale(AIndex : Integer; const AValue : String);
  988. begin
  989. If (Flocale=AValue) then exit;
  990. Flocale:=AValue;
  991. MarkPropertyChanged(AIndex);
  992. end;
  993. Procedure TQueryMetadata.SetreportCount(AIndex : Integer; const AValue : integer);
  994. begin
  995. If (FreportCount=AValue) then exit;
  996. FreportCount:=AValue;
  997. MarkPropertyChanged(AIndex);
  998. end;
  999. Procedure TQueryMetadata.Setrunning(AIndex : Integer; const AValue : boolean);
  1000. begin
  1001. If (Frunning=AValue) then exit;
  1002. Frunning:=AValue;
  1003. MarkPropertyChanged(AIndex);
  1004. end;
  1005. Procedure TQueryMetadata.SetsendNotification(AIndex : Integer; const AValue : boolean);
  1006. begin
  1007. If (FsendNotification=AValue) then exit;
  1008. FsendNotification:=AValue;
  1009. MarkPropertyChanged(AIndex);
  1010. end;
  1011. Procedure TQueryMetadata.SetshareEmailAddress(AIndex : Integer; const AValue : TStringArray);
  1012. begin
  1013. If (FshareEmailAddress=AValue) then exit;
  1014. FshareEmailAddress:=AValue;
  1015. MarkPropertyChanged(AIndex);
  1016. end;
  1017. Procedure TQueryMetadata.Settitle(AIndex : Integer; const AValue : String);
  1018. begin
  1019. If (Ftitle=AValue) then exit;
  1020. Ftitle:=AValue;
  1021. MarkPropertyChanged(AIndex);
  1022. end;
  1023. //2.6.4. bug workaround
  1024. {$IFDEF VER2_6}
  1025. Procedure TQueryMetadata.SetArrayLength(Const AName : String; ALength : Longint);
  1026. begin
  1027. Case AName of
  1028. 'shareemailaddress' : SetLength(FshareEmailAddress,ALength);
  1029. else
  1030. Inherited SetArrayLength(AName,ALength);
  1031. end;
  1032. end;
  1033. {$ENDIF VER2_6}
  1034. { --------------------------------------------------------------------
  1035. TQuerySchedule
  1036. --------------------------------------------------------------------}
  1037. Procedure TQuerySchedule.SetendTimeMs(AIndex : Integer; const AValue : String);
  1038. begin
  1039. If (FendTimeMs=AValue) then exit;
  1040. FendTimeMs:=AValue;
  1041. MarkPropertyChanged(AIndex);
  1042. end;
  1043. Procedure TQuerySchedule.Setfrequency(AIndex : Integer; const AValue : String);
  1044. begin
  1045. If (Ffrequency=AValue) then exit;
  1046. Ffrequency:=AValue;
  1047. MarkPropertyChanged(AIndex);
  1048. end;
  1049. Procedure TQuerySchedule.SetnextRunMinuteOfDay(AIndex : Integer; const AValue : integer);
  1050. begin
  1051. If (FnextRunMinuteOfDay=AValue) then exit;
  1052. FnextRunMinuteOfDay:=AValue;
  1053. MarkPropertyChanged(AIndex);
  1054. end;
  1055. Procedure TQuerySchedule.SetnextRunTimezoneCode(AIndex : Integer; const AValue : String);
  1056. begin
  1057. If (FnextRunTimezoneCode=AValue) then exit;
  1058. FnextRunTimezoneCode:=AValue;
  1059. MarkPropertyChanged(AIndex);
  1060. end;
  1061. { --------------------------------------------------------------------
  1062. TReport
  1063. --------------------------------------------------------------------}
  1064. Procedure TReport.Setkey(AIndex : Integer; const AValue : TReportKey);
  1065. begin
  1066. If (Fkey=AValue) then exit;
  1067. Fkey:=AValue;
  1068. MarkPropertyChanged(AIndex);
  1069. end;
  1070. Procedure TReport.Setmetadata(AIndex : Integer; const AValue : TReportMetadata);
  1071. begin
  1072. If (Fmetadata=AValue) then exit;
  1073. Fmetadata:=AValue;
  1074. MarkPropertyChanged(AIndex);
  1075. end;
  1076. Procedure TReport.Setparams(AIndex : Integer; const AValue : TParameters);
  1077. begin
  1078. If (Fparams=AValue) then exit;
  1079. Fparams:=AValue;
  1080. MarkPropertyChanged(AIndex);
  1081. end;
  1082. { --------------------------------------------------------------------
  1083. TReportFailure
  1084. --------------------------------------------------------------------}
  1085. Procedure TReportFailure.SeterrorCode(AIndex : Integer; const AValue : String);
  1086. begin
  1087. If (FerrorCode=AValue) then exit;
  1088. FerrorCode:=AValue;
  1089. MarkPropertyChanged(AIndex);
  1090. end;
  1091. { --------------------------------------------------------------------
  1092. TReportKey
  1093. --------------------------------------------------------------------}
  1094. Procedure TReportKey.SetqueryId(AIndex : Integer; const AValue : String);
  1095. begin
  1096. If (FqueryId=AValue) then exit;
  1097. FqueryId:=AValue;
  1098. MarkPropertyChanged(AIndex);
  1099. end;
  1100. Procedure TReportKey.SetreportId(AIndex : Integer; const AValue : String);
  1101. begin
  1102. If (FreportId=AValue) then exit;
  1103. FreportId:=AValue;
  1104. MarkPropertyChanged(AIndex);
  1105. end;
  1106. { --------------------------------------------------------------------
  1107. TReportMetadata
  1108. --------------------------------------------------------------------}
  1109. Procedure TReportMetadata.SetgoogleCloudStoragePath(AIndex : Integer; const AValue : String);
  1110. begin
  1111. If (FgoogleCloudStoragePath=AValue) then exit;
  1112. FgoogleCloudStoragePath:=AValue;
  1113. MarkPropertyChanged(AIndex);
  1114. end;
  1115. Procedure TReportMetadata.SetreportDataEndTimeMs(AIndex : Integer; const AValue : String);
  1116. begin
  1117. If (FreportDataEndTimeMs=AValue) then exit;
  1118. FreportDataEndTimeMs:=AValue;
  1119. MarkPropertyChanged(AIndex);
  1120. end;
  1121. Procedure TReportMetadata.SetreportDataStartTimeMs(AIndex : Integer; const AValue : String);
  1122. begin
  1123. If (FreportDataStartTimeMs=AValue) then exit;
  1124. FreportDataStartTimeMs:=AValue;
  1125. MarkPropertyChanged(AIndex);
  1126. end;
  1127. Procedure TReportMetadata.Setstatus(AIndex : Integer; const AValue : TReportStatus);
  1128. begin
  1129. If (Fstatus=AValue) then exit;
  1130. Fstatus:=AValue;
  1131. MarkPropertyChanged(AIndex);
  1132. end;
  1133. { --------------------------------------------------------------------
  1134. TReportStatus
  1135. --------------------------------------------------------------------}
  1136. Procedure TReportStatus.Setfailure(AIndex : Integer; const AValue : TReportFailure);
  1137. begin
  1138. If (Ffailure=AValue) then exit;
  1139. Ffailure:=AValue;
  1140. MarkPropertyChanged(AIndex);
  1141. end;
  1142. Procedure TReportStatus.SetfinishTimeMs(AIndex : Integer; const AValue : String);
  1143. begin
  1144. If (FfinishTimeMs=AValue) then exit;
  1145. FfinishTimeMs:=AValue;
  1146. MarkPropertyChanged(AIndex);
  1147. end;
  1148. Procedure TReportStatus.Setformat(AIndex : Integer; const AValue : String);
  1149. begin
  1150. If (Fformat=AValue) then exit;
  1151. Fformat:=AValue;
  1152. MarkPropertyChanged(AIndex);
  1153. end;
  1154. Procedure TReportStatus.Setstate(AIndex : Integer; const AValue : String);
  1155. begin
  1156. If (Fstate=AValue) then exit;
  1157. Fstate:=AValue;
  1158. MarkPropertyChanged(AIndex);
  1159. end;
  1160. { --------------------------------------------------------------------
  1161. TRowStatus
  1162. --------------------------------------------------------------------}
  1163. Procedure TRowStatus.Setchanged(AIndex : Integer; const AValue : boolean);
  1164. begin
  1165. If (Fchanged=AValue) then exit;
  1166. Fchanged:=AValue;
  1167. MarkPropertyChanged(AIndex);
  1168. end;
  1169. Procedure TRowStatus.SetentityId(AIndex : Integer; const AValue : String);
  1170. begin
  1171. If (FentityId=AValue) then exit;
  1172. FentityId:=AValue;
  1173. MarkPropertyChanged(AIndex);
  1174. end;
  1175. Procedure TRowStatus.SetentityName(AIndex : Integer; const AValue : String);
  1176. begin
  1177. If (FentityName=AValue) then exit;
  1178. FentityName:=AValue;
  1179. MarkPropertyChanged(AIndex);
  1180. end;
  1181. Procedure TRowStatus.Seterrors(AIndex : Integer; const AValue : TStringArray);
  1182. begin
  1183. If (Ferrors=AValue) then exit;
  1184. Ferrors:=AValue;
  1185. MarkPropertyChanged(AIndex);
  1186. end;
  1187. Procedure TRowStatus.Setpersisted(AIndex : Integer; const AValue : boolean);
  1188. begin
  1189. If (Fpersisted=AValue) then exit;
  1190. Fpersisted:=AValue;
  1191. MarkPropertyChanged(AIndex);
  1192. end;
  1193. Procedure TRowStatus.SetrowNumber(AIndex : Integer; const AValue : integer);
  1194. begin
  1195. If (FrowNumber=AValue) then exit;
  1196. FrowNumber:=AValue;
  1197. MarkPropertyChanged(AIndex);
  1198. end;
  1199. //2.6.4. bug workaround
  1200. {$IFDEF VER2_6}
  1201. Procedure TRowStatus.SetArrayLength(Const AName : String; ALength : Longint);
  1202. begin
  1203. Case AName of
  1204. 'errors' : SetLength(Ferrors,ALength);
  1205. else
  1206. Inherited SetArrayLength(AName,ALength);
  1207. end;
  1208. end;
  1209. {$ENDIF VER2_6}
  1210. { --------------------------------------------------------------------
  1211. TRunQueryRequest
  1212. --------------------------------------------------------------------}
  1213. Procedure TRunQueryRequest.SetdataRange(AIndex : Integer; const AValue : String);
  1214. begin
  1215. If (FdataRange=AValue) then exit;
  1216. FdataRange:=AValue;
  1217. MarkPropertyChanged(AIndex);
  1218. end;
  1219. Procedure TRunQueryRequest.SetreportDataEndTimeMs(AIndex : Integer; const AValue : String);
  1220. begin
  1221. If (FreportDataEndTimeMs=AValue) then exit;
  1222. FreportDataEndTimeMs:=AValue;
  1223. MarkPropertyChanged(AIndex);
  1224. end;
  1225. Procedure TRunQueryRequest.SetreportDataStartTimeMs(AIndex : Integer; const AValue : String);
  1226. begin
  1227. If (FreportDataStartTimeMs=AValue) then exit;
  1228. FreportDataStartTimeMs:=AValue;
  1229. MarkPropertyChanged(AIndex);
  1230. end;
  1231. Procedure TRunQueryRequest.SettimezoneCode(AIndex : Integer; const AValue : String);
  1232. begin
  1233. If (FtimezoneCode=AValue) then exit;
  1234. FtimezoneCode:=AValue;
  1235. MarkPropertyChanged(AIndex);
  1236. end;
  1237. { --------------------------------------------------------------------
  1238. TUploadLineItemsRequest
  1239. --------------------------------------------------------------------}
  1240. Procedure TUploadLineItemsRequest.SetdryRun(AIndex : Integer; const AValue : boolean);
  1241. begin
  1242. If (FdryRun=AValue) then exit;
  1243. FdryRun:=AValue;
  1244. MarkPropertyChanged(AIndex);
  1245. end;
  1246. Procedure TUploadLineItemsRequest.Setformat(AIndex : Integer; const AValue : String);
  1247. begin
  1248. If (Fformat=AValue) then exit;
  1249. Fformat:=AValue;
  1250. MarkPropertyChanged(AIndex);
  1251. end;
  1252. Procedure TUploadLineItemsRequest.SetlineItems(AIndex : Integer; const AValue : String);
  1253. begin
  1254. If (FlineItems=AValue) then exit;
  1255. FlineItems:=AValue;
  1256. MarkPropertyChanged(AIndex);
  1257. end;
  1258. { --------------------------------------------------------------------
  1259. TUploadLineItemsResponse
  1260. --------------------------------------------------------------------}
  1261. Procedure TUploadLineItemsResponse.SetuploadStatus(AIndex : Integer; const AValue : TUploadStatus);
  1262. begin
  1263. If (FuploadStatus=AValue) then exit;
  1264. FuploadStatus:=AValue;
  1265. MarkPropertyChanged(AIndex);
  1266. end;
  1267. { --------------------------------------------------------------------
  1268. TUploadStatus
  1269. --------------------------------------------------------------------}
  1270. Procedure TUploadStatus.Seterrors(AIndex : Integer; const AValue : TStringArray);
  1271. begin
  1272. If (Ferrors=AValue) then exit;
  1273. Ferrors:=AValue;
  1274. MarkPropertyChanged(AIndex);
  1275. end;
  1276. Procedure TUploadStatus.SetrowStatus(AIndex : Integer; const AValue : TUploadStatusTyperowStatusArray);
  1277. begin
  1278. If (FrowStatus=AValue) then exit;
  1279. FrowStatus:=AValue;
  1280. MarkPropertyChanged(AIndex);
  1281. end;
  1282. //2.6.4. bug workaround
  1283. {$IFDEF VER2_6}
  1284. Procedure TUploadStatus.SetArrayLength(Const AName : String; ALength : Longint);
  1285. begin
  1286. Case AName of
  1287. 'errors' : SetLength(Ferrors,ALength);
  1288. 'rowstatus' : SetLength(FrowStatus,ALength);
  1289. else
  1290. Inherited SetArrayLength(AName,ALength);
  1291. end;
  1292. end;
  1293. {$ENDIF VER2_6}
  1294. { --------------------------------------------------------------------
  1295. TLineitemsResource
  1296. --------------------------------------------------------------------}
  1297. Class Function TLineitemsResource.ResourceName : String;
  1298. begin
  1299. Result:='lineitems';
  1300. end;
  1301. Class Function TLineitemsResource.DefaultAPI : TGoogleAPIClass;
  1302. begin
  1303. Result:=TdoubleclickbidmanagerAPI;
  1304. end;
  1305. Function TLineitemsResource.Downloadlineitems(aDownloadLineItemsRequest : TDownloadLineItemsRequest) : TDownloadLineItemsResponse;
  1306. Const
  1307. _HTTPMethod = 'POST';
  1308. _Path = 'lineitems/downloadlineitems';
  1309. _Methodid = 'doubleclickbidmanager.lineitems.downloadlineitems';
  1310. begin
  1311. Result:=ServiceCall(_HTTPMethod,_Path,'',aDownloadLineItemsRequest,TDownloadLineItemsResponse) as TDownloadLineItemsResponse;
  1312. end;
  1313. Function TLineitemsResource.Uploadlineitems(aUploadLineItemsRequest : TUploadLineItemsRequest) : TUploadLineItemsResponse;
  1314. Const
  1315. _HTTPMethod = 'POST';
  1316. _Path = 'lineitems/uploadlineitems';
  1317. _Methodid = 'doubleclickbidmanager.lineitems.uploadlineitems';
  1318. begin
  1319. Result:=ServiceCall(_HTTPMethod,_Path,'',aUploadLineItemsRequest,TUploadLineItemsResponse) as TUploadLineItemsResponse;
  1320. end;
  1321. { --------------------------------------------------------------------
  1322. TQueriesResource
  1323. --------------------------------------------------------------------}
  1324. Class Function TQueriesResource.ResourceName : String;
  1325. begin
  1326. Result:='queries';
  1327. end;
  1328. Class Function TQueriesResource.DefaultAPI : TGoogleAPIClass;
  1329. begin
  1330. Result:=TdoubleclickbidmanagerAPI;
  1331. end;
  1332. Function TQueriesResource.Createquery(aQuery : TQuery) : TQuery;
  1333. Const
  1334. _HTTPMethod = 'POST';
  1335. _Path = 'query';
  1336. _Methodid = 'doubleclickbidmanager.queries.createquery';
  1337. begin
  1338. Result:=ServiceCall(_HTTPMethod,_Path,'',aQuery,TQuery) as TQuery;
  1339. end;
  1340. Procedure TQueriesResource.Deletequery(queryId: string);
  1341. Const
  1342. _HTTPMethod = 'DELETE';
  1343. _Path = 'query/{queryId}';
  1344. _Methodid = 'doubleclickbidmanager.queries.deletequery';
  1345. Var
  1346. _P : String;
  1347. begin
  1348. _P:=SubstitutePath(_Path,['queryId',queryId]);
  1349. ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
  1350. end;
  1351. Function TQueriesResource.Getquery(queryId: string) : TQuery;
  1352. Const
  1353. _HTTPMethod = 'GET';
  1354. _Path = 'query/{queryId}';
  1355. _Methodid = 'doubleclickbidmanager.queries.getquery';
  1356. Var
  1357. _P : String;
  1358. begin
  1359. _P:=SubstitutePath(_Path,['queryId',queryId]);
  1360. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TQuery) as TQuery;
  1361. end;
  1362. Function TQueriesResource.Listqueries : TListQueriesResponse;
  1363. Const
  1364. _HTTPMethod = 'GET';
  1365. _Path = 'queries';
  1366. _Methodid = 'doubleclickbidmanager.queries.listqueries';
  1367. begin
  1368. Result:=ServiceCall(_HTTPMethod,_Path,'',Nil,TListQueriesResponse) as TListQueriesResponse;
  1369. end;
  1370. Procedure TQueriesResource.Runquery(queryId: string; aRunQueryRequest : TRunQueryRequest);
  1371. Const
  1372. _HTTPMethod = 'POST';
  1373. _Path = 'query/{queryId}';
  1374. _Methodid = 'doubleclickbidmanager.queries.runquery';
  1375. Var
  1376. _P : String;
  1377. begin
  1378. _P:=SubstitutePath(_Path,['queryId',queryId]);
  1379. ServiceCall(_HTTPMethod,_P,'',aRunQueryRequest,Nil);
  1380. end;
  1381. { --------------------------------------------------------------------
  1382. TReportsResource
  1383. --------------------------------------------------------------------}
  1384. Class Function TReportsResource.ResourceName : String;
  1385. begin
  1386. Result:='reports';
  1387. end;
  1388. Class Function TReportsResource.DefaultAPI : TGoogleAPIClass;
  1389. begin
  1390. Result:=TdoubleclickbidmanagerAPI;
  1391. end;
  1392. Function TReportsResource.Listreports(queryId: string) : TListReportsResponse;
  1393. Const
  1394. _HTTPMethod = 'GET';
  1395. _Path = 'queries/{queryId}/reports';
  1396. _Methodid = 'doubleclickbidmanager.reports.listreports';
  1397. Var
  1398. _P : String;
  1399. begin
  1400. _P:=SubstitutePath(_Path,['queryId',queryId]);
  1401. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TListReportsResponse) as TListReportsResponse;
  1402. end;
  1403. { --------------------------------------------------------------------
  1404. TRubiconResource
  1405. --------------------------------------------------------------------}
  1406. Class Function TRubiconResource.ResourceName : String;
  1407. begin
  1408. Result:='rubicon';
  1409. end;
  1410. Class Function TRubiconResource.DefaultAPI : TGoogleAPIClass;
  1411. begin
  1412. Result:=TdoubleclickbidmanagerAPI;
  1413. end;
  1414. Procedure TRubiconResource.Notifyproposalchange(aNotifyProposalChangeRequest : TNotifyProposalChangeRequest);
  1415. Const
  1416. _HTTPMethod = 'POST';
  1417. _Path = 'rubicon/notifyproposalchange';
  1418. _Methodid = 'doubleclickbidmanager.rubicon.notifyproposalchange';
  1419. begin
  1420. ServiceCall(_HTTPMethod,_Path,'',aNotifyProposalChangeRequest,Nil);
  1421. end;
  1422. { --------------------------------------------------------------------
  1423. TDoubleclickbidmanagerAPI
  1424. --------------------------------------------------------------------}
  1425. Class Function TDoubleclickbidmanagerAPI.APIName : String;
  1426. begin
  1427. Result:='doubleclickbidmanager';
  1428. end;
  1429. Class Function TDoubleclickbidmanagerAPI.APIVersion : String;
  1430. begin
  1431. Result:='v1';
  1432. end;
  1433. Class Function TDoubleclickbidmanagerAPI.APIRevision : String;
  1434. begin
  1435. Result:='20160426';
  1436. end;
  1437. Class Function TDoubleclickbidmanagerAPI.APIID : String;
  1438. begin
  1439. Result:='doubleclickbidmanager:v1';
  1440. end;
  1441. Class Function TDoubleclickbidmanagerAPI.APITitle : String;
  1442. begin
  1443. Result:='DoubleClick Bid Manager API';
  1444. end;
  1445. Class Function TDoubleclickbidmanagerAPI.APIDescription : String;
  1446. begin
  1447. Result:='API for viewing and managing your reports in DoubleClick Bid Manager.';
  1448. end;
  1449. Class Function TDoubleclickbidmanagerAPI.APIOwnerDomain : String;
  1450. begin
  1451. Result:='google.com';
  1452. end;
  1453. Class Function TDoubleclickbidmanagerAPI.APIOwnerName : String;
  1454. begin
  1455. Result:='Google';
  1456. end;
  1457. Class Function TDoubleclickbidmanagerAPI.APIIcon16 : String;
  1458. begin
  1459. Result:='http://www.google.com/images/icons/product/search-16.gif';
  1460. end;
  1461. Class Function TDoubleclickbidmanagerAPI.APIIcon32 : String;
  1462. begin
  1463. Result:='http://www.google.com/images/icons/product/search-32.gif';
  1464. end;
  1465. Class Function TDoubleclickbidmanagerAPI.APIdocumentationLink : String;
  1466. begin
  1467. Result:='https://developers.google.com/bid-manager/';
  1468. end;
  1469. Class Function TDoubleclickbidmanagerAPI.APIrootUrl : string;
  1470. begin
  1471. Result:='https://www.googleapis.com/';
  1472. end;
  1473. Class Function TDoubleclickbidmanagerAPI.APIbasePath : string;
  1474. begin
  1475. Result:='/doubleclickbidmanager/v1/';
  1476. end;
  1477. Class Function TDoubleclickbidmanagerAPI.APIbaseURL : String;
  1478. begin
  1479. Result:='https://www.googleapis.com/doubleclickbidmanager/v1/';
  1480. end;
  1481. Class Function TDoubleclickbidmanagerAPI.APIProtocol : string;
  1482. begin
  1483. Result:='rest';
  1484. end;
  1485. Class Function TDoubleclickbidmanagerAPI.APIservicePath : string;
  1486. begin
  1487. Result:='doubleclickbidmanager/v1/';
  1488. end;
  1489. Class Function TDoubleclickbidmanagerAPI.APIbatchPath : String;
  1490. begin
  1491. Result:='batch';
  1492. end;
  1493. Class Function TDoubleclickbidmanagerAPI.APIAuthScopes : TScopeInfoArray;
  1494. begin
  1495. SetLength(Result,0);
  1496. end;
  1497. Class Function TDoubleclickbidmanagerAPI.APINeedsAuth : Boolean;
  1498. begin
  1499. Result:=False;
  1500. end;
  1501. Class Procedure TDoubleclickbidmanagerAPI.RegisterAPIResources;
  1502. begin
  1503. TDownloadLineItemsRequest.RegisterObject;
  1504. TDownloadLineItemsResponse.RegisterObject;
  1505. TFilterPair.RegisterObject;
  1506. TListQueriesResponse.RegisterObject;
  1507. TListReportsResponse.RegisterObject;
  1508. TNote.RegisterObject;
  1509. TNotifyProposalChangeRequest.RegisterObject;
  1510. TParameters.RegisterObject;
  1511. TQuery.RegisterObject;
  1512. TQueryMetadata.RegisterObject;
  1513. TQuerySchedule.RegisterObject;
  1514. TReport.RegisterObject;
  1515. TReportFailure.RegisterObject;
  1516. TReportKey.RegisterObject;
  1517. TReportMetadata.RegisterObject;
  1518. TReportStatus.RegisterObject;
  1519. TRowStatus.RegisterObject;
  1520. TRunQueryRequest.RegisterObject;
  1521. TUploadLineItemsRequest.RegisterObject;
  1522. TUploadLineItemsResponse.RegisterObject;
  1523. TUploadStatus.RegisterObject;
  1524. end;
  1525. Function TDoubleclickbidmanagerAPI.GetLineitemsInstance : TLineitemsResource;
  1526. begin
  1527. if (FLineitemsInstance=Nil) then
  1528. FLineitemsInstance:=CreateLineitemsResource;
  1529. Result:=FLineitemsInstance;
  1530. end;
  1531. Function TDoubleclickbidmanagerAPI.CreateLineitemsResource : TLineitemsResource;
  1532. begin
  1533. Result:=CreateLineitemsResource(Self);
  1534. end;
  1535. Function TDoubleclickbidmanagerAPI.CreateLineitemsResource(AOwner : TComponent) : TLineitemsResource;
  1536. begin
  1537. Result:=TLineitemsResource.Create(AOwner);
  1538. Result.API:=Self.API;
  1539. end;
  1540. Function TDoubleclickbidmanagerAPI.GetQueriesInstance : TQueriesResource;
  1541. begin
  1542. if (FQueriesInstance=Nil) then
  1543. FQueriesInstance:=CreateQueriesResource;
  1544. Result:=FQueriesInstance;
  1545. end;
  1546. Function TDoubleclickbidmanagerAPI.CreateQueriesResource : TQueriesResource;
  1547. begin
  1548. Result:=CreateQueriesResource(Self);
  1549. end;
  1550. Function TDoubleclickbidmanagerAPI.CreateQueriesResource(AOwner : TComponent) : TQueriesResource;
  1551. begin
  1552. Result:=TQueriesResource.Create(AOwner);
  1553. Result.API:=Self.API;
  1554. end;
  1555. Function TDoubleclickbidmanagerAPI.GetReportsInstance : TReportsResource;
  1556. begin
  1557. if (FReportsInstance=Nil) then
  1558. FReportsInstance:=CreateReportsResource;
  1559. Result:=FReportsInstance;
  1560. end;
  1561. Function TDoubleclickbidmanagerAPI.CreateReportsResource : TReportsResource;
  1562. begin
  1563. Result:=CreateReportsResource(Self);
  1564. end;
  1565. Function TDoubleclickbidmanagerAPI.CreateReportsResource(AOwner : TComponent) : TReportsResource;
  1566. begin
  1567. Result:=TReportsResource.Create(AOwner);
  1568. Result.API:=Self.API;
  1569. end;
  1570. Function TDoubleclickbidmanagerAPI.GetRubiconInstance : TRubiconResource;
  1571. begin
  1572. if (FRubiconInstance=Nil) then
  1573. FRubiconInstance:=CreateRubiconResource;
  1574. Result:=FRubiconInstance;
  1575. end;
  1576. Function TDoubleclickbidmanagerAPI.CreateRubiconResource : TRubiconResource;
  1577. begin
  1578. Result:=CreateRubiconResource(Self);
  1579. end;
  1580. Function TDoubleclickbidmanagerAPI.CreateRubiconResource(AOwner : TComponent) : TRubiconResource;
  1581. begin
  1582. Result:=TRubiconResource.Create(AOwner);
  1583. Result.API:=Self.API;
  1584. end;
  1585. initialization
  1586. TDoubleclickbidmanagerAPI.RegisterAPI;
  1587. end.