1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179 |
- unit googleprediction;
- {$MODE objfpc}
- {$H+}
- interface
- uses sysutils, classes, googleservice, restbase, googlebase;
- type
-
- //Top-level schema types
- TAnalyze = Class;
- TInput = Class;
- TInsert = Class;
- TInsert2 = Class;
- TList = Class;
- TOutput = Class;
- TUpdate = Class;
- TAnalyzeArray = Array of TAnalyze;
- TInputArray = Array of TInput;
- TInsertArray = Array of TInsert;
- TInsert2Array = Array of TInsert2;
- TListArray = Array of TList;
- TOutputArray = Array of TOutput;
- TUpdateArray = Array of TUpdate;
- //Anonymous types, using auto-generated names
- TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesItem = Class;
- TAnalyzeTypedataDescriptionTypefeaturesItemTypecategorical = Class;
- TAnalyzeTypedataDescriptionTypefeaturesItemTypenumeric = Class;
- TAnalyzeTypedataDescriptionTypefeaturesItemTypetext = Class;
- TAnalyzeTypedataDescriptionTypefeaturesItem = Class;
- TAnalyzeTypedataDescriptionTypeoutputFeatureTypenumeric = Class;
- TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextItem = Class;
- TAnalyzeTypedataDescriptionTypeoutputFeature = Class;
- TAnalyzeTypedataDescription = Class;
- TAnalyzeTypeerrorsItem = Class;
- TAnalyzeTypemodelDescriptionTypeconfusionMatrix = Class;
- TAnalyzeTypemodelDescriptionTypeconfusionMatrixRowTotals = Class;
- TAnalyzeTypemodelDescription = Class;
- TInputTypeinput = Class;
- TInsertTypetrainingInstancesItem = Class;
- TInsertTypeutilityItem = Class;
- TInsert2TypemodelInfo = Class;
- TOutputTypeoutputMultiItem = Class;
- TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesArray = Array of TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesItem;
- TAnalyzeTypedataDescriptionTypefeaturesArray = Array of TAnalyzeTypedataDescriptionTypefeaturesItem;
- TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextArray = Array of TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextItem;
- TAnalyzeTypeerrorsArray = Array of TAnalyzeTypeerrorsItem;
- TInsertTypetrainingInstancesArray = Array of TInsertTypetrainingInstancesItem;
- TInsertTypeutilityArray = Array of TInsertTypeutilityItem;
- TListTypeitemsArray = Array of TInsert2;
- TOutputTypeoutputMultiArray = Array of TOutputTypeoutputMultiItem;
-
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesItem
- --------------------------------------------------------------------}
-
- TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesItem = Class(TGoogleBaseObject)
- Private
- Fcount : String;
- Fvalue : String;
- Protected
- //Property setters
- Procedure Setcount(AIndex : Integer; const AValue : String); virtual;
- Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property count : String Index 0 Read Fcount Write Setcount;
- Property value : String Index 8 Read Fvalue Write Setvalue;
- end;
- TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesItemClass = Class of TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesItem;
-
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypefeaturesItemTypecategorical
- --------------------------------------------------------------------}
-
- TAnalyzeTypedataDescriptionTypefeaturesItemTypecategorical = Class(TGoogleBaseObject)
- Private
- Fcount : String;
- Fvalues : TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesArray;
- Protected
- //Property setters
- Procedure Setcount(AIndex : Integer; const AValue : String); virtual;
- Procedure Setvalues(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property count : String Index 0 Read Fcount Write Setcount;
- Property values : TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesArray Index 8 Read Fvalues Write Setvalues;
- end;
- TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalClass = Class of TAnalyzeTypedataDescriptionTypefeaturesItemTypecategorical;
-
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypefeaturesItemTypenumeric
- --------------------------------------------------------------------}
-
- TAnalyzeTypedataDescriptionTypefeaturesItemTypenumeric = Class(TGoogleBaseObject)
- Private
- Fcount : String;
- Fmean : String;
- Fvariance : String;
- Protected
- //Property setters
- Procedure Setcount(AIndex : Integer; const AValue : String); virtual;
- Procedure Setmean(AIndex : Integer; const AValue : String); virtual;
- Procedure Setvariance(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property count : String Index 0 Read Fcount Write Setcount;
- Property mean : String Index 8 Read Fmean Write Setmean;
- Property variance : String Index 16 Read Fvariance Write Setvariance;
- end;
- TAnalyzeTypedataDescriptionTypefeaturesItemTypenumericClass = Class of TAnalyzeTypedataDescriptionTypefeaturesItemTypenumeric;
-
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypefeaturesItemTypetext
- --------------------------------------------------------------------}
-
- TAnalyzeTypedataDescriptionTypefeaturesItemTypetext = Class(TGoogleBaseObject)
- Private
- Fcount : String;
- Protected
- //Property setters
- Procedure Setcount(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property count : String Index 0 Read Fcount Write Setcount;
- end;
- TAnalyzeTypedataDescriptionTypefeaturesItemTypetextClass = Class of TAnalyzeTypedataDescriptionTypefeaturesItemTypetext;
-
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypefeaturesItem
- --------------------------------------------------------------------}
-
- TAnalyzeTypedataDescriptionTypefeaturesItem = Class(TGoogleBaseObject)
- Private
- Fcategorical : TAnalyzeTypedataDescriptionTypefeaturesItemTypecategorical;
- Findex : String;
- Fnumeric : TAnalyzeTypedataDescriptionTypefeaturesItemTypenumeric;
- Ftext : TAnalyzeTypedataDescriptionTypefeaturesItemTypetext;
- Protected
- //Property setters
- Procedure Setcategorical(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypefeaturesItemTypecategorical); virtual;
- Procedure Setindex(AIndex : Integer; const AValue : String); virtual;
- Procedure Setnumeric(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypefeaturesItemTypenumeric); virtual;
- Procedure Settext(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypefeaturesItemTypetext); virtual;
- Public
- Published
- Property categorical : TAnalyzeTypedataDescriptionTypefeaturesItemTypecategorical Index 0 Read Fcategorical Write Setcategorical;
- Property index : String Index 8 Read Findex Write Setindex;
- Property numeric : TAnalyzeTypedataDescriptionTypefeaturesItemTypenumeric Index 16 Read Fnumeric Write Setnumeric;
- Property text : TAnalyzeTypedataDescriptionTypefeaturesItemTypetext Index 24 Read Ftext Write Settext;
- end;
- TAnalyzeTypedataDescriptionTypefeaturesItemClass = Class of TAnalyzeTypedataDescriptionTypefeaturesItem;
-
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypeoutputFeatureTypenumeric
- --------------------------------------------------------------------}
-
- TAnalyzeTypedataDescriptionTypeoutputFeatureTypenumeric = Class(TGoogleBaseObject)
- Private
- Fcount : String;
- Fmean : String;
- Fvariance : String;
- Protected
- //Property setters
- Procedure Setcount(AIndex : Integer; const AValue : String); virtual;
- Procedure Setmean(AIndex : Integer; const AValue : String); virtual;
- Procedure Setvariance(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property count : String Index 0 Read Fcount Write Setcount;
- Property mean : String Index 8 Read Fmean Write Setmean;
- Property variance : String Index 16 Read Fvariance Write Setvariance;
- end;
- TAnalyzeTypedataDescriptionTypeoutputFeatureTypenumericClass = Class of TAnalyzeTypedataDescriptionTypeoutputFeatureTypenumeric;
-
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextItem
- --------------------------------------------------------------------}
-
- TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextItem = Class(TGoogleBaseObject)
- Private
- Fcount : String;
- Fvalue : String;
- Protected
- //Property setters
- Procedure Setcount(AIndex : Integer; const AValue : String); virtual;
- Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property count : String Index 0 Read Fcount Write Setcount;
- Property value : String Index 8 Read Fvalue Write Setvalue;
- end;
- TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextItemClass = Class of TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextItem;
-
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypeoutputFeature
- --------------------------------------------------------------------}
-
- TAnalyzeTypedataDescriptionTypeoutputFeature = Class(TGoogleBaseObject)
- Private
- Fnumeric : TAnalyzeTypedataDescriptionTypeoutputFeatureTypenumeric;
- Ftext : TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextArray;
- Protected
- //Property setters
- Procedure Setnumeric(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypeoutputFeatureTypenumeric); virtual;
- Procedure Settext(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property numeric : TAnalyzeTypedataDescriptionTypeoutputFeatureTypenumeric Index 0 Read Fnumeric Write Setnumeric;
- Property text : TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextArray Index 8 Read Ftext Write Settext;
- end;
- TAnalyzeTypedataDescriptionTypeoutputFeatureClass = Class of TAnalyzeTypedataDescriptionTypeoutputFeature;
-
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescription
- --------------------------------------------------------------------}
-
- TAnalyzeTypedataDescription = Class(TGoogleBaseObject)
- Private
- Ffeatures : TAnalyzeTypedataDescriptionTypefeaturesArray;
- FoutputFeature : TAnalyzeTypedataDescriptionTypeoutputFeature;
- Protected
- //Property setters
- Procedure Setfeatures(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypefeaturesArray); virtual;
- Procedure SetoutputFeature(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypeoutputFeature); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property features : TAnalyzeTypedataDescriptionTypefeaturesArray Index 0 Read Ffeatures Write Setfeatures;
- Property outputFeature : TAnalyzeTypedataDescriptionTypeoutputFeature Index 8 Read FoutputFeature Write SetoutputFeature;
- end;
- TAnalyzeTypedataDescriptionClass = Class of TAnalyzeTypedataDescription;
-
- { --------------------------------------------------------------------
- TAnalyzeTypeerrorsItem
- --------------------------------------------------------------------}
-
- TAnalyzeTypeerrorsItem = Class(TGoogleBaseObject)
- Private
- Protected
- //Property setters
- Public
- Class Function AllowAdditionalProperties : Boolean; override;
- Published
- end;
- TAnalyzeTypeerrorsItemClass = Class of TAnalyzeTypeerrorsItem;
-
- { --------------------------------------------------------------------
- TAnalyzeTypemodelDescriptionTypeconfusionMatrix
- --------------------------------------------------------------------}
-
- TAnalyzeTypemodelDescriptionTypeconfusionMatrix = Class(TGoogleBaseObject)
- Private
- Protected
- //Property setters
- Public
- Class Function AllowAdditionalProperties : Boolean; override;
- Published
- end;
- TAnalyzeTypemodelDescriptionTypeconfusionMatrixClass = Class of TAnalyzeTypemodelDescriptionTypeconfusionMatrix;
-
- { --------------------------------------------------------------------
- TAnalyzeTypemodelDescriptionTypeconfusionMatrixRowTotals
- --------------------------------------------------------------------}
-
- TAnalyzeTypemodelDescriptionTypeconfusionMatrixRowTotals = Class(TGoogleBaseObject)
- Private
- Protected
- //Property setters
- Public
- Class Function AllowAdditionalProperties : Boolean; override;
- Published
- end;
- TAnalyzeTypemodelDescriptionTypeconfusionMatrixRowTotalsClass = Class of TAnalyzeTypemodelDescriptionTypeconfusionMatrixRowTotals;
-
- { --------------------------------------------------------------------
- TAnalyzeTypemodelDescription
- --------------------------------------------------------------------}
-
- TAnalyzeTypemodelDescription = Class(TGoogleBaseObject)
- Private
- FconfusionMatrix : TAnalyzeTypemodelDescriptionTypeconfusionMatrix;
- FconfusionMatrixRowTotals : TAnalyzeTypemodelDescriptionTypeconfusionMatrixRowTotals;
- Fmodelinfo : TInsert2;
- Protected
- //Property setters
- Procedure SetconfusionMatrix(AIndex : Integer; const AValue : TAnalyzeTypemodelDescriptionTypeconfusionMatrix); virtual;
- Procedure SetconfusionMatrixRowTotals(AIndex : Integer; const AValue : TAnalyzeTypemodelDescriptionTypeconfusionMatrixRowTotals); virtual;
- Procedure Setmodelinfo(AIndex : Integer; const AValue : TInsert2); virtual;
- Public
- Published
- Property confusionMatrix : TAnalyzeTypemodelDescriptionTypeconfusionMatrix Index 0 Read FconfusionMatrix Write SetconfusionMatrix;
- Property confusionMatrixRowTotals : TAnalyzeTypemodelDescriptionTypeconfusionMatrixRowTotals Index 8 Read FconfusionMatrixRowTotals Write SetconfusionMatrixRowTotals;
- Property modelinfo : TInsert2 Index 16 Read Fmodelinfo Write Setmodelinfo;
- end;
- TAnalyzeTypemodelDescriptionClass = Class of TAnalyzeTypemodelDescription;
-
- { --------------------------------------------------------------------
- TAnalyze
- --------------------------------------------------------------------}
-
- TAnalyze = Class(TGoogleBaseObject)
- Private
- FdataDescription : TAnalyzeTypedataDescription;
- Ferrors : TAnalyzeTypeerrorsArray;
- Fid : String;
- Fkind : String;
- FmodelDescription : TAnalyzeTypemodelDescription;
- FselfLink : String;
- Protected
- //Property setters
- Procedure SetdataDescription(AIndex : Integer; const AValue : TAnalyzeTypedataDescription); virtual;
- Procedure Seterrors(AIndex : Integer; const AValue : TAnalyzeTypeerrorsArray); virtual;
- Procedure Setid(AIndex : Integer; const AValue : String); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure SetmodelDescription(AIndex : Integer; const AValue : TAnalyzeTypemodelDescription); virtual;
- Procedure SetselfLink(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 dataDescription : TAnalyzeTypedataDescription Index 0 Read FdataDescription Write SetdataDescription;
- Property errors : TAnalyzeTypeerrorsArray Index 8 Read Ferrors Write Seterrors;
- Property id : String Index 16 Read Fid Write Setid;
- Property kind : String Index 24 Read Fkind Write Setkind;
- Property modelDescription : TAnalyzeTypemodelDescription Index 32 Read FmodelDescription Write SetmodelDescription;
- Property selfLink : String Index 40 Read FselfLink Write SetselfLink;
- end;
- TAnalyzeClass = Class of TAnalyze;
-
- { --------------------------------------------------------------------
- TInputTypeinput
- --------------------------------------------------------------------}
-
- TInputTypeinput = Class(TGoogleBaseObject)
- Private
- FcsvInstance : TTJSONSchemaArray;
- Protected
- //Property setters
- Procedure SetcsvInstance(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 csvInstance : TTJSONSchemaArray Index 0 Read FcsvInstance Write SetcsvInstance;
- end;
- TInputTypeinputClass = Class of TInputTypeinput;
-
- { --------------------------------------------------------------------
- TInput
- --------------------------------------------------------------------}
-
- TInput = Class(TGoogleBaseObject)
- Private
- Finput : TInputTypeinput;
- Protected
- //Property setters
- Procedure Setinput(AIndex : Integer; const AValue : TInputTypeinput); virtual;
- Public
- Published
- Property input : TInputTypeinput Index 0 Read Finput Write Setinput;
- end;
- TInputClass = Class of TInput;
-
- { --------------------------------------------------------------------
- TInsertTypetrainingInstancesItem
- --------------------------------------------------------------------}
-
- TInsertTypetrainingInstancesItem = Class(TGoogleBaseObject)
- Private
- FcsvInstance : TTJSONSchemaArray;
- Foutput : String;
- Protected
- //Property setters
- Procedure SetcsvInstance(AIndex : Integer; const AValue : TTJSONSchemaArray); virtual;
- Procedure Setoutput(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 csvInstance : TTJSONSchemaArray Index 0 Read FcsvInstance Write SetcsvInstance;
- Property output : String Index 8 Read Foutput Write Setoutput;
- end;
- TInsertTypetrainingInstancesItemClass = Class of TInsertTypetrainingInstancesItem;
-
- { --------------------------------------------------------------------
- TInsertTypeutilityItem
- --------------------------------------------------------------------}
-
- TInsertTypeutilityItem = Class(TGoogleBaseObject)
- Private
- Protected
- //Property setters
- Public
- Class Function AllowAdditionalProperties : Boolean; override;
- Published
- end;
- TInsertTypeutilityItemClass = Class of TInsertTypeutilityItem;
-
- { --------------------------------------------------------------------
- TInsert
- --------------------------------------------------------------------}
-
- TInsert = Class(TGoogleBaseObject)
- Private
- Fid : String;
- FmodelType : String;
- FsourceModel : String;
- FstorageDataLocation : String;
- FstoragePMMLLocation : String;
- FstoragePMMLModelLocation : String;
- FtrainingInstances : TInsertTypetrainingInstancesArray;
- Futility : TInsertTypeutilityArray;
- Protected
- //Property setters
- Procedure Setid(AIndex : Integer; const AValue : String); virtual;
- Procedure SetmodelType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetsourceModel(AIndex : Integer; const AValue : String); virtual;
- Procedure SetstorageDataLocation(AIndex : Integer; const AValue : String); virtual;
- Procedure SetstoragePMMLLocation(AIndex : Integer; const AValue : String); virtual;
- Procedure SetstoragePMMLModelLocation(AIndex : Integer; const AValue : String); virtual;
- Procedure SettrainingInstances(AIndex : Integer; const AValue : TInsertTypetrainingInstancesArray); virtual;
- Procedure Setutility(AIndex : Integer; const AValue : TInsertTypeutilityArray); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property id : String Index 0 Read Fid Write Setid;
- Property modelType : String Index 8 Read FmodelType Write SetmodelType;
- Property sourceModel : String Index 16 Read FsourceModel Write SetsourceModel;
- Property storageDataLocation : String Index 24 Read FstorageDataLocation Write SetstorageDataLocation;
- Property storagePMMLLocation : String Index 32 Read FstoragePMMLLocation Write SetstoragePMMLLocation;
- Property storagePMMLModelLocation : String Index 40 Read FstoragePMMLModelLocation Write SetstoragePMMLModelLocation;
- Property trainingInstances : TInsertTypetrainingInstancesArray Index 48 Read FtrainingInstances Write SettrainingInstances;
- Property utility : TInsertTypeutilityArray Index 56 Read Futility Write Setutility;
- end;
- TInsertClass = Class of TInsert;
-
- { --------------------------------------------------------------------
- TInsert2TypemodelInfo
- --------------------------------------------------------------------}
-
- TInsert2TypemodelInfo = Class(TGoogleBaseObject)
- Private
- FclassWeightedAccuracy : String;
- FclassificationAccuracy : String;
- FmeanSquaredError : String;
- FmodelType : String;
- FnumberInstances : String;
- FnumberLabels : String;
- Protected
- //Property setters
- Procedure SetclassWeightedAccuracy(AIndex : Integer; const AValue : String); virtual;
- Procedure SetclassificationAccuracy(AIndex : Integer; const AValue : String); virtual;
- Procedure SetmeanSquaredError(AIndex : Integer; const AValue : String); virtual;
- Procedure SetmodelType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetnumberInstances(AIndex : Integer; const AValue : String); virtual;
- Procedure SetnumberLabels(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property classWeightedAccuracy : String Index 0 Read FclassWeightedAccuracy Write SetclassWeightedAccuracy;
- Property classificationAccuracy : String Index 8 Read FclassificationAccuracy Write SetclassificationAccuracy;
- Property meanSquaredError : String Index 16 Read FmeanSquaredError Write SetmeanSquaredError;
- Property modelType : String Index 24 Read FmodelType Write SetmodelType;
- Property numberInstances : String Index 32 Read FnumberInstances Write SetnumberInstances;
- Property numberLabels : String Index 40 Read FnumberLabels Write SetnumberLabels;
- end;
- TInsert2TypemodelInfoClass = Class of TInsert2TypemodelInfo;
-
- { --------------------------------------------------------------------
- TInsert2
- --------------------------------------------------------------------}
-
- TInsert2 = Class(TGoogleBaseObject)
- Private
- Fcreated : TDatetime;
- Fid : String;
- Fkind : String;
- FmodelInfo : TInsert2TypemodelInfo;
- FmodelType : String;
- FselfLink : String;
- FstorageDataLocation : String;
- FstoragePMMLLocation : String;
- FstoragePMMLModelLocation : String;
- FtrainingComplete : TDatetime;
- FtrainingStatus : String;
- Protected
- //Property setters
- Procedure Setcreated(AIndex : Integer; const AValue : TDatetime); virtual;
- Procedure Setid(AIndex : Integer; const AValue : String); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure SetmodelInfo(AIndex : Integer; const AValue : TInsert2TypemodelInfo); virtual;
- Procedure SetmodelType(AIndex : Integer; const AValue : String); virtual;
- Procedure SetselfLink(AIndex : Integer; const AValue : String); virtual;
- Procedure SetstorageDataLocation(AIndex : Integer; const AValue : String); virtual;
- Procedure SetstoragePMMLLocation(AIndex : Integer; const AValue : String); virtual;
- Procedure SetstoragePMMLModelLocation(AIndex : Integer; const AValue : String); virtual;
- Procedure SettrainingComplete(AIndex : Integer; const AValue : TDatetime); virtual;
- Procedure SettrainingStatus(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property created : TDatetime Index 0 Read Fcreated Write Setcreated;
- Property id : String Index 8 Read Fid Write Setid;
- Property kind : String Index 16 Read Fkind Write Setkind;
- Property modelInfo : TInsert2TypemodelInfo Index 24 Read FmodelInfo Write SetmodelInfo;
- Property modelType : String Index 32 Read FmodelType Write SetmodelType;
- Property selfLink : String Index 40 Read FselfLink Write SetselfLink;
- Property storageDataLocation : String Index 48 Read FstorageDataLocation Write SetstorageDataLocation;
- Property storagePMMLLocation : String Index 56 Read FstoragePMMLLocation Write SetstoragePMMLLocation;
- Property storagePMMLModelLocation : String Index 64 Read FstoragePMMLModelLocation Write SetstoragePMMLModelLocation;
- Property trainingComplete : TDatetime Index 72 Read FtrainingComplete Write SettrainingComplete;
- Property trainingStatus : String Index 80 Read FtrainingStatus Write SettrainingStatus;
- end;
- TInsert2Class = Class of TInsert2;
-
- { --------------------------------------------------------------------
- TList
- --------------------------------------------------------------------}
-
- TList = Class(TGoogleBaseObject)
- Private
- Fitems : TListTypeitemsArray;
- Fkind : String;
- FnextPageToken : String;
- FselfLink : String;
- Protected
- //Property setters
- Procedure Setitems(AIndex : Integer; const AValue : TListTypeitemsArray); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
- Procedure SetselfLink(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 : TListTypeitemsArray Index 0 Read Fitems Write Setitems;
- Property kind : String Index 8 Read Fkind Write Setkind;
- Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
- Property selfLink : String Index 24 Read FselfLink Write SetselfLink;
- end;
- TListClass = Class of TList;
-
- { --------------------------------------------------------------------
- TOutputTypeoutputMultiItem
- --------------------------------------------------------------------}
-
- TOutputTypeoutputMultiItem = Class(TGoogleBaseObject)
- Private
- F_label : String;
- Fscore : String;
- Protected
- Class Function ExportPropertyName(Const AName : String) : string; override;
- //Property setters
- Procedure Set_label(AIndex : Integer; const AValue : String); virtual;
- Procedure Setscore(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property _label : String Index 0 Read F_label Write Set_label;
- Property score : String Index 8 Read Fscore Write Setscore;
- end;
- TOutputTypeoutputMultiItemClass = Class of TOutputTypeoutputMultiItem;
-
- { --------------------------------------------------------------------
- TOutput
- --------------------------------------------------------------------}
-
- TOutput = Class(TGoogleBaseObject)
- Private
- Fid : String;
- Fkind : String;
- FoutputLabel : String;
- FoutputMulti : TOutputTypeoutputMultiArray;
- FoutputValue : String;
- FselfLink : String;
- Protected
- //Property setters
- Procedure Setid(AIndex : Integer; const AValue : String); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure SetoutputLabel(AIndex : Integer; const AValue : String); virtual;
- Procedure SetoutputMulti(AIndex : Integer; const AValue : TOutputTypeoutputMultiArray); virtual;
- Procedure SetoutputValue(AIndex : Integer; const AValue : String); virtual;
- Procedure SetselfLink(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 id : String Index 0 Read Fid Write Setid;
- Property kind : String Index 8 Read Fkind Write Setkind;
- Property outputLabel : String Index 16 Read FoutputLabel Write SetoutputLabel;
- Property outputMulti : TOutputTypeoutputMultiArray Index 24 Read FoutputMulti Write SetoutputMulti;
- Property outputValue : String Index 32 Read FoutputValue Write SetoutputValue;
- Property selfLink : String Index 40 Read FselfLink Write SetselfLink;
- end;
- TOutputClass = Class of TOutput;
-
- { --------------------------------------------------------------------
- TUpdate
- --------------------------------------------------------------------}
-
- TUpdate = Class(TGoogleBaseObject)
- Private
- FcsvInstance : TTJSONSchemaArray;
- Foutput : String;
- Protected
- //Property setters
- Procedure SetcsvInstance(AIndex : Integer; const AValue : TTJSONSchemaArray); virtual;
- Procedure Setoutput(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 csvInstance : TTJSONSchemaArray Index 0 Read FcsvInstance Write SetcsvInstance;
- Property output : String Index 8 Read Foutput Write Setoutput;
- end;
- TUpdateClass = Class of TUpdate;
-
- { --------------------------------------------------------------------
- THostedmodelsResource
- --------------------------------------------------------------------}
-
- THostedmodelsResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function Predict(hostedModelName: string; project: string; aInput : TInput) : TOutput;
- end;
-
-
- { --------------------------------------------------------------------
- TTrainedmodelsResource
- --------------------------------------------------------------------}
-
-
- //Optional query Options for TTrainedmodelsResource, method List
-
- TTrainedmodelsListOptions = Record
- maxResults : integer;
- pageToken : String;
- end;
-
- TTrainedmodelsResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function Analyze(id: string; project: string) : TAnalyze;
- Procedure Delete(id: string; project: string);
- Function Get(id: string; project: string) : TInsert2;
- Function Insert(project: string; aInsert : TInsert) : TInsert2;
- Function List(project: string; AQuery : string = '') : TList;
- Function List(project: string; AQuery : TTrainedmodelslistOptions) : TList;
- Function Predict(id: string; project: string; aInput : TInput) : TOutput;
- Function Update(id: string; project: string; aUpdate : TUpdate) : TInsert2;
- end;
-
-
- { --------------------------------------------------------------------
- TPredictionAPI
- --------------------------------------------------------------------}
-
- TPredictionAPI = Class(TGoogleAPI)
- Private
- FHostedmodelsInstance : THostedmodelsResource;
- FTrainedmodelsInstance : TTrainedmodelsResource;
- Function GetHostedmodelsInstance : THostedmodelsResource;virtual;
- Function GetTrainedmodelsInstance : TTrainedmodelsResource;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 CreateHostedmodelsResource(AOwner : TComponent) : THostedmodelsResource;virtual;overload;
- Function CreateHostedmodelsResource : THostedmodelsResource;virtual;overload;
- Function CreateTrainedmodelsResource(AOwner : TComponent) : TTrainedmodelsResource;virtual;overload;
- Function CreateTrainedmodelsResource : TTrainedmodelsResource;virtual;overload;
- //Add default on-demand instances for resources
- Property HostedmodelsResource : THostedmodelsResource Read GetHostedmodelsInstance;
- Property TrainedmodelsResource : TTrainedmodelsResource Read GetTrainedmodelsInstance;
- end;
- implementation
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesItem
- --------------------------------------------------------------------}
- Procedure TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesItem.Setcount(AIndex : Integer; const AValue : String);
- begin
- If (Fcount=AValue) then exit;
- Fcount:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesItem.Setvalue(AIndex : Integer; const AValue : String);
- begin
- If (Fvalue=AValue) then exit;
- Fvalue:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypefeaturesItemTypecategorical
- --------------------------------------------------------------------}
- Procedure TAnalyzeTypedataDescriptionTypefeaturesItemTypecategorical.Setcount(AIndex : Integer; const AValue : String);
- begin
- If (Fcount=AValue) then exit;
- Fcount:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyzeTypedataDescriptionTypefeaturesItemTypecategorical.Setvalues(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesArray);
- begin
- If (Fvalues=AValue) then exit;
- Fvalues:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TAnalyzeTypedataDescriptionTypefeaturesItemTypecategorical.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'values' : SetLength(Fvalues,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypefeaturesItemTypenumeric
- --------------------------------------------------------------------}
- Procedure TAnalyzeTypedataDescriptionTypefeaturesItemTypenumeric.Setcount(AIndex : Integer; const AValue : String);
- begin
- If (Fcount=AValue) then exit;
- Fcount:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyzeTypedataDescriptionTypefeaturesItemTypenumeric.Setmean(AIndex : Integer; const AValue : String);
- begin
- If (Fmean=AValue) then exit;
- Fmean:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyzeTypedataDescriptionTypefeaturesItemTypenumeric.Setvariance(AIndex : Integer; const AValue : String);
- begin
- If (Fvariance=AValue) then exit;
- Fvariance:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypefeaturesItemTypetext
- --------------------------------------------------------------------}
- Procedure TAnalyzeTypedataDescriptionTypefeaturesItemTypetext.Setcount(AIndex : Integer; const AValue : String);
- begin
- If (Fcount=AValue) then exit;
- Fcount:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypefeaturesItem
- --------------------------------------------------------------------}
- Procedure TAnalyzeTypedataDescriptionTypefeaturesItem.Setcategorical(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypefeaturesItemTypecategorical);
- begin
- If (Fcategorical=AValue) then exit;
- Fcategorical:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyzeTypedataDescriptionTypefeaturesItem.Setindex(AIndex : Integer; const AValue : String);
- begin
- If (Findex=AValue) then exit;
- Findex:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyzeTypedataDescriptionTypefeaturesItem.Setnumeric(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypefeaturesItemTypenumeric);
- begin
- If (Fnumeric=AValue) then exit;
- Fnumeric:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyzeTypedataDescriptionTypefeaturesItem.Settext(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypefeaturesItemTypetext);
- begin
- If (Ftext=AValue) then exit;
- Ftext:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypeoutputFeatureTypenumeric
- --------------------------------------------------------------------}
- Procedure TAnalyzeTypedataDescriptionTypeoutputFeatureTypenumeric.Setcount(AIndex : Integer; const AValue : String);
- begin
- If (Fcount=AValue) then exit;
- Fcount:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyzeTypedataDescriptionTypeoutputFeatureTypenumeric.Setmean(AIndex : Integer; const AValue : String);
- begin
- If (Fmean=AValue) then exit;
- Fmean:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyzeTypedataDescriptionTypeoutputFeatureTypenumeric.Setvariance(AIndex : Integer; const AValue : String);
- begin
- If (Fvariance=AValue) then exit;
- Fvariance:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextItem
- --------------------------------------------------------------------}
- Procedure TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextItem.Setcount(AIndex : Integer; const AValue : String);
- begin
- If (Fcount=AValue) then exit;
- Fcount:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextItem.Setvalue(AIndex : Integer; const AValue : String);
- begin
- If (Fvalue=AValue) then exit;
- Fvalue:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescriptionTypeoutputFeature
- --------------------------------------------------------------------}
- Procedure TAnalyzeTypedataDescriptionTypeoutputFeature.Setnumeric(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypeoutputFeatureTypenumeric);
- begin
- If (Fnumeric=AValue) then exit;
- Fnumeric:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyzeTypedataDescriptionTypeoutputFeature.Settext(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextArray);
- begin
- If (Ftext=AValue) then exit;
- Ftext:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TAnalyzeTypedataDescriptionTypeoutputFeature.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'text' : SetLength(Ftext,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TAnalyzeTypedataDescription
- --------------------------------------------------------------------}
- Procedure TAnalyzeTypedataDescription.Setfeatures(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypefeaturesArray);
- begin
- If (Ffeatures=AValue) then exit;
- Ffeatures:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyzeTypedataDescription.SetoutputFeature(AIndex : Integer; const AValue : TAnalyzeTypedataDescriptionTypeoutputFeature);
- begin
- If (FoutputFeature=AValue) then exit;
- FoutputFeature:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TAnalyzeTypedataDescription.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'features' : SetLength(Ffeatures,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TAnalyzeTypeerrorsItem
- --------------------------------------------------------------------}
- Class Function TAnalyzeTypeerrorsItem.AllowAdditionalProperties : Boolean;
- begin
- Result:=True;
- end;
- { --------------------------------------------------------------------
- TAnalyzeTypemodelDescriptionTypeconfusionMatrix
- --------------------------------------------------------------------}
- Class Function TAnalyzeTypemodelDescriptionTypeconfusionMatrix.AllowAdditionalProperties : Boolean;
- begin
- Result:=True;
- end;
- { --------------------------------------------------------------------
- TAnalyzeTypemodelDescriptionTypeconfusionMatrixRowTotals
- --------------------------------------------------------------------}
- Class Function TAnalyzeTypemodelDescriptionTypeconfusionMatrixRowTotals.AllowAdditionalProperties : Boolean;
- begin
- Result:=True;
- end;
- { --------------------------------------------------------------------
- TAnalyzeTypemodelDescription
- --------------------------------------------------------------------}
- Procedure TAnalyzeTypemodelDescription.SetconfusionMatrix(AIndex : Integer; const AValue : TAnalyzeTypemodelDescriptionTypeconfusionMatrix);
- begin
- If (FconfusionMatrix=AValue) then exit;
- FconfusionMatrix:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyzeTypemodelDescription.SetconfusionMatrixRowTotals(AIndex : Integer; const AValue : TAnalyzeTypemodelDescriptionTypeconfusionMatrixRowTotals);
- begin
- If (FconfusionMatrixRowTotals=AValue) then exit;
- FconfusionMatrixRowTotals:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyzeTypemodelDescription.Setmodelinfo(AIndex : Integer; const AValue : TInsert2);
- begin
- If (Fmodelinfo=AValue) then exit;
- Fmodelinfo:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TAnalyze
- --------------------------------------------------------------------}
- Procedure TAnalyze.SetdataDescription(AIndex : Integer; const AValue : TAnalyzeTypedataDescription);
- begin
- If (FdataDescription=AValue) then exit;
- FdataDescription:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyze.Seterrors(AIndex : Integer; const AValue : TAnalyzeTypeerrorsArray);
- begin
- If (Ferrors=AValue) then exit;
- Ferrors:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyze.Setid(AIndex : Integer; const AValue : String);
- begin
- If (Fid=AValue) then exit;
- Fid:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyze.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyze.SetmodelDescription(AIndex : Integer; const AValue : TAnalyzeTypemodelDescription);
- begin
- If (FmodelDescription=AValue) then exit;
- FmodelDescription:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TAnalyze.SetselfLink(AIndex : Integer; const AValue : String);
- begin
- If (FselfLink=AValue) then exit;
- FselfLink:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TAnalyze.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'errors' : SetLength(Ferrors,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TInputTypeinput
- --------------------------------------------------------------------}
- Procedure TInputTypeinput.SetcsvInstance(AIndex : Integer; const AValue : TTJSONSchemaArray);
- begin
- If (FcsvInstance=AValue) then exit;
- FcsvInstance:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TInputTypeinput.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'csvinstance' : SetLength(FcsvInstance,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TInput
- --------------------------------------------------------------------}
- Procedure TInput.Setinput(AIndex : Integer; const AValue : TInputTypeinput);
- begin
- If (Finput=AValue) then exit;
- Finput:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TInsertTypetrainingInstancesItem
- --------------------------------------------------------------------}
- Procedure TInsertTypetrainingInstancesItem.SetcsvInstance(AIndex : Integer; const AValue : TTJSONSchemaArray);
- begin
- If (FcsvInstance=AValue) then exit;
- FcsvInstance:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsertTypetrainingInstancesItem.Setoutput(AIndex : Integer; const AValue : String);
- begin
- If (Foutput=AValue) then exit;
- Foutput:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TInsertTypetrainingInstancesItem.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'csvinstance' : SetLength(FcsvInstance,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TInsertTypeutilityItem
- --------------------------------------------------------------------}
- Class Function TInsertTypeutilityItem.AllowAdditionalProperties : Boolean;
- begin
- Result:=True;
- end;
- { --------------------------------------------------------------------
- TInsert
- --------------------------------------------------------------------}
- Procedure TInsert.Setid(AIndex : Integer; const AValue : String);
- begin
- If (Fid=AValue) then exit;
- Fid:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert.SetmodelType(AIndex : Integer; const AValue : String);
- begin
- If (FmodelType=AValue) then exit;
- FmodelType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert.SetsourceModel(AIndex : Integer; const AValue : String);
- begin
- If (FsourceModel=AValue) then exit;
- FsourceModel:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert.SetstorageDataLocation(AIndex : Integer; const AValue : String);
- begin
- If (FstorageDataLocation=AValue) then exit;
- FstorageDataLocation:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert.SetstoragePMMLLocation(AIndex : Integer; const AValue : String);
- begin
- If (FstoragePMMLLocation=AValue) then exit;
- FstoragePMMLLocation:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert.SetstoragePMMLModelLocation(AIndex : Integer; const AValue : String);
- begin
- If (FstoragePMMLModelLocation=AValue) then exit;
- FstoragePMMLModelLocation:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert.SettrainingInstances(AIndex : Integer; const AValue : TInsertTypetrainingInstancesArray);
- begin
- If (FtrainingInstances=AValue) then exit;
- FtrainingInstances:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert.Setutility(AIndex : Integer; const AValue : TInsertTypeutilityArray);
- begin
- If (Futility=AValue) then exit;
- Futility:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TInsert.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'traininginstances' : SetLength(FtrainingInstances,ALength);
- 'utility' : SetLength(Futility,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TInsert2TypemodelInfo
- --------------------------------------------------------------------}
- Procedure TInsert2TypemodelInfo.SetclassWeightedAccuracy(AIndex : Integer; const AValue : String);
- begin
- If (FclassWeightedAccuracy=AValue) then exit;
- FclassWeightedAccuracy:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2TypemodelInfo.SetclassificationAccuracy(AIndex : Integer; const AValue : String);
- begin
- If (FclassificationAccuracy=AValue) then exit;
- FclassificationAccuracy:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2TypemodelInfo.SetmeanSquaredError(AIndex : Integer; const AValue : String);
- begin
- If (FmeanSquaredError=AValue) then exit;
- FmeanSquaredError:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2TypemodelInfo.SetmodelType(AIndex : Integer; const AValue : String);
- begin
- If (FmodelType=AValue) then exit;
- FmodelType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2TypemodelInfo.SetnumberInstances(AIndex : Integer; const AValue : String);
- begin
- If (FnumberInstances=AValue) then exit;
- FnumberInstances:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2TypemodelInfo.SetnumberLabels(AIndex : Integer; const AValue : String);
- begin
- If (FnumberLabels=AValue) then exit;
- FnumberLabels:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TInsert2
- --------------------------------------------------------------------}
- Procedure TInsert2.Setcreated(AIndex : Integer; const AValue : TDatetime);
- begin
- If (Fcreated=AValue) then exit;
- Fcreated:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2.Setid(AIndex : Integer; const AValue : String);
- begin
- If (Fid=AValue) then exit;
- Fid:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2.SetmodelInfo(AIndex : Integer; const AValue : TInsert2TypemodelInfo);
- begin
- If (FmodelInfo=AValue) then exit;
- FmodelInfo:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2.SetmodelType(AIndex : Integer; const AValue : String);
- begin
- If (FmodelType=AValue) then exit;
- FmodelType:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2.SetselfLink(AIndex : Integer; const AValue : String);
- begin
- If (FselfLink=AValue) then exit;
- FselfLink:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2.SetstorageDataLocation(AIndex : Integer; const AValue : String);
- begin
- If (FstorageDataLocation=AValue) then exit;
- FstorageDataLocation:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2.SetstoragePMMLLocation(AIndex : Integer; const AValue : String);
- begin
- If (FstoragePMMLLocation=AValue) then exit;
- FstoragePMMLLocation:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2.SetstoragePMMLModelLocation(AIndex : Integer; const AValue : String);
- begin
- If (FstoragePMMLModelLocation=AValue) then exit;
- FstoragePMMLModelLocation:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2.SettrainingComplete(AIndex : Integer; const AValue : TDatetime);
- begin
- If (FtrainingComplete=AValue) then exit;
- FtrainingComplete:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TInsert2.SettrainingStatus(AIndex : Integer; const AValue : String);
- begin
- If (FtrainingStatus=AValue) then exit;
- FtrainingStatus:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TList
- --------------------------------------------------------------------}
- Procedure TList.Setitems(AIndex : Integer; const AValue : TListTypeitemsArray);
- begin
- If (Fitems=AValue) then exit;
- Fitems:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TList.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TList.SetnextPageToken(AIndex : Integer; const AValue : String);
- begin
- If (FnextPageToken=AValue) then exit;
- FnextPageToken:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TList.SetselfLink(AIndex : Integer; const AValue : String);
- begin
- If (FselfLink=AValue) then exit;
- FselfLink:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TList.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'items' : SetLength(Fitems,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TOutputTypeoutputMultiItem
- --------------------------------------------------------------------}
- Procedure TOutputTypeoutputMultiItem.Set_label(AIndex : Integer; const AValue : String);
- begin
- If (F_label=AValue) then exit;
- F_label:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TOutputTypeoutputMultiItem.Setscore(AIndex : Integer; const AValue : String);
- begin
- If (Fscore=AValue) then exit;
- Fscore:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Class Function TOutputTypeoutputMultiItem.ExportPropertyName(Const AName : String) :String;
- begin
- Case AName of
- '_label' : Result:='label';
- else
- Result:=Inherited ExportPropertyName(AName);
- end;
- end;
- { --------------------------------------------------------------------
- TOutput
- --------------------------------------------------------------------}
- Procedure TOutput.Setid(AIndex : Integer; const AValue : String);
- begin
- If (Fid=AValue) then exit;
- Fid:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TOutput.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TOutput.SetoutputLabel(AIndex : Integer; const AValue : String);
- begin
- If (FoutputLabel=AValue) then exit;
- FoutputLabel:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TOutput.SetoutputMulti(AIndex : Integer; const AValue : TOutputTypeoutputMultiArray);
- begin
- If (FoutputMulti=AValue) then exit;
- FoutputMulti:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TOutput.SetoutputValue(AIndex : Integer; const AValue : String);
- begin
- If (FoutputValue=AValue) then exit;
- FoutputValue:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TOutput.SetselfLink(AIndex : Integer; const AValue : String);
- begin
- If (FselfLink=AValue) then exit;
- FselfLink:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TOutput.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'outputmulti' : SetLength(FoutputMulti,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TUpdate
- --------------------------------------------------------------------}
- Procedure TUpdate.SetcsvInstance(AIndex : Integer; const AValue : TTJSONSchemaArray);
- begin
- If (FcsvInstance=AValue) then exit;
- FcsvInstance:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TUpdate.Setoutput(AIndex : Integer; const AValue : String);
- begin
- If (Foutput=AValue) then exit;
- Foutput:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TUpdate.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'csvinstance' : SetLength(FcsvInstance,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- THostedmodelsResource
- --------------------------------------------------------------------}
- Class Function THostedmodelsResource.ResourceName : String;
- begin
- Result:='hostedmodels';
- end;
- Class Function THostedmodelsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TpredictionAPI;
- end;
- Function THostedmodelsResource.Predict(hostedModelName: string; project: string; aInput : TInput) : TOutput;
- Const
- _HTTPMethod = 'POST';
- _Path = '{project}/hostedmodels/{hostedModelName}/predict';
- _Methodid = 'prediction.hostedmodels.predict';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['hostedModelName',hostedModelName,'project',project]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aInput,TOutput) as TOutput;
- end;
- { --------------------------------------------------------------------
- TTrainedmodelsResource
- --------------------------------------------------------------------}
- Class Function TTrainedmodelsResource.ResourceName : String;
- begin
- Result:='trainedmodels';
- end;
- Class Function TTrainedmodelsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TpredictionAPI;
- end;
- Function TTrainedmodelsResource.Analyze(id: string; project: string) : TAnalyze;
- Const
- _HTTPMethod = 'GET';
- _Path = '{project}/trainedmodels/{id}/analyze';
- _Methodid = 'prediction.trainedmodels.analyze';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['id',id,'project',project]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TAnalyze) as TAnalyze;
- end;
- Procedure TTrainedmodelsResource.Delete(id: string; project: string);
- Const
- _HTTPMethod = 'DELETE';
- _Path = '{project}/trainedmodels/{id}';
- _Methodid = 'prediction.trainedmodels.delete';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['id',id,'project',project]);
- ServiceCall(_HTTPMethod,_P,'',Nil,Nil);
- end;
- Function TTrainedmodelsResource.Get(id: string; project: string) : TInsert2;
- Const
- _HTTPMethod = 'GET';
- _Path = '{project}/trainedmodels/{id}';
- _Methodid = 'prediction.trainedmodels.get';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['id',id,'project',project]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TInsert2) as TInsert2;
- end;
- Function TTrainedmodelsResource.Insert(project: string; aInsert : TInsert) : TInsert2;
- Const
- _HTTPMethod = 'POST';
- _Path = '{project}/trainedmodels';
- _Methodid = 'prediction.trainedmodels.insert';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['project',project]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aInsert,TInsert2) as TInsert2;
- end;
- Function TTrainedmodelsResource.List(project: string; AQuery : string = '') : TList;
- Const
- _HTTPMethod = 'GET';
- _Path = '{project}/trainedmodels/list';
- _Methodid = 'prediction.trainedmodels.list';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['project',project]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TList) as TList;
- end;
- Function TTrainedmodelsResource.List(project: string; AQuery : TTrainedmodelslistOptions) : TList;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'maxResults',AQuery.maxResults);
- AddToQuery(_Q,'pageToken',AQuery.pageToken);
- Result:=List(project,_Q);
- end;
- Function TTrainedmodelsResource.Predict(id: string; project: string; aInput : TInput) : TOutput;
- Const
- _HTTPMethod = 'POST';
- _Path = '{project}/trainedmodels/{id}/predict';
- _Methodid = 'prediction.trainedmodels.predict';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['id',id,'project',project]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aInput,TOutput) as TOutput;
- end;
- Function TTrainedmodelsResource.Update(id: string; project: string; aUpdate : TUpdate) : TInsert2;
- Const
- _HTTPMethod = 'PUT';
- _Path = '{project}/trainedmodels/{id}';
- _Methodid = 'prediction.trainedmodels.update';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['id',id,'project',project]);
- Result:=ServiceCall(_HTTPMethod,_P,'',aUpdate,TInsert2) as TInsert2;
- end;
- { --------------------------------------------------------------------
- TPredictionAPI
- --------------------------------------------------------------------}
- Class Function TPredictionAPI.APIName : String;
- begin
- Result:='prediction';
- end;
- Class Function TPredictionAPI.APIVersion : String;
- begin
- Result:='v1.6';
- end;
- Class Function TPredictionAPI.APIRevision : String;
- begin
- Result:='20160511';
- end;
- Class Function TPredictionAPI.APIID : String;
- begin
- Result:='prediction:v1.6';
- end;
- Class Function TPredictionAPI.APITitle : String;
- begin
- Result:='Prediction API';
- end;
- Class Function TPredictionAPI.APIDescription : String;
- begin
- Result:='Lets you access a cloud hosted machine learning service that makes it easy to build smart apps';
- end;
- Class Function TPredictionAPI.APIOwnerDomain : String;
- begin
- Result:='google.com';
- end;
- Class Function TPredictionAPI.APIOwnerName : String;
- begin
- Result:='Google';
- end;
- Class Function TPredictionAPI.APIIcon16 : String;
- begin
- Result:='https://www.google.com/images/icons/feature/predictionapi-16.png';
- end;
- Class Function TPredictionAPI.APIIcon32 : String;
- begin
- Result:='https://www.google.com/images/icons/feature/predictionapi-32.png';
- end;
- Class Function TPredictionAPI.APIdocumentationLink : String;
- begin
- Result:='https://developers.google.com/prediction/docs/developer-guide';
- end;
- Class Function TPredictionAPI.APIrootUrl : string;
- begin
- Result:='https://www.googleapis.com/';
- end;
- Class Function TPredictionAPI.APIbasePath : string;
- begin
- Result:='/prediction/v1.6/projects/';
- end;
- Class Function TPredictionAPI.APIbaseURL : String;
- begin
- Result:='https://www.googleapis.com/prediction/v1.6/projects/';
- end;
- Class Function TPredictionAPI.APIProtocol : string;
- begin
- Result:='rest';
- end;
- Class Function TPredictionAPI.APIservicePath : string;
- begin
- Result:='prediction/v1.6/projects/';
- end;
- Class Function TPredictionAPI.APIbatchPath : String;
- begin
- Result:='batch';
- end;
- Class Function TPredictionAPI.APIAuthScopes : TScopeInfoArray;
- begin
- SetLength(Result,5);
- Result[0].Name:='https://www.googleapis.com/auth/cloud-platform';
- Result[0].Description:='View and manage your data across Google Cloud Platform services';
- Result[1].Name:='https://www.googleapis.com/auth/devstorage.full_control';
- Result[1].Description:='Manage your data and permissions in Google Cloud Storage';
- Result[2].Name:='https://www.googleapis.com/auth/devstorage.read_only';
- Result[2].Description:='View your data in Google Cloud Storage';
- Result[3].Name:='https://www.googleapis.com/auth/devstorage.read_write';
- Result[3].Description:='Manage your data in Google Cloud Storage';
- Result[4].Name:='https://www.googleapis.com/auth/prediction';
- Result[4].Description:='Manage your data in the Google Prediction API';
-
- end;
- Class Function TPredictionAPI.APINeedsAuth : Boolean;
- begin
- Result:=True;
- end;
- Class Procedure TPredictionAPI.RegisterAPIResources;
- begin
- TAnalyzeTypedataDescriptionTypefeaturesItemTypecategoricalTypevaluesItem.RegisterObject;
- TAnalyzeTypedataDescriptionTypefeaturesItemTypecategorical.RegisterObject;
- TAnalyzeTypedataDescriptionTypefeaturesItemTypenumeric.RegisterObject;
- TAnalyzeTypedataDescriptionTypefeaturesItemTypetext.RegisterObject;
- TAnalyzeTypedataDescriptionTypefeaturesItem.RegisterObject;
- TAnalyzeTypedataDescriptionTypeoutputFeatureTypenumeric.RegisterObject;
- TAnalyzeTypedataDescriptionTypeoutputFeatureTypetextItem.RegisterObject;
- TAnalyzeTypedataDescriptionTypeoutputFeature.RegisterObject;
- TAnalyzeTypedataDescription.RegisterObject;
- TAnalyzeTypeerrorsItem.RegisterObject;
- TAnalyzeTypemodelDescriptionTypeconfusionMatrix.RegisterObject;
- TAnalyzeTypemodelDescriptionTypeconfusionMatrixRowTotals.RegisterObject;
- TAnalyzeTypemodelDescription.RegisterObject;
- TAnalyze.RegisterObject;
- TInputTypeinput.RegisterObject;
- TInput.RegisterObject;
- TInsertTypetrainingInstancesItem.RegisterObject;
- TInsertTypeutilityItem.RegisterObject;
- TInsert.RegisterObject;
- TInsert2TypemodelInfo.RegisterObject;
- TInsert2.RegisterObject;
- TList.RegisterObject;
- TOutputTypeoutputMultiItem.RegisterObject;
- TOutput.RegisterObject;
- TUpdate.RegisterObject;
- end;
- Function TPredictionAPI.GetHostedmodelsInstance : THostedmodelsResource;
- begin
- if (FHostedmodelsInstance=Nil) then
- FHostedmodelsInstance:=CreateHostedmodelsResource;
- Result:=FHostedmodelsInstance;
- end;
- Function TPredictionAPI.CreateHostedmodelsResource : THostedmodelsResource;
- begin
- Result:=CreateHostedmodelsResource(Self);
- end;
- Function TPredictionAPI.CreateHostedmodelsResource(AOwner : TComponent) : THostedmodelsResource;
- begin
- Result:=THostedmodelsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TPredictionAPI.GetTrainedmodelsInstance : TTrainedmodelsResource;
- begin
- if (FTrainedmodelsInstance=Nil) then
- FTrainedmodelsInstance:=CreateTrainedmodelsResource;
- Result:=FTrainedmodelsInstance;
- end;
- Function TPredictionAPI.CreateTrainedmodelsResource : TTrainedmodelsResource;
- begin
- Result:=CreateTrainedmodelsResource(Self);
- end;
- Function TPredictionAPI.CreateTrainedmodelsResource(AOwner : TComponent) : TTrainedmodelsResource;
- begin
- Result:=TTrainedmodelsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- initialization
- TPredictionAPI.RegisterAPI;
- end.
|