1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422 |
- unit googlecoordinate;
- {$MODE objfpc}
- {$H+}
- interface
- uses sysutils, classes, googleservice, restbase, googlebase;
- type
-
- //Top-level schema types
- TCustomField = Class;
- TCustomFieldDef = Class;
- TCustomFieldDefListResponse = Class;
- TCustomFields = Class;
- TEnumItemDef = Class;
- TJob = Class;
- TJobChange = Class;
- TJobListResponse = Class;
- TJobState = Class;
- TLocation = Class;
- TLocationListResponse = Class;
- TLocationRecord = Class;
- TSchedule = Class;
- TTeam = Class;
- TTeamListResponse = Class;
- TTokenPagination = Class;
- TWorker = Class;
- TWorkerListResponse = Class;
- TCustomFieldArray = Array of TCustomField;
- TCustomFieldDefArray = Array of TCustomFieldDef;
- TCustomFieldDefListResponseArray = Array of TCustomFieldDefListResponse;
- TCustomFieldsArray = Array of TCustomFields;
- TEnumItemDefArray = Array of TEnumItemDef;
- TJobArray = Array of TJob;
- TJobChangeArray = Array of TJobChange;
- TJobListResponseArray = Array of TJobListResponse;
- TJobStateArray = Array of TJobState;
- TLocationArray = Array of TLocation;
- TLocationListResponseArray = Array of TLocationListResponse;
- TLocationRecordArray = Array of TLocationRecord;
- TScheduleArray = Array of TSchedule;
- TTeamArray = Array of TTeam;
- TTeamListResponseArray = Array of TTeamListResponse;
- TTokenPaginationArray = Array of TTokenPagination;
- TWorkerArray = Array of TWorker;
- TWorkerListResponseArray = Array of TWorkerListResponse;
- //Anonymous types, using auto-generated names
- TCustomFieldDefTypeenumitemsArray = Array of TEnumItemDef;
- TCustomFieldDefListResponseTypeitemsArray = Array of TCustomFieldDef;
- TCustomFieldsTypecustomFieldArray = Array of TCustomField;
- TJobTypejobChangeArray = Array of TJobChange;
- TJobListResponseTypeitemsArray = Array of TJob;
- TLocationListResponseTypeitemsArray = Array of TLocationRecord;
- TTeamListResponseTypeitemsArray = Array of TTeam;
- TWorkerListResponseTypeitemsArray = Array of TWorker;
-
- { --------------------------------------------------------------------
- TCustomField
- --------------------------------------------------------------------}
-
- TCustomField = Class(TGoogleBaseObject)
- Private
- FcustomFieldId : String;
- Fkind : String;
- Fvalue : String;
- Protected
- //Property setters
- Procedure SetcustomFieldId(AIndex : Integer; const AValue : String); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property customFieldId : String Index 0 Read FcustomFieldId Write SetcustomFieldId;
- Property kind : String Index 8 Read Fkind Write Setkind;
- Property value : String Index 16 Read Fvalue Write Setvalue;
- end;
- TCustomFieldClass = Class of TCustomField;
-
- { --------------------------------------------------------------------
- TCustomFieldDef
- --------------------------------------------------------------------}
-
- TCustomFieldDef = Class(TGoogleBaseObject)
- Private
- Fenabled : boolean;
- Fenumitems : TCustomFieldDefTypeenumitemsArray;
- Fid : String;
- Fkind : String;
- Fname : String;
- FrequiredForCheckout : boolean;
- F_type : String;
- Protected
- Class Function ExportPropertyName(Const AName : String) : string; override;
- //Property setters
- Procedure Setenabled(AIndex : Integer; const AValue : boolean); virtual;
- Procedure Setenumitems(AIndex : Integer; const AValue : TCustomFieldDefTypeenumitemsArray); virtual;
- Procedure Setid(AIndex : Integer; const AValue : String); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setname(AIndex : Integer; const AValue : String); virtual;
- Procedure SetrequiredForCheckout(AIndex : Integer; const AValue : boolean); virtual;
- Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property enabled : boolean Index 0 Read Fenabled Write Setenabled;
- Property enumitems : TCustomFieldDefTypeenumitemsArray Index 8 Read Fenumitems Write Setenumitems;
- Property id : String Index 16 Read Fid Write Setid;
- Property kind : String Index 24 Read Fkind Write Setkind;
- Property name : String Index 32 Read Fname Write Setname;
- Property requiredForCheckout : boolean Index 40 Read FrequiredForCheckout Write SetrequiredForCheckout;
- Property _type : String Index 48 Read F_type Write Set_type;
- end;
- TCustomFieldDefClass = Class of TCustomFieldDef;
-
- { --------------------------------------------------------------------
- TCustomFieldDefListResponse
- --------------------------------------------------------------------}
-
- TCustomFieldDefListResponse = Class(TGoogleBaseObject)
- Private
- Fitems : TCustomFieldDefListResponseTypeitemsArray;
- Fkind : String;
- Protected
- //Property setters
- Procedure Setitems(AIndex : Integer; const AValue : TCustomFieldDefListResponseTypeitemsArray); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property items : TCustomFieldDefListResponseTypeitemsArray Index 0 Read Fitems Write Setitems;
- Property kind : String Index 8 Read Fkind Write Setkind;
- end;
- TCustomFieldDefListResponseClass = Class of TCustomFieldDefListResponse;
-
- { --------------------------------------------------------------------
- TCustomFields
- --------------------------------------------------------------------}
-
- TCustomFields = Class(TGoogleBaseObject)
- Private
- FcustomField : TCustomFieldsTypecustomFieldArray;
- Fkind : String;
- Protected
- //Property setters
- Procedure SetcustomField(AIndex : Integer; const AValue : TCustomFieldsTypecustomFieldArray); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property customField : TCustomFieldsTypecustomFieldArray Index 0 Read FcustomField Write SetcustomField;
- Property kind : String Index 8 Read Fkind Write Setkind;
- end;
- TCustomFieldsClass = Class of TCustomFields;
-
- { --------------------------------------------------------------------
- TEnumItemDef
- --------------------------------------------------------------------}
-
- TEnumItemDef = Class(TGoogleBaseObject)
- Private
- Factive : boolean;
- Fkind : String;
- Fvalue : String;
- Protected
- //Property setters
- Procedure Setactive(AIndex : Integer; const AValue : boolean); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property active : boolean Index 0 Read Factive Write Setactive;
- Property kind : String Index 8 Read Fkind Write Setkind;
- Property value : String Index 16 Read Fvalue Write Setvalue;
- end;
- TEnumItemDefClass = Class of TEnumItemDef;
-
- { --------------------------------------------------------------------
- TJob
- --------------------------------------------------------------------}
-
- TJob = Class(TGoogleBaseObject)
- Private
- Fid : String;
- FjobChange : TJobTypejobChangeArray;
- Fkind : String;
- Fstate : TJobState;
- Protected
- //Property setters
- Procedure Setid(AIndex : Integer; const AValue : String); virtual;
- Procedure SetjobChange(AIndex : Integer; const AValue : TJobTypejobChangeArray); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setstate(AIndex : Integer; const AValue : TJobState); 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 jobChange : TJobTypejobChangeArray Index 8 Read FjobChange Write SetjobChange;
- Property kind : String Index 16 Read Fkind Write Setkind;
- Property state : TJobState Index 24 Read Fstate Write Setstate;
- end;
- TJobClass = Class of TJob;
-
- { --------------------------------------------------------------------
- TJobChange
- --------------------------------------------------------------------}
-
- TJobChange = Class(TGoogleBaseObject)
- Private
- Fkind : String;
- Fstate : TJobState;
- Ftimestamp : String;
- Protected
- //Property setters
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setstate(AIndex : Integer; const AValue : TJobState); virtual;
- Procedure Settimestamp(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property kind : String Index 0 Read Fkind Write Setkind;
- Property state : TJobState Index 8 Read Fstate Write Setstate;
- Property timestamp : String Index 16 Read Ftimestamp Write Settimestamp;
- end;
- TJobChangeClass = Class of TJobChange;
-
- { --------------------------------------------------------------------
- TJobListResponse
- --------------------------------------------------------------------}
-
- TJobListResponse = Class(TGoogleBaseObject)
- Private
- Fitems : TJobListResponseTypeitemsArray;
- Fkind : String;
- FnextPageToken : String;
- Protected
- //Property setters
- Procedure Setitems(AIndex : Integer; const AValue : TJobListResponseTypeitemsArray); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property items : TJobListResponseTypeitemsArray Index 0 Read Fitems Write Setitems;
- Property kind : String Index 8 Read Fkind Write Setkind;
- Property nextPageToken : String Index 16 Read FnextPageToken Write SetnextPageToken;
- end;
- TJobListResponseClass = Class of TJobListResponse;
-
- { --------------------------------------------------------------------
- TJobState
- --------------------------------------------------------------------}
-
- TJobState = Class(TGoogleBaseObject)
- Private
- Fassignee : String;
- FcustomFields : TCustomFields;
- FcustomerName : String;
- FcustomerPhoneNumber : String;
- Fkind : String;
- Flocation : TLocation;
- Fnote : TStringArray;
- Fprogress : String;
- Ftitle : String;
- Protected
- //Property setters
- Procedure Setassignee(AIndex : Integer; const AValue : String); virtual;
- Procedure SetcustomFields(AIndex : Integer; const AValue : TCustomFields); virtual;
- Procedure SetcustomerName(AIndex : Integer; const AValue : String); virtual;
- Procedure SetcustomerPhoneNumber(AIndex : Integer; const AValue : String); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setlocation(AIndex : Integer; const AValue : TLocation); virtual;
- Procedure Setnote(AIndex : Integer; const AValue : TStringArray); virtual;
- Procedure Setprogress(AIndex : Integer; const AValue : String); virtual;
- Procedure Settitle(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 assignee : String Index 0 Read Fassignee Write Setassignee;
- Property customFields : TCustomFields Index 8 Read FcustomFields Write SetcustomFields;
- Property customerName : String Index 16 Read FcustomerName Write SetcustomerName;
- Property customerPhoneNumber : String Index 24 Read FcustomerPhoneNumber Write SetcustomerPhoneNumber;
- Property kind : String Index 32 Read Fkind Write Setkind;
- Property location : TLocation Index 40 Read Flocation Write Setlocation;
- Property note : TStringArray Index 48 Read Fnote Write Setnote;
- Property progress : String Index 56 Read Fprogress Write Setprogress;
- Property title : String Index 64 Read Ftitle Write Settitle;
- end;
- TJobStateClass = Class of TJobState;
-
- { --------------------------------------------------------------------
- TLocation
- --------------------------------------------------------------------}
-
- TLocation = Class(TGoogleBaseObject)
- Private
- FaddressLine : TStringArray;
- Fkind : String;
- Flat : double;
- Flng : double;
- Protected
- //Property setters
- Procedure SetaddressLine(AIndex : Integer; const AValue : TStringArray); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setlat(AIndex : Integer; const AValue : double); virtual;
- Procedure Setlng(AIndex : Integer; const AValue : double); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property addressLine : TStringArray Index 0 Read FaddressLine Write SetaddressLine;
- Property kind : String Index 8 Read Fkind Write Setkind;
- Property lat : double Index 16 Read Flat Write Setlat;
- Property lng : double Index 24 Read Flng Write Setlng;
- end;
- TLocationClass = Class of TLocation;
-
- { --------------------------------------------------------------------
- TLocationListResponse
- --------------------------------------------------------------------}
-
- TLocationListResponse = Class(TGoogleBaseObject)
- Private
- Fitems : TLocationListResponseTypeitemsArray;
- Fkind : String;
- FnextPageToken : String;
- FtokenPagination : TTokenPagination;
- Protected
- //Property setters
- Procedure Setitems(AIndex : Integer; const AValue : TLocationListResponseTypeitemsArray); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
- Procedure SettokenPagination(AIndex : Integer; const AValue : TTokenPagination); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property items : TLocationListResponseTypeitemsArray 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 tokenPagination : TTokenPagination Index 24 Read FtokenPagination Write SettokenPagination;
- end;
- TLocationListResponseClass = Class of TLocationListResponse;
-
- { --------------------------------------------------------------------
- TLocationRecord
- --------------------------------------------------------------------}
-
- TLocationRecord = Class(TGoogleBaseObject)
- Private
- FcollectionTime : String;
- FconfidenceRadius : double;
- Fkind : String;
- Flatitude : double;
- Flongitude : double;
- Protected
- //Property setters
- Procedure SetcollectionTime(AIndex : Integer; const AValue : String); virtual;
- Procedure SetconfidenceRadius(AIndex : Integer; const AValue : double); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setlatitude(AIndex : Integer; const AValue : double); virtual;
- Procedure Setlongitude(AIndex : Integer; const AValue : double); virtual;
- Public
- Published
- Property collectionTime : String Index 0 Read FcollectionTime Write SetcollectionTime;
- Property confidenceRadius : double Index 8 Read FconfidenceRadius Write SetconfidenceRadius;
- Property kind : String Index 16 Read Fkind Write Setkind;
- Property latitude : double Index 24 Read Flatitude Write Setlatitude;
- Property longitude : double Index 32 Read Flongitude Write Setlongitude;
- end;
- TLocationRecordClass = Class of TLocationRecord;
-
- { --------------------------------------------------------------------
- TSchedule
- --------------------------------------------------------------------}
-
- TSchedule = Class(TGoogleBaseObject)
- Private
- FallDay : boolean;
- Fduration : String;
- FendTime : String;
- Fkind : String;
- FstartTime : String;
- Protected
- //Property setters
- Procedure SetallDay(AIndex : Integer; const AValue : boolean); virtual;
- Procedure Setduration(AIndex : Integer; const AValue : String); virtual;
- Procedure SetendTime(AIndex : Integer; const AValue : String); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure SetstartTime(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property allDay : boolean Index 0 Read FallDay Write SetallDay;
- Property duration : String Index 8 Read Fduration Write Setduration;
- Property endTime : String Index 16 Read FendTime Write SetendTime;
- Property kind : String Index 24 Read Fkind Write Setkind;
- Property startTime : String Index 32 Read FstartTime Write SetstartTime;
- end;
- TScheduleClass = Class of TSchedule;
-
- { --------------------------------------------------------------------
- TTeam
- --------------------------------------------------------------------}
-
- TTeam = Class(TGoogleBaseObject)
- Private
- Fid : String;
- Fkind : String;
- Fname : String;
- Protected
- //Property setters
- Procedure Setid(AIndex : Integer; const AValue : String); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setname(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property id : String Index 0 Read Fid Write Setid;
- Property kind : String Index 8 Read Fkind Write Setkind;
- Property name : String Index 16 Read Fname Write Setname;
- end;
- TTeamClass = Class of TTeam;
-
- { --------------------------------------------------------------------
- TTeamListResponse
- --------------------------------------------------------------------}
-
- TTeamListResponse = Class(TGoogleBaseObject)
- Private
- Fitems : TTeamListResponseTypeitemsArray;
- Fkind : String;
- Protected
- //Property setters
- Procedure Setitems(AIndex : Integer; const AValue : TTeamListResponseTypeitemsArray); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property items : TTeamListResponseTypeitemsArray Index 0 Read Fitems Write Setitems;
- Property kind : String Index 8 Read Fkind Write Setkind;
- end;
- TTeamListResponseClass = Class of TTeamListResponse;
-
- { --------------------------------------------------------------------
- TTokenPagination
- --------------------------------------------------------------------}
-
- TTokenPagination = Class(TGoogleBaseObject)
- Private
- Fkind : String;
- FnextPageToken : String;
- FpreviousPageToken : String;
- Protected
- //Property setters
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
- Procedure SetpreviousPageToken(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property kind : String Index 0 Read Fkind Write Setkind;
- Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
- Property previousPageToken : String Index 16 Read FpreviousPageToken Write SetpreviousPageToken;
- end;
- TTokenPaginationClass = Class of TTokenPagination;
-
- { --------------------------------------------------------------------
- TWorker
- --------------------------------------------------------------------}
-
- TWorker = Class(TGoogleBaseObject)
- Private
- Fid : String;
- Fkind : String;
- Protected
- //Property setters
- Procedure Setid(AIndex : Integer; const AValue : String); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Public
- Published
- Property id : String Index 0 Read Fid Write Setid;
- Property kind : String Index 8 Read Fkind Write Setkind;
- end;
- TWorkerClass = Class of TWorker;
-
- { --------------------------------------------------------------------
- TWorkerListResponse
- --------------------------------------------------------------------}
-
- TWorkerListResponse = Class(TGoogleBaseObject)
- Private
- Fitems : TWorkerListResponseTypeitemsArray;
- Fkind : String;
- Protected
- //Property setters
- Procedure Setitems(AIndex : Integer; const AValue : TWorkerListResponseTypeitemsArray); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
- {$ENDIF VER2_6}
- Public
- Published
- Property items : TWorkerListResponseTypeitemsArray Index 0 Read Fitems Write Setitems;
- Property kind : String Index 8 Read Fkind Write Setkind;
- end;
- TWorkerListResponseClass = Class of TWorkerListResponse;
-
- { --------------------------------------------------------------------
- TCustomFieldDefResource
- --------------------------------------------------------------------}
-
- TCustomFieldDefResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function List(teamId: string) : TCustomFieldDefListResponse;
- end;
-
-
- { --------------------------------------------------------------------
- TJobsResource
- --------------------------------------------------------------------}
-
-
- //Optional query Options for TJobsResource, method Insert
-
- TJobsInsertOptions = Record
- address : String;
- assignee : String;
- customField : String;
- customerName : String;
- customerPhoneNumber : String;
- lat : double;
- lng : double;
- note : String;
- title : String;
- end;
-
-
- //Optional query Options for TJobsResource, method List
-
- TJobsListOptions = Record
- maxResults : integer;
- minModifiedTimestampMs : String;
- omitJobChanges : boolean;
- pageToken : String;
- end;
-
-
- //Optional query Options for TJobsResource, method Patch
-
- TJobsPatchOptions = Record
- address : String;
- assignee : String;
- customField : String;
- customerName : String;
- customerPhoneNumber : String;
- lat : double;
- lng : double;
- note : String;
- progress : String;
- title : String;
- end;
-
-
- //Optional query Options for TJobsResource, method Update
-
- TJobsUpdateOptions = Record
- address : String;
- assignee : String;
- customField : String;
- customerName : String;
- customerPhoneNumber : String;
- lat : double;
- lng : double;
- note : String;
- progress : String;
- title : String;
- end;
-
- TJobsResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function Get(jobId: string; teamId: string) : TJob;
- Function Insert(teamId: string; aJob : TJob; AQuery : string = '') : TJob;
- Function Insert(teamId: string; aJob : TJob; AQuery : TJobsinsertOptions) : TJob;
- Function List(teamId: string; AQuery : string = '') : TJobListResponse;
- Function List(teamId: string; AQuery : TJobslistOptions) : TJobListResponse;
- Function Patch(jobId: string; teamId: string; aJob : TJob; AQuery : string = '') : TJob;
- Function Patch(jobId: string; teamId: string; aJob : TJob; AQuery : TJobspatchOptions) : TJob;
- Function Update(jobId: string; teamId: string; aJob : TJob; AQuery : string = '') : TJob;
- Function Update(jobId: string; teamId: string; aJob : TJob; AQuery : TJobsupdateOptions) : TJob;
- end;
-
-
- { --------------------------------------------------------------------
- TLocationResource
- --------------------------------------------------------------------}
-
-
- //Optional query Options for TLocationResource, method List
-
- TLocationListOptions = Record
- maxResults : integer;
- pageToken : String;
- startTimestampMs : String;
- end;
-
- TLocationResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function List(teamId: string; workerEmail: string; AQuery : string = '') : TLocationListResponse;
- Function List(teamId: string; workerEmail: string; AQuery : TLocationlistOptions) : TLocationListResponse;
- end;
-
-
- { --------------------------------------------------------------------
- TScheduleResource
- --------------------------------------------------------------------}
-
-
- //Optional query Options for TScheduleResource, method Patch
-
- TSchedulePatchOptions = Record
- allDay : boolean;
- duration : String;
- endTime : String;
- startTime : String;
- end;
-
-
- //Optional query Options for TScheduleResource, method Update
-
- TScheduleUpdateOptions = Record
- allDay : boolean;
- duration : String;
- endTime : String;
- startTime : String;
- end;
-
- TScheduleResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function Get(jobId: string; teamId: string) : TSchedule;
- Function Patch(jobId: string; teamId: string; aSchedule : TSchedule; AQuery : string = '') : TSchedule;
- Function Patch(jobId: string; teamId: string; aSchedule : TSchedule; AQuery : TSchedulepatchOptions) : TSchedule;
- Function Update(jobId: string; teamId: string; aSchedule : TSchedule; AQuery : string = '') : TSchedule;
- Function Update(jobId: string; teamId: string; aSchedule : TSchedule; AQuery : TScheduleupdateOptions) : TSchedule;
- end;
-
-
- { --------------------------------------------------------------------
- TTeamResource
- --------------------------------------------------------------------}
-
-
- //Optional query Options for TTeamResource, method List
-
- TTeamListOptions = Record
- admin : boolean;
- dispatcher : boolean;
- worker : boolean;
- end;
-
- TTeamResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function List(AQuery : string = '') : TTeamListResponse;
- Function List(AQuery : TTeamlistOptions) : TTeamListResponse;
- end;
-
-
- { --------------------------------------------------------------------
- TWorkerResource
- --------------------------------------------------------------------}
-
- TWorkerResource = Class(TGoogleResource)
- Public
- Class Function ResourceName : String; override;
- Class Function DefaultAPI : TGoogleAPIClass; override;
- Function List(teamId: string) : TWorkerListResponse;
- end;
-
-
- { --------------------------------------------------------------------
- TCoordinateAPI
- --------------------------------------------------------------------}
-
- TCoordinateAPI = Class(TGoogleAPI)
- Private
- FCustomFieldDefInstance : TCustomFieldDefResource;
- FJobsInstance : TJobsResource;
- FLocationInstance : TLocationResource;
- FScheduleInstance : TScheduleResource;
- FTeamInstance : TTeamResource;
- FWorkerInstance : TWorkerResource;
- Function GetCustomFieldDefInstance : TCustomFieldDefResource;virtual;
- Function GetJobsInstance : TJobsResource;virtual;
- Function GetLocationInstance : TLocationResource;virtual;
- Function GetScheduleInstance : TScheduleResource;virtual;
- Function GetTeamInstance : TTeamResource;virtual;
- Function GetWorkerInstance : TWorkerResource;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 CreateCustomFieldDefResource(AOwner : TComponent) : TCustomFieldDefResource;virtual;overload;
- Function CreateCustomFieldDefResource : TCustomFieldDefResource;virtual;overload;
- Function CreateJobsResource(AOwner : TComponent) : TJobsResource;virtual;overload;
- Function CreateJobsResource : TJobsResource;virtual;overload;
- Function CreateLocationResource(AOwner : TComponent) : TLocationResource;virtual;overload;
- Function CreateLocationResource : TLocationResource;virtual;overload;
- Function CreateScheduleResource(AOwner : TComponent) : TScheduleResource;virtual;overload;
- Function CreateScheduleResource : TScheduleResource;virtual;overload;
- Function CreateTeamResource(AOwner : TComponent) : TTeamResource;virtual;overload;
- Function CreateTeamResource : TTeamResource;virtual;overload;
- Function CreateWorkerResource(AOwner : TComponent) : TWorkerResource;virtual;overload;
- Function CreateWorkerResource : TWorkerResource;virtual;overload;
- //Add default on-demand instances for resources
- Property CustomFieldDefResource : TCustomFieldDefResource Read GetCustomFieldDefInstance;
- Property JobsResource : TJobsResource Read GetJobsInstance;
- Property LocationResource : TLocationResource Read GetLocationInstance;
- Property ScheduleResource : TScheduleResource Read GetScheduleInstance;
- Property TeamResource : TTeamResource Read GetTeamInstance;
- Property WorkerResource : TWorkerResource Read GetWorkerInstance;
- end;
- implementation
- { --------------------------------------------------------------------
- TCustomField
- --------------------------------------------------------------------}
- Procedure TCustomField.SetcustomFieldId(AIndex : Integer; const AValue : String);
- begin
- If (FcustomFieldId=AValue) then exit;
- FcustomFieldId:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCustomField.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCustomField.Setvalue(AIndex : Integer; const AValue : String);
- begin
- If (Fvalue=AValue) then exit;
- Fvalue:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TCustomFieldDef
- --------------------------------------------------------------------}
- Procedure TCustomFieldDef.Setenabled(AIndex : Integer; const AValue : boolean);
- begin
- If (Fenabled=AValue) then exit;
- Fenabled:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCustomFieldDef.Setenumitems(AIndex : Integer; const AValue : TCustomFieldDefTypeenumitemsArray);
- begin
- If (Fenumitems=AValue) then exit;
- Fenumitems:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCustomFieldDef.Setid(AIndex : Integer; const AValue : String);
- begin
- If (Fid=AValue) then exit;
- Fid:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCustomFieldDef.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCustomFieldDef.Setname(AIndex : Integer; const AValue : String);
- begin
- If (Fname=AValue) then exit;
- Fname:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCustomFieldDef.SetrequiredForCheckout(AIndex : Integer; const AValue : boolean);
- begin
- If (FrequiredForCheckout=AValue) then exit;
- FrequiredForCheckout:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCustomFieldDef.Set_type(AIndex : Integer; const AValue : String);
- begin
- If (F_type=AValue) then exit;
- F_type:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Class Function TCustomFieldDef.ExportPropertyName(Const AName : String) :String;
- begin
- Case AName of
- '_type' : Result:='type';
- else
- Result:=Inherited ExportPropertyName(AName);
- end;
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TCustomFieldDef.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'enumitems' : SetLength(Fenumitems,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TCustomFieldDefListResponse
- --------------------------------------------------------------------}
- Procedure TCustomFieldDefListResponse.Setitems(AIndex : Integer; const AValue : TCustomFieldDefListResponseTypeitemsArray);
- begin
- If (Fitems=AValue) then exit;
- Fitems:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCustomFieldDefListResponse.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TCustomFieldDefListResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'items' : SetLength(Fitems,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TCustomFields
- --------------------------------------------------------------------}
- Procedure TCustomFields.SetcustomField(AIndex : Integer; const AValue : TCustomFieldsTypecustomFieldArray);
- begin
- If (FcustomField=AValue) then exit;
- FcustomField:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCustomFields.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TCustomFields.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'customfield' : SetLength(FcustomField,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TEnumItemDef
- --------------------------------------------------------------------}
- Procedure TEnumItemDef.Setactive(AIndex : Integer; const AValue : boolean);
- begin
- If (Factive=AValue) then exit;
- Factive:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TEnumItemDef.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TEnumItemDef.Setvalue(AIndex : Integer; const AValue : String);
- begin
- If (Fvalue=AValue) then exit;
- Fvalue:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TJob
- --------------------------------------------------------------------}
- Procedure TJob.Setid(AIndex : Integer; const AValue : String);
- begin
- If (Fid=AValue) then exit;
- Fid:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJob.SetjobChange(AIndex : Integer; const AValue : TJobTypejobChangeArray);
- begin
- If (FjobChange=AValue) then exit;
- FjobChange:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJob.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJob.Setstate(AIndex : Integer; const AValue : TJobState);
- begin
- If (Fstate=AValue) then exit;
- Fstate:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TJob.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'jobchange' : SetLength(FjobChange,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TJobChange
- --------------------------------------------------------------------}
- Procedure TJobChange.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJobChange.Setstate(AIndex : Integer; const AValue : TJobState);
- begin
- If (Fstate=AValue) then exit;
- Fstate:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJobChange.Settimestamp(AIndex : Integer; const AValue : String);
- begin
- If (Ftimestamp=AValue) then exit;
- Ftimestamp:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TJobListResponse
- --------------------------------------------------------------------}
- Procedure TJobListResponse.Setitems(AIndex : Integer; const AValue : TJobListResponseTypeitemsArray);
- begin
- If (Fitems=AValue) then exit;
- Fitems:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJobListResponse.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJobListResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
- begin
- If (FnextPageToken=AValue) then exit;
- FnextPageToken:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TJobListResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'items' : SetLength(Fitems,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TJobState
- --------------------------------------------------------------------}
- Procedure TJobState.Setassignee(AIndex : Integer; const AValue : String);
- begin
- If (Fassignee=AValue) then exit;
- Fassignee:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJobState.SetcustomFields(AIndex : Integer; const AValue : TCustomFields);
- begin
- If (FcustomFields=AValue) then exit;
- FcustomFields:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJobState.SetcustomerName(AIndex : Integer; const AValue : String);
- begin
- If (FcustomerName=AValue) then exit;
- FcustomerName:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJobState.SetcustomerPhoneNumber(AIndex : Integer; const AValue : String);
- begin
- If (FcustomerPhoneNumber=AValue) then exit;
- FcustomerPhoneNumber:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJobState.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJobState.Setlocation(AIndex : Integer; const AValue : TLocation);
- begin
- If (Flocation=AValue) then exit;
- Flocation:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJobState.Setnote(AIndex : Integer; const AValue : TStringArray);
- begin
- If (Fnote=AValue) then exit;
- Fnote:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJobState.Setprogress(AIndex : Integer; const AValue : String);
- begin
- If (Fprogress=AValue) then exit;
- Fprogress:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJobState.Settitle(AIndex : Integer; const AValue : String);
- begin
- If (Ftitle=AValue) then exit;
- Ftitle:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TJobState.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'note' : SetLength(Fnote,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TLocation
- --------------------------------------------------------------------}
- Procedure TLocation.SetaddressLine(AIndex : Integer; const AValue : TStringArray);
- begin
- If (FaddressLine=AValue) then exit;
- FaddressLine:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocation.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocation.Setlat(AIndex : Integer; const AValue : double);
- begin
- If (Flat=AValue) then exit;
- Flat:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocation.Setlng(AIndex : Integer; const AValue : double);
- begin
- If (Flng=AValue) then exit;
- Flng:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TLocation.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'addressline' : SetLength(FaddressLine,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TLocationListResponse
- --------------------------------------------------------------------}
- Procedure TLocationListResponse.Setitems(AIndex : Integer; const AValue : TLocationListResponseTypeitemsArray);
- begin
- If (Fitems=AValue) then exit;
- Fitems:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocationListResponse.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocationListResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
- begin
- If (FnextPageToken=AValue) then exit;
- FnextPageToken:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocationListResponse.SettokenPagination(AIndex : Integer; const AValue : TTokenPagination);
- begin
- If (FtokenPagination=AValue) then exit;
- FtokenPagination:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TLocationListResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'items' : SetLength(Fitems,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TLocationRecord
- --------------------------------------------------------------------}
- Procedure TLocationRecord.SetcollectionTime(AIndex : Integer; const AValue : String);
- begin
- If (FcollectionTime=AValue) then exit;
- FcollectionTime:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocationRecord.SetconfidenceRadius(AIndex : Integer; const AValue : double);
- begin
- If (FconfidenceRadius=AValue) then exit;
- FconfidenceRadius:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocationRecord.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocationRecord.Setlatitude(AIndex : Integer; const AValue : double);
- begin
- If (Flatitude=AValue) then exit;
- Flatitude:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocationRecord.Setlongitude(AIndex : Integer; const AValue : double);
- begin
- If (Flongitude=AValue) then exit;
- Flongitude:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TSchedule
- --------------------------------------------------------------------}
- Procedure TSchedule.SetallDay(AIndex : Integer; const AValue : boolean);
- begin
- If (FallDay=AValue) then exit;
- FallDay:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TSchedule.Setduration(AIndex : Integer; const AValue : String);
- begin
- If (Fduration=AValue) then exit;
- Fduration:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TSchedule.SetendTime(AIndex : Integer; const AValue : String);
- begin
- If (FendTime=AValue) then exit;
- FendTime:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TSchedule.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TSchedule.SetstartTime(AIndex : Integer; const AValue : String);
- begin
- If (FstartTime=AValue) then exit;
- FstartTime:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TTeam
- --------------------------------------------------------------------}
- Procedure TTeam.Setid(AIndex : Integer; const AValue : String);
- begin
- If (Fid=AValue) then exit;
- Fid:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TTeam.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TTeam.Setname(AIndex : Integer; const AValue : String);
- begin
- If (Fname=AValue) then exit;
- Fname:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TTeamListResponse
- --------------------------------------------------------------------}
- Procedure TTeamListResponse.Setitems(AIndex : Integer; const AValue : TTeamListResponseTypeitemsArray);
- begin
- If (Fitems=AValue) then exit;
- Fitems:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TTeamListResponse.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TTeamListResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'items' : SetLength(Fitems,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TTokenPagination
- --------------------------------------------------------------------}
- Procedure TTokenPagination.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TTokenPagination.SetnextPageToken(AIndex : Integer; const AValue : String);
- begin
- If (FnextPageToken=AValue) then exit;
- FnextPageToken:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TTokenPagination.SetpreviousPageToken(AIndex : Integer; const AValue : String);
- begin
- If (FpreviousPageToken=AValue) then exit;
- FpreviousPageToken:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TWorker
- --------------------------------------------------------------------}
- Procedure TWorker.Setid(AIndex : Integer; const AValue : String);
- begin
- If (Fid=AValue) then exit;
- Fid:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TWorker.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TWorkerListResponse
- --------------------------------------------------------------------}
- Procedure TWorkerListResponse.Setitems(AIndex : Integer; const AValue : TWorkerListResponseTypeitemsArray);
- begin
- If (Fitems=AValue) then exit;
- Fitems:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TWorkerListResponse.Setkind(AIndex : Integer; const AValue : String);
- begin
- If (Fkind=AValue) then exit;
- Fkind:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- //2.6.4. bug workaround
- {$IFDEF VER2_6}
- Procedure TWorkerListResponse.SetArrayLength(Const AName : String; ALength : Longint);
- begin
- Case AName of
- 'items' : SetLength(Fitems,ALength);
- else
- Inherited SetArrayLength(AName,ALength);
- end;
- end;
- {$ENDIF VER2_6}
- { --------------------------------------------------------------------
- TCustomFieldDefResource
- --------------------------------------------------------------------}
- Class Function TCustomFieldDefResource.ResourceName : String;
- begin
- Result:='customFieldDef';
- end;
- Class Function TCustomFieldDefResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TcoordinateAPI;
- end;
- Function TCustomFieldDefResource.List(teamId: string) : TCustomFieldDefListResponse;
- Const
- _HTTPMethod = 'GET';
- _Path = 'teams/{teamId}/custom_fields';
- _Methodid = 'coordinate.customFieldDef.list';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['teamId',teamId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TCustomFieldDefListResponse) as TCustomFieldDefListResponse;
- end;
- { --------------------------------------------------------------------
- TJobsResource
- --------------------------------------------------------------------}
- Class Function TJobsResource.ResourceName : String;
- begin
- Result:='jobs';
- end;
- Class Function TJobsResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TcoordinateAPI;
- end;
- Function TJobsResource.Get(jobId: string; teamId: string) : TJob;
- Const
- _HTTPMethod = 'GET';
- _Path = 'teams/{teamId}/jobs/{jobId}';
- _Methodid = 'coordinate.jobs.get';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['jobId',jobId,'teamId',teamId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TJob) as TJob;
- end;
- Function TJobsResource.Insert(teamId: string; aJob : TJob; AQuery : string = '') : TJob;
- Const
- _HTTPMethod = 'POST';
- _Path = 'teams/{teamId}/jobs';
- _Methodid = 'coordinate.jobs.insert';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['teamId',teamId]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,aJob,TJob) as TJob;
- end;
- Function TJobsResource.Insert(teamId: string; aJob : TJob; AQuery : TJobsinsertOptions) : TJob;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'address',AQuery.address);
- AddToQuery(_Q,'assignee',AQuery.assignee);
- AddToQuery(_Q,'customField',AQuery.customField);
- AddToQuery(_Q,'customerName',AQuery.customerName);
- AddToQuery(_Q,'customerPhoneNumber',AQuery.customerPhoneNumber);
- AddToQuery(_Q,'lat',AQuery.lat);
- AddToQuery(_Q,'lng',AQuery.lng);
- AddToQuery(_Q,'note',AQuery.note);
- AddToQuery(_Q,'title',AQuery.title);
- Result:=Insert(teamId,aJob,_Q);
- end;
- Function TJobsResource.List(teamId: string; AQuery : string = '') : TJobListResponse;
- Const
- _HTTPMethod = 'GET';
- _Path = 'teams/{teamId}/jobs';
- _Methodid = 'coordinate.jobs.list';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['teamId',teamId]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TJobListResponse) as TJobListResponse;
- end;
- Function TJobsResource.List(teamId: string; AQuery : TJobslistOptions) : TJobListResponse;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'maxResults',AQuery.maxResults);
- AddToQuery(_Q,'minModifiedTimestampMs',AQuery.minModifiedTimestampMs);
- AddToQuery(_Q,'omitJobChanges',AQuery.omitJobChanges);
- AddToQuery(_Q,'pageToken',AQuery.pageToken);
- Result:=List(teamId,_Q);
- end;
- Function TJobsResource.Patch(jobId: string; teamId: string; aJob : TJob; AQuery : string = '') : TJob;
- Const
- _HTTPMethod = 'PATCH';
- _Path = 'teams/{teamId}/jobs/{jobId}';
- _Methodid = 'coordinate.jobs.patch';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['jobId',jobId,'teamId',teamId]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,aJob,TJob) as TJob;
- end;
- Function TJobsResource.Patch(jobId: string; teamId: string; aJob : TJob; AQuery : TJobspatchOptions) : TJob;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'address',AQuery.address);
- AddToQuery(_Q,'assignee',AQuery.assignee);
- AddToQuery(_Q,'customField',AQuery.customField);
- AddToQuery(_Q,'customerName',AQuery.customerName);
- AddToQuery(_Q,'customerPhoneNumber',AQuery.customerPhoneNumber);
- AddToQuery(_Q,'lat',AQuery.lat);
- AddToQuery(_Q,'lng',AQuery.lng);
- AddToQuery(_Q,'note',AQuery.note);
- AddToQuery(_Q,'progress',AQuery.progress);
- AddToQuery(_Q,'title',AQuery.title);
- Result:=Patch(jobId,teamId,aJob,_Q);
- end;
- Function TJobsResource.Update(jobId: string; teamId: string; aJob : TJob; AQuery : string = '') : TJob;
- Const
- _HTTPMethod = 'PUT';
- _Path = 'teams/{teamId}/jobs/{jobId}';
- _Methodid = 'coordinate.jobs.update';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['jobId',jobId,'teamId',teamId]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,aJob,TJob) as TJob;
- end;
- Function TJobsResource.Update(jobId: string; teamId: string; aJob : TJob; AQuery : TJobsupdateOptions) : TJob;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'address',AQuery.address);
- AddToQuery(_Q,'assignee',AQuery.assignee);
- AddToQuery(_Q,'customField',AQuery.customField);
- AddToQuery(_Q,'customerName',AQuery.customerName);
- AddToQuery(_Q,'customerPhoneNumber',AQuery.customerPhoneNumber);
- AddToQuery(_Q,'lat',AQuery.lat);
- AddToQuery(_Q,'lng',AQuery.lng);
- AddToQuery(_Q,'note',AQuery.note);
- AddToQuery(_Q,'progress',AQuery.progress);
- AddToQuery(_Q,'title',AQuery.title);
- Result:=Update(jobId,teamId,aJob,_Q);
- end;
- { --------------------------------------------------------------------
- TLocationResource
- --------------------------------------------------------------------}
- Class Function TLocationResource.ResourceName : String;
- begin
- Result:='location';
- end;
- Class Function TLocationResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TcoordinateAPI;
- end;
- Function TLocationResource.List(teamId: string; workerEmail: string; AQuery : string = '') : TLocationListResponse;
- Const
- _HTTPMethod = 'GET';
- _Path = 'teams/{teamId}/workers/{workerEmail}/locations';
- _Methodid = 'coordinate.location.list';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['teamId',teamId,'workerEmail',workerEmail]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TLocationListResponse) as TLocationListResponse;
- end;
- Function TLocationResource.List(teamId: string; workerEmail: string; AQuery : TLocationlistOptions) : TLocationListResponse;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'maxResults',AQuery.maxResults);
- AddToQuery(_Q,'pageToken',AQuery.pageToken);
- AddToQuery(_Q,'startTimestampMs',AQuery.startTimestampMs);
- Result:=List(teamId,workerEmail,_Q);
- end;
- { --------------------------------------------------------------------
- TScheduleResource
- --------------------------------------------------------------------}
- Class Function TScheduleResource.ResourceName : String;
- begin
- Result:='schedule';
- end;
- Class Function TScheduleResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TcoordinateAPI;
- end;
- Function TScheduleResource.Get(jobId: string; teamId: string) : TSchedule;
- Const
- _HTTPMethod = 'GET';
- _Path = 'teams/{teamId}/jobs/{jobId}/schedule';
- _Methodid = 'coordinate.schedule.get';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['jobId',jobId,'teamId',teamId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TSchedule) as TSchedule;
- end;
- Function TScheduleResource.Patch(jobId: string; teamId: string; aSchedule : TSchedule; AQuery : string = '') : TSchedule;
- Const
- _HTTPMethod = 'PATCH';
- _Path = 'teams/{teamId}/jobs/{jobId}/schedule';
- _Methodid = 'coordinate.schedule.patch';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['jobId',jobId,'teamId',teamId]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,aSchedule,TSchedule) as TSchedule;
- end;
- Function TScheduleResource.Patch(jobId: string; teamId: string; aSchedule : TSchedule; AQuery : TSchedulepatchOptions) : TSchedule;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'allDay',AQuery.allDay);
- AddToQuery(_Q,'duration',AQuery.duration);
- AddToQuery(_Q,'endTime',AQuery.endTime);
- AddToQuery(_Q,'startTime',AQuery.startTime);
- Result:=Patch(jobId,teamId,aSchedule,_Q);
- end;
- Function TScheduleResource.Update(jobId: string; teamId: string; aSchedule : TSchedule; AQuery : string = '') : TSchedule;
- Const
- _HTTPMethod = 'PUT';
- _Path = 'teams/{teamId}/jobs/{jobId}/schedule';
- _Methodid = 'coordinate.schedule.update';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['jobId',jobId,'teamId',teamId]);
- Result:=ServiceCall(_HTTPMethod,_P,AQuery,aSchedule,TSchedule) as TSchedule;
- end;
- Function TScheduleResource.Update(jobId: string; teamId: string; aSchedule : TSchedule; AQuery : TScheduleupdateOptions) : TSchedule;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'allDay',AQuery.allDay);
- AddToQuery(_Q,'duration',AQuery.duration);
- AddToQuery(_Q,'endTime',AQuery.endTime);
- AddToQuery(_Q,'startTime',AQuery.startTime);
- Result:=Update(jobId,teamId,aSchedule,_Q);
- end;
- { --------------------------------------------------------------------
- TTeamResource
- --------------------------------------------------------------------}
- Class Function TTeamResource.ResourceName : String;
- begin
- Result:='team';
- end;
- Class Function TTeamResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TcoordinateAPI;
- end;
- Function TTeamResource.List(AQuery : string = '') : TTeamListResponse;
- Const
- _HTTPMethod = 'GET';
- _Path = 'teams';
- _Methodid = 'coordinate.team.list';
- begin
- Result:=ServiceCall(_HTTPMethod,_Path,AQuery,Nil,TTeamListResponse) as TTeamListResponse;
- end;
- Function TTeamResource.List(AQuery : TTeamlistOptions) : TTeamListResponse;
- Var
- _Q : String;
- begin
- _Q:='';
- AddToQuery(_Q,'admin',AQuery.admin);
- AddToQuery(_Q,'dispatcher',AQuery.dispatcher);
- AddToQuery(_Q,'worker',AQuery.worker);
- Result:=List(_Q);
- end;
- { --------------------------------------------------------------------
- TWorkerResource
- --------------------------------------------------------------------}
- Class Function TWorkerResource.ResourceName : String;
- begin
- Result:='worker';
- end;
- Class Function TWorkerResource.DefaultAPI : TGoogleAPIClass;
- begin
- Result:=TcoordinateAPI;
- end;
- Function TWorkerResource.List(teamId: string) : TWorkerListResponse;
- Const
- _HTTPMethod = 'GET';
- _Path = 'teams/{teamId}/workers';
- _Methodid = 'coordinate.worker.list';
- Var
- _P : String;
- begin
- _P:=SubstitutePath(_Path,['teamId',teamId]);
- Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TWorkerListResponse) as TWorkerListResponse;
- end;
- { --------------------------------------------------------------------
- TCoordinateAPI
- --------------------------------------------------------------------}
- Class Function TCoordinateAPI.APIName : String;
- begin
- Result:='coordinate';
- end;
- Class Function TCoordinateAPI.APIVersion : String;
- begin
- Result:='v1';
- end;
- Class Function TCoordinateAPI.APIRevision : String;
- begin
- Result:='20150811';
- end;
- Class Function TCoordinateAPI.APIID : String;
- begin
- Result:='coordinate:v1';
- end;
- Class Function TCoordinateAPI.APITitle : String;
- begin
- Result:='Google Maps Coordinate API';
- end;
- Class Function TCoordinateAPI.APIDescription : String;
- begin
- Result:='Lets you view and manage jobs in a Coordinate team.';
- end;
- Class Function TCoordinateAPI.APIOwnerDomain : String;
- begin
- Result:='google.com';
- end;
- Class Function TCoordinateAPI.APIOwnerName : String;
- begin
- Result:='Google';
- end;
- Class Function TCoordinateAPI.APIIcon16 : String;
- begin
- Result:='http://www.google.com/images/icons/product/search-16.gif';
- end;
- Class Function TCoordinateAPI.APIIcon32 : String;
- begin
- Result:='http://www.google.com/images/icons/product/search-32.gif';
- end;
- Class Function TCoordinateAPI.APIdocumentationLink : String;
- begin
- Result:='https://developers.google.com/coordinate/';
- end;
- Class Function TCoordinateAPI.APIrootUrl : string;
- begin
- Result:='https://www.googleapis.com/';
- end;
- Class Function TCoordinateAPI.APIbasePath : string;
- begin
- Result:='/coordinate/v1/';
- end;
- Class Function TCoordinateAPI.APIbaseURL : String;
- begin
- Result:='https://www.googleapis.com/coordinate/v1/';
- end;
- Class Function TCoordinateAPI.APIProtocol : string;
- begin
- Result:='rest';
- end;
- Class Function TCoordinateAPI.APIservicePath : string;
- begin
- Result:='coordinate/v1/';
- end;
- Class Function TCoordinateAPI.APIbatchPath : String;
- begin
- Result:='batch';
- end;
- Class Function TCoordinateAPI.APIAuthScopes : TScopeInfoArray;
- begin
- SetLength(Result,2);
- Result[0].Name:='https://www.googleapis.com/auth/coordinate';
- Result[0].Description:='View and manage your Google Maps Coordinate jobs';
- Result[1].Name:='https://www.googleapis.com/auth/coordinate.readonly';
- Result[1].Description:='View your Google Coordinate jobs';
-
- end;
- Class Function TCoordinateAPI.APINeedsAuth : Boolean;
- begin
- Result:=True;
- end;
- Class Procedure TCoordinateAPI.RegisterAPIResources;
- begin
- TCustomField.RegisterObject;
- TCustomFieldDef.RegisterObject;
- TCustomFieldDefListResponse.RegisterObject;
- TCustomFields.RegisterObject;
- TEnumItemDef.RegisterObject;
- TJob.RegisterObject;
- TJobChange.RegisterObject;
- TJobListResponse.RegisterObject;
- TJobState.RegisterObject;
- TLocation.RegisterObject;
- TLocationListResponse.RegisterObject;
- TLocationRecord.RegisterObject;
- TSchedule.RegisterObject;
- TTeam.RegisterObject;
- TTeamListResponse.RegisterObject;
- TTokenPagination.RegisterObject;
- TWorker.RegisterObject;
- TWorkerListResponse.RegisterObject;
- end;
- Function TCoordinateAPI.GetCustomFieldDefInstance : TCustomFieldDefResource;
- begin
- if (FCustomFieldDefInstance=Nil) then
- FCustomFieldDefInstance:=CreateCustomFieldDefResource;
- Result:=FCustomFieldDefInstance;
- end;
- Function TCoordinateAPI.CreateCustomFieldDefResource : TCustomFieldDefResource;
- begin
- Result:=CreateCustomFieldDefResource(Self);
- end;
- Function TCoordinateAPI.CreateCustomFieldDefResource(AOwner : TComponent) : TCustomFieldDefResource;
- begin
- Result:=TCustomFieldDefResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TCoordinateAPI.GetJobsInstance : TJobsResource;
- begin
- if (FJobsInstance=Nil) then
- FJobsInstance:=CreateJobsResource;
- Result:=FJobsInstance;
- end;
- Function TCoordinateAPI.CreateJobsResource : TJobsResource;
- begin
- Result:=CreateJobsResource(Self);
- end;
- Function TCoordinateAPI.CreateJobsResource(AOwner : TComponent) : TJobsResource;
- begin
- Result:=TJobsResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TCoordinateAPI.GetLocationInstance : TLocationResource;
- begin
- if (FLocationInstance=Nil) then
- FLocationInstance:=CreateLocationResource;
- Result:=FLocationInstance;
- end;
- Function TCoordinateAPI.CreateLocationResource : TLocationResource;
- begin
- Result:=CreateLocationResource(Self);
- end;
- Function TCoordinateAPI.CreateLocationResource(AOwner : TComponent) : TLocationResource;
- begin
- Result:=TLocationResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TCoordinateAPI.GetScheduleInstance : TScheduleResource;
- begin
- if (FScheduleInstance=Nil) then
- FScheduleInstance:=CreateScheduleResource;
- Result:=FScheduleInstance;
- end;
- Function TCoordinateAPI.CreateScheduleResource : TScheduleResource;
- begin
- Result:=CreateScheduleResource(Self);
- end;
- Function TCoordinateAPI.CreateScheduleResource(AOwner : TComponent) : TScheduleResource;
- begin
- Result:=TScheduleResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TCoordinateAPI.GetTeamInstance : TTeamResource;
- begin
- if (FTeamInstance=Nil) then
- FTeamInstance:=CreateTeamResource;
- Result:=FTeamInstance;
- end;
- Function TCoordinateAPI.CreateTeamResource : TTeamResource;
- begin
- Result:=CreateTeamResource(Self);
- end;
- Function TCoordinateAPI.CreateTeamResource(AOwner : TComponent) : TTeamResource;
- begin
- Result:=TTeamResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- Function TCoordinateAPI.GetWorkerInstance : TWorkerResource;
- begin
- if (FWorkerInstance=Nil) then
- FWorkerInstance:=CreateWorkerResource;
- Result:=FWorkerInstance;
- end;
- Function TCoordinateAPI.CreateWorkerResource : TWorkerResource;
- begin
- Result:=CreateWorkerResource(Self);
- end;
- Function TCoordinateAPI.CreateWorkerResource(AOwner : TComponent) : TWorkerResource;
- begin
- Result:=TWorkerResource.Create(AOwner);
- Result.API:=Self.API;
- end;
- initialization
- TCoordinateAPI.RegisterAPI;
- end.
|