123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499 |
- unit googledoubleclicksearch;
- {$MODE objfpc}
- {$H+}
- interface
- uses sysutils, classes, googleservice, restbase, googlebase;
- type
-
- //Top-level schema types
- TAvailability = Class;
- TConversion = Class;
- TConversionList = Class;
- TCustomDimension = Class;
- TCustomMetric = Class;
- TReport = Class;
- TReportApiColumnSpec = Class;
- TReportRequest = Class;
- TReportRow = Class;
- TSavedColumn = Class;
- TSavedColumnList = Class;
- TUpdateAvailabilityRequest = Class;
- TUpdateAvailabilityResponse = Class;
- TAvailabilityArray = Array of TAvailability;
- TConversionArray = Array of TConversion;
- TConversionListArray = Array of TConversionList;
- TCustomDimensionArray = Array of TCustomDimension;
- TCustomMetricArray = Array of TCustomMetric;
- TReportArray = Array of TReport;
- TReportApiColumnSpecArray = Array of TReportApiColumnSpec;
- TReportRequestArray = Array of TReportRequest;
- TReportRowArray = Array of TReportRow;
- TSavedColumnArray = Array of TSavedColumn;
- TSavedColumnListArray = Array of TSavedColumnList;
- TUpdateAvailabilityRequestArray = Array of TUpdateAvailabilityRequest;
- TUpdateAvailabilityResponseArray = Array of TUpdateAvailabilityResponse;
- //Anonymous types, using auto-generated names
- TReportTypefilesItem = Class;
- TReportRequestTypefiltersItem = Class;
- TReportRequestTypeorderByItem = Class;
- TReportRequestTypereportScope = Class;
- TReportRequestTypetimeRange = Class;
- TConversionTypecustomDimensionArray = Array of TCustomDimension;
- TConversionTypecustomMetricArray = Array of TCustomMetric;
- TConversionListTypeconversionArray = Array of TConversion;
- TReportTypefilesArray = Array of TReportTypefilesItem;
- TReportTyperowsArray = Array of TReportRow;
- TReportRequestTypecolumnsArray = Array of TReportApiColumnSpec;
- TReportRequestTypefiltersArray = Array of TReportRequestTypefiltersItem;
- TReportRequestTypeorderByArray = Array of TReportRequestTypeorderByItem;
- TSavedColumnListTypeitemsArray = Array of TSavedColumn;
- TUpdateAvailabilityRequestTypeavailabilitiesArray = Array of TAvailability;
- TUpdateAvailabilityResponseTypeavailabilitiesArray = Array of TAvailability;
-
- { --------------------------------------------------------------------
- TAvailability
- --------------------------------------------------------------------}
-
- TAvailability = Class(TGoogleBaseObject)
- Private
- FadvertiserId : String;
- FagencyId : String;
- FavailabilityTimestamp : String;
- FsegmentationId : String;
- FsegmentationName : String;
- FsegmentationType : String;
- Protected
- //Property setters
- Procedure SetadvertiserId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetagencyId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetavailabilityTimestamp(AIndex : Integer; const AValue : String); virtual;
- Procedure SetsegmentationId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetsegmentationName(AIndex : Integer; const AValue : String); virtual;
- Procedure SetsegmentationType(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property advertiserId : String Index 0 Read FadvertiserId Write SetadvertiserId;
- Property agencyId : String Index 8 Read FagencyId Write SetagencyId;
- Property availabilityTimestamp : String Index 16 Read FavailabilityTimestamp Write SetavailabilityTimestamp;
- Property segmentationId : String Index 24 Read FsegmentationId Write SetsegmentationId;
- Property segmentationName : String Index 32 Read FsegmentationName Write SetsegmentationName;
- Property segmentationType : String Index 40 Read FsegmentationType Write SetsegmentationType;
- end;
- TAvailabilityClass = Class of TAvailability;
-
- { --------------------------------------------------------------------
- TConversion
- --------------------------------------------------------------------}
-
- TConversion = Class(TGoogleBaseObject)
- Private
- FadGroupId : String;
- FadId : String;
- FadvertiserId : String;
- FagencyId : String;
- FattributionModel : String;
- FcampaignId : String;
- Fchannel : String;
- FclickId : String;
- FconversionId : String;
- FconversionModifiedTimestamp : String;
- FconversionTimestamp : String;
- FcountMillis : String;
- FcriterionId : String;
- FcurrencyCode : String;
- FcustomDimension : TConversionTypecustomDimensionArray;
- FcustomMetric : TConversionTypecustomMetricArray;
- FdeviceType : String;
- FdsConversionId : String;
- FengineAccountId : String;
- FfloodlightOrderId : String;
- FinventoryAccountId : String;
- FproductCountry : String;
- FproductGroupId : String;
- FproductId : String;
- FproductLanguage : String;
- FquantityMillis : String;
- FrevenueMicros : String;
- FsegmentationId : String;
- FsegmentationName : String;
- FsegmentationType : String;
- Fstate : String;
- FstoreId : String;
- F_type : String;
- Protected
- Class Function ExportPropertyName(Const AName : String) : string; override;
- //Property setters
- Procedure SetadGroupId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetadId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetadvertiserId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetagencyId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetattributionModel(AIndex : Integer; const AValue : String); virtual;
- Procedure SetcampaignId(AIndex : Integer; const AValue : String); virtual;
- Procedure Setchannel(AIndex : Integer; const AValue : String); virtual;
- Procedure SetclickId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetconversionId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetconversionModifiedTimestamp(AIndex : Integer; const AValue : String); virtual;
- Procedure SetconversionTimestamp(AIndex : Integer; const AValue : String); virtual;
- Procedure SetcountMillis(AIndex : Integer; const AValue : String); virtual;
- Procedure SetcriterionId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetcurrencyCode(AIndex : Integer; const AValue : String); virtual;
- Procedure SetcustomDimension(AIndex : Integer; const AValue : TConversionTypecustomDimensionArray); virtual;
- Procedure SetcustomMetric(AIndex : Integer; const AValue : TConversionTypecustomMetricArray); virtual;
- Procedure SetdeviceType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetdsConversionId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetengineAccountId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetfloodlightOrderId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetinventoryAccountId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetproductCountry(AIndex : Integer; const AValue : String); virtual;
- Procedure SetproductGroupId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetproductId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetproductLanguage(AIndex : Integer; const AValue : String); virtual;
- Procedure SetquantityMillis(AIndex : Integer; const AValue : String); virtual;
- Procedure SetrevenueMicros(AIndex : Integer; const AValue : String); virtual;
- Procedure SetsegmentationId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetsegmentationName(AIndex : Integer; const AValue : String); virtual;
- Procedure SetsegmentationType(AIndex : Integer; const AValue : String); virtual;
- Procedure Setstate(AIndex : Integer; const AValue : String); virtual;
- Procedure SetstoreId(AIndex : Integer; const AValue : String); virtual;
- Procedure Set_type(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 adGroupId : String Index 0 Read FadGroupId Write SetadGroupId;
- Property adId : String Index 8 Read FadId Write SetadId;
- Property advertiserId : String Index 16 Read FadvertiserId Write SetadvertiserId;
- Property agencyId : String Index 24 Read FagencyId Write SetagencyId;
- Property attributionModel : String Index 32 Read FattributionModel Write SetattributionModel;
- Property campaignId : String Index 40 Read FcampaignId Write SetcampaignId;
- Property channel : String Index 48 Read Fchannel Write Setchannel;
- Property clickId : String Index 56 Read FclickId Write SetclickId;
- Property conversionId : String Index 64 Read FconversionId Write SetconversionId;
- Property conversionModifiedTimestamp : String Index 72 Read FconversionModifiedTimestamp Write SetconversionModifiedTimestamp;
- Property conversionTimestamp : String Index 80 Read FconversionTimestamp Write SetconversionTimestamp;
- Property countMillis : String Index 88 Read FcountMillis Write SetcountMillis;
- Property criterionId : String Index 96 Read FcriterionId Write SetcriterionId;
- Property currencyCode : String Index 104 Read FcurrencyCode Write SetcurrencyCode;
- Property customDimension : TConversionTypecustomDimensionArray Index 112 Read FcustomDimension Write SetcustomDimension;
- Property customMetric : TConversionTypecustomMetricArray Index 120 Read FcustomMetric Write SetcustomMetric;
- Property deviceType : String Index 128 Read FdeviceType Write SetdeviceType;
- Property dsConversionId : String Index 136 Read FdsConversionId Write SetdsConversionId;
- Property engineAccountId : String Index 144 Read FengineAccountId Write SetengineAccountId;
- Property floodlightOrderId : String Index 152 Read FfloodlightOrderId Write SetfloodlightOrderId;
- Property inventoryAccountId : String Index 160 Read FinventoryAccountId Write SetinventoryAccountId;
- Property productCountry : String Index 168 Read FproductCountry Write SetproductCountry;
- Property productGroupId : String Index 176 Read FproductGroupId Write SetproductGroupId;
- Property productId : String Index 184 Read FproductId Write SetproductId;
- Property productLanguage : String Index 192 Read FproductLanguage Write SetproductLanguage;
- Property quantityMillis : String Index 200 Read FquantityMillis Write SetquantityMillis;
- Property revenueMicros : String Index 208 Read FrevenueMicros Write SetrevenueMicros;
- Property segmentationId : String Index 216 Read FsegmentationId Write SetsegmentationId;
- Property segmentationName : String Index 224 Read FsegmentationName Write SetsegmentationName;
- Property segmentationType : String Index 232 Read FsegmentationType Write SetsegmentationType;
- Property state : String Index 240 Read Fstate Write Setstate;
- Property storeId : String Index 248 Read FstoreId Write SetstoreId;
- Property _type : String Index 256 Read F_type Write Set_type;
- end;
- TConversionClass = Class of TConversion;
-
- { --------------------------------------------------------------------
- TConversionList
- --------------------------------------------------------------------}
-
- TConversionList = Class(TGoogleBaseObject)
- Private
- Fconversion : TConversionListTypeconversionArray;
- Fkind : String;
- Protected
- //Property setters
- Procedure Setconversion(AIndex : Integer; const AValue : TConversionListTypeconversionArray); virtual;
- Procedure Setkind(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 conversion : TConversionListTypeconversionArray Index 0 Read Fconversion Write Setconversion;
- Property kind : String Index 8 Read Fkind Write Setkind;
- end;
- TConversionListClass = Class of TConversionList;
-
- { --------------------------------------------------------------------
- TCustomDimension
- --------------------------------------------------------------------}
-
- TCustomDimension = Class(TGoogleBaseObject)
- Private
- Fname : String;
- Fvalue : String;
- Protected
- //Property setters
- Procedure Setname(AIndex : Integer; const AValue : String); virtual;
- Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property name : String Index 0 Read Fname Write Setname;
- Property value : String Index 8 Read Fvalue Write Setvalue;
- end;
- TCustomDimensionClass = Class of TCustomDimension;
-
- { --------------------------------------------------------------------
- TCustomMetric
- --------------------------------------------------------------------}
-
- TCustomMetric = Class(TGoogleBaseObject)
- Private
- Fname : String;
- Fvalue : double;
- Protected
- //Property setters
- Procedure Setname(AIndex : Integer; const AValue : String); virtual;
- Procedure Setvalue(AIndex : Integer; const AValue : double); virtual;
- Public
- Published
- Property name : String Index 0 Read Fname Write Setname;
- Property value : double Index 8 Read Fvalue Write Setvalue;
- end;
- TCustomMetricClass = Class of TCustomMetric;
-
- { --------------------------------------------------------------------
- TReportTypefilesItem
- --------------------------------------------------------------------}
-
- TReportTypefilesItem = Class(TGoogleBaseObject)
- Private
- FbyteCount : String;
- Furl : String;
- Protected
- //Property setters
- Procedure SetbyteCount(AIndex : Integer; const AValue : String); virtual;
- Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property byteCount : String Index 0 Read FbyteCount Write SetbyteCount;
- Property url : String Index 8 Read Furl Write Seturl;
- end;
- TReportTypefilesItemClass = Class of TReportTypefilesItem;
-
- { --------------------------------------------------------------------
- TReport
- --------------------------------------------------------------------}
-
- TReport = Class(TGoogleBaseObject)
- Private
- Ffiles : TReportTypefilesArray;
- Fid : String;
- FisReportReady : boolean;
- Fkind : String;
- Frequest : TReportRequest;
- FrowCount : integer;
- Frows : TReportTyperowsArray;
- FstatisticsCurrencyCode : String;
- FstatisticsTimeZone : String;
- Protected
- //Property setters
- Procedure Setfiles(AIndex : Integer; const AValue : TReportTypefilesArray); virtual;
- Procedure Setid(AIndex : Integer; const AValue : String); virtual;
- Procedure SetisReportReady(AIndex : Integer; const AValue : boolean); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setrequest(AIndex : Integer; const AValue : TReportRequest); virtual;
- Procedure SetrowCount(AIndex : Integer; const AValue : integer); virtual;
- Procedure Setrows(AIndex : Integer; const AValue : TReportTyperowsArray); virtual;
- Procedure SetstatisticsCurrencyCode(AIndex : Integer; const AValue : String); virtual;
- Procedure SetstatisticsTimeZone(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 files : TReportTypefilesArray Index 0 Read Ffiles Write Setfiles;
- Property id : String Index 8 Read Fid Write Setid;
- Property isReportReady : boolean Index 16 Read FisReportReady Write SetisReportReady;
- Property kind : String Index 24 Read Fkind Write Setkind;
- Property request : TReportRequest Index 32 Read Frequest Write Setrequest;
- Property rowCount : integer Index 40 Read FrowCount Write SetrowCount;
- Property rows : TReportTyperowsArray Index 48 Read Frows Write Setrows;
- Property statisticsCurrencyCode : String Index 56 Read FstatisticsCurrencyCode Write SetstatisticsCurrencyCode;
- Property statisticsTimeZone : String Index 64 Read FstatisticsTimeZone Write SetstatisticsTimeZone;
- end;
- TReportClass = Class of TReport;
-
- { --------------------------------------------------------------------
- TReportApiColumnSpec
- --------------------------------------------------------------------}
-
- TReportApiColumnSpec = Class(TGoogleBaseObject)
- Private
- FcolumnName : String;
- FcustomDimensionName : String;
- FcustomMetricName : String;
- FendDate : String;
- FgroupByColumn : boolean;
- FheaderText : String;
- FplatformSource : String;
- FproductReportPerspective : String;
- FsavedColumnName : String;
- FstartDate : String;
- Protected
- //Property setters
- Procedure SetcolumnName(AIndex : Integer; const AValue : String); virtual;
- Procedure SetcustomDimensionName(AIndex : Integer; const AValue : String); virtual;
- Procedure SetcustomMetricName(AIndex : Integer; const AValue : String); virtual;
- Procedure SetendDate(AIndex : Integer; const AValue : String); virtual;
- Procedure SetgroupByColumn(AIndex : Integer; const AValue : boolean); virtual;
- Procedure SetheaderText(AIndex : Integer; const AValue : String); virtual;
- Procedure SetplatformSource(AIndex : Integer; const AValue : String); virtual;
- Procedure SetproductReportPerspective(AIndex : Integer; const AValue : String); virtual;
- Procedure SetsavedColumnName(AIndex : Integer; const AValue : String); virtual;
- Procedure SetstartDate(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property columnName : String Index 0 Read FcolumnName Write SetcolumnName;
- Property customDimensionName : String Index 8 Read FcustomDimensionName Write SetcustomDimensionName;
- Property customMetricName : String Index 16 Read FcustomMetricName Write SetcustomMetricName;
- Property endDate : String Index 24 Read FendDate Write SetendDate;
- Property groupByColumn : boolean Index 32 Read FgroupByColumn Write SetgroupByColumn;
- Property headerText : String Index 40 Read FheaderText Write SetheaderText;
- Property platformSource : String Index 48 Read FplatformSource Write SetplatformSource;
- Property productReportPerspective : String Index 56 Read FproductReportPerspective Write SetproductReportPerspective;
- Property savedColumnName : String Index 64 Read FsavedColumnName Write SetsavedColumnName;
- Property startDate : String Index 72 Read FstartDate Write SetstartDate;
- end;
- TReportApiColumnSpecClass = Class of TReportApiColumnSpec;
-
- { --------------------------------------------------------------------
- TReportRequestTypefiltersItem
- --------------------------------------------------------------------}
-
- TReportRequestTypefiltersItem = Class(TGoogleBaseObject)
- Private
- Fcolumn : TReportApiColumnSpec;
- F_operator : String;
- Fvalues : TTJSONSchemaArray;
- Protected
- Class Function ExportPropertyName(Const AName : String) : string; override;
- //Property setters
- Procedure Setcolumn(AIndex : Integer; const AValue : TReportApiColumnSpec); virtual;
- Procedure Set_operator(AIndex : Integer; const AValue : String); virtual;
- Procedure Setvalues(AIndex : Integer; const AValue : TTJSONSchemaArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property column : TReportApiColumnSpec Index 0 Read Fcolumn Write Setcolumn;
- Property _operator : String Index 8 Read F_operator Write Set_operator;
- Property values : TTJSONSchemaArray Index 16 Read Fvalues Write Setvalues;
- end;
- TReportRequestTypefiltersItemClass = Class of TReportRequestTypefiltersItem;
-
- { --------------------------------------------------------------------
- TReportRequestTypeorderByItem
- --------------------------------------------------------------------}
-
- TReportRequestTypeorderByItem = Class(TGoogleBaseObject)
- Private
- Fcolumn : TReportApiColumnSpec;
- FsortOrder : String;
- Protected
- //Property setters
- Procedure Setcolumn(AIndex : Integer; const AValue : TReportApiColumnSpec); virtual;
- Procedure SetsortOrder(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property column : TReportApiColumnSpec Index 0 Read Fcolumn Write Setcolumn;
- Property sortOrder : String Index 8 Read FsortOrder Write SetsortOrder;
- end;
- TReportRequestTypeorderByItemClass = Class of TReportRequestTypeorderByItem;
-
- { --------------------------------------------------------------------
- TReportRequestTypereportScope
- --------------------------------------------------------------------}
-
- TReportRequestTypereportScope = Class(TGoogleBaseObject)
- Private
- FadGroupId : String;
- FadId : String;
- FadvertiserId : String;
- FagencyId : String;
- FcampaignId : String;
- FengineAccountId : String;
- FkeywordId : String;
- Protected
- //Property setters
- Procedure SetadGroupId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetadId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetadvertiserId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetagencyId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetcampaignId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetengineAccountId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetkeywordId(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property adGroupId : String Index 0 Read FadGroupId Write SetadGroupId;
- Property adId : String Index 8 Read FadId Write SetadId;
- Property advertiserId : String Index 16 Read FadvertiserId Write SetadvertiserId;
- Property agencyId : String Index 24 Read FagencyId Write SetagencyId;
- Property campaignId : String Index 32 Read FcampaignId Write SetcampaignId;
- Property engineAccountId : String Index 40 Read FengineAccountId Write SetengineAccountId;
- Property keywordId : String Index 48 Read FkeywordId Write SetkeywordId;
- end;
- TReportRequestTypereportScopeClass = Class of TReportRequestTypereportScope;
-
- { --------------------------------------------------------------------
- TReportRequestTypetimeRange
- --------------------------------------------------------------------}
-
- TReportRequestTypetimeRange = Class(TGoogleBaseObject)
- Private
- FchangedAttributesSinceTimestamp : TDatetime;
- FchangedMetricsSinceTimestamp : TDatetime;
- FendDate : String;
- FstartDate : String;
- Protected
- //Property setters
- Procedure SetchangedAttributesSinceTimestamp(AIndex : Integer; const AValue : TDatetime); virtual;
- Procedure SetchangedMetricsSinceTimestamp(AIndex : Integer; const AValue : TDatetime); virtual;
- Procedure SetendDate(AIndex : Integer; const AValue : String); virtual;
- Procedure SetstartDate(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property changedAttributesSinceTimestamp : TDatetime Index 0 Read FchangedAttributesSinceTimestamp Write SetchangedAttributesSinceTimestamp;
- Property changedMetricsSinceTimestamp : TDatetime Index 8 Read FchangedMetricsSinceTimestamp Write SetchangedMetricsSinceTimestamp;
- Property endDate : String Index 16 Read FendDate Write SetendDate;
- Property startDate : String Index 24 Read FstartDate Write SetstartDate;
- end;
- TReportRequestTypetimeRangeClass = Class of TReportRequestTypetimeRange;
-
- { --------------------------------------------------------------------
- TReportRequest
- --------------------------------------------------------------------}
-
- TReportRequest = Class(TGoogleBaseObject)
- Private
- Fcolumns : TReportRequestTypecolumnsArray;
- FdownloadFormat : String;
- Ffilters : TReportRequestTypefiltersArray;
- FincludeDeletedEntities : boolean;
- FincludeRemovedEntities : boolean;
- FmaxRowsPerFile : integer;
- ForderBy : TReportRequestTypeorderByArray;
- FreportScope : TReportRequestTypereportScope;
- FreportType : String;
- FrowCount : integer;
- FstartRow : integer;
- FstatisticsCurrency : String;
- FtimeRange : TReportRequestTypetimeRange;
- FverifySingleTimeZone : boolean;
- Protected
- //Property setters
- Procedure Setcolumns(AIndex : Integer; const AValue : TReportRequestTypecolumnsArray); virtual;
- Procedure SetdownloadFormat(AIndex : Integer; const AValue : String); virtual;
- Procedure Setfilters(AIndex : Integer; const AValue : TReportRequestTypefiltersArray); virtual;
- Procedure SetincludeDeletedEntities(AIndex : Integer; const AValue : boolean); virtual;
- Procedure SetincludeRemovedEntities(AIndex : Integer; const AValue : boolean); virtual;
- Procedure SetmaxRowsPerFile(AIndex : Integer; const AValue : integer); virtual;
- Procedure SetorderBy(AIndex : Integer; const AValue : TReportRequestTypeorderByArray); virtual;
- Procedure SetreportScope(AIndex : Integer; const AValue : TReportRequestTypereportScope); virtual;
- Procedure SetreportType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetrowCount(AIndex : Integer; const AValue : integer); virtual;
- Procedure SetstartRow(AIndex : Integer; const AValue : integer); virtual;
- Procedure SetstatisticsCurrency(AIndex : Integer; const AValue : String); virtual;
- Procedure SettimeRange(AIndex : Integer; const AValue : TReportRequestTypetimeRange); virtual;
- Procedure SetverifySingleTimeZone(AIndex : Integer; const AValue : boolean); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property columns : TReportRequestTypecolumnsArray Index 0 Read Fcolumns Write Setcolumns;
- Property downloadFormat : String Index 8 Read FdownloadFormat Write SetdownloadFormat;
- Property filters : TReportRequestTypefiltersArray Index 16 Read Ffilters Write Setfilters;
- Property includeDeletedEntities : boolean Index 24 Read FincludeDeletedEntities Write SetincludeDeletedEntities;
- Property includeRemovedEntities : boolean Index 32 Read FincludeRemovedEntities Write SetincludeRemovedEntities;
- Property maxRowsPerFile : integer Index 40 Read FmaxRowsPerFile Write SetmaxRowsPerFile;
- Property orderBy : TReportRequestTypeorderByArray Index 48 Read ForderBy Write SetorderBy;
- Property reportScope : TReportRequestTypereportScope Index 56 Read FreportScope Write SetreportScope;
- Property reportType : String Index 64 Read FreportType Write SetreportType;
- Property rowCount : integer Index 72 Read FrowCount Write SetrowCount;
- Property startRow : integer Index 80 Read FstartRow Write SetstartRow;
- Property statisticsCurrency : String Index 88 Read FstatisticsCurrency Write SetstatisticsCurrency;
- Property timeRange : TReportRequestTypetimeRange Index 96 Read FtimeRange Write SettimeRange;
- Property verifySingleTimeZone : boolean Index 104 Read FverifySingleTimeZone Write SetverifySingleTimeZone;
- end;
- TReportRequestClass = Class of TReportRequest;
-
- { --------------------------------------------------------------------
- TReportRow
- --------------------------------------------------------------------}
-
- TReportRow = Class(TGoogleBaseObject)
- Private
- Protected
- //Property setters
- Public
- Class Function AllowAdditionalProperties : Boolean; override;
- Published
- end;
- TReportRowClass = Class of TReportRow;
-
- { --------------------------------------------------------------------
- TSavedColumn
- --------------------------------------------------------------------}
-
- TSavedColumn = Class(TGoogleBaseObject)
- Private
- Fkind : String;
- FsavedColumnName : String;
- F_type : String;
- Protected
- Class Function ExportPropertyName(Const AName : String) : string; override;
- //Property setters
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure SetsavedColumnName(AIndex : Integer; const AValue : String); virtual;
- Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property kind : String Index 0 Read Fkind Write Setkind;
- Property savedColumnName : String Index 8 Read FsavedColumnName Write SetsavedColumnName;
- Property _type : String Index 16 Read F_type Write Set_type;
- end;
- TSavedColumnClass = Class of TSavedColumn;
-
- { --------------------------------------------------------------------
- TSavedColumnList
- --------------------------------------------------------------------}
-
- TSavedColumnList = Class(TGoogleBaseObject)
- Private
- Fitems : TSavedColumnListTypeitemsArray;
- Fkind : String;
- Protected
- //Property setters
- Procedure Setitems(AIndex : Integer; const AValue : TSavedColumnListTypeitemsArray); virtual;
- Procedure Setkind(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 items : TSavedColumnListTypeitemsArray Index 0 Read Fitems Write Setitems;
- Property kind : String Index 8 Read Fkind Write Setkind;
- end;
- TSavedColumnListClass = Class of TSavedColumnList;
-
- { --------------------------------------------------------------------
- TUpdateAvailabilityRequest
- --------------------------------------------------------------------}
-
- TUpdateAvailabilityRequest = Class(TGoogleBaseObject)
- Private
- Favailabilities : TUpdateAvailabilityRequestTypeavailabilitiesArray;
- Protected
- //Property setters
- Procedure Setavailabilities(AIndex : Integer; const AValue : TUpdateAvailabilityRequestTypeavailabilitiesArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property availabilities : TUpdateAvailabilityRequestTypeavailabilitiesArray Index 0 Read Favailabilities Write Setavailabilities;
- end;
- TUpdateAvailabilityRequestClass = Class of TUpdateAvailabilityRequest;
-
- { --------------------------------------------------------------------
- TUpdateAvailabilityResponse
- --------------------------------------------------------------------}
-
- TUpdateAvailabilityResponse = Class(TGoogleBaseObject)
- Private
- Favailabilities : TUpdateAvailabilityResponseTypeavailabilitiesArray;
- Protected
- //Property setters
- Procedure Setavailabilities(AIndex : Integer; const AValue : TUpdateAvailabilityResponseTypeavailabilitiesArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property availabilities : TUpdateAvailabilityResponseTypeavailabilitiesArray Index 0 Read Favailabilities Write Setavailabilities;
- end;
- TUpdateAvailabilityResponseClass = Class of TUpdateAvailabilityResponse;
-
- { --------------------------------------------------------------------
- TConversionResource
- --------------------------------------------------------------------}
-
-
- //Optional query Options for TConversionResource, method Get
-
- TConversionGetOptions = Record
- adGroupId : int64;
- adId : int64;
- campaignId : int64;
- criterionId : int64;
- endDate : integer;
- rowCount : integer;
- startDate : integer;
- startRow : integer;
- end;
-
-
- //Optional query Options for TConversionResource, method Patch
-
- TConversionPatchOptions = Record
- advertiserId : int64;
- agencyId : int64;
- endDate : integer;
- engineAccountId : int64;
- rowCount : integer;
- startDate : integer;
- startRow : integer;
- end;
-
- TConversionResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function Get(advertiserId: string; agencyId: string; engineAccountId: string; AQuery : string = '') : TConversionList;
- Function Get(advertiserId: string; agencyId: string; engineAccountId: string; AQuery : TConversiongetOptions) : TConversionList;
- Function Insert(aConversionList : TConversionList) : TConversionList;
- Function Patch(aConversionList : TConversionList; AQuery : string = '') : TConversionList;
- Function Patch(aConversionList : TConversionList; AQuery : TConversionpatchOptions) : TConversionList;
- Function Update(aConversionList : TConversionList) : TConversionList;
- Function UpdateAvailability(aUpdateAvailabilityRequest : TUpdateAvailabilityRequest) : TUpdateAvailabilityResponse;
- end;
-
-
- { --------------------------------------------------------------------
- TReportsResource
- --------------------------------------------------------------------}
-
- TReportsResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function Generate(aReportRequest : TReportRequest) : TReport;
- Function Get(reportId: string) : TReport;
- Procedure GetFile(reportFragment: integer; reportId: string);
- Function Request(aReportRequest : TReportRequest) : TReport;
- end;
-
-
- { --------------------------------------------------------------------
- TSavedColumnsResource
- --------------------------------------------------------------------}
-
- TSavedColumnsResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function List(advertiserId: string; agencyId: string) : TSavedColumnList;
- end;
-
-
- { --------------------------------------------------------------------
- TDoubleclicksearchAPI
- --------------------------------------------------------------------}
-
- TDoubleclicksearchAPI = Class(TGoogleAPI)
- Private
- FConversionInstance : TConversionResource;
- FReportsInstance : TReportsResource;
- FSavedColumnsInstance : TSavedColumnsResource;
- Function GetConversionInstance : TConversionResource;virtual;
- Function GetReportsInstance : TReportsResource;virtual;
- Function GetSavedColumnsInstance : TSavedColumnsResource;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 CreateConversionResource(AOwner : TComponent) : TConversionResource;virtual;overload;
- Function CreateConversionResource : TConversionResource;virtual;overload;
- Function CreateReportsResource(AOwner : TComponent) : TReportsResource;virtual;overload;
- Function CreateReportsResource : TReportsResource;virtual;overload;
- Function CreateSavedColumnsResource(AOwner : TComponent) : TSavedColumnsResource;virtual;overload;
- Function CreateSavedColumnsResource : TSavedColumnsResource;virtual;overload;
- //Add default on-demand instances for resources
- Property ConversionResource : TConversionResource Read GetConversionInstance;
- Property ReportsResource : TReportsResource Read GetReportsInstance;
- Property SavedColumnsResource : TSavedColumnsResource Read GetSavedColumnsInstance;
- end;
- implementation
- { --------------------------------------------------------------------
- TAvailability
- --------------------------------------------------------------------}
- Procedure TAvailability.SetadvertiserId(AIndex : Integer; const AValue : String);
- begin
- If (FadvertiserId=AValue) then exit;
- FadvertiserId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAvailability.SetagencyId(AIndex : Integer; const AValue : String);
- begin
- If (FagencyId=AValue) then exit;
- FagencyId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAvailability.SetavailabilityTimestamp(AIndex : Integer; const AValue : String);
- begin
- If (FavailabilityTimestamp=AValue) then exit;
- FavailabilityTimestamp:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAvailability.SetsegmentationId(AIndex : Integer; const AValue : String);
- begin
- If (FsegmentationId=AValue) then exit;
- FsegmentationId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAvailability.SetsegmentationName(AIndex : Integer; const AValue : String);
- begin
- If (FsegmentationName=AValue) then exit;
- FsegmentationName:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAvailability.SetsegmentationType(AIndex : Integer; const AValue : String);
- begin
- If (FsegmentationType=AValue) then exit;
- FsegmentationType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TConversion
- --------------------------------------------------------------------}
- Procedure TConversion.SetadGroupId(AIndex : Integer; const AValue : String);
- begin
- If (FadGroupId=AValue) then exit;
- FadGroupId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetadId(AIndex : Integer; const AValue : String);
- begin
- If (FadId=AValue) then exit;
- FadId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetadvertiserId(AIndex : Integer; const AValue : String);
- begin
- If (FadvertiserId=AValue) then exit;
- FadvertiserId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetagencyId(AIndex : Integer; const AValue : String);
- begin
- If (FagencyId=AValue) then exit;
- FagencyId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetattributionModel(AIndex : Integer; const AValue : String);
- begin
- If (FattributionModel=AValue) then exit;
- FattributionModel:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetcampaignId(AIndex : Integer; const AValue : String);
- begin
- If (FcampaignId=AValue) then exit;
- FcampaignId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.Setchannel(AIndex : Integer; const AValue : String);
- begin
- If (Fchannel=AValue) then exit;
- Fchannel:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetclickId(AIndex : Integer; const AValue : String);
- begin
- If (FclickId=AValue) then exit;
- FclickId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetconversionId(AIndex : Integer; const AValue : String);
- begin
- If (FconversionId=AValue) then exit;
- FconversionId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetconversionModifiedTimestamp(AIndex : Integer; const AValue : String);
- begin
- If (FconversionModifiedTimestamp=AValue) then exit;
- FconversionModifiedTimestamp:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetconversionTimestamp(AIndex : Integer; const AValue : String);
- begin
- If (FconversionTimestamp=AValue) then exit;
- FconversionTimestamp:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetcountMillis(AIndex : Integer; const AValue : String);
- begin
- If (FcountMillis=AValue) then exit;
- FcountMillis:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetcriterionId(AIndex : Integer; const AValue : String);
- begin
- If (FcriterionId=AValue) then exit;
- FcriterionId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetcurrencyCode(AIndex : Integer; const AValue : String);
- begin
- If (FcurrencyCode=AValue) then exit;
- FcurrencyCode:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetcustomDimension(AIndex : Integer; const AValue : TConversionTypecustomDimensionArray);
- begin
- If (FcustomDimension=AValue) then exit;
- FcustomDimension:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetcustomMetric(AIndex : Integer; const AValue : TConversionTypecustomMetricArray);
- begin
- If (FcustomMetric=AValue) then exit;
- FcustomMetric:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetdeviceType(AIndex : Integer; const AValue : String);
- begin
- If (FdeviceType=AValue) then exit;
- FdeviceType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetdsConversionId(AIndex : Integer; const AValue : String);
- begin
- If (FdsConversionId=AValue) then exit;
- FdsConversionId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetengineAccountId(AIndex : Integer; const AValue : String);
- begin
- If (FengineAccountId=AValue) then exit;
- FengineAccountId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetfloodlightOrderId(AIndex : Integer; const AValue : String);
- begin
- If (FfloodlightOrderId=AValue) then exit;
- FfloodlightOrderId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetinventoryAccountId(AIndex : Integer; const AValue : String);
- begin
- If (FinventoryAccountId=AValue) then exit;
- FinventoryAccountId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetproductCountry(AIndex : Integer; const AValue : String);
- begin
- If (FproductCountry=AValue) then exit;
- FproductCountry:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetproductGroupId(AIndex : Integer; const AValue : String);
- begin
- If (FproductGroupId=AValue) then exit;
- FproductGroupId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetproductId(AIndex : Integer; const AValue : String);
- begin
- If (FproductId=AValue) then exit;
- FproductId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetproductLanguage(AIndex : Integer; const AValue : String);
- begin
- If (FproductLanguage=AValue) then exit;
- FproductLanguage:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetquantityMillis(AIndex : Integer; const AValue : String);
- begin
- If (FquantityMillis=AValue) then exit;
- FquantityMillis:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetrevenueMicros(AIndex : Integer; const AValue : String);
- begin
- If (FrevenueMicros=AValue) then exit;
- FrevenueMicros:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetsegmentationId(AIndex : Integer; const AValue : String);
- begin
- If (FsegmentationId=AValue) then exit;
- FsegmentationId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetsegmentationName(AIndex : Integer; const AValue : String);
- begin
- If (FsegmentationName=AValue) then exit;
- FsegmentationName:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetsegmentationType(AIndex : Integer; const AValue : String);
- begin
- If (FsegmentationType=AValue) then exit;
- FsegmentationType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.Setstate(AIndex : Integer; const AValue : String);
- begin
- If (Fstate=AValue) then exit;
- Fstate:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.SetstoreId(AIndex : Integer; const AValue : String);
- begin
- If (FstoreId=AValue) then exit;
- FstoreId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversion.Set_type(AIndex : Integer; const AValue : String);
- begin
- If (F_type=AValue) then exit;
- F_type:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Class Function TConversion.ExportPropertyName(Const AName : String) :String;
- begin
- Case AName of
- '_type' : Result:='type';
- else
- Result:=Inherited ExportPropertyName(AName);
- end;
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TConversion.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'customdimension' : SetLength(FcustomDimension,ALength);
- 'custommetric' : SetLength(FcustomMetric,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TConversionList
- --------------------------------------------------------------------}
- Procedure TConversionList.Setconversion(AIndex : Integer; const AValue : TConversionListTypeconversionArray);
- begin
- If (Fconversion=AValue) then exit;
- Fconversion:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConversionList.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TConversionList.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'conversion' : SetLength(Fconversion,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TCustomDimension
- --------------------------------------------------------------------}
- Procedure TCustomDimension.Setname(AIndex : Integer; const AValue : String);
- begin
- If (Fname=AValue) then exit;
- Fname:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCustomDimension.Setvalue(AIndex : Integer; const AValue : String);
- begin
- If (Fvalue=AValue) then exit;
- Fvalue:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TCustomMetric
- --------------------------------------------------------------------}
- Procedure TCustomMetric.Setname(AIndex : Integer; const AValue : String);
- begin
- If (Fname=AValue) then exit;
- Fname:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCustomMetric.Setvalue(AIndex : Integer; const AValue : double);
- begin
- If (Fvalue=AValue) then exit;
- Fvalue:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TReportTypefilesItem
- --------------------------------------------------------------------}
- Procedure TReportTypefilesItem.SetbyteCount(AIndex : Integer; const AValue : String);
- begin
- If (FbyteCount=AValue) then exit;
- FbyteCount:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportTypefilesItem.Seturl(AIndex : Integer; const AValue : String);
- begin
- If (Furl=AValue) then exit;
- Furl:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TReport
- --------------------------------------------------------------------}
- Procedure TReport.Setfiles(AIndex : Integer; const AValue : TReportTypefilesArray);
- begin
- If (Ffiles=AValue) then exit;
- Ffiles:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReport.Setid(AIndex : Integer; const AValue : String);
- begin
- If (Fid=AValue) then exit;
- Fid:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReport.SetisReportReady(AIndex : Integer; const AValue : boolean);
- begin
- If (FisReportReady=AValue) then exit;
- FisReportReady:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReport.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReport.Setrequest(AIndex : Integer; const AValue : TReportRequest);
- begin
- If (Frequest=AValue) then exit;
- Frequest:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReport.SetrowCount(AIndex : Integer; const AValue : integer);
- begin
- If (FrowCount=AValue) then exit;
- FrowCount:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReport.Setrows(AIndex : Integer; const AValue : TReportTyperowsArray);
- begin
- If (Frows=AValue) then exit;
- Frows:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReport.SetstatisticsCurrencyCode(AIndex : Integer; const AValue : String);
- begin
- If (FstatisticsCurrencyCode=AValue) then exit;
- FstatisticsCurrencyCode:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReport.SetstatisticsTimeZone(AIndex : Integer; const AValue : String);
- begin
- If (FstatisticsTimeZone=AValue) then exit;
- FstatisticsTimeZone:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TReport.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'files' : SetLength(Ffiles,ALength);
- 'rows' : SetLength(Frows,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TReportApiColumnSpec
- --------------------------------------------------------------------}
- Procedure TReportApiColumnSpec.SetcolumnName(AIndex : Integer; const AValue : String);
- begin
- If (FcolumnName=AValue) then exit;
- FcolumnName:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportApiColumnSpec.SetcustomDimensionName(AIndex : Integer; const AValue : String);
- begin
- If (FcustomDimensionName=AValue) then exit;
- FcustomDimensionName:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportApiColumnSpec.SetcustomMetricName(AIndex : Integer; const AValue : String);
- begin
- If (FcustomMetricName=AValue) then exit;
- FcustomMetricName:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportApiColumnSpec.SetendDate(AIndex : Integer; const AValue : String);
- begin
- If (FendDate=AValue) then exit;
- FendDate:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportApiColumnSpec.SetgroupByColumn(AIndex : Integer; const AValue : boolean);
- begin
- If (FgroupByColumn=AValue) then exit;
- FgroupByColumn:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportApiColumnSpec.SetheaderText(AIndex : Integer; const AValue : String);
- begin
- If (FheaderText=AValue) then exit;
- FheaderText:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportApiColumnSpec.SetplatformSource(AIndex : Integer; const AValue : String);
- begin
- If (FplatformSource=AValue) then exit;
- FplatformSource:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportApiColumnSpec.SetproductReportPerspective(AIndex : Integer; const AValue : String);
- begin
- If (FproductReportPerspective=AValue) then exit;
- FproductReportPerspective:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportApiColumnSpec.SetsavedColumnName(AIndex : Integer; const AValue : String);
- begin
- If (FsavedColumnName=AValue) then exit;
- FsavedColumnName:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportApiColumnSpec.SetstartDate(AIndex : Integer; const AValue : String);
- begin
- If (FstartDate=AValue) then exit;
- FstartDate:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TReportRequestTypefiltersItem
- --------------------------------------------------------------------}
- Procedure TReportRequestTypefiltersItem.Setcolumn(AIndex : Integer; const AValue : TReportApiColumnSpec);
- begin
- If (Fcolumn=AValue) then exit;
- Fcolumn:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequestTypefiltersItem.Set_operator(AIndex : Integer; const AValue : String);
- begin
- If (F_operator=AValue) then exit;
- F_operator:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequestTypefiltersItem.Setvalues(AIndex : Integer; const AValue : TTJSONSchemaArray);
- begin
- If (Fvalues=AValue) then exit;
- Fvalues:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Class Function TReportRequestTypefiltersItem.ExportPropertyName(Const AName : String) :String;
- begin
- Case AName of
- '_operator' : Result:='operator';
- else
- Result:=Inherited ExportPropertyName(AName);
- end;
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TReportRequestTypefiltersItem.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'values' : SetLength(Fvalues,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TReportRequestTypeorderByItem
- --------------------------------------------------------------------}
- Procedure TReportRequestTypeorderByItem.Setcolumn(AIndex : Integer; const AValue : TReportApiColumnSpec);
- begin
- If (Fcolumn=AValue) then exit;
- Fcolumn:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequestTypeorderByItem.SetsortOrder(AIndex : Integer; const AValue : String);
- begin
- If (FsortOrder=AValue) then exit;
- FsortOrder:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TReportRequestTypereportScope
- --------------------------------------------------------------------}
- Procedure TReportRequestTypereportScope.SetadGroupId(AIndex : Integer; const AValue : String);
- begin
- If (FadGroupId=AValue) then exit;
- FadGroupId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequestTypereportScope.SetadId(AIndex : Integer; const AValue : String);
- begin
- If (FadId=AValue) then exit;
- FadId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequestTypereportScope.SetadvertiserId(AIndex : Integer; const AValue : String);
- begin
- If (FadvertiserId=AValue) then exit;
- FadvertiserId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequestTypereportScope.SetagencyId(AIndex : Integer; const AValue : String);
- begin
- If (FagencyId=AValue) then exit;
- FagencyId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequestTypereportScope.SetcampaignId(AIndex : Integer; const AValue : String);
- begin
- If (FcampaignId=AValue) then exit;
- FcampaignId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequestTypereportScope.SetengineAccountId(AIndex : Integer; const AValue : String);
- begin
- If (FengineAccountId=AValue) then exit;
- FengineAccountId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequestTypereportScope.SetkeywordId(AIndex : Integer; const AValue : String);
- begin
- If (FkeywordId=AValue) then exit;
- FkeywordId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TReportRequestTypetimeRange
- --------------------------------------------------------------------}
- Procedure TReportRequestTypetimeRange.SetchangedAttributesSinceTimestamp(AIndex : Integer; const AValue : TDatetime);
- begin
- If (FchangedAttributesSinceTimestamp=AValue) then exit;
- FchangedAttributesSinceTimestamp:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequestTypetimeRange.SetchangedMetricsSinceTimestamp(AIndex : Integer; const AValue : TDatetime);
- begin
- If (FchangedMetricsSinceTimestamp=AValue) then exit;
- FchangedMetricsSinceTimestamp:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequestTypetimeRange.SetendDate(AIndex : Integer; const AValue : String);
- begin
- If (FendDate=AValue) then exit;
- FendDate:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequestTypetimeRange.SetstartDate(AIndex : Integer; const AValue : String);
- begin
- If (FstartDate=AValue) then exit;
- FstartDate:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TReportRequest
- --------------------------------------------------------------------}
- Procedure TReportRequest.Setcolumns(AIndex : Integer; const AValue : TReportRequestTypecolumnsArray);
- begin
- If (Fcolumns=AValue) then exit;
- Fcolumns:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequest.SetdownloadFormat(AIndex : Integer; const AValue : String);
- begin
- If (FdownloadFormat=AValue) then exit;
- FdownloadFormat:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequest.Setfilters(AIndex : Integer; const AValue : TReportRequestTypefiltersArray);
- begin
- If (Ffilters=AValue) then exit;
- Ffilters:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequest.SetincludeDeletedEntities(AIndex : Integer; const AValue : boolean);
- begin
- If (FincludeDeletedEntities=AValue) then exit;
- FincludeDeletedEntities:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequest.SetincludeRemovedEntities(AIndex : Integer; const AValue : boolean);
- begin
- If (FincludeRemovedEntities=AValue) then exit;
- FincludeRemovedEntities:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequest.SetmaxRowsPerFile(AIndex : Integer; const AValue : integer);
- begin
- If (FmaxRowsPerFile=AValue) then exit;
- FmaxRowsPerFile:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequest.SetorderBy(AIndex : Integer; const AValue : TReportRequestTypeorderByArray);
- begin
- If (ForderBy=AValue) then exit;
- ForderBy:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequest.SetreportScope(AIndex : Integer; const AValue : TReportRequestTypereportScope);
- begin
- If (FreportScope=AValue) then exit;
- FreportScope:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequest.SetreportType(AIndex : Integer; const AValue : String);
- begin
- If (FreportType=AValue) then exit;
- FreportType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequest.SetrowCount(AIndex : Integer; const AValue : integer);
- begin
- If (FrowCount=AValue) then exit;
- FrowCount:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequest.SetstartRow(AIndex : Integer; const AValue : integer);
- begin
- If (FstartRow=AValue) then exit;
- FstartRow:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequest.SetstatisticsCurrency(AIndex : Integer; const AValue : String);
- begin
- If (FstatisticsCurrency=AValue) then exit;
- FstatisticsCurrency:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequest.SettimeRange(AIndex : Integer; const AValue : TReportRequestTypetimeRange);
- begin
- If (FtimeRange=AValue) then exit;
- FtimeRange:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TReportRequest.SetverifySingleTimeZone(AIndex : Integer; const AValue : boolean);
- begin
- If (FverifySingleTimeZone=AValue) then exit;
- FverifySingleTimeZone:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TReportRequest.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'columns' : SetLength(Fcolumns,ALength);
- 'filters' : SetLength(Ffilters,ALength);
- 'orderby' : SetLength(ForderBy,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TReportRow
- --------------------------------------------------------------------}
- Class Function TReportRow.AllowAdditionalProperties : Boolean;
- begin
- Result:=True;
- end;
- { --------------------------------------------------------------------
- TSavedColumn
- --------------------------------------------------------------------}
- Procedure TSavedColumn.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TSavedColumn.SetsavedColumnName(AIndex : Integer; const AValue : String);
- begin
- If (FsavedColumnName=AValue) then exit;
- FsavedColumnName:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TSavedColumn.Set_type(AIndex : Integer; const AValue : String);
- begin
- If (F_type=AValue) then exit;
- F_type:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Class Function TSavedColumn.ExportPropertyName(Const AName : String) :String;
- begin
- Case AName of
- '_type' : Result:='type';
- else
- Result:=Inherited ExportPropertyName(AName);
- end;
- end;
- { --------------------------------------------------------------------
- TSavedColumnList
- --------------------------------------------------------------------}
- Procedure TSavedColumnList.Setitems(AIndex : Integer; const AValue : TSavedColumnListTypeitemsArray);
- begin
- If (Fitems=AValue) then exit;
- Fitems:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TSavedColumnList.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TSavedColumnList.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'items' : SetLength(Fitems,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TUpdateAvailabilityRequest
- --------------------------------------------------------------------}
- Procedure TUpdateAvailabilityRequest.Setavailabilities(AIndex : Integer; const AValue : TUpdateAvailabilityRequestTypeavailabilitiesArray);
- begin
- If (Favailabilities=AValue) then exit;
- Favailabilities:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TUpdateAvailabilityRequest.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'availabilities' : SetLength(Favailabilities,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TUpdateAvailabilityResponse
- --------------------------------------------------------------------}
- Procedure TUpdateAvailabilityResponse.Setavailabilities(AIndex : Integer; const AValue : TUpdateAvailabilityResponseTypeavailabilitiesArray);
- begin
- If (Favailabilities=AValue) then exit;
- Favailabilities:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TUpdateAvailabilityResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'availabilities' : SetLength(Favailabilities,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TConversionResource
- --------------------------------------------------------------------}
- Class Function TConversionResource.ResourceName : String;
- begin
- Result:='conversion';
- end;
- Class Function TConversionResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TdoubleclicksearchAPI;
- end;
- Function TConversionResource.Get(advertiserId: string; agencyId: string; engineAccountId: string; AQuery : string = '') : TConversionList;
- Const
- _HTTPMethod = 'GET';
- _Path = 'agency/{agencyId}/advertiser/{advertiserId}/engine/{engineAccountId}/conversion';
- _Methodid = 'doubleclicksearch.conversion.get';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['advertiserId',advertiserId,'agencyId',agencyId,'engineAccountId',engineAccountId]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TConversionList) as TConversionList;
- end;
- Function TConversionResource.Get(advertiserId: string; agencyId: string; engineAccountId: string; AQuery : TConversiongetOptions) : TConversionList;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'adGroupId',AQuery.adGroupId);
- AddToQuery(_Q,'adId',AQuery.adId);
- AddToQuery(_Q,'campaignId',AQuery.campaignId);
- AddToQuery(_Q,'criterionId',AQuery.criterionId);
- AddToQuery(_Q,'endDate',AQuery.endDate);
- AddToQuery(_Q,'rowCount',AQuery.rowCount);
- AddToQuery(_Q,'startDate',AQuery.startDate);
- AddToQuery(_Q,'startRow',AQuery.startRow);
- Result:=Get(advertiserId,agencyId,engineAccountId,_Q);
- end;
- Function TConversionResource.Insert(aConversionList : TConversionList) : TConversionList;
- Const
- _HTTPMethod = 'POST';
- _Path = 'conversion';
- _Methodid = 'doubleclicksearch.conversion.insert';
- begin
- Result:=ServiceCall(_HTTPMethod,_Path,'',aConversionList,TConversionList) as TConversionList;
- end;
- Function TConversionResource.Patch(aConversionList : TConversionList; AQuery : string = '') : TConversionList;
- Const
- _HTTPMethod = 'PATCH';
- _Path = 'conversion';
- _Methodid = 'doubleclicksearch.conversion.patch';
- begin
- Result:=ServiceCall(_HTTPMethod,_Path,AQuery,aConversionList,TConversionList) as TConversionList;
- end;
- Function TConversionResource.Patch(aConversionList : TConversionList; AQuery : TConversionpatchOptions) : TConversionList;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'advertiserId',AQuery.advertiserId);
- AddToQuery(_Q,'agencyId',AQuery.agencyId);
- AddToQuery(_Q,'endDate',AQuery.endDate);
- AddToQuery(_Q,'engineAccountId',AQuery.engineAccountId);
- AddToQuery(_Q,'rowCount',AQuery.rowCount);
- AddToQuery(_Q,'startDate',AQuery.startDate);
- AddToQuery(_Q,'startRow',AQuery.startRow);
- Result:=Patch(aConversionList,_Q);
- end;
- Function TConversionResource.Update(aConversionList : TConversionList) : TConversionList;
- Const
- _HTTPMethod = 'PUT';
- _Path = 'conversion';
- _Methodid = 'doubleclicksearch.conversion.update';
- begin
- Result:=ServiceCall(_HTTPMethod,_Path,'',aConversionList,TConversionList) as TConversionList;
- end;
- Function TConversionResource.UpdateAvailability(aUpdateAvailabilityRequest : TUpdateAvailabilityRequest) : TUpdateAvailabilityResponse;
- Const
- _HTTPMethod = 'POST';
- _Path = 'conversion/updateAvailability';
- _Methodid = 'doubleclicksearch.conversion.updateAvailability';
- begin
- Result:=ServiceCall(_HTTPMethod,_Path,'',aUpdateAvailabilityRequest,TUpdateAvailabilityResponse) as TUpdateAvailabilityResponse;
- end;
- { --------------------------------------------------------------------
- TReportsResource
- --------------------------------------------------------------------}
- Class Function TReportsResource.ResourceName : String;
- begin
- Result:='reports';
- end;
- Class Function TReportsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TdoubleclicksearchAPI;
- end;
- Function TReportsResource.Generate(aReportRequest : TReportRequest) : TReport;
- Const
- _HTTPMethod = 'POST';
- _Path = 'reports/generate';
- _Methodid = 'doubleclicksearch.reports.generate';
- begin
- Result:=ServiceCall(_HTTPMethod,_Path,'',aReportRequest,TReport) as TReport;
- end;
- Function TReportsResource.Get(reportId: string) : TReport;
- Const
- _HTTPMethod = 'GET';
- _Path = 'reports/{reportId}';
- _Methodid = 'doubleclicksearch.reports.get';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['reportId',reportId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TReport) as TReport;
- end;
- Procedure TReportsResource.GetFile(reportFragment: integer; reportId: string);
- Const
- _HTTPMethod = 'GET';
- _Path = 'reports/{reportId}/files/{reportFragment}';
- _Methodid = 'doubleclicksearch.reports.getFile';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['reportFragment',reportFragment,'reportId',reportId]);
- ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
- end;
- Function TReportsResource.Request(aReportRequest : TReportRequest) : TReport;
- Const
- _HTTPMethod = 'POST';
- _Path = 'reports';
- _Methodid = 'doubleclicksearch.reports.request';
- begin
- Result:=ServiceCall(_HTTPMethod,_Path,'',aReportRequest,TReport) as TReport;
- end;
- { --------------------------------------------------------------------
- TSavedColumnsResource
- --------------------------------------------------------------------}
- Class Function TSavedColumnsResource.ResourceName : String;
- begin
- Result:='savedColumns';
- end;
- Class Function TSavedColumnsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TdoubleclicksearchAPI;
- end;
- Function TSavedColumnsResource.List(advertiserId: string; agencyId: string) : TSavedColumnList;
- Const
- _HTTPMethod = 'GET';
- _Path = 'agency/{agencyId}/advertiser/{advertiserId}/savedcolumns';
- _Methodid = 'doubleclicksearch.savedColumns.list';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['advertiserId',advertiserId,'agencyId',agencyId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TSavedColumnList) as TSavedColumnList;
- end;
- { --------------------------------------------------------------------
- TDoubleclicksearchAPI
- --------------------------------------------------------------------}
- Class Function TDoubleclicksearchAPI.APIName : String;
- begin
- Result:='doubleclicksearch';
- end;
- Class Function TDoubleclicksearchAPI.APIVersion : String;
- begin
- Result:='v2';
- end;
- Class Function TDoubleclicksearchAPI.APIRevision : String;
- begin
- Result:='20160519';
- end;
- Class Function TDoubleclicksearchAPI.APIID : String;
- begin
- Result:='doubleclicksearch:v2';
- end;
- Class Function TDoubleclicksearchAPI.APITitle : String;
- begin
- Result:='DoubleClick Search API';
- end;
- Class Function TDoubleclicksearchAPI.APIDescription : String;
- begin
- Result:='Reports and modifies your advertising data in DoubleClick Search (for example, campaigns, ad groups, keywords, and conversions).';
- end;
- Class Function TDoubleclicksearchAPI.APIOwnerDomain : String;
- begin
- Result:='google.com';
- end;
- Class Function TDoubleclicksearchAPI.APIOwnerName : String;
- begin
- Result:='Google';
- end;
- Class Function TDoubleclicksearchAPI.APIIcon16 : String;
- begin
- Result:='http://www.google.com/images/icons/product/search-16.gif';
- end;
- Class Function TDoubleclicksearchAPI.APIIcon32 : String;
- begin
- Result:='http://www.google.com/images/icons/product/search-32.gif';
- end;
- Class Function TDoubleclicksearchAPI.APIdocumentationLink : String;
- begin
- Result:='https://developers.google.com/doubleclick-search/';
- end;
- Class Function TDoubleclicksearchAPI.APIrootUrl : string;
- begin
- Result:='https://www.googleapis.com/';
- end;
- Class Function TDoubleclicksearchAPI.APIbasePath : string;
- begin
- Result:='/doubleclicksearch/v2/';
- end;
- Class Function TDoubleclicksearchAPI.APIbaseURL : String;
- begin
- Result:='https://www.googleapis.com/doubleclicksearch/v2/';
- end;
- Class Function TDoubleclicksearchAPI.APIProtocol : string;
- begin
- Result:='rest';
- end;
- Class Function TDoubleclicksearchAPI.APIservicePath : string;
- begin
- Result:='doubleclicksearch/v2/';
- end;
- Class Function TDoubleclicksearchAPI.APIbatchPath : String;
- begin
- Result:='batch';
- end;
- Class Function TDoubleclicksearchAPI.APIAuthScopes : TScopeInfoArray;
- begin
- SetLength(Result,1);
- Result[0].Name:='https://www.googleapis.com/auth/doubleclicksearch';
- Result[0].Description:='View and manage your advertising data in DoubleClick Search';
-
- end;
- Class Function TDoubleclicksearchAPI.APINeedsAuth : Boolean;
- begin
- Result:=True;
- end;
- Class Procedure TDoubleclicksearchAPI.RegisterAPIResources;
- begin
- TAvailability.RegisterObject;
- TConversion.RegisterObject;
- TConversionList.RegisterObject;
- TCustomDimension.RegisterObject;
- TCustomMetric.RegisterObject;
- TReportTypefilesItem.RegisterObject;
- TReport.RegisterObject;
- TReportApiColumnSpec.RegisterObject;
- TReportRequestTypefiltersItem.RegisterObject;
- TReportRequestTypeorderByItem.RegisterObject;
- TReportRequestTypereportScope.RegisterObject;
- TReportRequestTypetimeRange.RegisterObject;
- TReportRequest.RegisterObject;
- TReportRow.RegisterObject;
- TSavedColumn.RegisterObject;
- TSavedColumnList.RegisterObject;
- TUpdateAvailabilityRequest.RegisterObject;
- TUpdateAvailabilityResponse.RegisterObject;
- end;
- Function TDoubleclicksearchAPI.GetConversionInstance : TConversionResource;
- begin
- if (FConversionInstance=Nil) then
- FConversionInstance:=CreateConversionResource;
- Result:=FConversionInstance;
- end;
- Function TDoubleclicksearchAPI.CreateConversionResource : TConversionResource;
- begin
- Result:=CreateConversionResource(Self);
- end;
- Function TDoubleclicksearchAPI.CreateConversionResource(AOwner : TComponent) : TConversionResource;
- begin
- Result:=TConversionResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TDoubleclicksearchAPI.GetReportsInstance : TReportsResource;
- begin
- if (FReportsInstance=Nil) then
- FReportsInstance:=CreateReportsResource;
- Result:=FReportsInstance;
- end;
- Function TDoubleclicksearchAPI.CreateReportsResource : TReportsResource;
- begin
- Result:=CreateReportsResource(Self);
- end;
- Function TDoubleclicksearchAPI.CreateReportsResource(AOwner : TComponent) : TReportsResource;
- begin
- Result:=TReportsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TDoubleclicksearchAPI.GetSavedColumnsInstance : TSavedColumnsResource;
- begin
- if (FSavedColumnsInstance=Nil) then
- FSavedColumnsInstance:=CreateSavedColumnsResource;
- Result:=FSavedColumnsInstance;
- end;
- Function TDoubleclicksearchAPI.CreateSavedColumnsResource : TSavedColumnsResource;
- begin
- Result:=CreateSavedColumnsResource(Self);
- end;
- Function TDoubleclicksearchAPI.CreateSavedColumnsResource(AOwner : TComponent) : TSavedColumnsResource;
- begin
- Result:=TSavedColumnsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- initialization
- TDoubleclicksearchAPI.RegisterAPI;
- end.
|