googleclassroom.pp 128 KB

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