googleclassroom.pp 128 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451
  1. {$IFNDEF FPC_DOTTEDUNITS}
  2. unit googleclassroom;
  3. {$ENDIF FPC_DOTTEDUNITS}
  4. {$MODE objfpc}
  5. {$H+}
  6. interface
  7. {$IFDEF FPC_DOTTEDUNITS}
  8. uses System.SysUtils, System.Classes, GoogleApi.Service, FpWeb.Rest.Base, GoogleApi.Base;
  9. {$ELSE FPC_DOTTEDUNITS}
  10. uses sysutils, classes, googleservice, restbase, googlebase;
  11. {$ENDIF FPC_DOTTEDUNITS}
  12. type
  13. //Top-level schema types
  14. TCourse = Class;
  15. TDriveFolder = Class;
  16. TCourseMaterialSet = Class;
  17. TCourseMaterial = Class;
  18. TDriveFile = Class;
  19. TYouTubeVideo = Class;
  20. TLink = Class;
  21. TForm = Class;
  22. TEmpty = Class;
  23. TListCoursesResponse = Class;
  24. TCourseAlias = Class;
  25. TListCourseAliasesResponse = Class;
  26. TInvitation = Class;
  27. TListInvitationsResponse = Class;
  28. TUserProfile = Class;
  29. TName = Class;
  30. TGlobalPermission = Class;
  31. TTeacher = Class;
  32. TListTeachersResponse = Class;
  33. TStudent = Class;
  34. TListStudentsResponse = Class;
  35. TCourseWork = Class;
  36. TMaterial = Class;
  37. TSharedDriveFile = Class;
  38. TDate = Class;
  39. TTimeOfDay = Class;
  40. TAssignment = Class;
  41. TMultipleChoiceQuestion = Class;
  42. TListCourseWorkResponse = Class;
  43. TStudentSubmission = Class;
  44. TAssignmentSubmission = Class;
  45. TAttachment = Class;
  46. TShortAnswerSubmission = Class;
  47. TMultipleChoiceSubmission = Class;
  48. TListStudentSubmissionsResponse = Class;
  49. TTurnInStudentSubmissionRequest = Class;
  50. TReclaimStudentSubmissionRequest = Class;
  51. TReturnStudentSubmissionRequest = Class;
  52. TModifyAttachmentsRequest = Class;
  53. TCourseArray = Array of TCourse;
  54. TDriveFolderArray = Array of TDriveFolder;
  55. TCourseMaterialSetArray = Array of TCourseMaterialSet;
  56. TCourseMaterialArray = Array of TCourseMaterial;
  57. TDriveFileArray = Array of TDriveFile;
  58. TYouTubeVideoArray = Array of TYouTubeVideo;
  59. TLinkArray = Array of TLink;
  60. TFormArray = Array of TForm;
  61. TEmptyArray = Array of TEmpty;
  62. TListCoursesResponseArray = Array of TListCoursesResponse;
  63. TCourseAliasArray = Array of TCourseAlias;
  64. TListCourseAliasesResponseArray = Array of TListCourseAliasesResponse;
  65. TInvitationArray = Array of TInvitation;
  66. TListInvitationsResponseArray = Array of TListInvitationsResponse;
  67. TUserProfileArray = Array of TUserProfile;
  68. TNameArray = Array of TName;
  69. TGlobalPermissionArray = Array of TGlobalPermission;
  70. TTeacherArray = Array of TTeacher;
  71. TListTeachersResponseArray = Array of TListTeachersResponse;
  72. TStudentArray = Array of TStudent;
  73. TListStudentsResponseArray = Array of TListStudentsResponse;
  74. TCourseWorkArray = Array of TCourseWork;
  75. TMaterialArray = Array of TMaterial;
  76. TSharedDriveFileArray = Array of TSharedDriveFile;
  77. TDateArray = Array of TDate;
  78. TTimeOfDayArray = Array of TTimeOfDay;
  79. TAssignmentArray = Array of TAssignment;
  80. TMultipleChoiceQuestionArray = Array of TMultipleChoiceQuestion;
  81. TListCourseWorkResponseArray = Array of TListCourseWorkResponse;
  82. TStudentSubmissionArray = Array of TStudentSubmission;
  83. TAssignmentSubmissionArray = Array of TAssignmentSubmission;
  84. TAttachmentArray = Array of TAttachment;
  85. TShortAnswerSubmissionArray = Array of TShortAnswerSubmission;
  86. TMultipleChoiceSubmissionArray = Array of TMultipleChoiceSubmission;
  87. TListStudentSubmissionsResponseArray = Array of TListStudentSubmissionsResponse;
  88. TTurnInStudentSubmissionRequestArray = Array of TTurnInStudentSubmissionRequest;
  89. TReclaimStudentSubmissionRequestArray = Array of TReclaimStudentSubmissionRequest;
  90. TReturnStudentSubmissionRequestArray = Array of TReturnStudentSubmissionRequest;
  91. TModifyAttachmentsRequestArray = Array of TModifyAttachmentsRequest;
  92. //Anonymous types, using auto-generated names
  93. TCourseTypecourseMaterialSetsArray = Array of TCourseMaterialSet;
  94. TCourseMaterialSetTypematerialsArray = Array of TCourseMaterial;
  95. TListCoursesResponseTypecoursesArray = Array of TCourse;
  96. TListCourseAliasesResponseTypealiasesArray = Array of TCourseAlias;
  97. TListInvitationsResponseTypeinvitationsArray = Array of TInvitation;
  98. TUserProfileTypepermissionsArray = Array of TGlobalPermission;
  99. TListTeachersResponseTypeteachersArray = Array of TTeacher;
  100. TListStudentsResponseTypestudentsArray = Array of TStudent;
  101. TCourseWorkTypematerialsArray = Array of TMaterial;
  102. TListCourseWorkResponseTypecourseWorkArray = Array of TCourseWork;
  103. TAssignmentSubmissionTypeattachmentsArray = Array of TAttachment;
  104. TListStudentSubmissionsResponseTypestudentSubmissionsArray = Array of TStudentSubmission;
  105. TModifyAttachmentsRequestTypeaddAttachmentsArray = Array of TAttachment;
  106. { --------------------------------------------------------------------
  107. TCourse
  108. --------------------------------------------------------------------}
  109. TCourse = Class(TGoogleBaseObject)
  110. Private
  111. Fid : String;
  112. Fname : String;
  113. Fsection : String;
  114. FdescriptionHeading : String;
  115. Fdescription : String;
  116. Froom : String;
  117. FownerId : String;
  118. FcreationTime : String;
  119. FupdateTime : String;
  120. FenrollmentCode : String;
  121. FcourseState : String;
  122. FalternateLink : String;
  123. FteacherGroupEmail : String;
  124. FcourseGroupEmail : String;
  125. FteacherFolder : TDriveFolder;
  126. FcourseMaterialSets : TCourseTypecourseMaterialSetsArray;
  127. Protected
  128. //Property setters
  129. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  130. Procedure Setname(AIndex : Integer; const AValue : String); virtual;
  131. Procedure Setsection(AIndex : Integer; const AValue : String); virtual;
  132. Procedure SetdescriptionHeading(AIndex : Integer; const AValue : String); virtual;
  133. Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
  134. Procedure Setroom(AIndex : Integer; const AValue : String); virtual;
  135. Procedure SetownerId(AIndex : Integer; const AValue : String); virtual;
  136. Procedure SetcreationTime(AIndex : Integer; const AValue : String); virtual;
  137. Procedure SetupdateTime(AIndex : Integer; const AValue : String); virtual;
  138. Procedure SetenrollmentCode(AIndex : Integer; const AValue : String); virtual;
  139. Procedure SetcourseState(AIndex : Integer; const AValue : String); virtual;
  140. Procedure SetalternateLink(AIndex : Integer; const AValue : String); virtual;
  141. Procedure SetteacherGroupEmail(AIndex : Integer; const AValue : String); virtual;
  142. Procedure SetcourseGroupEmail(AIndex : Integer; const AValue : String); virtual;
  143. Procedure SetteacherFolder(AIndex : Integer; const AValue : TDriveFolder); virtual;
  144. Procedure SetcourseMaterialSets(AIndex : Integer; const AValue : TCourseTypecourseMaterialSetsArray); virtual;
  145. //2.6.4. bug workaround
  146. {$IFDEF VER2_6}
  147. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  148. {$ENDIF VER2_6}
  149. Public
  150. Published
  151. Property id : String Index 0 Read Fid Write Setid;
  152. Property name : String Index 8 Read Fname Write Setname;
  153. Property section : String Index 16 Read Fsection Write Setsection;
  154. Property descriptionHeading : String Index 24 Read FdescriptionHeading Write SetdescriptionHeading;
  155. Property description : String Index 32 Read Fdescription Write Setdescription;
  156. Property room : String Index 40 Read Froom Write Setroom;
  157. Property ownerId : String Index 48 Read FownerId Write SetownerId;
  158. Property creationTime : String Index 56 Read FcreationTime Write SetcreationTime;
  159. Property updateTime : String Index 64 Read FupdateTime Write SetupdateTime;
  160. Property enrollmentCode : String Index 72 Read FenrollmentCode Write SetenrollmentCode;
  161. Property courseState : String Index 80 Read FcourseState Write SetcourseState;
  162. Property alternateLink : String Index 88 Read FalternateLink Write SetalternateLink;
  163. Property teacherGroupEmail : String Index 96 Read FteacherGroupEmail Write SetteacherGroupEmail;
  164. Property courseGroupEmail : String Index 104 Read FcourseGroupEmail Write SetcourseGroupEmail;
  165. Property teacherFolder : TDriveFolder Index 112 Read FteacherFolder Write SetteacherFolder;
  166. Property courseMaterialSets : TCourseTypecourseMaterialSetsArray Index 120 Read FcourseMaterialSets Write SetcourseMaterialSets;
  167. end;
  168. TCourseClass = Class of TCourse;
  169. { --------------------------------------------------------------------
  170. TDriveFolder
  171. --------------------------------------------------------------------}
  172. TDriveFolder = Class(TGoogleBaseObject)
  173. Private
  174. Fid : String;
  175. Ftitle : String;
  176. FalternateLink : String;
  177. Protected
  178. //Property setters
  179. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  180. Procedure Settitle(AIndex : Integer; const AValue : String); virtual;
  181. Procedure SetalternateLink(AIndex : Integer; const AValue : String); virtual;
  182. Public
  183. Published
  184. Property id : String Index 0 Read Fid Write Setid;
  185. Property title : String Index 8 Read Ftitle Write Settitle;
  186. Property alternateLink : String Index 16 Read FalternateLink Write SetalternateLink;
  187. end;
  188. TDriveFolderClass = Class of TDriveFolder;
  189. { --------------------------------------------------------------------
  190. TCourseMaterialSet
  191. --------------------------------------------------------------------}
  192. TCourseMaterialSet = Class(TGoogleBaseObject)
  193. Private
  194. Ftitle : String;
  195. Fmaterials : TCourseMaterialSetTypematerialsArray;
  196. Protected
  197. //Property setters
  198. Procedure Settitle(AIndex : Integer; const AValue : String); virtual;
  199. Procedure Setmaterials(AIndex : Integer; const AValue : TCourseMaterialSetTypematerialsArray); virtual;
  200. //2.6.4. bug workaround
  201. {$IFDEF VER2_6}
  202. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  203. {$ENDIF VER2_6}
  204. Public
  205. Published
  206. Property title : String Index 0 Read Ftitle Write Settitle;
  207. Property materials : TCourseMaterialSetTypematerialsArray Index 8 Read Fmaterials Write Setmaterials;
  208. end;
  209. TCourseMaterialSetClass = Class of TCourseMaterialSet;
  210. { --------------------------------------------------------------------
  211. TCourseMaterial
  212. --------------------------------------------------------------------}
  213. TCourseMaterial = Class(TGoogleBaseObject)
  214. Private
  215. FdriveFile : TDriveFile;
  216. FyouTubeVideo : TYouTubeVideo;
  217. Flink : TLink;
  218. Fform : TForm;
  219. Protected
  220. //Property setters
  221. Procedure SetdriveFile(AIndex : Integer; const AValue : TDriveFile); virtual;
  222. Procedure SetyouTubeVideo(AIndex : Integer; const AValue : TYouTubeVideo); virtual;
  223. Procedure Setlink(AIndex : Integer; const AValue : TLink); virtual;
  224. Procedure Setform(AIndex : Integer; const AValue : TForm); virtual;
  225. Public
  226. Published
  227. Property driveFile : TDriveFile Index 0 Read FdriveFile Write SetdriveFile;
  228. Property youTubeVideo : TYouTubeVideo Index 8 Read FyouTubeVideo Write SetyouTubeVideo;
  229. Property link : TLink Index 16 Read Flink Write Setlink;
  230. Property form : TForm Index 24 Read Fform Write Setform;
  231. end;
  232. TCourseMaterialClass = Class of TCourseMaterial;
  233. { --------------------------------------------------------------------
  234. TDriveFile
  235. --------------------------------------------------------------------}
  236. TDriveFile = Class(TGoogleBaseObject)
  237. Private
  238. Fid : String;
  239. Ftitle : String;
  240. FalternateLink : String;
  241. FthumbnailUrl : String;
  242. Protected
  243. //Property setters
  244. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  245. Procedure Settitle(AIndex : Integer; const AValue : String); virtual;
  246. Procedure SetalternateLink(AIndex : Integer; const AValue : String); virtual;
  247. Procedure SetthumbnailUrl(AIndex : Integer; const AValue : String); virtual;
  248. Public
  249. Published
  250. Property id : String Index 0 Read Fid Write Setid;
  251. Property title : String Index 8 Read Ftitle Write Settitle;
  252. Property alternateLink : String Index 16 Read FalternateLink Write SetalternateLink;
  253. Property thumbnailUrl : String Index 24 Read FthumbnailUrl Write SetthumbnailUrl;
  254. end;
  255. TDriveFileClass = Class of TDriveFile;
  256. { --------------------------------------------------------------------
  257. TYouTubeVideo
  258. --------------------------------------------------------------------}
  259. TYouTubeVideo = Class(TGoogleBaseObject)
  260. Private
  261. Fid : String;
  262. Ftitle : String;
  263. FalternateLink : String;
  264. FthumbnailUrl : String;
  265. Protected
  266. //Property setters
  267. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  268. Procedure Settitle(AIndex : Integer; const AValue : String); virtual;
  269. Procedure SetalternateLink(AIndex : Integer; const AValue : String); virtual;
  270. Procedure SetthumbnailUrl(AIndex : Integer; const AValue : String); virtual;
  271. Public
  272. Published
  273. Property id : String Index 0 Read Fid Write Setid;
  274. Property title : String Index 8 Read Ftitle Write Settitle;
  275. Property alternateLink : String Index 16 Read FalternateLink Write SetalternateLink;
  276. Property thumbnailUrl : String Index 24 Read FthumbnailUrl Write SetthumbnailUrl;
  277. end;
  278. TYouTubeVideoClass = Class of TYouTubeVideo;
  279. { --------------------------------------------------------------------
  280. TLink
  281. --------------------------------------------------------------------}
  282. TLink = Class(TGoogleBaseObject)
  283. Private
  284. Furl : String;
  285. Ftitle : String;
  286. FthumbnailUrl : String;
  287. Protected
  288. //Property setters
  289. Procedure Seturl(AIndex : Integer; const AValue : String); virtual;
  290. Procedure Settitle(AIndex : Integer; const AValue : String); virtual;
  291. Procedure SetthumbnailUrl(AIndex : Integer; const AValue : String); virtual;
  292. Public
  293. Published
  294. Property url : String Index 0 Read Furl Write Seturl;
  295. Property title : String Index 8 Read Ftitle Write Settitle;
  296. Property thumbnailUrl : String Index 16 Read FthumbnailUrl Write SetthumbnailUrl;
  297. end;
  298. TLinkClass = Class of TLink;
  299. { --------------------------------------------------------------------
  300. TForm
  301. --------------------------------------------------------------------}
  302. TForm = Class(TGoogleBaseObject)
  303. Private
  304. FformUrl : String;
  305. FresponseUrl : String;
  306. Ftitle : String;
  307. FthumbnailUrl : String;
  308. Protected
  309. //Property setters
  310. Procedure SetformUrl(AIndex : Integer; const AValue : String); virtual;
  311. Procedure SetresponseUrl(AIndex : Integer; const AValue : String); virtual;
  312. Procedure Settitle(AIndex : Integer; const AValue : String); virtual;
  313. Procedure SetthumbnailUrl(AIndex : Integer; const AValue : String); virtual;
  314. Public
  315. Published
  316. Property formUrl : String Index 0 Read FformUrl Write SetformUrl;
  317. Property responseUrl : String Index 8 Read FresponseUrl Write SetresponseUrl;
  318. Property title : String Index 16 Read Ftitle Write Settitle;
  319. Property thumbnailUrl : String Index 24 Read FthumbnailUrl Write SetthumbnailUrl;
  320. end;
  321. TFormClass = Class of TForm;
  322. { --------------------------------------------------------------------
  323. TEmpty
  324. --------------------------------------------------------------------}
  325. TEmpty = Class(TGoogleBaseObject)
  326. Private
  327. Protected
  328. //Property setters
  329. Public
  330. Published
  331. end;
  332. TEmptyClass = Class of TEmpty;
  333. { --------------------------------------------------------------------
  334. TListCoursesResponse
  335. --------------------------------------------------------------------}
  336. TListCoursesResponse = Class(TGoogleBaseObject)
  337. Private
  338. Fcourses : TListCoursesResponseTypecoursesArray;
  339. FnextPageToken : String;
  340. Protected
  341. //Property setters
  342. Procedure Setcourses(AIndex : Integer; const AValue : TListCoursesResponseTypecoursesArray); virtual;
  343. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  344. //2.6.4. bug workaround
  345. {$IFDEF VER2_6}
  346. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  347. {$ENDIF VER2_6}
  348. Public
  349. Published
  350. Property courses : TListCoursesResponseTypecoursesArray Index 0 Read Fcourses Write Setcourses;
  351. Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
  352. end;
  353. TListCoursesResponseClass = Class of TListCoursesResponse;
  354. { --------------------------------------------------------------------
  355. TCourseAlias
  356. --------------------------------------------------------------------}
  357. TCourseAlias = Class(TGoogleBaseObject)
  358. Private
  359. Falias : String;
  360. Protected
  361. //Property setters
  362. Procedure Setalias(AIndex : Integer; const AValue : String); virtual;
  363. Public
  364. Published
  365. Property alias : String Index 0 Read Falias Write Setalias;
  366. end;
  367. TCourseAliasClass = Class of TCourseAlias;
  368. { --------------------------------------------------------------------
  369. TListCourseAliasesResponse
  370. --------------------------------------------------------------------}
  371. TListCourseAliasesResponse = Class(TGoogleBaseObject)
  372. Private
  373. Faliases : TListCourseAliasesResponseTypealiasesArray;
  374. FnextPageToken : String;
  375. Protected
  376. //Property setters
  377. Procedure Setaliases(AIndex : Integer; const AValue : TListCourseAliasesResponseTypealiasesArray); virtual;
  378. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  379. //2.6.4. bug workaround
  380. {$IFDEF VER2_6}
  381. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  382. {$ENDIF VER2_6}
  383. Public
  384. Published
  385. Property aliases : TListCourseAliasesResponseTypealiasesArray Index 0 Read Faliases Write Setaliases;
  386. Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
  387. end;
  388. TListCourseAliasesResponseClass = Class of TListCourseAliasesResponse;
  389. { --------------------------------------------------------------------
  390. TInvitation
  391. --------------------------------------------------------------------}
  392. TInvitation = Class(TGoogleBaseObject)
  393. Private
  394. Fid : String;
  395. FuserId : String;
  396. FcourseId : String;
  397. Frole : String;
  398. Protected
  399. //Property setters
  400. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  401. Procedure SetuserId(AIndex : Integer; const AValue : String); virtual;
  402. Procedure SetcourseId(AIndex : Integer; const AValue : String); virtual;
  403. Procedure Setrole(AIndex : Integer; const AValue : String); virtual;
  404. Public
  405. Published
  406. Property id : String Index 0 Read Fid Write Setid;
  407. Property userId : String Index 8 Read FuserId Write SetuserId;
  408. Property courseId : String Index 16 Read FcourseId Write SetcourseId;
  409. Property role : String Index 24 Read Frole Write Setrole;
  410. end;
  411. TInvitationClass = Class of TInvitation;
  412. { --------------------------------------------------------------------
  413. TListInvitationsResponse
  414. --------------------------------------------------------------------}
  415. TListInvitationsResponse = Class(TGoogleBaseObject)
  416. Private
  417. Finvitations : TListInvitationsResponseTypeinvitationsArray;
  418. FnextPageToken : String;
  419. Protected
  420. //Property setters
  421. Procedure Setinvitations(AIndex : Integer; const AValue : TListInvitationsResponseTypeinvitationsArray); virtual;
  422. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  423. //2.6.4. bug workaround
  424. {$IFDEF VER2_6}
  425. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  426. {$ENDIF VER2_6}
  427. Public
  428. Published
  429. Property invitations : TListInvitationsResponseTypeinvitationsArray Index 0 Read Finvitations Write Setinvitations;
  430. Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
  431. end;
  432. TListInvitationsResponseClass = Class of TListInvitationsResponse;
  433. { --------------------------------------------------------------------
  434. TUserProfile
  435. --------------------------------------------------------------------}
  436. TUserProfile = Class(TGoogleBaseObject)
  437. Private
  438. Fid : String;
  439. Fname : TName;
  440. FemailAddress : String;
  441. FphotoUrl : String;
  442. Fpermissions : TUserProfileTypepermissionsArray;
  443. Protected
  444. //Property setters
  445. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  446. Procedure Setname(AIndex : Integer; const AValue : TName); virtual;
  447. Procedure SetemailAddress(AIndex : Integer; const AValue : String); virtual;
  448. Procedure SetphotoUrl(AIndex : Integer; const AValue : String); virtual;
  449. Procedure Setpermissions(AIndex : Integer; const AValue : TUserProfileTypepermissionsArray); virtual;
  450. //2.6.4. bug workaround
  451. {$IFDEF VER2_6}
  452. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  453. {$ENDIF VER2_6}
  454. Public
  455. Published
  456. Property id : String Index 0 Read Fid Write Setid;
  457. Property name : TName Index 8 Read Fname Write Setname;
  458. Property emailAddress : String Index 16 Read FemailAddress Write SetemailAddress;
  459. Property photoUrl : String Index 24 Read FphotoUrl Write SetphotoUrl;
  460. Property permissions : TUserProfileTypepermissionsArray Index 32 Read Fpermissions Write Setpermissions;
  461. end;
  462. TUserProfileClass = Class of TUserProfile;
  463. { --------------------------------------------------------------------
  464. TName
  465. --------------------------------------------------------------------}
  466. TName = Class(TGoogleBaseObject)
  467. Private
  468. FgivenName : String;
  469. FfamilyName : String;
  470. FfullName : String;
  471. Protected
  472. //Property setters
  473. Procedure SetgivenName(AIndex : Integer; const AValue : String); virtual;
  474. Procedure SetfamilyName(AIndex : Integer; const AValue : String); virtual;
  475. Procedure SetfullName(AIndex : Integer; const AValue : String); virtual;
  476. Public
  477. Published
  478. Property givenName : String Index 0 Read FgivenName Write SetgivenName;
  479. Property familyName : String Index 8 Read FfamilyName Write SetfamilyName;
  480. Property fullName : String Index 16 Read FfullName Write SetfullName;
  481. end;
  482. TNameClass = Class of TName;
  483. { --------------------------------------------------------------------
  484. TGlobalPermission
  485. --------------------------------------------------------------------}
  486. TGlobalPermission = Class(TGoogleBaseObject)
  487. Private
  488. Fpermission : String;
  489. Protected
  490. //Property setters
  491. Procedure Setpermission(AIndex : Integer; const AValue : String); virtual;
  492. Public
  493. Published
  494. Property permission : String Index 0 Read Fpermission Write Setpermission;
  495. end;
  496. TGlobalPermissionClass = Class of TGlobalPermission;
  497. { --------------------------------------------------------------------
  498. TTeacher
  499. --------------------------------------------------------------------}
  500. TTeacher = Class(TGoogleBaseObject)
  501. Private
  502. FcourseId : String;
  503. FuserId : String;
  504. Fprofile : TUserProfile;
  505. Protected
  506. //Property setters
  507. Procedure SetcourseId(AIndex : Integer; const AValue : String); virtual;
  508. Procedure SetuserId(AIndex : Integer; const AValue : String); virtual;
  509. Procedure Setprofile(AIndex : Integer; const AValue : TUserProfile); virtual;
  510. Public
  511. Published
  512. Property courseId : String Index 0 Read FcourseId Write SetcourseId;
  513. Property userId : String Index 8 Read FuserId Write SetuserId;
  514. Property profile : TUserProfile Index 16 Read Fprofile Write Setprofile;
  515. end;
  516. TTeacherClass = Class of TTeacher;
  517. { --------------------------------------------------------------------
  518. TListTeachersResponse
  519. --------------------------------------------------------------------}
  520. TListTeachersResponse = Class(TGoogleBaseObject)
  521. Private
  522. Fteachers : TListTeachersResponseTypeteachersArray;
  523. FnextPageToken : String;
  524. Protected
  525. //Property setters
  526. Procedure Setteachers(AIndex : Integer; const AValue : TListTeachersResponseTypeteachersArray); virtual;
  527. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  528. //2.6.4. bug workaround
  529. {$IFDEF VER2_6}
  530. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  531. {$ENDIF VER2_6}
  532. Public
  533. Published
  534. Property teachers : TListTeachersResponseTypeteachersArray Index 0 Read Fteachers Write Setteachers;
  535. Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
  536. end;
  537. TListTeachersResponseClass = Class of TListTeachersResponse;
  538. { --------------------------------------------------------------------
  539. TStudent
  540. --------------------------------------------------------------------}
  541. TStudent = Class(TGoogleBaseObject)
  542. Private
  543. FcourseId : String;
  544. FuserId : String;
  545. Fprofile : TUserProfile;
  546. FstudentWorkFolder : TDriveFolder;
  547. Protected
  548. //Property setters
  549. Procedure SetcourseId(AIndex : Integer; const AValue : String); virtual;
  550. Procedure SetuserId(AIndex : Integer; const AValue : String); virtual;
  551. Procedure Setprofile(AIndex : Integer; const AValue : TUserProfile); virtual;
  552. Procedure SetstudentWorkFolder(AIndex : Integer; const AValue : TDriveFolder); virtual;
  553. Public
  554. Published
  555. Property courseId : String Index 0 Read FcourseId Write SetcourseId;
  556. Property userId : String Index 8 Read FuserId Write SetuserId;
  557. Property profile : TUserProfile Index 16 Read Fprofile Write Setprofile;
  558. Property studentWorkFolder : TDriveFolder Index 24 Read FstudentWorkFolder Write SetstudentWorkFolder;
  559. end;
  560. TStudentClass = Class of TStudent;
  561. { --------------------------------------------------------------------
  562. TListStudentsResponse
  563. --------------------------------------------------------------------}
  564. TListStudentsResponse = Class(TGoogleBaseObject)
  565. Private
  566. Fstudents : TListStudentsResponseTypestudentsArray;
  567. FnextPageToken : String;
  568. Protected
  569. //Property setters
  570. Procedure Setstudents(AIndex : Integer; const AValue : TListStudentsResponseTypestudentsArray); virtual;
  571. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  572. //2.6.4. bug workaround
  573. {$IFDEF VER2_6}
  574. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  575. {$ENDIF VER2_6}
  576. Public
  577. Published
  578. Property students : TListStudentsResponseTypestudentsArray Index 0 Read Fstudents Write Setstudents;
  579. Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
  580. end;
  581. TListStudentsResponseClass = Class of TListStudentsResponse;
  582. { --------------------------------------------------------------------
  583. TCourseWork
  584. --------------------------------------------------------------------}
  585. TCourseWork = Class(TGoogleBaseObject)
  586. Private
  587. FcourseId : String;
  588. Fid : String;
  589. Ftitle : String;
  590. Fdescription : String;
  591. Fmaterials : TCourseWorkTypematerialsArray;
  592. Fstate : String;
  593. FalternateLink : String;
  594. FcreationTime : String;
  595. FupdateTime : String;
  596. FdueDate : TDate;
  597. FdueTime : TTimeOfDay;
  598. FmaxPoints : double;
  599. FworkType : String;
  600. FassociatedWithDeveloper : boolean;
  601. FsubmissionModificationMode : String;
  602. Fassignment : TAssignment;
  603. FmultipleChoiceQuestion : TMultipleChoiceQuestion;
  604. Protected
  605. //Property setters
  606. Procedure SetcourseId(AIndex : Integer; const AValue : String); virtual;
  607. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  608. Procedure Settitle(AIndex : Integer; const AValue : String); virtual;
  609. Procedure Setdescription(AIndex : Integer; const AValue : String); virtual;
  610. Procedure Setmaterials(AIndex : Integer; const AValue : TCourseWorkTypematerialsArray); virtual;
  611. Procedure Setstate(AIndex : Integer; const AValue : String); virtual;
  612. Procedure SetalternateLink(AIndex : Integer; const AValue : String); virtual;
  613. Procedure SetcreationTime(AIndex : Integer; const AValue : String); virtual;
  614. Procedure SetupdateTime(AIndex : Integer; const AValue : String); virtual;
  615. Procedure SetdueDate(AIndex : Integer; const AValue : TDate); virtual;
  616. Procedure SetdueTime(AIndex : Integer; const AValue : TTimeOfDay); virtual;
  617. Procedure SetmaxPoints(AIndex : Integer; const AValue : double); virtual;
  618. Procedure SetworkType(AIndex : Integer; const AValue : String); virtual;
  619. Procedure SetassociatedWithDeveloper(AIndex : Integer; const AValue : boolean); virtual;
  620. Procedure SetsubmissionModificationMode(AIndex : Integer; const AValue : String); virtual;
  621. Procedure Setassignment(AIndex : Integer; const AValue : TAssignment); virtual;
  622. Procedure SetmultipleChoiceQuestion(AIndex : Integer; const AValue : TMultipleChoiceQuestion); virtual;
  623. //2.6.4. bug workaround
  624. {$IFDEF VER2_6}
  625. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  626. {$ENDIF VER2_6}
  627. Public
  628. Published
  629. Property courseId : String Index 0 Read FcourseId Write SetcourseId;
  630. Property id : String Index 8 Read Fid Write Setid;
  631. Property title : String Index 16 Read Ftitle Write Settitle;
  632. Property description : String Index 24 Read Fdescription Write Setdescription;
  633. Property materials : TCourseWorkTypematerialsArray Index 32 Read Fmaterials Write Setmaterials;
  634. Property state : String Index 40 Read Fstate Write Setstate;
  635. Property alternateLink : String Index 48 Read FalternateLink Write SetalternateLink;
  636. Property creationTime : String Index 56 Read FcreationTime Write SetcreationTime;
  637. Property updateTime : String Index 64 Read FupdateTime Write SetupdateTime;
  638. Property dueDate : TDate Index 72 Read FdueDate Write SetdueDate;
  639. Property dueTime : TTimeOfDay Index 80 Read FdueTime Write SetdueTime;
  640. Property maxPoints : double Index 88 Read FmaxPoints Write SetmaxPoints;
  641. Property workType : String Index 96 Read FworkType Write SetworkType;
  642. Property associatedWithDeveloper : boolean Index 104 Read FassociatedWithDeveloper Write SetassociatedWithDeveloper;
  643. Property submissionModificationMode : String Index 112 Read FsubmissionModificationMode Write SetsubmissionModificationMode;
  644. Property assignment : TAssignment Index 120 Read Fassignment Write Setassignment;
  645. Property multipleChoiceQuestion : TMultipleChoiceQuestion Index 128 Read FmultipleChoiceQuestion Write SetmultipleChoiceQuestion;
  646. end;
  647. TCourseWorkClass = Class of TCourseWork;
  648. { --------------------------------------------------------------------
  649. TMaterial
  650. --------------------------------------------------------------------}
  651. TMaterial = Class(TGoogleBaseObject)
  652. Private
  653. FdriveFile : TSharedDriveFile;
  654. FyoutubeVideo : TYouTubeVideo;
  655. Flink : TLink;
  656. Fform : TForm;
  657. Protected
  658. //Property setters
  659. Procedure SetdriveFile(AIndex : Integer; const AValue : TSharedDriveFile); virtual;
  660. Procedure SetyoutubeVideo(AIndex : Integer; const AValue : TYouTubeVideo); virtual;
  661. Procedure Setlink(AIndex : Integer; const AValue : TLink); virtual;
  662. Procedure Setform(AIndex : Integer; const AValue : TForm); virtual;
  663. Public
  664. Published
  665. Property driveFile : TSharedDriveFile Index 0 Read FdriveFile Write SetdriveFile;
  666. Property youtubeVideo : TYouTubeVideo Index 8 Read FyoutubeVideo Write SetyoutubeVideo;
  667. Property link : TLink Index 16 Read Flink Write Setlink;
  668. Property form : TForm Index 24 Read Fform Write Setform;
  669. end;
  670. TMaterialClass = Class of TMaterial;
  671. { --------------------------------------------------------------------
  672. TSharedDriveFile
  673. --------------------------------------------------------------------}
  674. TSharedDriveFile = Class(TGoogleBaseObject)
  675. Private
  676. FdriveFile : TDriveFile;
  677. FshareMode : String;
  678. Protected
  679. //Property setters
  680. Procedure SetdriveFile(AIndex : Integer; const AValue : TDriveFile); virtual;
  681. Procedure SetshareMode(AIndex : Integer; const AValue : String); virtual;
  682. Public
  683. Published
  684. Property driveFile : TDriveFile Index 0 Read FdriveFile Write SetdriveFile;
  685. Property shareMode : String Index 8 Read FshareMode Write SetshareMode;
  686. end;
  687. TSharedDriveFileClass = Class of TSharedDriveFile;
  688. { --------------------------------------------------------------------
  689. TDate
  690. --------------------------------------------------------------------}
  691. TDate = Class(TGoogleBaseObject)
  692. Private
  693. Fyear : integer;
  694. Fmonth : integer;
  695. Fday : integer;
  696. Protected
  697. //Property setters
  698. Procedure Setyear(AIndex : Integer; const AValue : integer); virtual;
  699. Procedure Setmonth(AIndex : Integer; const AValue : integer); virtual;
  700. Procedure Setday(AIndex : Integer; const AValue : integer); virtual;
  701. Public
  702. Published
  703. Property year : integer Index 0 Read Fyear Write Setyear;
  704. Property month : integer Index 8 Read Fmonth Write Setmonth;
  705. Property day : integer Index 16 Read Fday Write Setday;
  706. end;
  707. TDateClass = Class of TDate;
  708. { --------------------------------------------------------------------
  709. TTimeOfDay
  710. --------------------------------------------------------------------}
  711. TTimeOfDay = Class(TGoogleBaseObject)
  712. Private
  713. Fhours : integer;
  714. Fminutes : integer;
  715. Fseconds : integer;
  716. Fnanos : integer;
  717. Protected
  718. //Property setters
  719. Procedure Sethours(AIndex : Integer; const AValue : integer); virtual;
  720. Procedure Setminutes(AIndex : Integer; const AValue : integer); virtual;
  721. Procedure Setseconds(AIndex : Integer; const AValue : integer); virtual;
  722. Procedure Setnanos(AIndex : Integer; const AValue : integer); virtual;
  723. Public
  724. Published
  725. Property hours : integer Index 0 Read Fhours Write Sethours;
  726. Property minutes : integer Index 8 Read Fminutes Write Setminutes;
  727. Property seconds : integer Index 16 Read Fseconds Write Setseconds;
  728. Property nanos : integer Index 24 Read Fnanos Write Setnanos;
  729. end;
  730. TTimeOfDayClass = Class of TTimeOfDay;
  731. { --------------------------------------------------------------------
  732. TAssignment
  733. --------------------------------------------------------------------}
  734. TAssignment = Class(TGoogleBaseObject)
  735. Private
  736. FstudentWorkFolder : TDriveFolder;
  737. Protected
  738. //Property setters
  739. Procedure SetstudentWorkFolder(AIndex : Integer; const AValue : TDriveFolder); virtual;
  740. Public
  741. Published
  742. Property studentWorkFolder : TDriveFolder Index 0 Read FstudentWorkFolder Write SetstudentWorkFolder;
  743. end;
  744. TAssignmentClass = Class of TAssignment;
  745. { --------------------------------------------------------------------
  746. TMultipleChoiceQuestion
  747. --------------------------------------------------------------------}
  748. TMultipleChoiceQuestion = Class(TGoogleBaseObject)
  749. Private
  750. Fchoices : TStringArray;
  751. Protected
  752. //Property setters
  753. Procedure Setchoices(AIndex : Integer; const AValue : TStringArray); virtual;
  754. //2.6.4. bug workaround
  755. {$IFDEF VER2_6}
  756. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  757. {$ENDIF VER2_6}
  758. Public
  759. Published
  760. Property choices : TStringArray Index 0 Read Fchoices Write Setchoices;
  761. end;
  762. TMultipleChoiceQuestionClass = Class of TMultipleChoiceQuestion;
  763. { --------------------------------------------------------------------
  764. TListCourseWorkResponse
  765. --------------------------------------------------------------------}
  766. TListCourseWorkResponse = Class(TGoogleBaseObject)
  767. Private
  768. FcourseWork : TListCourseWorkResponseTypecourseWorkArray;
  769. FnextPageToken : String;
  770. Protected
  771. //Property setters
  772. Procedure SetcourseWork(AIndex : Integer; const AValue : TListCourseWorkResponseTypecourseWorkArray); virtual;
  773. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  774. //2.6.4. bug workaround
  775. {$IFDEF VER2_6}
  776. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  777. {$ENDIF VER2_6}
  778. Public
  779. Published
  780. Property courseWork : TListCourseWorkResponseTypecourseWorkArray Index 0 Read FcourseWork Write SetcourseWork;
  781. Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
  782. end;
  783. TListCourseWorkResponseClass = Class of TListCourseWorkResponse;
  784. { --------------------------------------------------------------------
  785. TStudentSubmission
  786. --------------------------------------------------------------------}
  787. TStudentSubmission = Class(TGoogleBaseObject)
  788. Private
  789. FcourseId : String;
  790. FcourseWorkId : String;
  791. Fid : String;
  792. FuserId : String;
  793. FcreationTime : String;
  794. FupdateTime : String;
  795. Fstate : String;
  796. Flate : boolean;
  797. FdraftGrade : double;
  798. FassignedGrade : double;
  799. FalternateLink : String;
  800. FcourseWorkType : String;
  801. FassociatedWithDeveloper : boolean;
  802. FassignmentSubmission : TAssignmentSubmission;
  803. FshortAnswerSubmission : TShortAnswerSubmission;
  804. FmultipleChoiceSubmission : TMultipleChoiceSubmission;
  805. Protected
  806. //Property setters
  807. Procedure SetcourseId(AIndex : Integer; const AValue : String); virtual;
  808. Procedure SetcourseWorkId(AIndex : Integer; const AValue : String); virtual;
  809. Procedure Setid(AIndex : Integer; const AValue : String); virtual;
  810. Procedure SetuserId(AIndex : Integer; const AValue : String); virtual;
  811. Procedure SetcreationTime(AIndex : Integer; const AValue : String); virtual;
  812. Procedure SetupdateTime(AIndex : Integer; const AValue : String); virtual;
  813. Procedure Setstate(AIndex : Integer; const AValue : String); virtual;
  814. Procedure Setlate(AIndex : Integer; const AValue : boolean); virtual;
  815. Procedure SetdraftGrade(AIndex : Integer; const AValue : double); virtual;
  816. Procedure SetassignedGrade(AIndex : Integer; const AValue : double); virtual;
  817. Procedure SetalternateLink(AIndex : Integer; const AValue : String); virtual;
  818. Procedure SetcourseWorkType(AIndex : Integer; const AValue : String); virtual;
  819. Procedure SetassociatedWithDeveloper(AIndex : Integer; const AValue : boolean); virtual;
  820. Procedure SetassignmentSubmission(AIndex : Integer; const AValue : TAssignmentSubmission); virtual;
  821. Procedure SetshortAnswerSubmission(AIndex : Integer; const AValue : TShortAnswerSubmission); virtual;
  822. Procedure SetmultipleChoiceSubmission(AIndex : Integer; const AValue : TMultipleChoiceSubmission); virtual;
  823. Public
  824. Published
  825. Property courseId : String Index 0 Read FcourseId Write SetcourseId;
  826. Property courseWorkId : String Index 8 Read FcourseWorkId Write SetcourseWorkId;
  827. Property id : String Index 16 Read Fid Write Setid;
  828. Property userId : String Index 24 Read FuserId Write SetuserId;
  829. Property creationTime : String Index 32 Read FcreationTime Write SetcreationTime;
  830. Property updateTime : String Index 40 Read FupdateTime Write SetupdateTime;
  831. Property state : String Index 48 Read Fstate Write Setstate;
  832. Property late : boolean Index 56 Read Flate Write Setlate;
  833. Property draftGrade : double Index 64 Read FdraftGrade Write SetdraftGrade;
  834. Property assignedGrade : double Index 72 Read FassignedGrade Write SetassignedGrade;
  835. Property alternateLink : String Index 80 Read FalternateLink Write SetalternateLink;
  836. Property courseWorkType : String Index 88 Read FcourseWorkType Write SetcourseWorkType;
  837. Property associatedWithDeveloper : boolean Index 96 Read FassociatedWithDeveloper Write SetassociatedWithDeveloper;
  838. Property assignmentSubmission : TAssignmentSubmission Index 104 Read FassignmentSubmission Write SetassignmentSubmission;
  839. Property shortAnswerSubmission : TShortAnswerSubmission Index 112 Read FshortAnswerSubmission Write SetshortAnswerSubmission;
  840. Property multipleChoiceSubmission : TMultipleChoiceSubmission Index 120 Read FmultipleChoiceSubmission Write SetmultipleChoiceSubmission;
  841. end;
  842. TStudentSubmissionClass = Class of TStudentSubmission;
  843. { --------------------------------------------------------------------
  844. TAssignmentSubmission
  845. --------------------------------------------------------------------}
  846. TAssignmentSubmission = Class(TGoogleBaseObject)
  847. Private
  848. Fattachments : TAssignmentSubmissionTypeattachmentsArray;
  849. Protected
  850. //Property setters
  851. Procedure Setattachments(AIndex : Integer; const AValue : TAssignmentSubmissionTypeattachmentsArray); virtual;
  852. //2.6.4. bug workaround
  853. {$IFDEF VER2_6}
  854. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  855. {$ENDIF VER2_6}
  856. Public
  857. Published
  858. Property attachments : TAssignmentSubmissionTypeattachmentsArray Index 0 Read Fattachments Write Setattachments;
  859. end;
  860. TAssignmentSubmissionClass = Class of TAssignmentSubmission;
  861. { --------------------------------------------------------------------
  862. TAttachment
  863. --------------------------------------------------------------------}
  864. TAttachment = Class(TGoogleBaseObject)
  865. Private
  866. FdriveFile : TDriveFile;
  867. FyouTubeVideo : TYouTubeVideo;
  868. Flink : TLink;
  869. Fform : TForm;
  870. Protected
  871. //Property setters
  872. Procedure SetdriveFile(AIndex : Integer; const AValue : TDriveFile); virtual;
  873. Procedure SetyouTubeVideo(AIndex : Integer; const AValue : TYouTubeVideo); virtual;
  874. Procedure Setlink(AIndex : Integer; const AValue : TLink); virtual;
  875. Procedure Setform(AIndex : Integer; const AValue : TForm); virtual;
  876. Public
  877. Published
  878. Property driveFile : TDriveFile Index 0 Read FdriveFile Write SetdriveFile;
  879. Property youTubeVideo : TYouTubeVideo Index 8 Read FyouTubeVideo Write SetyouTubeVideo;
  880. Property link : TLink Index 16 Read Flink Write Setlink;
  881. Property form : TForm Index 24 Read Fform Write Setform;
  882. end;
  883. TAttachmentClass = Class of TAttachment;
  884. { --------------------------------------------------------------------
  885. TShortAnswerSubmission
  886. --------------------------------------------------------------------}
  887. TShortAnswerSubmission = Class(TGoogleBaseObject)
  888. Private
  889. Fanswer : String;
  890. Protected
  891. //Property setters
  892. Procedure Setanswer(AIndex : Integer; const AValue : String); virtual;
  893. Public
  894. Published
  895. Property answer : String Index 0 Read Fanswer Write Setanswer;
  896. end;
  897. TShortAnswerSubmissionClass = Class of TShortAnswerSubmission;
  898. { --------------------------------------------------------------------
  899. TMultipleChoiceSubmission
  900. --------------------------------------------------------------------}
  901. TMultipleChoiceSubmission = Class(TGoogleBaseObject)
  902. Private
  903. Fanswer : String;
  904. Protected
  905. //Property setters
  906. Procedure Setanswer(AIndex : Integer; const AValue : String); virtual;
  907. Public
  908. Published
  909. Property answer : String Index 0 Read Fanswer Write Setanswer;
  910. end;
  911. TMultipleChoiceSubmissionClass = Class of TMultipleChoiceSubmission;
  912. { --------------------------------------------------------------------
  913. TListStudentSubmissionsResponse
  914. --------------------------------------------------------------------}
  915. TListStudentSubmissionsResponse = Class(TGoogleBaseObject)
  916. Private
  917. FstudentSubmissions : TListStudentSubmissionsResponseTypestudentSubmissionsArray;
  918. FnextPageToken : String;
  919. Protected
  920. //Property setters
  921. Procedure SetstudentSubmissions(AIndex : Integer; const AValue : TListStudentSubmissionsResponseTypestudentSubmissionsArray); virtual;
  922. Procedure SetnextPageToken(AIndex : Integer; const AValue : String); virtual;
  923. //2.6.4. bug workaround
  924. {$IFDEF VER2_6}
  925. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  926. {$ENDIF VER2_6}
  927. Public
  928. Published
  929. Property studentSubmissions : TListStudentSubmissionsResponseTypestudentSubmissionsArray Index 0 Read FstudentSubmissions Write SetstudentSubmissions;
  930. Property nextPageToken : String Index 8 Read FnextPageToken Write SetnextPageToken;
  931. end;
  932. TListStudentSubmissionsResponseClass = Class of TListStudentSubmissionsResponse;
  933. { --------------------------------------------------------------------
  934. TTurnInStudentSubmissionRequest
  935. --------------------------------------------------------------------}
  936. TTurnInStudentSubmissionRequest = Class(TGoogleBaseObject)
  937. Private
  938. Protected
  939. //Property setters
  940. Public
  941. Published
  942. end;
  943. TTurnInStudentSubmissionRequestClass = Class of TTurnInStudentSubmissionRequest;
  944. { --------------------------------------------------------------------
  945. TReclaimStudentSubmissionRequest
  946. --------------------------------------------------------------------}
  947. TReclaimStudentSubmissionRequest = Class(TGoogleBaseObject)
  948. Private
  949. Protected
  950. //Property setters
  951. Public
  952. Published
  953. end;
  954. TReclaimStudentSubmissionRequestClass = Class of TReclaimStudentSubmissionRequest;
  955. { --------------------------------------------------------------------
  956. TReturnStudentSubmissionRequest
  957. --------------------------------------------------------------------}
  958. TReturnStudentSubmissionRequest = Class(TGoogleBaseObject)
  959. Private
  960. Protected
  961. //Property setters
  962. Public
  963. Published
  964. end;
  965. TReturnStudentSubmissionRequestClass = Class of TReturnStudentSubmissionRequest;
  966. { --------------------------------------------------------------------
  967. TModifyAttachmentsRequest
  968. --------------------------------------------------------------------}
  969. TModifyAttachmentsRequest = Class(TGoogleBaseObject)
  970. Private
  971. FaddAttachments : TModifyAttachmentsRequestTypeaddAttachmentsArray;
  972. Protected
  973. //Property setters
  974. Procedure SetaddAttachments(AIndex : Integer; const AValue : TModifyAttachmentsRequestTypeaddAttachmentsArray); virtual;
  975. //2.6.4. bug workaround
  976. {$IFDEF VER2_6}
  977. Procedure SetArrayLength(Const AName : String; ALength : Longint); override;
  978. {$ENDIF VER2_6}
  979. Public
  980. Published
  981. Property addAttachments : TModifyAttachmentsRequestTypeaddAttachmentsArray Index 0 Read FaddAttachments Write SetaddAttachments;
  982. end;
  983. TModifyAttachmentsRequestClass = Class of TModifyAttachmentsRequest;
  984. { --------------------------------------------------------------------
  985. TCoursesAliasesResource
  986. --------------------------------------------------------------------}
  987. //Optional query Options for TCoursesAliasesResource, method List
  988. TCoursesAliasesListOptions = Record
  989. pageSize : integer;
  990. pageToken : String;
  991. end;
  992. TCoursesAliasesResource = Class(TGoogleResource)
  993. Public
  994. Class Function ResourceName : String; override;
  995. Class Function DefaultAPI : TGoogleAPIClass; override;
  996. Function Create(courseId: string; aCourseAlias : TCourseAlias) : TCourseAlias;overload;
  997. Function Delete(courseId: string; alias: string) : TEmpty;
  998. Function List(courseId: string; AQuery : string = '') : TListCourseAliasesResponse;
  999. Function List(courseId: string; AQuery : TCoursesAliaseslistOptions) : TListCourseAliasesResponse;
  1000. end;
  1001. { --------------------------------------------------------------------
  1002. TCoursesTeachersResource
  1003. --------------------------------------------------------------------}
  1004. //Optional query Options for TCoursesTeachersResource, method List
  1005. TCoursesTeachersListOptions = Record
  1006. pageSize : integer;
  1007. pageToken : String;
  1008. end;
  1009. TCoursesTeachersResource = Class(TGoogleResource)
  1010. Public
  1011. Class Function ResourceName : String; override;
  1012. Class Function DefaultAPI : TGoogleAPIClass; override;
  1013. Function Create(courseId: string; aTeacher : TTeacher) : TTeacher;overload;
  1014. Function Get(courseId: string; userId: string) : TTeacher;
  1015. Function Delete(courseId: string; userId: string) : TEmpty;
  1016. Function List(courseId: string; AQuery : string = '') : TListTeachersResponse;
  1017. Function List(courseId: string; AQuery : TCoursesTeacherslistOptions) : TListTeachersResponse;
  1018. end;
  1019. { --------------------------------------------------------------------
  1020. TCoursesStudentsResource
  1021. --------------------------------------------------------------------}
  1022. //Optional query Options for TCoursesStudentsResource, method Create
  1023. TCoursesStudentsCreateOptions = Record
  1024. enrollmentCode : String;
  1025. end;
  1026. //Optional query Options for TCoursesStudentsResource, method List
  1027. TCoursesStudentsListOptions = Record
  1028. pageSize : integer;
  1029. pageToken : String;
  1030. end;
  1031. TCoursesStudentsResource = Class(TGoogleResource)
  1032. Public
  1033. Class Function ResourceName : String; override;
  1034. Class Function DefaultAPI : TGoogleAPIClass; override;
  1035. Function Create(courseId: string; aStudent : TStudent; AQuery : string = '') : TStudent;overload;
  1036. Function Create(courseId: string; aStudent : TStudent; AQuery : TCoursesStudentscreateOptions) : TStudent;overload;
  1037. Function Get(courseId: string; userId: string) : TStudent;
  1038. Function Delete(courseId: string; userId: string) : TEmpty;
  1039. Function List(courseId: string; AQuery : string = '') : TListStudentsResponse;
  1040. Function List(courseId: string; AQuery : TCoursesStudentslistOptions) : TListStudentsResponse;
  1041. end;
  1042. { --------------------------------------------------------------------
  1043. TCoursesCourseWorkStudentSubmissionsResource
  1044. --------------------------------------------------------------------}
  1045. //Optional query Options for TCoursesCourseWorkStudentSubmissionsResource, method Patch
  1046. TCoursesCourseWorkStudentSubmissionsPatchOptions = Record
  1047. updateMask : String;
  1048. end;
  1049. //Optional query Options for TCoursesCourseWorkStudentSubmissionsResource, method List
  1050. TCoursesCourseWorkStudentSubmissionsListOptions = Record
  1051. userId : String;
  1052. states : String;
  1053. late : String;
  1054. pageSize : integer;
  1055. pageToken : String;
  1056. end;
  1057. TCoursesCourseWorkStudentSubmissionsResource = Class(TGoogleResource)
  1058. Public
  1059. Class Function ResourceName : String; override;
  1060. Class Function DefaultAPI : TGoogleAPIClass; override;
  1061. Function Get(courseId: string; courseWorkId: string; id: string) : TStudentSubmission;
  1062. Function Patch(courseId: string; courseWorkId: string; id: string; aStudentSubmission : TStudentSubmission; AQuery : string = '') : TStudentSubmission;
  1063. Function Patch(courseId: string; courseWorkId: string; id: string; aStudentSubmission : TStudentSubmission; AQuery : TCoursesCourseWorkStudentSubmissionspatchOptions) : TStudentSubmission;
  1064. Function List(courseId: string; courseWorkId: string; AQuery : string = '') : TListStudentSubmissionsResponse;
  1065. Function List(courseId: string; courseWorkId: string; AQuery : TCoursesCourseWorkStudentSubmissionslistOptions) : TListStudentSubmissionsResponse;
  1066. Function TurnIn(courseId: string; courseWorkId: string; id: string; aTurnInStudentSubmissionRequest : TTurnInStudentSubmissionRequest) : TEmpty;
  1067. Function Reclaim(courseId: string; courseWorkId: string; id: string; aReclaimStudentSubmissionRequest : TReclaimStudentSubmissionRequest) : TEmpty;
  1068. Function Return(courseId: string; courseWorkId: string; id: string; aReturnStudentSubmissionRequest : TReturnStudentSubmissionRequest) : TEmpty;
  1069. Function ModifyAttachments(courseId: string; courseWorkId: string; id: string; aModifyAttachmentsRequest : TModifyAttachmentsRequest) : TStudentSubmission;
  1070. end;
  1071. { --------------------------------------------------------------------
  1072. TCoursesCourseWorkResource
  1073. --------------------------------------------------------------------}
  1074. //Optional query Options for TCoursesCourseWorkResource, method List
  1075. TCoursesCourseWorkListOptions = Record
  1076. courseWorkStates : String;
  1077. orderBy : String;
  1078. pageSize : integer;
  1079. pageToken : String;
  1080. end;
  1081. TCoursesCourseWorkResource = Class(TGoogleResource)
  1082. Private
  1083. FStudentSubmissionsInstance : TCoursesCourseWorkStudentSubmissionsResource;
  1084. Function GetStudentSubmissionsInstance : TCoursesCourseWorkStudentSubmissionsResource;virtual;
  1085. Public
  1086. Class Function ResourceName : String; override;
  1087. Class Function DefaultAPI : TGoogleAPIClass; override;
  1088. Function Create(courseId: string; aCourseWork : TCourseWork) : TCourseWork;overload;
  1089. Function Get(courseId: string; id: string) : TCourseWork;
  1090. Function List(courseId: string; AQuery : string = '') : TListCourseWorkResponse;
  1091. Function List(courseId: string; AQuery : TCoursesCourseWorklistOptions) : TListCourseWorkResponse;
  1092. Function CreateStudentSubmissionsResource(AOwner : TComponent) : TCoursesCourseWorkStudentSubmissionsResource;virtual;overload;
  1093. Function CreateStudentSubmissionsResource : TCoursesCourseWorkStudentSubmissionsResource;virtual;overload;
  1094. Property StudentSubmissionsResource : TCoursesCourseWorkStudentSubmissionsResource Read GetStudentSubmissionsInstance;
  1095. end;
  1096. { --------------------------------------------------------------------
  1097. TCoursesResource
  1098. --------------------------------------------------------------------}
  1099. //Optional query Options for TCoursesResource, method Patch
  1100. TCoursesPatchOptions = Record
  1101. updateMask : String;
  1102. end;
  1103. //Optional query Options for TCoursesResource, method List
  1104. TCoursesListOptions = Record
  1105. studentId : String;
  1106. teacherId : String;
  1107. pageSize : integer;
  1108. pageToken : String;
  1109. end;
  1110. TCoursesResource = Class(TGoogleResource)
  1111. Private
  1112. FAliasesInstance : TCoursesAliasesResource;
  1113. FTeachersInstance : TCoursesTeachersResource;
  1114. FStudentsInstance : TCoursesStudentsResource;
  1115. FCourseWorkStudentSubmissionsInstance : TCoursesCourseWorkStudentSubmissionsResource;
  1116. FCourseWorkInstance : TCoursesCourseWorkResource;
  1117. Function GetAliasesInstance : TCoursesAliasesResource;virtual;
  1118. Function GetTeachersInstance : TCoursesTeachersResource;virtual;
  1119. Function GetStudentsInstance : TCoursesStudentsResource;virtual;
  1120. Function GetCourseWorkStudentSubmissionsInstance : TCoursesCourseWorkStudentSubmissionsResource;virtual;
  1121. Function GetCourseWorkInstance : TCoursesCourseWorkResource;virtual;
  1122. Public
  1123. Class Function ResourceName : String; override;
  1124. Class Function DefaultAPI : TGoogleAPIClass; override;
  1125. Function Create(aCourse : TCourse) : TCourse;overload;
  1126. Function Get(id: string) : TCourse;
  1127. Function Update(id: string; aCourse : TCourse) : TCourse;
  1128. Function Patch(id: string; aCourse : TCourse; AQuery : string = '') : TCourse;
  1129. Function Patch(id: string; aCourse : TCourse; AQuery : TCoursespatchOptions) : TCourse;
  1130. Function Delete(id: string) : TEmpty;
  1131. Function List(AQuery : string = '') : TListCoursesResponse;
  1132. Function List(AQuery : TCourseslistOptions) : TListCoursesResponse;
  1133. Function CreateAliasesResource(AOwner : TComponent) : TCoursesAliasesResource;virtual;overload;
  1134. Function CreateAliasesResource : TCoursesAliasesResource;virtual;overload;
  1135. Function CreateTeachersResource(AOwner : TComponent) : TCoursesTeachersResource;virtual;overload;
  1136. Function CreateTeachersResource : TCoursesTeachersResource;virtual;overload;
  1137. Function CreateStudentsResource(AOwner : TComponent) : TCoursesStudentsResource;virtual;overload;
  1138. Function CreateStudentsResource : TCoursesStudentsResource;virtual;overload;
  1139. Function CreateCourseWorkStudentSubmissionsResource(AOwner : TComponent) : TCoursesCourseWorkStudentSubmissionsResource;virtual;overload;
  1140. Function CreateCourseWorkStudentSubmissionsResource : TCoursesCourseWorkStudentSubmissionsResource;virtual;overload;
  1141. Function CreateCourseWorkResource(AOwner : TComponent) : TCoursesCourseWorkResource;virtual;overload;
  1142. Function CreateCourseWorkResource : TCoursesCourseWorkResource;virtual;overload;
  1143. Property AliasesResource : TCoursesAliasesResource Read GetAliasesInstance;
  1144. Property TeachersResource : TCoursesTeachersResource Read GetTeachersInstance;
  1145. Property StudentsResource : TCoursesStudentsResource Read GetStudentsInstance;
  1146. Property CourseWorkStudentSubmissionsResource : TCoursesCourseWorkStudentSubmissionsResource Read GetCourseWorkStudentSubmissionsInstance;
  1147. Property CourseWorkResource : TCoursesCourseWorkResource Read GetCourseWorkInstance;
  1148. end;
  1149. { --------------------------------------------------------------------
  1150. TInvitationsResource
  1151. --------------------------------------------------------------------}
  1152. //Optional query Options for TInvitationsResource, method List
  1153. TInvitationsListOptions = Record
  1154. userId : String;
  1155. courseId : String;
  1156. pageSize : integer;
  1157. pageToken : String;
  1158. end;
  1159. TInvitationsResource = Class(TGoogleResource)
  1160. Public
  1161. Class Function ResourceName : String; override;
  1162. Class Function DefaultAPI : TGoogleAPIClass; override;
  1163. Function Create(aInvitation : TInvitation) : TInvitation;overload;
  1164. Function Get(id: string) : TInvitation;
  1165. Function Delete(id: string) : TEmpty;
  1166. Function List(AQuery : string = '') : TListInvitationsResponse;
  1167. Function List(AQuery : TInvitationslistOptions) : TListInvitationsResponse;
  1168. Function Accept(id: string) : TEmpty;
  1169. end;
  1170. { --------------------------------------------------------------------
  1171. TUserProfilesResource
  1172. --------------------------------------------------------------------}
  1173. TUserProfilesResource = Class(TGoogleResource)
  1174. Public
  1175. Class Function ResourceName : String; override;
  1176. Class Function DefaultAPI : TGoogleAPIClass; override;
  1177. Function Get(userId: string) : TUserProfile;
  1178. end;
  1179. { --------------------------------------------------------------------
  1180. TClassroomAPI
  1181. --------------------------------------------------------------------}
  1182. TClassroomAPI = Class(TGoogleAPI)
  1183. Private
  1184. FCoursesAliasesInstance : TCoursesAliasesResource;
  1185. FCoursesTeachersInstance : TCoursesTeachersResource;
  1186. FCoursesStudentsInstance : TCoursesStudentsResource;
  1187. FCoursesCourseWorkStudentSubmissionsInstance : TCoursesCourseWorkStudentSubmissionsResource;
  1188. FCoursesCourseWorkInstance : TCoursesCourseWorkResource;
  1189. FCoursesInstance : TCoursesResource;
  1190. FInvitationsInstance : TInvitationsResource;
  1191. FUserProfilesInstance : TUserProfilesResource;
  1192. Function GetCoursesAliasesInstance : TCoursesAliasesResource;virtual;
  1193. Function GetCoursesTeachersInstance : TCoursesTeachersResource;virtual;
  1194. Function GetCoursesStudentsInstance : TCoursesStudentsResource;virtual;
  1195. Function GetCoursesCourseWorkStudentSubmissionsInstance : TCoursesCourseWorkStudentSubmissionsResource;virtual;
  1196. Function GetCoursesCourseWorkInstance : TCoursesCourseWorkResource;virtual;
  1197. Function GetCoursesInstance : TCoursesResource;virtual;
  1198. Function GetInvitationsInstance : TInvitationsResource;virtual;
  1199. Function GetUserProfilesInstance : TUserProfilesResource;virtual;
  1200. Public
  1201. //Override class functions with API info
  1202. Class Function APIName : String; override;
  1203. Class Function APIVersion : String; override;
  1204. Class Function APIRevision : String; override;
  1205. Class Function APIID : String; override;
  1206. Class Function APITitle : String; override;
  1207. Class Function APIDescription : String; override;
  1208. Class Function APIOwnerDomain : String; override;
  1209. Class Function APIOwnerName : String; override;
  1210. Class Function APIIcon16 : String; override;
  1211. Class Function APIIcon32 : String; override;
  1212. Class Function APIdocumentationLink : String; override;
  1213. Class Function APIrootUrl : string; override;
  1214. Class Function APIbasePath : string;override;
  1215. Class Function APIbaseURL : String;override;
  1216. Class Function APIProtocol : string;override;
  1217. Class Function APIservicePath : string;override;
  1218. Class Function APIbatchPath : String;override;
  1219. Class Function APIAuthScopes : TScopeInfoArray;override;
  1220. Class Function APINeedsAuth : Boolean;override;
  1221. Class Procedure RegisterAPIResources; override;
  1222. //Add create function for resources
  1223. Function CreateCoursesAliasesResource(AOwner : TComponent) : TCoursesAliasesResource;virtual;overload;
  1224. Function CreateCoursesAliasesResource : TCoursesAliasesResource;virtual;overload;
  1225. Function CreateCoursesTeachersResource(AOwner : TComponent) : TCoursesTeachersResource;virtual;overload;
  1226. Function CreateCoursesTeachersResource : TCoursesTeachersResource;virtual;overload;
  1227. Function CreateCoursesStudentsResource(AOwner : TComponent) : TCoursesStudentsResource;virtual;overload;
  1228. Function CreateCoursesStudentsResource : TCoursesStudentsResource;virtual;overload;
  1229. Function CreateCoursesCourseWorkStudentSubmissionsResource(AOwner : TComponent) : TCoursesCourseWorkStudentSubmissionsResource;virtual;overload;
  1230. Function CreateCoursesCourseWorkStudentSubmissionsResource : TCoursesCourseWorkStudentSubmissionsResource;virtual;overload;
  1231. Function CreateCoursesCourseWorkResource(AOwner : TComponent) : TCoursesCourseWorkResource;virtual;overload;
  1232. Function CreateCoursesCourseWorkResource : TCoursesCourseWorkResource;virtual;overload;
  1233. Function CreateCoursesResource(AOwner : TComponent) : TCoursesResource;virtual;overload;
  1234. Function CreateCoursesResource : TCoursesResource;virtual;overload;
  1235. Function CreateInvitationsResource(AOwner : TComponent) : TInvitationsResource;virtual;overload;
  1236. Function CreateInvitationsResource : TInvitationsResource;virtual;overload;
  1237. Function CreateUserProfilesResource(AOwner : TComponent) : TUserProfilesResource;virtual;overload;
  1238. Function CreateUserProfilesResource : TUserProfilesResource;virtual;overload;
  1239. //Add default on-demand instances for resources
  1240. Property CoursesAliasesResource : TCoursesAliasesResource Read GetCoursesAliasesInstance;
  1241. Property CoursesTeachersResource : TCoursesTeachersResource Read GetCoursesTeachersInstance;
  1242. Property CoursesStudentsResource : TCoursesStudentsResource Read GetCoursesStudentsInstance;
  1243. Property CoursesCourseWorkStudentSubmissionsResource : TCoursesCourseWorkStudentSubmissionsResource Read GetCoursesCourseWorkStudentSubmissionsInstance;
  1244. Property CoursesCourseWorkResource : TCoursesCourseWorkResource Read GetCoursesCourseWorkInstance;
  1245. Property CoursesResource : TCoursesResource Read GetCoursesInstance;
  1246. Property InvitationsResource : TInvitationsResource Read GetInvitationsInstance;
  1247. Property UserProfilesResource : TUserProfilesResource Read GetUserProfilesInstance;
  1248. end;
  1249. implementation
  1250. { --------------------------------------------------------------------
  1251. TCourse
  1252. --------------------------------------------------------------------}
  1253. Procedure TCourse.Setid(AIndex : Integer; const AValue : String);
  1254. begin
  1255. If (Fid=AValue) then exit;
  1256. Fid:=AValue;
  1257. MarkPropertyChanged(AIndex);
  1258. end;
  1259. Procedure TCourse.Setname(AIndex : Integer; const AValue : String);
  1260. begin
  1261. If (Fname=AValue) then exit;
  1262. Fname:=AValue;
  1263. MarkPropertyChanged(AIndex);
  1264. end;
  1265. Procedure TCourse.Setsection(AIndex : Integer; const AValue : String);
  1266. begin
  1267. If (Fsection=AValue) then exit;
  1268. Fsection:=AValue;
  1269. MarkPropertyChanged(AIndex);
  1270. end;
  1271. Procedure TCourse.SetdescriptionHeading(AIndex : Integer; const AValue : String);
  1272. begin
  1273. If (FdescriptionHeading=AValue) then exit;
  1274. FdescriptionHeading:=AValue;
  1275. MarkPropertyChanged(AIndex);
  1276. end;
  1277. Procedure TCourse.Setdescription(AIndex : Integer; const AValue : String);
  1278. begin
  1279. If (Fdescription=AValue) then exit;
  1280. Fdescription:=AValue;
  1281. MarkPropertyChanged(AIndex);
  1282. end;
  1283. Procedure TCourse.Setroom(AIndex : Integer; const AValue : String);
  1284. begin
  1285. If (Froom=AValue) then exit;
  1286. Froom:=AValue;
  1287. MarkPropertyChanged(AIndex);
  1288. end;
  1289. Procedure TCourse.SetownerId(AIndex : Integer; const AValue : String);
  1290. begin
  1291. If (FownerId=AValue) then exit;
  1292. FownerId:=AValue;
  1293. MarkPropertyChanged(AIndex);
  1294. end;
  1295. Procedure TCourse.SetcreationTime(AIndex : Integer; const AValue : String);
  1296. begin
  1297. If (FcreationTime=AValue) then exit;
  1298. FcreationTime:=AValue;
  1299. MarkPropertyChanged(AIndex);
  1300. end;
  1301. Procedure TCourse.SetupdateTime(AIndex : Integer; const AValue : String);
  1302. begin
  1303. If (FupdateTime=AValue) then exit;
  1304. FupdateTime:=AValue;
  1305. MarkPropertyChanged(AIndex);
  1306. end;
  1307. Procedure TCourse.SetenrollmentCode(AIndex : Integer; const AValue : String);
  1308. begin
  1309. If (FenrollmentCode=AValue) then exit;
  1310. FenrollmentCode:=AValue;
  1311. MarkPropertyChanged(AIndex);
  1312. end;
  1313. Procedure TCourse.SetcourseState(AIndex : Integer; const AValue : String);
  1314. begin
  1315. If (FcourseState=AValue) then exit;
  1316. FcourseState:=AValue;
  1317. MarkPropertyChanged(AIndex);
  1318. end;
  1319. Procedure TCourse.SetalternateLink(AIndex : Integer; const AValue : String);
  1320. begin
  1321. If (FalternateLink=AValue) then exit;
  1322. FalternateLink:=AValue;
  1323. MarkPropertyChanged(AIndex);
  1324. end;
  1325. Procedure TCourse.SetteacherGroupEmail(AIndex : Integer; const AValue : String);
  1326. begin
  1327. If (FteacherGroupEmail=AValue) then exit;
  1328. FteacherGroupEmail:=AValue;
  1329. MarkPropertyChanged(AIndex);
  1330. end;
  1331. Procedure TCourse.SetcourseGroupEmail(AIndex : Integer; const AValue : String);
  1332. begin
  1333. If (FcourseGroupEmail=AValue) then exit;
  1334. FcourseGroupEmail:=AValue;
  1335. MarkPropertyChanged(AIndex);
  1336. end;
  1337. Procedure TCourse.SetteacherFolder(AIndex : Integer; const AValue : TDriveFolder);
  1338. begin
  1339. If (FteacherFolder=AValue) then exit;
  1340. FteacherFolder:=AValue;
  1341. MarkPropertyChanged(AIndex);
  1342. end;
  1343. Procedure TCourse.SetcourseMaterialSets(AIndex : Integer; const AValue : TCourseTypecourseMaterialSetsArray);
  1344. begin
  1345. If (FcourseMaterialSets=AValue) then exit;
  1346. FcourseMaterialSets:=AValue;
  1347. MarkPropertyChanged(AIndex);
  1348. end;
  1349. //2.6.4. bug workaround
  1350. {$IFDEF VER2_6}
  1351. Procedure TCourse.SetArrayLength(Const AName : String; ALength : Longint);
  1352. begin
  1353. Case AName of
  1354. 'coursematerialsets' : SetLength(FcourseMaterialSets,ALength);
  1355. else
  1356. Inherited SetArrayLength(AName,ALength);
  1357. end;
  1358. end;
  1359. {$ENDIF VER2_6}
  1360. { --------------------------------------------------------------------
  1361. TDriveFolder
  1362. --------------------------------------------------------------------}
  1363. Procedure TDriveFolder.Setid(AIndex : Integer; const AValue : String);
  1364. begin
  1365. If (Fid=AValue) then exit;
  1366. Fid:=AValue;
  1367. MarkPropertyChanged(AIndex);
  1368. end;
  1369. Procedure TDriveFolder.Settitle(AIndex : Integer; const AValue : String);
  1370. begin
  1371. If (Ftitle=AValue) then exit;
  1372. Ftitle:=AValue;
  1373. MarkPropertyChanged(AIndex);
  1374. end;
  1375. Procedure TDriveFolder.SetalternateLink(AIndex : Integer; const AValue : String);
  1376. begin
  1377. If (FalternateLink=AValue) then exit;
  1378. FalternateLink:=AValue;
  1379. MarkPropertyChanged(AIndex);
  1380. end;
  1381. { --------------------------------------------------------------------
  1382. TCourseMaterialSet
  1383. --------------------------------------------------------------------}
  1384. Procedure TCourseMaterialSet.Settitle(AIndex : Integer; const AValue : String);
  1385. begin
  1386. If (Ftitle=AValue) then exit;
  1387. Ftitle:=AValue;
  1388. MarkPropertyChanged(AIndex);
  1389. end;
  1390. Procedure TCourseMaterialSet.Setmaterials(AIndex : Integer; const AValue : TCourseMaterialSetTypematerialsArray);
  1391. begin
  1392. If (Fmaterials=AValue) then exit;
  1393. Fmaterials:=AValue;
  1394. MarkPropertyChanged(AIndex);
  1395. end;
  1396. //2.6.4. bug workaround
  1397. {$IFDEF VER2_6}
  1398. Procedure TCourseMaterialSet.SetArrayLength(Const AName : String; ALength : Longint);
  1399. begin
  1400. Case AName of
  1401. 'materials' : SetLength(Fmaterials,ALength);
  1402. else
  1403. Inherited SetArrayLength(AName,ALength);
  1404. end;
  1405. end;
  1406. {$ENDIF VER2_6}
  1407. { --------------------------------------------------------------------
  1408. TCourseMaterial
  1409. --------------------------------------------------------------------}
  1410. Procedure TCourseMaterial.SetdriveFile(AIndex : Integer; const AValue : TDriveFile);
  1411. begin
  1412. If (FdriveFile=AValue) then exit;
  1413. FdriveFile:=AValue;
  1414. MarkPropertyChanged(AIndex);
  1415. end;
  1416. Procedure TCourseMaterial.SetyouTubeVideo(AIndex : Integer; const AValue : TYouTubeVideo);
  1417. begin
  1418. If (FyouTubeVideo=AValue) then exit;
  1419. FyouTubeVideo:=AValue;
  1420. MarkPropertyChanged(AIndex);
  1421. end;
  1422. Procedure TCourseMaterial.Setlink(AIndex : Integer; const AValue : TLink);
  1423. begin
  1424. If (Flink=AValue) then exit;
  1425. Flink:=AValue;
  1426. MarkPropertyChanged(AIndex);
  1427. end;
  1428. Procedure TCourseMaterial.Setform(AIndex : Integer; const AValue : TForm);
  1429. begin
  1430. If (Fform=AValue) then exit;
  1431. Fform:=AValue;
  1432. MarkPropertyChanged(AIndex);
  1433. end;
  1434. { --------------------------------------------------------------------
  1435. TDriveFile
  1436. --------------------------------------------------------------------}
  1437. Procedure TDriveFile.Setid(AIndex : Integer; const AValue : String);
  1438. begin
  1439. If (Fid=AValue) then exit;
  1440. Fid:=AValue;
  1441. MarkPropertyChanged(AIndex);
  1442. end;
  1443. Procedure TDriveFile.Settitle(AIndex : Integer; const AValue : String);
  1444. begin
  1445. If (Ftitle=AValue) then exit;
  1446. Ftitle:=AValue;
  1447. MarkPropertyChanged(AIndex);
  1448. end;
  1449. Procedure TDriveFile.SetalternateLink(AIndex : Integer; const AValue : String);
  1450. begin
  1451. If (FalternateLink=AValue) then exit;
  1452. FalternateLink:=AValue;
  1453. MarkPropertyChanged(AIndex);
  1454. end;
  1455. Procedure TDriveFile.SetthumbnailUrl(AIndex : Integer; const AValue : String);
  1456. begin
  1457. If (FthumbnailUrl=AValue) then exit;
  1458. FthumbnailUrl:=AValue;
  1459. MarkPropertyChanged(AIndex);
  1460. end;
  1461. { --------------------------------------------------------------------
  1462. TYouTubeVideo
  1463. --------------------------------------------------------------------}
  1464. Procedure TYouTubeVideo.Setid(AIndex : Integer; const AValue : String);
  1465. begin
  1466. If (Fid=AValue) then exit;
  1467. Fid:=AValue;
  1468. MarkPropertyChanged(AIndex);
  1469. end;
  1470. Procedure TYouTubeVideo.Settitle(AIndex : Integer; const AValue : String);
  1471. begin
  1472. If (Ftitle=AValue) then exit;
  1473. Ftitle:=AValue;
  1474. MarkPropertyChanged(AIndex);
  1475. end;
  1476. Procedure TYouTubeVideo.SetalternateLink(AIndex : Integer; const AValue : String);
  1477. begin
  1478. If (FalternateLink=AValue) then exit;
  1479. FalternateLink:=AValue;
  1480. MarkPropertyChanged(AIndex);
  1481. end;
  1482. Procedure TYouTubeVideo.SetthumbnailUrl(AIndex : Integer; const AValue : String);
  1483. begin
  1484. If (FthumbnailUrl=AValue) then exit;
  1485. FthumbnailUrl:=AValue;
  1486. MarkPropertyChanged(AIndex);
  1487. end;
  1488. { --------------------------------------------------------------------
  1489. TLink
  1490. --------------------------------------------------------------------}
  1491. Procedure TLink.Seturl(AIndex : Integer; const AValue : String);
  1492. begin
  1493. If (Furl=AValue) then exit;
  1494. Furl:=AValue;
  1495. MarkPropertyChanged(AIndex);
  1496. end;
  1497. Procedure TLink.Settitle(AIndex : Integer; const AValue : String);
  1498. begin
  1499. If (Ftitle=AValue) then exit;
  1500. Ftitle:=AValue;
  1501. MarkPropertyChanged(AIndex);
  1502. end;
  1503. Procedure TLink.SetthumbnailUrl(AIndex : Integer; const AValue : String);
  1504. begin
  1505. If (FthumbnailUrl=AValue) then exit;
  1506. FthumbnailUrl:=AValue;
  1507. MarkPropertyChanged(AIndex);
  1508. end;
  1509. { --------------------------------------------------------------------
  1510. TForm
  1511. --------------------------------------------------------------------}
  1512. Procedure TForm.SetformUrl(AIndex : Integer; const AValue : String);
  1513. begin
  1514. If (FformUrl=AValue) then exit;
  1515. FformUrl:=AValue;
  1516. MarkPropertyChanged(AIndex);
  1517. end;
  1518. Procedure TForm.SetresponseUrl(AIndex : Integer; const AValue : String);
  1519. begin
  1520. If (FresponseUrl=AValue) then exit;
  1521. FresponseUrl:=AValue;
  1522. MarkPropertyChanged(AIndex);
  1523. end;
  1524. Procedure TForm.Settitle(AIndex : Integer; const AValue : String);
  1525. begin
  1526. If (Ftitle=AValue) then exit;
  1527. Ftitle:=AValue;
  1528. MarkPropertyChanged(AIndex);
  1529. end;
  1530. Procedure TForm.SetthumbnailUrl(AIndex : Integer; const AValue : String);
  1531. begin
  1532. If (FthumbnailUrl=AValue) then exit;
  1533. FthumbnailUrl:=AValue;
  1534. MarkPropertyChanged(AIndex);
  1535. end;
  1536. { --------------------------------------------------------------------
  1537. TEmpty
  1538. --------------------------------------------------------------------}
  1539. { --------------------------------------------------------------------
  1540. TListCoursesResponse
  1541. --------------------------------------------------------------------}
  1542. Procedure TListCoursesResponse.Setcourses(AIndex : Integer; const AValue : TListCoursesResponseTypecoursesArray);
  1543. begin
  1544. If (Fcourses=AValue) then exit;
  1545. Fcourses:=AValue;
  1546. MarkPropertyChanged(AIndex);
  1547. end;
  1548. Procedure TListCoursesResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
  1549. begin
  1550. If (FnextPageToken=AValue) then exit;
  1551. FnextPageToken:=AValue;
  1552. MarkPropertyChanged(AIndex);
  1553. end;
  1554. //2.6.4. bug workaround
  1555. {$IFDEF VER2_6}
  1556. Procedure TListCoursesResponse.SetArrayLength(Const AName : String; ALength : Longint);
  1557. begin
  1558. Case AName of
  1559. 'courses' : SetLength(Fcourses,ALength);
  1560. else
  1561. Inherited SetArrayLength(AName,ALength);
  1562. end;
  1563. end;
  1564. {$ENDIF VER2_6}
  1565. { --------------------------------------------------------------------
  1566. TCourseAlias
  1567. --------------------------------------------------------------------}
  1568. Procedure TCourseAlias.Setalias(AIndex : Integer; const AValue : String);
  1569. begin
  1570. If (Falias=AValue) then exit;
  1571. Falias:=AValue;
  1572. MarkPropertyChanged(AIndex);
  1573. end;
  1574. { --------------------------------------------------------------------
  1575. TListCourseAliasesResponse
  1576. --------------------------------------------------------------------}
  1577. Procedure TListCourseAliasesResponse.Setaliases(AIndex : Integer; const AValue : TListCourseAliasesResponseTypealiasesArray);
  1578. begin
  1579. If (Faliases=AValue) then exit;
  1580. Faliases:=AValue;
  1581. MarkPropertyChanged(AIndex);
  1582. end;
  1583. Procedure TListCourseAliasesResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
  1584. begin
  1585. If (FnextPageToken=AValue) then exit;
  1586. FnextPageToken:=AValue;
  1587. MarkPropertyChanged(AIndex);
  1588. end;
  1589. //2.6.4. bug workaround
  1590. {$IFDEF VER2_6}
  1591. Procedure TListCourseAliasesResponse.SetArrayLength(Const AName : String; ALength : Longint);
  1592. begin
  1593. Case AName of
  1594. 'aliases' : SetLength(Faliases,ALength);
  1595. else
  1596. Inherited SetArrayLength(AName,ALength);
  1597. end;
  1598. end;
  1599. {$ENDIF VER2_6}
  1600. { --------------------------------------------------------------------
  1601. TInvitation
  1602. --------------------------------------------------------------------}
  1603. Procedure TInvitation.Setid(AIndex : Integer; const AValue : String);
  1604. begin
  1605. If (Fid=AValue) then exit;
  1606. Fid:=AValue;
  1607. MarkPropertyChanged(AIndex);
  1608. end;
  1609. Procedure TInvitation.SetuserId(AIndex : Integer; const AValue : String);
  1610. begin
  1611. If (FuserId=AValue) then exit;
  1612. FuserId:=AValue;
  1613. MarkPropertyChanged(AIndex);
  1614. end;
  1615. Procedure TInvitation.SetcourseId(AIndex : Integer; const AValue : String);
  1616. begin
  1617. If (FcourseId=AValue) then exit;
  1618. FcourseId:=AValue;
  1619. MarkPropertyChanged(AIndex);
  1620. end;
  1621. Procedure TInvitation.Setrole(AIndex : Integer; const AValue : String);
  1622. begin
  1623. If (Frole=AValue) then exit;
  1624. Frole:=AValue;
  1625. MarkPropertyChanged(AIndex);
  1626. end;
  1627. { --------------------------------------------------------------------
  1628. TListInvitationsResponse
  1629. --------------------------------------------------------------------}
  1630. Procedure TListInvitationsResponse.Setinvitations(AIndex : Integer; const AValue : TListInvitationsResponseTypeinvitationsArray);
  1631. begin
  1632. If (Finvitations=AValue) then exit;
  1633. Finvitations:=AValue;
  1634. MarkPropertyChanged(AIndex);
  1635. end;
  1636. Procedure TListInvitationsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
  1637. begin
  1638. If (FnextPageToken=AValue) then exit;
  1639. FnextPageToken:=AValue;
  1640. MarkPropertyChanged(AIndex);
  1641. end;
  1642. //2.6.4. bug workaround
  1643. {$IFDEF VER2_6}
  1644. Procedure TListInvitationsResponse.SetArrayLength(Const AName : String; ALength : Longint);
  1645. begin
  1646. Case AName of
  1647. 'invitations' : SetLength(Finvitations,ALength);
  1648. else
  1649. Inherited SetArrayLength(AName,ALength);
  1650. end;
  1651. end;
  1652. {$ENDIF VER2_6}
  1653. { --------------------------------------------------------------------
  1654. TUserProfile
  1655. --------------------------------------------------------------------}
  1656. Procedure TUserProfile.Setid(AIndex : Integer; const AValue : String);
  1657. begin
  1658. If (Fid=AValue) then exit;
  1659. Fid:=AValue;
  1660. MarkPropertyChanged(AIndex);
  1661. end;
  1662. Procedure TUserProfile.Setname(AIndex : Integer; const AValue : TName);
  1663. begin
  1664. If (Fname=AValue) then exit;
  1665. Fname:=AValue;
  1666. MarkPropertyChanged(AIndex);
  1667. end;
  1668. Procedure TUserProfile.SetemailAddress(AIndex : Integer; const AValue : String);
  1669. begin
  1670. If (FemailAddress=AValue) then exit;
  1671. FemailAddress:=AValue;
  1672. MarkPropertyChanged(AIndex);
  1673. end;
  1674. Procedure TUserProfile.SetphotoUrl(AIndex : Integer; const AValue : String);
  1675. begin
  1676. If (FphotoUrl=AValue) then exit;
  1677. FphotoUrl:=AValue;
  1678. MarkPropertyChanged(AIndex);
  1679. end;
  1680. Procedure TUserProfile.Setpermissions(AIndex : Integer; const AValue : TUserProfileTypepermissionsArray);
  1681. begin
  1682. If (Fpermissions=AValue) then exit;
  1683. Fpermissions:=AValue;
  1684. MarkPropertyChanged(AIndex);
  1685. end;
  1686. //2.6.4. bug workaround
  1687. {$IFDEF VER2_6}
  1688. Procedure TUserProfile.SetArrayLength(Const AName : String; ALength : Longint);
  1689. begin
  1690. Case AName of
  1691. 'permissions' : SetLength(Fpermissions,ALength);
  1692. else
  1693. Inherited SetArrayLength(AName,ALength);
  1694. end;
  1695. end;
  1696. {$ENDIF VER2_6}
  1697. { --------------------------------------------------------------------
  1698. TName
  1699. --------------------------------------------------------------------}
  1700. Procedure TName.SetgivenName(AIndex : Integer; const AValue : String);
  1701. begin
  1702. If (FgivenName=AValue) then exit;
  1703. FgivenName:=AValue;
  1704. MarkPropertyChanged(AIndex);
  1705. end;
  1706. Procedure TName.SetfamilyName(AIndex : Integer; const AValue : String);
  1707. begin
  1708. If (FfamilyName=AValue) then exit;
  1709. FfamilyName:=AValue;
  1710. MarkPropertyChanged(AIndex);
  1711. end;
  1712. Procedure TName.SetfullName(AIndex : Integer; const AValue : String);
  1713. begin
  1714. If (FfullName=AValue) then exit;
  1715. FfullName:=AValue;
  1716. MarkPropertyChanged(AIndex);
  1717. end;
  1718. { --------------------------------------------------------------------
  1719. TGlobalPermission
  1720. --------------------------------------------------------------------}
  1721. Procedure TGlobalPermission.Setpermission(AIndex : Integer; const AValue : String);
  1722. begin
  1723. If (Fpermission=AValue) then exit;
  1724. Fpermission:=AValue;
  1725. MarkPropertyChanged(AIndex);
  1726. end;
  1727. { --------------------------------------------------------------------
  1728. TTeacher
  1729. --------------------------------------------------------------------}
  1730. Procedure TTeacher.SetcourseId(AIndex : Integer; const AValue : String);
  1731. begin
  1732. If (FcourseId=AValue) then exit;
  1733. FcourseId:=AValue;
  1734. MarkPropertyChanged(AIndex);
  1735. end;
  1736. Procedure TTeacher.SetuserId(AIndex : Integer; const AValue : String);
  1737. begin
  1738. If (FuserId=AValue) then exit;
  1739. FuserId:=AValue;
  1740. MarkPropertyChanged(AIndex);
  1741. end;
  1742. Procedure TTeacher.Setprofile(AIndex : Integer; const AValue : TUserProfile);
  1743. begin
  1744. If (Fprofile=AValue) then exit;
  1745. Fprofile:=AValue;
  1746. MarkPropertyChanged(AIndex);
  1747. end;
  1748. { --------------------------------------------------------------------
  1749. TListTeachersResponse
  1750. --------------------------------------------------------------------}
  1751. Procedure TListTeachersResponse.Setteachers(AIndex : Integer; const AValue : TListTeachersResponseTypeteachersArray);
  1752. begin
  1753. If (Fteachers=AValue) then exit;
  1754. Fteachers:=AValue;
  1755. MarkPropertyChanged(AIndex);
  1756. end;
  1757. Procedure TListTeachersResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
  1758. begin
  1759. If (FnextPageToken=AValue) then exit;
  1760. FnextPageToken:=AValue;
  1761. MarkPropertyChanged(AIndex);
  1762. end;
  1763. //2.6.4. bug workaround
  1764. {$IFDEF VER2_6}
  1765. Procedure TListTeachersResponse.SetArrayLength(Const AName : String; ALength : Longint);
  1766. begin
  1767. Case AName of
  1768. 'teachers' : SetLength(Fteachers,ALength);
  1769. else
  1770. Inherited SetArrayLength(AName,ALength);
  1771. end;
  1772. end;
  1773. {$ENDIF VER2_6}
  1774. { --------------------------------------------------------------------
  1775. TStudent
  1776. --------------------------------------------------------------------}
  1777. Procedure TStudent.SetcourseId(AIndex : Integer; const AValue : String);
  1778. begin
  1779. If (FcourseId=AValue) then exit;
  1780. FcourseId:=AValue;
  1781. MarkPropertyChanged(AIndex);
  1782. end;
  1783. Procedure TStudent.SetuserId(AIndex : Integer; const AValue : String);
  1784. begin
  1785. If (FuserId=AValue) then exit;
  1786. FuserId:=AValue;
  1787. MarkPropertyChanged(AIndex);
  1788. end;
  1789. Procedure TStudent.Setprofile(AIndex : Integer; const AValue : TUserProfile);
  1790. begin
  1791. If (Fprofile=AValue) then exit;
  1792. Fprofile:=AValue;
  1793. MarkPropertyChanged(AIndex);
  1794. end;
  1795. Procedure TStudent.SetstudentWorkFolder(AIndex : Integer; const AValue : TDriveFolder);
  1796. begin
  1797. If (FstudentWorkFolder=AValue) then exit;
  1798. FstudentWorkFolder:=AValue;
  1799. MarkPropertyChanged(AIndex);
  1800. end;
  1801. { --------------------------------------------------------------------
  1802. TListStudentsResponse
  1803. --------------------------------------------------------------------}
  1804. Procedure TListStudentsResponse.Setstudents(AIndex : Integer; const AValue : TListStudentsResponseTypestudentsArray);
  1805. begin
  1806. If (Fstudents=AValue) then exit;
  1807. Fstudents:=AValue;
  1808. MarkPropertyChanged(AIndex);
  1809. end;
  1810. Procedure TListStudentsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
  1811. begin
  1812. If (FnextPageToken=AValue) then exit;
  1813. FnextPageToken:=AValue;
  1814. MarkPropertyChanged(AIndex);
  1815. end;
  1816. //2.6.4. bug workaround
  1817. {$IFDEF VER2_6}
  1818. Procedure TListStudentsResponse.SetArrayLength(Const AName : String; ALength : Longint);
  1819. begin
  1820. Case AName of
  1821. 'students' : SetLength(Fstudents,ALength);
  1822. else
  1823. Inherited SetArrayLength(AName,ALength);
  1824. end;
  1825. end;
  1826. {$ENDIF VER2_6}
  1827. { --------------------------------------------------------------------
  1828. TCourseWork
  1829. --------------------------------------------------------------------}
  1830. Procedure TCourseWork.SetcourseId(AIndex : Integer; const AValue : String);
  1831. begin
  1832. If (FcourseId=AValue) then exit;
  1833. FcourseId:=AValue;
  1834. MarkPropertyChanged(AIndex);
  1835. end;
  1836. Procedure TCourseWork.Setid(AIndex : Integer; const AValue : String);
  1837. begin
  1838. If (Fid=AValue) then exit;
  1839. Fid:=AValue;
  1840. MarkPropertyChanged(AIndex);
  1841. end;
  1842. Procedure TCourseWork.Settitle(AIndex : Integer; const AValue : String);
  1843. begin
  1844. If (Ftitle=AValue) then exit;
  1845. Ftitle:=AValue;
  1846. MarkPropertyChanged(AIndex);
  1847. end;
  1848. Procedure TCourseWork.Setdescription(AIndex : Integer; const AValue : String);
  1849. begin
  1850. If (Fdescription=AValue) then exit;
  1851. Fdescription:=AValue;
  1852. MarkPropertyChanged(AIndex);
  1853. end;
  1854. Procedure TCourseWork.Setmaterials(AIndex : Integer; const AValue : TCourseWorkTypematerialsArray);
  1855. begin
  1856. If (Fmaterials=AValue) then exit;
  1857. Fmaterials:=AValue;
  1858. MarkPropertyChanged(AIndex);
  1859. end;
  1860. Procedure TCourseWork.Setstate(AIndex : Integer; const AValue : String);
  1861. begin
  1862. If (Fstate=AValue) then exit;
  1863. Fstate:=AValue;
  1864. MarkPropertyChanged(AIndex);
  1865. end;
  1866. Procedure TCourseWork.SetalternateLink(AIndex : Integer; const AValue : String);
  1867. begin
  1868. If (FalternateLink=AValue) then exit;
  1869. FalternateLink:=AValue;
  1870. MarkPropertyChanged(AIndex);
  1871. end;
  1872. Procedure TCourseWork.SetcreationTime(AIndex : Integer; const AValue : String);
  1873. begin
  1874. If (FcreationTime=AValue) then exit;
  1875. FcreationTime:=AValue;
  1876. MarkPropertyChanged(AIndex);
  1877. end;
  1878. Procedure TCourseWork.SetupdateTime(AIndex : Integer; const AValue : String);
  1879. begin
  1880. If (FupdateTime=AValue) then exit;
  1881. FupdateTime:=AValue;
  1882. MarkPropertyChanged(AIndex);
  1883. end;
  1884. Procedure TCourseWork.SetdueDate(AIndex : Integer; const AValue : TDate);
  1885. begin
  1886. If (FdueDate=AValue) then exit;
  1887. FdueDate:=AValue;
  1888. MarkPropertyChanged(AIndex);
  1889. end;
  1890. Procedure TCourseWork.SetdueTime(AIndex : Integer; const AValue : TTimeOfDay);
  1891. begin
  1892. If (FdueTime=AValue) then exit;
  1893. FdueTime:=AValue;
  1894. MarkPropertyChanged(AIndex);
  1895. end;
  1896. Procedure TCourseWork.SetmaxPoints(AIndex : Integer; const AValue : double);
  1897. begin
  1898. If (FmaxPoints=AValue) then exit;
  1899. FmaxPoints:=AValue;
  1900. MarkPropertyChanged(AIndex);
  1901. end;
  1902. Procedure TCourseWork.SetworkType(AIndex : Integer; const AValue : String);
  1903. begin
  1904. If (FworkType=AValue) then exit;
  1905. FworkType:=AValue;
  1906. MarkPropertyChanged(AIndex);
  1907. end;
  1908. Procedure TCourseWork.SetassociatedWithDeveloper(AIndex : Integer; const AValue : boolean);
  1909. begin
  1910. If (FassociatedWithDeveloper=AValue) then exit;
  1911. FassociatedWithDeveloper:=AValue;
  1912. MarkPropertyChanged(AIndex);
  1913. end;
  1914. Procedure TCourseWork.SetsubmissionModificationMode(AIndex : Integer; const AValue : String);
  1915. begin
  1916. If (FsubmissionModificationMode=AValue) then exit;
  1917. FsubmissionModificationMode:=AValue;
  1918. MarkPropertyChanged(AIndex);
  1919. end;
  1920. Procedure TCourseWork.Setassignment(AIndex : Integer; const AValue : TAssignment);
  1921. begin
  1922. If (Fassignment=AValue) then exit;
  1923. Fassignment:=AValue;
  1924. MarkPropertyChanged(AIndex);
  1925. end;
  1926. Procedure TCourseWork.SetmultipleChoiceQuestion(AIndex : Integer; const AValue : TMultipleChoiceQuestion);
  1927. begin
  1928. If (FmultipleChoiceQuestion=AValue) then exit;
  1929. FmultipleChoiceQuestion:=AValue;
  1930. MarkPropertyChanged(AIndex);
  1931. end;
  1932. //2.6.4. bug workaround
  1933. {$IFDEF VER2_6}
  1934. Procedure TCourseWork.SetArrayLength(Const AName : String; ALength : Longint);
  1935. begin
  1936. Case AName of
  1937. 'materials' : SetLength(Fmaterials,ALength);
  1938. else
  1939. Inherited SetArrayLength(AName,ALength);
  1940. end;
  1941. end;
  1942. {$ENDIF VER2_6}
  1943. { --------------------------------------------------------------------
  1944. TMaterial
  1945. --------------------------------------------------------------------}
  1946. Procedure TMaterial.SetdriveFile(AIndex : Integer; const AValue : TSharedDriveFile);
  1947. begin
  1948. If (FdriveFile=AValue) then exit;
  1949. FdriveFile:=AValue;
  1950. MarkPropertyChanged(AIndex);
  1951. end;
  1952. Procedure TMaterial.SetyoutubeVideo(AIndex : Integer; const AValue : TYouTubeVideo);
  1953. begin
  1954. If (FyoutubeVideo=AValue) then exit;
  1955. FyoutubeVideo:=AValue;
  1956. MarkPropertyChanged(AIndex);
  1957. end;
  1958. Procedure TMaterial.Setlink(AIndex : Integer; const AValue : TLink);
  1959. begin
  1960. If (Flink=AValue) then exit;
  1961. Flink:=AValue;
  1962. MarkPropertyChanged(AIndex);
  1963. end;
  1964. Procedure TMaterial.Setform(AIndex : Integer; const AValue : TForm);
  1965. begin
  1966. If (Fform=AValue) then exit;
  1967. Fform:=AValue;
  1968. MarkPropertyChanged(AIndex);
  1969. end;
  1970. { --------------------------------------------------------------------
  1971. TSharedDriveFile
  1972. --------------------------------------------------------------------}
  1973. Procedure TSharedDriveFile.SetdriveFile(AIndex : Integer; const AValue : TDriveFile);
  1974. begin
  1975. If (FdriveFile=AValue) then exit;
  1976. FdriveFile:=AValue;
  1977. MarkPropertyChanged(AIndex);
  1978. end;
  1979. Procedure TSharedDriveFile.SetshareMode(AIndex : Integer; const AValue : String);
  1980. begin
  1981. If (FshareMode=AValue) then exit;
  1982. FshareMode:=AValue;
  1983. MarkPropertyChanged(AIndex);
  1984. end;
  1985. { --------------------------------------------------------------------
  1986. TDate
  1987. --------------------------------------------------------------------}
  1988. Procedure TDate.Setyear(AIndex : Integer; const AValue : integer);
  1989. begin
  1990. If (Fyear=AValue) then exit;
  1991. Fyear:=AValue;
  1992. MarkPropertyChanged(AIndex);
  1993. end;
  1994. Procedure TDate.Setmonth(AIndex : Integer; const AValue : integer);
  1995. begin
  1996. If (Fmonth=AValue) then exit;
  1997. Fmonth:=AValue;
  1998. MarkPropertyChanged(AIndex);
  1999. end;
  2000. Procedure TDate.Setday(AIndex : Integer; const AValue : integer);
  2001. begin
  2002. If (Fday=AValue) then exit;
  2003. Fday:=AValue;
  2004. MarkPropertyChanged(AIndex);
  2005. end;
  2006. { --------------------------------------------------------------------
  2007. TTimeOfDay
  2008. --------------------------------------------------------------------}
  2009. Procedure TTimeOfDay.Sethours(AIndex : Integer; const AValue : integer);
  2010. begin
  2011. If (Fhours=AValue) then exit;
  2012. Fhours:=AValue;
  2013. MarkPropertyChanged(AIndex);
  2014. end;
  2015. Procedure TTimeOfDay.Setminutes(AIndex : Integer; const AValue : integer);
  2016. begin
  2017. If (Fminutes=AValue) then exit;
  2018. Fminutes:=AValue;
  2019. MarkPropertyChanged(AIndex);
  2020. end;
  2021. Procedure TTimeOfDay.Setseconds(AIndex : Integer; const AValue : integer);
  2022. begin
  2023. If (Fseconds=AValue) then exit;
  2024. Fseconds:=AValue;
  2025. MarkPropertyChanged(AIndex);
  2026. end;
  2027. Procedure TTimeOfDay.Setnanos(AIndex : Integer; const AValue : integer);
  2028. begin
  2029. If (Fnanos=AValue) then exit;
  2030. Fnanos:=AValue;
  2031. MarkPropertyChanged(AIndex);
  2032. end;
  2033. { --------------------------------------------------------------------
  2034. TAssignment
  2035. --------------------------------------------------------------------}
  2036. Procedure TAssignment.SetstudentWorkFolder(AIndex : Integer; const AValue : TDriveFolder);
  2037. begin
  2038. If (FstudentWorkFolder=AValue) then exit;
  2039. FstudentWorkFolder:=AValue;
  2040. MarkPropertyChanged(AIndex);
  2041. end;
  2042. { --------------------------------------------------------------------
  2043. TMultipleChoiceQuestion
  2044. --------------------------------------------------------------------}
  2045. Procedure TMultipleChoiceQuestion.Setchoices(AIndex : Integer; const AValue : TStringArray);
  2046. begin
  2047. If (Fchoices=AValue) then exit;
  2048. Fchoices:=AValue;
  2049. MarkPropertyChanged(AIndex);
  2050. end;
  2051. //2.6.4. bug workaround
  2052. {$IFDEF VER2_6}
  2053. Procedure TMultipleChoiceQuestion.SetArrayLength(Const AName : String; ALength : Longint);
  2054. begin
  2055. Case AName of
  2056. 'choices' : SetLength(Fchoices,ALength);
  2057. else
  2058. Inherited SetArrayLength(AName,ALength);
  2059. end;
  2060. end;
  2061. {$ENDIF VER2_6}
  2062. { --------------------------------------------------------------------
  2063. TListCourseWorkResponse
  2064. --------------------------------------------------------------------}
  2065. Procedure TListCourseWorkResponse.SetcourseWork(AIndex : Integer; const AValue : TListCourseWorkResponseTypecourseWorkArray);
  2066. begin
  2067. If (FcourseWork=AValue) then exit;
  2068. FcourseWork:=AValue;
  2069. MarkPropertyChanged(AIndex);
  2070. end;
  2071. Procedure TListCourseWorkResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
  2072. begin
  2073. If (FnextPageToken=AValue) then exit;
  2074. FnextPageToken:=AValue;
  2075. MarkPropertyChanged(AIndex);
  2076. end;
  2077. //2.6.4. bug workaround
  2078. {$IFDEF VER2_6}
  2079. Procedure TListCourseWorkResponse.SetArrayLength(Const AName : String; ALength : Longint);
  2080. begin
  2081. Case AName of
  2082. 'coursework' : SetLength(FcourseWork,ALength);
  2083. else
  2084. Inherited SetArrayLength(AName,ALength);
  2085. end;
  2086. end;
  2087. {$ENDIF VER2_6}
  2088. { --------------------------------------------------------------------
  2089. TStudentSubmission
  2090. --------------------------------------------------------------------}
  2091. Procedure TStudentSubmission.SetcourseId(AIndex : Integer; const AValue : String);
  2092. begin
  2093. If (FcourseId=AValue) then exit;
  2094. FcourseId:=AValue;
  2095. MarkPropertyChanged(AIndex);
  2096. end;
  2097. Procedure TStudentSubmission.SetcourseWorkId(AIndex : Integer; const AValue : String);
  2098. begin
  2099. If (FcourseWorkId=AValue) then exit;
  2100. FcourseWorkId:=AValue;
  2101. MarkPropertyChanged(AIndex);
  2102. end;
  2103. Procedure TStudentSubmission.Setid(AIndex : Integer; const AValue : String);
  2104. begin
  2105. If (Fid=AValue) then exit;
  2106. Fid:=AValue;
  2107. MarkPropertyChanged(AIndex);
  2108. end;
  2109. Procedure TStudentSubmission.SetuserId(AIndex : Integer; const AValue : String);
  2110. begin
  2111. If (FuserId=AValue) then exit;
  2112. FuserId:=AValue;
  2113. MarkPropertyChanged(AIndex);
  2114. end;
  2115. Procedure TStudentSubmission.SetcreationTime(AIndex : Integer; const AValue : String);
  2116. begin
  2117. If (FcreationTime=AValue) then exit;
  2118. FcreationTime:=AValue;
  2119. MarkPropertyChanged(AIndex);
  2120. end;
  2121. Procedure TStudentSubmission.SetupdateTime(AIndex : Integer; const AValue : String);
  2122. begin
  2123. If (FupdateTime=AValue) then exit;
  2124. FupdateTime:=AValue;
  2125. MarkPropertyChanged(AIndex);
  2126. end;
  2127. Procedure TStudentSubmission.Setstate(AIndex : Integer; const AValue : String);
  2128. begin
  2129. If (Fstate=AValue) then exit;
  2130. Fstate:=AValue;
  2131. MarkPropertyChanged(AIndex);
  2132. end;
  2133. Procedure TStudentSubmission.Setlate(AIndex : Integer; const AValue : boolean);
  2134. begin
  2135. If (Flate=AValue) then exit;
  2136. Flate:=AValue;
  2137. MarkPropertyChanged(AIndex);
  2138. end;
  2139. Procedure TStudentSubmission.SetdraftGrade(AIndex : Integer; const AValue : double);
  2140. begin
  2141. If (FdraftGrade=AValue) then exit;
  2142. FdraftGrade:=AValue;
  2143. MarkPropertyChanged(AIndex);
  2144. end;
  2145. Procedure TStudentSubmission.SetassignedGrade(AIndex : Integer; const AValue : double);
  2146. begin
  2147. If (FassignedGrade=AValue) then exit;
  2148. FassignedGrade:=AValue;
  2149. MarkPropertyChanged(AIndex);
  2150. end;
  2151. Procedure TStudentSubmission.SetalternateLink(AIndex : Integer; const AValue : String);
  2152. begin
  2153. If (FalternateLink=AValue) then exit;
  2154. FalternateLink:=AValue;
  2155. MarkPropertyChanged(AIndex);
  2156. end;
  2157. Procedure TStudentSubmission.SetcourseWorkType(AIndex : Integer; const AValue : String);
  2158. begin
  2159. If (FcourseWorkType=AValue) then exit;
  2160. FcourseWorkType:=AValue;
  2161. MarkPropertyChanged(AIndex);
  2162. end;
  2163. Procedure TStudentSubmission.SetassociatedWithDeveloper(AIndex : Integer; const AValue : boolean);
  2164. begin
  2165. If (FassociatedWithDeveloper=AValue) then exit;
  2166. FassociatedWithDeveloper:=AValue;
  2167. MarkPropertyChanged(AIndex);
  2168. end;
  2169. Procedure TStudentSubmission.SetassignmentSubmission(AIndex : Integer; const AValue : TAssignmentSubmission);
  2170. begin
  2171. If (FassignmentSubmission=AValue) then exit;
  2172. FassignmentSubmission:=AValue;
  2173. MarkPropertyChanged(AIndex);
  2174. end;
  2175. Procedure TStudentSubmission.SetshortAnswerSubmission(AIndex : Integer; const AValue : TShortAnswerSubmission);
  2176. begin
  2177. If (FshortAnswerSubmission=AValue) then exit;
  2178. FshortAnswerSubmission:=AValue;
  2179. MarkPropertyChanged(AIndex);
  2180. end;
  2181. Procedure TStudentSubmission.SetmultipleChoiceSubmission(AIndex : Integer; const AValue : TMultipleChoiceSubmission);
  2182. begin
  2183. If (FmultipleChoiceSubmission=AValue) then exit;
  2184. FmultipleChoiceSubmission:=AValue;
  2185. MarkPropertyChanged(AIndex);
  2186. end;
  2187. { --------------------------------------------------------------------
  2188. TAssignmentSubmission
  2189. --------------------------------------------------------------------}
  2190. Procedure TAssignmentSubmission.Setattachments(AIndex : Integer; const AValue : TAssignmentSubmissionTypeattachmentsArray);
  2191. begin
  2192. If (Fattachments=AValue) then exit;
  2193. Fattachments:=AValue;
  2194. MarkPropertyChanged(AIndex);
  2195. end;
  2196. //2.6.4. bug workaround
  2197. {$IFDEF VER2_6}
  2198. Procedure TAssignmentSubmission.SetArrayLength(Const AName : String; ALength : Longint);
  2199. begin
  2200. Case AName of
  2201. 'attachments' : SetLength(Fattachments,ALength);
  2202. else
  2203. Inherited SetArrayLength(AName,ALength);
  2204. end;
  2205. end;
  2206. {$ENDIF VER2_6}
  2207. { --------------------------------------------------------------------
  2208. TAttachment
  2209. --------------------------------------------------------------------}
  2210. Procedure TAttachment.SetdriveFile(AIndex : Integer; const AValue : TDriveFile);
  2211. begin
  2212. If (FdriveFile=AValue) then exit;
  2213. FdriveFile:=AValue;
  2214. MarkPropertyChanged(AIndex);
  2215. end;
  2216. Procedure TAttachment.SetyouTubeVideo(AIndex : Integer; const AValue : TYouTubeVideo);
  2217. begin
  2218. If (FyouTubeVideo=AValue) then exit;
  2219. FyouTubeVideo:=AValue;
  2220. MarkPropertyChanged(AIndex);
  2221. end;
  2222. Procedure TAttachment.Setlink(AIndex : Integer; const AValue : TLink);
  2223. begin
  2224. If (Flink=AValue) then exit;
  2225. Flink:=AValue;
  2226. MarkPropertyChanged(AIndex);
  2227. end;
  2228. Procedure TAttachment.Setform(AIndex : Integer; const AValue : TForm);
  2229. begin
  2230. If (Fform=AValue) then exit;
  2231. Fform:=AValue;
  2232. MarkPropertyChanged(AIndex);
  2233. end;
  2234. { --------------------------------------------------------------------
  2235. TShortAnswerSubmission
  2236. --------------------------------------------------------------------}
  2237. Procedure TShortAnswerSubmission.Setanswer(AIndex : Integer; const AValue : String);
  2238. begin
  2239. If (Fanswer=AValue) then exit;
  2240. Fanswer:=AValue;
  2241. MarkPropertyChanged(AIndex);
  2242. end;
  2243. { --------------------------------------------------------------------
  2244. TMultipleChoiceSubmission
  2245. --------------------------------------------------------------------}
  2246. Procedure TMultipleChoiceSubmission.Setanswer(AIndex : Integer; const AValue : String);
  2247. begin
  2248. If (Fanswer=AValue) then exit;
  2249. Fanswer:=AValue;
  2250. MarkPropertyChanged(AIndex);
  2251. end;
  2252. { --------------------------------------------------------------------
  2253. TListStudentSubmissionsResponse
  2254. --------------------------------------------------------------------}
  2255. Procedure TListStudentSubmissionsResponse.SetstudentSubmissions(AIndex : Integer; const AValue : TListStudentSubmissionsResponseTypestudentSubmissionsArray);
  2256. begin
  2257. If (FstudentSubmissions=AValue) then exit;
  2258. FstudentSubmissions:=AValue;
  2259. MarkPropertyChanged(AIndex);
  2260. end;
  2261. Procedure TListStudentSubmissionsResponse.SetnextPageToken(AIndex : Integer; const AValue : String);
  2262. begin
  2263. If (FnextPageToken=AValue) then exit;
  2264. FnextPageToken:=AValue;
  2265. MarkPropertyChanged(AIndex);
  2266. end;
  2267. //2.6.4. bug workaround
  2268. {$IFDEF VER2_6}
  2269. Procedure TListStudentSubmissionsResponse.SetArrayLength(Const AName : String; ALength : Longint);
  2270. begin
  2271. Case AName of
  2272. 'studentsubmissions' : SetLength(FstudentSubmissions,ALength);
  2273. else
  2274. Inherited SetArrayLength(AName,ALength);
  2275. end;
  2276. end;
  2277. {$ENDIF VER2_6}
  2278. { --------------------------------------------------------------------
  2279. TTurnInStudentSubmissionRequest
  2280. --------------------------------------------------------------------}
  2281. { --------------------------------------------------------------------
  2282. TReclaimStudentSubmissionRequest
  2283. --------------------------------------------------------------------}
  2284. { --------------------------------------------------------------------
  2285. TReturnStudentSubmissionRequest
  2286. --------------------------------------------------------------------}
  2287. { --------------------------------------------------------------------
  2288. TModifyAttachmentsRequest
  2289. --------------------------------------------------------------------}
  2290. Procedure TModifyAttachmentsRequest.SetaddAttachments(AIndex : Integer; const AValue : TModifyAttachmentsRequestTypeaddAttachmentsArray);
  2291. begin
  2292. If (FaddAttachments=AValue) then exit;
  2293. FaddAttachments:=AValue;
  2294. MarkPropertyChanged(AIndex);
  2295. end;
  2296. //2.6.4. bug workaround
  2297. {$IFDEF VER2_6}
  2298. Procedure TModifyAttachmentsRequest.SetArrayLength(Const AName : String; ALength : Longint);
  2299. begin
  2300. Case AName of
  2301. 'addattachments' : SetLength(FaddAttachments,ALength);
  2302. else
  2303. Inherited SetArrayLength(AName,ALength);
  2304. end;
  2305. end;
  2306. {$ENDIF VER2_6}
  2307. { --------------------------------------------------------------------
  2308. TCoursesAliasesResource
  2309. --------------------------------------------------------------------}
  2310. Class Function TCoursesAliasesResource.ResourceName : String;
  2311. begin
  2312. Result:='aliases';
  2313. end;
  2314. Class Function TCoursesAliasesResource.DefaultAPI : TGoogleAPIClass;
  2315. begin
  2316. Result:=TclassroomAPI;
  2317. end;
  2318. Function TCoursesAliasesResource.Create(courseId: string; aCourseAlias : TCourseAlias) : TCourseAlias;
  2319. Const
  2320. _HTTPMethod = 'POST';
  2321. _Path = 'v1/courses/{courseId}/aliases';
  2322. _Methodid = 'classroom.courses.aliases.create';
  2323. Var
  2324. _P : String;
  2325. begin
  2326. _P:=SubstitutePath(_Path,['courseId',courseId]);
  2327. Result:=ServiceCall(_HTTPMethod,_P,'',aCourseAlias,TCourseAlias) as TCourseAlias;
  2328. end;
  2329. Function TCoursesAliasesResource.Delete(courseId: string; alias: string) : TEmpty;
  2330. Const
  2331. _HTTPMethod = 'DELETE';
  2332. _Path = 'v1/courses/{courseId}/aliases/{alias}';
  2333. _Methodid = 'classroom.courses.aliases.delete';
  2334. Var
  2335. _P : String;
  2336. begin
  2337. _P:=SubstitutePath(_Path,['courseId',courseId,'alias',alias]);
  2338. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
  2339. end;
  2340. Function TCoursesAliasesResource.List(courseId: string; AQuery : string = '') : TListCourseAliasesResponse;
  2341. Const
  2342. _HTTPMethod = 'GET';
  2343. _Path = 'v1/courses/{courseId}/aliases';
  2344. _Methodid = 'classroom.courses.aliases.list';
  2345. Var
  2346. _P : String;
  2347. begin
  2348. _P:=SubstitutePath(_Path,['courseId',courseId]);
  2349. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListCourseAliasesResponse) as TListCourseAliasesResponse;
  2350. end;
  2351. Function TCoursesAliasesResource.List(courseId: string; AQuery : TCoursesAliaseslistOptions) : TListCourseAliasesResponse;
  2352. Var
  2353. _Q : String;
  2354. begin
  2355. _Q:='';
  2356. AddToQuery(_Q,'pageSize',AQuery.pageSize);
  2357. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2358. Result:=List(courseId,_Q);
  2359. end;
  2360. { --------------------------------------------------------------------
  2361. TCoursesTeachersResource
  2362. --------------------------------------------------------------------}
  2363. Class Function TCoursesTeachersResource.ResourceName : String;
  2364. begin
  2365. Result:='teachers';
  2366. end;
  2367. Class Function TCoursesTeachersResource.DefaultAPI : TGoogleAPIClass;
  2368. begin
  2369. Result:=TclassroomAPI;
  2370. end;
  2371. Function TCoursesTeachersResource.Create(courseId: string; aTeacher : TTeacher) : TTeacher;
  2372. Const
  2373. _HTTPMethod = 'POST';
  2374. _Path = 'v1/courses/{courseId}/teachers';
  2375. _Methodid = 'classroom.courses.teachers.create';
  2376. Var
  2377. _P : String;
  2378. begin
  2379. _P:=SubstitutePath(_Path,['courseId',courseId]);
  2380. Result:=ServiceCall(_HTTPMethod,_P,'',aTeacher,TTeacher) as TTeacher;
  2381. end;
  2382. Function TCoursesTeachersResource.Get(courseId: string; userId: string) : TTeacher;
  2383. Const
  2384. _HTTPMethod = 'GET';
  2385. _Path = 'v1/courses/{courseId}/teachers/{userId}';
  2386. _Methodid = 'classroom.courses.teachers.get';
  2387. Var
  2388. _P : String;
  2389. begin
  2390. _P:=SubstitutePath(_Path,['courseId',courseId,'userId',userId]);
  2391. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TTeacher) as TTeacher;
  2392. end;
  2393. Function TCoursesTeachersResource.Delete(courseId: string; userId: string) : TEmpty;
  2394. Const
  2395. _HTTPMethod = 'DELETE';
  2396. _Path = 'v1/courses/{courseId}/teachers/{userId}';
  2397. _Methodid = 'classroom.courses.teachers.delete';
  2398. Var
  2399. _P : String;
  2400. begin
  2401. _P:=SubstitutePath(_Path,['courseId',courseId,'userId',userId]);
  2402. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
  2403. end;
  2404. Function TCoursesTeachersResource.List(courseId: string; AQuery : string = '') : TListTeachersResponse;
  2405. Const
  2406. _HTTPMethod = 'GET';
  2407. _Path = 'v1/courses/{courseId}/teachers';
  2408. _Methodid = 'classroom.courses.teachers.list';
  2409. Var
  2410. _P : String;
  2411. begin
  2412. _P:=SubstitutePath(_Path,['courseId',courseId]);
  2413. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListTeachersResponse) as TListTeachersResponse;
  2414. end;
  2415. Function TCoursesTeachersResource.List(courseId: string; AQuery : TCoursesTeacherslistOptions) : TListTeachersResponse;
  2416. Var
  2417. _Q : String;
  2418. begin
  2419. _Q:='';
  2420. AddToQuery(_Q,'pageSize',AQuery.pageSize);
  2421. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2422. Result:=List(courseId,_Q);
  2423. end;
  2424. { --------------------------------------------------------------------
  2425. TCoursesStudentsResource
  2426. --------------------------------------------------------------------}
  2427. Class Function TCoursesStudentsResource.ResourceName : String;
  2428. begin
  2429. Result:='students';
  2430. end;
  2431. Class Function TCoursesStudentsResource.DefaultAPI : TGoogleAPIClass;
  2432. begin
  2433. Result:=TclassroomAPI;
  2434. end;
  2435. Function TCoursesStudentsResource.Create(courseId: string; aStudent : TStudent; AQuery : string = '') : TStudent;
  2436. Const
  2437. _HTTPMethod = 'POST';
  2438. _Path = 'v1/courses/{courseId}/students';
  2439. _Methodid = 'classroom.courses.students.create';
  2440. Var
  2441. _P : String;
  2442. begin
  2443. _P:=SubstitutePath(_Path,['courseId',courseId]);
  2444. Result:=ServiceCall(_HTTPMethod,_P,AQuery,aStudent,TStudent) as TStudent;
  2445. end;
  2446. Function TCoursesStudentsResource.Create(courseId: string; aStudent : TStudent; AQuery : TCoursesStudentscreateOptions) : TStudent;
  2447. Var
  2448. _Q : String;
  2449. begin
  2450. _Q:='';
  2451. AddToQuery(_Q,'enrollmentCode',AQuery.enrollmentCode);
  2452. Result:=Create(courseId,aStudent,_Q);
  2453. end;
  2454. Function TCoursesStudentsResource.Get(courseId: string; userId: string) : TStudent;
  2455. Const
  2456. _HTTPMethod = 'GET';
  2457. _Path = 'v1/courses/{courseId}/students/{userId}';
  2458. _Methodid = 'classroom.courses.students.get';
  2459. Var
  2460. _P : String;
  2461. begin
  2462. _P:=SubstitutePath(_Path,['courseId',courseId,'userId',userId]);
  2463. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TStudent) as TStudent;
  2464. end;
  2465. Function TCoursesStudentsResource.Delete(courseId: string; userId: string) : TEmpty;
  2466. Const
  2467. _HTTPMethod = 'DELETE';
  2468. _Path = 'v1/courses/{courseId}/students/{userId}';
  2469. _Methodid = 'classroom.courses.students.delete';
  2470. Var
  2471. _P : String;
  2472. begin
  2473. _P:=SubstitutePath(_Path,['courseId',courseId,'userId',userId]);
  2474. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
  2475. end;
  2476. Function TCoursesStudentsResource.List(courseId: string; AQuery : string = '') : TListStudentsResponse;
  2477. Const
  2478. _HTTPMethod = 'GET';
  2479. _Path = 'v1/courses/{courseId}/students';
  2480. _Methodid = 'classroom.courses.students.list';
  2481. Var
  2482. _P : String;
  2483. begin
  2484. _P:=SubstitutePath(_Path,['courseId',courseId]);
  2485. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListStudentsResponse) as TListStudentsResponse;
  2486. end;
  2487. Function TCoursesStudentsResource.List(courseId: string; AQuery : TCoursesStudentslistOptions) : TListStudentsResponse;
  2488. Var
  2489. _Q : String;
  2490. begin
  2491. _Q:='';
  2492. AddToQuery(_Q,'pageSize',AQuery.pageSize);
  2493. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2494. Result:=List(courseId,_Q);
  2495. end;
  2496. { --------------------------------------------------------------------
  2497. TCoursesCourseWorkStudentSubmissionsResource
  2498. --------------------------------------------------------------------}
  2499. Class Function TCoursesCourseWorkStudentSubmissionsResource.ResourceName : String;
  2500. begin
  2501. Result:='studentSubmissions';
  2502. end;
  2503. Class Function TCoursesCourseWorkStudentSubmissionsResource.DefaultAPI : TGoogleAPIClass;
  2504. begin
  2505. Result:=TclassroomAPI;
  2506. end;
  2507. Function TCoursesCourseWorkStudentSubmissionsResource.Get(courseId: string; courseWorkId: string; id: string) : TStudentSubmission;
  2508. Const
  2509. _HTTPMethod = 'GET';
  2510. _Path = 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}';
  2511. _Methodid = 'classroom.courses.courseWork.studentSubmissions.get';
  2512. Var
  2513. _P : String;
  2514. begin
  2515. _P:=SubstitutePath(_Path,['courseId',courseId,'courseWorkId',courseWorkId,'id',id]);
  2516. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TStudentSubmission) as TStudentSubmission;
  2517. end;
  2518. Function TCoursesCourseWorkStudentSubmissionsResource.Patch(courseId: string; courseWorkId: string; id: string; aStudentSubmission : TStudentSubmission; AQuery : string = '') : TStudentSubmission;
  2519. Const
  2520. _HTTPMethod = 'PATCH';
  2521. _Path = 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}';
  2522. _Methodid = 'classroom.courses.courseWork.studentSubmissions.patch';
  2523. Var
  2524. _P : String;
  2525. begin
  2526. _P:=SubstitutePath(_Path,['courseId',courseId,'courseWorkId',courseWorkId,'id',id]);
  2527. Result:=ServiceCall(_HTTPMethod,_P,AQuery,aStudentSubmission,TStudentSubmission) as TStudentSubmission;
  2528. end;
  2529. Function TCoursesCourseWorkStudentSubmissionsResource.Patch(courseId: string; courseWorkId: string; id: string; aStudentSubmission : TStudentSubmission; AQuery : TCoursesCourseWorkStudentSubmissionspatchOptions) : TStudentSubmission;
  2530. Var
  2531. _Q : String;
  2532. begin
  2533. _Q:='';
  2534. AddToQuery(_Q,'updateMask',AQuery.updateMask);
  2535. Result:=Patch(courseId,courseWorkId,id,aStudentSubmission,_Q);
  2536. end;
  2537. Function TCoursesCourseWorkStudentSubmissionsResource.List(courseId: string; courseWorkId: string; AQuery : string = '') : TListStudentSubmissionsResponse;
  2538. Const
  2539. _HTTPMethod = 'GET';
  2540. _Path = 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions';
  2541. _Methodid = 'classroom.courses.courseWork.studentSubmissions.list';
  2542. Var
  2543. _P : String;
  2544. begin
  2545. _P:=SubstitutePath(_Path,['courseId',courseId,'courseWorkId',courseWorkId]);
  2546. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListStudentSubmissionsResponse) as TListStudentSubmissionsResponse;
  2547. end;
  2548. Function TCoursesCourseWorkStudentSubmissionsResource.List(courseId: string; courseWorkId: string; AQuery : TCoursesCourseWorkStudentSubmissionslistOptions) : TListStudentSubmissionsResponse;
  2549. Var
  2550. _Q : String;
  2551. begin
  2552. _Q:='';
  2553. AddToQuery(_Q,'userId',AQuery.userId);
  2554. AddToQuery(_Q,'states',AQuery.states);
  2555. AddToQuery(_Q,'late',AQuery.late);
  2556. AddToQuery(_Q,'pageSize',AQuery.pageSize);
  2557. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2558. Result:=List(courseId,courseWorkId,_Q);
  2559. end;
  2560. Function TCoursesCourseWorkStudentSubmissionsResource.TurnIn(courseId: string; courseWorkId: string; id: string; aTurnInStudentSubmissionRequest : TTurnInStudentSubmissionRequest) : TEmpty;
  2561. Const
  2562. _HTTPMethod = 'POST';
  2563. _Path = 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn';
  2564. _Methodid = 'classroom.courses.courseWork.studentSubmissions.turnIn';
  2565. Var
  2566. _P : String;
  2567. begin
  2568. _P:=SubstitutePath(_Path,['courseId',courseId,'courseWorkId',courseWorkId,'id',id]);
  2569. Result:=ServiceCall(_HTTPMethod,_P,'',aTurnInStudentSubmissionRequest,TEmpty) as TEmpty;
  2570. end;
  2571. Function TCoursesCourseWorkStudentSubmissionsResource.Reclaim(courseId: string; courseWorkId: string; id: string; aReclaimStudentSubmissionRequest : TReclaimStudentSubmissionRequest) : TEmpty;
  2572. Const
  2573. _HTTPMethod = 'POST';
  2574. _Path = 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim';
  2575. _Methodid = 'classroom.courses.courseWork.studentSubmissions.reclaim';
  2576. Var
  2577. _P : String;
  2578. begin
  2579. _P:=SubstitutePath(_Path,['courseId',courseId,'courseWorkId',courseWorkId,'id',id]);
  2580. Result:=ServiceCall(_HTTPMethod,_P,'',aReclaimStudentSubmissionRequest,TEmpty) as TEmpty;
  2581. end;
  2582. Function TCoursesCourseWorkStudentSubmissionsResource.Return(courseId: string; courseWorkId: string; id: string; aReturnStudentSubmissionRequest : TReturnStudentSubmissionRequest) : TEmpty;
  2583. Const
  2584. _HTTPMethod = 'POST';
  2585. _Path = 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return';
  2586. _Methodid = 'classroom.courses.courseWork.studentSubmissions.return';
  2587. Var
  2588. _P : String;
  2589. begin
  2590. _P:=SubstitutePath(_Path,['courseId',courseId,'courseWorkId',courseWorkId,'id',id]);
  2591. Result:=ServiceCall(_HTTPMethod,_P,'',aReturnStudentSubmissionRequest,TEmpty) as TEmpty;
  2592. end;
  2593. Function TCoursesCourseWorkStudentSubmissionsResource.ModifyAttachments(courseId: string; courseWorkId: string; id: string; aModifyAttachmentsRequest : TModifyAttachmentsRequest) : TStudentSubmission;
  2594. Const
  2595. _HTTPMethod = 'POST';
  2596. _Path = 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments';
  2597. _Methodid = 'classroom.courses.courseWork.studentSubmissions.modifyAttachments';
  2598. Var
  2599. _P : String;
  2600. begin
  2601. _P:=SubstitutePath(_Path,['courseId',courseId,'courseWorkId',courseWorkId,'id',id]);
  2602. Result:=ServiceCall(_HTTPMethod,_P,'',aModifyAttachmentsRequest,TStudentSubmission) as TStudentSubmission;
  2603. end;
  2604. { --------------------------------------------------------------------
  2605. TCoursesCourseWorkResource
  2606. --------------------------------------------------------------------}
  2607. Class Function TCoursesCourseWorkResource.ResourceName : String;
  2608. begin
  2609. Result:='courseWork';
  2610. end;
  2611. Class Function TCoursesCourseWorkResource.DefaultAPI : TGoogleAPIClass;
  2612. begin
  2613. Result:=TclassroomAPI;
  2614. end;
  2615. Function TCoursesCourseWorkResource.Create(courseId: string; aCourseWork : TCourseWork) : TCourseWork;
  2616. Const
  2617. _HTTPMethod = 'POST';
  2618. _Path = 'v1/courses/{courseId}/courseWork';
  2619. _Methodid = 'classroom.courses.courseWork.create';
  2620. Var
  2621. _P : String;
  2622. begin
  2623. _P:=SubstitutePath(_Path,['courseId',courseId]);
  2624. Result:=ServiceCall(_HTTPMethod,_P,'',aCourseWork,TCourseWork) as TCourseWork;
  2625. end;
  2626. Function TCoursesCourseWorkResource.Get(courseId: string; id: string) : TCourseWork;
  2627. Const
  2628. _HTTPMethod = 'GET';
  2629. _Path = 'v1/courses/{courseId}/courseWork/{id}';
  2630. _Methodid = 'classroom.courses.courseWork.get';
  2631. Var
  2632. _P : String;
  2633. begin
  2634. _P:=SubstitutePath(_Path,['courseId',courseId,'id',id]);
  2635. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TCourseWork) as TCourseWork;
  2636. end;
  2637. Function TCoursesCourseWorkResource.List(courseId: string; AQuery : string = '') : TListCourseWorkResponse;
  2638. Const
  2639. _HTTPMethod = 'GET';
  2640. _Path = 'v1/courses/{courseId}/courseWork';
  2641. _Methodid = 'classroom.courses.courseWork.list';
  2642. Var
  2643. _P : String;
  2644. begin
  2645. _P:=SubstitutePath(_Path,['courseId',courseId]);
  2646. Result:=ServiceCall(_HTTPMethod,_P,AQuery,Nil,TListCourseWorkResponse) as TListCourseWorkResponse;
  2647. end;
  2648. Function TCoursesCourseWorkResource.List(courseId: string; AQuery : TCoursesCourseWorklistOptions) : TListCourseWorkResponse;
  2649. Var
  2650. _Q : String;
  2651. begin
  2652. _Q:='';
  2653. AddToQuery(_Q,'courseWorkStates',AQuery.courseWorkStates);
  2654. AddToQuery(_Q,'orderBy',AQuery.orderBy);
  2655. AddToQuery(_Q,'pageSize',AQuery.pageSize);
  2656. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2657. Result:=List(courseId,_Q);
  2658. end;
  2659. Function TCoursesCourseWorkResource.GetStudentSubmissionsInstance : TCoursesCourseWorkStudentSubmissionsResource;
  2660. begin
  2661. if (FStudentSubmissionsInstance=Nil) then
  2662. FStudentSubmissionsInstance:=CreateStudentSubmissionsResource;
  2663. Result:=FStudentSubmissionsInstance;
  2664. end;
  2665. Function TCoursesCourseWorkResource.CreateStudentSubmissionsResource : TCoursesCourseWorkStudentSubmissionsResource;
  2666. begin
  2667. Result:=CreateStudentSubmissionsResource(Self);
  2668. end;
  2669. Function TCoursesCourseWorkResource.CreateStudentSubmissionsResource(AOwner : TComponent) : TCoursesCourseWorkStudentSubmissionsResource;
  2670. begin
  2671. Result:=TCoursesCourseWorkStudentSubmissionsResource.Create(AOwner);
  2672. Result.API:=Self.API;
  2673. end;
  2674. { --------------------------------------------------------------------
  2675. TCoursesResource
  2676. --------------------------------------------------------------------}
  2677. Class Function TCoursesResource.ResourceName : String;
  2678. begin
  2679. Result:='courses';
  2680. end;
  2681. Class Function TCoursesResource.DefaultAPI : TGoogleAPIClass;
  2682. begin
  2683. Result:=TclassroomAPI;
  2684. end;
  2685. Function TCoursesResource.Create(aCourse : TCourse) : TCourse;
  2686. Const
  2687. _HTTPMethod = 'POST';
  2688. _Path = 'v1/courses';
  2689. _Methodid = 'classroom.courses.create';
  2690. begin
  2691. Result:=ServiceCall(_HTTPMethod,_Path,'',aCourse,TCourse) as TCourse;
  2692. end;
  2693. Function TCoursesResource.Get(id: string) : TCourse;
  2694. Const
  2695. _HTTPMethod = 'GET';
  2696. _Path = 'v1/courses/{id}';
  2697. _Methodid = 'classroom.courses.get';
  2698. Var
  2699. _P : String;
  2700. begin
  2701. _P:=SubstitutePath(_Path,['id',id]);
  2702. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TCourse) as TCourse;
  2703. end;
  2704. Function TCoursesResource.Update(id: string; aCourse : TCourse) : TCourse;
  2705. Const
  2706. _HTTPMethod = 'PUT';
  2707. _Path = 'v1/courses/{id}';
  2708. _Methodid = 'classroom.courses.update';
  2709. Var
  2710. _P : String;
  2711. begin
  2712. _P:=SubstitutePath(_Path,['id',id]);
  2713. Result:=ServiceCall(_HTTPMethod,_P,'',aCourse,TCourse) as TCourse;
  2714. end;
  2715. Function TCoursesResource.Patch(id: string; aCourse : TCourse; AQuery : string = '') : TCourse;
  2716. Const
  2717. _HTTPMethod = 'PATCH';
  2718. _Path = 'v1/courses/{id}';
  2719. _Methodid = 'classroom.courses.patch';
  2720. Var
  2721. _P : String;
  2722. begin
  2723. _P:=SubstitutePath(_Path,['id',id]);
  2724. Result:=ServiceCall(_HTTPMethod,_P,AQuery,aCourse,TCourse) as TCourse;
  2725. end;
  2726. Function TCoursesResource.Patch(id: string; aCourse : TCourse; AQuery : TCoursespatchOptions) : TCourse;
  2727. Var
  2728. _Q : String;
  2729. begin
  2730. _Q:='';
  2731. AddToQuery(_Q,'updateMask',AQuery.updateMask);
  2732. Result:=Patch(id,aCourse,_Q);
  2733. end;
  2734. Function TCoursesResource.Delete(id: string) : TEmpty;
  2735. Const
  2736. _HTTPMethod = 'DELETE';
  2737. _Path = 'v1/courses/{id}';
  2738. _Methodid = 'classroom.courses.delete';
  2739. Var
  2740. _P : String;
  2741. begin
  2742. _P:=SubstitutePath(_Path,['id',id]);
  2743. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
  2744. end;
  2745. Function TCoursesResource.List(AQuery : string = '') : TListCoursesResponse;
  2746. Const
  2747. _HTTPMethod = 'GET';
  2748. _Path = 'v1/courses';
  2749. _Methodid = 'classroom.courses.list';
  2750. begin
  2751. Result:=ServiceCall(_HTTPMethod,_Path,AQuery,Nil,TListCoursesResponse) as TListCoursesResponse;
  2752. end;
  2753. Function TCoursesResource.List(AQuery : TCourseslistOptions) : TListCoursesResponse;
  2754. Var
  2755. _Q : String;
  2756. begin
  2757. _Q:='';
  2758. AddToQuery(_Q,'studentId',AQuery.studentId);
  2759. AddToQuery(_Q,'teacherId',AQuery.teacherId);
  2760. AddToQuery(_Q,'pageSize',AQuery.pageSize);
  2761. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2762. Result:=List(_Q);
  2763. end;
  2764. Function TCoursesResource.GetAliasesInstance : TCoursesAliasesResource;
  2765. begin
  2766. if (FAliasesInstance=Nil) then
  2767. FAliasesInstance:=CreateAliasesResource;
  2768. Result:=FAliasesInstance;
  2769. end;
  2770. Function TCoursesResource.CreateAliasesResource : TCoursesAliasesResource;
  2771. begin
  2772. Result:=CreateAliasesResource(Self);
  2773. end;
  2774. Function TCoursesResource.CreateAliasesResource(AOwner : TComponent) : TCoursesAliasesResource;
  2775. begin
  2776. Result:=TCoursesAliasesResource.Create(AOwner);
  2777. Result.API:=Self.API;
  2778. end;
  2779. Function TCoursesResource.GetTeachersInstance : TCoursesTeachersResource;
  2780. begin
  2781. if (FTeachersInstance=Nil) then
  2782. FTeachersInstance:=CreateTeachersResource;
  2783. Result:=FTeachersInstance;
  2784. end;
  2785. Function TCoursesResource.CreateTeachersResource : TCoursesTeachersResource;
  2786. begin
  2787. Result:=CreateTeachersResource(Self);
  2788. end;
  2789. Function TCoursesResource.CreateTeachersResource(AOwner : TComponent) : TCoursesTeachersResource;
  2790. begin
  2791. Result:=TCoursesTeachersResource.Create(AOwner);
  2792. Result.API:=Self.API;
  2793. end;
  2794. Function TCoursesResource.GetStudentsInstance : TCoursesStudentsResource;
  2795. begin
  2796. if (FStudentsInstance=Nil) then
  2797. FStudentsInstance:=CreateStudentsResource;
  2798. Result:=FStudentsInstance;
  2799. end;
  2800. Function TCoursesResource.CreateStudentsResource : TCoursesStudentsResource;
  2801. begin
  2802. Result:=CreateStudentsResource(Self);
  2803. end;
  2804. Function TCoursesResource.CreateStudentsResource(AOwner : TComponent) : TCoursesStudentsResource;
  2805. begin
  2806. Result:=TCoursesStudentsResource.Create(AOwner);
  2807. Result.API:=Self.API;
  2808. end;
  2809. Function TCoursesResource.GetCourseWorkStudentSubmissionsInstance : TCoursesCourseWorkStudentSubmissionsResource;
  2810. begin
  2811. if (FCourseWorkStudentSubmissionsInstance=Nil) then
  2812. FCourseWorkStudentSubmissionsInstance:=CreateCourseWorkStudentSubmissionsResource;
  2813. Result:=FCourseWorkStudentSubmissionsInstance;
  2814. end;
  2815. Function TCoursesResource.CreateCourseWorkStudentSubmissionsResource : TCoursesCourseWorkStudentSubmissionsResource;
  2816. begin
  2817. Result:=CreateCourseWorkStudentSubmissionsResource(Self);
  2818. end;
  2819. Function TCoursesResource.CreateCourseWorkStudentSubmissionsResource(AOwner : TComponent) : TCoursesCourseWorkStudentSubmissionsResource;
  2820. begin
  2821. Result:=TCoursesCourseWorkStudentSubmissionsResource.Create(AOwner);
  2822. Result.API:=Self.API;
  2823. end;
  2824. Function TCoursesResource.GetCourseWorkInstance : TCoursesCourseWorkResource;
  2825. begin
  2826. if (FCourseWorkInstance=Nil) then
  2827. FCourseWorkInstance:=CreateCourseWorkResource;
  2828. Result:=FCourseWorkInstance;
  2829. end;
  2830. Function TCoursesResource.CreateCourseWorkResource : TCoursesCourseWorkResource;
  2831. begin
  2832. Result:=CreateCourseWorkResource(Self);
  2833. end;
  2834. Function TCoursesResource.CreateCourseWorkResource(AOwner : TComponent) : TCoursesCourseWorkResource;
  2835. begin
  2836. Result:=TCoursesCourseWorkResource.Create(AOwner);
  2837. Result.API:=Self.API;
  2838. end;
  2839. { --------------------------------------------------------------------
  2840. TInvitationsResource
  2841. --------------------------------------------------------------------}
  2842. Class Function TInvitationsResource.ResourceName : String;
  2843. begin
  2844. Result:='invitations';
  2845. end;
  2846. Class Function TInvitationsResource.DefaultAPI : TGoogleAPIClass;
  2847. begin
  2848. Result:=TclassroomAPI;
  2849. end;
  2850. Function TInvitationsResource.Create(aInvitation : TInvitation) : TInvitation;
  2851. Const
  2852. _HTTPMethod = 'POST';
  2853. _Path = 'v1/invitations';
  2854. _Methodid = 'classroom.invitations.create';
  2855. begin
  2856. Result:=ServiceCall(_HTTPMethod,_Path,'',aInvitation,TInvitation) as TInvitation;
  2857. end;
  2858. Function TInvitationsResource.Get(id: string) : TInvitation;
  2859. Const
  2860. _HTTPMethod = 'GET';
  2861. _Path = 'v1/invitations/{id}';
  2862. _Methodid = 'classroom.invitations.get';
  2863. Var
  2864. _P : String;
  2865. begin
  2866. _P:=SubstitutePath(_Path,['id',id]);
  2867. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TInvitation) as TInvitation;
  2868. end;
  2869. Function TInvitationsResource.Delete(id: string) : TEmpty;
  2870. Const
  2871. _HTTPMethod = 'DELETE';
  2872. _Path = 'v1/invitations/{id}';
  2873. _Methodid = 'classroom.invitations.delete';
  2874. Var
  2875. _P : String;
  2876. begin
  2877. _P:=SubstitutePath(_Path,['id',id]);
  2878. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
  2879. end;
  2880. Function TInvitationsResource.List(AQuery : string = '') : TListInvitationsResponse;
  2881. Const
  2882. _HTTPMethod = 'GET';
  2883. _Path = 'v1/invitations';
  2884. _Methodid = 'classroom.invitations.list';
  2885. begin
  2886. Result:=ServiceCall(_HTTPMethod,_Path,AQuery,Nil,TListInvitationsResponse) as TListInvitationsResponse;
  2887. end;
  2888. Function TInvitationsResource.List(AQuery : TInvitationslistOptions) : TListInvitationsResponse;
  2889. Var
  2890. _Q : String;
  2891. begin
  2892. _Q:='';
  2893. AddToQuery(_Q,'userId',AQuery.userId);
  2894. AddToQuery(_Q,'courseId',AQuery.courseId);
  2895. AddToQuery(_Q,'pageSize',AQuery.pageSize);
  2896. AddToQuery(_Q,'pageToken',AQuery.pageToken);
  2897. Result:=List(_Q);
  2898. end;
  2899. Function TInvitationsResource.Accept(id: string) : TEmpty;
  2900. Const
  2901. _HTTPMethod = 'POST';
  2902. _Path = 'v1/invitations/{id}:accept';
  2903. _Methodid = 'classroom.invitations.accept';
  2904. Var
  2905. _P : String;
  2906. begin
  2907. _P:=SubstitutePath(_Path,['id',id]);
  2908. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TEmpty) as TEmpty;
  2909. end;
  2910. { --------------------------------------------------------------------
  2911. TUserProfilesResource
  2912. --------------------------------------------------------------------}
  2913. Class Function TUserProfilesResource.ResourceName : String;
  2914. begin
  2915. Result:='userProfiles';
  2916. end;
  2917. Class Function TUserProfilesResource.DefaultAPI : TGoogleAPIClass;
  2918. begin
  2919. Result:=TclassroomAPI;
  2920. end;
  2921. Function TUserProfilesResource.Get(userId: string) : TUserProfile;
  2922. Const
  2923. _HTTPMethod = 'GET';
  2924. _Path = 'v1/userProfiles/{userId}';
  2925. _Methodid = 'classroom.userProfiles.get';
  2926. Var
  2927. _P : String;
  2928. begin
  2929. _P:=SubstitutePath(_Path,['userId',userId]);
  2930. Result:=ServiceCall(_HTTPMethod,_P,'',Nil,TUserProfile) as TUserProfile;
  2931. end;
  2932. { --------------------------------------------------------------------
  2933. TClassroomAPI
  2934. --------------------------------------------------------------------}
  2935. Class Function TClassroomAPI.APIName : String;
  2936. begin
  2937. Result:='classroom';
  2938. end;
  2939. Class Function TClassroomAPI.APIVersion : String;
  2940. begin
  2941. Result:='v1';
  2942. end;
  2943. Class Function TClassroomAPI.APIRevision : String;
  2944. begin
  2945. Result:='20160517';
  2946. end;
  2947. Class Function TClassroomAPI.APIID : String;
  2948. begin
  2949. Result:='classroom:v1';
  2950. end;
  2951. Class Function TClassroomAPI.APITitle : String;
  2952. begin
  2953. Result:='Google Classroom API';
  2954. end;
  2955. Class Function TClassroomAPI.APIDescription : String;
  2956. begin
  2957. Result:='Manages classes, rosters, and invitations in Google Classroom.';
  2958. end;
  2959. Class Function TClassroomAPI.APIOwnerDomain : String;
  2960. begin
  2961. Result:='google.com';
  2962. end;
  2963. Class Function TClassroomAPI.APIOwnerName : String;
  2964. begin
  2965. Result:='Google';
  2966. end;
  2967. Class Function TClassroomAPI.APIIcon16 : String;
  2968. begin
  2969. Result:='http://www.google.com/images/icons/product/search-16.gif';
  2970. end;
  2971. Class Function TClassroomAPI.APIIcon32 : String;
  2972. begin
  2973. Result:='http://www.google.com/images/icons/product/search-32.gif';
  2974. end;
  2975. Class Function TClassroomAPI.APIdocumentationLink : String;
  2976. begin
  2977. Result:='https://developers.google.com/classroom/';
  2978. end;
  2979. Class Function TClassroomAPI.APIrootUrl : string;
  2980. begin
  2981. Result:='https://classroom.googleapis.com/';
  2982. end;
  2983. Class Function TClassroomAPI.APIbasePath : string;
  2984. begin
  2985. Result:='';
  2986. end;
  2987. Class Function TClassroomAPI.APIbaseURL : String;
  2988. begin
  2989. Result:='https://classroom.googleapis.com/';
  2990. end;
  2991. Class Function TClassroomAPI.APIProtocol : string;
  2992. begin
  2993. Result:='rest';
  2994. end;
  2995. Class Function TClassroomAPI.APIservicePath : string;
  2996. begin
  2997. Result:='';
  2998. end;
  2999. Class Function TClassroomAPI.APIbatchPath : String;
  3000. begin
  3001. Result:='batch';
  3002. end;
  3003. Class Function TClassroomAPI.APIAuthScopes : TScopeInfoArray;
  3004. begin
  3005. SetLength(Result,13);
  3006. Result[0].Name:='https://www.googleapis.com/auth/classroom.course-work.readonly';
  3007. Result[0].Description:='View instructions for teacher-assigned work in your Google Classroom classes';
  3008. Result[1].Name:='https://www.googleapis.com/auth/classroom.courses';
  3009. Result[1].Description:='Manage your Google Classroom classes';
  3010. Result[2].Name:='https://www.googleapis.com/auth/classroom.courses.readonly';
  3011. Result[2].Description:='View your Google Classroom classes';
  3012. Result[3].Name:='https://www.googleapis.com/auth/classroom.coursework.me';
  3013. Result[3].Description:='Manage your course work and view your grades in Google Classroom';
  3014. Result[4].Name:='https://www.googleapis.com/auth/classroom.coursework.me.readonly';
  3015. Result[4].Description:='View your course work and grades in Google Classroom';
  3016. Result[5].Name:='https://www.googleapis.com/auth/classroom.coursework.students';
  3017. Result[5].Description:='Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer';
  3018. Result[6].Name:='https://www.googleapis.com/auth/classroom.coursework.students.readonly';
  3019. Result[6].Description:='View course work and grades for students in the Google Classroom classes you teach or administer';
  3020. Result[7].Name:='https://www.googleapis.com/auth/classroom.profile.emails';
  3021. Result[7].Description:='View the email addresses of people in your classes';
  3022. Result[8].Name:='https://www.googleapis.com/auth/classroom.profile.photos';
  3023. Result[8].Description:='View the profile photos of people in your classes';
  3024. Result[9].Name:='https://www.googleapis.com/auth/classroom.rosters';
  3025. Result[9].Description:='Manage your Google Classroom class rosters';
  3026. Result[10].Name:='https://www.googleapis.com/auth/classroom.rosters.readonly';
  3027. Result[10].Description:='View your Google Classroom class rosters';
  3028. Result[11].Name:='https://www.googleapis.com/auth/classroom.student-submissions.me.readonly';
  3029. Result[11].Description:='View your course work and grades in Google Classroom';
  3030. Result[12].Name:='https://www.googleapis.com/auth/classroom.student-submissions.students.readonly';
  3031. Result[12].Description:='View course work and grades for students in the Google Classroom classes you teach or administer';
  3032. end;
  3033. Class Function TClassroomAPI.APINeedsAuth : Boolean;
  3034. begin
  3035. Result:=True;
  3036. end;
  3037. Class Procedure TClassroomAPI.RegisterAPIResources;
  3038. begin
  3039. TCourse.RegisterObject;
  3040. TDriveFolder.RegisterObject;
  3041. TCourseMaterialSet.RegisterObject;
  3042. TCourseMaterial.RegisterObject;
  3043. TDriveFile.RegisterObject;
  3044. TYouTubeVideo.RegisterObject;
  3045. TLink.RegisterObject;
  3046. TForm.RegisterObject;
  3047. TEmpty.RegisterObject;
  3048. TListCoursesResponse.RegisterObject;
  3049. TCourseAlias.RegisterObject;
  3050. TListCourseAliasesResponse.RegisterObject;
  3051. TInvitation.RegisterObject;
  3052. TListInvitationsResponse.RegisterObject;
  3053. TUserProfile.RegisterObject;
  3054. TName.RegisterObject;
  3055. TGlobalPermission.RegisterObject;
  3056. TTeacher.RegisterObject;
  3057. TListTeachersResponse.RegisterObject;
  3058. TStudent.RegisterObject;
  3059. TListStudentsResponse.RegisterObject;
  3060. TCourseWork.RegisterObject;
  3061. TMaterial.RegisterObject;
  3062. TSharedDriveFile.RegisterObject;
  3063. TDate.RegisterObject;
  3064. TTimeOfDay.RegisterObject;
  3065. TAssignment.RegisterObject;
  3066. TMultipleChoiceQuestion.RegisterObject;
  3067. TListCourseWorkResponse.RegisterObject;
  3068. TStudentSubmission.RegisterObject;
  3069. TAssignmentSubmission.RegisterObject;
  3070. TAttachment.RegisterObject;
  3071. TShortAnswerSubmission.RegisterObject;
  3072. TMultipleChoiceSubmission.RegisterObject;
  3073. TListStudentSubmissionsResponse.RegisterObject;
  3074. TTurnInStudentSubmissionRequest.RegisterObject;
  3075. TReclaimStudentSubmissionRequest.RegisterObject;
  3076. TReturnStudentSubmissionRequest.RegisterObject;
  3077. TModifyAttachmentsRequest.RegisterObject;
  3078. end;
  3079. Function TClassroomAPI.GetCoursesAliasesInstance : TCoursesAliasesResource;
  3080. begin
  3081. if (FCoursesAliasesInstance=Nil) then
  3082. FCoursesAliasesInstance:=CreateCoursesAliasesResource;
  3083. Result:=FCoursesAliasesInstance;
  3084. end;
  3085. Function TClassroomAPI.CreateCoursesAliasesResource : TCoursesAliasesResource;
  3086. begin
  3087. Result:=CreateCoursesAliasesResource(Self);
  3088. end;
  3089. Function TClassroomAPI.CreateCoursesAliasesResource(AOwner : TComponent) : TCoursesAliasesResource;
  3090. begin
  3091. Result:=TCoursesAliasesResource.Create(AOwner);
  3092. Result.API:=Self.API;
  3093. end;
  3094. Function TClassroomAPI.GetCoursesTeachersInstance : TCoursesTeachersResource;
  3095. begin
  3096. if (FCoursesTeachersInstance=Nil) then
  3097. FCoursesTeachersInstance:=CreateCoursesTeachersResource;
  3098. Result:=FCoursesTeachersInstance;
  3099. end;
  3100. Function TClassroomAPI.CreateCoursesTeachersResource : TCoursesTeachersResource;
  3101. begin
  3102. Result:=CreateCoursesTeachersResource(Self);
  3103. end;
  3104. Function TClassroomAPI.CreateCoursesTeachersResource(AOwner : TComponent) : TCoursesTeachersResource;
  3105. begin
  3106. Result:=TCoursesTeachersResource.Create(AOwner);
  3107. Result.API:=Self.API;
  3108. end;
  3109. Function TClassroomAPI.GetCoursesStudentsInstance : TCoursesStudentsResource;
  3110. begin
  3111. if (FCoursesStudentsInstance=Nil) then
  3112. FCoursesStudentsInstance:=CreateCoursesStudentsResource;
  3113. Result:=FCoursesStudentsInstance;
  3114. end;
  3115. Function TClassroomAPI.CreateCoursesStudentsResource : TCoursesStudentsResource;
  3116. begin
  3117. Result:=CreateCoursesStudentsResource(Self);
  3118. end;
  3119. Function TClassroomAPI.CreateCoursesStudentsResource(AOwner : TComponent) : TCoursesStudentsResource;
  3120. begin
  3121. Result:=TCoursesStudentsResource.Create(AOwner);
  3122. Result.API:=Self.API;
  3123. end;
  3124. Function TClassroomAPI.GetCoursesCourseWorkStudentSubmissionsInstance : TCoursesCourseWorkStudentSubmissionsResource;
  3125. begin
  3126. if (FCoursesCourseWorkStudentSubmissionsInstance=Nil) then
  3127. FCoursesCourseWorkStudentSubmissionsInstance:=CreateCoursesCourseWorkStudentSubmissionsResource;
  3128. Result:=FCoursesCourseWorkStudentSubmissionsInstance;
  3129. end;
  3130. Function TClassroomAPI.CreateCoursesCourseWorkStudentSubmissionsResource : TCoursesCourseWorkStudentSubmissionsResource;
  3131. begin
  3132. Result:=CreateCoursesCourseWorkStudentSubmissionsResource(Self);
  3133. end;
  3134. Function TClassroomAPI.CreateCoursesCourseWorkStudentSubmissionsResource(AOwner : TComponent) : TCoursesCourseWorkStudentSubmissionsResource;
  3135. begin
  3136. Result:=TCoursesCourseWorkStudentSubmissionsResource.Create(AOwner);
  3137. Result.API:=Self.API;
  3138. end;
  3139. Function TClassroomAPI.GetCoursesCourseWorkInstance : TCoursesCourseWorkResource;
  3140. begin
  3141. if (FCoursesCourseWorkInstance=Nil) then
  3142. FCoursesCourseWorkInstance:=CreateCoursesCourseWorkResource;
  3143. Result:=FCoursesCourseWorkInstance;
  3144. end;
  3145. Function TClassroomAPI.CreateCoursesCourseWorkResource : TCoursesCourseWorkResource;
  3146. begin
  3147. Result:=CreateCoursesCourseWorkResource(Self);
  3148. end;
  3149. Function TClassroomAPI.CreateCoursesCourseWorkResource(AOwner : TComponent) : TCoursesCourseWorkResource;
  3150. begin
  3151. Result:=TCoursesCourseWorkResource.Create(AOwner);
  3152. Result.API:=Self.API;
  3153. end;
  3154. Function TClassroomAPI.GetCoursesInstance : TCoursesResource;
  3155. begin
  3156. if (FCoursesInstance=Nil) then
  3157. FCoursesInstance:=CreateCoursesResource;
  3158. Result:=FCoursesInstance;
  3159. end;
  3160. Function TClassroomAPI.CreateCoursesResource : TCoursesResource;
  3161. begin
  3162. Result:=CreateCoursesResource(Self);
  3163. end;
  3164. Function TClassroomAPI.CreateCoursesResource(AOwner : TComponent) : TCoursesResource;
  3165. begin
  3166. Result:=TCoursesResource.Create(AOwner);
  3167. Result.API:=Self.API;
  3168. end;
  3169. Function TClassroomAPI.GetInvitationsInstance : TInvitationsResource;
  3170. begin
  3171. if (FInvitationsInstance=Nil) then
  3172. FInvitationsInstance:=CreateInvitationsResource;
  3173. Result:=FInvitationsInstance;
  3174. end;
  3175. Function TClassroomAPI.CreateInvitationsResource : TInvitationsResource;
  3176. begin
  3177. Result:=CreateInvitationsResource(Self);
  3178. end;
  3179. Function TClassroomAPI.CreateInvitationsResource(AOwner : TComponent) : TInvitationsResource;
  3180. begin
  3181. Result:=TInvitationsResource.Create(AOwner);
  3182. Result.API:=Self.API;
  3183. end;
  3184. Function TClassroomAPI.GetUserProfilesInstance : TUserProfilesResource;
  3185. begin
  3186. if (FUserProfilesInstance=Nil) then
  3187. FUserProfilesInstance:=CreateUserProfilesResource;
  3188. Result:=FUserProfilesInstance;
  3189. end;
  3190. Function TClassroomAPI.CreateUserProfilesResource : TUserProfilesResource;
  3191. begin
  3192. Result:=CreateUserProfilesResource(Self);
  3193. end;
  3194. Function TClassroomAPI.CreateUserProfilesResource(AOwner : TComponent) : TUserProfilesResource;
  3195. begin
  3196. Result:=TUserProfilesResource.Create(AOwner);
  3197. Result.API:=Self.API;
  3198. end;
  3199. initialization
  3200. TClassroomAPI.RegisterAPI;
  3201. end.