12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435 |
- unit googlecoordinate;
- {
- **********************************************************************
- This file is part of the Free Component Library (FCL)
- Copyright (c) 2015 The free pascal team.
-
- See the file COPYING.FPC, included in this distribution,
- for details about the copyright.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- **********************************************************************
- }
- //Generated on: 16-5-15 08:53:01
- {$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; AValue : boolean); virtual;
- Procedure Setenumitems(AIndex : Integer; 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; 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; 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; 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; 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; AValue : TJobTypejobChangeArray); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setstate(AIndex : Integer; 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; 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; 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; 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; AValue : TLocation); virtual;
- Procedure Setnote(AIndex : Integer; 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; AValue : TStringArray); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setlat(AIndex : Integer; AValue : double); virtual;
- Procedure Setlng(AIndex : Integer; 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; AValue : TLocationListResponseTypeitemsArray); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
- Procedure SettokenPagination(AIndex : Integer; 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; AValue : double); virtual;
- Procedure Setkind(AIndex : Integer; const AValue : String); virtual;
- Procedure Setlatitude(AIndex : Integer; AValue : double); virtual;
- Procedure Setlongitude(AIndex : Integer; 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; 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; 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; 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;
- 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; AValue : boolean);
- begin
- If (Fenabled=AValue) then exit;
- Fenabled:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TCustomFieldDef.Setenumitems(AIndex : Integer; 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; 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; 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; 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; 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; 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; 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; 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; 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; 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; AValue : TLocation);
- begin
- If (Flocation=AValue) then exit;
- Flocation:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TJobState.Setnote(AIndex : Integer; 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; 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; AValue : double);
- begin
- If (Flat=AValue) then exit;
- Flat:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocation.Setlng(AIndex : Integer; 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; 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; 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; 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; AValue : double);
- begin
- If (Flatitude=AValue) then exit;
- Flatitude:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- Procedure TLocationRecord.Setlongitude(AIndex : Integer; AValue : double);
- begin
- If (Flongitude=AValue) then exit;
- Flongitude:=AValue;
- MarkPropertyChanged(AIndex);
- end;
- { --------------------------------------------------------------------
- TSchedule
- --------------------------------------------------------------------}
- Procedure TSchedule.SetallDay(AIndex : Integer; 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; 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; 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,'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:='20141215';
- 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:443/';
- end;
- Class Function TCoordinateAPI.APIbasePath : string;
- begin
- Result:='/coordinate/v1/';
- end;
- Class Function TCoordinateAPI.APIbaseURL : String;
- begin
- Result:='https://www.googleapis.com:443/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.
|