1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011 |
- unit googlesafebrowsing;
- {$MODE objfpc}
- {$H+}
- interface
- uses sysutils, classes, googleservice, restbase, googlebase;
- type
-
- //Top-level schema types
- TFindThreatMatchesRequest = Class;
- TClientInfo = Class;
- TThreatInfo = Class;
- TThreatEntry = Class;
- TFindThreatMatchesResponse = Class;
- TThreatMatch = Class;
- TThreatEntryMetadata = Class;
- TMetadataEntry = Class;
- TFetchThreatListUpdatesRequest = Class;
- TListUpdateRequest = Class;
- TConstraints = Class;
- TFetchThreatListUpdatesResponse = Class;
- TListUpdateResponse = Class;
- TThreatEntrySet = Class;
- TRawHashes = Class;
- TRawIndices = Class;
- TRiceDeltaEncoding = Class;
- TChecksum = Class;
- TFindFullHashesRequest = Class;
- TFindFullHashesResponse = Class;
- TListThreatListsResponse = Class;
- TThreatListDescriptor = Class;
- TFindThreatMatchesRequestArray = Array of TFindThreatMatchesRequest;
- TClientInfoArray = Array of TClientInfo;
- TThreatInfoArray = Array of TThreatInfo;
- TThreatEntryArray = Array of TThreatEntry;
- TFindThreatMatchesResponseArray = Array of TFindThreatMatchesResponse;
- TThreatMatchArray = Array of TThreatMatch;
- TThreatEntryMetadataArray = Array of TThreatEntryMetadata;
- TMetadataEntryArray = Array of TMetadataEntry;
- TFetchThreatListUpdatesRequestArray = Array of TFetchThreatListUpdatesRequest;
- TListUpdateRequestArray = Array of TListUpdateRequest;
- TConstraintsArray = Array of TConstraints;
- TFetchThreatListUpdatesResponseArray = Array of TFetchThreatListUpdatesResponse;
- TListUpdateResponseArray = Array of TListUpdateResponse;
- TThreatEntrySetArray = Array of TThreatEntrySet;
- TRawHashesArray = Array of TRawHashes;
- TRawIndicesArray = Array of TRawIndices;
- TRiceDeltaEncodingArray = Array of TRiceDeltaEncoding;
- TChecksumArray = Array of TChecksum;
- TFindFullHashesRequestArray = Array of TFindFullHashesRequest;
- TFindFullHashesResponseArray = Array of TFindFullHashesResponse;
- TListThreatListsResponseArray = Array of TListThreatListsResponse;
- TThreatListDescriptorArray = Array of TThreatListDescriptor;
- //Anonymous types, using auto-generated names
- TThreatInfoTypethreatEntriesArray = Array of TThreatEntry;
- TFindThreatMatchesResponseTypematchesArray = Array of TThreatMatch;
- TThreatEntryMetadataTypeentriesArray = Array of TMetadataEntry;
- TFetchThreatListUpdatesRequestTypelistUpdateRequestsArray = Array of TListUpdateRequest;
- TFetchThreatListUpdatesResponseTypelistUpdateResponsesArray = Array of TListUpdateResponse;
- TListUpdateResponseTypeadditionsArray = Array of TThreatEntrySet;
- TListUpdateResponseTyperemovalsArray = Array of TThreatEntrySet;
- TFindFullHashesResponseTypematchesArray = Array of TThreatMatch;
- TListThreatListsResponseTypethreatListsArray = Array of TThreatListDescriptor;
-
- { --------------------------------------------------------------------
- TFindThreatMatchesRequest
- --------------------------------------------------------------------}
-
- TFindThreatMatchesRequest = Class(TGoogleBaseObject)
- Private
- Fclient : TClientInfo;
- FthreatInfo : TThreatInfo;
- Protected
- //Property setters
- Procedure Setclient(AIndex : Integer; const AValue : TClientInfo); virtual;
- Procedure SetthreatInfo(AIndex : Integer; const AValue : TThreatInfo); virtual;
- Public
- Published
- Property client : TClientInfo Index 0 Read Fclient Write Setclient;
- Property threatInfo : TThreatInfo Index 8 Read FthreatInfo Write SetthreatInfo;
- end;
- TFindThreatMatchesRequestClass = Class of TFindThreatMatchesRequest;
-
- { --------------------------------------------------------------------
- TClientInfo
- --------------------------------------------------------------------}
-
- TClientInfo = Class(TGoogleBaseObject)
- Private
- FclientId : String;
- FclientVersion : String;
- Protected
- //Property setters
- Procedure SetclientId(AIndex : Integer; const AValue : String); virtual;
- Procedure SetclientVersion(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property clientId : String Index 0 Read FclientId Write SetclientId;
- Property clientVersion : String Index 8 Read FclientVersion Write SetclientVersion;
- end;
- TClientInfoClass = Class of TClientInfo;
-
- { --------------------------------------------------------------------
- TThreatInfo
- --------------------------------------------------------------------}
-
- TThreatInfo = Class(TGoogleBaseObject)
- Private
- FthreatTypes : TStringArray;
- FplatformTypes : TStringArray;
- FthreatEntryTypes : TStringArray;
- FthreatEntries : TThreatInfoTypethreatEntriesArray;
- Protected
- //Property setters
- Procedure SetthreatTypes(AIndex : Integer; const AValue : TStringArray); virtual;
- Procedure SetplatformTypes(AIndex : Integer; const AValue : TStringArray); virtual;
- Procedure SetthreatEntryTypes(AIndex : Integer; const AValue : TStringArray); virtual;
- Procedure SetthreatEntries(AIndex : Integer; const AValue : TThreatInfoTypethreatEntriesArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property threatTypes : TStringArray Index 0 Read FthreatTypes Write SetthreatTypes;
- Property platformTypes : TStringArray Index 8 Read FplatformTypes Write SetplatformTypes;
- Property threatEntryTypes : TStringArray Index 16 Read FthreatEntryTypes Write SetthreatEntryTypes;
- Property threatEntries : TThreatInfoTypethreatEntriesArray Index 24 Read FthreatEntries Write SetthreatEntries;
- end;
- TThreatInfoClass = Class of TThreatInfo;
-
- { --------------------------------------------------------------------
- TThreatEntry
- --------------------------------------------------------------------}
-
- TThreatEntry = Class(TGoogleBaseObject)
- Private
- Fhash : String;
- Furl : String;
- Fdigest : String;
- Protected
- //Property setters
- Procedure Sethash(AIndex : Integer; const AValue : String); virtual;
- Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
- Procedure Setdigest(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property hash : String Index 0 Read Fhash Write Sethash;
- Property url : String Index 8 Read Furl Write Seturl;
- Property digest : String Index 16 Read Fdigest Write Setdigest;
- end;
- TThreatEntryClass = Class of TThreatEntry;
-
- { --------------------------------------------------------------------
- TFindThreatMatchesResponse
- --------------------------------------------------------------------}
-
- TFindThreatMatchesResponse = Class(TGoogleBaseObject)
- Private
- Fmatches : TFindThreatMatchesResponseTypematchesArray;
- Protected
- //Property setters
- Procedure Setmatches(AIndex : Integer; const AValue : TFindThreatMatchesResponseTypematchesArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property matches : TFindThreatMatchesResponseTypematchesArray Index 0 Read Fmatches Write Setmatches;
- end;
- TFindThreatMatchesResponseClass = Class of TFindThreatMatchesResponse;
-
- { --------------------------------------------------------------------
- TThreatMatch
- --------------------------------------------------------------------}
-
- TThreatMatch = Class(TGoogleBaseObject)
- Private
- FthreatType : String;
- FplatformType : String;
- FthreatEntryType : String;
- Fthreat : TThreatEntry;
- FthreatEntryMetadata : TThreatEntryMetadata;
- FcacheDuration : String;
- Protected
- //Property setters
- Procedure SetthreatType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetplatformType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetthreatEntryType(AIndex : Integer; const AValue : String); virtual;
- Procedure Setthreat(AIndex : Integer; const AValue : TThreatEntry); virtual;
- Procedure SetthreatEntryMetadata(AIndex : Integer; const AValue : TThreatEntryMetadata); virtual;
- Procedure SetcacheDuration(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property threatType : String Index 0 Read FthreatType Write SetthreatType;
- Property platformType : String Index 8 Read FplatformType Write SetplatformType;
- Property threatEntryType : String Index 16 Read FthreatEntryType Write SetthreatEntryType;
- Property threat : TThreatEntry Index 24 Read Fthreat Write Setthreat;
- Property threatEntryMetadata : TThreatEntryMetadata Index 32 Read FthreatEntryMetadata Write SetthreatEntryMetadata;
- Property cacheDuration : String Index 40 Read FcacheDuration Write SetcacheDuration;
- end;
- TThreatMatchClass = Class of TThreatMatch;
-
- { --------------------------------------------------------------------
- TThreatEntryMetadata
- --------------------------------------------------------------------}
-
- TThreatEntryMetadata = Class(TGoogleBaseObject)
- Private
- Fentries : TThreatEntryMetadataTypeentriesArray;
- Protected
- //Property setters
- Procedure Setentries(AIndex : Integer; const AValue : TThreatEntryMetadataTypeentriesArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property entries : TThreatEntryMetadataTypeentriesArray Index 0 Read Fentries Write Setentries;
- end;
- TThreatEntryMetadataClass = Class of TThreatEntryMetadata;
-
- { --------------------------------------------------------------------
- TMetadataEntry
- --------------------------------------------------------------------}
-
- TMetadataEntry = Class(TGoogleBaseObject)
- Private
- Fkey : String;
- Fvalue : String;
- Protected
- //Property setters
- Procedure Setkey(AIndex : Integer; const AValue : String); virtual;
- Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property key : String Index 0 Read Fkey Write Setkey;
- Property value : String Index 8 Read Fvalue Write Setvalue;
- end;
- TMetadataEntryClass = Class of TMetadataEntry;
-
- { --------------------------------------------------------------------
- TFetchThreatListUpdatesRequest
- --------------------------------------------------------------------}
-
- TFetchThreatListUpdatesRequest = Class(TGoogleBaseObject)
- Private
- Fclient : TClientInfo;
- FlistUpdateRequests : TFetchThreatListUpdatesRequestTypelistUpdateRequestsArray;
- Protected
- //Property setters
- Procedure Setclient(AIndex : Integer; const AValue : TClientInfo); virtual;
- Procedure SetlistUpdateRequests(AIndex : Integer; const AValue : TFetchThreatListUpdatesRequestTypelistUpdateRequestsArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property client : TClientInfo Index 0 Read Fclient Write Setclient;
- Property listUpdateRequests : TFetchThreatListUpdatesRequestTypelistUpdateRequestsArray Index 8 Read FlistUpdateRequests Write SetlistUpdateRequests;
- end;
- TFetchThreatListUpdatesRequestClass = Class of TFetchThreatListUpdatesRequest;
-
- { --------------------------------------------------------------------
- TListUpdateRequest
- --------------------------------------------------------------------}
-
- TListUpdateRequest = Class(TGoogleBaseObject)
- Private
- FthreatType : String;
- FplatformType : String;
- FthreatEntryType : String;
- Fstate : String;
- Fconstraints : TConstraints;
- Protected
- //Property setters
- Procedure SetthreatType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetplatformType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetthreatEntryType(AIndex : Integer; const AValue : String); virtual;
- Procedure Setstate(AIndex : Integer; const AValue : String); virtual;
- Procedure Setconstraints(AIndex : Integer; const AValue : TConstraints); virtual;
- Public
- Published
- Property threatType : String Index 0 Read FthreatType Write SetthreatType;
- Property platformType : String Index 8 Read FplatformType Write SetplatformType;
- Property threatEntryType : String Index 16 Read FthreatEntryType Write SetthreatEntryType;
- Property state : String Index 24 Read Fstate Write Setstate;
- Property constraints : TConstraints Index 32 Read Fconstraints Write Setconstraints;
- end;
- TListUpdateRequestClass = Class of TListUpdateRequest;
-
- { --------------------------------------------------------------------
- TConstraints
- --------------------------------------------------------------------}
-
- TConstraints = Class(TGoogleBaseObject)
- Private
- FmaxUpdateEntries : integer;
- FmaxDatabaseEntries : integer;
- Fregion : String;
- FsupportedCompressions : TStringArray;
- Protected
- //Property setters
- Procedure SetmaxUpdateEntries(AIndex : Integer; const AValue : integer); virtual;
- Procedure SetmaxDatabaseEntries(AIndex : Integer; const AValue : integer); virtual;
- Procedure Setregion(AIndex : Integer; const AValue : String); virtual;
- Procedure SetsupportedCompressions(AIndex : Integer; const AValue : TStringArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property maxUpdateEntries : integer Index 0 Read FmaxUpdateEntries Write SetmaxUpdateEntries;
- Property maxDatabaseEntries : integer Index 8 Read FmaxDatabaseEntries Write SetmaxDatabaseEntries;
- Property region : String Index 16 Read Fregion Write Setregion;
- Property supportedCompressions : TStringArray Index 24 Read FsupportedCompressions Write SetsupportedCompressions;
- end;
- TConstraintsClass = Class of TConstraints;
-
- { --------------------------------------------------------------------
- TFetchThreatListUpdatesResponse
- --------------------------------------------------------------------}
-
- TFetchThreatListUpdatesResponse = Class(TGoogleBaseObject)
- Private
- FlistUpdateResponses : TFetchThreatListUpdatesResponseTypelistUpdateResponsesArray;
- FminimumWaitDuration : String;
- Protected
- //Property setters
- Procedure SetlistUpdateResponses(AIndex : Integer; const AValue : TFetchThreatListUpdatesResponseTypelistUpdateResponsesArray); virtual;
- Procedure SetminimumWaitDuration(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 listUpdateResponses : TFetchThreatListUpdatesResponseTypelistUpdateResponsesArray Index 0 Read FlistUpdateResponses Write SetlistUpdateResponses;
- Property minimumWaitDuration : String Index 8 Read FminimumWaitDuration Write SetminimumWaitDuration;
- end;
- TFetchThreatListUpdatesResponseClass = Class of TFetchThreatListUpdatesResponse;
-
- { --------------------------------------------------------------------
- TListUpdateResponse
- --------------------------------------------------------------------}
-
- TListUpdateResponse = Class(TGoogleBaseObject)
- Private
- FthreatType : String;
- FthreatEntryType : String;
- FplatformType : String;
- FresponseType : String;
- Fadditions : TListUpdateResponseTypeadditionsArray;
- Fremovals : TListUpdateResponseTyperemovalsArray;
- FnewClientState : String;
- Fchecksum : TChecksum;
- Protected
- //Property setters
- Procedure SetthreatType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetthreatEntryType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetplatformType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetresponseType(AIndex : Integer; const AValue : String); virtual;
- Procedure Setadditions(AIndex : Integer; const AValue : TListUpdateResponseTypeadditionsArray); virtual;
- Procedure Setremovals(AIndex : Integer; const AValue : TListUpdateResponseTyperemovalsArray); virtual;
- Procedure SetnewClientState(AIndex : Integer; const AValue : String); virtual;
- Procedure Setchecksum(AIndex : Integer; const AValue : TChecksum); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property threatType : String Index 0 Read FthreatType Write SetthreatType;
- Property threatEntryType : String Index 8 Read FthreatEntryType Write SetthreatEntryType;
- Property platformType : String Index 16 Read FplatformType Write SetplatformType;
- Property responseType : String Index 24 Read FresponseType Write SetresponseType;
- Property additions : TListUpdateResponseTypeadditionsArray Index 32 Read Fadditions Write Setadditions;
- Property removals : TListUpdateResponseTyperemovalsArray Index 40 Read Fremovals Write Setremovals;
- Property newClientState : String Index 48 Read FnewClientState Write SetnewClientState;
- Property checksum : TChecksum Index 56 Read Fchecksum Write Setchecksum;
- end;
- TListUpdateResponseClass = Class of TListUpdateResponse;
-
- { --------------------------------------------------------------------
- TThreatEntrySet
- --------------------------------------------------------------------}
-
- TThreatEntrySet = Class(TGoogleBaseObject)
- Private
- FcompressionType : String;
- FrawHashes : TRawHashes;
- FrawIndices : TRawIndices;
- FriceHashes : TRiceDeltaEncoding;
- FriceIndices : TRiceDeltaEncoding;
- Protected
- //Property setters
- Procedure SetcompressionType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetrawHashes(AIndex : Integer; const AValue : TRawHashes); virtual;
- Procedure SetrawIndices(AIndex : Integer; const AValue : TRawIndices); virtual;
- Procedure SetriceHashes(AIndex : Integer; const AValue : TRiceDeltaEncoding); virtual;
- Procedure SetriceIndices(AIndex : Integer; const AValue : TRiceDeltaEncoding); virtual;
- Public
- Published
- Property compressionType : String Index 0 Read FcompressionType Write SetcompressionType;
- Property rawHashes : TRawHashes Index 8 Read FrawHashes Write SetrawHashes;
- Property rawIndices : TRawIndices Index 16 Read FrawIndices Write SetrawIndices;
- Property riceHashes : TRiceDeltaEncoding Index 24 Read FriceHashes Write SetriceHashes;
- Property riceIndices : TRiceDeltaEncoding Index 32 Read FriceIndices Write SetriceIndices;
- end;
- TThreatEntrySetClass = Class of TThreatEntrySet;
-
- { --------------------------------------------------------------------
- TRawHashes
- --------------------------------------------------------------------}
-
- TRawHashes = Class(TGoogleBaseObject)
- Private
- FprefixSize : integer;
- FrawHashes : String;
- Protected
- //Property setters
- Procedure SetprefixSize(AIndex : Integer; const AValue : integer); virtual;
- Procedure SetrawHashes(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property prefixSize : integer Index 0 Read FprefixSize Write SetprefixSize;
- Property rawHashes : String Index 8 Read FrawHashes Write SetrawHashes;
- end;
- TRawHashesClass = Class of TRawHashes;
-
- { --------------------------------------------------------------------
- TRawIndices
- --------------------------------------------------------------------}
-
- TRawIndices = Class(TGoogleBaseObject)
- Private
- Findices : TintegerArray;
- Protected
- //Property setters
- Procedure Setindices(AIndex : Integer; const AValue : TintegerArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property indices : TintegerArray Index 0 Read Findices Write Setindices;
- end;
- TRawIndicesClass = Class of TRawIndices;
-
- { --------------------------------------------------------------------
- TRiceDeltaEncoding
- --------------------------------------------------------------------}
-
- TRiceDeltaEncoding = Class(TGoogleBaseObject)
- Private
- FfirstValue : String;
- FriceParameter : integer;
- FnumEntries : integer;
- FencodedData : String;
- Protected
- //Property setters
- Procedure SetfirstValue(AIndex : Integer; const AValue : String); virtual;
- Procedure SetriceParameter(AIndex : Integer; const AValue : integer); virtual;
- Procedure SetnumEntries(AIndex : Integer; const AValue : integer); virtual;
- Procedure SetencodedData(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property firstValue : String Index 0 Read FfirstValue Write SetfirstValue;
- Property riceParameter : integer Index 8 Read FriceParameter Write SetriceParameter;
- Property numEntries : integer Index 16 Read FnumEntries Write SetnumEntries;
- Property encodedData : String Index 24 Read FencodedData Write SetencodedData;
- end;
- TRiceDeltaEncodingClass = Class of TRiceDeltaEncoding;
-
- { --------------------------------------------------------------------
- TChecksum
- --------------------------------------------------------------------}
-
- TChecksum = Class(TGoogleBaseObject)
- Private
- Fsha256 : String;
- Protected
- //Property setters
- Procedure Setsha256(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property sha256 : String Index 0 Read Fsha256 Write Setsha256;
- end;
- TChecksumClass = Class of TChecksum;
-
- { --------------------------------------------------------------------
- TFindFullHashesRequest
- --------------------------------------------------------------------}
-
- TFindFullHashesRequest = Class(TGoogleBaseObject)
- Private
- Fclient : TClientInfo;
- FclientStates : TStringArray;
- FthreatInfo : TThreatInfo;
- Protected
- //Property setters
- Procedure Setclient(AIndex : Integer; const AValue : TClientInfo); virtual;
- Procedure SetclientStates(AIndex : Integer; const AValue : TStringArray); virtual;
- Procedure SetthreatInfo(AIndex : Integer; const AValue : TThreatInfo); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property client : TClientInfo Index 0 Read Fclient Write Setclient;
- Property clientStates : TStringArray Index 8 Read FclientStates Write SetclientStates;
- Property threatInfo : TThreatInfo Index 16 Read FthreatInfo Write SetthreatInfo;
- end;
- TFindFullHashesRequestClass = Class of TFindFullHashesRequest;
-
- { --------------------------------------------------------------------
- TFindFullHashesResponse
- --------------------------------------------------------------------}
-
- TFindFullHashesResponse = Class(TGoogleBaseObject)
- Private
- Fmatches : TFindFullHashesResponseTypematchesArray;
- FminimumWaitDuration : String;
- FnegativeCacheDuration : String;
- Protected
- //Property setters
- Procedure Setmatches(AIndex : Integer; const AValue : TFindFullHashesResponseTypematchesArray); virtual;
- Procedure SetminimumWaitDuration(AIndex : Integer; const AValue : String); virtual;
- Procedure SetnegativeCacheDuration(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 matches : TFindFullHashesResponseTypematchesArray Index 0 Read Fmatches Write Setmatches;
- Property minimumWaitDuration : String Index 8 Read FminimumWaitDuration Write SetminimumWaitDuration;
- Property negativeCacheDuration : String Index 16 Read FnegativeCacheDuration Write SetnegativeCacheDuration;
- end;
- TFindFullHashesResponseClass = Class of TFindFullHashesResponse;
-
- { --------------------------------------------------------------------
- TListThreatListsResponse
- --------------------------------------------------------------------}
-
- TListThreatListsResponse = Class(TGoogleBaseObject)
- Private
- FthreatLists : TListThreatListsResponseTypethreatListsArray;
- Protected
- //Property setters
- Procedure SetthreatLists(AIndex : Integer; const AValue : TListThreatListsResponseTypethreatListsArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property threatLists : TListThreatListsResponseTypethreatListsArray Index 0 Read FthreatLists Write SetthreatLists;
- end;
- TListThreatListsResponseClass = Class of TListThreatListsResponse;
-
- { --------------------------------------------------------------------
- TThreatListDescriptor
- --------------------------------------------------------------------}
-
- TThreatListDescriptor = Class(TGoogleBaseObject)
- Private
- FthreatType : String;
- FplatformType : String;
- FthreatEntryType : String;
- Protected
- //Property setters
- Procedure SetthreatType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetplatformType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetthreatEntryType(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property threatType : String Index 0 Read FthreatType Write SetthreatType;
- Property platformType : String Index 8 Read FplatformType Write SetplatformType;
- Property threatEntryType : String Index 16 Read FthreatEntryType Write SetthreatEntryType;
- end;
- TThreatListDescriptorClass = Class of TThreatListDescriptor;
-
- { --------------------------------------------------------------------
- TThreatMatchesResource
- --------------------------------------------------------------------}
-
- TThreatMatchesResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function Find(aFindThreatMatchesRequest : TFindThreatMatchesRequest) : TFindThreatMatchesResponse;
- end;
-
-
- { --------------------------------------------------------------------
- TThreatListUpdatesResource
- --------------------------------------------------------------------}
-
- TThreatListUpdatesResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function Fetch(aFetchThreatListUpdatesRequest : TFetchThreatListUpdatesRequest) : TFetchThreatListUpdatesResponse;
- end;
-
-
- { --------------------------------------------------------------------
- TFullHashesResource
- --------------------------------------------------------------------}
-
- TFullHashesResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function Find(aFindFullHashesRequest : TFindFullHashesRequest) : TFindFullHashesResponse;
- end;
-
-
- { --------------------------------------------------------------------
- TThreatListsResource
- --------------------------------------------------------------------}
-
- TThreatListsResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function List : TListThreatListsResponse;
- end;
-
-
- { --------------------------------------------------------------------
- TSafebrowsingAPI
- --------------------------------------------------------------------}
-
- TSafebrowsingAPI = Class(TGoogleAPI)
- Private
- FThreatMatchesInstance : TThreatMatchesResource;
- FThreatListUpdatesInstance : TThreatListUpdatesResource;
- FFullHashesInstance : TFullHashesResource;
- FThreatListsInstance : TThreatListsResource;
- Function GetThreatMatchesInstance : TThreatMatchesResource;virtual;
- Function GetThreatListUpdatesInstance : TThreatListUpdatesResource;virtual;
- Function GetFullHashesInstance : TFullHashesResource;virtual;
- Function GetThreatListsInstance : TThreatListsResource;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 CreateThreatMatchesResource(AOwner : TComponent) : TThreatMatchesResource;virtual;overload;
- Function CreateThreatMatchesResource : TThreatMatchesResource;virtual;overload;
- Function CreateThreatListUpdatesResource(AOwner : TComponent) : TThreatListUpdatesResource;virtual;overload;
- Function CreateThreatListUpdatesResource : TThreatListUpdatesResource;virtual;overload;
- Function CreateFullHashesResource(AOwner : TComponent) : TFullHashesResource;virtual;overload;
- Function CreateFullHashesResource : TFullHashesResource;virtual;overload;
- Function CreateThreatListsResource(AOwner : TComponent) : TThreatListsResource;virtual;overload;
- Function CreateThreatListsResource : TThreatListsResource;virtual;overload;
- //Add default on-demand instances for resources
- Property ThreatMatchesResource : TThreatMatchesResource Read GetThreatMatchesInstance;
- Property ThreatListUpdatesResource : TThreatListUpdatesResource Read GetThreatListUpdatesInstance;
- Property FullHashesResource : TFullHashesResource Read GetFullHashesInstance;
- Property ThreatListsResource : TThreatListsResource Read GetThreatListsInstance;
- end;
- implementation
- { --------------------------------------------------------------------
- TFindThreatMatchesRequest
- --------------------------------------------------------------------}
- Procedure TFindThreatMatchesRequest.Setclient(AIndex : Integer; const AValue : TClientInfo);
- begin
- If (Fclient=AValue) then exit;
- Fclient:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TFindThreatMatchesRequest.SetthreatInfo(AIndex : Integer; const AValue : TThreatInfo);
- begin
- If (FthreatInfo=AValue) then exit;
- FthreatInfo:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TClientInfo
- --------------------------------------------------------------------}
- Procedure TClientInfo.SetclientId(AIndex : Integer; const AValue : String);
- begin
- If (FclientId=AValue) then exit;
- FclientId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TClientInfo.SetclientVersion(AIndex : Integer; const AValue : String);
- begin
- If (FclientVersion=AValue) then exit;
- FclientVersion:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TThreatInfo
- --------------------------------------------------------------------}
- Procedure TThreatInfo.SetthreatTypes(AIndex : Integer; const AValue : TStringArray);
- begin
- If (FthreatTypes=AValue) then exit;
- FthreatTypes:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatInfo.SetplatformTypes(AIndex : Integer; const AValue : TStringArray);
- begin
- If (FplatformTypes=AValue) then exit;
- FplatformTypes:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatInfo.SetthreatEntryTypes(AIndex : Integer; const AValue : TStringArray);
- begin
- If (FthreatEntryTypes=AValue) then exit;
- FthreatEntryTypes:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatInfo.SetthreatEntries(AIndex : Integer; const AValue : TThreatInfoTypethreatEntriesArray);
- begin
- If (FthreatEntries=AValue) then exit;
- FthreatEntries:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TThreatInfo.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'threattypes' : SetLength(FthreatTypes,ALength);
- 'platformtypes' : SetLength(FplatformTypes,ALength);
- 'threatentrytypes' : SetLength(FthreatEntryTypes,ALength);
- 'threatentries' : SetLength(FthreatEntries,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TThreatEntry
- --------------------------------------------------------------------}
- Procedure TThreatEntry.Sethash(AIndex : Integer; const AValue : String);
- begin
- If (Fhash=AValue) then exit;
- Fhash:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatEntry.Seturl(AIndex : Integer; const AValue : String);
- begin
- If (Furl=AValue) then exit;
- Furl:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatEntry.Setdigest(AIndex : Integer; const AValue : String);
- begin
- If (Fdigest=AValue) then exit;
- Fdigest:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TFindThreatMatchesResponse
- --------------------------------------------------------------------}
- Procedure TFindThreatMatchesResponse.Setmatches(AIndex : Integer; const AValue : TFindThreatMatchesResponseTypematchesArray);
- begin
- If (Fmatches=AValue) then exit;
- Fmatches:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TFindThreatMatchesResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'matches' : SetLength(Fmatches,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TThreatMatch
- --------------------------------------------------------------------}
- Procedure TThreatMatch.SetthreatType(AIndex : Integer; const AValue : String);
- begin
- If (FthreatType=AValue) then exit;
- FthreatType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatMatch.SetplatformType(AIndex : Integer; const AValue : String);
- begin
- If (FplatformType=AValue) then exit;
- FplatformType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatMatch.SetthreatEntryType(AIndex : Integer; const AValue : String);
- begin
- If (FthreatEntryType=AValue) then exit;
- FthreatEntryType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatMatch.Setthreat(AIndex : Integer; const AValue : TThreatEntry);
- begin
- If (Fthreat=AValue) then exit;
- Fthreat:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatMatch.SetthreatEntryMetadata(AIndex : Integer; const AValue : TThreatEntryMetadata);
- begin
- If (FthreatEntryMetadata=AValue) then exit;
- FthreatEntryMetadata:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatMatch.SetcacheDuration(AIndex : Integer; const AValue : String);
- begin
- If (FcacheDuration=AValue) then exit;
- FcacheDuration:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TThreatEntryMetadata
- --------------------------------------------------------------------}
- Procedure TThreatEntryMetadata.Setentries(AIndex : Integer; const AValue : TThreatEntryMetadataTypeentriesArray);
- begin
- If (Fentries=AValue) then exit;
- Fentries:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TThreatEntryMetadata.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'entries' : SetLength(Fentries,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TMetadataEntry
- --------------------------------------------------------------------}
- Procedure TMetadataEntry.Setkey(AIndex : Integer; const AValue : String);
- begin
- If (Fkey=AValue) then exit;
- Fkey:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TMetadataEntry.Setvalue(AIndex : Integer; const AValue : String);
- begin
- If (Fvalue=AValue) then exit;
- Fvalue:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TFetchThreatListUpdatesRequest
- --------------------------------------------------------------------}
- Procedure TFetchThreatListUpdatesRequest.Setclient(AIndex : Integer; const AValue : TClientInfo);
- begin
- If (Fclient=AValue) then exit;
- Fclient:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TFetchThreatListUpdatesRequest.SetlistUpdateRequests(AIndex : Integer; const AValue : TFetchThreatListUpdatesRequestTypelistUpdateRequestsArray);
- begin
- If (FlistUpdateRequests=AValue) then exit;
- FlistUpdateRequests:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TFetchThreatListUpdatesRequest.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'listupdaterequests' : SetLength(FlistUpdateRequests,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TListUpdateRequest
- --------------------------------------------------------------------}
- Procedure TListUpdateRequest.SetthreatType(AIndex : Integer; const AValue : String);
- begin
- If (FthreatType=AValue) then exit;
- FthreatType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListUpdateRequest.SetplatformType(AIndex : Integer; const AValue : String);
- begin
- If (FplatformType=AValue) then exit;
- FplatformType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListUpdateRequest.SetthreatEntryType(AIndex : Integer; const AValue : String);
- begin
- If (FthreatEntryType=AValue) then exit;
- FthreatEntryType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListUpdateRequest.Setstate(AIndex : Integer; const AValue : String);
- begin
- If (Fstate=AValue) then exit;
- Fstate:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListUpdateRequest.Setconstraints(AIndex : Integer; const AValue : TConstraints);
- begin
- If (Fconstraints=AValue) then exit;
- Fconstraints:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TConstraints
- --------------------------------------------------------------------}
- Procedure TConstraints.SetmaxUpdateEntries(AIndex : Integer; const AValue : integer);
- begin
- If (FmaxUpdateEntries=AValue) then exit;
- FmaxUpdateEntries:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConstraints.SetmaxDatabaseEntries(AIndex : Integer; const AValue : integer);
- begin
- If (FmaxDatabaseEntries=AValue) then exit;
- FmaxDatabaseEntries:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConstraints.Setregion(AIndex : Integer; const AValue : String);
- begin
- If (Fregion=AValue) then exit;
- Fregion:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TConstraints.SetsupportedCompressions(AIndex : Integer; const AValue : TStringArray);
- begin
- If (FsupportedCompressions=AValue) then exit;
- FsupportedCompressions:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TConstraints.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'supportedcompressions' : SetLength(FsupportedCompressions,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TFetchThreatListUpdatesResponse
- --------------------------------------------------------------------}
- Procedure TFetchThreatListUpdatesResponse.SetlistUpdateResponses(AIndex : Integer; const AValue : TFetchThreatListUpdatesResponseTypelistUpdateResponsesArray);
- begin
- If (FlistUpdateResponses=AValue) then exit;
- FlistUpdateResponses:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TFetchThreatListUpdatesResponse.SetminimumWaitDuration(AIndex : Integer; const AValue : String);
- begin
- If (FminimumWaitDuration=AValue) then exit;
- FminimumWaitDuration:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TFetchThreatListUpdatesResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'listupdateresponses' : SetLength(FlistUpdateResponses,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TListUpdateResponse
- --------------------------------------------------------------------}
- Procedure TListUpdateResponse.SetthreatType(AIndex : Integer; const AValue : String);
- begin
- If (FthreatType=AValue) then exit;
- FthreatType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListUpdateResponse.SetthreatEntryType(AIndex : Integer; const AValue : String);
- begin
- If (FthreatEntryType=AValue) then exit;
- FthreatEntryType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListUpdateResponse.SetplatformType(AIndex : Integer; const AValue : String);
- begin
- If (FplatformType=AValue) then exit;
- FplatformType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListUpdateResponse.SetresponseType(AIndex : Integer; const AValue : String);
- begin
- If (FresponseType=AValue) then exit;
- FresponseType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListUpdateResponse.Setadditions(AIndex : Integer; const AValue : TListUpdateResponseTypeadditionsArray);
- begin
- If (Fadditions=AValue) then exit;
- Fadditions:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListUpdateResponse.Setremovals(AIndex : Integer; const AValue : TListUpdateResponseTyperemovalsArray);
- begin
- If (Fremovals=AValue) then exit;
- Fremovals:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListUpdateResponse.SetnewClientState(AIndex : Integer; const AValue : String);
- begin
- If (FnewClientState=AValue) then exit;
- FnewClientState:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TListUpdateResponse.Setchecksum(AIndex : Integer; const AValue : TChecksum);
- begin
- If (Fchecksum=AValue) then exit;
- Fchecksum:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TListUpdateResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'additions' : SetLength(Fadditions,ALength);
- 'removals' : SetLength(Fremovals,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TThreatEntrySet
- --------------------------------------------------------------------}
- Procedure TThreatEntrySet.SetcompressionType(AIndex : Integer; const AValue : String);
- begin
- If (FcompressionType=AValue) then exit;
- FcompressionType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatEntrySet.SetrawHashes(AIndex : Integer; const AValue : TRawHashes);
- begin
- If (FrawHashes=AValue) then exit;
- FrawHashes:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatEntrySet.SetrawIndices(AIndex : Integer; const AValue : TRawIndices);
- begin
- If (FrawIndices=AValue) then exit;
- FrawIndices:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatEntrySet.SetriceHashes(AIndex : Integer; const AValue : TRiceDeltaEncoding);
- begin
- If (FriceHashes=AValue) then exit;
- FriceHashes:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatEntrySet.SetriceIndices(AIndex : Integer; const AValue : TRiceDeltaEncoding);
- begin
- If (FriceIndices=AValue) then exit;
- FriceIndices:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TRawHashes
- --------------------------------------------------------------------}
- Procedure TRawHashes.SetprefixSize(AIndex : Integer; const AValue : integer);
- begin
- If (FprefixSize=AValue) then exit;
- FprefixSize:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TRawHashes.SetrawHashes(AIndex : Integer; const AValue : String);
- begin
- If (FrawHashes=AValue) then exit;
- FrawHashes:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TRawIndices
- --------------------------------------------------------------------}
- Procedure TRawIndices.Setindices(AIndex : Integer; const AValue : TintegerArray);
- begin
- If (Findices=AValue) then exit;
- Findices:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TRawIndices.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'indices' : SetLength(Findices,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TRiceDeltaEncoding
- --------------------------------------------------------------------}
- Procedure TRiceDeltaEncoding.SetfirstValue(AIndex : Integer; const AValue : String);
- begin
- If (FfirstValue=AValue) then exit;
- FfirstValue:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TRiceDeltaEncoding.SetriceParameter(AIndex : Integer; const AValue : integer);
- begin
- If (FriceParameter=AValue) then exit;
- FriceParameter:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TRiceDeltaEncoding.SetnumEntries(AIndex : Integer; const AValue : integer);
- begin
- If (FnumEntries=AValue) then exit;
- FnumEntries:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TRiceDeltaEncoding.SetencodedData(AIndex : Integer; const AValue : String);
- begin
- If (FencodedData=AValue) then exit;
- FencodedData:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TChecksum
- --------------------------------------------------------------------}
- Procedure TChecksum.Setsha256(AIndex : Integer; const AValue : String);
- begin
- If (Fsha256=AValue) then exit;
- Fsha256:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TFindFullHashesRequest
- --------------------------------------------------------------------}
- Procedure TFindFullHashesRequest.Setclient(AIndex : Integer; const AValue : TClientInfo);
- begin
- If (Fclient=AValue) then exit;
- Fclient:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TFindFullHashesRequest.SetclientStates(AIndex : Integer; const AValue : TStringArray);
- begin
- If (FclientStates=AValue) then exit;
- FclientStates:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TFindFullHashesRequest.SetthreatInfo(AIndex : Integer; const AValue : TThreatInfo);
- begin
- If (FthreatInfo=AValue) then exit;
- FthreatInfo:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TFindFullHashesRequest.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'clientstates' : SetLength(FclientStates,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TFindFullHashesResponse
- --------------------------------------------------------------------}
- Procedure TFindFullHashesResponse.Setmatches(AIndex : Integer; const AValue : TFindFullHashesResponseTypematchesArray);
- begin
- If (Fmatches=AValue) then exit;
- Fmatches:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TFindFullHashesResponse.SetminimumWaitDuration(AIndex : Integer; const AValue : String);
- begin
- If (FminimumWaitDuration=AValue) then exit;
- FminimumWaitDuration:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TFindFullHashesResponse.SetnegativeCacheDuration(AIndex : Integer; const AValue : String);
- begin
- If (FnegativeCacheDuration=AValue) then exit;
- FnegativeCacheDuration:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TFindFullHashesResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'matches' : SetLength(Fmatches,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TListThreatListsResponse
- --------------------------------------------------------------------}
- Procedure TListThreatListsResponse.SetthreatLists(AIndex : Integer; const AValue : TListThreatListsResponseTypethreatListsArray);
- begin
- If (FthreatLists=AValue) then exit;
- FthreatLists:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TListThreatListsResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'threatlists' : SetLength(FthreatLists,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TThreatListDescriptor
- --------------------------------------------------------------------}
- Procedure TThreatListDescriptor.SetthreatType(AIndex : Integer; const AValue : String);
- begin
- If (FthreatType=AValue) then exit;
- FthreatType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatListDescriptor.SetplatformType(AIndex : Integer; const AValue : String);
- begin
- If (FplatformType=AValue) then exit;
- FplatformType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TThreatListDescriptor.SetthreatEntryType(AIndex : Integer; const AValue : String);
- begin
- If (FthreatEntryType=AValue) then exit;
- FthreatEntryType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TThreatMatchesResource
- --------------------------------------------------------------------}
- Class Function TThreatMatchesResource.ResourceName : String;
- begin
- Result:='threatMatches';
- end;
- Class Function TThreatMatchesResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TsafebrowsingAPI;
- end;
- Function TThreatMatchesResource.Find(aFindThreatMatchesRequest : TFindThreatMatchesRequest) : TFindThreatMatchesResponse;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v4/threatMatches:find';
- _Methodid = 'safebrowsing.threatMatches.find';
- begin
- Result:=ServiceCall(_HTTPMethod,_Path,'',aFindThreatMatchesRequest,TFindThreatMatchesResponse) as TFindThreatMatchesResponse;
- end;
- { --------------------------------------------------------------------
- TThreatListUpdatesResource
- --------------------------------------------------------------------}
- Class Function TThreatListUpdatesResource.ResourceName : String;
- begin
- Result:='threatListUpdates';
- end;
- Class Function TThreatListUpdatesResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TsafebrowsingAPI;
- end;
- Function TThreatListUpdatesResource.Fetch(aFetchThreatListUpdatesRequest : TFetchThreatListUpdatesRequest) : TFetchThreatListUpdatesResponse;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v4/threatListUpdates:fetch';
- _Methodid = 'safebrowsing.threatListUpdates.fetch';
- begin
- Result:=ServiceCall(_HTTPMethod,_Path,'',aFetchThreatListUpdatesRequest,TFetchThreatListUpdatesResponse) as TFetchThreatListUpdatesResponse;
- end;
- { --------------------------------------------------------------------
- TFullHashesResource
- --------------------------------------------------------------------}
- Class Function TFullHashesResource.ResourceName : String;
- begin
- Result:='fullHashes';
- end;
- Class Function TFullHashesResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TsafebrowsingAPI;
- end;
- Function TFullHashesResource.Find(aFindFullHashesRequest : TFindFullHashesRequest) : TFindFullHashesResponse;
- Const
- _HTTPMethod = 'POST';
- _Path = 'v4/fullHashes:find';
- _Methodid = 'safebrowsing.fullHashes.find';
- begin
- Result:=ServiceCall(_HTTPMethod,_Path,'',aFindFullHashesRequest,TFindFullHashesResponse) as TFindFullHashesResponse;
- end;
- { --------------------------------------------------------------------
- TThreatListsResource
- --------------------------------------------------------------------}
- Class Function TThreatListsResource.ResourceName : String;
- begin
- Result:='threatLists';
- end;
- Class Function TThreatListsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TsafebrowsingAPI;
- end;
- Function TThreatListsResource.List : TListThreatListsResponse;
- Const
- _HTTPMethod = 'GET';
- _Path = 'v4/threatLists';
- _Methodid = 'safebrowsing.threatLists.list';
- begin
- Result:=ServiceCall(_HTTPMethod,_Path,'',Nil,TListThreatListsResponse) as TListThreatListsResponse;
- end;
- { --------------------------------------------------------------------
- TSafebrowsingAPI
- --------------------------------------------------------------------}
- Class Function TSafebrowsingAPI.APIName : String;
- begin
- Result:='safebrowsing';
- end;
- Class Function TSafebrowsingAPI.APIVersion : String;
- begin
- Result:='v4';
- end;
- Class Function TSafebrowsingAPI.APIRevision : String;
- begin
- Result:='20160520';
- end;
- Class Function TSafebrowsingAPI.APIID : String;
- begin
- Result:='safebrowsing:v4';
- end;
- Class Function TSafebrowsingAPI.APITitle : String;
- begin
- Result:='Safe Browsing APIs';
- end;
- Class Function TSafebrowsingAPI.APIDescription : String;
- begin
- Result:='Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources.';
- end;
- Class Function TSafebrowsingAPI.APIOwnerDomain : String;
- begin
- Result:='google.com';
- end;
- Class Function TSafebrowsingAPI.APIOwnerName : String;
- begin
- Result:='Google';
- end;
- Class Function TSafebrowsingAPI.APIIcon16 : String;
- begin
- Result:='http://www.google.com/images/icons/product/search-16.gif';
- end;
- Class Function TSafebrowsingAPI.APIIcon32 : String;
- begin
- Result:='http://www.google.com/images/icons/product/search-32.gif';
- end;
- Class Function TSafebrowsingAPI.APIdocumentationLink : String;
- begin
- Result:='https://developers.google.com/safe-browsing/';
- end;
- Class Function TSafebrowsingAPI.APIrootUrl : string;
- begin
- Result:='https://safebrowsing.googleapis.com/';
- end;
- Class Function TSafebrowsingAPI.APIbasePath : string;
- begin
- Result:='';
- end;
- Class Function TSafebrowsingAPI.APIbaseURL : String;
- begin
- Result:='https://safebrowsing.googleapis.com/';
- end;
- Class Function TSafebrowsingAPI.APIProtocol : string;
- begin
- Result:='rest';
- end;
- Class Function TSafebrowsingAPI.APIservicePath : string;
- begin
- Result:='';
- end;
- Class Function TSafebrowsingAPI.APIbatchPath : String;
- begin
- Result:='batch';
- end;
- Class Function TSafebrowsingAPI.APIAuthScopes : TScopeInfoArray;
- begin
- SetLength(Result,0);
-
- end;
- Class Function TSafebrowsingAPI.APINeedsAuth : Boolean;
- begin
- Result:=False;
- end;
- Class Procedure TSafebrowsingAPI.RegisterAPIResources;
- begin
- TFindThreatMatchesRequest.RegisterObject;
- TClientInfo.RegisterObject;
- TThreatInfo.RegisterObject;
- TThreatEntry.RegisterObject;
- TFindThreatMatchesResponse.RegisterObject;
- TThreatMatch.RegisterObject;
- TThreatEntryMetadata.RegisterObject;
- TMetadataEntry.RegisterObject;
- TFetchThreatListUpdatesRequest.RegisterObject;
- TListUpdateRequest.RegisterObject;
- TConstraints.RegisterObject;
- TFetchThreatListUpdatesResponse.RegisterObject;
- TListUpdateResponse.RegisterObject;
- TThreatEntrySet.RegisterObject;
- TRawHashes.RegisterObject;
- TRawIndices.RegisterObject;
- TRiceDeltaEncoding.RegisterObject;
- TChecksum.RegisterObject;
- TFindFullHashesRequest.RegisterObject;
- TFindFullHashesResponse.RegisterObject;
- TListThreatListsResponse.RegisterObject;
- TThreatListDescriptor.RegisterObject;
- end;
- Function TSafebrowsingAPI.GetThreatMatchesInstance : TThreatMatchesResource;
- begin
- if (FThreatMatchesInstance=Nil) then
- FThreatMatchesInstance:=CreateThreatMatchesResource;
- Result:=FThreatMatchesInstance;
- end;
- Function TSafebrowsingAPI.CreateThreatMatchesResource : TThreatMatchesResource;
- begin
- Result:=CreateThreatMatchesResource(Self);
- end;
- Function TSafebrowsingAPI.CreateThreatMatchesResource(AOwner : TComponent) : TThreatMatchesResource;
- begin
- Result:=TThreatMatchesResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TSafebrowsingAPI.GetThreatListUpdatesInstance : TThreatListUpdatesResource;
- begin
- if (FThreatListUpdatesInstance=Nil) then
- FThreatListUpdatesInstance:=CreateThreatListUpdatesResource;
- Result:=FThreatListUpdatesInstance;
- end;
- Function TSafebrowsingAPI.CreateThreatListUpdatesResource : TThreatListUpdatesResource;
- begin
- Result:=CreateThreatListUpdatesResource(Self);
- end;
- Function TSafebrowsingAPI.CreateThreatListUpdatesResource(AOwner : TComponent) : TThreatListUpdatesResource;
- begin
- Result:=TThreatListUpdatesResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TSafebrowsingAPI.GetFullHashesInstance : TFullHashesResource;
- begin
- if (FFullHashesInstance=Nil) then
- FFullHashesInstance:=CreateFullHashesResource;
- Result:=FFullHashesInstance;
- end;
- Function TSafebrowsingAPI.CreateFullHashesResource : TFullHashesResource;
- begin
- Result:=CreateFullHashesResource(Self);
- end;
- Function TSafebrowsingAPI.CreateFullHashesResource(AOwner : TComponent) : TFullHashesResource;
- begin
- Result:=TFullHashesResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TSafebrowsingAPI.GetThreatListsInstance : TThreatListsResource;
- begin
- if (FThreatListsInstance=Nil) then
- FThreatListsInstance:=CreateThreatListsResource;
- Result:=FThreatListsInstance;
- end;
- Function TSafebrowsingAPI.CreateThreatListsResource : TThreatListsResource;
- begin
- Result:=CreateThreatListsResource(Self);
- end;
- Function TSafebrowsingAPI.CreateThreatListsResource(AOwner : TComponent) : TThreatListsResource;
- begin
- Result:=TThreatListsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- initialization
- TSafebrowsingAPI.RegisterAPI;
- end.
|