googlepeople.pp 97 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517
  1. unit googlepeople;
  2. {$MODE objfpc}
  3. {$H+}
  4. interface
  5. uses sysutils, classes, googleservice, restbase, googlebase;
  6. type
  7. //Top-level schema types
  8. TPerson = Class;
  9. TPersonMetadata = Class;
  10. TSource = Class;
  11. TLocale = Class;
  12. TFieldMetadata = Class;
  13. TName = Class;
  14. TNickname = Class;
  15. TCoverPhoto = Class;
  16. TPhoto = Class;
  17. TGender = Class;
  18. TBirthday = Class;
  19. TDate = Class;
  20. TEvent = Class;
  21. TAddress = Class;
  22. TResidence = Class;
  23. TEmailAddress = Class;
  24. TPhoneNumber = Class;
  25. TImClient = Class;
  26. TTagline = Class;
  27. TBiography = Class;
  28. TUrl = Class;
  29. TOrganization = Class;
  30. TOccupation = Class;
  31. TInterest = Class;
  32. TSkill = Class;
  33. TBraggingRights = Class;
  34. TRelation = Class;
  35. TRelationshipInterest = Class;
  36. TRelationshipStatus = Class;
  37. TMembership = Class;
  38. TContactGroupMembership = Class;
  39. TDomainMembership = Class;
  40. TGetPeopleResponse = Class;
  41. TPersonResponse = Class;
  42. TListConnectionsResponse = Class;
  43. TPersonArray = Array of TPerson;
  44. TPersonMetadataArray = Array of TPersonMetadata;
  45. TSourceArray = Array of TSource;
  46. TLocaleArray = Array of TLocale;
  47. TFieldMetadataArray = Array of TFieldMetadata;
  48. TNameArray = Array of TName;
  49. TNicknameArray = Array of TNickname;
  50. TCoverPhotoArray = Array of TCoverPhoto;
  51. TPhotoArray = Array of TPhoto;
  52. TGenderArray = Array of TGender;
  53. TBirthdayArray = Array of TBirthday;
  54. TDateArray = Array of TDate;
  55. TEventArray = Array of TEvent;
  56. TAddressArray = Array of TAddress;
  57. TResidenceArray = Array of TResidence;
  58. TEmailAddressArray = Array of TEmailAddress;
  59. TPhoneNumberArray = Array of TPhoneNumber;
  60. TImClientArray = Array of TImClient;
  61. TTaglineArray = Array of TTagline;
  62. TBiographyArray = Array of TBiography;
  63. TUrlArray = Array of TUrl;
  64. TOrganizationArray = Array of TOrganization;
  65. TOccupationArray = Array of TOccupation;
  66. TInterestArray = Array of TInterest;
  67. TSkillArray = Array of TSkill;
  68. TBraggingRightsArray = Array of TBraggingRights;
  69. TRelationArray = Array of TRelation;
  70. TRelationshipInterestArray = Array of TRelationshipInterest;
  71. TRelationshipStatusArray = Array of TRelationshipStatus;
  72. TMembershipArray = Array of TMembership;
  73. TContactGroupMembershipArray = Array of TContactGroupMembership;
  74. TDomainMembershipArray = Array of TDomainMembership;
  75. TGetPeopleResponseArray = Array of TGetPeopleResponse;
  76. TPersonResponseArray = Array of TPersonResponse;
  77. TListConnectionsResponseArray = Array of TListConnectionsResponse;
  78. //Anonymous types, using auto-generated names
  79. TPersonTypelocalesArray = Array of TLocale;
  80. TPersonTypenamesArray = Array of TName;
  81. TPersonTypenicknamesArray = Array of TNickname;
  82. TPersonTypecoverPhotosArray = Array of TCoverPhoto;
  83. TPersonTypephotosArray = Array of TPhoto;
  84. TPersonTypegendersArray = Array of TGender;
  85. TPersonTypebirthdaysArray = Array of TBirthday;
  86. TPersonTypeeventsArray = Array of TEvent;
  87. TPersonTypeaddressesArray = Array of TAddress;
  88. TPersonTyperesidencesArray = Array of TResidence;
  89. TPersonTypeemailAddressesArray = Array of TEmailAddress;
  90. TPersonTypephoneNumbersArray = Array of TPhoneNumber;
  91. TPersonTypeimClientsArray = Array of TImClient;
  92. TPersonTypetaglinesArray = Array of TTagline;
  93. TPersonTypebiographiesArray = Array of TBiography;
  94. TPersonTypeurlsArray = Array of TUrl;
  95. TPersonTypeorganizationsArray = Array of TOrganization;
  96. TPersonTypeoccupationsArray = Array of TOccupation;
  97. TPersonTypeinterestsArray = Array of TInterest;
  98. TPersonTypeskillsArray = Array of TSkill;
  99. TPersonTypebraggingRightsArray = Array of TBraggingRights;
  100. TPersonTyperelationsArray = Array of TRelation;
  101. TPersonTyperelationshipInterestsArray = Array of TRelationshipInterest;
  102. TPersonTyperelationshipStatusesArray = Array of TRelationshipStatus;
  103. TPersonTypemembershipsArray = Array of TMembership;
  104. TPersonMetadataTypesourcesArray = Array of TSource;
  105. TGetPeopleResponseTyperesponsesArray = Array of TPersonResponse;
  106. TListConnectionsResponseTypeconnectionsArray = Array of TPerson;
  107. { --------------------------------------------------------------------
  108. TPerson
  109. --------------------------------------------------------------------}
  110. TPerson = Class(TGoogleBaseObject)
  111. Private
  112. FresourceName : String;
  113. Fetag : String;
  114. Fmetadata : TPersonMetadata;
  115. Flocales : TPersonTypelocalesArray;
  116. Fnames : TPersonTypenamesArray;
  117. Fnicknames : TPersonTypenicknamesArray;
  118. FcoverPhotos : TPersonTypecoverPhotosArray;
  119. Fphotos : TPersonTypephotosArray;
  120. Fgenders : TPersonTypegendersArray;
  121. FageRange : String;
  122. Fbirthdays : TPersonTypebirthdaysArray;
  123. Fevents : TPersonTypeeventsArray;
  124. Faddresses : TPersonTypeaddressesArray;
  125. Fresidences : TPersonTyperesidencesArray;
  126. FemailAddresses : TPersonTypeemailAddressesArray;
  127. FphoneNumbers : TPersonTypephoneNumbersArray;
  128. FimClients : TPersonTypeimClientsArray;
  129. Ftaglines : TPersonTypetaglinesArray;
  130. Fbiographies : TPersonTypebiographiesArray;
  131. Furls : TPersonTypeurlsArray;
  132. Forganizations : TPersonTypeorganizationsArray;
  133. Foccupations : TPersonTypeoccupationsArray;
  134. Finterests : TPersonTypeinterestsArray;
  135. Fskills : TPersonTypeskillsArray;
  136. FbraggingRights : TPersonTypebraggingRightsArray;
  137. Frelations : TPersonTyperelationsArray;
  138. FrelationshipInterests : TPersonTyperelationshipInterestsArray;
  139. FrelationshipStatuses : TPersonTyperelationshipStatusesArray;
  140. Fmemberships : TPersonTypemembershipsArray;
  141. Protected
  142. //Property setters
  143. Procedure SetresourceName(AIndex : Integer; const AValue : String); virtual;
  144. Procedure Setetag(AIndex : Integer; const AValue : String); virtual;
  145. Procedure Setmetadata(AIndex : Integer; const AValue : TPersonMetadata); virtual;
  146. Procedure Setlocales(AIndex : Integer; const AValue : TPersonTypelocalesArray); virtual;
  147. Procedure Setnames(AIndex : Integer; const AValue : TPersonTypenamesArray); virtual;
  148. Procedure Setnicknames(AIndex : Integer; const AValue : TPersonTypenicknamesArray); virtual;
  149. Procedure SetcoverPhotos(AIndex : Integer; const AValue : TPersonTypecoverPhotosArray); virtual;
  150. Procedure Setphotos(AIndex : Integer; const AValue : TPersonTypephotosArray); virtual;
  151. Procedure Setgenders(AIndex : Integer; const AValue : TPersonTypegendersArray); virtual;
  152. Procedure SetageRange(AIndex : Integer; const AValue : String); virtual;
  153. Procedure Setbirthdays(AIndex : Integer; const AValue : TPersonTypebirthdaysArray); virtual;
  154. Procedure Setevents(AIndex : Integer; const AValue : TPersonTypeeventsArray); virtual;
  155. Procedure Setaddresses(AIndex : Integer; const AValue : TPersonTypeaddressesArray); virtual;
  156. Procedure Setresidences(AIndex : Integer; const AValue : TPersonTyperesidencesArray); virtual;
  157. Procedure SetemailAddresses(AIndex : Integer; const AValue : TPersonTypeemailAddressesArray); virtual;
  158. Procedure SetphoneNumbers(AIndex : Integer; const AValue : TPersonTypephoneNumbersArray); virtual;
  159. Procedure SetimClients(AIndex : Integer; const AValue : TPersonTypeimClientsArray); virtual;
  160. Procedure Settaglines(AIndex : Integer; const AValue : TPersonTypetaglinesArray); virtual;
  161. Procedure Setbiographies(AIndex : Integer; const AValue : TPersonTypebiographiesArray); virtual;
  162. Procedure Seturls(AIndex : Integer; const AValue : TPersonTypeurlsArray); virtual;
  163. Procedure Setorganizations(AIndex : Integer; const AValue : TPersonTypeorganizationsArray); virtual;
  164. Procedure Setoccupations(AIndex : Integer; const AValue : TPersonTypeoccupationsArray); virtual;
  165. Procedure Setinterests(AIndex : Integer; const AValue : TPersonTypeinterestsArray); virtual;
  166. Procedure Setskills(AIndex : Integer; const AValue : TPersonTypeskillsArray); virtual;
  167. Procedure SetbraggingRights(AIndex : Integer; const AValue : TPersonTypebraggingRightsArray); virtual;
  168. Procedure Setrelations(AIndex : Integer; const AValue : TPersonTyperelationsArray); virtual;
  169. Procedure SetrelationshipInterests(AIndex : Integer; const AValue : TPersonTyperelationshipInterestsArray); virtual;
  170. Procedure SetrelationshipStatuses(AIndex : Integer; const AValue : TPersonTyperelationshipStatusesArray); virtual;
  171. Procedure Setmemberships(AIndex : Integer; const AValue : TPersonTypemembershipsArray); virtual;
  172. //2.6.4. bug workaround
  173. {$IFDEF VER2_6}
  174. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  175. {$ENDIF VER2_6}
  176. Public
  177. Published
  178. Property resourceName : String Index 0 Read FresourceName Write SetresourceName;
  179. Property etag : String Index 8 Read Fetag Write Setetag;
  180. Property metadata : TPersonMetadata Index 16 Read Fmetadata Write Setmetadata;
  181. Property locales : TPersonTypelocalesArray Index 24 Read Flocales Write Setlocales;
  182. Property names : TPersonTypenamesArray Index 32 Read Fnames Write Setnames;
  183. Property nicknames : TPersonTypenicknamesArray Index 40 Read Fnicknames Write Setnicknames;
  184. Property coverPhotos : TPersonTypecoverPhotosArray Index 48 Read FcoverPhotos Write SetcoverPhotos;
  185. Property photos : TPersonTypephotosArray Index 56 Read Fphotos Write Setphotos;
  186. Property genders : TPersonTypegendersArray Index 64 Read Fgenders Write Setgenders;
  187. Property ageRange : String Index 72 Read FageRange Write SetageRange;
  188. Property birthdays : TPersonTypebirthdaysArray Index 80 Read Fbirthdays Write Setbirthdays;
  189. Property events : TPersonTypeeventsArray Index 88 Read Fevents Write Setevents;
  190. Property addresses : TPersonTypeaddressesArray Index 96 Read Faddresses Write Setaddresses;
  191. Property residences : TPersonTyperesidencesArray Index 104 Read Fresidences Write Setresidences;
  192. Property emailAddresses : TPersonTypeemailAddressesArray Index 112 Read FemailAddresses Write SetemailAddresses;
  193. Property phoneNumbers : TPersonTypephoneNumbersArray Index 120 Read FphoneNumbers Write SetphoneNumbers;
  194. Property imClients : TPersonTypeimClientsArray Index 128 Read FimClients Write SetimClients;
  195. Property taglines : TPersonTypetaglinesArray Index 136 Read Ftaglines Write Settaglines;
  196. Property biographies : TPersonTypebiographiesArray Index 144 Read Fbiographies Write Setbiographies;
  197. Property urls : TPersonTypeurlsArray Index 152 Read Furls Write Seturls;
  198. Property organizations : TPersonTypeorganizationsArray Index 160 Read Forganizations Write Setorganizations;
  199. Property occupations : TPersonTypeoccupationsArray Index 168 Read Foccupations Write Setoccupations;
  200. Property interests : TPersonTypeinterestsArray Index 176 Read Finterests Write Setinterests;
  201. Property skills : TPersonTypeskillsArray Index 184 Read Fskills Write Setskills;
  202. Property braggingRights : TPersonTypebraggingRightsArray Index 192 Read FbraggingRights Write SetbraggingRights;
  203. Property relations : TPersonTyperelationsArray Index 200 Read Frelations Write Setrelations;
  204. Property relationshipInterests : TPersonTyperelationshipInterestsArray Index 208 Read FrelationshipInterests Write SetrelationshipInterests;
  205. Property relationshipStatuses : TPersonTyperelationshipStatusesArray Index 216 Read FrelationshipStatuses Write SetrelationshipStatuses;
  206. Property memberships : TPersonTypemembershipsArray Index 224 Read Fmemberships Write Setmemberships;
  207. end;
  208. TPersonClass = Class of TPerson;
  209. { --------------------------------------------------------------------
  210. TPersonMetadata
  211. --------------------------------------------------------------------}
  212. TPersonMetadata = Class(TGoogleBaseObject)
  213. Private
  214. Fsources : TPersonMetadataTypesourcesArray;
  215. FpreviousResourceNames : TStringArray;
  216. Fdeleted : boolean;
  217. FobjectType : String;
  218. Protected
  219. //Property setters
  220. Procedure Setsources(AIndex : Integer; const AValue : TPersonMetadataTypesourcesArray); virtual;
  221. Procedure SetpreviousResourceNames(AIndex : Integer; const AValue : TStringArray); virtual;
  222. Procedure Setdeleted(AIndex : Integer; const AValue : boolean); virtual;
  223. Procedure SetobjectType(AIndex : Integer; const AValue : String); virtual;
  224. //2.6.4. bug workaround
  225. {$IFDEF VER2_6}
  226. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  227. {$ENDIF VER2_6}
  228. Public
  229. Published
  230. Property sources : TPersonMetadataTypesourcesArray Index 0 Read Fsources Write Setsources;
  231. Property previousResourceNames : TStringArray Index 8 Read FpreviousResourceNames Write SetpreviousResourceNames;
  232. Property deleted : boolean Index 16 Read Fdeleted Write Setdeleted;
  233. Property objectType : String Index 24 Read FobjectType Write SetobjectType;
  234. end;
  235. TPersonMetadataClass = Class of TPersonMetadata;
  236. { --------------------------------------------------------------------
  237. TSource
  238. --------------------------------------------------------------------}
  239. TSource = Class(TGoogleBaseObject)
  240. Private
  241. F_type : String;
  242. Fid : String;
  243. Protected
  244. Class Function ExportPropertyName(Const AName : String) : string; override;
  245. //Property setters
  246. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  247. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  248. Public
  249. Published
  250. Property _type : String Index 0 Read F_type Write Set_type;
  251. Property id : String Index 8 Read Fid Write Setid;
  252. end;
  253. TSourceClass = Class of TSource;
  254. { --------------------------------------------------------------------
  255. TLocale
  256. --------------------------------------------------------------------}
  257. TLocale = Class(TGoogleBaseObject)
  258. Private
  259. Fmetadata : TFieldMetadata;
  260. Fvalue : String;
  261. Protected
  262. //Property setters
  263. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  264. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  265. Public
  266. Published
  267. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  268. Property value : String Index 8 Read Fvalue Write Setvalue;
  269. end;
  270. TLocaleClass = Class of TLocale;
  271. { --------------------------------------------------------------------
  272. TFieldMetadata
  273. --------------------------------------------------------------------}
  274. TFieldMetadata = Class(TGoogleBaseObject)
  275. Private
  276. Fprimary : boolean;
  277. Fverified : boolean;
  278. Fsource : TSource;
  279. Protected
  280. //Property setters
  281. Procedure Setprimary(AIndex : Integer; const AValue : boolean); virtual;
  282. Procedure Setverified(AIndex : Integer; const AValue : boolean); virtual;
  283. Procedure Setsource(AIndex : Integer; const AValue : TSource); virtual;
  284. Public
  285. Published
  286. Property primary : boolean Index 0 Read Fprimary Write Setprimary;
  287. Property verified : boolean Index 8 Read Fverified Write Setverified;
  288. Property source : TSource Index 16 Read Fsource Write Setsource;
  289. end;
  290. TFieldMetadataClass = Class of TFieldMetadata;
  291. { --------------------------------------------------------------------
  292. TName
  293. --------------------------------------------------------------------}
  294. TName = Class(TGoogleBaseObject)
  295. Private
  296. Fmetadata : TFieldMetadata;
  297. FdisplayName : String;
  298. FfamilyName : String;
  299. FgivenName : String;
  300. FmiddleName : String;
  301. FhonorificPrefix : String;
  302. FhonorificSuffix : String;
  303. FphoneticFamilyName : String;
  304. FphoneticGivenName : String;
  305. FphoneticMiddleName : String;
  306. FphoneticHonorificPrefix : String;
  307. FphoneticHonorificSuffix : String;
  308. Protected
  309. //Property setters
  310. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  311. Procedure SetdisplayName(AIndex : Integer; const AValue : String); virtual;
  312. Procedure SetfamilyName(AIndex : Integer; const AValue : String); virtual;
  313. Procedure SetgivenName(AIndex : Integer; const AValue : String); virtual;
  314. Procedure SetmiddleName(AIndex : Integer; const AValue : String); virtual;
  315. Procedure SethonorificPrefix(AIndex : Integer; const AValue : String); virtual;
  316. Procedure SethonorificSuffix(AIndex : Integer; const AValue : String); virtual;
  317. Procedure SetphoneticFamilyName(AIndex : Integer; const AValue : String); virtual;
  318. Procedure SetphoneticGivenName(AIndex : Integer; const AValue : String); virtual;
  319. Procedure SetphoneticMiddleName(AIndex : Integer; const AValue : String); virtual;
  320. Procedure SetphoneticHonorificPrefix(AIndex : Integer; const AValue : String); virtual;
  321. Procedure SetphoneticHonorificSuffix(AIndex : Integer; const AValue : String); virtual;
  322. Public
  323. Published
  324. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  325. Property displayName : String Index 8 Read FdisplayName Write SetdisplayName;
  326. Property familyName : String Index 16 Read FfamilyName Write SetfamilyName;
  327. Property givenName : String Index 24 Read FgivenName Write SetgivenName;
  328. Property middleName : String Index 32 Read FmiddleName Write SetmiddleName;
  329. Property honorificPrefix : String Index 40 Read FhonorificPrefix Write SethonorificPrefix;
  330. Property honorificSuffix : String Index 48 Read FhonorificSuffix Write SethonorificSuffix;
  331. Property phoneticFamilyName : String Index 56 Read FphoneticFamilyName Write SetphoneticFamilyName;
  332. Property phoneticGivenName : String Index 64 Read FphoneticGivenName Write SetphoneticGivenName;
  333. Property phoneticMiddleName : String Index 72 Read FphoneticMiddleName Write SetphoneticMiddleName;
  334. Property phoneticHonorificPrefix : String Index 80 Read FphoneticHonorificPrefix Write SetphoneticHonorificPrefix;
  335. Property phoneticHonorificSuffix : String Index 88 Read FphoneticHonorificSuffix Write SetphoneticHonorificSuffix;
  336. end;
  337. TNameClass = Class of TName;
  338. { --------------------------------------------------------------------
  339. TNickname
  340. --------------------------------------------------------------------}
  341. TNickname = Class(TGoogleBaseObject)
  342. Private
  343. Fmetadata : TFieldMetadata;
  344. Fvalue : String;
  345. F_type : String;
  346. Protected
  347. Class Function ExportPropertyName(Const AName : String) : string; override;
  348. //Property setters
  349. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  350. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  351. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  352. Public
  353. Published
  354. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  355. Property value : String Index 8 Read Fvalue Write Setvalue;
  356. Property _type : String Index 16 Read F_type Write Set_type;
  357. end;
  358. TNicknameClass = Class of TNickname;
  359. { --------------------------------------------------------------------
  360. TCoverPhoto
  361. --------------------------------------------------------------------}
  362. TCoverPhoto = Class(TGoogleBaseObject)
  363. Private
  364. Fmetadata : TFieldMetadata;
  365. Furl : String;
  366. Fdefault : boolean;
  367. Protected
  368. //Property setters
  369. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  370. Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
  371. Procedure Setdefault(AIndex : Integer; const AValue : boolean); virtual;
  372. Public
  373. Published
  374. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  375. Property url : String Index 8 Read Furl Write Seturl;
  376. Property default : boolean Index 16 Read Fdefault Write Setdefault;
  377. end;
  378. TCoverPhotoClass = Class of TCoverPhoto;
  379. { --------------------------------------------------------------------
  380. TPhoto
  381. --------------------------------------------------------------------}
  382. TPhoto = Class(TGoogleBaseObject)
  383. Private
  384. Fmetadata : TFieldMetadata;
  385. Furl : String;
  386. Protected
  387. //Property setters
  388. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  389. Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
  390. Public
  391. Published
  392. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  393. Property url : String Index 8 Read Furl Write Seturl;
  394. end;
  395. TPhotoClass = Class of TPhoto;
  396. { --------------------------------------------------------------------
  397. TGender
  398. --------------------------------------------------------------------}
  399. TGender = Class(TGoogleBaseObject)
  400. Private
  401. Fmetadata : TFieldMetadata;
  402. Fvalue : String;
  403. FformattedValue : String;
  404. Protected
  405. //Property setters
  406. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  407. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  408. Procedure SetformattedValue(AIndex : Integer; const AValue : String); virtual;
  409. Public
  410. Published
  411. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  412. Property value : String Index 8 Read Fvalue Write Setvalue;
  413. Property formattedValue : String Index 16 Read FformattedValue Write SetformattedValue;
  414. end;
  415. TGenderClass = Class of TGender;
  416. { --------------------------------------------------------------------
  417. TBirthday
  418. --------------------------------------------------------------------}
  419. TBirthday = Class(TGoogleBaseObject)
  420. Private
  421. Fmetadata : TFieldMetadata;
  422. Fdate : TDate;
  423. Ftext : String;
  424. Protected
  425. //Property setters
  426. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  427. Procedure Setdate(AIndex : Integer; const AValue : TDate); virtual;
  428. Procedure Settext(AIndex : Integer; const AValue : String); virtual;
  429. Public
  430. Published
  431. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  432. Property date : TDate Index 8 Read Fdate Write Setdate;
  433. Property text : String Index 16 Read Ftext Write Settext;
  434. end;
  435. TBirthdayClass = Class of TBirthday;
  436. { --------------------------------------------------------------------
  437. TDate
  438. --------------------------------------------------------------------}
  439. TDate = Class(TGoogleBaseObject)
  440. Private
  441. Fyear : integer;
  442. Fmonth : integer;
  443. Fday : integer;
  444. Protected
  445. //Property setters
  446. Procedure Setyear(AIndex : Integer; const AValue : integer); virtual;
  447. Procedure Setmonth(AIndex : Integer; const AValue : integer); virtual;
  448. Procedure Setday(AIndex : Integer; const AValue : integer); virtual;
  449. Public
  450. Published
  451. Property year : integer Index 0 Read Fyear Write Setyear;
  452. Property month : integer Index 8 Read Fmonth Write Setmonth;
  453. Property day : integer Index 16 Read Fday Write Setday;
  454. end;
  455. TDateClass = Class of TDate;
  456. { --------------------------------------------------------------------
  457. TEvent
  458. --------------------------------------------------------------------}
  459. TEvent = Class(TGoogleBaseObject)
  460. Private
  461. Fmetadata : TFieldMetadata;
  462. Fdate : TDate;
  463. F_type : String;
  464. FformattedType : String;
  465. Protected
  466. Class Function ExportPropertyName(Const AName : String) : string; override;
  467. //Property setters
  468. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  469. Procedure Setdate(AIndex : Integer; const AValue : TDate); virtual;
  470. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  471. Procedure SetformattedType(AIndex : Integer; const AValue : String); virtual;
  472. Public
  473. Published
  474. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  475. Property date : TDate Index 8 Read Fdate Write Setdate;
  476. Property _type : String Index 16 Read F_type Write Set_type;
  477. Property formattedType : String Index 24 Read FformattedType Write SetformattedType;
  478. end;
  479. TEventClass = Class of TEvent;
  480. { --------------------------------------------------------------------
  481. TAddress
  482. --------------------------------------------------------------------}
  483. TAddress = Class(TGoogleBaseObject)
  484. Private
  485. Fmetadata : TFieldMetadata;
  486. FformattedValue : String;
  487. F_type : String;
  488. FformattedType : String;
  489. FpoBox : String;
  490. FstreetAddress : String;
  491. FextendedAddress : String;
  492. Fcity : String;
  493. Fregion : String;
  494. FpostalCode : String;
  495. Fcountry : String;
  496. FcountryCode : String;
  497. Protected
  498. Class Function ExportPropertyName(Const AName : String) : string; override;
  499. //Property setters
  500. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  501. Procedure SetformattedValue(AIndex : Integer; const AValue : String); virtual;
  502. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  503. Procedure SetformattedType(AIndex : Integer; const AValue : String); virtual;
  504. Procedure SetpoBox(AIndex : Integer; const AValue : String); virtual;
  505. Procedure SetstreetAddress(AIndex : Integer; const AValue : String); virtual;
  506. Procedure SetextendedAddress(AIndex : Integer; const AValue : String); virtual;
  507. Procedure Setcity(AIndex : Integer; const AValue : String); virtual;
  508. Procedure Setregion(AIndex : Integer; const AValue : String); virtual;
  509. Procedure SetpostalCode(AIndex : Integer; const AValue : String); virtual;
  510. Procedure Setcountry(AIndex : Integer; const AValue : String); virtual;
  511. Procedure SetcountryCode(AIndex : Integer; const AValue : String); virtual;
  512. Public
  513. Published
  514. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  515. Property formattedValue : String Index 8 Read FformattedValue Write SetformattedValue;
  516. Property _type : String Index 16 Read F_type Write Set_type;
  517. Property formattedType : String Index 24 Read FformattedType Write SetformattedType;
  518. Property poBox : String Index 32 Read FpoBox Write SetpoBox;
  519. Property streetAddress : String Index 40 Read FstreetAddress Write SetstreetAddress;
  520. Property extendedAddress : String Index 48 Read FextendedAddress Write SetextendedAddress;
  521. Property city : String Index 56 Read Fcity Write Setcity;
  522. Property region : String Index 64 Read Fregion Write Setregion;
  523. Property postalCode : String Index 72 Read FpostalCode Write SetpostalCode;
  524. Property country : String Index 80 Read Fcountry Write Setcountry;
  525. Property countryCode : String Index 88 Read FcountryCode Write SetcountryCode;
  526. end;
  527. TAddressClass = Class of TAddress;
  528. { --------------------------------------------------------------------
  529. TResidence
  530. --------------------------------------------------------------------}
  531. TResidence = Class(TGoogleBaseObject)
  532. Private
  533. Fmetadata : TFieldMetadata;
  534. Fvalue : String;
  535. Fcurrent : boolean;
  536. Protected
  537. //Property setters
  538. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  539. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  540. Procedure Setcurrent(AIndex : Integer; const AValue : boolean); virtual;
  541. Public
  542. Published
  543. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  544. Property value : String Index 8 Read Fvalue Write Setvalue;
  545. Property current : boolean Index 16 Read Fcurrent Write Setcurrent;
  546. end;
  547. TResidenceClass = Class of TResidence;
  548. { --------------------------------------------------------------------
  549. TEmailAddress
  550. --------------------------------------------------------------------}
  551. TEmailAddress = Class(TGoogleBaseObject)
  552. Private
  553. Fmetadata : TFieldMetadata;
  554. Fvalue : String;
  555. F_type : String;
  556. FformattedType : String;
  557. Protected
  558. Class Function ExportPropertyName(Const AName : String) : string; override;
  559. //Property setters
  560. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  561. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  562. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  563. Procedure SetformattedType(AIndex : Integer; const AValue : String); virtual;
  564. Public
  565. Published
  566. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  567. Property value : String Index 8 Read Fvalue Write Setvalue;
  568. Property _type : String Index 16 Read F_type Write Set_type;
  569. Property formattedType : String Index 24 Read FformattedType Write SetformattedType;
  570. end;
  571. TEmailAddressClass = Class of TEmailAddress;
  572. { --------------------------------------------------------------------
  573. TPhoneNumber
  574. --------------------------------------------------------------------}
  575. TPhoneNumber = Class(TGoogleBaseObject)
  576. Private
  577. Fmetadata : TFieldMetadata;
  578. Fvalue : String;
  579. FcanonicalForm : String;
  580. F_type : String;
  581. FformattedType : String;
  582. Protected
  583. Class Function ExportPropertyName(Const AName : String) : string; override;
  584. //Property setters
  585. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  586. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  587. Procedure SetcanonicalForm(AIndex : Integer; const AValue : String); virtual;
  588. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  589. Procedure SetformattedType(AIndex : Integer; const AValue : String); virtual;
  590. Public
  591. Published
  592. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  593. Property value : String Index 8 Read Fvalue Write Setvalue;
  594. Property canonicalForm : String Index 16 Read FcanonicalForm Write SetcanonicalForm;
  595. Property _type : String Index 24 Read F_type Write Set_type;
  596. Property formattedType : String Index 32 Read FformattedType Write SetformattedType;
  597. end;
  598. TPhoneNumberClass = Class of TPhoneNumber;
  599. { --------------------------------------------------------------------
  600. TImClient
  601. --------------------------------------------------------------------}
  602. TImClient = Class(TGoogleBaseObject)
  603. Private
  604. Fmetadata : TFieldMetadata;
  605. Fusername : String;
  606. F_type : String;
  607. FformattedType : String;
  608. Fprotocol : String;
  609. FformattedProtocol : String;
  610. Protected
  611. Class Function ExportPropertyName(Const AName : String) : string; override;
  612. //Property setters
  613. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  614. Procedure Setusername(AIndex : Integer; const AValue : String); virtual;
  615. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  616. Procedure SetformattedType(AIndex : Integer; const AValue : String); virtual;
  617. Procedure Setprotocol(AIndex : Integer; const AValue : String); virtual;
  618. Procedure SetformattedProtocol(AIndex : Integer; const AValue : String); virtual;
  619. Public
  620. Published
  621. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  622. Property username : String Index 8 Read Fusername Write Setusername;
  623. Property _type : String Index 16 Read F_type Write Set_type;
  624. Property formattedType : String Index 24 Read FformattedType Write SetformattedType;
  625. Property protocol : String Index 32 Read Fprotocol Write Setprotocol;
  626. Property formattedProtocol : String Index 40 Read FformattedProtocol Write SetformattedProtocol;
  627. end;
  628. TImClientClass = Class of TImClient;
  629. { --------------------------------------------------------------------
  630. TTagline
  631. --------------------------------------------------------------------}
  632. TTagline = Class(TGoogleBaseObject)
  633. Private
  634. Fmetadata : TFieldMetadata;
  635. Fvalue : String;
  636. Protected
  637. //Property setters
  638. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  639. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  640. Public
  641. Published
  642. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  643. Property value : String Index 8 Read Fvalue Write Setvalue;
  644. end;
  645. TTaglineClass = Class of TTagline;
  646. { --------------------------------------------------------------------
  647. TBiography
  648. --------------------------------------------------------------------}
  649. TBiography = Class(TGoogleBaseObject)
  650. Private
  651. Fmetadata : TFieldMetadata;
  652. Fvalue : String;
  653. Protected
  654. //Property setters
  655. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  656. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  657. Public
  658. Published
  659. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  660. Property value : String Index 8 Read Fvalue Write Setvalue;
  661. end;
  662. TBiographyClass = Class of TBiography;
  663. { --------------------------------------------------------------------
  664. TUrl
  665. --------------------------------------------------------------------}
  666. TUrl = Class(TGoogleBaseObject)
  667. Private
  668. Fmetadata : TFieldMetadata;
  669. Fvalue : String;
  670. F_type : String;
  671. FformattedType : String;
  672. Protected
  673. Class Function ExportPropertyName(Const AName : String) : string; override;
  674. //Property setters
  675. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  676. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  677. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  678. Procedure SetformattedType(AIndex : Integer; const AValue : String); virtual;
  679. Public
  680. Published
  681. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  682. Property value : String Index 8 Read Fvalue Write Setvalue;
  683. Property _type : String Index 16 Read F_type Write Set_type;
  684. Property formattedType : String Index 24 Read FformattedType Write SetformattedType;
  685. end;
  686. TUrlClass = Class of TUrl;
  687. { --------------------------------------------------------------------
  688. TOrganization
  689. --------------------------------------------------------------------}
  690. TOrganization = Class(TGoogleBaseObject)
  691. Private
  692. Fmetadata : TFieldMetadata;
  693. F_type : String;
  694. FformattedType : String;
  695. FstartDate : TDate;
  696. FendDate : TDate;
  697. Fcurrent : boolean;
  698. Fname : String;
  699. FphoneticName : String;
  700. Fdepartment : String;
  701. Ftitle : String;
  702. FjobDescription : String;
  703. Fsymbol : String;
  704. Fdomain : String;
  705. Flocation : String;
  706. Protected
  707. Class Function ExportPropertyName(Const AName : String) : string; override;
  708. //Property setters
  709. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  710. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  711. Procedure SetformattedType(AIndex : Integer; const AValue : String); virtual;
  712. Procedure SetstartDate(AIndex : Integer; const AValue : TDate); virtual;
  713. Procedure SetendDate(AIndex : Integer; const AValue : TDate); virtual;
  714. Procedure Setcurrent(AIndex : Integer; const AValue : boolean); virtual;
  715. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  716. Procedure SetphoneticName(AIndex : Integer; const AValue : String); virtual;
  717. Procedure Setdepartment(AIndex : Integer; const AValue : String); virtual;
  718. Procedure Settitle(AIndex : Integer; const AValue : String); virtual;
  719. Procedure SetjobDescription(AIndex : Integer; const AValue : String); virtual;
  720. Procedure Setsymbol(AIndex : Integer; const AValue : String); virtual;
  721. Procedure Setdomain(AIndex : Integer; const AValue : String); virtual;
  722. Procedure Setlocation(AIndex : Integer; const AValue : String); virtual;
  723. Public
  724. Published
  725. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  726. Property _type : String Index 8 Read F_type Write Set_type;
  727. Property formattedType : String Index 16 Read FformattedType Write SetformattedType;
  728. Property startDate : TDate Index 24 Read FstartDate Write SetstartDate;
  729. Property endDate : TDate Index 32 Read FendDate Write SetendDate;
  730. Property current : boolean Index 40 Read Fcurrent Write Setcurrent;
  731. Property name : String Index 48 Read Fname Write Setname;
  732. Property phoneticName : String Index 56 Read FphoneticName Write SetphoneticName;
  733. Property department : String Index 64 Read Fdepartment Write Setdepartment;
  734. Property title : String Index 72 Read Ftitle Write Settitle;
  735. Property jobDescription : String Index 80 Read FjobDescription Write SetjobDescription;
  736. Property symbol : String Index 88 Read Fsymbol Write Setsymbol;
  737. Property domain : String Index 96 Read Fdomain Write Setdomain;
  738. Property location : String Index 104 Read Flocation Write Setlocation;
  739. end;
  740. TOrganizationClass = Class of TOrganization;
  741. { --------------------------------------------------------------------
  742. TOccupation
  743. --------------------------------------------------------------------}
  744. TOccupation = Class(TGoogleBaseObject)
  745. Private
  746. Fmetadata : TFieldMetadata;
  747. Fvalue : String;
  748. Protected
  749. //Property setters
  750. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  751. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  752. Public
  753. Published
  754. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  755. Property value : String Index 8 Read Fvalue Write Setvalue;
  756. end;
  757. TOccupationClass = Class of TOccupation;
  758. { --------------------------------------------------------------------
  759. TInterest
  760. --------------------------------------------------------------------}
  761. TInterest = Class(TGoogleBaseObject)
  762. Private
  763. Fmetadata : TFieldMetadata;
  764. Fvalue : String;
  765. Protected
  766. //Property setters
  767. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  768. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  769. Public
  770. Published
  771. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  772. Property value : String Index 8 Read Fvalue Write Setvalue;
  773. end;
  774. TInterestClass = Class of TInterest;
  775. { --------------------------------------------------------------------
  776. TSkill
  777. --------------------------------------------------------------------}
  778. TSkill = Class(TGoogleBaseObject)
  779. Private
  780. Fmetadata : TFieldMetadata;
  781. Fvalue : String;
  782. Protected
  783. //Property setters
  784. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  785. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  786. Public
  787. Published
  788. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  789. Property value : String Index 8 Read Fvalue Write Setvalue;
  790. end;
  791. TSkillClass = Class of TSkill;
  792. { --------------------------------------------------------------------
  793. TBraggingRights
  794. --------------------------------------------------------------------}
  795. TBraggingRights = Class(TGoogleBaseObject)
  796. Private
  797. Fmetadata : TFieldMetadata;
  798. Fvalue : String;
  799. Protected
  800. //Property setters
  801. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  802. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  803. Public
  804. Published
  805. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  806. Property value : String Index 8 Read Fvalue Write Setvalue;
  807. end;
  808. TBraggingRightsClass = Class of TBraggingRights;
  809. { --------------------------------------------------------------------
  810. TRelation
  811. --------------------------------------------------------------------}
  812. TRelation = Class(TGoogleBaseObject)
  813. Private
  814. Fmetadata : TFieldMetadata;
  815. Fperson : String;
  816. F_type : String;
  817. FformattedType : String;
  818. Protected
  819. Class Function ExportPropertyName(Const AName : String) : string; override;
  820. //Property setters
  821. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  822. Procedure Setperson(AIndex : Integer; const AValue : String); virtual;
  823. Procedure Set_type(AIndex : Integer; const AValue : String); virtual;
  824. Procedure SetformattedType(AIndex : Integer; const AValue : String); virtual;
  825. Public
  826. Published
  827. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  828. Property person : String Index 8 Read Fperson Write Setperson;
  829. Property _type : String Index 16 Read F_type Write Set_type;
  830. Property formattedType : String Index 24 Read FformattedType Write SetformattedType;
  831. end;
  832. TRelationClass = Class of TRelation;
  833. { --------------------------------------------------------------------
  834. TRelationshipInterest
  835. --------------------------------------------------------------------}
  836. TRelationshipInterest = Class(TGoogleBaseObject)
  837. Private
  838. Fmetadata : TFieldMetadata;
  839. Fvalue : String;
  840. FformattedValue : String;
  841. Protected
  842. //Property setters
  843. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  844. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  845. Procedure SetformattedValue(AIndex : Integer; const AValue : String); virtual;
  846. Public
  847. Published
  848. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  849. Property value : String Index 8 Read Fvalue Write Setvalue;
  850. Property formattedValue : String Index 16 Read FformattedValue Write SetformattedValue;
  851. end;
  852. TRelationshipInterestClass = Class of TRelationshipInterest;
  853. { --------------------------------------------------------------------
  854. TRelationshipStatus
  855. --------------------------------------------------------------------}
  856. TRelationshipStatus = Class(TGoogleBaseObject)
  857. Private
  858. Fmetadata : TFieldMetadata;
  859. Fvalue : String;
  860. FformattedValue : String;
  861. Protected
  862. //Property setters
  863. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  864. Procedure Setvalue(AIndex : Integer; const AValue : String); virtual;
  865. Procedure SetformattedValue(AIndex : Integer; const AValue : String); virtual;
  866. Public
  867. Published
  868. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  869. Property value : String Index 8 Read Fvalue Write Setvalue;
  870. Property formattedValue : String Index 16 Read FformattedValue Write SetformattedValue;
  871. end;
  872. TRelationshipStatusClass = Class of TRelationshipStatus;
  873. { --------------------------------------------------------------------
  874. TMembership
  875. --------------------------------------------------------------------}
  876. TMembership = Class(TGoogleBaseObject)
  877. Private
  878. Fmetadata : TFieldMetadata;
  879. FcontactGroupMembership : TContactGroupMembership;
  880. FdomainMembership : TDomainMembership;
  881. Protected
  882. //Property setters
  883. Procedure Setmetadata(AIndex : Integer; const AValue : TFieldMetadata); virtual;
  884. Procedure SetcontactGroupMembership(AIndex : Integer; const AValue : TContactGroupMembership); virtual;
  885. Procedure SetdomainMembership(AIndex : Integer; const AValue : TDomainMembership); virtual;
  886. Public
  887. Published
  888. Property metadata : TFieldMetadata Index 0 Read Fmetadata Write Setmetadata;
  889. Property contactGroupMembership : TContactGroupMembership Index 8 Read FcontactGroupMembership Write SetcontactGroupMembership;
  890. Property domainMembership : TDomainMembership Index 16 Read FdomainMembership Write SetdomainMembership;
  891. end;
  892. TMembershipClass = Class of TMembership;
  893. { --------------------------------------------------------------------
  894. TContactGroupMembership
  895. --------------------------------------------------------------------}
  896. TContactGroupMembership = Class(TGoogleBaseObject)
  897. Private
  898. FcontactGroupId : String;
  899. Protected
  900. //Property setters
  901. Procedure SetcontactGroupId(AIndex : Integer; const AValue : String); virtual;
  902. Public
  903. Published
  904. Property contactGroupId : String Index 0 Read FcontactGroupId Write SetcontactGroupId;
  905. end;
  906. TContactGroupMembershipClass = Class of TContactGroupMembership;
  907. { --------------------------------------------------------------------
  908. TDomainMembership
  909. --------------------------------------------------------------------}
  910. TDomainMembership = Class(TGoogleBaseObject)
  911. Private
  912. FinViewerDomain : boolean;
  913. Protected
  914. //Property setters
  915. Procedure SetinViewerDomain(AIndex : Integer; const AValue : boolean); virtual;
  916. Public
  917. Published
  918. Property inViewerDomain : boolean Index 0 Read FinViewerDomain Write SetinViewerDomain;
  919. end;
  920. TDomainMembershipClass = Class of TDomainMembership;
  921. { --------------------------------------------------------------------
  922. TGetPeopleResponse
  923. --------------------------------------------------------------------}
  924. TGetPeopleResponse = Class(TGoogleBaseObject)
  925. Private
  926. Fresponses : TGetPeopleResponseTyperesponsesArray;
  927. Protected
  928. //Property setters
  929. Procedure Setresponses(AIndex : Integer; const AValue : TGetPeopleResponseTyperesponsesArray); virtual;
  930. //2.6.4. bug workaround
  931. {$IFDEF VER2_6}
  932. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  933. {$ENDIF VER2_6}
  934. Public
  935. Published
  936. Property responses : TGetPeopleResponseTyperesponsesArray Index 0 Read Fresponses Write Setresponses;
  937. end;
  938. TGetPeopleResponseClass = Class of TGetPeopleResponse;
  939. { --------------------------------------------------------------------
  940. TPersonResponse
  941. --------------------------------------------------------------------}
  942. TPersonResponse = Class(TGoogleBaseObject)
  943. Private
  944. FhttpStatusCode : integer;
  945. Fperson : TPerson;
  946. FrequestedResourceName : String;
  947. Protected
  948. //Property setters
  949. Procedure SethttpStatusCode(AIndex : Integer; const AValue : integer); virtual;
  950. Procedure Setperson(AIndex : Integer; const AValue : TPerson); virtual;
  951. Procedure SetrequestedResourceName(AIndex : Integer; const AValue : String); virtual;
  952. Public
  953. Published
  954. Property httpStatusCode : integer Index 0 Read FhttpStatusCode Write SethttpStatusCode;
  955. Property person : TPerson Index 8 Read Fperson Write Setperson;
  956. Property requestedResourceName : String Index 16 Read FrequestedResourceName Write SetrequestedResourceName;
  957. end;
  958. TPersonResponseClass = Class of TPersonResponse;
  959. { --------------------------------------------------------------------
  960. TListConnectionsResponse
  961. --------------------------------------------------------------------}
  962. TListConnectionsResponse = Class(TGoogleBaseObject)
  963. Private
  964. Fconnections : TListConnectionsResponseTypeconnectionsArray;
  965. FnextPageToken : String;
  966. FnextSyncToken : String;
  967. Protected
  968. //Property setters
  969. Procedure Setconnections(AIndex : Integer; const AValue : TListConnectionsResponseTypeconnectionsArray); virtual;
  970. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  971. Procedure SetnextSyncToken(AIndex : Integer; const AValue : String); virtual;
  972. //2.6.4. bug workaround
  973. {$IFDEF VER2_6}
  974. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  975. {$ENDIF VER2_6}
  976. Public
  977. Published
  978. Property connections : TListConnectionsResponseTypeconnectionsArray Index 0 Read Fconnections Write Setconnections;
  979. Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
  980. Property nextSyncToken : String Index 16 Read FnextSyncToken Write SetnextSyncToken;
  981. end;
  982. TListConnectionsResponseClass = Class of TListConnectionsResponse;
  983. { --------------------------------------------------------------------
  984. TPeopleConnectionsResource
  985. --------------------------------------------------------------------}
  986. //Optional query Options for TPeopleConnectionsResource, method List
  987. TPeopleConnectionsListOptions = Record
  988. pageToken : String;
  989. pageSize : integer;
  990. sortOrder : String;
  991. syncToken : String;
  992. requestMaskincludeField : String;
  993. end;
  994. TPeopleConnectionsResource = Class(TGoogleResource)
  995. Public
  996. Class Function ResourceName : String; override;
  997. Class Function DefaultAPI : TGoogleAPIClass; override;
  998. Function List(_resourceName: string; AQuery : string = '') : TListConnectionsResponse;
  999. Function List(_resourceName: string; AQuery : TPeopleConnectionslistOptions) : TListConnectionsResponse;
  1000. end;
  1001. { --------------------------------------------------------------------
  1002. TPeopleResource
  1003. --------------------------------------------------------------------}
  1004. //Optional query Options for TPeopleResource, method Get
  1005. TPeopleGetOptions = Record
  1006. requestMaskincludeField : String;
  1007. end;
  1008. //Optional query Options for TPeopleResource, method GetBatchGet
  1009. TPeopleGetBatchGetOptions = Record
  1010. resourceNames : String;
  1011. requestMaskincludeField : String;
  1012. end;
  1013. TPeopleResource = Class(TGoogleResource)
  1014. Private
  1015. FConnectionsInstance : TPeopleConnectionsResource;
  1016. Function GetConnectionsInstance : TPeopleConnectionsResource;virtual;
  1017. Public
  1018. Class Function ResourceName : String; override;
  1019. Class Function DefaultAPI : TGoogleAPIClass; override;
  1020. Function Get(_resourceName: string; AQuery : string = '') : TPerson;
  1021. Function Get(_resourceName: string; AQuery : TPeoplegetOptions) : TPerson;
  1022. Function GetBatchGet(AQuery : string = '') : TGetPeopleResponse;
  1023. Function GetBatchGet(AQuery : TPeoplegetBatchGetOptions) : TGetPeopleResponse;
  1024. Function CreateConnectionsResource(AOwner : TComponent) : TPeopleConnectionsResource;virtual;overload;
  1025. Function CreateConnectionsResource : TPeopleConnectionsResource;virtual;overload;
  1026. Property ConnectionsResource : TPeopleConnectionsResource Read GetConnectionsInstance;
  1027. end;
  1028. { --------------------------------------------------------------------
  1029. TPeopleAPI
  1030. --------------------------------------------------------------------}
  1031. TPeopleAPI = Class(TGoogleAPI)
  1032. Private
  1033. FPeopleConnectionsInstance : TPeopleConnectionsResource;
  1034. FPeopleInstance : TPeopleResource;
  1035. Function GetPeopleConnectionsInstance : TPeopleConnectionsResource;virtual;
  1036. Function GetPeopleInstance : TPeopleResource;virtual;
  1037. Public
  1038. //Override class functions with API info
  1039. Class Function APIName : String; override;
  1040. Class Function APIVersion : String; override;
  1041. Class Function APIRevision : String; override;
  1042. Class Function APIID : String; override;
  1043. Class Function APITitle : String; override;
  1044. Class Function APIDescription : String; override;
  1045. Class Function APIOwnerDomain : String; override;
  1046. Class Function APIOwnerName : String; override;
  1047. Class Function APIIcon16 : String; override;
  1048. Class Function APIIcon32 : String; override;
  1049. Class Function APIdocumentationLink : String; override;
  1050. Class Function APIrootUrl : string; override;
  1051. Class Function APIbasePath : string;override;
  1052. Class Function APIbaseURL : String;override;
  1053. Class Function APIProtocol : string;override;
  1054. Class Function APIservicePath : string;override;
  1055. Class Function APIbatchPath : String;override;
  1056. Class Function APIAuthScopes : TScopeInfoArray;override;
  1057. Class Function APINeedsAuth : Boolean;override;
  1058. Class Procedure RegisterAPIResources; override;
  1059. //Add create function for resources
  1060. Function CreatePeopleConnectionsResource(AOwner : TComponent) : TPeopleConnectionsResource;virtual;overload;
  1061. Function CreatePeopleConnectionsResource : TPeopleConnectionsResource;virtual;overload;
  1062. Function CreatePeopleResource(AOwner : TComponent) : TPeopleResource;virtual;overload;
  1063. Function CreatePeopleResource : TPeopleResource;virtual;overload;
  1064. //Add default on-demand instances for resources
  1065. Property PeopleConnectionsResource : TPeopleConnectionsResource Read GetPeopleConnectionsInstance;
  1066. Property PeopleResource : TPeopleResource Read GetPeopleInstance;
  1067. end;
  1068. implementation
  1069. { --------------------------------------------------------------------
  1070. TPerson
  1071. --------------------------------------------------------------------}
  1072. Procedure TPerson.SetresourceName(AIndex : Integer; const AValue : String);
  1073. begin
  1074. If (FresourceName=AValue) then exit;
  1075. FresourceName:=AValue;
  1076. MarkPropertyChanged(AIndex);
  1077. end;
  1078. Procedure TPerson.Setetag(AIndex : Integer; const AValue : String);
  1079. begin
  1080. If (Fetag=AValue) then exit;
  1081. Fetag:=AValue;
  1082. MarkPropertyChanged(AIndex);
  1083. end;
  1084. Procedure TPerson.Setmetadata(AIndex : Integer; const AValue : TPersonMetadata);
  1085. begin
  1086. If (Fmetadata=AValue) then exit;
  1087. Fmetadata:=AValue;
  1088. MarkPropertyChanged(AIndex);
  1089. end;
  1090. Procedure TPerson.Setlocales(AIndex : Integer; const AValue : TPersonTypelocalesArray);
  1091. begin
  1092. If (Flocales=AValue) then exit;
  1093. Flocales:=AValue;
  1094. MarkPropertyChanged(AIndex);
  1095. end;
  1096. Procedure TPerson.Setnames(AIndex : Integer; const AValue : TPersonTypenamesArray);
  1097. begin
  1098. If (Fnames=AValue) then exit;
  1099. Fnames:=AValue;
  1100. MarkPropertyChanged(AIndex);
  1101. end;
  1102. Procedure TPerson.Setnicknames(AIndex : Integer; const AValue : TPersonTypenicknamesArray);
  1103. begin
  1104. If (Fnicknames=AValue) then exit;
  1105. Fnicknames:=AValue;
  1106. MarkPropertyChanged(AIndex);
  1107. end;
  1108. Procedure TPerson.SetcoverPhotos(AIndex : Integer; const AValue : TPersonTypecoverPhotosArray);
  1109. begin
  1110. If (FcoverPhotos=AValue) then exit;
  1111. FcoverPhotos:=AValue;
  1112. MarkPropertyChanged(AIndex);
  1113. end;
  1114. Procedure TPerson.Setphotos(AIndex : Integer; const AValue : TPersonTypephotosArray);
  1115. begin
  1116. If (Fphotos=AValue) then exit;
  1117. Fphotos:=AValue;
  1118. MarkPropertyChanged(AIndex);
  1119. end;
  1120. Procedure TPerson.Setgenders(AIndex : Integer; const AValue : TPersonTypegendersArray);
  1121. begin
  1122. If (Fgenders=AValue) then exit;
  1123. Fgenders:=AValue;
  1124. MarkPropertyChanged(AIndex);
  1125. end;
  1126. Procedure TPerson.SetageRange(AIndex : Integer; const AValue : String);
  1127. begin
  1128. If (FageRange=AValue) then exit;
  1129. FageRange:=AValue;
  1130. MarkPropertyChanged(AIndex);
  1131. end;
  1132. Procedure TPerson.Setbirthdays(AIndex : Integer; const AValue : TPersonTypebirthdaysArray);
  1133. begin
  1134. If (Fbirthdays=AValue) then exit;
  1135. Fbirthdays:=AValue;
  1136. MarkPropertyChanged(AIndex);
  1137. end;
  1138. Procedure TPerson.Setevents(AIndex : Integer; const AValue : TPersonTypeeventsArray);
  1139. begin
  1140. If (Fevents=AValue) then exit;
  1141. Fevents:=AValue;
  1142. MarkPropertyChanged(AIndex);
  1143. end;
  1144. Procedure TPerson.Setaddresses(AIndex : Integer; const AValue : TPersonTypeaddressesArray);
  1145. begin
  1146. If (Faddresses=AValue) then exit;
  1147. Faddresses:=AValue;
  1148. MarkPropertyChanged(AIndex);
  1149. end;
  1150. Procedure TPerson.Setresidences(AIndex : Integer; const AValue : TPersonTyperesidencesArray);
  1151. begin
  1152. If (Fresidences=AValue) then exit;
  1153. Fresidences:=AValue;
  1154. MarkPropertyChanged(AIndex);
  1155. end;
  1156. Procedure TPerson.SetemailAddresses(AIndex : Integer; const AValue : TPersonTypeemailAddressesArray);
  1157. begin
  1158. If (FemailAddresses=AValue) then exit;
  1159. FemailAddresses:=AValue;
  1160. MarkPropertyChanged(AIndex);
  1161. end;
  1162. Procedure TPerson.SetphoneNumbers(AIndex : Integer; const AValue : TPersonTypephoneNumbersArray);
  1163. begin
  1164. If (FphoneNumbers=AValue) then exit;
  1165. FphoneNumbers:=AValue;
  1166. MarkPropertyChanged(AIndex);
  1167. end;
  1168. Procedure TPerson.SetimClients(AIndex : Integer; const AValue : TPersonTypeimClientsArray);
  1169. begin
  1170. If (FimClients=AValue) then exit;
  1171. FimClients:=AValue;
  1172. MarkPropertyChanged(AIndex);
  1173. end;
  1174. Procedure TPerson.Settaglines(AIndex : Integer; const AValue : TPersonTypetaglinesArray);
  1175. begin
  1176. If (Ftaglines=AValue) then exit;
  1177. Ftaglines:=AValue;
  1178. MarkPropertyChanged(AIndex);
  1179. end;
  1180. Procedure TPerson.Setbiographies(AIndex : Integer; const AValue : TPersonTypebiographiesArray);
  1181. begin
  1182. If (Fbiographies=AValue) then exit;
  1183. Fbiographies:=AValue;
  1184. MarkPropertyChanged(AIndex);
  1185. end;
  1186. Procedure TPerson.Seturls(AIndex : Integer; const AValue : TPersonTypeurlsArray);
  1187. begin
  1188. If (Furls=AValue) then exit;
  1189. Furls:=AValue;
  1190. MarkPropertyChanged(AIndex);
  1191. end;
  1192. Procedure TPerson.Setorganizations(AIndex : Integer; const AValue : TPersonTypeorganizationsArray);
  1193. begin
  1194. If (Forganizations=AValue) then exit;
  1195. Forganizations:=AValue;
  1196. MarkPropertyChanged(AIndex);
  1197. end;
  1198. Procedure TPerson.Setoccupations(AIndex : Integer; const AValue : TPersonTypeoccupationsArray);
  1199. begin
  1200. If (Foccupations=AValue) then exit;
  1201. Foccupations:=AValue;
  1202. MarkPropertyChanged(AIndex);
  1203. end;
  1204. Procedure TPerson.Setinterests(AIndex : Integer; const AValue : TPersonTypeinterestsArray);
  1205. begin
  1206. If (Finterests=AValue) then exit;
  1207. Finterests:=AValue;
  1208. MarkPropertyChanged(AIndex);
  1209. end;
  1210. Procedure TPerson.Setskills(AIndex : Integer; const AValue : TPersonTypeskillsArray);
  1211. begin
  1212. If (Fskills=AValue) then exit;
  1213. Fskills:=AValue;
  1214. MarkPropertyChanged(AIndex);
  1215. end;
  1216. Procedure TPerson.SetbraggingRights(AIndex : Integer; const AValue : TPersonTypebraggingRightsArray);
  1217. begin
  1218. If (FbraggingRights=AValue) then exit;
  1219. FbraggingRights:=AValue;
  1220. MarkPropertyChanged(AIndex);
  1221. end;
  1222. Procedure TPerson.Setrelations(AIndex : Integer; const AValue : TPersonTyperelationsArray);
  1223. begin
  1224. If (Frelations=AValue) then exit;
  1225. Frelations:=AValue;
  1226. MarkPropertyChanged(AIndex);
  1227. end;
  1228. Procedure TPerson.SetrelationshipInterests(AIndex : Integer; const AValue : TPersonTyperelationshipInterestsArray);
  1229. begin
  1230. If (FrelationshipInterests=AValue) then exit;
  1231. FrelationshipInterests:=AValue;
  1232. MarkPropertyChanged(AIndex);
  1233. end;
  1234. Procedure TPerson.SetrelationshipStatuses(AIndex : Integer; const AValue : TPersonTyperelationshipStatusesArray);
  1235. begin
  1236. If (FrelationshipStatuses=AValue) then exit;
  1237. FrelationshipStatuses:=AValue;
  1238. MarkPropertyChanged(AIndex);
  1239. end;
  1240. Procedure TPerson.Setmemberships(AIndex : Integer; const AValue : TPersonTypemembershipsArray);
  1241. begin
  1242. If (Fmemberships=AValue) then exit;
  1243. Fmemberships:=AValue;
  1244. MarkPropertyChanged(AIndex);
  1245. end;
  1246. //2.6.4. bug workaround
  1247. {$IFDEF VER2_6}
  1248. Procedure TPerson.SetArrayLength(Const AName : String; ALength : Longint);
  1249. begin
  1250. Case AName of
  1251. 'locales' : SetLength(Flocales,ALength);
  1252. 'names' : SetLength(Fnames,ALength);
  1253. 'nicknames' : SetLength(Fnicknames,ALength);
  1254. 'coverphotos' : SetLength(FcoverPhotos,ALength);
  1255. 'photos' : SetLength(Fphotos,ALength);
  1256. 'genders' : SetLength(Fgenders,ALength);
  1257. 'birthdays' : SetLength(Fbirthdays,ALength);
  1258. 'events' : SetLength(Fevents,ALength);
  1259. 'addresses' : SetLength(Faddresses,ALength);
  1260. 'residences' : SetLength(Fresidences,ALength);
  1261. 'emailaddresses' : SetLength(FemailAddresses,ALength);
  1262. 'phonenumbers' : SetLength(FphoneNumbers,ALength);
  1263. 'imclients' : SetLength(FimClients,ALength);
  1264. 'taglines' : SetLength(Ftaglines,ALength);
  1265. 'biographies' : SetLength(Fbiographies,ALength);
  1266. 'urls' : SetLength(Furls,ALength);
  1267. 'organizations' : SetLength(Forganizations,ALength);
  1268. 'occupations' : SetLength(Foccupations,ALength);
  1269. 'interests' : SetLength(Finterests,ALength);
  1270. 'skills' : SetLength(Fskills,ALength);
  1271. 'braggingrights' : SetLength(FbraggingRights,ALength);
  1272. 'relations' : SetLength(Frelations,ALength);
  1273. 'relationshipinterests' : SetLength(FrelationshipInterests,ALength);
  1274. 'relationshipstatuses' : SetLength(FrelationshipStatuses,ALength);
  1275. 'memberships' : SetLength(Fmemberships,ALength);
  1276. else
  1277. Inherited SetArrayLength(AName,ALength);
  1278. end;
  1279. end;
  1280. {$ENDIF VER2_6}
  1281. { --------------------------------------------------------------------
  1282. TPersonMetadata
  1283. --------------------------------------------------------------------}
  1284. Procedure TPersonMetadata.Setsources(AIndex : Integer; const AValue : TPersonMetadataTypesourcesArray);
  1285. begin
  1286. If (Fsources=AValue) then exit;
  1287. Fsources:=AValue;
  1288. MarkPropertyChanged(AIndex);
  1289. end;
  1290. Procedure TPersonMetadata.SetpreviousResourceNames(AIndex : Integer; const AValue : TStringArray);
  1291. begin
  1292. If (FpreviousResourceNames=AValue) then exit;
  1293. FpreviousResourceNames:=AValue;
  1294. MarkPropertyChanged(AIndex);
  1295. end;
  1296. Procedure TPersonMetadata.Setdeleted(AIndex : Integer; const AValue : boolean);
  1297. begin
  1298. If (Fdeleted=AValue) then exit;
  1299. Fdeleted:=AValue;
  1300. MarkPropertyChanged(AIndex);
  1301. end;
  1302. Procedure TPersonMetadata.SetobjectType(AIndex : Integer; const AValue : String);
  1303. begin
  1304. If (FobjectType=AValue) then exit;
  1305. FobjectType:=AValue;
  1306. MarkPropertyChanged(AIndex);
  1307. end;
  1308. //2.6.4. bug workaround
  1309. {$IFDEF VER2_6}
  1310. Procedure TPersonMetadata.SetArrayLength(Const AName : String; ALength : Longint);
  1311. begin
  1312. Case AName of
  1313. 'sources' : SetLength(Fsources,ALength);
  1314. 'previousresourcenames' : SetLength(FpreviousResourceNames,ALength);
  1315. else
  1316. Inherited SetArrayLength(AName,ALength);
  1317. end;
  1318. end;
  1319. {$ENDIF VER2_6}
  1320. { --------------------------------------------------------------------
  1321. TSource
  1322. --------------------------------------------------------------------}
  1323. Procedure TSource.Set_type(AIndex : Integer; const AValue : String);
  1324. begin
  1325. If (F_type=AValue) then exit;
  1326. F_type:=AValue;
  1327. MarkPropertyChanged(AIndex);
  1328. end;
  1329. Procedure TSource.Setid(AIndex : Integer; const AValue : String);
  1330. begin
  1331. If (Fid=AValue) then exit;
  1332. Fid:=AValue;
  1333. MarkPropertyChanged(AIndex);
  1334. end;
  1335. Class Function TSource.ExportPropertyName(Const AName : String) :String;
  1336. begin
  1337. Case AName of
  1338. '_type' : Result:='type';
  1339. else
  1340. Result:=Inherited ExportPropertyName(AName);
  1341. end;
  1342. end;
  1343. { --------------------------------------------------------------------
  1344. TLocale
  1345. --------------------------------------------------------------------}
  1346. Procedure TLocale.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1347. begin
  1348. If (Fmetadata=AValue) then exit;
  1349. Fmetadata:=AValue;
  1350. MarkPropertyChanged(AIndex);
  1351. end;
  1352. Procedure TLocale.Setvalue(AIndex : Integer; const AValue : String);
  1353. begin
  1354. If (Fvalue=AValue) then exit;
  1355. Fvalue:=AValue;
  1356. MarkPropertyChanged(AIndex);
  1357. end;
  1358. { --------------------------------------------------------------------
  1359. TFieldMetadata
  1360. --------------------------------------------------------------------}
  1361. Procedure TFieldMetadata.Setprimary(AIndex : Integer; const AValue : boolean);
  1362. begin
  1363. If (Fprimary=AValue) then exit;
  1364. Fprimary:=AValue;
  1365. MarkPropertyChanged(AIndex);
  1366. end;
  1367. Procedure TFieldMetadata.Setverified(AIndex : Integer; const AValue : boolean);
  1368. begin
  1369. If (Fverified=AValue) then exit;
  1370. Fverified:=AValue;
  1371. MarkPropertyChanged(AIndex);
  1372. end;
  1373. Procedure TFieldMetadata.Setsource(AIndex : Integer; const AValue : TSource);
  1374. begin
  1375. If (Fsource=AValue) then exit;
  1376. Fsource:=AValue;
  1377. MarkPropertyChanged(AIndex);
  1378. end;
  1379. { --------------------------------------------------------------------
  1380. TName
  1381. --------------------------------------------------------------------}
  1382. Procedure TName.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1383. begin
  1384. If (Fmetadata=AValue) then exit;
  1385. Fmetadata:=AValue;
  1386. MarkPropertyChanged(AIndex);
  1387. end;
  1388. Procedure TName.SetdisplayName(AIndex : Integer; const AValue : String);
  1389. begin
  1390. If (FdisplayName=AValue) then exit;
  1391. FdisplayName:=AValue;
  1392. MarkPropertyChanged(AIndex);
  1393. end;
  1394. Procedure TName.SetfamilyName(AIndex : Integer; const AValue : String);
  1395. begin
  1396. If (FfamilyName=AValue) then exit;
  1397. FfamilyName:=AValue;
  1398. MarkPropertyChanged(AIndex);
  1399. end;
  1400. Procedure TName.SetgivenName(AIndex : Integer; const AValue : String);
  1401. begin
  1402. If (FgivenName=AValue) then exit;
  1403. FgivenName:=AValue;
  1404. MarkPropertyChanged(AIndex);
  1405. end;
  1406. Procedure TName.SetmiddleName(AIndex : Integer; const AValue : String);
  1407. begin
  1408. If (FmiddleName=AValue) then exit;
  1409. FmiddleName:=AValue;
  1410. MarkPropertyChanged(AIndex);
  1411. end;
  1412. Procedure TName.SethonorificPrefix(AIndex : Integer; const AValue : String);
  1413. begin
  1414. If (FhonorificPrefix=AValue) then exit;
  1415. FhonorificPrefix:=AValue;
  1416. MarkPropertyChanged(AIndex);
  1417. end;
  1418. Procedure TName.SethonorificSuffix(AIndex : Integer; const AValue : String);
  1419. begin
  1420. If (FhonorificSuffix=AValue) then exit;
  1421. FhonorificSuffix:=AValue;
  1422. MarkPropertyChanged(AIndex);
  1423. end;
  1424. Procedure TName.SetphoneticFamilyName(AIndex : Integer; const AValue : String);
  1425. begin
  1426. If (FphoneticFamilyName=AValue) then exit;
  1427. FphoneticFamilyName:=AValue;
  1428. MarkPropertyChanged(AIndex);
  1429. end;
  1430. Procedure TName.SetphoneticGivenName(AIndex : Integer; const AValue : String);
  1431. begin
  1432. If (FphoneticGivenName=AValue) then exit;
  1433. FphoneticGivenName:=AValue;
  1434. MarkPropertyChanged(AIndex);
  1435. end;
  1436. Procedure TName.SetphoneticMiddleName(AIndex : Integer; const AValue : String);
  1437. begin
  1438. If (FphoneticMiddleName=AValue) then exit;
  1439. FphoneticMiddleName:=AValue;
  1440. MarkPropertyChanged(AIndex);
  1441. end;
  1442. Procedure TName.SetphoneticHonorificPrefix(AIndex : Integer; const AValue : String);
  1443. begin
  1444. If (FphoneticHonorificPrefix=AValue) then exit;
  1445. FphoneticHonorificPrefix:=AValue;
  1446. MarkPropertyChanged(AIndex);
  1447. end;
  1448. Procedure TName.SetphoneticHonorificSuffix(AIndex : Integer; const AValue : String);
  1449. begin
  1450. If (FphoneticHonorificSuffix=AValue) then exit;
  1451. FphoneticHonorificSuffix:=AValue;
  1452. MarkPropertyChanged(AIndex);
  1453. end;
  1454. { --------------------------------------------------------------------
  1455. TNickname
  1456. --------------------------------------------------------------------}
  1457. Procedure TNickname.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1458. begin
  1459. If (Fmetadata=AValue) then exit;
  1460. Fmetadata:=AValue;
  1461. MarkPropertyChanged(AIndex);
  1462. end;
  1463. Procedure TNickname.Setvalue(AIndex : Integer; const AValue : String);
  1464. begin
  1465. If (Fvalue=AValue) then exit;
  1466. Fvalue:=AValue;
  1467. MarkPropertyChanged(AIndex);
  1468. end;
  1469. Procedure TNickname.Set_type(AIndex : Integer; const AValue : String);
  1470. begin
  1471. If (F_type=AValue) then exit;
  1472. F_type:=AValue;
  1473. MarkPropertyChanged(AIndex);
  1474. end;
  1475. Class Function TNickname.ExportPropertyName(Const AName : String) :String;
  1476. begin
  1477. Case AName of
  1478. '_type' : Result:='type';
  1479. else
  1480. Result:=Inherited ExportPropertyName(AName);
  1481. end;
  1482. end;
  1483. { --------------------------------------------------------------------
  1484. TCoverPhoto
  1485. --------------------------------------------------------------------}
  1486. Procedure TCoverPhoto.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1487. begin
  1488. If (Fmetadata=AValue) then exit;
  1489. Fmetadata:=AValue;
  1490. MarkPropertyChanged(AIndex);
  1491. end;
  1492. Procedure TCoverPhoto.Seturl(AIndex : Integer; const AValue : String);
  1493. begin
  1494. If (Furl=AValue) then exit;
  1495. Furl:=AValue;
  1496. MarkPropertyChanged(AIndex);
  1497. end;
  1498. Procedure TCoverPhoto.Setdefault(AIndex : Integer; const AValue : boolean);
  1499. begin
  1500. If (Fdefault=AValue) then exit;
  1501. Fdefault:=AValue;
  1502. MarkPropertyChanged(AIndex);
  1503. end;
  1504. { --------------------------------------------------------------------
  1505. TPhoto
  1506. --------------------------------------------------------------------}
  1507. Procedure TPhoto.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1508. begin
  1509. If (Fmetadata=AValue) then exit;
  1510. Fmetadata:=AValue;
  1511. MarkPropertyChanged(AIndex);
  1512. end;
  1513. Procedure TPhoto.Seturl(AIndex : Integer; const AValue : String);
  1514. begin
  1515. If (Furl=AValue) then exit;
  1516. Furl:=AValue;
  1517. MarkPropertyChanged(AIndex);
  1518. end;
  1519. { --------------------------------------------------------------------
  1520. TGender
  1521. --------------------------------------------------------------------}
  1522. Procedure TGender.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1523. begin
  1524. If (Fmetadata=AValue) then exit;
  1525. Fmetadata:=AValue;
  1526. MarkPropertyChanged(AIndex);
  1527. end;
  1528. Procedure TGender.Setvalue(AIndex : Integer; const AValue : String);
  1529. begin
  1530. If (Fvalue=AValue) then exit;
  1531. Fvalue:=AValue;
  1532. MarkPropertyChanged(AIndex);
  1533. end;
  1534. Procedure TGender.SetformattedValue(AIndex : Integer; const AValue : String);
  1535. begin
  1536. If (FformattedValue=AValue) then exit;
  1537. FformattedValue:=AValue;
  1538. MarkPropertyChanged(AIndex);
  1539. end;
  1540. { --------------------------------------------------------------------
  1541. TBirthday
  1542. --------------------------------------------------------------------}
  1543. Procedure TBirthday.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1544. begin
  1545. If (Fmetadata=AValue) then exit;
  1546. Fmetadata:=AValue;
  1547. MarkPropertyChanged(AIndex);
  1548. end;
  1549. Procedure TBirthday.Setdate(AIndex : Integer; const AValue : TDate);
  1550. begin
  1551. If (Fdate=AValue) then exit;
  1552. Fdate:=AValue;
  1553. MarkPropertyChanged(AIndex);
  1554. end;
  1555. Procedure TBirthday.Settext(AIndex : Integer; const AValue : String);
  1556. begin
  1557. If (Ftext=AValue) then exit;
  1558. Ftext:=AValue;
  1559. MarkPropertyChanged(AIndex);
  1560. end;
  1561. { --------------------------------------------------------------------
  1562. TDate
  1563. --------------------------------------------------------------------}
  1564. Procedure TDate.Setyear(AIndex : Integer; const AValue : integer);
  1565. begin
  1566. If (Fyear=AValue) then exit;
  1567. Fyear:=AValue;
  1568. MarkPropertyChanged(AIndex);
  1569. end;
  1570. Procedure TDate.Setmonth(AIndex : Integer; const AValue : integer);
  1571. begin
  1572. If (Fmonth=AValue) then exit;
  1573. Fmonth:=AValue;
  1574. MarkPropertyChanged(AIndex);
  1575. end;
  1576. Procedure TDate.Setday(AIndex : Integer; const AValue : integer);
  1577. begin
  1578. If (Fday=AValue) then exit;
  1579. Fday:=AValue;
  1580. MarkPropertyChanged(AIndex);
  1581. end;
  1582. { --------------------------------------------------------------------
  1583. TEvent
  1584. --------------------------------------------------------------------}
  1585. Procedure TEvent.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1586. begin
  1587. If (Fmetadata=AValue) then exit;
  1588. Fmetadata:=AValue;
  1589. MarkPropertyChanged(AIndex);
  1590. end;
  1591. Procedure TEvent.Setdate(AIndex : Integer; const AValue : TDate);
  1592. begin
  1593. If (Fdate=AValue) then exit;
  1594. Fdate:=AValue;
  1595. MarkPropertyChanged(AIndex);
  1596. end;
  1597. Procedure TEvent.Set_type(AIndex : Integer; const AValue : String);
  1598. begin
  1599. If (F_type=AValue) then exit;
  1600. F_type:=AValue;
  1601. MarkPropertyChanged(AIndex);
  1602. end;
  1603. Procedure TEvent.SetformattedType(AIndex : Integer; const AValue : String);
  1604. begin
  1605. If (FformattedType=AValue) then exit;
  1606. FformattedType:=AValue;
  1607. MarkPropertyChanged(AIndex);
  1608. end;
  1609. Class Function TEvent.ExportPropertyName(Const AName : String) :String;
  1610. begin
  1611. Case AName of
  1612. '_type' : Result:='type';
  1613. else
  1614. Result:=Inherited ExportPropertyName(AName);
  1615. end;
  1616. end;
  1617. { --------------------------------------------------------------------
  1618. TAddress
  1619. --------------------------------------------------------------------}
  1620. Procedure TAddress.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1621. begin
  1622. If (Fmetadata=AValue) then exit;
  1623. Fmetadata:=AValue;
  1624. MarkPropertyChanged(AIndex);
  1625. end;
  1626. Procedure TAddress.SetformattedValue(AIndex : Integer; const AValue : String);
  1627. begin
  1628. If (FformattedValue=AValue) then exit;
  1629. FformattedValue:=AValue;
  1630. MarkPropertyChanged(AIndex);
  1631. end;
  1632. Procedure TAddress.Set_type(AIndex : Integer; const AValue : String);
  1633. begin
  1634. If (F_type=AValue) then exit;
  1635. F_type:=AValue;
  1636. MarkPropertyChanged(AIndex);
  1637. end;
  1638. Procedure TAddress.SetformattedType(AIndex : Integer; const AValue : String);
  1639. begin
  1640. If (FformattedType=AValue) then exit;
  1641. FformattedType:=AValue;
  1642. MarkPropertyChanged(AIndex);
  1643. end;
  1644. Procedure TAddress.SetpoBox(AIndex : Integer; const AValue : String);
  1645. begin
  1646. If (FpoBox=AValue) then exit;
  1647. FpoBox:=AValue;
  1648. MarkPropertyChanged(AIndex);
  1649. end;
  1650. Procedure TAddress.SetstreetAddress(AIndex : Integer; const AValue : String);
  1651. begin
  1652. If (FstreetAddress=AValue) then exit;
  1653. FstreetAddress:=AValue;
  1654. MarkPropertyChanged(AIndex);
  1655. end;
  1656. Procedure TAddress.SetextendedAddress(AIndex : Integer; const AValue : String);
  1657. begin
  1658. If (FextendedAddress=AValue) then exit;
  1659. FextendedAddress:=AValue;
  1660. MarkPropertyChanged(AIndex);
  1661. end;
  1662. Procedure TAddress.Setcity(AIndex : Integer; const AValue : String);
  1663. begin
  1664. If (Fcity=AValue) then exit;
  1665. Fcity:=AValue;
  1666. MarkPropertyChanged(AIndex);
  1667. end;
  1668. Procedure TAddress.Setregion(AIndex : Integer; const AValue : String);
  1669. begin
  1670. If (Fregion=AValue) then exit;
  1671. Fregion:=AValue;
  1672. MarkPropertyChanged(AIndex);
  1673. end;
  1674. Procedure TAddress.SetpostalCode(AIndex : Integer; const AValue : String);
  1675. begin
  1676. If (FpostalCode=AValue) then exit;
  1677. FpostalCode:=AValue;
  1678. MarkPropertyChanged(AIndex);
  1679. end;
  1680. Procedure TAddress.Setcountry(AIndex : Integer; const AValue : String);
  1681. begin
  1682. If (Fcountry=AValue) then exit;
  1683. Fcountry:=AValue;
  1684. MarkPropertyChanged(AIndex);
  1685. end;
  1686. Procedure TAddress.SetcountryCode(AIndex : Integer; const AValue : String);
  1687. begin
  1688. If (FcountryCode=AValue) then exit;
  1689. FcountryCode:=AValue;
  1690. MarkPropertyChanged(AIndex);
  1691. end;
  1692. Class Function TAddress.ExportPropertyName(Const AName : String) :String;
  1693. begin
  1694. Case AName of
  1695. '_type' : Result:='type';
  1696. else
  1697. Result:=Inherited ExportPropertyName(AName);
  1698. end;
  1699. end;
  1700. { --------------------------------------------------------------------
  1701. TResidence
  1702. --------------------------------------------------------------------}
  1703. Procedure TResidence.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1704. begin
  1705. If (Fmetadata=AValue) then exit;
  1706. Fmetadata:=AValue;
  1707. MarkPropertyChanged(AIndex);
  1708. end;
  1709. Procedure TResidence.Setvalue(AIndex : Integer; const AValue : String);
  1710. begin
  1711. If (Fvalue=AValue) then exit;
  1712. Fvalue:=AValue;
  1713. MarkPropertyChanged(AIndex);
  1714. end;
  1715. Procedure TResidence.Setcurrent(AIndex : Integer; const AValue : boolean);
  1716. begin
  1717. If (Fcurrent=AValue) then exit;
  1718. Fcurrent:=AValue;
  1719. MarkPropertyChanged(AIndex);
  1720. end;
  1721. { --------------------------------------------------------------------
  1722. TEmailAddress
  1723. --------------------------------------------------------------------}
  1724. Procedure TEmailAddress.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1725. begin
  1726. If (Fmetadata=AValue) then exit;
  1727. Fmetadata:=AValue;
  1728. MarkPropertyChanged(AIndex);
  1729. end;
  1730. Procedure TEmailAddress.Setvalue(AIndex : Integer; const AValue : String);
  1731. begin
  1732. If (Fvalue=AValue) then exit;
  1733. Fvalue:=AValue;
  1734. MarkPropertyChanged(AIndex);
  1735. end;
  1736. Procedure TEmailAddress.Set_type(AIndex : Integer; const AValue : String);
  1737. begin
  1738. If (F_type=AValue) then exit;
  1739. F_type:=AValue;
  1740. MarkPropertyChanged(AIndex);
  1741. end;
  1742. Procedure TEmailAddress.SetformattedType(AIndex : Integer; const AValue : String);
  1743. begin
  1744. If (FformattedType=AValue) then exit;
  1745. FformattedType:=AValue;
  1746. MarkPropertyChanged(AIndex);
  1747. end;
  1748. Class Function TEmailAddress.ExportPropertyName(Const AName : String) :String;
  1749. begin
  1750. Case AName of
  1751. '_type' : Result:='type';
  1752. else
  1753. Result:=Inherited ExportPropertyName(AName);
  1754. end;
  1755. end;
  1756. { --------------------------------------------------------------------
  1757. TPhoneNumber
  1758. --------------------------------------------------------------------}
  1759. Procedure TPhoneNumber.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1760. begin
  1761. If (Fmetadata=AValue) then exit;
  1762. Fmetadata:=AValue;
  1763. MarkPropertyChanged(AIndex);
  1764. end;
  1765. Procedure TPhoneNumber.Setvalue(AIndex : Integer; const AValue : String);
  1766. begin
  1767. If (Fvalue=AValue) then exit;
  1768. Fvalue:=AValue;
  1769. MarkPropertyChanged(AIndex);
  1770. end;
  1771. Procedure TPhoneNumber.SetcanonicalForm(AIndex : Integer; const AValue : String);
  1772. begin
  1773. If (FcanonicalForm=AValue) then exit;
  1774. FcanonicalForm:=AValue;
  1775. MarkPropertyChanged(AIndex);
  1776. end;
  1777. Procedure TPhoneNumber.Set_type(AIndex : Integer; const AValue : String);
  1778. begin
  1779. If (F_type=AValue) then exit;
  1780. F_type:=AValue;
  1781. MarkPropertyChanged(AIndex);
  1782. end;
  1783. Procedure TPhoneNumber.SetformattedType(AIndex : Integer; const AValue : String);
  1784. begin
  1785. If (FformattedType=AValue) then exit;
  1786. FformattedType:=AValue;
  1787. MarkPropertyChanged(AIndex);
  1788. end;
  1789. Class Function TPhoneNumber.ExportPropertyName(Const AName : String) :String;
  1790. begin
  1791. Case AName of
  1792. '_type' : Result:='type';
  1793. else
  1794. Result:=Inherited ExportPropertyName(AName);
  1795. end;
  1796. end;
  1797. { --------------------------------------------------------------------
  1798. TImClient
  1799. --------------------------------------------------------------------}
  1800. Procedure TImClient.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1801. begin
  1802. If (Fmetadata=AValue) then exit;
  1803. Fmetadata:=AValue;
  1804. MarkPropertyChanged(AIndex);
  1805. end;
  1806. Procedure TImClient.Setusername(AIndex : Integer; const AValue : String);
  1807. begin
  1808. If (Fusername=AValue) then exit;
  1809. Fusername:=AValue;
  1810. MarkPropertyChanged(AIndex);
  1811. end;
  1812. Procedure TImClient.Set_type(AIndex : Integer; const AValue : String);
  1813. begin
  1814. If (F_type=AValue) then exit;
  1815. F_type:=AValue;
  1816. MarkPropertyChanged(AIndex);
  1817. end;
  1818. Procedure TImClient.SetformattedType(AIndex : Integer; const AValue : String);
  1819. begin
  1820. If (FformattedType=AValue) then exit;
  1821. FformattedType:=AValue;
  1822. MarkPropertyChanged(AIndex);
  1823. end;
  1824. Procedure TImClient.Setprotocol(AIndex : Integer; const AValue : String);
  1825. begin
  1826. If (Fprotocol=AValue) then exit;
  1827. Fprotocol:=AValue;
  1828. MarkPropertyChanged(AIndex);
  1829. end;
  1830. Procedure TImClient.SetformattedProtocol(AIndex : Integer; const AValue : String);
  1831. begin
  1832. If (FformattedProtocol=AValue) then exit;
  1833. FformattedProtocol:=AValue;
  1834. MarkPropertyChanged(AIndex);
  1835. end;
  1836. Class Function TImClient.ExportPropertyName(Const AName : String) :String;
  1837. begin
  1838. Case AName of
  1839. '_type' : Result:='type';
  1840. else
  1841. Result:=Inherited ExportPropertyName(AName);
  1842. end;
  1843. end;
  1844. { --------------------------------------------------------------------
  1845. TTagline
  1846. --------------------------------------------------------------------}
  1847. Procedure TTagline.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1848. begin
  1849. If (Fmetadata=AValue) then exit;
  1850. Fmetadata:=AValue;
  1851. MarkPropertyChanged(AIndex);
  1852. end;
  1853. Procedure TTagline.Setvalue(AIndex : Integer; const AValue : String);
  1854. begin
  1855. If (Fvalue=AValue) then exit;
  1856. Fvalue:=AValue;
  1857. MarkPropertyChanged(AIndex);
  1858. end;
  1859. { --------------------------------------------------------------------
  1860. TBiography
  1861. --------------------------------------------------------------------}
  1862. Procedure TBiography.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1863. begin
  1864. If (Fmetadata=AValue) then exit;
  1865. Fmetadata:=AValue;
  1866. MarkPropertyChanged(AIndex);
  1867. end;
  1868. Procedure TBiography.Setvalue(AIndex : Integer; const AValue : String);
  1869. begin
  1870. If (Fvalue=AValue) then exit;
  1871. Fvalue:=AValue;
  1872. MarkPropertyChanged(AIndex);
  1873. end;
  1874. { --------------------------------------------------------------------
  1875. TUrl
  1876. --------------------------------------------------------------------}
  1877. Procedure TUrl.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1878. begin
  1879. If (Fmetadata=AValue) then exit;
  1880. Fmetadata:=AValue;
  1881. MarkPropertyChanged(AIndex);
  1882. end;
  1883. Procedure TUrl.Setvalue(AIndex : Integer; const AValue : String);
  1884. begin
  1885. If (Fvalue=AValue) then exit;
  1886. Fvalue:=AValue;
  1887. MarkPropertyChanged(AIndex);
  1888. end;
  1889. Procedure TUrl.Set_type(AIndex : Integer; const AValue : String);
  1890. begin
  1891. If (F_type=AValue) then exit;
  1892. F_type:=AValue;
  1893. MarkPropertyChanged(AIndex);
  1894. end;
  1895. Procedure TUrl.SetformattedType(AIndex : Integer; const AValue : String);
  1896. begin
  1897. If (FformattedType=AValue) then exit;
  1898. FformattedType:=AValue;
  1899. MarkPropertyChanged(AIndex);
  1900. end;
  1901. Class Function TUrl.ExportPropertyName(Const AName : String) :String;
  1902. begin
  1903. Case AName of
  1904. '_type' : Result:='type';
  1905. else
  1906. Result:=Inherited ExportPropertyName(AName);
  1907. end;
  1908. end;
  1909. { --------------------------------------------------------------------
  1910. TOrganization
  1911. --------------------------------------------------------------------}
  1912. Procedure TOrganization.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  1913. begin
  1914. If (Fmetadata=AValue) then exit;
  1915. Fmetadata:=AValue;
  1916. MarkPropertyChanged(AIndex);
  1917. end;
  1918. Procedure TOrganization.Set_type(AIndex : Integer; const AValue : String);
  1919. begin
  1920. If (F_type=AValue) then exit;
  1921. F_type:=AValue;
  1922. MarkPropertyChanged(AIndex);
  1923. end;
  1924. Procedure TOrganization.SetformattedType(AIndex : Integer; const AValue : String);
  1925. begin
  1926. If (FformattedType=AValue) then exit;
  1927. FformattedType:=AValue;
  1928. MarkPropertyChanged(AIndex);
  1929. end;
  1930. Procedure TOrganization.SetstartDate(AIndex : Integer; const AValue : TDate);
  1931. begin
  1932. If (FstartDate=AValue) then exit;
  1933. FstartDate:=AValue;
  1934. MarkPropertyChanged(AIndex);
  1935. end;
  1936. Procedure TOrganization.SetendDate(AIndex : Integer; const AValue : TDate);
  1937. begin
  1938. If (FendDate=AValue) then exit;
  1939. FendDate:=AValue;
  1940. MarkPropertyChanged(AIndex);
  1941. end;
  1942. Procedure TOrganization.Setcurrent(AIndex : Integer; const AValue : boolean);
  1943. begin
  1944. If (Fcurrent=AValue) then exit;
  1945. Fcurrent:=AValue;
  1946. MarkPropertyChanged(AIndex);
  1947. end;
  1948. Procedure TOrganization.Setname(AIndex : Integer; const AValue : String);
  1949. begin
  1950. If (Fname=AValue) then exit;
  1951. Fname:=AValue;
  1952. MarkPropertyChanged(AIndex);
  1953. end;
  1954. Procedure TOrganization.SetphoneticName(AIndex : Integer; const AValue : String);
  1955. begin
  1956. If (FphoneticName=AValue) then exit;
  1957. FphoneticName:=AValue;
  1958. MarkPropertyChanged(AIndex);
  1959. end;
  1960. Procedure TOrganization.Setdepartment(AIndex : Integer; const AValue : String);
  1961. begin
  1962. If (Fdepartment=AValue) then exit;
  1963. Fdepartment:=AValue;
  1964. MarkPropertyChanged(AIndex);
  1965. end;
  1966. Procedure TOrganization.Settitle(AIndex : Integer; const AValue : String);
  1967. begin
  1968. If (Ftitle=AValue) then exit;
  1969. Ftitle:=AValue;
  1970. MarkPropertyChanged(AIndex);
  1971. end;
  1972. Procedure TOrganization.SetjobDescription(AIndex : Integer; const AValue : String);
  1973. begin
  1974. If (FjobDescription=AValue) then exit;
  1975. FjobDescription:=AValue;
  1976. MarkPropertyChanged(AIndex);
  1977. end;
  1978. Procedure TOrganization.Setsymbol(AIndex : Integer; const AValue : String);
  1979. begin
  1980. If (Fsymbol=AValue) then exit;
  1981. Fsymbol:=AValue;
  1982. MarkPropertyChanged(AIndex);
  1983. end;
  1984. Procedure TOrganization.Setdomain(AIndex : Integer; const AValue : String);
  1985. begin
  1986. If (Fdomain=AValue) then exit;
  1987. Fdomain:=AValue;
  1988. MarkPropertyChanged(AIndex);
  1989. end;
  1990. Procedure TOrganization.Setlocation(AIndex : Integer; const AValue : String);
  1991. begin
  1992. If (Flocation=AValue) then exit;
  1993. Flocation:=AValue;
  1994. MarkPropertyChanged(AIndex);
  1995. end;
  1996. Class Function TOrganization.ExportPropertyName(Const AName : String) :String;
  1997. begin
  1998. Case AName of
  1999. '_type' : Result:='type';
  2000. else
  2001. Result:=Inherited ExportPropertyName(AName);
  2002. end;
  2003. end;
  2004. { --------------------------------------------------------------------
  2005. TOccupation
  2006. --------------------------------------------------------------------}
  2007. Procedure TOccupation.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  2008. begin
  2009. If (Fmetadata=AValue) then exit;
  2010. Fmetadata:=AValue;
  2011. MarkPropertyChanged(AIndex);
  2012. end;
  2013. Procedure TOccupation.Setvalue(AIndex : Integer; const AValue : String);
  2014. begin
  2015. If (Fvalue=AValue) then exit;
  2016. Fvalue:=AValue;
  2017. MarkPropertyChanged(AIndex);
  2018. end;
  2019. { --------------------------------------------------------------------
  2020. TInterest
  2021. --------------------------------------------------------------------}
  2022. Procedure TInterest.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  2023. begin
  2024. If (Fmetadata=AValue) then exit;
  2025. Fmetadata:=AValue;
  2026. MarkPropertyChanged(AIndex);
  2027. end;
  2028. Procedure TInterest.Setvalue(AIndex : Integer; const AValue : String);
  2029. begin
  2030. If (Fvalue=AValue) then exit;
  2031. Fvalue:=AValue;
  2032. MarkPropertyChanged(AIndex);
  2033. end;
  2034. { --------------------------------------------------------------------
  2035. TSkill
  2036. --------------------------------------------------------------------}
  2037. Procedure TSkill.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  2038. begin
  2039. If (Fmetadata=AValue) then exit;
  2040. Fmetadata:=AValue;
  2041. MarkPropertyChanged(AIndex);
  2042. end;
  2043. Procedure TSkill.Setvalue(AIndex : Integer; const AValue : String);
  2044. begin
  2045. If (Fvalue=AValue) then exit;
  2046. Fvalue:=AValue;
  2047. MarkPropertyChanged(AIndex);
  2048. end;
  2049. { --------------------------------------------------------------------
  2050. TBraggingRights
  2051. --------------------------------------------------------------------}
  2052. Procedure TBraggingRights.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  2053. begin
  2054. If (Fmetadata=AValue) then exit;
  2055. Fmetadata:=AValue;
  2056. MarkPropertyChanged(AIndex);
  2057. end;
  2058. Procedure TBraggingRights.Setvalue(AIndex : Integer; const AValue : String);
  2059. begin
  2060. If (Fvalue=AValue) then exit;
  2061. Fvalue:=AValue;
  2062. MarkPropertyChanged(AIndex);
  2063. end;
  2064. { --------------------------------------------------------------------
  2065. TRelation
  2066. --------------------------------------------------------------------}
  2067. Procedure TRelation.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  2068. begin
  2069. If (Fmetadata=AValue) then exit;
  2070. Fmetadata:=AValue;
  2071. MarkPropertyChanged(AIndex);
  2072. end;
  2073. Procedure TRelation.Setperson(AIndex : Integer; const AValue : String);
  2074. begin
  2075. If (Fperson=AValue) then exit;
  2076. Fperson:=AValue;
  2077. MarkPropertyChanged(AIndex);
  2078. end;
  2079. Procedure TRelation.Set_type(AIndex : Integer; const AValue : String);
  2080. begin
  2081. If (F_type=AValue) then exit;
  2082. F_type:=AValue;
  2083. MarkPropertyChanged(AIndex);
  2084. end;
  2085. Procedure TRelation.SetformattedType(AIndex : Integer; const AValue : String);
  2086. begin
  2087. If (FformattedType=AValue) then exit;
  2088. FformattedType:=AValue;
  2089. MarkPropertyChanged(AIndex);
  2090. end;
  2091. Class Function TRelation.ExportPropertyName(Const AName : String) :String;
  2092. begin
  2093. Case AName of
  2094. '_type' : Result:='type';
  2095. else
  2096. Result:=Inherited ExportPropertyName(AName);
  2097. end;
  2098. end;
  2099. { --------------------------------------------------------------------
  2100. TRelationshipInterest
  2101. --------------------------------------------------------------------}
  2102. Procedure TRelationshipInterest.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  2103. begin
  2104. If (Fmetadata=AValue) then exit;
  2105. Fmetadata:=AValue;
  2106. MarkPropertyChanged(AIndex);
  2107. end;
  2108. Procedure TRelationshipInterest.Setvalue(AIndex : Integer; const AValue : String);
  2109. begin
  2110. If (Fvalue=AValue) then exit;
  2111. Fvalue:=AValue;
  2112. MarkPropertyChanged(AIndex);
  2113. end;
  2114. Procedure TRelationshipInterest.SetformattedValue(AIndex : Integer; const AValue : String);
  2115. begin
  2116. If (FformattedValue=AValue) then exit;
  2117. FformattedValue:=AValue;
  2118. MarkPropertyChanged(AIndex);
  2119. end;
  2120. { --------------------------------------------------------------------
  2121. TRelationshipStatus
  2122. --------------------------------------------------------------------}
  2123. Procedure TRelationshipStatus.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  2124. begin
  2125. If (Fmetadata=AValue) then exit;
  2126. Fmetadata:=AValue;
  2127. MarkPropertyChanged(AIndex);
  2128. end;
  2129. Procedure TRelationshipStatus.Setvalue(AIndex : Integer; const AValue : String);
  2130. begin
  2131. If (Fvalue=AValue) then exit;
  2132. Fvalue:=AValue;
  2133. MarkPropertyChanged(AIndex);
  2134. end;
  2135. Procedure TRelationshipStatus.SetformattedValue(AIndex : Integer; const AValue : String);
  2136. begin
  2137. If (FformattedValue=AValue) then exit;
  2138. FformattedValue:=AValue;
  2139. MarkPropertyChanged(AIndex);
  2140. end;
  2141. { --------------------------------------------------------------------
  2142. TMembership
  2143. --------------------------------------------------------------------}
  2144. Procedure TMembership.Setmetadata(AIndex : Integer; const AValue : TFieldMetadata);
  2145. begin
  2146. If (Fmetadata=AValue) then exit;
  2147. Fmetadata:=AValue;
  2148. MarkPropertyChanged(AIndex);
  2149. end;
  2150. Procedure TMembership.SetcontactGroupMembership(AIndex : Integer; const AValue : TContactGroupMembership);
  2151. begin
  2152. If (FcontactGroupMembership=AValue) then exit;
  2153. FcontactGroupMembership:=AValue;
  2154. MarkPropertyChanged(AIndex);
  2155. end;
  2156. Procedure TMembership.SetdomainMembership(AIndex : Integer; const AValue : TDomainMembership);
  2157. begin
  2158. If (FdomainMembership=AValue) then exit;
  2159. FdomainMembership:=AValue;
  2160. MarkPropertyChanged(AIndex);
  2161. end;
  2162. { --------------------------------------------------------------------
  2163. TContactGroupMembership
  2164. --------------------------------------------------------------------}
  2165. Procedure TContactGroupMembership.SetcontactGroupId(AIndex : Integer; const AValue : String);
  2166. begin
  2167. If (FcontactGroupId=AValue) then exit;
  2168. FcontactGroupId:=AValue;
  2169. MarkPropertyChanged(AIndex);
  2170. end;
  2171. { --------------------------------------------------------------------
  2172. TDomainMembership
  2173. --------------------------------------------------------------------}
  2174. Procedure TDomainMembership.SetinViewerDomain(AIndex : Integer; const AValue : boolean);
  2175. begin
  2176. If (FinViewerDomain=AValue) then exit;
  2177. FinViewerDomain:=AValue;
  2178. MarkPropertyChanged(AIndex);
  2179. end;
  2180. { --------------------------------------------------------------------
  2181. TGetPeopleResponse
  2182. --------------------------------------------------------------------}
  2183. Procedure TGetPeopleResponse.Setresponses(AIndex : Integer; const AValue : TGetPeopleResponseTyperesponsesArray);
  2184. begin
  2185. If (Fresponses=AValue) then exit;
  2186. Fresponses:=AValue;
  2187. MarkPropertyChanged(AIndex);
  2188. end;
  2189. //2.6.4. bug workaround
  2190. {$IFDEF VER2_6}
  2191. Procedure TGetPeopleResponse.SetArrayLength(Const AName : String; ALength : Longint);
  2192. begin
  2193. Case AName of
  2194. 'responses' : SetLength(Fresponses,ALength);
  2195. else
  2196. Inherited SetArrayLength(AName,ALength);
  2197. end;
  2198. end;
  2199. {$ENDIF VER2_6}
  2200. { --------------------------------------------------------------------
  2201. TPersonResponse
  2202. --------------------------------------------------------------------}
  2203. Procedure TPersonResponse.SethttpStatusCode(AIndex : Integer; const AValue : integer);
  2204. begin
  2205. If (FhttpStatusCode=AValue) then exit;
  2206. FhttpStatusCode:=AValue;
  2207. MarkPropertyChanged(AIndex);
  2208. end;
  2209. Procedure TPersonResponse.Setperson(AIndex : Integer; const AValue : TPerson);
  2210. begin
  2211. If (Fperson=AValue) then exit;
  2212. Fperson:=AValue;
  2213. MarkPropertyChanged(AIndex);
  2214. end;
  2215. Procedure TPersonResponse.SetrequestedResourceName(AIndex : Integer; const AValue : String);
  2216. begin
  2217. If (FrequestedResourceName=AValue) then exit;
  2218. FrequestedResourceName:=AValue;
  2219. MarkPropertyChanged(AIndex);
  2220. end;
  2221. { --------------------------------------------------------------------
  2222. TListConnectionsResponse
  2223. --------------------------------------------------------------------}
  2224. Procedure TListConnectionsResponse.Setconnections(AIndex : Integer; const AValue : TListConnectionsResponseTypeconnectionsArray);
  2225. begin
  2226. If (Fconnections=AValue) then exit;
  2227. Fconnections:=AValue;
  2228. MarkPropertyChanged(AIndex);
  2229. end;
  2230. Procedure TListConnectionsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
  2231. begin
  2232. If (FnextPageToken=AValue) then exit;
  2233. FnextPageToken:=AValue;
  2234. MarkPropertyChanged(AIndex);
  2235. end;
  2236. Procedure TListConnectionsResponse.SetnextSyncToken(AIndex : Integer; const AValue : String);
  2237. begin
  2238. If (FnextSyncToken=AValue) then exit;
  2239. FnextSyncToken:=AValue;
  2240. MarkPropertyChanged(AIndex);
  2241. end;
  2242. //2.6.4. bug workaround
  2243. {$IFDEF VER2_6}
  2244. Procedure TListConnectionsResponse.SetArrayLength(Const AName : String; ALength : Longint);
  2245. begin
  2246. Case AName of
  2247. 'connections' : SetLength(Fconnections,ALength);
  2248. else
  2249. Inherited SetArrayLength(AName,ALength);
  2250. end;
  2251. end;
  2252. {$ENDIF VER2_6}
  2253. { --------------------------------------------------------------------
  2254. TPeopleConnectionsResource
  2255. --------------------------------------------------------------------}
  2256. Class Function TPeopleConnectionsResource.ResourceName : String;
  2257. begin
  2258. Result:='connections';
  2259. end;
  2260. Class Function TPeopleConnectionsResource.DefaultAPI : TGoogleAPIClass;
  2261. begin
  2262. Result:=TpeopleAPI;
  2263. end;
  2264. Function TPeopleConnectionsResource.List(_resourceName: string; AQuery : string = '') : TListConnectionsResponse;
  2265. Const
  2266. _HTTPMethod = 'GET';
  2267. _Path = 'v1/{+resourceName}/connections';
  2268. _Methodid = 'people.people.connections.list';
  2269. Var
  2270. _P : String;
  2271. begin
  2272. _P:=SubstitutePath(_Path,['resourceName',_resourceName]);
  2273. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListConnectionsResponse) as TListConnectionsResponse;
  2274. end;
  2275. Function TPeopleConnectionsResource.List(_resourceName: string; AQuery : TPeopleConnectionslistOptions) : TListConnectionsResponse;
  2276. Var
  2277. _Q : String;
  2278. begin
  2279. _Q:='';
  2280. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2281. AddToQuery(_Q,'pageSize',AQuery.pageSize);
  2282. AddToQuery(_Q,'sortOrder',AQuery.sortOrder);
  2283. AddToQuery(_Q,'syncToken',AQuery.syncToken);
  2284. AddToQuery(_Q,'requestMask.includeField',AQuery.requestMaskincludeField);
  2285. Result:=List(_resourceName,_Q);
  2286. end;
  2287. { --------------------------------------------------------------------
  2288. TPeopleResource
  2289. --------------------------------------------------------------------}
  2290. Class Function TPeopleResource.ResourceName : String;
  2291. begin
  2292. Result:='people';
  2293. end;
  2294. Class Function TPeopleResource.DefaultAPI : TGoogleAPIClass;
  2295. begin
  2296. Result:=TpeopleAPI;
  2297. end;
  2298. Function TPeopleResource.Get(_resourceName: string; AQuery : string = '') : TPerson;
  2299. Const
  2300. _HTTPMethod = 'GET';
  2301. _Path = 'v1/{+resourceName}';
  2302. _Methodid = 'people.people.get';
  2303. Var
  2304. _P : String;
  2305. begin
  2306. _P:=SubstitutePath(_Path,['resourceName',_resourceName]);
  2307. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TPerson) as TPerson;
  2308. end;
  2309. Function TPeopleResource.Get(_resourceName: string; AQuery : TPeoplegetOptions) : TPerson;
  2310. Var
  2311. _Q : String;
  2312. begin
  2313. _Q:='';
  2314. AddToQuery(_Q,'requestMask.includeField',AQuery.requestMaskincludeField);
  2315. Result:=Get(_resourceName,_Q);
  2316. end;
  2317. Function TPeopleResource.GetBatchGet(AQuery : string = '') : TGetPeopleResponse;
  2318. Const
  2319. _HTTPMethod = 'GET';
  2320. _Path = 'v1/people:batchGet';
  2321. _Methodid = 'people.people.getBatchGet';
  2322. begin
  2323. Result:=ServiceCall(_HTTPMethod,_Path,AQuery,Nil,TGetPeopleResponse) as TGetPeopleResponse;
  2324. end;
  2325. Function TPeopleResource.GetBatchGet(AQuery : TPeoplegetBatchGetOptions) : TGetPeopleResponse;
  2326. Var
  2327. _Q : String;
  2328. begin
  2329. _Q:='';
  2330. AddToQuery(_Q,'resourceNames',AQuery.resourceNames);
  2331. AddToQuery(_Q,'requestMask.includeField',AQuery.requestMaskincludeField);
  2332. Result:=GetBatchGet(_Q);
  2333. end;
  2334. Function TPeopleResource.GetConnectionsInstance : TPeopleConnectionsResource;
  2335. begin
  2336. if (FConnectionsInstance=Nil) then
  2337. FConnectionsInstance:=CreateConnectionsResource;
  2338. Result:=FConnectionsInstance;
  2339. end;
  2340. Function TPeopleResource.CreateConnectionsResource : TPeopleConnectionsResource;
  2341. begin
  2342. Result:=CreateConnectionsResource(Self);
  2343. end;
  2344. Function TPeopleResource.CreateConnectionsResource(AOwner : TComponent) : TPeopleConnectionsResource;
  2345. begin
  2346. Result:=TPeopleConnectionsResource.Create(AOwner);
  2347. Result.API:=Self.API;
  2348. end;
  2349. { --------------------------------------------------------------------
  2350. TPeopleAPI
  2351. --------------------------------------------------------------------}
  2352. Class Function TPeopleAPI.APIName : String;
  2353. begin
  2354. Result:='people';
  2355. end;
  2356. Class Function TPeopleAPI.APIVersion : String;
  2357. begin
  2358. Result:='v1';
  2359. end;
  2360. Class Function TPeopleAPI.APIRevision : String;
  2361. begin
  2362. Result:='20160210';
  2363. end;
  2364. Class Function TPeopleAPI.APIID : String;
  2365. begin
  2366. Result:='people:v1';
  2367. end;
  2368. Class Function TPeopleAPI.APITitle : String;
  2369. begin
  2370. Result:='Google People API';
  2371. end;
  2372. Class Function TPeopleAPI.APIDescription : String;
  2373. begin
  2374. Result:='The Google People API service gives access to information about profiles and contacts.';
  2375. end;
  2376. Class Function TPeopleAPI.APIOwnerDomain : String;
  2377. begin
  2378. Result:='google.com';
  2379. end;
  2380. Class Function TPeopleAPI.APIOwnerName : String;
  2381. begin
  2382. Result:='Google';
  2383. end;
  2384. Class Function TPeopleAPI.APIIcon16 : String;
  2385. begin
  2386. Result:='http://www.google.com/images/icons/product/search-16.gif';
  2387. end;
  2388. Class Function TPeopleAPI.APIIcon32 : String;
  2389. begin
  2390. Result:='http://www.google.com/images/icons/product/search-32.gif';
  2391. end;
  2392. Class Function TPeopleAPI.APIdocumentationLink : String;
  2393. begin
  2394. Result:='https://developers.google.com/people/';
  2395. end;
  2396. Class Function TPeopleAPI.APIrootUrl : string;
  2397. begin
  2398. Result:='https://people.googleapis.com/';
  2399. end;
  2400. Class Function TPeopleAPI.APIbasePath : string;
  2401. begin
  2402. Result:='';
  2403. end;
  2404. Class Function TPeopleAPI.APIbaseURL : String;
  2405. begin
  2406. Result:='https://people.googleapis.com/';
  2407. end;
  2408. Class Function TPeopleAPI.APIProtocol : string;
  2409. begin
  2410. Result:='rest';
  2411. end;
  2412. Class Function TPeopleAPI.APIservicePath : string;
  2413. begin
  2414. Result:='';
  2415. end;
  2416. Class Function TPeopleAPI.APIbatchPath : String;
  2417. begin
  2418. Result:='batch';
  2419. end;
  2420. Class Function TPeopleAPI.APIAuthScopes : TScopeInfoArray;
  2421. begin
  2422. SetLength(Result,9);
  2423. Result[0].Name:='https://www.googleapis.com/auth/contacts';
  2424. Result[0].Description:='Manage your contacts';
  2425. Result[1].Name:='https://www.googleapis.com/auth/contacts.readonly';
  2426. Result[1].Description:='View your contacts';
  2427. Result[2].Name:='https://www.googleapis.com/auth/plus.login';
  2428. Result[2].Description:='Know your basic profile info and list of people in your circles.';
  2429. Result[3].Name:='https://www.googleapis.com/auth/user.addresses.read';
  2430. Result[3].Description:='View your street addresses';
  2431. Result[4].Name:='https://www.googleapis.com/auth/user.birthday.read';
  2432. Result[4].Description:='View your complete date of birth';
  2433. Result[5].Name:='https://www.googleapis.com/auth/user.emails.read';
  2434. Result[5].Description:='View your email addresses';
  2435. Result[6].Name:='https://www.googleapis.com/auth/user.phonenumbers.read';
  2436. Result[6].Description:='View your phone numbers';
  2437. Result[7].Name:='https://www.googleapis.com/auth/userinfo.email';
  2438. Result[7].Description:='View your email address';
  2439. Result[8].Name:='https://www.googleapis.com/auth/userinfo.profile';
  2440. Result[8].Description:='View your basic profile info';
  2441. end;
  2442. Class Function TPeopleAPI.APINeedsAuth : Boolean;
  2443. begin
  2444. Result:=True;
  2445. end;
  2446. Class Procedure TPeopleAPI.RegisterAPIResources;
  2447. begin
  2448. TPerson.RegisterObject;
  2449. TPersonMetadata.RegisterObject;
  2450. TSource.RegisterObject;
  2451. TLocale.RegisterObject;
  2452. TFieldMetadata.RegisterObject;
  2453. TName.RegisterObject;
  2454. TNickname.RegisterObject;
  2455. TCoverPhoto.RegisterObject;
  2456. TPhoto.RegisterObject;
  2457. TGender.RegisterObject;
  2458. TBirthday.RegisterObject;
  2459. TDate.RegisterObject;
  2460. TEvent.RegisterObject;
  2461. TAddress.RegisterObject;
  2462. TResidence.RegisterObject;
  2463. TEmailAddress.RegisterObject;
  2464. TPhoneNumber.RegisterObject;
  2465. TImClient.RegisterObject;
  2466. TTagline.RegisterObject;
  2467. TBiography.RegisterObject;
  2468. TUrl.RegisterObject;
  2469. TOrganization.RegisterObject;
  2470. TOccupation.RegisterObject;
  2471. TInterest.RegisterObject;
  2472. TSkill.RegisterObject;
  2473. TBraggingRights.RegisterObject;
  2474. TRelation.RegisterObject;
  2475. TRelationshipInterest.RegisterObject;
  2476. TRelationshipStatus.RegisterObject;
  2477. TMembership.RegisterObject;
  2478. TContactGroupMembership.RegisterObject;
  2479. TDomainMembership.RegisterObject;
  2480. TGetPeopleResponse.RegisterObject;
  2481. TPersonResponse.RegisterObject;
  2482. TListConnectionsResponse.RegisterObject;
  2483. end;
  2484. Function TPeopleAPI.GetPeopleConnectionsInstance : TPeopleConnectionsResource;
  2485. begin
  2486. if (FPeopleConnectionsInstance=Nil) then
  2487. FPeopleConnectionsInstance:=CreatePeopleConnectionsResource;
  2488. Result:=FPeopleConnectionsInstance;
  2489. end;
  2490. Function TPeopleAPI.CreatePeopleConnectionsResource : TPeopleConnectionsResource;
  2491. begin
  2492. Result:=CreatePeopleConnectionsResource(Self);
  2493. end;
  2494. Function TPeopleAPI.CreatePeopleConnectionsResource(AOwner : TComponent) : TPeopleConnectionsResource;
  2495. begin
  2496. Result:=TPeopleConnectionsResource.Create(AOwner);
  2497. Result.API:=Self.API;
  2498. end;
  2499. Function TPeopleAPI.GetPeopleInstance : TPeopleResource;
  2500. begin
  2501. if (FPeopleInstance=Nil) then
  2502. FPeopleInstance:=CreatePeopleResource;
  2503. Result:=FPeopleInstance;
  2504. end;
  2505. Function TPeopleAPI.CreatePeopleResource : TPeopleResource;
  2506. begin
  2507. Result:=CreatePeopleResource(Self);
  2508. end;
  2509. Function TPeopleAPI.CreatePeopleResource(AOwner : TComponent) : TPeopleResource;
  2510. begin
  2511. Result:=TPeopleResource.Create(AOwner);
  2512. Result.API:=Self.API;
  2513. end;
  2514. initialization
  2515. TPeopleAPI.RegisterAPI;
  2516. end.