google-api-client 0.13.2 → 0.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (524) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +149 -0
  3. data/bin/generate-api +6 -2
  4. data/generated/google/apis/acceleratedmobilepageurl_v1.rb +3 -3
  5. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +46 -46
  6. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +15 -15
  7. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +6 -6
  8. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +2 -2
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1394 -1394
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +322 -322
  11. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +449 -449
  12. data/generated/google/apis/adexchangebuyer_v1_2.rb +35 -0
  13. data/generated/google/apis/adexchangebuyer_v1_2/classes.rb +457 -0
  14. data/generated/google/apis/adexchangebuyer_v1_2/representations.rb +189 -0
  15. data/generated/google/apis/adexchangebuyer_v1_2/service.rb +329 -0
  16. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1347 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +498 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +873 -0
  20. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  21. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +1 -1
  22. data/generated/google/apis/adexchangeseller_v1.rb +37 -0
  23. data/generated/google/apis/adexchangeseller_v1/classes.rb +557 -0
  24. data/generated/google/apis/adexchangeseller_v1/representations.rb +248 -0
  25. data/generated/google/apis/adexchangeseller_v1/service.rb +568 -0
  26. data/generated/google/apis/adexchangeseller_v1_1.rb +37 -0
  27. data/generated/google/apis/adexchangeseller_v1_1/classes.rb +842 -0
  28. data/generated/google/apis/adexchangeseller_v1_1/representations.rb +364 -0
  29. data/generated/google/apis/adexchangeseller_v1_1/service.rb +771 -0
  30. data/generated/google/apis/adexperiencereport_v1.rb +35 -0
  31. data/generated/google/apis/adexperiencereport_v1/classes.rb +138 -0
  32. data/generated/google/apis/adexperiencereport_v1/representations.rb +77 -0
  33. data/generated/google/apis/adexperiencereport_v1/service.rb +123 -0
  34. data/generated/google/apis/admin_directory_v1.rb +1 -1
  35. data/generated/google/apis/admin_directory_v1/classes.rb +60 -0
  36. data/generated/google/apis/admin_directory_v1/representations.rb +29 -0
  37. data/generated/google/apis/admin_directory_v1/service.rb +39 -0
  38. data/generated/google/apis/adsense_v1_4.rb +1 -1
  39. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  40. data/generated/google/apis/analytics_v2_4.rb +37 -0
  41. data/generated/google/apis/analytics_v2_4/classes.rb +26 -0
  42. data/generated/google/apis/analytics_v2_4/representations.rb +26 -0
  43. data/generated/google/apis/analytics_v2_4/service.rb +345 -0
  44. data/generated/google/apis/analytics_v3.rb +1 -1
  45. data/generated/google/apis/analytics_v3/classes.rb +15 -2
  46. data/generated/google/apis/analytics_v3/representations.rb +3 -0
  47. data/generated/google/apis/analyticsreporting_v4.rb +4 -4
  48. data/generated/google/apis/analyticsreporting_v4/classes.rb +891 -891
  49. data/generated/google/apis/analyticsreporting_v4/representations.rb +189 -189
  50. data/generated/google/apis/androiddeviceprovisioning_v1.rb +32 -0
  51. data/generated/google/apis/androiddeviceprovisioning_v1/classes.rb +917 -0
  52. data/generated/google/apis/androiddeviceprovisioning_v1/representations.rb +447 -0
  53. data/generated/google/apis/androiddeviceprovisioning_v1/service.rb +419 -0
  54. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  55. data/generated/google/apis/androidenterprise_v1/classes.rb +31 -0
  56. data/generated/google/apis/androidenterprise_v1/representations.rb +14 -0
  57. data/generated/google/apis/androidenterprise_v1/service.rb +76 -0
  58. data/generated/google/apis/androidmanagement_v1.rb +35 -0
  59. data/generated/google/apis/androidmanagement_v1/classes.rb +2039 -0
  60. data/generated/google/apis/androidmanagement_v1/representations.rb +702 -0
  61. data/generated/google/apis/androidmanagement_v1/service.rb +796 -0
  62. data/generated/google/apis/androidpublisher_v1.rb +34 -0
  63. data/generated/google/apis/androidpublisher_v1/classes.rb +67 -0
  64. data/generated/google/apis/androidpublisher_v1/representations.rb +42 -0
  65. data/generated/google/apis/androidpublisher_v1/service.rb +150 -0
  66. data/generated/google/apis/androidpublisher_v1_1.rb +34 -0
  67. data/generated/google/apis/androidpublisher_v1_1/classes.rb +123 -0
  68. data/generated/google/apis/androidpublisher_v1_1/representations.rb +60 -0
  69. data/generated/google/apis/androidpublisher_v1_1/service.rb +192 -0
  70. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  71. data/generated/google/apis/androidpublisher_v2/classes.rb +21 -0
  72. data/generated/google/apis/androidpublisher_v2/representations.rb +3 -0
  73. data/generated/google/apis/androidpublisher_v2/service.rb +6 -2
  74. data/generated/google/apis/appengine_v1.rb +4 -4
  75. data/generated/google/apis/appengine_v1/classes.rb +1519 -1474
  76. data/generated/google/apis/appengine_v1/representations.rb +351 -335
  77. data/generated/google/apis/appengine_v1/service.rb +255 -239
  78. data/generated/google/apis/appengine_v1alpha.rb +41 -0
  79. data/generated/google/apis/appengine_v1alpha/classes.rb +987 -0
  80. data/generated/google/apis/appengine_v1alpha/representations.rb +397 -0
  81. data/generated/google/apis/appengine_v1alpha/service.rb +631 -0
  82. data/generated/google/apis/appengine_v1beta.rb +41 -0
  83. data/generated/google/apis/appengine_v1beta/classes.rb +2876 -0
  84. data/generated/google/apis/appengine_v1beta/representations.rb +1138 -0
  85. data/generated/google/apis/appengine_v1beta/service.rb +1546 -0
  86. data/generated/google/apis/appengine_v1beta4.rb +41 -0
  87. data/generated/google/apis/appengine_v1beta4/classes.rb +2170 -0
  88. data/generated/google/apis/appengine_v1beta4/representations.rb +824 -0
  89. data/generated/google/apis/appengine_v1beta4/service.rb +876 -0
  90. data/generated/google/apis/appengine_v1beta5.rb +41 -0
  91. data/generated/google/apis/appengine_v1beta5/classes.rb +2168 -0
  92. data/generated/google/apis/appengine_v1beta5/representations.rb +822 -0
  93. data/generated/google/apis/appengine_v1beta5/service.rb +877 -0
  94. data/generated/google/apis/appsactivity_v1.rb +1 -1
  95. data/generated/google/apis/appstate_v1.rb +1 -1
  96. data/generated/google/apis/bigquery_v2.rb +1 -1
  97. data/generated/google/apis/bigquery_v2/classes.rb +106 -18
  98. data/generated/google/apis/bigquery_v2/representations.rb +15 -0
  99. data/generated/google/apis/bigquerydatatransfer_v1.rb +41 -0
  100. data/generated/google/apis/bigquerydatatransfer_v1/classes.rb +886 -0
  101. data/generated/google/apis/bigquerydatatransfer_v1/representations.rb +343 -0
  102. data/generated/google/apis/bigquerydatatransfer_v1/service.rb +1317 -0
  103. data/generated/google/apis/blogger_v2.rb +34 -0
  104. data/generated/google/apis/blogger_v2/classes.rb +947 -0
  105. data/generated/google/apis/blogger_v2/representations.rb +465 -0
  106. data/generated/google/apis/blogger_v2/service.rb +424 -0
  107. data/generated/google/apis/calendar_v3.rb +1 -1
  108. data/generated/google/apis/calendar_v3/classes.rb +4 -207
  109. data/generated/google/apis/calendar_v3/representations.rb +0 -97
  110. data/generated/google/apis/calendar_v3/service.rb +8 -4
  111. data/generated/google/apis/classroom_v1.rb +27 -27
  112. data/generated/google/apis/classroom_v1/classes.rb +1037 -926
  113. data/generated/google/apis/classroom_v1/representations.rb +294 -244
  114. data/generated/google/apis/classroom_v1/service.rb +1114 -1109
  115. data/generated/google/apis/cloudbilling_v1.rb +1 -1
  116. data/generated/google/apis/cloudbilling_v1/classes.rb +473 -56
  117. data/generated/google/apis/cloudbilling_v1/representations.rb +176 -10
  118. data/generated/google/apis/cloudbilling_v1/service.rb +182 -89
  119. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  120. data/generated/google/apis/cloudbuild_v1/classes.rb +666 -625
  121. data/generated/google/apis/cloudbuild_v1/representations.rb +132 -116
  122. data/generated/google/apis/cloudbuild_v1/service.rb +158 -158
  123. data/generated/google/apis/clouddebugger_v2.rb +4 -4
  124. data/generated/google/apis/clouddebugger_v2/classes.rb +637 -639
  125. data/generated/google/apis/clouddebugger_v2/representations.rb +139 -139
  126. data/generated/google/apis/clouddebugger_v2/service.rb +157 -157
  127. data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
  128. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +310 -310
  129. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +77 -77
  130. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +144 -144
  131. data/generated/google/apis/cloudfunctions_v1.rb +4 -1
  132. data/generated/google/apis/cloudfunctions_v1/classes.rb +265 -6
  133. data/generated/google/apis/cloudfunctions_v1/representations.rb +80 -1
  134. data/generated/google/apis/cloudfunctions_v1/service.rb +118 -0
  135. data/generated/google/apis/cloudfunctions_v1beta2.rb +35 -0
  136. data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +678 -0
  137. data/generated/google/apis/cloudfunctions_v1beta2/representations.rb +264 -0
  138. data/generated/google/apis/cloudfunctions_v1beta2/service.rb +385 -0
  139. data/generated/google/apis/cloudkms_v1.rb +1 -1
  140. data/generated/google/apis/cloudkms_v1/classes.rb +652 -622
  141. data/generated/google/apis/cloudkms_v1/representations.rb +138 -137
  142. data/generated/google/apis/cloudkms_v1/service.rb +320 -320
  143. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  144. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  145. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1129 -1129
  146. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +188 -188
  147. data/generated/google/apis/cloudresourcemanager_v1/service.rb +609 -609
  148. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  149. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +404 -404
  150. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +83 -83
  151. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +328 -328
  152. data/generated/google/apis/cloudresourcemanager_v2beta1.rb +38 -0
  153. data/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb +819 -0
  154. data/generated/google/apis/cloudresourcemanager_v2beta1/representations.rb +304 -0
  155. data/generated/google/apis/cloudresourcemanager_v2beta1/service.rb +528 -0
  156. data/generated/google/apis/cloudtrace_v1.rb +5 -5
  157. data/generated/google/apis/cloudtrace_v1/classes.rb +67 -67
  158. data/generated/google/apis/cloudtrace_v1/representations.rb +21 -21
  159. data/generated/google/apis/cloudtrace_v1/service.rb +36 -36
  160. data/generated/google/apis/cloudtrace_v2.rb +43 -0
  161. data/generated/google/apis/cloudtrace_v2/classes.rb +797 -0
  162. data/generated/google/apis/cloudtrace_v2/representations.rb +353 -0
  163. data/generated/google/apis/cloudtrace_v2/service.rb +238 -0
  164. data/generated/google/apis/clouduseraccounts_alpha.rb +44 -0
  165. data/generated/google/apis/clouduseraccounts_alpha/classes.rb +1188 -0
  166. data/generated/google/apis/clouduseraccounts_alpha/representations.rb +494 -0
  167. data/generated/google/apis/clouduseraccounts_alpha/service.rb +1152 -0
  168. data/generated/google/apis/clouduseraccounts_vm_alpha.rb +44 -0
  169. data/generated/google/apis/clouduseraccounts_vm_alpha/classes.rb +1188 -0
  170. data/generated/google/apis/clouduseraccounts_vm_alpha/representations.rb +494 -0
  171. data/generated/google/apis/clouduseraccounts_vm_alpha/service.rb +1152 -0
  172. data/generated/google/apis/clouduseraccounts_vm_beta.rb +44 -0
  173. data/generated/google/apis/clouduseraccounts_vm_beta/classes.rb +845 -0
  174. data/generated/google/apis/clouduseraccounts_vm_beta/representations.rb +352 -0
  175. data/generated/google/apis/clouduseraccounts_vm_beta/service.rb +908 -0
  176. data/generated/google/apis/compute_alpha.rb +49 -0
  177. data/generated/google/apis/compute_alpha/classes.rb +23796 -0
  178. data/generated/google/apis/compute_alpha/representations.rb +9391 -0
  179. data/generated/google/apis/compute_alpha/service.rb +24188 -0
  180. data/generated/google/apis/compute_beta.rb +1 -1
  181. data/generated/google/apis/compute_beta/classes.rb +1597 -235
  182. data/generated/google/apis/compute_beta/representations.rb +477 -0
  183. data/generated/google/apis/compute_beta/service.rb +2875 -1677
  184. data/generated/google/apis/compute_v1.rb +1 -1
  185. data/generated/google/apis/compute_v1/classes.rb +319 -197
  186. data/generated/google/apis/compute_v1/representations.rb +51 -0
  187. data/generated/google/apis/compute_v1/service.rb +2057 -172
  188. data/generated/google/apis/consumersurveys_v2.rb +40 -0
  189. data/generated/google/apis/consumersurveys_v2/classes.rb +736 -0
  190. data/generated/google/apis/consumersurveys_v2/representations.rb +343 -0
  191. data/generated/google/apis/consumersurveys_v2/service.rb +478 -0
  192. data/generated/google/apis/container_v1.rb +1 -1
  193. data/generated/google/apis/container_v1/classes.rb +1072 -936
  194. data/generated/google/apis/container_v1/representations.rb +266 -202
  195. data/generated/google/apis/container_v1/service.rb +243 -243
  196. data/generated/google/apis/container_v1beta1.rb +35 -0
  197. data/generated/google/apis/container_v1beta1/classes.rb +1900 -0
  198. data/generated/google/apis/container_v1beta1/representations.rb +662 -0
  199. data/generated/google/apis/container_v1beta1/service.rb +1875 -0
  200. data/generated/google/apis/content_v2.rb +1 -1
  201. data/generated/google/apis/content_v2/classes.rb +72 -3
  202. data/generated/google/apis/content_v2/representations.rb +23 -0
  203. data/generated/google/apis/content_v2/service.rb +23 -18
  204. data/generated/google/apis/content_v2sandbox.rb +35 -0
  205. data/generated/google/apis/content_v2sandbox/classes.rb +2406 -0
  206. data/generated/google/apis/content_v2sandbox/representations.rb +1042 -0
  207. data/generated/google/apis/content_v2sandbox/service.rb +709 -0
  208. data/generated/google/apis/dataflow_v1b3.rb +5 -5
  209. data/generated/google/apis/dataflow_v1b3/classes.rb +3341 -3341
  210. data/generated/google/apis/dataflow_v1b3/representations.rb +807 -807
  211. data/generated/google/apis/dataflow_v1b3/service.rb +492 -444
  212. data/generated/google/apis/dataproc_v1.rb +1 -1
  213. data/generated/google/apis/dataproc_v1/classes.rb +1101 -1101
  214. data/generated/google/apis/dataproc_v1/representations.rb +227 -227
  215. data/generated/google/apis/dataproc_v1/service.rb +254 -254
  216. data/generated/google/apis/dataproc_v1beta2.rb +34 -0
  217. data/generated/google/apis/dataproc_v1beta2/classes.rb +1756 -0
  218. data/generated/google/apis/dataproc_v1beta2/representations.rb +675 -0
  219. data/generated/google/apis/dataproc_v1beta2/service.rb +739 -0
  220. data/generated/google/apis/datastore_v1.rb +4 -4
  221. data/generated/google/apis/datastore_v1/classes.rb +1311 -773
  222. data/generated/google/apis/datastore_v1/representations.rb +351 -148
  223. data/generated/google/apis/datastore_v1/service.rb +206 -55
  224. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  225. data/generated/google/apis/datastore_v1beta3/classes.rb +1621 -0
  226. data/generated/google/apis/datastore_v1beta3/representations.rb +715 -0
  227. data/generated/google/apis/datastore_v1beta3/service.rb +260 -0
  228. data/generated/google/apis/deploymentmanager_alpha.rb +44 -0
  229. data/generated/google/apis/deploymentmanager_alpha/classes.rb +2422 -0
  230. data/generated/google/apis/deploymentmanager_alpha/representations.rb +1054 -0
  231. data/generated/google/apis/deploymentmanager_alpha/service.rb +1883 -0
  232. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  233. data/generated/google/apis/deploymentmanager_v2/classes.rb +81 -2
  234. data/generated/google/apis/deploymentmanager_v2/representations.rb +30 -0
  235. data/generated/google/apis/deploymentmanager_v2beta.rb +44 -0
  236. data/generated/google/apis/deploymentmanager_v2beta/classes.rb +2426 -0
  237. data/generated/google/apis/deploymentmanager_v2beta/representations.rb +1054 -0
  238. data/generated/google/apis/deploymentmanager_v2beta/service.rb +1687 -0
  239. data/generated/google/apis/dfareporting_v2_7.rb +1 -1
  240. data/generated/google/apis/dfareporting_v2_7/classes.rb +9 -26
  241. data/generated/google/apis/dfareporting_v2_7/service.rb +1 -0
  242. data/generated/google/apis/dfareporting_v2_8.rb +1 -1
  243. data/generated/google/apis/dfareporting_v2_8/classes.rb +26 -34
  244. data/generated/google/apis/dfareporting_v2_8/representations.rb +1 -0
  245. data/generated/google/apis/dfareporting_v2_8/service.rb +1 -0
  246. data/generated/google/apis/dlp_v2beta1.rb +36 -0
  247. data/generated/google/apis/dlp_v2beta1/classes.rb +1735 -0
  248. data/generated/google/apis/dlp_v2beta1/representations.rb +879 -0
  249. data/generated/google/apis/dlp_v2beta1/service.rb +406 -0
  250. data/generated/google/apis/dns_v1.rb +1 -1
  251. data/generated/google/apis/dns_v2beta1.rb +1 -1
  252. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  253. data/generated/google/apis/drive_v2.rb +1 -1
  254. data/generated/google/apis/drive_v3.rb +1 -1
  255. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  256. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +267 -261
  257. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +73 -72
  258. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +1 -1
  259. data/generated/google/apis/firebaserules_v1.rb +1 -1
  260. data/generated/google/apis/firebaserules_v1/classes.rb +283 -283
  261. data/generated/google/apis/firebaserules_v1/representations.rb +75 -75
  262. data/generated/google/apis/firebaserules_v1/service.rb +113 -113
  263. data/generated/google/apis/fitness_v1.rb +1 -1
  264. data/generated/google/apis/fitness_v1/classes.rb +1 -1
  265. data/generated/google/apis/fusiontables_v1.rb +37 -0
  266. data/generated/google/apis/fusiontables_v1/classes.rb +977 -0
  267. data/generated/google/apis/fusiontables_v1/representations.rb +449 -0
  268. data/generated/google/apis/fusiontables_v1/service.rb +1373 -0
  269. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  270. data/generated/google/apis/games_management_v1management.rb +1 -1
  271. data/generated/google/apis/games_v1.rb +1 -1
  272. data/generated/google/apis/genomics_v1.rb +8 -8
  273. data/generated/google/apis/genomics_v1/classes.rb +2288 -2288
  274. data/generated/google/apis/genomics_v1/representations.rb +482 -482
  275. data/generated/google/apis/genomics_v1/service.rb +966 -966
  276. data/generated/google/apis/genomics_v1alpha2.rb +40 -0
  277. data/generated/google/apis/genomics_v1alpha2/classes.rb +1207 -0
  278. data/generated/google/apis/genomics_v1alpha2/representations.rb +449 -0
  279. data/generated/google/apis/genomics_v1alpha2/service.rb +426 -0
  280. data/generated/google/apis/gmail_v1.rb +1 -1
  281. data/generated/google/apis/iam_v1.rb +1 -1
  282. data/generated/google/apis/iam_v1/classes.rb +664 -395
  283. data/generated/google/apis/iam_v1/representations.rb +194 -81
  284. data/generated/google/apis/iam_v1/service.rb +657 -92
  285. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  286. data/generated/google/apis/kgsearch_v1/classes.rb +7 -7
  287. data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
  288. data/generated/google/apis/kgsearch_v1/service.rb +8 -8
  289. data/generated/google/apis/language_v1.rb +4 -1
  290. data/generated/google/apis/language_v1/classes.rb +393 -393
  291. data/generated/google/apis/language_v1/representations.rb +95 -95
  292. data/generated/google/apis/language_v1/service.rb +42 -42
  293. data/generated/google/apis/language_v1beta1.rb +4 -1
  294. data/generated/google/apis/language_v1beta1/classes.rb +457 -457
  295. data/generated/google/apis/language_v1beta1/representations.rb +114 -114
  296. data/generated/google/apis/language_v1beta1/service.rb +48 -48
  297. data/generated/google/apis/language_v1beta2.rb +39 -0
  298. data/generated/google/apis/language_v1beta2/classes.rb +824 -0
  299. data/generated/google/apis/language_v1beta2/representations.rb +373 -0
  300. data/generated/google/apis/language_v1beta2/service.rb +217 -0
  301. data/generated/google/apis/logging_v2.rb +9 -9
  302. data/generated/google/apis/logging_v2/classes.rb +840 -834
  303. data/generated/google/apis/logging_v2/representations.rb +168 -167
  304. data/generated/google/apis/logging_v2/service.rb +667 -463
  305. data/generated/google/apis/logging_v2beta1.rb +9 -9
  306. data/generated/google/apis/logging_v2beta1/classes.rb +856 -850
  307. data/generated/google/apis/logging_v2beta1/representations.rb +169 -168
  308. data/generated/google/apis/logging_v2beta1/service.rb +253 -255
  309. data/generated/google/apis/manufacturers_v1.rb +1 -1
  310. data/generated/google/apis/manufacturers_v1/classes.rb +396 -389
  311. data/generated/google/apis/manufacturers_v1/representations.rb +92 -91
  312. data/generated/google/apis/manufacturers_v1/service.rb +8 -7
  313. data/generated/google/apis/ml_v1.rb +1 -1
  314. data/generated/google/apis/ml_v1/classes.rb +1487 -1676
  315. data/generated/google/apis/ml_v1/representations.rb +229 -299
  316. data/generated/google/apis/ml_v1/service.rb +359 -253
  317. data/generated/google/apis/ml_v1beta1.rb +34 -0
  318. data/generated/google/apis/ml_v1beta1/classes.rb +2396 -0
  319. data/generated/google/apis/ml_v1beta1/representations.rb +755 -0
  320. data/generated/google/apis/ml_v1beta1/service.rb +975 -0
  321. data/generated/google/apis/monitoring_v3.rb +6 -6
  322. data/generated/google/apis/monitoring_v3/classes.rb +834 -834
  323. data/generated/google/apis/monitoring_v3/representations.rb +168 -168
  324. data/generated/google/apis/monitoring_v3/service.rb +330 -330
  325. data/generated/google/apis/mybusiness_v3/classes.rb +1181 -1181
  326. data/generated/google/apis/mybusiness_v3/representations.rb +242 -242
  327. data/generated/google/apis/mybusiness_v3/service.rb +241 -241
  328. data/generated/google/apis/oauth2_v1.rb +43 -0
  329. data/generated/google/apis/oauth2_v1/classes.rb +321 -0
  330. data/generated/google/apis/oauth2_v1/representations.rb +135 -0
  331. data/generated/google/apis/oauth2_v1/service.rb +337 -0
  332. data/generated/google/apis/oauth2_v2.rb +1 -1
  333. data/generated/google/apis/oslogin_v1alpha.rb +37 -0
  334. data/generated/google/apis/oslogin_v1alpha/classes.rb +200 -0
  335. data/generated/google/apis/oslogin_v1alpha/representations.rb +105 -0
  336. data/generated/google/apis/oslogin_v1alpha/service.rb +228 -0
  337. data/generated/google/apis/pagespeedonline_v1.rb +32 -0
  338. data/generated/google/apis/pagespeedonline_v1/classes.rb +536 -0
  339. data/generated/google/apis/pagespeedonline_v1/representations.rb +257 -0
  340. data/generated/google/apis/pagespeedonline_v1/service.rb +120 -0
  341. data/generated/google/apis/partners_v2.rb +1 -1
  342. data/generated/google/apis/partners_v2/classes.rb +1512 -1512
  343. data/generated/google/apis/partners_v2/representations.rb +368 -368
  344. data/generated/google/apis/partners_v2/service.rb +596 -596
  345. data/generated/google/apis/people_v1.rb +15 -15
  346. data/generated/google/apis/people_v1/classes.rb +1384 -1383
  347. data/generated/google/apis/people_v1/representations.rb +311 -311
  348. data/generated/google/apis/people_v1/service.rb +208 -202
  349. data/generated/google/apis/playcustomapp_v1.rb +34 -0
  350. data/generated/google/apis/playcustomapp_v1/classes.rb +51 -0
  351. data/generated/google/apis/playcustomapp_v1/representations.rb +40 -0
  352. data/generated/google/apis/playcustomapp_v1/service.rb +114 -0
  353. data/generated/google/apis/playmoviespartner_v1.rb +34 -0
  354. data/generated/google/apis/playmoviespartner_v1/classes.rb +782 -0
  355. data/generated/google/apis/playmoviespartner_v1/representations.rb +191 -0
  356. data/generated/google/apis/playmoviespartner_v1/service.rb +354 -0
  357. data/generated/google/apis/plus_domains_v1.rb +1 -1
  358. data/generated/google/apis/plus_v1.rb +1 -1
  359. data/generated/google/apis/prediction_v1_2.rb +44 -0
  360. data/generated/google/apis/prediction_v1_2/classes.rb +237 -0
  361. data/generated/google/apis/prediction_v1_2/representations.rb +133 -0
  362. data/generated/google/apis/prediction_v1_2/service.rb +287 -0
  363. data/generated/google/apis/prediction_v1_3.rb +44 -0
  364. data/generated/google/apis/prediction_v1_3/classes.rb +286 -0
  365. data/generated/google/apis/prediction_v1_3/representations.rb +139 -0
  366. data/generated/google/apis/prediction_v1_3/service.rb +284 -0
  367. data/generated/google/apis/prediction_v1_4.rb +44 -0
  368. data/generated/google/apis/prediction_v1_4/classes.rb +336 -0
  369. data/generated/google/apis/prediction_v1_4/representations.rb +158 -0
  370. data/generated/google/apis/prediction_v1_4/service.rb +284 -0
  371. data/generated/google/apis/prediction_v1_5.rb +44 -0
  372. data/generated/google/apis/prediction_v1_5/classes.rb +708 -0
  373. data/generated/google/apis/prediction_v1_5/representations.rb +352 -0
  374. data/generated/google/apis/prediction_v1_5/service.rb +357 -0
  375. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  376. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +539 -539
  377. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +105 -105
  378. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +312 -312
  379. data/generated/google/apis/pubsub_v1.rb +4 -4
  380. data/generated/google/apis/pubsub_v1/classes.rb +352 -352
  381. data/generated/google/apis/pubsub_v1/representations.rb +77 -77
  382. data/generated/google/apis/pubsub_v1/service.rb +346 -346
  383. data/generated/google/apis/pubsub_v1beta1a.rb +37 -0
  384. data/generated/google/apis/pubsub_v1beta1a/classes.rb +605 -0
  385. data/generated/google/apis/pubsub_v1beta1a/representations.rb +306 -0
  386. data/generated/google/apis/pubsub_v1beta1a/service.rb +549 -0
  387. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  388. data/generated/google/apis/pubsub_v1beta2/classes.rb +679 -0
  389. data/generated/google/apis/pubsub_v1beta2/representations.rb +324 -0
  390. data/generated/google/apis/pubsub_v1beta2/service.rb +779 -0
  391. data/generated/google/apis/replicapool_v1beta1.rb +50 -0
  392. data/generated/google/apis/replicapool_v1beta1/classes.rb +918 -0
  393. data/generated/google/apis/replicapool_v1beta1/representations.rb +409 -0
  394. data/generated/google/apis/replicapool_v1beta1/service.rb +511 -0
  395. data/generated/google/apis/resourceviews_v1beta1.rb +50 -0
  396. data/generated/google/apis/resourceviews_v1beta1/classes.rb +338 -0
  397. data/generated/google/apis/resourceviews_v1beta1/representations.rb +201 -0
  398. data/generated/google/apis/resourceviews_v1beta1/service.rb +667 -0
  399. data/generated/google/apis/runtimeconfig_v1.rb +4 -4
  400. data/generated/google/apis/runtimeconfig_v1/classes.rb +118 -118
  401. data/generated/google/apis/runtimeconfig_v1/representations.rb +18 -18
  402. data/generated/google/apis/runtimeconfig_v1/service.rb +21 -21
  403. data/generated/google/apis/runtimeconfig_v1beta1.rb +40 -0
  404. data/generated/google/apis/runtimeconfig_v1beta1/classes.rb +805 -0
  405. data/generated/google/apis/runtimeconfig_v1beta1/representations.rb +280 -0
  406. data/generated/google/apis/runtimeconfig_v1beta1/service.rb +903 -0
  407. data/generated/google/apis/safebrowsing_v4.rb +32 -0
  408. data/generated/google/apis/safebrowsing_v4/classes.rb +771 -0
  409. data/generated/google/apis/safebrowsing_v4/representations.rb +379 -0
  410. data/generated/google/apis/safebrowsing_v4/service.rb +252 -0
  411. data/generated/google/apis/script_v1.rb +19 -19
  412. data/generated/google/apis/script_v1/classes.rb +99 -157
  413. data/generated/google/apis/script_v1/representations.rb +17 -47
  414. data/generated/google/apis/script_v1/service.rb +12 -12
  415. data/generated/google/apis/searchconsole_v1.rb +1 -1
  416. data/generated/google/apis/searchconsole_v1/classes.rb +84 -84
  417. data/generated/google/apis/searchconsole_v1/representations.rb +32 -32
  418. data/generated/google/apis/servicecontrol_v1.rb +4 -4
  419. data/generated/google/apis/servicecontrol_v1/classes.rb +1086 -1042
  420. data/generated/google/apis/servicecontrol_v1/representations.rb +216 -200
  421. data/generated/google/apis/servicecontrol_v1/service.rb +120 -114
  422. data/generated/google/apis/servicemanagement_v1.rb +7 -7
  423. data/generated/google/apis/servicemanagement_v1/classes.rb +3375 -3383
  424. data/generated/google/apis/servicemanagement_v1/representations.rb +551 -552
  425. data/generated/google/apis/servicemanagement_v1/service.rb +386 -386
  426. data/generated/google/apis/serviceuser_v1.rb +5 -5
  427. data/generated/google/apis/serviceuser_v1/classes.rb +2667 -2598
  428. data/generated/google/apis/serviceuser_v1/representations.rb +406 -389
  429. data/generated/google/apis/serviceuser_v1/service.rb +43 -43
  430. data/generated/google/apis/sheets_v4.rb +7 -7
  431. data/generated/google/apis/sheets_v4/classes.rb +5031 -5024
  432. data/generated/google/apis/sheets_v4/representations.rb +931 -930
  433. data/generated/google/apis/sheets_v4/service.rb +244 -244
  434. data/generated/google/apis/slides_v1.rb +10 -10
  435. data/generated/google/apis/slides_v1/classes.rb +2915 -2915
  436. data/generated/google/apis/slides_v1/representations.rb +698 -698
  437. data/generated/google/apis/slides_v1/service.rb +35 -35
  438. data/generated/google/apis/sourcerepo_v1.rb +3 -3
  439. data/generated/google/apis/sourcerepo_v1/classes.rb +313 -313
  440. data/generated/google/apis/sourcerepo_v1/representations.rb +77 -77
  441. data/generated/google/apis/sourcerepo_v1/service.rb +102 -102
  442. data/generated/google/apis/spanner_v1.rb +4 -4
  443. data/generated/google/apis/spanner_v1/classes.rb +2304 -2251
  444. data/generated/google/apis/spanner_v1/representations.rb +338 -323
  445. data/generated/google/apis/spanner_v1/service.rb +689 -689
  446. data/generated/google/apis/spectrum_v1explorer.rb +31 -0
  447. data/generated/google/apis/spectrum_v1explorer/classes.rb +1612 -0
  448. data/generated/google/apis/spectrum_v1explorer/representations.rb +611 -0
  449. data/generated/google/apis/spectrum_v1explorer/service.rb +285 -0
  450. data/generated/google/apis/speech_v1.rb +34 -0
  451. data/generated/google/apis/speech_v1/classes.rb +572 -0
  452. data/generated/google/apis/speech_v1/representations.rb +236 -0
  453. data/generated/google/apis/speech_v1/service.rb +277 -0
  454. data/generated/google/apis/speech_v1beta1.rb +1 -1
  455. data/generated/google/apis/speech_v1beta1/classes.rb +312 -312
  456. data/generated/google/apis/speech_v1beta1/representations.rb +48 -48
  457. data/generated/google/apis/speech_v1beta1/service.rb +46 -46
  458. data/generated/google/apis/sqladmin_v1beta3.rb +38 -0
  459. data/generated/google/apis/sqladmin_v1beta3/classes.rb +1615 -0
  460. data/generated/google/apis/sqladmin_v1beta3/representations.rb +731 -0
  461. data/generated/google/apis/sqladmin_v1beta3/service.rb +1045 -0
  462. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  463. data/generated/google/apis/sqladmin_v1beta4/classes.rb +15 -7
  464. data/generated/google/apis/sqladmin_v1beta4/representations.rb +1 -0
  465. data/generated/google/apis/storage_v1.rb +1 -1
  466. data/generated/google/apis/storage_v1/classes.rb +7 -6
  467. data/generated/google/apis/storage_v1/service.rb +51 -29
  468. data/generated/google/apis/storage_v1beta1.rb +40 -0
  469. data/generated/google/apis/storage_v1beta1/classes.rb +616 -0
  470. data/generated/google/apis/storage_v1beta1/representations.rb +249 -0
  471. data/generated/google/apis/storage_v1beta1/service.rb +1082 -0
  472. data/generated/google/apis/storage_v1beta2.rb +40 -0
  473. data/generated/google/apis/storage_v1beta2/classes.rb +1048 -0
  474. data/generated/google/apis/storage_v1beta2/representations.rb +425 -0
  475. data/generated/google/apis/storage_v1beta2/service.rb +1736 -0
  476. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  477. data/generated/google/apis/storagetransfer_v1/classes.rb +556 -556
  478. data/generated/google/apis/storagetransfer_v1/representations.rb +139 -139
  479. data/generated/google/apis/storagetransfer_v1/service.rb +148 -148
  480. data/generated/google/apis/streetviewpublish_v1.rb +36 -0
  481. data/generated/google/apis/streetviewpublish_v1/classes.rb +705 -0
  482. data/generated/google/apis/streetviewpublish_v1/representations.rb +296 -0
  483. data/generated/google/apis/streetviewpublish_v1/service.rb +485 -0
  484. data/generated/google/apis/taskqueue_v1beta1.rb +37 -0
  485. data/generated/google/apis/taskqueue_v1beta1/classes.rb +242 -0
  486. data/generated/google/apis/taskqueue_v1beta1/representations.rb +124 -0
  487. data/generated/google/apis/taskqueue_v1beta1/service.rb +269 -0
  488. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  489. data/generated/google/apis/toolresults_v1beta3/classes.rb +382 -4
  490. data/generated/google/apis/toolresults_v1beta3/representations.rb +139 -0
  491. data/generated/google/apis/toolresults_v1beta3/service.rb +50 -0
  492. data/generated/google/apis/toolresults_v1beta3firstparty.rb +31 -0
  493. data/generated/google/apis/toolresults_v1beta3firstparty/classes.rb +2630 -0
  494. data/generated/google/apis/toolresults_v1beta3firstparty/representations.rb +886 -0
  495. data/generated/google/apis/toolresults_v1beta3firstparty/service.rb +1288 -0
  496. data/generated/google/apis/translate_v2/classes.rb +111 -111
  497. data/generated/google/apis/translate_v2/representations.rb +49 -49
  498. data/generated/google/apis/translate_v2/service.rb +94 -94
  499. data/generated/google/apis/vault_v1.rb +31 -0
  500. data/generated/google/apis/vault_v1/classes.rb +554 -0
  501. data/generated/google/apis/vault_v1/representations.rb +318 -0
  502. data/generated/google/apis/vault_v1/service.rb +677 -0
  503. data/generated/google/apis/videointelligence_v1beta1.rb +34 -0
  504. data/generated/google/apis/videointelligence_v1beta1/classes.rb +903 -0
  505. data/generated/google/apis/videointelligence_v1beta1/representations.rb +351 -0
  506. data/generated/google/apis/videointelligence_v1beta1/service.rb +92 -0
  507. data/generated/google/apis/vision_v1.rb +4 -4
  508. data/generated/google/apis/vision_v1/classes.rb +1176 -1178
  509. data/generated/google/apis/vision_v1/representations.rb +235 -235
  510. data/generated/google/apis/webmasters_v3.rb +1 -1
  511. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  512. data/generated/google/apis/youtube_analytics_v1beta1.rb +46 -0
  513. data/generated/google/apis/youtube_analytics_v1beta1/classes.rb +337 -0
  514. data/generated/google/apis/youtube_analytics_v1beta1/representations.rb +174 -0
  515. data/generated/google/apis/youtube_analytics_v1beta1/service.rb +491 -0
  516. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  517. data/generated/google/apis/youtube_partner_v1/classes.rb +3 -3
  518. data/generated/google/apis/youtube_partner_v1/representations.rb +1 -1
  519. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  520. data/generated/google/apis/youtubereporting_v1/classes.rb +134 -134
  521. data/generated/google/apis/youtubereporting_v1/representations.rb +36 -36
  522. data/generated/google/apis/youtubereporting_v1/service.rb +131 -131
  523. data/lib/google/apis/version.rb +1 -1
  524. metadata +246 -2
@@ -47,31 +47,19 @@ module Google
47
47
  @batch_path = 'batch'
48
48
  end
49
49
 
50
- # Returns a list of invitations that the requesting user is permitted to
51
- # view, restricted to those that match the list request.
52
- # *Note:* At least one of `user_id` or `course_id` must be supplied. Both
53
- # fields can be supplied.
50
+ # Creates a course.
51
+ # The user specified in `ownerId` is the owner of the created course
52
+ # and added as a teacher.
54
53
  # This method returns the following error codes:
55
- # * `PERMISSION_DENIED` for access errors.
56
- # @param [String] page_token
57
- # nextPageToken
58
- # value returned from a previous
59
- # list call, indicating
60
- # that the subsequent page of results should be returned.
61
- # The list request must be
62
- # otherwise identical to the one that resulted in this token.
63
- # @param [String] user_id
64
- # Restricts returned invitations to those for a specific user. The identifier
65
- # can be one of the following:
66
- # * the numeric identifier for the user
67
- # * the email address of the user
68
- # * the string literal `"me"`, indicating the requesting user
69
- # @param [Fixnum] page_size
70
- # Maximum number of items to return. Zero means no maximum.
71
- # The server may return fewer than the specified number of results.
72
- # @param [String] course_id
73
- # Restricts returned invitations to those for a course with the specified
74
- # identifier.
54
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to create
55
+ # courses or for access errors.
56
+ # * `NOT_FOUND` if the primary teacher is not a valid user.
57
+ # * `FAILED_PRECONDITION` if the course owner's account is disabled or for
58
+ # the following request errors:
59
+ # * UserGroupsMembershipLimitReached
60
+ # * `ALREADY_EXISTS` if an alias was specified in the `id` and
61
+ # already exists.
62
+ # @param [Google::Apis::ClassroomV1::Course] course_object
75
63
  # @param [String] fields
76
64
  # Selector specifying which fields to include in a partial response.
77
65
  # @param [String] quota_user
@@ -81,34 +69,34 @@ module Google
81
69
  # Request-specific options
82
70
  #
83
71
  # @yield [result, err] Result & error if block supplied
84
- # @yieldparam result [Google::Apis::ClassroomV1::ListInvitationsResponse] parsed result object
72
+ # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object
85
73
  # @yieldparam err [StandardError] error object if request failed
86
74
  #
87
- # @return [Google::Apis::ClassroomV1::ListInvitationsResponse]
75
+ # @return [Google::Apis::ClassroomV1::Course]
88
76
  #
89
77
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
90
78
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
91
79
  # @raise [Google::Apis::AuthorizationError] Authorization is required
92
- def list_invitations(page_token: nil, user_id: nil, page_size: nil, course_id: nil, fields: nil, quota_user: nil, options: nil, &block)
93
- command = make_simple_command(:get, 'v1/invitations', options)
94
- command.response_representation = Google::Apis::ClassroomV1::ListInvitationsResponse::Representation
95
- command.response_class = Google::Apis::ClassroomV1::ListInvitationsResponse
96
- command.query['pageToken'] = page_token unless page_token.nil?
97
- command.query['userId'] = user_id unless user_id.nil?
98
- command.query['pageSize'] = page_size unless page_size.nil?
99
- command.query['courseId'] = course_id unless course_id.nil?
80
+ def create_course(course_object = nil, fields: nil, quota_user: nil, options: nil, &block)
81
+ command = make_simple_command(:post, 'v1/courses', options)
82
+ command.request_representation = Google::Apis::ClassroomV1::Course::Representation
83
+ command.request_object = course_object
84
+ command.response_representation = Google::Apis::ClassroomV1::Course::Representation
85
+ command.response_class = Google::Apis::ClassroomV1::Course
100
86
  command.query['fields'] = fields unless fields.nil?
101
87
  command.query['quotaUser'] = quota_user unless quota_user.nil?
102
88
  execute_or_queue_command(command, &block)
103
89
  end
104
90
 
105
- # Returns an invitation.
91
+ # Deletes a course.
106
92
  # This method returns the following error codes:
107
- # * `PERMISSION_DENIED` if the requesting user is not permitted to view the
108
- # requested invitation or for access errors.
109
- # * `NOT_FOUND` if no invitation exists with the requested ID.
93
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to delete the
94
+ # requested course or for access errors.
95
+ # * `NOT_FOUND` if no course exists with the requested ID.
110
96
  # @param [String] id
111
- # Identifier of the invitation to return.
97
+ # Identifier of the course to delete.
98
+ # This identifier can be either the Classroom-assigned identifier or an
99
+ # alias.
112
100
  # @param [String] fields
113
101
  # Selector specifying which fields to include in a partial response.
114
102
  # @param [String] quota_user
@@ -118,35 +106,33 @@ module Google
118
106
  # Request-specific options
119
107
  #
120
108
  # @yield [result, err] Result & error if block supplied
121
- # @yieldparam result [Google::Apis::ClassroomV1::Invitation] parsed result object
109
+ # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
122
110
  # @yieldparam err [StandardError] error object if request failed
123
111
  #
124
- # @return [Google::Apis::ClassroomV1::Invitation]
112
+ # @return [Google::Apis::ClassroomV1::Empty]
125
113
  #
126
114
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
127
115
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
128
116
  # @raise [Google::Apis::AuthorizationError] Authorization is required
129
- def get_invitation(id, fields: nil, quota_user: nil, options: nil, &block)
130
- command = make_simple_command(:get, 'v1/invitations/{id}', options)
131
- command.response_representation = Google::Apis::ClassroomV1::Invitation::Representation
132
- command.response_class = Google::Apis::ClassroomV1::Invitation
117
+ def delete_course(id, fields: nil, quota_user: nil, options: nil, &block)
118
+ command = make_simple_command(:delete, 'v1/courses/{id}', options)
119
+ command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
120
+ command.response_class = Google::Apis::ClassroomV1::Empty
133
121
  command.params['id'] = id unless id.nil?
134
122
  command.query['fields'] = fields unless fields.nil?
135
123
  command.query['quotaUser'] = quota_user unless quota_user.nil?
136
124
  execute_or_queue_command(command, &block)
137
125
  end
138
126
 
139
- # Creates an invitation. Only one invitation for a user and course may exist
140
- # at a time. Delete and re-create an invitation to make changes.
127
+ # Returns a course.
141
128
  # This method returns the following error codes:
142
- # * `PERMISSION_DENIED` if the requesting user is not permitted to create
143
- # invitations for this course or for access errors.
144
- # * `NOT_FOUND` if the course or the user does not exist.
145
- # * `FAILED_PRECONDITION` if the requested user's account is disabled or if
146
- # the user already has this role or a role with greater permissions.
147
- # * `ALREADY_EXISTS` if an invitation for the specified user and course
148
- # already exists.
149
- # @param [Google::Apis::ClassroomV1::Invitation] invitation_object
129
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
130
+ # requested course or for access errors.
131
+ # * `NOT_FOUND` if no course exists with the requested ID.
132
+ # @param [String] id
133
+ # Identifier of the course to return.
134
+ # This identifier can be either the Classroom-assigned identifier or an
135
+ # alias.
150
136
  # @param [String] fields
151
137
  # Selector specifying which fields to include in a partial response.
152
138
  # @param [String] quota_user
@@ -156,39 +142,57 @@ module Google
156
142
  # Request-specific options
157
143
  #
158
144
  # @yield [result, err] Result & error if block supplied
159
- # @yieldparam result [Google::Apis::ClassroomV1::Invitation] parsed result object
145
+ # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object
160
146
  # @yieldparam err [StandardError] error object if request failed
161
147
  #
162
- # @return [Google::Apis::ClassroomV1::Invitation]
148
+ # @return [Google::Apis::ClassroomV1::Course]
163
149
  #
164
150
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
165
151
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
166
152
  # @raise [Google::Apis::AuthorizationError] Authorization is required
167
- def create_invitation(invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block)
168
- command = make_simple_command(:post, 'v1/invitations', options)
169
- command.request_representation = Google::Apis::ClassroomV1::Invitation::Representation
170
- command.request_object = invitation_object
171
- command.response_representation = Google::Apis::ClassroomV1::Invitation::Representation
172
- command.response_class = Google::Apis::ClassroomV1::Invitation
153
+ def get_course(id, fields: nil, quota_user: nil, options: nil, &block)
154
+ command = make_simple_command(:get, 'v1/courses/{id}', options)
155
+ command.response_representation = Google::Apis::ClassroomV1::Course::Representation
156
+ command.response_class = Google::Apis::ClassroomV1::Course
157
+ command.params['id'] = id unless id.nil?
173
158
  command.query['fields'] = fields unless fields.nil?
174
159
  command.query['quotaUser'] = quota_user unless quota_user.nil?
175
160
  execute_or_queue_command(command, &block)
176
161
  end
177
162
 
178
- # Accepts an invitation, removing it and adding the invited user to the
179
- # teachers or students (as appropriate) of the specified course. Only the
180
- # invited user may accept an invitation.
163
+ # Returns a list of courses that the requesting user is permitted to view,
164
+ # restricted to those that match the request. Returned courses are ordered by
165
+ # creation time, with the most recently created coming first.
181
166
  # This method returns the following error codes:
182
- # * `PERMISSION_DENIED` if the requesting user is not permitted to accept the
183
- # requested invitation or for access errors.
184
- # * `FAILED_PRECONDITION` for the following request errors:
185
- # * CourseMemberLimitReached
186
- # * CourseNotModifiable
187
- # * CourseTeacherLimitReached
188
- # * UserGroupsMembershipLimitReached
189
- # * `NOT_FOUND` if no invitation exists with the requested ID.
190
- # @param [String] id
191
- # Identifier of the invitation to accept.
167
+ # * `PERMISSION_DENIED` for access errors.
168
+ # * `INVALID_ARGUMENT` if the query argument is malformed.
169
+ # * `NOT_FOUND` if any users specified in the query arguments do not exist.
170
+ # @param [Array<String>, String] course_states
171
+ # Restricts returned courses to those in one of the specified states
172
+ # The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED.
173
+ # @param [Fixnum] page_size
174
+ # Maximum number of items to return. Zero or unspecified indicates that the
175
+ # server may assign a maximum.
176
+ # The server may return fewer than the specified number of results.
177
+ # @param [String] page_token
178
+ # nextPageToken
179
+ # value returned from a previous
180
+ # list call,
181
+ # indicating that the subsequent page of results should be returned.
182
+ # The list request must be
183
+ # otherwise identical to the one that resulted in this token.
184
+ # @param [String] student_id
185
+ # Restricts returned courses to those having a student with the specified
186
+ # identifier. The identifier can be one of the following:
187
+ # * the numeric identifier for the user
188
+ # * the email address of the user
189
+ # * the string literal `"me"`, indicating the requesting user
190
+ # @param [String] teacher_id
191
+ # Restricts returned courses to those having a teacher with the specified
192
+ # identifier. The identifier can be one of the following:
193
+ # * the numeric identifier for the user
194
+ # * the email address of the user
195
+ # * the string literal `"me"`, indicating the requesting user
192
196
  # @param [String] fields
193
197
  # Selector specifying which fields to include in a partial response.
194
198
  # @param [String] quota_user
@@ -198,31 +202,58 @@ module Google
198
202
  # Request-specific options
199
203
  #
200
204
  # @yield [result, err] Result & error if block supplied
201
- # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
205
+ # @yieldparam result [Google::Apis::ClassroomV1::ListCoursesResponse] parsed result object
202
206
  # @yieldparam err [StandardError] error object if request failed
203
207
  #
204
- # @return [Google::Apis::ClassroomV1::Empty]
208
+ # @return [Google::Apis::ClassroomV1::ListCoursesResponse]
205
209
  #
206
210
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
207
211
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
208
212
  # @raise [Google::Apis::AuthorizationError] Authorization is required
209
- def accept_invitation(id, fields: nil, quota_user: nil, options: nil, &block)
210
- command = make_simple_command(:post, 'v1/invitations/{id}:accept', options)
211
- command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
212
- command.response_class = Google::Apis::ClassroomV1::Empty
213
- command.params['id'] = id unless id.nil?
213
+ def list_courses(course_states: nil, page_size: nil, page_token: nil, student_id: nil, teacher_id: nil, fields: nil, quota_user: nil, options: nil, &block)
214
+ command = make_simple_command(:get, 'v1/courses', options)
215
+ command.response_representation = Google::Apis::ClassroomV1::ListCoursesResponse::Representation
216
+ command.response_class = Google::Apis::ClassroomV1::ListCoursesResponse
217
+ command.query['courseStates'] = course_states unless course_states.nil?
218
+ command.query['pageSize'] = page_size unless page_size.nil?
219
+ command.query['pageToken'] = page_token unless page_token.nil?
220
+ command.query['studentId'] = student_id unless student_id.nil?
221
+ command.query['teacherId'] = teacher_id unless teacher_id.nil?
214
222
  command.query['fields'] = fields unless fields.nil?
215
223
  command.query['quotaUser'] = quota_user unless quota_user.nil?
216
224
  execute_or_queue_command(command, &block)
217
225
  end
218
226
 
219
- # Deletes an invitation.
227
+ # Updates one or more fields in a course.
220
228
  # This method returns the following error codes:
221
- # * `PERMISSION_DENIED` if the requesting user is not permitted to delete the
222
- # requested invitation or for access errors.
223
- # * `NOT_FOUND` if no invitation exists with the requested ID.
229
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to modify the
230
+ # requested course or for access errors.
231
+ # * `NOT_FOUND` if no course exists with the requested ID.
232
+ # * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or
233
+ # if no update mask is supplied.
234
+ # * `FAILED_PRECONDITION` for the following request errors:
235
+ # * CourseNotModifiable
224
236
  # @param [String] id
225
- # Identifier of the invitation to delete.
237
+ # Identifier of the course to update.
238
+ # This identifier can be either the Classroom-assigned identifier or an
239
+ # alias.
240
+ # @param [Google::Apis::ClassroomV1::Course] course_object
241
+ # @param [String] update_mask
242
+ # Mask that identifies which fields on the course to update.
243
+ # This field is required to do an update. The update will fail if invalid
244
+ # fields are specified. The following fields are valid:
245
+ # * `name`
246
+ # * `section`
247
+ # * `descriptionHeading`
248
+ # * `description`
249
+ # * `room`
250
+ # * `courseState`
251
+ # * `ownerId`
252
+ # Note: patches to ownerId are treated as being effective immediately, but in
253
+ # practice it may take some time for the ownership transfer of all affected
254
+ # resources to complete.
255
+ # When set in a query parameter, this field should be specified as
256
+ # `updateMask=<field1>,<field2>,...`
226
257
  # @param [String] fields
227
258
  # Selector specifying which fields to include in a partial response.
228
259
  # @param [String] quota_user
@@ -232,35 +263,39 @@ module Google
232
263
  # Request-specific options
233
264
  #
234
265
  # @yield [result, err] Result & error if block supplied
235
- # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
266
+ # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object
236
267
  # @yieldparam err [StandardError] error object if request failed
237
268
  #
238
- # @return [Google::Apis::ClassroomV1::Empty]
269
+ # @return [Google::Apis::ClassroomV1::Course]
239
270
  #
240
271
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
241
272
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
242
273
  # @raise [Google::Apis::AuthorizationError] Authorization is required
243
- def delete_invitation(id, fields: nil, quota_user: nil, options: nil, &block)
244
- command = make_simple_command(:delete, 'v1/invitations/{id}', options)
245
- command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
246
- command.response_class = Google::Apis::ClassroomV1::Empty
274
+ def patch_course(id, course_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
275
+ command = make_simple_command(:patch, 'v1/courses/{id}', options)
276
+ command.request_representation = Google::Apis::ClassroomV1::Course::Representation
277
+ command.request_object = course_object
278
+ command.response_representation = Google::Apis::ClassroomV1::Course::Representation
279
+ command.response_class = Google::Apis::ClassroomV1::Course
247
280
  command.params['id'] = id unless id.nil?
281
+ command.query['updateMask'] = update_mask unless update_mask.nil?
248
282
  command.query['fields'] = fields unless fields.nil?
249
283
  command.query['quotaUser'] = quota_user unless quota_user.nil?
250
284
  execute_or_queue_command(command, &block)
251
285
  end
252
286
 
253
- # Returns a user profile.
287
+ # Updates a course.
254
288
  # This method returns the following error codes:
255
- # * `PERMISSION_DENIED` if the requesting user is not permitted to access
256
- # this user profile, if no profile exists with the requested ID, or for
257
- # access errors.
258
- # @param [String] user_id
259
- # Identifier of the profile to return. The identifier can be one of the
260
- # following:
261
- # * the numeric identifier for the user
262
- # * the email address of the user
263
- # * the string literal `"me"`, indicating the requesting user
289
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to modify the
290
+ # requested course or for access errors.
291
+ # * `NOT_FOUND` if no course exists with the requested ID.
292
+ # * `FAILED_PRECONDITION` for the following request errors:
293
+ # * CourseNotModifiable
294
+ # @param [String] id
295
+ # Identifier of the course to update.
296
+ # This identifier can be either the Classroom-assigned identifier or an
297
+ # alias.
298
+ # @param [Google::Apis::ClassroomV1::Course] course_object
264
299
  # @param [String] fields
265
300
  # Selector specifying which fields to include in a partial response.
266
301
  # @param [String] quota_user
@@ -270,51 +305,40 @@ module Google
270
305
  # Request-specific options
271
306
  #
272
307
  # @yield [result, err] Result & error if block supplied
273
- # @yieldparam result [Google::Apis::ClassroomV1::UserProfile] parsed result object
308
+ # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object
274
309
  # @yieldparam err [StandardError] error object if request failed
275
310
  #
276
- # @return [Google::Apis::ClassroomV1::UserProfile]
311
+ # @return [Google::Apis::ClassroomV1::Course]
277
312
  #
278
313
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
279
314
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
280
315
  # @raise [Google::Apis::AuthorizationError] Authorization is required
281
- def get_user_profile(user_id, fields: nil, quota_user: nil, options: nil, &block)
282
- command = make_simple_command(:get, 'v1/userProfiles/{userId}', options)
283
- command.response_representation = Google::Apis::ClassroomV1::UserProfile::Representation
284
- command.response_class = Google::Apis::ClassroomV1::UserProfile
285
- command.params['userId'] = user_id unless user_id.nil?
316
+ def update_course(id, course_object = nil, fields: nil, quota_user: nil, options: nil, &block)
317
+ command = make_simple_command(:put, 'v1/courses/{id}', options)
318
+ command.request_representation = Google::Apis::ClassroomV1::Course::Representation
319
+ command.request_object = course_object
320
+ command.response_representation = Google::Apis::ClassroomV1::Course::Representation
321
+ command.response_class = Google::Apis::ClassroomV1::Course
322
+ command.params['id'] = id unless id.nil?
286
323
  command.query['fields'] = fields unless fields.nil?
287
324
  command.query['quotaUser'] = quota_user unless quota_user.nil?
288
325
  execute_or_queue_command(command, &block)
289
326
  end
290
327
 
291
- # Modifies a guardian invitation.
292
- # Currently, the only valid modification is to change the `state` from
293
- # `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation.
328
+ # Creates an alias for a course.
294
329
  # This method returns the following error codes:
295
- # * `PERMISSION_DENIED` if the current user does not have permission to
296
- # manage guardians, if guardians are not enabled for the domain in question
297
- # or for other access errors.
298
- # * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state.
299
- # * `INVALID_ARGUMENT` if the format of the student ID provided
300
- # cannot be recognized (it is not an email address, nor a `user_id` from
301
- # this API), or if the passed `GuardianInvitation` has a `state` other than
302
- # `COMPLETE`, or if it modifies fields other than `state`.
303
- # * `NOT_FOUND` if the student ID provided is a valid student ID, but
304
- # Classroom has no record of that student, or if the `id` field does not
305
- # refer to a guardian invitation known to Classroom.
306
- # @param [String] student_id
307
- # The ID of the student whose guardian invitation is to be modified.
308
- # @param [String] invitation_id
309
- # The `id` field of the `GuardianInvitation` to be modified.
310
- # @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object
311
- # @param [String] update_mask
312
- # Mask that identifies which fields on the course to update.
313
- # This field is required to do an update. The update will fail if invalid
314
- # fields are specified. The following fields are valid:
315
- # * `state`
316
- # When set in a query parameter, this field should be specified as
317
- # `updateMask=<field1>,<field2>,...`
330
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to create the
331
+ # alias or for access errors.
332
+ # * `NOT_FOUND` if the course does not exist.
333
+ # * `ALREADY_EXISTS` if the alias already exists.
334
+ # * `FAILED_PRECONDITION` if the alias requested does not make sense for the
335
+ # requesting user or course (for example, if a user not in a domain
336
+ # attempts to access a domain-scoped alias).
337
+ # @param [String] course_id
338
+ # Identifier of the course to alias.
339
+ # This identifier can be either the Classroom-assigned identifier or an
340
+ # alias.
341
+ # @param [Google::Apis::ClassroomV1::CourseAlias] course_alias_object
318
342
  # @param [String] fields
319
343
  # Selector specifying which fields to include in a partial response.
320
344
  # @param [String] quota_user
@@ -324,44 +348,41 @@ module Google
324
348
  # Request-specific options
325
349
  #
326
350
  # @yield [result, err] Result & error if block supplied
327
- # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
351
+ # @yieldparam result [Google::Apis::ClassroomV1::CourseAlias] parsed result object
328
352
  # @yieldparam err [StandardError] error object if request failed
329
353
  #
330
- # @return [Google::Apis::ClassroomV1::GuardianInvitation]
354
+ # @return [Google::Apis::ClassroomV1::CourseAlias]
331
355
  #
332
356
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
333
357
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
334
358
  # @raise [Google::Apis::AuthorizationError] Authorization is required
335
- def patch_user_profile_guardian_invitation(student_id, invitation_id, guardian_invitation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
336
- command = make_simple_command(:patch, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options)
337
- command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
338
- command.request_object = guardian_invitation_object
339
- command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
340
- command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
341
- command.params['studentId'] = student_id unless student_id.nil?
342
- command.params['invitationId'] = invitation_id unless invitation_id.nil?
343
- command.query['updateMask'] = update_mask unless update_mask.nil?
359
+ def create_course_alias(course_id, course_alias_object = nil, fields: nil, quota_user: nil, options: nil, &block)
360
+ command = make_simple_command(:post, 'v1/courses/{courseId}/aliases', options)
361
+ command.request_representation = Google::Apis::ClassroomV1::CourseAlias::Representation
362
+ command.request_object = course_alias_object
363
+ command.response_representation = Google::Apis::ClassroomV1::CourseAlias::Representation
364
+ command.response_class = Google::Apis::ClassroomV1::CourseAlias
365
+ command.params['courseId'] = course_id unless course_id.nil?
344
366
  command.query['fields'] = fields unless fields.nil?
345
367
  command.query['quotaUser'] = quota_user unless quota_user.nil?
346
368
  execute_or_queue_command(command, &block)
347
369
  end
348
370
 
349
- # Returns a specific guardian invitation.
371
+ # Deletes an alias of a course.
350
372
  # This method returns the following error codes:
351
- # * `PERMISSION_DENIED` if the requesting user is not permitted to view
352
- # guardian invitations for the student identified by the `student_id`, if
353
- # guardians are not enabled for the domain in question, or for other
354
- # access errors.
355
- # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
356
- # be recognized (it is not an email address, nor a `student_id` from the
357
- # API, nor the literal string `me`).
358
- # * `NOT_FOUND` if Classroom cannot find any record of the given student or
359
- # `invitation_id`. May also be returned if the student exists, but the
360
- # requesting user does not have access to see that student.
361
- # @param [String] student_id
362
- # The ID of the student whose guardian invitation is being requested.
363
- # @param [String] invitation_id
364
- # The `id` field of the `GuardianInvitation` being requested.
373
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to remove the
374
+ # alias or for access errors.
375
+ # * `NOT_FOUND` if the alias does not exist.
376
+ # * `FAILED_PRECONDITION` if the alias requested does not make sense for the
377
+ # requesting user or course (for example, if a user not in a domain
378
+ # attempts to delete a domain-scoped alias).
379
+ # @param [String] course_id
380
+ # Identifier of the course whose alias should be deleted.
381
+ # This identifier can be either the Classroom-assigned identifier or an
382
+ # alias.
383
+ # @param [String] alias_
384
+ # Alias to delete.
385
+ # This may not be the Classroom-assigned identifier.
365
386
  # @param [String] fields
366
387
  # Selector specifying which fields to include in a partial response.
367
388
  # @param [String] quota_user
@@ -371,48 +392,38 @@ module Google
371
392
  # Request-specific options
372
393
  #
373
394
  # @yield [result, err] Result & error if block supplied
374
- # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
395
+ # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
375
396
  # @yieldparam err [StandardError] error object if request failed
376
397
  #
377
- # @return [Google::Apis::ClassroomV1::GuardianInvitation]
398
+ # @return [Google::Apis::ClassroomV1::Empty]
378
399
  #
379
400
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
380
401
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
381
402
  # @raise [Google::Apis::AuthorizationError] Authorization is required
382
- def get_user_profile_guardian_invitation(student_id, invitation_id, fields: nil, quota_user: nil, options: nil, &block)
383
- command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options)
384
- command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
385
- command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
386
- command.params['studentId'] = student_id unless student_id.nil?
387
- command.params['invitationId'] = invitation_id unless invitation_id.nil?
403
+ def delete_course_alias(course_id, alias_, fields: nil, quota_user: nil, options: nil, &block)
404
+ command = make_simple_command(:delete, 'v1/courses/{courseId}/aliases/{alias}', options)
405
+ command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
406
+ command.response_class = Google::Apis::ClassroomV1::Empty
407
+ command.params['courseId'] = course_id unless course_id.nil?
408
+ command.params['alias'] = alias_ unless alias_.nil?
388
409
  command.query['fields'] = fields unless fields.nil?
389
410
  command.query['quotaUser'] = quota_user unless quota_user.nil?
390
411
  execute_or_queue_command(command, &block)
391
412
  end
392
413
 
393
- # Returns a list of guardian invitations that the requesting user is
394
- # permitted to view, filtered by the parameters provided.
414
+ # Returns a list of aliases for a course.
395
415
  # This method returns the following error codes:
396
- # * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting
397
- # user is not permitted to view guardian invitations for that student, if
398
- # `"-"` is specified as the `student_id` and the user is not a domain
399
- # administrator, if guardians are not enabled for the domain in question,
400
- # or for other access errors.
401
- # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
402
- # be recognized (it is not an email address, nor a `student_id` from the
403
- # API, nor the literal string `me`). May also be returned if an invalid
404
- # `page_token` or `state` is provided.
405
- # * `NOT_FOUND` if a `student_id` is specified, and its format can be
406
- # recognized, but Classroom has no record of that student.
407
- # @param [String] student_id
408
- # The ID of the student whose guardian invitations are to be returned.
409
- # The identifier can be one of the following:
410
- # * the numeric identifier for the user
411
- # * the email address of the user
412
- # * the string literal `"me"`, indicating the requesting user
413
- # * the string literal `"-"`, indicating that results should be returned for
414
- # all students that the requesting user is permitted to view guardian
415
- # invitations.
416
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
417
+ # course or for access errors.
418
+ # * `NOT_FOUND` if the course does not exist.
419
+ # @param [String] course_id
420
+ # The identifier of the course.
421
+ # This identifier can be either the Classroom-assigned identifier or an
422
+ # alias.
423
+ # @param [Fixnum] page_size
424
+ # Maximum number of items to return. Zero or unspecified indicates that the
425
+ # server may assign a maximum.
426
+ # The server may return fewer than the specified number of results.
416
427
  # @param [String] page_token
417
428
  # nextPageToken
418
429
  # value returned from a previous
@@ -420,16 +431,6 @@ module Google
420
431
  # indicating that the subsequent page of results should be returned.
421
432
  # The list request
422
433
  # must be otherwise identical to the one that resulted in this token.
423
- # @param [Fixnum] page_size
424
- # Maximum number of items to return. Zero or unspecified indicates that the
425
- # server may assign a maximum.
426
- # The server may return fewer than the specified number of results.
427
- # @param [Array<String>, String] states
428
- # If specified, only results with the specified `state` values will be
429
- # returned. Otherwise, results with a `state` of `PENDING` will be returned.
430
- # @param [String] invited_email_address
431
- # If specified, only results with the specified `invited_email_address`
432
- # will be returned.
433
434
  # @param [String] fields
434
435
  # Selector specifying which fields to include in a partial response.
435
436
  # @param [String] quota_user
@@ -439,57 +440,46 @@ module Google
439
440
  # Request-specific options
440
441
  #
441
442
  # @yield [result, err] Result & error if block supplied
442
- # @yieldparam result [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse] parsed result object
443
+ # @yieldparam result [Google::Apis::ClassroomV1::ListCourseAliasesResponse] parsed result object
443
444
  # @yieldparam err [StandardError] error object if request failed
444
445
  #
445
- # @return [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse]
446
+ # @return [Google::Apis::ClassroomV1::ListCourseAliasesResponse]
446
447
  #
447
448
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
448
449
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
449
450
  # @raise [Google::Apis::AuthorizationError] Authorization is required
450
- def list_user_profile_guardian_invitations(student_id, page_token: nil, page_size: nil, states: nil, invited_email_address: nil, fields: nil, quota_user: nil, options: nil, &block)
451
- command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations', options)
452
- command.response_representation = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse::Representation
453
- command.response_class = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse
454
- command.params['studentId'] = student_id unless student_id.nil?
455
- command.query['pageToken'] = page_token unless page_token.nil?
451
+ def list_course_aliases(course_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
452
+ command = make_simple_command(:get, 'v1/courses/{courseId}/aliases', options)
453
+ command.response_representation = Google::Apis::ClassroomV1::ListCourseAliasesResponse::Representation
454
+ command.response_class = Google::Apis::ClassroomV1::ListCourseAliasesResponse
455
+ command.params['courseId'] = course_id unless course_id.nil?
456
456
  command.query['pageSize'] = page_size unless page_size.nil?
457
- command.query['states'] = states unless states.nil?
458
- command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil?
457
+ command.query['pageToken'] = page_token unless page_token.nil?
459
458
  command.query['fields'] = fields unless fields.nil?
460
459
  command.query['quotaUser'] = quota_user unless quota_user.nil?
461
460
  execute_or_queue_command(command, &block)
462
461
  end
463
462
 
464
- # Creates a guardian invitation, and sends an email to the guardian asking
465
- # them to confirm that they are the student's guardian.
466
- # Once the guardian accepts the invitation, their `state` will change to
467
- # `COMPLETED` and they will start receiving guardian notifications. A
468
- # `Guardian` resource will also be created to represent the active guardian.
469
- # The request object must have the `student_id` and
470
- # `invited_email_address` fields set. Failing to set these fields, or
471
- # setting any other fields in the request, will result in an error.
463
+ # Creates course work.
464
+ # The resulting course work (and corresponding student submissions) are
465
+ # associated with the Developer Console project of the
466
+ # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
467
+ # make the request. Classroom API requests to modify course work and student
468
+ # submissions must be made with an OAuth client ID from the associated
469
+ # Developer Console project.
472
470
  # This method returns the following error codes:
473
- # * `PERMISSION_DENIED` if the current user does not have permission to
474
- # manage guardians, if the guardian in question has already rejected
475
- # too many requests for that student, if guardians are not enabled for the
476
- # domain in question, or for other access errors.
477
- # * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian
478
- # link limit.
479
- # * `INVALID_ARGUMENT` if the guardian email address is not valid (for
480
- # example, if it is too long), or if the format of the student ID provided
481
- # cannot be recognized (it is not an email address, nor a `user_id` from
482
- # this API). This error will also be returned if read-only fields are set,
483
- # or if the `state` field is set to to a value other than `PENDING`.
484
- # * `NOT_FOUND` if the student ID provided is a valid student ID, but
485
- # Classroom has no record of that student.
486
- # * `ALREADY_EXISTS` if there is already a pending guardian invitation for
487
- # the student and `invited_email_address` provided, or if the provided
488
- # `invited_email_address` matches the Google account of an existing
489
- # `Guardian` for this user.
490
- # @param [String] student_id
491
- # ID of the student (in standard format)
492
- # @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object
471
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
472
+ # requested course, create course work in the requested course, share a
473
+ # Drive attachment, or for access errors.
474
+ # * `INVALID_ARGUMENT` if the request is malformed.
475
+ # * `NOT_FOUND` if the requested course does not exist.
476
+ # * `FAILED_PRECONDITION` for the following request error:
477
+ # * AttachmentNotVisible
478
+ # @param [String] course_id
479
+ # Identifier of the course.
480
+ # This identifier can be either the Classroom-assigned identifier or an
481
+ # alias.
482
+ # @param [Google::Apis::ClassroomV1::CourseWork] course_work_object
493
483
  # @param [String] fields
494
484
  # Selector specifying which fields to include in a partial response.
495
485
  # @param [String] quota_user
@@ -499,114 +489,44 @@ module Google
499
489
  # Request-specific options
500
490
  #
501
491
  # @yield [result, err] Result & error if block supplied
502
- # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
492
+ # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object
503
493
  # @yieldparam err [StandardError] error object if request failed
504
494
  #
505
- # @return [Google::Apis::ClassroomV1::GuardianInvitation]
495
+ # @return [Google::Apis::ClassroomV1::CourseWork]
506
496
  #
507
497
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
508
498
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
509
499
  # @raise [Google::Apis::AuthorizationError] Authorization is required
510
- def create_user_profile_guardian_invitation(student_id, guardian_invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block)
511
- command = make_simple_command(:post, 'v1/userProfiles/{studentId}/guardianInvitations', options)
512
- command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
513
- command.request_object = guardian_invitation_object
514
- command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
515
- command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
516
- command.params['studentId'] = student_id unless student_id.nil?
500
+ def create_course_work(course_id, course_work_object = nil, fields: nil, quota_user: nil, options: nil, &block)
501
+ command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork', options)
502
+ command.request_representation = Google::Apis::ClassroomV1::CourseWork::Representation
503
+ command.request_object = course_work_object
504
+ command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation
505
+ command.response_class = Google::Apis::ClassroomV1::CourseWork
506
+ command.params['courseId'] = course_id unless course_id.nil?
517
507
  command.query['fields'] = fields unless fields.nil?
518
508
  command.query['quotaUser'] = quota_user unless quota_user.nil?
519
509
  execute_or_queue_command(command, &block)
520
510
  end
521
511
 
522
- # Returns a specific guardian.
512
+ # Deletes a course work.
513
+ # This request must be made by the Developer Console project of the
514
+ # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
515
+ # create the corresponding course work item.
523
516
  # This method returns the following error codes:
524
- # * `PERMISSION_DENIED` if no user that matches the provided `student_id`
525
- # is visible to the requesting user, if the requesting user is not
526
- # permitted to view guardian information for the student identified by the
527
- # `student_id`, if guardians are not enabled for the domain in question,
528
- # or for other access errors.
529
- # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
530
- # be recognized (it is not an email address, nor a `student_id` from the
531
- # API, nor the literal string `me`).
532
- # * `NOT_FOUND` if the requesting user is permitted to view guardians for
533
- # the requested `student_id`, but no `Guardian` record exists for that
534
- # student that matches the provided `guardian_id`.
535
- # @param [String] student_id
536
- # The student whose guardian is being requested. One of the following:
537
- # * the numeric identifier for the user
538
- # * the email address of the user
539
- # * the string literal `"me"`, indicating the requesting user
540
- # @param [String] guardian_id
541
- # The `id` field from a `Guardian`.
542
- # @param [String] fields
543
- # Selector specifying which fields to include in a partial response.
544
- # @param [String] quota_user
545
- # Available to use for quota purposes for server-side applications. Can be any
546
- # arbitrary string assigned to a user, but should not exceed 40 characters.
547
- # @param [Google::Apis::RequestOptions] options
548
- # Request-specific options
549
- #
550
- # @yield [result, err] Result & error if block supplied
551
- # @yieldparam result [Google::Apis::ClassroomV1::Guardian] parsed result object
552
- # @yieldparam err [StandardError] error object if request failed
553
- #
554
- # @return [Google::Apis::ClassroomV1::Guardian]
555
- #
556
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
557
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
558
- # @raise [Google::Apis::AuthorizationError] Authorization is required
559
- def get_user_profile_guardian(student_id, guardian_id, fields: nil, quota_user: nil, options: nil, &block)
560
- command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options)
561
- command.response_representation = Google::Apis::ClassroomV1::Guardian::Representation
562
- command.response_class = Google::Apis::ClassroomV1::Guardian
563
- command.params['studentId'] = student_id unless student_id.nil?
564
- command.params['guardianId'] = guardian_id unless guardian_id.nil?
565
- command.query['fields'] = fields unless fields.nil?
566
- command.query['quotaUser'] = quota_user unless quota_user.nil?
567
- execute_or_queue_command(command, &block)
568
- end
569
-
570
- # Returns a list of guardians that the requesting user is permitted to
571
- # view, restricted to those that match the request.
572
- # To list guardians for any student that the requesting user may view
573
- # guardians for, use the literal character `-` for the student ID.
574
- # This method returns the following error codes:
575
- # * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting
576
- # user is not permitted to view guardian information for that student, if
577
- # `"-"` is specified as the `student_id` and the user is not a domain
578
- # administrator, if guardians are not enabled for the domain in question,
579
- # if the `invited_email_address` filter is set by a user who is not a
580
- # domain administrator, or for other access errors.
581
- # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
582
- # be recognized (it is not an email address, nor a `student_id` from the
583
- # API, nor the literal string `me`). May also be returned if an invalid
584
- # `page_token` is provided.
585
- # * `NOT_FOUND` if a `student_id` is specified, and its format can be
586
- # recognized, but Classroom has no record of that student.
587
- # @param [String] student_id
588
- # Filter results by the student who the guardian is linked to.
589
- # The identifier can be one of the following:
590
- # * the numeric identifier for the user
591
- # * the email address of the user
592
- # * the string literal `"me"`, indicating the requesting user
593
- # * the string literal `"-"`, indicating that results should be returned for
594
- # all students that the requesting user has access to view.
595
- # @param [String] page_token
596
- # nextPageToken
597
- # value returned from a previous
598
- # list call,
599
- # indicating that the subsequent page of results should be returned.
600
- # The list request
601
- # must be otherwise identical to the one that resulted in this token.
602
- # @param [Fixnum] page_size
603
- # Maximum number of items to return. Zero or unspecified indicates that the
604
- # server may assign a maximum.
605
- # The server may return fewer than the specified number of results.
606
- # @param [String] invited_email_address
607
- # Filter results by the email address that the original invitation was sent
608
- # to, resulting in this guardian link.
609
- # This filter can only be used by domain administrators.
517
+ # * `PERMISSION_DENIED` if the requesting developer project did not create
518
+ # the corresponding course work, if the requesting user is not permitted
519
+ # to delete the requested course or for access errors.
520
+ # * `FAILED_PRECONDITION` if the requested course work has already been
521
+ # deleted.
522
+ # * `NOT_FOUND` if no course exists with the requested ID.
523
+ # @param [String] course_id
524
+ # Identifier of the course.
525
+ # This identifier can be either the Classroom-assigned identifier or an
526
+ # alias.
527
+ # @param [String] id
528
+ # Identifier of the course work to delete.
529
+ # This identifier is a Classroom-assigned identifier.
610
530
  # @param [String] fields
611
531
  # Selector specifying which fields to include in a partial response.
612
532
  # @param [String] quota_user
@@ -616,49 +536,37 @@ module Google
616
536
  # Request-specific options
617
537
  #
618
538
  # @yield [result, err] Result & error if block supplied
619
- # @yieldparam result [Google::Apis::ClassroomV1::ListGuardiansResponse] parsed result object
539
+ # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
620
540
  # @yieldparam err [StandardError] error object if request failed
621
541
  #
622
- # @return [Google::Apis::ClassroomV1::ListGuardiansResponse]
542
+ # @return [Google::Apis::ClassroomV1::Empty]
623
543
  #
624
544
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
625
545
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
626
546
  # @raise [Google::Apis::AuthorizationError] Authorization is required
627
- def list_user_profile_guardians(student_id, page_token: nil, page_size: nil, invited_email_address: nil, fields: nil, quota_user: nil, options: nil, &block)
628
- command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians', options)
629
- command.response_representation = Google::Apis::ClassroomV1::ListGuardiansResponse::Representation
630
- command.response_class = Google::Apis::ClassroomV1::ListGuardiansResponse
631
- command.params['studentId'] = student_id unless student_id.nil?
632
- command.query['pageToken'] = page_token unless page_token.nil?
633
- command.query['pageSize'] = page_size unless page_size.nil?
634
- command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil?
547
+ def delete_course_course_work(course_id, id, fields: nil, quota_user: nil, options: nil, &block)
548
+ command = make_simple_command(:delete, 'v1/courses/{courseId}/courseWork/{id}', options)
549
+ command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
550
+ command.response_class = Google::Apis::ClassroomV1::Empty
551
+ command.params['courseId'] = course_id unless course_id.nil?
552
+ command.params['id'] = id unless id.nil?
635
553
  command.query['fields'] = fields unless fields.nil?
636
554
  command.query['quotaUser'] = quota_user unless quota_user.nil?
637
555
  execute_or_queue_command(command, &block)
638
556
  end
639
557
 
640
- # Deletes a guardian.
641
- # The guardian will no longer receive guardian notifications and the guardian
642
- # will no longer be accessible via the API.
558
+ # Returns course work.
643
559
  # This method returns the following error codes:
644
- # * `PERMISSION_DENIED` if no user that matches the provided `student_id`
645
- # is visible to the requesting user, if the requesting user is not
646
- # permitted to manage guardians for the student identified by the
647
- # `student_id`, if guardians are not enabled for the domain in question,
648
- # or for other access errors.
649
- # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
650
- # be recognized (it is not an email address, nor a `student_id` from the
651
- # API).
652
- # * `NOT_FOUND` if the requesting user is permitted to modify guardians for
653
- # the requested `student_id`, but no `Guardian` record exists for that
654
- # student with the provided `guardian_id`.
655
- # @param [String] student_id
656
- # The student whose guardian is to be deleted. One of the following:
657
- # * the numeric identifier for the user
658
- # * the email address of the user
659
- # * the string literal `"me"`, indicating the requesting user
660
- # @param [String] guardian_id
661
- # The `id` field from a `Guardian`.
560
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
561
+ # requested course or course work, or for access errors.
562
+ # * `INVALID_ARGUMENT` if the request is malformed.
563
+ # * `NOT_FOUND` if the requested course or course work does not exist.
564
+ # @param [String] course_id
565
+ # Identifier of the course.
566
+ # This identifier can be either the Classroom-assigned identifier or an
567
+ # alias.
568
+ # @param [String] id
569
+ # Identifier of the course work.
662
570
  # @param [String] fields
663
571
  # Selector specifying which fields to include in a partial response.
664
572
  # @param [String] quota_user
@@ -668,34 +576,58 @@ module Google
668
576
  # Request-specific options
669
577
  #
670
578
  # @yield [result, err] Result & error if block supplied
671
- # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
579
+ # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object
672
580
  # @yieldparam err [StandardError] error object if request failed
673
581
  #
674
- # @return [Google::Apis::ClassroomV1::Empty]
582
+ # @return [Google::Apis::ClassroomV1::CourseWork]
675
583
  #
676
584
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
677
585
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
678
586
  # @raise [Google::Apis::AuthorizationError] Authorization is required
679
- def delete_user_profile_guardian(student_id, guardian_id, fields: nil, quota_user: nil, options: nil, &block)
680
- command = make_simple_command(:delete, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options)
681
- command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
682
- command.response_class = Google::Apis::ClassroomV1::Empty
683
- command.params['studentId'] = student_id unless student_id.nil?
684
- command.params['guardianId'] = guardian_id unless guardian_id.nil?
587
+ def get_course_work(course_id, id, fields: nil, quota_user: nil, options: nil, &block)
588
+ command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{id}', options)
589
+ command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation
590
+ command.response_class = Google::Apis::ClassroomV1::CourseWork
591
+ command.params['courseId'] = course_id unless course_id.nil?
592
+ command.params['id'] = id unless id.nil?
685
593
  command.query['fields'] = fields unless fields.nil?
686
594
  command.query['quotaUser'] = quota_user unless quota_user.nil?
687
595
  execute_or_queue_command(command, &block)
688
596
  end
689
597
 
690
- # Returns a course.
598
+ # Returns a list of course work that the requester is permitted to view.
599
+ # Course students may only view `PUBLISHED` course work. Course teachers
600
+ # and domain administrators may view all course work.
691
601
  # This method returns the following error codes:
692
- # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
693
- # requested course or for access errors.
694
- # * `NOT_FOUND` if no course exists with the requested ID.
695
- # @param [String] id
696
- # Identifier of the course to return.
602
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access
603
+ # the requested course or for access errors.
604
+ # * `INVALID_ARGUMENT` if the request is malformed.
605
+ # * `NOT_FOUND` if the requested course does not exist.
606
+ # @param [String] course_id
607
+ # Identifier of the course.
697
608
  # This identifier can be either the Classroom-assigned identifier or an
698
609
  # alias.
610
+ # @param [Array<String>, String] course_work_states
611
+ # Restriction on the work status to return. Only courseWork that matches
612
+ # is returned. If unspecified, items with a work status of `PUBLISHED`
613
+ # is returned.
614
+ # @param [String] order_by
615
+ # Optional sort ordering for results. A comma-separated list of fields with
616
+ # an optional sort direction keyword. Supported fields are `updateTime`
617
+ # and `dueDate`. Supported direction keywords are `asc` and `desc`.
618
+ # If not specified, `updateTime desc` is the default behavior.
619
+ # Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`
620
+ # @param [Fixnum] page_size
621
+ # Maximum number of items to return. Zero or unspecified indicates that the
622
+ # server may assign a maximum.
623
+ # The server may return fewer than the specified number of results.
624
+ # @param [String] page_token
625
+ # nextPageToken
626
+ # value returned from a previous
627
+ # list call,
628
+ # indicating that the subsequent page of results should be returned.
629
+ # The list request
630
+ # must be otherwise identical to the one that resulted in this token.
699
631
  # @param [String] fields
700
632
  # Selector specifying which fields to include in a partial response.
701
633
  # @param [String] quota_user
@@ -705,50 +637,68 @@ module Google
705
637
  # Request-specific options
706
638
  #
707
639
  # @yield [result, err] Result & error if block supplied
708
- # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object
640
+ # @yieldparam result [Google::Apis::ClassroomV1::ListCourseWorkResponse] parsed result object
709
641
  # @yieldparam err [StandardError] error object if request failed
710
642
  #
711
- # @return [Google::Apis::ClassroomV1::Course]
643
+ # @return [Google::Apis::ClassroomV1::ListCourseWorkResponse]
712
644
  #
713
645
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
714
646
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
715
647
  # @raise [Google::Apis::AuthorizationError] Authorization is required
716
- def get_course(id, fields: nil, quota_user: nil, options: nil, &block)
717
- command = make_simple_command(:get, 'v1/courses/{id}', options)
718
- command.response_representation = Google::Apis::ClassroomV1::Course::Representation
719
- command.response_class = Google::Apis::ClassroomV1::Course
720
- command.params['id'] = id unless id.nil?
648
+ def list_course_works(course_id, course_work_states: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
649
+ command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork', options)
650
+ command.response_representation = Google::Apis::ClassroomV1::ListCourseWorkResponse::Representation
651
+ command.response_class = Google::Apis::ClassroomV1::ListCourseWorkResponse
652
+ command.params['courseId'] = course_id unless course_id.nil?
653
+ command.query['courseWorkStates'] = course_work_states unless course_work_states.nil?
654
+ command.query['orderBy'] = order_by unless order_by.nil?
655
+ command.query['pageSize'] = page_size unless page_size.nil?
656
+ command.query['pageToken'] = page_token unless page_token.nil?
721
657
  command.query['fields'] = fields unless fields.nil?
722
658
  command.query['quotaUser'] = quota_user unless quota_user.nil?
723
659
  execute_or_queue_command(command, &block)
724
660
  end
725
661
 
726
- # Updates one or more fields in a course.
662
+ # Updates one or more fields of a course work.
663
+ # See google.classroom.v1.CourseWork for details
664
+ # of which fields may be updated and who may change them.
665
+ # This request must be made by the Developer Console project of the
666
+ # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
667
+ # create the corresponding course work item.
727
668
  # This method returns the following error codes:
728
- # * `PERMISSION_DENIED` if the requesting user is not permitted to modify the
729
- # requested course or for access errors.
730
- # * `NOT_FOUND` if no course exists with the requested ID.
731
- # * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or
732
- # if no update mask is supplied.
733
- # * `FAILED_PRECONDITION` for the following request errors:
734
- # * CourseNotModifiable
735
- # @param [String] id
736
- # Identifier of the course to update.
669
+ # * `PERMISSION_DENIED` if the requesting developer project did not create
670
+ # the corresponding course work, if the user is not permitted to make the
671
+ # requested modification to the student submission, or for
672
+ # access errors.
673
+ # * `INVALID_ARGUMENT` if the request is malformed.
674
+ # * `FAILED_PRECONDITION` if the requested course work has already been
675
+ # deleted.
676
+ # * `NOT_FOUND` if the requested course, course work, or student submission
677
+ # does not exist.
678
+ # @param [String] course_id
679
+ # Identifier of the course.
737
680
  # This identifier can be either the Classroom-assigned identifier or an
738
681
  # alias.
739
- # @param [Google::Apis::ClassroomV1::Course] course_object
682
+ # @param [String] id
683
+ # Identifier of the course work.
684
+ # @param [Google::Apis::ClassroomV1::CourseWork] course_work_object
740
685
  # @param [String] update_mask
741
- # Mask that identifies which fields on the course to update.
742
- # This field is required to do an update. The update will fail if invalid
743
- # fields are specified. The following fields are valid:
744
- # * `name`
745
- # * `section`
746
- # * `descriptionHeading`
686
+ # Mask that identifies which fields on the course work to update.
687
+ # This field is required to do an update. The update fails if invalid
688
+ # fields are specified. If a field supports empty values, it can be cleared
689
+ # by specifying it in the update mask and not in the CourseWork object. If a
690
+ # field that does not support empty values is included in the update mask and
691
+ # not set in the CourseWork object, an `INVALID_ARGUMENT` error will be
692
+ # returned.
693
+ # The following fields may be specified by teachers:
694
+ # * `title`
747
695
  # * `description`
748
- # * `room`
749
- # * `courseState`
750
- # When set in a query parameter, this field should be specified as
751
- # `updateMask=<field1>,<field2>,...`
696
+ # * `state`
697
+ # * `due_date`
698
+ # * `due_time`
699
+ # * `max_points`
700
+ # * `scheduled_time`
701
+ # * `submission_modification_mode`
752
702
  # @param [String] fields
753
703
  # Selector specifying which fields to include in a partial response.
754
704
  # @param [String] quota_user
@@ -758,20 +708,21 @@ module Google
758
708
  # Request-specific options
759
709
  #
760
710
  # @yield [result, err] Result & error if block supplied
761
- # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object
711
+ # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object
762
712
  # @yieldparam err [StandardError] error object if request failed
763
713
  #
764
- # @return [Google::Apis::ClassroomV1::Course]
714
+ # @return [Google::Apis::ClassroomV1::CourseWork]
765
715
  #
766
716
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
767
717
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
768
718
  # @raise [Google::Apis::AuthorizationError] Authorization is required
769
- def patch_course(id, course_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
770
- command = make_simple_command(:patch, 'v1/courses/{id}', options)
771
- command.request_representation = Google::Apis::ClassroomV1::Course::Representation
772
- command.request_object = course_object
773
- command.response_representation = Google::Apis::ClassroomV1::Course::Representation
774
- command.response_class = Google::Apis::ClassroomV1::Course
719
+ def patch_course_course_work(course_id, id, course_work_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
720
+ command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWork/{id}', options)
721
+ command.request_representation = Google::Apis::ClassroomV1::CourseWork::Representation
722
+ command.request_object = course_work_object
723
+ command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation
724
+ command.response_class = Google::Apis::ClassroomV1::CourseWork
725
+ command.params['courseId'] = course_id unless course_id.nil?
775
726
  command.params['id'] = id unless id.nil?
776
727
  command.query['updateMask'] = update_mask unless update_mask.nil?
777
728
  command.query['fields'] = fields unless fields.nil?
@@ -779,18 +730,21 @@ module Google
779
730
  execute_or_queue_command(command, &block)
780
731
  end
781
732
 
782
- # Updates a course.
783
- # This method returns the following error codes:
784
- # * `PERMISSION_DENIED` if the requesting user is not permitted to modify the
785
- # requested course or for access errors.
786
- # * `NOT_FOUND` if no course exists with the requested ID.
787
- # * `FAILED_PRECONDITION` for the following request errors:
788
- # * CourseNotModifiable
789
- # @param [String] id
790
- # Identifier of the course to update.
733
+ # Returns a student submission.
734
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
735
+ # requested course, course work, or student submission or for
736
+ # access errors.
737
+ # * `INVALID_ARGUMENT` if the request is malformed.
738
+ # * `NOT_FOUND` if the requested course, course work, or student submission
739
+ # does not exist.
740
+ # @param [String] course_id
741
+ # Identifier of the course.
791
742
  # This identifier can be either the Classroom-assigned identifier or an
792
743
  # alias.
793
- # @param [Google::Apis::ClassroomV1::Course] course_object
744
+ # @param [String] course_work_id
745
+ # Identifier of the course work.
746
+ # @param [String] id
747
+ # Identifier of the student submission.
794
748
  # @param [String] fields
795
749
  # Selector specifying which fields to include in a partial response.
796
750
  # @param [String] quota_user
@@ -800,91 +754,67 @@ module Google
800
754
  # Request-specific options
801
755
  #
802
756
  # @yield [result, err] Result & error if block supplied
803
- # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object
757
+ # @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object
804
758
  # @yieldparam err [StandardError] error object if request failed
805
759
  #
806
- # @return [Google::Apis::ClassroomV1::Course]
760
+ # @return [Google::Apis::ClassroomV1::StudentSubmission]
807
761
  #
808
762
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
809
763
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
810
764
  # @raise [Google::Apis::AuthorizationError] Authorization is required
811
- def update_course(id, course_object = nil, fields: nil, quota_user: nil, options: nil, &block)
812
- command = make_simple_command(:put, 'v1/courses/{id}', options)
813
- command.request_representation = Google::Apis::ClassroomV1::Course::Representation
814
- command.request_object = course_object
815
- command.response_representation = Google::Apis::ClassroomV1::Course::Representation
816
- command.response_class = Google::Apis::ClassroomV1::Course
765
+ def get_student_submission(course_id, course_work_id, id, fields: nil, quota_user: nil, options: nil, &block)
766
+ command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}', options)
767
+ command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation
768
+ command.response_class = Google::Apis::ClassroomV1::StudentSubmission
769
+ command.params['courseId'] = course_id unless course_id.nil?
770
+ command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
817
771
  command.params['id'] = id unless id.nil?
818
772
  command.query['fields'] = fields unless fields.nil?
819
773
  command.query['quotaUser'] = quota_user unless quota_user.nil?
820
774
  execute_or_queue_command(command, &block)
821
775
  end
822
776
 
823
- # Deletes a course.
777
+ # Returns a list of student submissions that the requester is permitted to
778
+ # view, factoring in the OAuth scopes of the request.
779
+ # `-` may be specified as the `course_work_id` to include student
780
+ # submissions for multiple course work items.
781
+ # Course students may only view their own work. Course teachers
782
+ # and domain administrators may view all student submissions.
824
783
  # This method returns the following error codes:
825
- # * `PERMISSION_DENIED` if the requesting user is not permitted to delete the
826
- # requested course or for access errors.
827
- # * `NOT_FOUND` if no course exists with the requested ID.
828
- # @param [String] id
829
- # Identifier of the course to delete.
784
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
785
+ # requested course or course work, or for access errors.
786
+ # * `INVALID_ARGUMENT` if the request is malformed.
787
+ # * `NOT_FOUND` if the requested course does not exist.
788
+ # @param [String] course_id
789
+ # Identifier of the course.
830
790
  # This identifier can be either the Classroom-assigned identifier or an
831
791
  # alias.
832
- # @param [String] fields
833
- # Selector specifying which fields to include in a partial response.
834
- # @param [String] quota_user
835
- # Available to use for quota purposes for server-side applications. Can be any
836
- # arbitrary string assigned to a user, but should not exceed 40 characters.
837
- # @param [Google::Apis::RequestOptions] options
838
- # Request-specific options
839
- #
840
- # @yield [result, err] Result & error if block supplied
841
- # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
842
- # @yieldparam err [StandardError] error object if request failed
843
- #
844
- # @return [Google::Apis::ClassroomV1::Empty]
845
- #
846
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
847
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
848
- # @raise [Google::Apis::AuthorizationError] Authorization is required
849
- def delete_course(id, fields: nil, quota_user: nil, options: nil, &block)
850
- command = make_simple_command(:delete, 'v1/courses/{id}', options)
851
- command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
852
- command.response_class = Google::Apis::ClassroomV1::Empty
853
- command.params['id'] = id unless id.nil?
854
- command.query['fields'] = fields unless fields.nil?
855
- command.query['quotaUser'] = quota_user unless quota_user.nil?
856
- execute_or_queue_command(command, &block)
857
- end
858
-
859
- # Returns a list of courses that the requesting user is permitted to view,
860
- # restricted to those that match the request.
861
- # This method returns the following error codes:
862
- # * `PERMISSION_DENIED` for access errors.
863
- # * `INVALID_ARGUMENT` if the query argument is malformed.
864
- # * `NOT_FOUND` if any users specified in the query arguments do not exist.
865
- # @param [String] student_id
866
- # Restricts returned courses to those having a student with the specified
867
- # identifier. The identifier can be one of the following:
868
- # * the numeric identifier for the user
869
- # * the email address of the user
870
- # * the string literal `"me"`, indicating the requesting user
792
+ # @param [String] course_work_id
793
+ # Identifier of the student work to request.
794
+ # This may be set to the string literal `"-"` to request student work for
795
+ # all course work in the specified course.
796
+ # @param [String] late
797
+ # Requested lateness value. If specified, returned student submissions are
798
+ # restricted by the requested value.
799
+ # If unspecified, submissions are returned regardless of `late` value.
800
+ # @param [Fixnum] page_size
801
+ # Maximum number of items to return. Zero or unspecified indicates that the
802
+ # server may assign a maximum.
803
+ # The server may return fewer than the specified number of results.
871
804
  # @param [String] page_token
872
805
  # nextPageToken
873
806
  # value returned from a previous
874
807
  # list call,
875
808
  # indicating that the subsequent page of results should be returned.
876
- # The list request must be
877
- # otherwise identical to the one that resulted in this token.
878
- # @param [Fixnum] page_size
879
- # Maximum number of items to return. Zero or unspecified indicates that the
880
- # server may assign a maximum.
881
- # The server may return fewer than the specified number of results.
882
- # @param [Array<String>, String] course_states
883
- # Restricts returned courses to those in one of the specified states
884
- # The default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED.
885
- # @param [String] teacher_id
886
- # Restricts returned courses to those having a teacher with the specified
887
- # identifier. The identifier can be one of the following:
809
+ # The list request
810
+ # must be otherwise identical to the one that resulted in this token.
811
+ # @param [Array<String>, String] states
812
+ # Requested submission states. If specified, returned student submissions
813
+ # match one of the specified submission states.
814
+ # @param [String] user_id
815
+ # Optional argument to restrict returned student work to those owned by the
816
+ # student with the specified identifier. The identifier can be one of the
817
+ # following:
888
818
  # * the numeric identifier for the user
889
819
  # * the email address of the user
890
820
  # * the string literal `"me"`, indicating the requesting user
@@ -897,41 +827,53 @@ module Google
897
827
  # Request-specific options
898
828
  #
899
829
  # @yield [result, err] Result & error if block supplied
900
- # @yieldparam result [Google::Apis::ClassroomV1::ListCoursesResponse] parsed result object
830
+ # @yieldparam result [Google::Apis::ClassroomV1::ListStudentSubmissionsResponse] parsed result object
901
831
  # @yieldparam err [StandardError] error object if request failed
902
832
  #
903
- # @return [Google::Apis::ClassroomV1::ListCoursesResponse]
833
+ # @return [Google::Apis::ClassroomV1::ListStudentSubmissionsResponse]
904
834
  #
905
835
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
906
836
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
907
837
  # @raise [Google::Apis::AuthorizationError] Authorization is required
908
- def list_courses(student_id: nil, page_token: nil, page_size: nil, course_states: nil, teacher_id: nil, fields: nil, quota_user: nil, options: nil, &block)
909
- command = make_simple_command(:get, 'v1/courses', options)
910
- command.response_representation = Google::Apis::ClassroomV1::ListCoursesResponse::Representation
911
- command.response_class = Google::Apis::ClassroomV1::ListCoursesResponse
912
- command.query['studentId'] = student_id unless student_id.nil?
913
- command.query['pageToken'] = page_token unless page_token.nil?
838
+ def list_student_submissions(course_id, course_work_id, late: nil, page_size: nil, page_token: nil, states: nil, user_id: nil, fields: nil, quota_user: nil, options: nil, &block)
839
+ command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions', options)
840
+ command.response_representation = Google::Apis::ClassroomV1::ListStudentSubmissionsResponse::Representation
841
+ command.response_class = Google::Apis::ClassroomV1::ListStudentSubmissionsResponse
842
+ command.params['courseId'] = course_id unless course_id.nil?
843
+ command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
844
+ command.query['late'] = late unless late.nil?
914
845
  command.query['pageSize'] = page_size unless page_size.nil?
915
- command.query['courseStates'] = course_states unless course_states.nil?
916
- command.query['teacherId'] = teacher_id unless teacher_id.nil?
846
+ command.query['pageToken'] = page_token unless page_token.nil?
847
+ command.query['states'] = states unless states.nil?
848
+ command.query['userId'] = user_id unless user_id.nil?
917
849
  command.query['fields'] = fields unless fields.nil?
918
850
  command.query['quotaUser'] = quota_user unless quota_user.nil?
919
851
  execute_or_queue_command(command, &block)
920
852
  end
921
853
 
922
- # Creates a course.
923
- # The user specified in `ownerId` is the owner of the created course
924
- # and added as a teacher.
854
+ # Modifies attachments of student submission.
855
+ # Attachments may only be added to student submissions belonging to course
856
+ # work objects with a `workType` of `ASSIGNMENT`.
857
+ # This request must be made by the Developer Console project of the
858
+ # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
859
+ # create the corresponding course work item.
925
860
  # This method returns the following error codes:
926
- # * `PERMISSION_DENIED` if the requesting user is not permitted to create
927
- # courses or for access errors.
928
- # * `NOT_FOUND` if the primary teacher is not a valid user.
929
- # * `FAILED_PRECONDITION` if the course owner's account is disabled or for
930
- # the following request errors:
931
- # * UserGroupsMembershipLimitReached
932
- # * `ALREADY_EXISTS` if an alias was specified in the `id` and
933
- # already exists.
934
- # @param [Google::Apis::ClassroomV1::Course] course_object
861
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
862
+ # requested course or course work, if the user is not permitted to modify
863
+ # attachments on the requested student submission, or for
864
+ # access errors.
865
+ # * `INVALID_ARGUMENT` if the request is malformed.
866
+ # * `NOT_FOUND` if the requested course, course work, or student submission
867
+ # does not exist.
868
+ # @param [String] course_id
869
+ # Identifier of the course.
870
+ # This identifier can be either the Classroom-assigned identifier or an
871
+ # alias.
872
+ # @param [String] course_work_id
873
+ # Identifier of the course work.
874
+ # @param [String] id
875
+ # Identifier of the student submission.
876
+ # @param [Google::Apis::ClassroomV1::ModifyAttachmentsRequest] modify_attachments_request_object
935
877
  # @param [String] fields
936
878
  # Selector specifying which fields to include in a partial response.
937
879
  # @param [String] quota_user
@@ -941,39 +883,58 @@ module Google
941
883
  # Request-specific options
942
884
  #
943
885
  # @yield [result, err] Result & error if block supplied
944
- # @yieldparam result [Google::Apis::ClassroomV1::Course] parsed result object
886
+ # @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object
945
887
  # @yieldparam err [StandardError] error object if request failed
946
888
  #
947
- # @return [Google::Apis::ClassroomV1::Course]
889
+ # @return [Google::Apis::ClassroomV1::StudentSubmission]
948
890
  #
949
891
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
950
892
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
951
893
  # @raise [Google::Apis::AuthorizationError] Authorization is required
952
- def create_course(course_object = nil, fields: nil, quota_user: nil, options: nil, &block)
953
- command = make_simple_command(:post, 'v1/courses', options)
954
- command.request_representation = Google::Apis::ClassroomV1::Course::Representation
955
- command.request_object = course_object
956
- command.response_representation = Google::Apis::ClassroomV1::Course::Representation
957
- command.response_class = Google::Apis::ClassroomV1::Course
894
+ def modify_student_submission_attachments(course_id, course_work_id, id, modify_attachments_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
895
+ command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments', options)
896
+ command.request_representation = Google::Apis::ClassroomV1::ModifyAttachmentsRequest::Representation
897
+ command.request_object = modify_attachments_request_object
898
+ command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation
899
+ command.response_class = Google::Apis::ClassroomV1::StudentSubmission
900
+ command.params['courseId'] = course_id unless course_id.nil?
901
+ command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
902
+ command.params['id'] = id unless id.nil?
958
903
  command.query['fields'] = fields unless fields.nil?
959
904
  command.query['quotaUser'] = quota_user unless quota_user.nil?
960
905
  execute_or_queue_command(command, &block)
961
906
  end
962
907
 
963
- # Creates an alias for a course.
908
+ # Updates one or more fields of a student submission.
909
+ # See google.classroom.v1.StudentSubmission for details
910
+ # of which fields may be updated and who may change them.
911
+ # This request must be made by the Developer Console project of the
912
+ # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
913
+ # create the corresponding course work item.
964
914
  # This method returns the following error codes:
965
- # * `PERMISSION_DENIED` if the requesting user is not permitted to create the
966
- # alias or for access errors.
967
- # * `NOT_FOUND` if the course does not exist.
968
- # * `ALREADY_EXISTS` if the alias already exists.
969
- # * `FAILED_PRECONDITION` if the alias requested does not make sense for the
970
- # requesting user or course (for example, if a user not in a domain
971
- # attempts to access a domain-scoped alias).
915
+ # * `PERMISSION_DENIED` if the requesting developer project did not create
916
+ # the corresponding course work, if the user is not permitted to make the
917
+ # requested modification to the student submission, or for
918
+ # access errors.
919
+ # * `INVALID_ARGUMENT` if the request is malformed.
920
+ # * `NOT_FOUND` if the requested course, course work, or student submission
921
+ # does not exist.
972
922
  # @param [String] course_id
973
- # Identifier of the course to alias.
923
+ # Identifier of the course.
974
924
  # This identifier can be either the Classroom-assigned identifier or an
975
925
  # alias.
976
- # @param [Google::Apis::ClassroomV1::CourseAlias] course_alias_object
926
+ # @param [String] course_work_id
927
+ # Identifier of the course work.
928
+ # @param [String] id
929
+ # Identifier of the student submission.
930
+ # @param [Google::Apis::ClassroomV1::StudentSubmission] student_submission_object
931
+ # @param [String] update_mask
932
+ # Mask that identifies which fields on the student submission to update.
933
+ # This field is required to do an update. The update fails if invalid
934
+ # fields are specified.
935
+ # The following fields may be specified by teachers:
936
+ # * `draft_grade`
937
+ # * `assigned_grade`
977
938
  # @param [String] fields
978
939
  # Selector specifying which fields to include in a partial response.
979
940
  # @param [String] quota_user
@@ -983,41 +944,54 @@ module Google
983
944
  # Request-specific options
984
945
  #
985
946
  # @yield [result, err] Result & error if block supplied
986
- # @yieldparam result [Google::Apis::ClassroomV1::CourseAlias] parsed result object
947
+ # @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object
987
948
  # @yieldparam err [StandardError] error object if request failed
988
949
  #
989
- # @return [Google::Apis::ClassroomV1::CourseAlias]
950
+ # @return [Google::Apis::ClassroomV1::StudentSubmission]
990
951
  #
991
952
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
992
953
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
993
954
  # @raise [Google::Apis::AuthorizationError] Authorization is required
994
- def create_course_alias(course_id, course_alias_object = nil, fields: nil, quota_user: nil, options: nil, &block)
995
- command = make_simple_command(:post, 'v1/courses/{courseId}/aliases', options)
996
- command.request_representation = Google::Apis::ClassroomV1::CourseAlias::Representation
997
- command.request_object = course_alias_object
998
- command.response_representation = Google::Apis::ClassroomV1::CourseAlias::Representation
999
- command.response_class = Google::Apis::ClassroomV1::CourseAlias
1000
- command.params['courseId'] = course_id unless course_id.nil?
1001
- command.query['fields'] = fields unless fields.nil?
1002
- command.query['quotaUser'] = quota_user unless quota_user.nil?
955
+ def patch_student_submission(course_id, course_work_id, id, student_submission_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
956
+ command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}', options)
957
+ command.request_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation
958
+ command.request_object = student_submission_object
959
+ command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation
960
+ command.response_class = Google::Apis::ClassroomV1::StudentSubmission
961
+ command.params['courseId'] = course_id unless course_id.nil?
962
+ command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
963
+ command.params['id'] = id unless id.nil?
964
+ command.query['updateMask'] = update_mask unless update_mask.nil?
965
+ command.query['fields'] = fields unless fields.nil?
966
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1003
967
  execute_or_queue_command(command, &block)
1004
968
  end
1005
969
 
1006
- # Deletes an alias of a course.
970
+ # Reclaims a student submission on behalf of the student that owns it.
971
+ # Reclaiming a student submission transfers ownership of attached Drive
972
+ # files to the student and update the submission state.
973
+ # Only the student that owns the requested student submission may call this
974
+ # method, and only for a student submission that has been turned in.
975
+ # This request must be made by the Developer Console project of the
976
+ # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
977
+ # create the corresponding course work item.
1007
978
  # This method returns the following error codes:
1008
- # * `PERMISSION_DENIED` if the requesting user is not permitted to remove the
1009
- # alias or for access errors.
1010
- # * `NOT_FOUND` if the alias does not exist.
1011
- # * `FAILED_PRECONDITION` if the alias requested does not make sense for the
1012
- # requesting user or course (for example, if a user not in a domain
1013
- # attempts to delete a domain-scoped alias).
979
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
980
+ # requested course or course work, unsubmit the requested student submission,
981
+ # or for access errors.
982
+ # * `FAILED_PRECONDITION` if the student submission has not been turned in.
983
+ # * `INVALID_ARGUMENT` if the request is malformed.
984
+ # * `NOT_FOUND` if the requested course, course work, or student submission
985
+ # does not exist.
1014
986
  # @param [String] course_id
1015
- # Identifier of the course whose alias should be deleted.
987
+ # Identifier of the course.
1016
988
  # This identifier can be either the Classroom-assigned identifier or an
1017
989
  # alias.
1018
- # @param [String] alias_
1019
- # Alias to delete.
1020
- # This may not be the Classroom-assigned identifier.
990
+ # @param [String] course_work_id
991
+ # Identifier of the course work.
992
+ # @param [String] id
993
+ # Identifier of the student submission.
994
+ # @param [Google::Apis::ClassroomV1::ReclaimStudentSubmissionRequest] reclaim_student_submission_request_object
1021
995
  # @param [String] fields
1022
996
  # Selector specifying which fields to include in a partial response.
1023
997
  # @param [String] quota_user
@@ -1035,37 +1009,46 @@ module Google
1035
1009
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1036
1010
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1037
1011
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1038
- def delete_course_alias(course_id, alias_, fields: nil, quota_user: nil, options: nil, &block)
1039
- command = make_simple_command(:delete, 'v1/courses/{courseId}/aliases/{alias}', options)
1012
+ def reclaim_student_submission(course_id, course_work_id, id, reclaim_student_submission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1013
+ command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim', options)
1014
+ command.request_representation = Google::Apis::ClassroomV1::ReclaimStudentSubmissionRequest::Representation
1015
+ command.request_object = reclaim_student_submission_request_object
1040
1016
  command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
1041
1017
  command.response_class = Google::Apis::ClassroomV1::Empty
1042
1018
  command.params['courseId'] = course_id unless course_id.nil?
1043
- command.params['alias'] = alias_ unless alias_.nil?
1019
+ command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
1020
+ command.params['id'] = id unless id.nil?
1044
1021
  command.query['fields'] = fields unless fields.nil?
1045
1022
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1046
1023
  execute_or_queue_command(command, &block)
1047
1024
  end
1048
1025
 
1049
- # Returns a list of aliases for a course.
1026
+ # Returns a student submission.
1027
+ # Returning a student submission transfers ownership of attached Drive
1028
+ # files to the student and may also update the submission state.
1029
+ # Unlike the Classroom application, returning a student submission does not
1030
+ # set assignedGrade to the draftGrade value.
1031
+ # Only a teacher of the course that contains the requested student submission
1032
+ # may call this method.
1033
+ # This request must be made by the Developer Console project of the
1034
+ # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
1035
+ # create the corresponding course work item.
1050
1036
  # This method returns the following error codes:
1051
1037
  # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
1052
- # course or for access errors.
1053
- # * `NOT_FOUND` if the course does not exist.
1038
+ # requested course or course work, return the requested student submission,
1039
+ # or for access errors.
1040
+ # * `INVALID_ARGUMENT` if the request is malformed.
1041
+ # * `NOT_FOUND` if the requested course, course work, or student submission
1042
+ # does not exist.
1054
1043
  # @param [String] course_id
1055
- # The identifier of the course.
1044
+ # Identifier of the course.
1056
1045
  # This identifier can be either the Classroom-assigned identifier or an
1057
1046
  # alias.
1058
- # @param [String] page_token
1059
- # nextPageToken
1060
- # value returned from a previous
1061
- # list call,
1062
- # indicating that the subsequent page of results should be returned.
1063
- # The list request
1064
- # must be otherwise identical to the one that resulted in this token.
1065
- # @param [Fixnum] page_size
1066
- # Maximum number of items to return. Zero or unspecified indicates that the
1067
- # server may assign a maximum.
1068
- # The server may return fewer than the specified number of results.
1047
+ # @param [String] course_work_id
1048
+ # Identifier of the course work.
1049
+ # @param [String] id
1050
+ # Identifier of the student submission.
1051
+ # @param [Google::Apis::ClassroomV1::ReturnStudentSubmissionRequest] return_student_submission_request_object
1069
1052
  # @param [String] fields
1070
1053
  # Selector specifying which fields to include in a partial response.
1071
1054
  # @param [String] quota_user
@@ -1075,21 +1058,78 @@ module Google
1075
1058
  # Request-specific options
1076
1059
  #
1077
1060
  # @yield [result, err] Result & error if block supplied
1078
- # @yieldparam result [Google::Apis::ClassroomV1::ListCourseAliasesResponse] parsed result object
1061
+ # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
1079
1062
  # @yieldparam err [StandardError] error object if request failed
1080
1063
  #
1081
- # @return [Google::Apis::ClassroomV1::ListCourseAliasesResponse]
1064
+ # @return [Google::Apis::ClassroomV1::Empty]
1082
1065
  #
1083
1066
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1084
1067
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1085
1068
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1086
- def list_course_aliases(course_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1087
- command = make_simple_command(:get, 'v1/courses/{courseId}/aliases', options)
1088
- command.response_representation = Google::Apis::ClassroomV1::ListCourseAliasesResponse::Representation
1089
- command.response_class = Google::Apis::ClassroomV1::ListCourseAliasesResponse
1069
+ def return_student_submission(course_id, course_work_id, id, return_student_submission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1070
+ command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return', options)
1071
+ command.request_representation = Google::Apis::ClassroomV1::ReturnStudentSubmissionRequest::Representation
1072
+ command.request_object = return_student_submission_request_object
1073
+ command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
1074
+ command.response_class = Google::Apis::ClassroomV1::Empty
1090
1075
  command.params['courseId'] = course_id unless course_id.nil?
1091
- command.query['pageToken'] = page_token unless page_token.nil?
1092
- command.query['pageSize'] = page_size unless page_size.nil?
1076
+ command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
1077
+ command.params['id'] = id unless id.nil?
1078
+ command.query['fields'] = fields unless fields.nil?
1079
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1080
+ execute_or_queue_command(command, &block)
1081
+ end
1082
+
1083
+ # Turns in a student submission.
1084
+ # Turning in a student submission transfers ownership of attached Drive
1085
+ # files to the teacher and may also update the submission state.
1086
+ # This may only be called by the student that owns the specified student
1087
+ # submission.
1088
+ # This request must be made by the Developer Console project of the
1089
+ # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
1090
+ # create the corresponding course work item.
1091
+ # This method returns the following error codes:
1092
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
1093
+ # requested course or course work, turn in the requested student submission,
1094
+ # or for access errors.
1095
+ # * `INVALID_ARGUMENT` if the request is malformed.
1096
+ # * `NOT_FOUND` if the requested course, course work, or student submission
1097
+ # does not exist.
1098
+ # @param [String] course_id
1099
+ # Identifier of the course.
1100
+ # This identifier can be either the Classroom-assigned identifier or an
1101
+ # alias.
1102
+ # @param [String] course_work_id
1103
+ # Identifier of the course work.
1104
+ # @param [String] id
1105
+ # Identifier of the student submission.
1106
+ # @param [Google::Apis::ClassroomV1::TurnInStudentSubmissionRequest] turn_in_student_submission_request_object
1107
+ # @param [String] fields
1108
+ # Selector specifying which fields to include in a partial response.
1109
+ # @param [String] quota_user
1110
+ # Available to use for quota purposes for server-side applications. Can be any
1111
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1112
+ # @param [Google::Apis::RequestOptions] options
1113
+ # Request-specific options
1114
+ #
1115
+ # @yield [result, err] Result & error if block supplied
1116
+ # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
1117
+ # @yieldparam err [StandardError] error object if request failed
1118
+ #
1119
+ # @return [Google::Apis::ClassroomV1::Empty]
1120
+ #
1121
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1122
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1123
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1124
+ def turn_in_student_submission(course_id, course_work_id, id, turn_in_student_submission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1125
+ command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn', options)
1126
+ command.request_representation = Google::Apis::ClassroomV1::TurnInStudentSubmissionRequest::Representation
1127
+ command.request_object = turn_in_student_submission_request_object
1128
+ command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
1129
+ command.response_class = Google::Apis::ClassroomV1::Empty
1130
+ command.params['courseId'] = course_id unless course_id.nil?
1131
+ command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
1132
+ command.params['id'] = id unless id.nil?
1093
1133
  command.query['fields'] = fields unless fields.nil?
1094
1134
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1095
1135
  execute_or_queue_command(command, &block)
@@ -1191,54 +1231,6 @@ module Google
1191
1231
  execute_or_queue_command(command, &block)
1192
1232
  end
1193
1233
 
1194
- # Returns a list of students of this course that the requester
1195
- # is permitted to view.
1196
- # This method returns the following error codes:
1197
- # * `NOT_FOUND` if the course does not exist.
1198
- # * `PERMISSION_DENIED` for access errors.
1199
- # @param [String] course_id
1200
- # Identifier of the course.
1201
- # This identifier can be either the Classroom-assigned identifier or an
1202
- # alias.
1203
- # @param [String] page_token
1204
- # nextPageToken
1205
- # value returned from a previous
1206
- # list call, indicating that
1207
- # the subsequent page of results should be returned.
1208
- # The list request must be
1209
- # otherwise identical to the one that resulted in this token.
1210
- # @param [Fixnum] page_size
1211
- # Maximum number of items to return. Zero means no maximum.
1212
- # The server may return fewer than the specified number of results.
1213
- # @param [String] fields
1214
- # Selector specifying which fields to include in a partial response.
1215
- # @param [String] quota_user
1216
- # Available to use for quota purposes for server-side applications. Can be any
1217
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1218
- # @param [Google::Apis::RequestOptions] options
1219
- # Request-specific options
1220
- #
1221
- # @yield [result, err] Result & error if block supplied
1222
- # @yieldparam result [Google::Apis::ClassroomV1::ListStudentsResponse] parsed result object
1223
- # @yieldparam err [StandardError] error object if request failed
1224
- #
1225
- # @return [Google::Apis::ClassroomV1::ListStudentsResponse]
1226
- #
1227
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1228
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1229
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1230
- def list_course_students(course_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1231
- command = make_simple_command(:get, 'v1/courses/{courseId}/students', options)
1232
- command.response_representation = Google::Apis::ClassroomV1::ListStudentsResponse::Representation
1233
- command.response_class = Google::Apis::ClassroomV1::ListStudentsResponse
1234
- command.params['courseId'] = course_id unless course_id.nil?
1235
- command.query['pageToken'] = page_token unless page_token.nil?
1236
- command.query['pageSize'] = page_size unless page_size.nil?
1237
- command.query['fields'] = fields unless fields.nil?
1238
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1239
- execute_or_queue_command(command, &block)
1240
- end
1241
-
1242
1234
  # Returns a student of a course.
1243
1235
  # This method returns the following error codes:
1244
1236
  # * `PERMISSION_DENIED` if the requesting user is not permitted to view
@@ -1283,24 +1275,25 @@ module Google
1283
1275
  execute_or_queue_command(command, &block)
1284
1276
  end
1285
1277
 
1286
- # Deletes a course work.
1287
- # This request must be made by the Developer Console project of the
1288
- # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
1289
- # create the corresponding course work item.
1278
+ # Returns a list of students of this course that the requester
1279
+ # is permitted to view.
1290
1280
  # This method returns the following error codes:
1291
- # * `PERMISSION_DENIED` if the requesting developer project did not create
1292
- # the corresponding course work, if the requesting user is not permitted
1293
- # to delete the requested course or for access errors.
1294
- # * `FAILED_PRECONDITION` if the requested course work has already been
1295
- # deleted.
1296
- # * `NOT_FOUND` if no course exists with the requested ID.
1281
+ # * `NOT_FOUND` if the course does not exist.
1282
+ # * `PERMISSION_DENIED` for access errors.
1297
1283
  # @param [String] course_id
1298
1284
  # Identifier of the course.
1299
1285
  # This identifier can be either the Classroom-assigned identifier or an
1300
1286
  # alias.
1301
- # @param [String] id
1302
- # Identifier of the course work to delete.
1303
- # This identifier is a Classroom-assigned identifier.
1287
+ # @param [Fixnum] page_size
1288
+ # Maximum number of items to return. Zero means no maximum.
1289
+ # The server may return fewer than the specified number of results.
1290
+ # @param [String] page_token
1291
+ # nextPageToken
1292
+ # value returned from a previous
1293
+ # list call, indicating that
1294
+ # the subsequent page of results should be returned.
1295
+ # The list request must be
1296
+ # otherwise identical to the one that resulted in this token.
1304
1297
  # @param [String] fields
1305
1298
  # Selector specifying which fields to include in a partial response.
1306
1299
  # @param [String] quota_user
@@ -1310,58 +1303,44 @@ module Google
1310
1303
  # Request-specific options
1311
1304
  #
1312
1305
  # @yield [result, err] Result & error if block supplied
1313
- # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
1306
+ # @yieldparam result [Google::Apis::ClassroomV1::ListStudentsResponse] parsed result object
1314
1307
  # @yieldparam err [StandardError] error object if request failed
1315
1308
  #
1316
- # @return [Google::Apis::ClassroomV1::Empty]
1309
+ # @return [Google::Apis::ClassroomV1::ListStudentsResponse]
1317
1310
  #
1318
1311
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1319
1312
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1320
1313
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1321
- def delete_course_course_work(course_id, id, fields: nil, quota_user: nil, options: nil, &block)
1322
- command = make_simple_command(:delete, 'v1/courses/{courseId}/courseWork/{id}', options)
1323
- command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
1324
- command.response_class = Google::Apis::ClassroomV1::Empty
1314
+ def list_course_students(course_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1315
+ command = make_simple_command(:get, 'v1/courses/{courseId}/students', options)
1316
+ command.response_representation = Google::Apis::ClassroomV1::ListStudentsResponse::Representation
1317
+ command.response_class = Google::Apis::ClassroomV1::ListStudentsResponse
1325
1318
  command.params['courseId'] = course_id unless course_id.nil?
1326
- command.params['id'] = id unless id.nil?
1319
+ command.query['pageSize'] = page_size unless page_size.nil?
1320
+ command.query['pageToken'] = page_token unless page_token.nil?
1327
1321
  command.query['fields'] = fields unless fields.nil?
1328
1322
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1329
1323
  execute_or_queue_command(command, &block)
1330
1324
  end
1331
1325
 
1332
- # Returns a list of course work that the requester is permitted to view.
1333
- # Course students may only view `PUBLISHED` course work. Course teachers
1334
- # and domain administrators may view all course work.
1326
+ # Creates a teacher of a course.
1335
1327
  # This method returns the following error codes:
1336
- # * `PERMISSION_DENIED` if the requesting user is not permitted to access
1337
- # the requested course or for access errors.
1338
- # * `INVALID_ARGUMENT` if the request is malformed.
1339
- # * `NOT_FOUND` if the requested course does not exist.
1328
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to create
1329
+ # teachers in this course or for access errors.
1330
+ # * `NOT_FOUND` if the requested course ID does not exist.
1331
+ # * `FAILED_PRECONDITION` if the requested user's account is disabled,
1332
+ # for the following request errors:
1333
+ # * CourseMemberLimitReached
1334
+ # * CourseNotModifiable
1335
+ # * CourseTeacherLimitReached
1336
+ # * UserGroupsMembershipLimitReached
1337
+ # * `ALREADY_EXISTS` if the user is already a teacher or student in the
1338
+ # course.
1340
1339
  # @param [String] course_id
1341
1340
  # Identifier of the course.
1342
1341
  # This identifier can be either the Classroom-assigned identifier or an
1343
1342
  # alias.
1344
- # @param [String] page_token
1345
- # nextPageToken
1346
- # value returned from a previous
1347
- # list call,
1348
- # indicating that the subsequent page of results should be returned.
1349
- # The list request
1350
- # must be otherwise identical to the one that resulted in this token.
1351
- # @param [String] order_by
1352
- # Optional sort ordering for results. A comma-separated list of fields with
1353
- # an optional sort direction keyword. Supported fields are `updateTime`
1354
- # and `dueDate`. Supported direction keywords are `asc` and `desc`.
1355
- # If not specified, `updateTime desc` is the default behavior.
1356
- # Examples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`
1357
- # @param [Fixnum] page_size
1358
- # Maximum number of items to return. Zero or unspecified indicates that the
1359
- # server may assign a maximum.
1360
- # The server may return fewer than the specified number of results.
1361
- # @param [Array<String>, String] course_work_states
1362
- # Restriction on the work status to return. Only courseWork that matches
1363
- # is returned. If unspecified, items with a work status of `PUBLISHED`
1364
- # is returned.
1343
+ # @param [Google::Apis::ClassroomV1::Teacher] teacher_object
1365
1344
  # @param [String] fields
1366
1345
  # Selector specifying which fields to include in a partial response.
1367
1346
  # @param [String] quota_user
@@ -1371,40 +1350,44 @@ module Google
1371
1350
  # Request-specific options
1372
1351
  #
1373
1352
  # @yield [result, err] Result & error if block supplied
1374
- # @yieldparam result [Google::Apis::ClassroomV1::ListCourseWorkResponse] parsed result object
1353
+ # @yieldparam result [Google::Apis::ClassroomV1::Teacher] parsed result object
1375
1354
  # @yieldparam err [StandardError] error object if request failed
1376
1355
  #
1377
- # @return [Google::Apis::ClassroomV1::ListCourseWorkResponse]
1356
+ # @return [Google::Apis::ClassroomV1::Teacher]
1378
1357
  #
1379
1358
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1380
1359
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1381
1360
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1382
- def list_course_works(course_id, page_token: nil, order_by: nil, page_size: nil, course_work_states: nil, fields: nil, quota_user: nil, options: nil, &block)
1383
- command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork', options)
1384
- command.response_representation = Google::Apis::ClassroomV1::ListCourseWorkResponse::Representation
1385
- command.response_class = Google::Apis::ClassroomV1::ListCourseWorkResponse
1361
+ def create_course_teacher(course_id, teacher_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1362
+ command = make_simple_command(:post, 'v1/courses/{courseId}/teachers', options)
1363
+ command.request_representation = Google::Apis::ClassroomV1::Teacher::Representation
1364
+ command.request_object = teacher_object
1365
+ command.response_representation = Google::Apis::ClassroomV1::Teacher::Representation
1366
+ command.response_class = Google::Apis::ClassroomV1::Teacher
1386
1367
  command.params['courseId'] = course_id unless course_id.nil?
1387
- command.query['pageToken'] = page_token unless page_token.nil?
1388
- command.query['orderBy'] = order_by unless order_by.nil?
1389
- command.query['pageSize'] = page_size unless page_size.nil?
1390
- command.query['courseWorkStates'] = course_work_states unless course_work_states.nil?
1391
1368
  command.query['fields'] = fields unless fields.nil?
1392
1369
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1393
1370
  execute_or_queue_command(command, &block)
1394
1371
  end
1395
1372
 
1396
- # Returns course work.
1373
+ # Deletes a teacher of a course.
1397
1374
  # This method returns the following error codes:
1398
- # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
1399
- # requested course or course work, or for access errors.
1400
- # * `INVALID_ARGUMENT` if the request is malformed.
1401
- # * `NOT_FOUND` if the requested course or course work does not exist.
1375
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to delete
1376
+ # teachers of this course or for access errors.
1377
+ # * `NOT_FOUND` if no teacher of this course has the requested ID or if the
1378
+ # course does not exist.
1379
+ # * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher
1380
+ # of this course.
1402
1381
  # @param [String] course_id
1403
1382
  # Identifier of the course.
1404
1383
  # This identifier can be either the Classroom-assigned identifier or an
1405
1384
  # alias.
1406
- # @param [String] id
1407
- # Identifier of the course work.
1385
+ # @param [String] user_id
1386
+ # Identifier of the teacher to delete. The identifier can be one of the
1387
+ # following:
1388
+ # * the numeric identifier for the user
1389
+ # * the email address of the user
1390
+ # * the string literal `"me"`, indicating the requesting user
1408
1391
  # @param [String] fields
1409
1392
  # Selector specifying which fields to include in a partial response.
1410
1393
  # @param [String] quota_user
@@ -1414,65 +1397,41 @@ module Google
1414
1397
  # Request-specific options
1415
1398
  #
1416
1399
  # @yield [result, err] Result & error if block supplied
1417
- # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object
1400
+ # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
1418
1401
  # @yieldparam err [StandardError] error object if request failed
1419
1402
  #
1420
- # @return [Google::Apis::ClassroomV1::CourseWork]
1403
+ # @return [Google::Apis::ClassroomV1::Empty]
1421
1404
  #
1422
1405
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1423
1406
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1424
1407
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1425
- def get_course_work(course_id, id, fields: nil, quota_user: nil, options: nil, &block)
1426
- command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{id}', options)
1427
- command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation
1428
- command.response_class = Google::Apis::ClassroomV1::CourseWork
1408
+ def delete_course_teacher(course_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
1409
+ command = make_simple_command(:delete, 'v1/courses/{courseId}/teachers/{userId}', options)
1410
+ command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
1411
+ command.response_class = Google::Apis::ClassroomV1::Empty
1429
1412
  command.params['courseId'] = course_id unless course_id.nil?
1430
- command.params['id'] = id unless id.nil?
1413
+ command.params['userId'] = user_id unless user_id.nil?
1431
1414
  command.query['fields'] = fields unless fields.nil?
1432
1415
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1433
1416
  execute_or_queue_command(command, &block)
1434
1417
  end
1435
1418
 
1436
- # Updates one or more fields of a course work.
1437
- # See google.classroom.v1.CourseWork for details
1438
- # of which fields may be updated and who may change them.
1439
- # This request must be made by the Developer Console project of the
1440
- # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
1441
- # create the corresponding course work item.
1419
+ # Returns a teacher of a course.
1442
1420
  # This method returns the following error codes:
1443
- # * `PERMISSION_DENIED` if the requesting developer project did not create
1444
- # the corresponding course work, if the user is not permitted to make the
1445
- # requested modification to the student submission, or for
1446
- # access errors.
1447
- # * `INVALID_ARGUMENT` if the request is malformed.
1448
- # * `FAILED_PRECONDITION` if the requested course work has already been
1449
- # deleted.
1450
- # * `NOT_FOUND` if the requested course, course work, or student submission
1451
- # does not exist.
1421
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to view
1422
+ # teachers of this course or for access errors.
1423
+ # * `NOT_FOUND` if no teacher of this course has the requested ID or if the
1424
+ # course does not exist.
1452
1425
  # @param [String] course_id
1453
1426
  # Identifier of the course.
1454
1427
  # This identifier can be either the Classroom-assigned identifier or an
1455
1428
  # alias.
1456
- # @param [String] id
1457
- # Identifier of the course work.
1458
- # @param [Google::Apis::ClassroomV1::CourseWork] course_work_object
1459
- # @param [String] update_mask
1460
- # Mask that identifies which fields on the course work to update.
1461
- # This field is required to do an update. The update fails if invalid
1462
- # fields are specified. If a field supports empty values, it can be cleared
1463
- # by specifying it in the update mask and not in the CourseWork object. If a
1464
- # field that does not support empty values is included in the update mask and
1465
- # not set in the CourseWork object, an `INVALID_ARGUMENT` error will be
1466
- # returned.
1467
- # The following fields may be specified by teachers:
1468
- # * `title`
1469
- # * `description`
1470
- # * `state`
1471
- # * `due_date`
1472
- # * `due_time`
1473
- # * `max_points`
1474
- # * `scheduled_time`
1475
- # * `submission_modification_mode`
1429
+ # @param [String] user_id
1430
+ # Identifier of the teacher to return. The identifier can be one of the
1431
+ # following:
1432
+ # * the numeric identifier for the user
1433
+ # * the email address of the user
1434
+ # * the string literal `"me"`, indicating the requesting user
1476
1435
  # @param [String] fields
1477
1436
  # Selector specifying which fields to include in a partial response.
1478
1437
  # @param [String] quota_user
@@ -1482,48 +1441,44 @@ module Google
1482
1441
  # Request-specific options
1483
1442
  #
1484
1443
  # @yield [result, err] Result & error if block supplied
1485
- # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object
1444
+ # @yieldparam result [Google::Apis::ClassroomV1::Teacher] parsed result object
1486
1445
  # @yieldparam err [StandardError] error object if request failed
1487
1446
  #
1488
- # @return [Google::Apis::ClassroomV1::CourseWork]
1447
+ # @return [Google::Apis::ClassroomV1::Teacher]
1489
1448
  #
1490
1449
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1491
1450
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1492
1451
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1493
- def patch_course_course_work(course_id, id, course_work_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1494
- command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWork/{id}', options)
1495
- command.request_representation = Google::Apis::ClassroomV1::CourseWork::Representation
1496
- command.request_object = course_work_object
1497
- command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation
1498
- command.response_class = Google::Apis::ClassroomV1::CourseWork
1452
+ def get_course_teacher(course_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
1453
+ command = make_simple_command(:get, 'v1/courses/{courseId}/teachers/{userId}', options)
1454
+ command.response_representation = Google::Apis::ClassroomV1::Teacher::Representation
1455
+ command.response_class = Google::Apis::ClassroomV1::Teacher
1499
1456
  command.params['courseId'] = course_id unless course_id.nil?
1500
- command.params['id'] = id unless id.nil?
1501
- command.query['updateMask'] = update_mask unless update_mask.nil?
1457
+ command.params['userId'] = user_id unless user_id.nil?
1502
1458
  command.query['fields'] = fields unless fields.nil?
1503
1459
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1504
1460
  execute_or_queue_command(command, &block)
1505
1461
  end
1506
1462
 
1507
- # Creates course work.
1508
- # The resulting course work (and corresponding student submissions) are
1509
- # associated with the Developer Console project of the
1510
- # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
1511
- # make the request. Classroom API requests to modify course work and student
1512
- # submissions must be made with an OAuth client ID from the associated
1513
- # Developer Console project.
1463
+ # Returns a list of teachers of this course that the requester
1464
+ # is permitted to view.
1514
1465
  # This method returns the following error codes:
1515
- # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
1516
- # requested course, create course work in the requested course, share a
1517
- # Drive attachment, or for access errors.
1518
- # * `INVALID_ARGUMENT` if the request is malformed.
1519
- # * `NOT_FOUND` if the requested course does not exist.
1520
- # * `FAILED_PRECONDITION` for the following request error:
1521
- # * AttachmentNotVisible
1466
+ # * `NOT_FOUND` if the course does not exist.
1467
+ # * `PERMISSION_DENIED` for access errors.
1522
1468
  # @param [String] course_id
1523
1469
  # Identifier of the course.
1524
1470
  # This identifier can be either the Classroom-assigned identifier or an
1525
1471
  # alias.
1526
- # @param [Google::Apis::ClassroomV1::CourseWork] course_work_object
1472
+ # @param [Fixnum] page_size
1473
+ # Maximum number of items to return. Zero means no maximum.
1474
+ # The server may return fewer than the specified number of results.
1475
+ # @param [String] page_token
1476
+ # nextPageToken
1477
+ # value returned from a previous
1478
+ # list call, indicating that
1479
+ # the subsequent page of results should be returned.
1480
+ # The list request must be
1481
+ # otherwise identical to the one that resulted in this token.
1527
1482
  # @param [String] fields
1528
1483
  # Selector specifying which fields to include in a partial response.
1529
1484
  # @param [String] quota_user
@@ -1533,41 +1488,40 @@ module Google
1533
1488
  # Request-specific options
1534
1489
  #
1535
1490
  # @yield [result, err] Result & error if block supplied
1536
- # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object
1491
+ # @yieldparam result [Google::Apis::ClassroomV1::ListTeachersResponse] parsed result object
1537
1492
  # @yieldparam err [StandardError] error object if request failed
1538
1493
  #
1539
- # @return [Google::Apis::ClassroomV1::CourseWork]
1494
+ # @return [Google::Apis::ClassroomV1::ListTeachersResponse]
1540
1495
  #
1541
1496
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1542
1497
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1543
1498
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1544
- def create_course_work(course_id, course_work_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1545
- command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork', options)
1546
- command.request_representation = Google::Apis::ClassroomV1::CourseWork::Representation
1547
- command.request_object = course_work_object
1548
- command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation
1549
- command.response_class = Google::Apis::ClassroomV1::CourseWork
1499
+ def list_course_teachers(course_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1500
+ command = make_simple_command(:get, 'v1/courses/{courseId}/teachers', options)
1501
+ command.response_representation = Google::Apis::ClassroomV1::ListTeachersResponse::Representation
1502
+ command.response_class = Google::Apis::ClassroomV1::ListTeachersResponse
1550
1503
  command.params['courseId'] = course_id unless course_id.nil?
1504
+ command.query['pageSize'] = page_size unless page_size.nil?
1505
+ command.query['pageToken'] = page_token unless page_token.nil?
1551
1506
  command.query['fields'] = fields unless fields.nil?
1552
1507
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1553
1508
  execute_or_queue_command(command, &block)
1554
1509
  end
1555
1510
 
1556
- # Returns a student submission.
1557
- # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
1558
- # requested course, course work, or student submission or for
1559
- # access errors.
1560
- # * `INVALID_ARGUMENT` if the request is malformed.
1561
- # * `NOT_FOUND` if the requested course, course work, or student submission
1562
- # does not exist.
1563
- # @param [String] course_id
1564
- # Identifier of the course.
1565
- # This identifier can be either the Classroom-assigned identifier or an
1566
- # alias.
1567
- # @param [String] course_work_id
1568
- # Identifier of the course work.
1511
+ # Accepts an invitation, removing it and adding the invited user to the
1512
+ # teachers or students (as appropriate) of the specified course. Only the
1513
+ # invited user may accept an invitation.
1514
+ # This method returns the following error codes:
1515
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to accept the
1516
+ # requested invitation or for access errors.
1517
+ # * `FAILED_PRECONDITION` for the following request errors:
1518
+ # * CourseMemberLimitReached
1519
+ # * CourseNotModifiable
1520
+ # * CourseTeacherLimitReached
1521
+ # * UserGroupsMembershipLimitReached
1522
+ # * `NOT_FOUND` if no invitation exists with the requested ID.
1569
1523
  # @param [String] id
1570
- # Identifier of the student submission.
1524
+ # Identifier of the invitation to accept.
1571
1525
  # @param [String] fields
1572
1526
  # Selector specifying which fields to include in a partial response.
1573
1527
  # @param [String] quota_user
@@ -1577,56 +1531,35 @@ module Google
1577
1531
  # Request-specific options
1578
1532
  #
1579
1533
  # @yield [result, err] Result & error if block supplied
1580
- # @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object
1534
+ # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
1581
1535
  # @yieldparam err [StandardError] error object if request failed
1582
1536
  #
1583
- # @return [Google::Apis::ClassroomV1::StudentSubmission]
1537
+ # @return [Google::Apis::ClassroomV1::Empty]
1584
1538
  #
1585
1539
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1586
1540
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1587
1541
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1588
- def get_student_submission(course_id, course_work_id, id, fields: nil, quota_user: nil, options: nil, &block)
1589
- command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}', options)
1590
- command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation
1591
- command.response_class = Google::Apis::ClassroomV1::StudentSubmission
1592
- command.params['courseId'] = course_id unless course_id.nil?
1593
- command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
1542
+ def accept_invitation(id, fields: nil, quota_user: nil, options: nil, &block)
1543
+ command = make_simple_command(:post, 'v1/invitations/{id}:accept', options)
1544
+ command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
1545
+ command.response_class = Google::Apis::ClassroomV1::Empty
1594
1546
  command.params['id'] = id unless id.nil?
1595
1547
  command.query['fields'] = fields unless fields.nil?
1596
1548
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1597
1549
  execute_or_queue_command(command, &block)
1598
1550
  end
1599
1551
 
1600
- # Updates one or more fields of a student submission.
1601
- # See google.classroom.v1.StudentSubmission for details
1602
- # of which fields may be updated and who may change them.
1603
- # This request must be made by the Developer Console project of the
1604
- # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
1605
- # create the corresponding course work item.
1552
+ # Creates an invitation. Only one invitation for a user and course may exist
1553
+ # at a time. Delete and re-create an invitation to make changes.
1606
1554
  # This method returns the following error codes:
1607
- # * `PERMISSION_DENIED` if the requesting developer project did not create
1608
- # the corresponding course work, if the user is not permitted to make the
1609
- # requested modification to the student submission, or for
1610
- # access errors.
1611
- # * `INVALID_ARGUMENT` if the request is malformed.
1612
- # * `NOT_FOUND` if the requested course, course work, or student submission
1613
- # does not exist.
1614
- # @param [String] course_id
1615
- # Identifier of the course.
1616
- # This identifier can be either the Classroom-assigned identifier or an
1617
- # alias.
1618
- # @param [String] course_work_id
1619
- # Identifier of the course work.
1620
- # @param [String] id
1621
- # Identifier of the student submission.
1622
- # @param [Google::Apis::ClassroomV1::StudentSubmission] student_submission_object
1623
- # @param [String] update_mask
1624
- # Mask that identifies which fields on the student submission to update.
1625
- # This field is required to do an update. The update fails if invalid
1626
- # fields are specified.
1627
- # The following fields may be specified by teachers:
1628
- # * `draft_grade`
1629
- # * `assigned_grade`
1555
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to create
1556
+ # invitations for this course or for access errors.
1557
+ # * `NOT_FOUND` if the course or the user does not exist.
1558
+ # * `FAILED_PRECONDITION` if the requested user's account is disabled or if
1559
+ # the user already has this role or a role with greater permissions.
1560
+ # * `ALREADY_EXISTS` if an invitation for the specified user and course
1561
+ # already exists.
1562
+ # @param [Google::Apis::ClassroomV1::Invitation] invitation_object
1630
1563
  # @param [String] fields
1631
1564
  # Selector specifying which fields to include in a partial response.
1632
1565
  # @param [String] quota_user
@@ -1636,55 +1569,32 @@ module Google
1636
1569
  # Request-specific options
1637
1570
  #
1638
1571
  # @yield [result, err] Result & error if block supplied
1639
- # @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object
1572
+ # @yieldparam result [Google::Apis::ClassroomV1::Invitation] parsed result object
1640
1573
  # @yieldparam err [StandardError] error object if request failed
1641
1574
  #
1642
- # @return [Google::Apis::ClassroomV1::StudentSubmission]
1575
+ # @return [Google::Apis::ClassroomV1::Invitation]
1643
1576
  #
1644
1577
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1645
1578
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1646
1579
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1647
- def patch_student_submission(course_id, course_work_id, id, student_submission_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1648
- command = make_simple_command(:patch, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}', options)
1649
- command.request_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation
1650
- command.request_object = student_submission_object
1651
- command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation
1652
- command.response_class = Google::Apis::ClassroomV1::StudentSubmission
1653
- command.params['courseId'] = course_id unless course_id.nil?
1654
- command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
1655
- command.params['id'] = id unless id.nil?
1656
- command.query['updateMask'] = update_mask unless update_mask.nil?
1580
+ def create_invitation(invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1581
+ command = make_simple_command(:post, 'v1/invitations', options)
1582
+ command.request_representation = Google::Apis::ClassroomV1::Invitation::Representation
1583
+ command.request_object = invitation_object
1584
+ command.response_representation = Google::Apis::ClassroomV1::Invitation::Representation
1585
+ command.response_class = Google::Apis::ClassroomV1::Invitation
1657
1586
  command.query['fields'] = fields unless fields.nil?
1658
1587
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1659
1588
  execute_or_queue_command(command, &block)
1660
1589
  end
1661
1590
 
1662
- # Returns a student submission.
1663
- # Returning a student submission transfers ownership of attached Drive
1664
- # files to the student and may also update the submission state.
1665
- # Unlike the Classroom application, returning a student submission does not
1666
- # set assignedGrade to the draftGrade value.
1667
- # Only a teacher of the course that contains the requested student submission
1668
- # may call this method.
1669
- # This request must be made by the Developer Console project of the
1670
- # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
1671
- # create the corresponding course work item.
1591
+ # Deletes an invitation.
1672
1592
  # This method returns the following error codes:
1673
- # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
1674
- # requested course or course work, return the requested student submission,
1675
- # or for access errors.
1676
- # * `INVALID_ARGUMENT` if the request is malformed.
1677
- # * `NOT_FOUND` if the requested course, course work, or student submission
1678
- # does not exist.
1679
- # @param [String] course_id
1680
- # Identifier of the course.
1681
- # This identifier can be either the Classroom-assigned identifier or an
1682
- # alias.
1683
- # @param [String] course_work_id
1684
- # Identifier of the course work.
1593
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to delete the
1594
+ # requested invitation or for access errors.
1595
+ # * `NOT_FOUND` if no invitation exists with the requested ID.
1685
1596
  # @param [String] id
1686
- # Identifier of the student submission.
1687
- # @param [Google::Apis::ClassroomV1::ReturnStudentSubmissionRequest] return_student_submission_request_object
1597
+ # Identifier of the invitation to delete.
1688
1598
  # @param [String] fields
1689
1599
  # Selector specifying which fields to include in a partial response.
1690
1600
  # @param [String] quota_user
@@ -1702,45 +1612,23 @@ module Google
1702
1612
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1703
1613
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1704
1614
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1705
- def return_student_submission(course_id, course_work_id, id, return_student_submission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1706
- command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return', options)
1707
- command.request_representation = Google::Apis::ClassroomV1::ReturnStudentSubmissionRequest::Representation
1708
- command.request_object = return_student_submission_request_object
1615
+ def delete_invitation(id, fields: nil, quota_user: nil, options: nil, &block)
1616
+ command = make_simple_command(:delete, 'v1/invitations/{id}', options)
1709
1617
  command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
1710
1618
  command.response_class = Google::Apis::ClassroomV1::Empty
1711
- command.params['courseId'] = course_id unless course_id.nil?
1712
- command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
1713
1619
  command.params['id'] = id unless id.nil?
1714
1620
  command.query['fields'] = fields unless fields.nil?
1715
1621
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1716
1622
  execute_or_queue_command(command, &block)
1717
1623
  end
1718
1624
 
1719
- # Reclaims a student submission on behalf of the student that owns it.
1720
- # Reclaiming a student submission transfers ownership of attached Drive
1721
- # files to the student and update the submission state.
1722
- # Only the student that owns the requested student submission may call this
1723
- # method, and only for a student submission that has been turned in.
1724
- # This request must be made by the Developer Console project of the
1725
- # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
1726
- # create the corresponding course work item.
1625
+ # Returns an invitation.
1727
1626
  # This method returns the following error codes:
1728
- # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
1729
- # requested course or course work, unsubmit the requested student submission,
1730
- # or for access errors.
1731
- # * `FAILED_PRECONDITION` if the student submission has not been turned in.
1732
- # * `INVALID_ARGUMENT` if the request is malformed.
1733
- # * `NOT_FOUND` if the requested course, course work, or student submission
1734
- # does not exist.
1735
- # @param [String] course_id
1736
- # Identifier of the course.
1737
- # This identifier can be either the Classroom-assigned identifier or an
1738
- # alias.
1739
- # @param [String] course_work_id
1740
- # Identifier of the course work.
1627
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to view the
1628
+ # requested invitation or for access errors.
1629
+ # * `NOT_FOUND` if no invitation exists with the requested ID.
1741
1630
  # @param [String] id
1742
- # Identifier of the student submission.
1743
- # @param [Google::Apis::ClassroomV1::ReclaimStudentSubmissionRequest] reclaim_student_submission_request_object
1631
+ # Identifier of the invitation to return.
1744
1632
  # @param [String] fields
1745
1633
  # Selector specifying which fields to include in a partial response.
1746
1634
  # @param [String] quota_user
@@ -1750,52 +1638,49 @@ module Google
1750
1638
  # Request-specific options
1751
1639
  #
1752
1640
  # @yield [result, err] Result & error if block supplied
1753
- # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
1641
+ # @yieldparam result [Google::Apis::ClassroomV1::Invitation] parsed result object
1754
1642
  # @yieldparam err [StandardError] error object if request failed
1755
1643
  #
1756
- # @return [Google::Apis::ClassroomV1::Empty]
1644
+ # @return [Google::Apis::ClassroomV1::Invitation]
1757
1645
  #
1758
1646
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1759
1647
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1760
1648
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1761
- def reclaim_student_submission(course_id, course_work_id, id, reclaim_student_submission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1762
- command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim', options)
1763
- command.request_representation = Google::Apis::ClassroomV1::ReclaimStudentSubmissionRequest::Representation
1764
- command.request_object = reclaim_student_submission_request_object
1765
- command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
1766
- command.response_class = Google::Apis::ClassroomV1::Empty
1767
- command.params['courseId'] = course_id unless course_id.nil?
1768
- command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
1649
+ def get_invitation(id, fields: nil, quota_user: nil, options: nil, &block)
1650
+ command = make_simple_command(:get, 'v1/invitations/{id}', options)
1651
+ command.response_representation = Google::Apis::ClassroomV1::Invitation::Representation
1652
+ command.response_class = Google::Apis::ClassroomV1::Invitation
1769
1653
  command.params['id'] = id unless id.nil?
1770
1654
  command.query['fields'] = fields unless fields.nil?
1771
1655
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1772
1656
  execute_or_queue_command(command, &block)
1773
1657
  end
1774
1658
 
1775
- # Turns in a student submission.
1776
- # Turning in a student submission transfers ownership of attached Drive
1777
- # files to the teacher and may also update the submission state.
1778
- # This may only be called by the student that owns the specified student
1779
- # submission.
1780
- # This request must be made by the Developer Console project of the
1781
- # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
1782
- # create the corresponding course work item.
1659
+ # Returns a list of invitations that the requesting user is permitted to
1660
+ # view, restricted to those that match the list request.
1661
+ # *Note:* At least one of `user_id` or `course_id` must be supplied. Both
1662
+ # fields can be supplied.
1783
1663
  # This method returns the following error codes:
1784
- # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
1785
- # requested course or course work, turn in the requested student submission,
1786
- # or for access errors.
1787
- # * `INVALID_ARGUMENT` if the request is malformed.
1788
- # * `NOT_FOUND` if the requested course, course work, or student submission
1789
- # does not exist.
1664
+ # * `PERMISSION_DENIED` for access errors.
1790
1665
  # @param [String] course_id
1791
- # Identifier of the course.
1792
- # This identifier can be either the Classroom-assigned identifier or an
1793
- # alias.
1794
- # @param [String] course_work_id
1795
- # Identifier of the course work.
1796
- # @param [String] id
1797
- # Identifier of the student submission.
1798
- # @param [Google::Apis::ClassroomV1::TurnInStudentSubmissionRequest] turn_in_student_submission_request_object
1666
+ # Restricts returned invitations to those for a course with the specified
1667
+ # identifier.
1668
+ # @param [Fixnum] page_size
1669
+ # Maximum number of items to return. Zero means no maximum.
1670
+ # The server may return fewer than the specified number of results.
1671
+ # @param [String] page_token
1672
+ # nextPageToken
1673
+ # value returned from a previous
1674
+ # list call, indicating
1675
+ # that the subsequent page of results should be returned.
1676
+ # The list request must be
1677
+ # otherwise identical to the one that resulted in this token.
1678
+ # @param [String] user_id
1679
+ # Restricts returned invitations to those for a specific user. The identifier
1680
+ # can be one of the following:
1681
+ # * the numeric identifier for the user
1682
+ # * the email address of the user
1683
+ # * the string literal `"me"`, indicating the requesting user
1799
1684
  # @param [String] fields
1800
1685
  # Selector specifying which fields to include in a partial response.
1801
1686
  # @param [String] quota_user
@@ -1805,68 +1690,34 @@ module Google
1805
1690
  # Request-specific options
1806
1691
  #
1807
1692
  # @yield [result, err] Result & error if block supplied
1808
- # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
1693
+ # @yieldparam result [Google::Apis::ClassroomV1::ListInvitationsResponse] parsed result object
1809
1694
  # @yieldparam err [StandardError] error object if request failed
1810
1695
  #
1811
- # @return [Google::Apis::ClassroomV1::Empty]
1696
+ # @return [Google::Apis::ClassroomV1::ListInvitationsResponse]
1812
1697
  #
1813
1698
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1814
1699
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1815
1700
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1816
- def turn_in_student_submission(course_id, course_work_id, id, turn_in_student_submission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1817
- command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn', options)
1818
- command.request_representation = Google::Apis::ClassroomV1::TurnInStudentSubmissionRequest::Representation
1819
- command.request_object = turn_in_student_submission_request_object
1820
- command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
1821
- command.response_class = Google::Apis::ClassroomV1::Empty
1822
- command.params['courseId'] = course_id unless course_id.nil?
1823
- command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
1824
- command.params['id'] = id unless id.nil?
1701
+ def list_invitations(course_id: nil, page_size: nil, page_token: nil, user_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1702
+ command = make_simple_command(:get, 'v1/invitations', options)
1703
+ command.response_representation = Google::Apis::ClassroomV1::ListInvitationsResponse::Representation
1704
+ command.response_class = Google::Apis::ClassroomV1::ListInvitationsResponse
1705
+ command.query['courseId'] = course_id unless course_id.nil?
1706
+ command.query['pageSize'] = page_size unless page_size.nil?
1707
+ command.query['pageToken'] = page_token unless page_token.nil?
1708
+ command.query['userId'] = user_id unless user_id.nil?
1825
1709
  command.query['fields'] = fields unless fields.nil?
1826
1710
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1827
1711
  execute_or_queue_command(command, &block)
1828
1712
  end
1829
1713
 
1830
- # Returns a list of student submissions that the requester is permitted to
1831
- # view, factoring in the OAuth scopes of the request.
1832
- # `-` may be specified as the `course_work_id` to include student
1833
- # submissions for multiple course work items.
1834
- # Course students may only view their own work. Course teachers
1835
- # and domain administrators may view all student submissions.
1714
+ # Returns a user profile.
1836
1715
  # This method returns the following error codes:
1837
- # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
1838
- # requested course or course work, or for access errors.
1839
- # * `INVALID_ARGUMENT` if the request is malformed.
1840
- # * `NOT_FOUND` if the requested course does not exist.
1841
- # @param [String] course_id
1842
- # Identifier of the course.
1843
- # This identifier can be either the Classroom-assigned identifier or an
1844
- # alias.
1845
- # @param [String] course_work_id
1846
- # Identifer of the student work to request.
1847
- # This may be set to the string literal `"-"` to request student work for
1848
- # all course work in the specified course.
1849
- # @param [String] late
1850
- # Requested lateness value. If specified, returned student submissions are
1851
- # restricted by the requested value.
1852
- # If unspecified, submissions are returned regardless of `late` value.
1853
- # @param [String] page_token
1854
- # nextPageToken
1855
- # value returned from a previous
1856
- # list call,
1857
- # indicating that the subsequent page of results should be returned.
1858
- # The list request
1859
- # must be otherwise identical to the one that resulted in this token.
1860
- # @param [Array<String>, String] states
1861
- # Requested submission states. If specified, returned student submissions
1862
- # match one of the specified submission states.
1863
- # @param [Fixnum] page_size
1864
- # Maximum number of items to return. Zero or unspecified indicates that the
1865
- # server may assign a maximum.
1866
- # The server may return fewer than the specified number of results.
1716
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access
1717
+ # this user profile, if no profile exists with the requested ID, or for
1718
+ # access errors.
1867
1719
  # @param [String] user_id
1868
- # Optional argument to restrict returned student work to those owned by the
1869
- # student with the specified identifier. The identifier can be one of the
1720
+ # Identifier of the profile to return. The identifier can be one of the
1870
1721
  # following:
1871
1722
  # * the numeric identifier for the user
1872
1723
  # * the email address of the user
@@ -1880,53 +1731,166 @@ module Google
1880
1731
  # Request-specific options
1881
1732
  #
1882
1733
  # @yield [result, err] Result & error if block supplied
1883
- # @yieldparam result [Google::Apis::ClassroomV1::ListStudentSubmissionsResponse] parsed result object
1734
+ # @yieldparam result [Google::Apis::ClassroomV1::UserProfile] parsed result object
1884
1735
  # @yieldparam err [StandardError] error object if request failed
1885
1736
  #
1886
- # @return [Google::Apis::ClassroomV1::ListStudentSubmissionsResponse]
1737
+ # @return [Google::Apis::ClassroomV1::UserProfile]
1887
1738
  #
1888
1739
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1889
1740
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1890
1741
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1891
- def list_student_submissions(course_id, course_work_id, late: nil, page_token: nil, states: nil, page_size: nil, user_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1892
- command = make_simple_command(:get, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions', options)
1893
- command.response_representation = Google::Apis::ClassroomV1::ListStudentSubmissionsResponse::Representation
1894
- command.response_class = Google::Apis::ClassroomV1::ListStudentSubmissionsResponse
1895
- command.params['courseId'] = course_id unless course_id.nil?
1896
- command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
1897
- command.query['late'] = late unless late.nil?
1898
- command.query['pageToken'] = page_token unless page_token.nil?
1899
- command.query['states'] = states unless states.nil?
1900
- command.query['pageSize'] = page_size unless page_size.nil?
1901
- command.query['userId'] = user_id unless user_id.nil?
1742
+ def get_user_profile(user_id, fields: nil, quota_user: nil, options: nil, &block)
1743
+ command = make_simple_command(:get, 'v1/userProfiles/{userId}', options)
1744
+ command.response_representation = Google::Apis::ClassroomV1::UserProfile::Representation
1745
+ command.response_class = Google::Apis::ClassroomV1::UserProfile
1746
+ command.params['userId'] = user_id unless user_id.nil?
1902
1747
  command.query['fields'] = fields unless fields.nil?
1903
1748
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1904
1749
  execute_or_queue_command(command, &block)
1905
1750
  end
1906
1751
 
1907
- # Modifies attachments of student submission.
1908
- # Attachments may only be added to student submissions belonging to course
1909
- # work objects with a `workType` of `ASSIGNMENT`.
1910
- # This request must be made by the Developer Console project of the
1911
- # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
1912
- # create the corresponding course work item.
1752
+ # Creates a guardian invitation, and sends an email to the guardian asking
1753
+ # them to confirm that they are the student's guardian.
1754
+ # Once the guardian accepts the invitation, their `state` will change to
1755
+ # `COMPLETED` and they will start receiving guardian notifications. A
1756
+ # `Guardian` resource will also be created to represent the active guardian.
1757
+ # The request object must have the `student_id` and
1758
+ # `invited_email_address` fields set. Failing to set these fields, or
1759
+ # setting any other fields in the request, will result in an error.
1913
1760
  # This method returns the following error codes:
1914
- # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
1915
- # requested course or course work, if the user is not permitted to modify
1916
- # attachments on the requested student submission, or for
1761
+ # * `PERMISSION_DENIED` if the current user does not have permission to
1762
+ # manage guardians, if the guardian in question has already rejected
1763
+ # too many requests for that student, if guardians are not enabled for the
1764
+ # domain in question, or for other access errors.
1765
+ # * `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian
1766
+ # link limit.
1767
+ # * `INVALID_ARGUMENT` if the guardian email address is not valid (for
1768
+ # example, if it is too long), or if the format of the student ID provided
1769
+ # cannot be recognized (it is not an email address, nor a `user_id` from
1770
+ # this API). This error will also be returned if read-only fields are set,
1771
+ # or if the `state` field is set to to a value other than `PENDING`.
1772
+ # * `NOT_FOUND` if the student ID provided is a valid student ID, but
1773
+ # Classroom has no record of that student.
1774
+ # * `ALREADY_EXISTS` if there is already a pending guardian invitation for
1775
+ # the student and `invited_email_address` provided, or if the provided
1776
+ # `invited_email_address` matches the Google account of an existing
1777
+ # `Guardian` for this user.
1778
+ # @param [String] student_id
1779
+ # ID of the student (in standard format)
1780
+ # @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object
1781
+ # @param [String] fields
1782
+ # Selector specifying which fields to include in a partial response.
1783
+ # @param [String] quota_user
1784
+ # Available to use for quota purposes for server-side applications. Can be any
1785
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1786
+ # @param [Google::Apis::RequestOptions] options
1787
+ # Request-specific options
1788
+ #
1789
+ # @yield [result, err] Result & error if block supplied
1790
+ # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
1791
+ # @yieldparam err [StandardError] error object if request failed
1792
+ #
1793
+ # @return [Google::Apis::ClassroomV1::GuardianInvitation]
1794
+ #
1795
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1796
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1797
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1798
+ def create_user_profile_guardian_invitation(student_id, guardian_invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1799
+ command = make_simple_command(:post, 'v1/userProfiles/{studentId}/guardianInvitations', options)
1800
+ command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
1801
+ command.request_object = guardian_invitation_object
1802
+ command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
1803
+ command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
1804
+ command.params['studentId'] = student_id unless student_id.nil?
1805
+ command.query['fields'] = fields unless fields.nil?
1806
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1807
+ execute_or_queue_command(command, &block)
1808
+ end
1809
+
1810
+ # Returns a specific guardian invitation.
1811
+ # This method returns the following error codes:
1812
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to view
1813
+ # guardian invitations for the student identified by the `student_id`, if
1814
+ # guardians are not enabled for the domain in question, or for other
1917
1815
  # access errors.
1918
- # * `INVALID_ARGUMENT` if the request is malformed.
1919
- # * `NOT_FOUND` if the requested course, course work, or student submission
1920
- # does not exist.
1921
- # @param [String] course_id
1922
- # Identifier of the course.
1923
- # This identifier can be either the Classroom-assigned identifier or an
1924
- # alias.
1925
- # @param [String] course_work_id
1926
- # Identifier of the course work.
1927
- # @param [String] id
1928
- # Identifier of the student submission.
1929
- # @param [Google::Apis::ClassroomV1::ModifyAttachmentsRequest] modify_attachments_request_object
1816
+ # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
1817
+ # be recognized (it is not an email address, nor a `student_id` from the
1818
+ # API, nor the literal string `me`).
1819
+ # * `NOT_FOUND` if Classroom cannot find any record of the given student or
1820
+ # `invitation_id`. May also be returned if the student exists, but the
1821
+ # requesting user does not have access to see that student.
1822
+ # @param [String] student_id
1823
+ # The ID of the student whose guardian invitation is being requested.
1824
+ # @param [String] invitation_id
1825
+ # The `id` field of the `GuardianInvitation` being requested.
1826
+ # @param [String] fields
1827
+ # Selector specifying which fields to include in a partial response.
1828
+ # @param [String] quota_user
1829
+ # Available to use for quota purposes for server-side applications. Can be any
1830
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1831
+ # @param [Google::Apis::RequestOptions] options
1832
+ # Request-specific options
1833
+ #
1834
+ # @yield [result, err] Result & error if block supplied
1835
+ # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
1836
+ # @yieldparam err [StandardError] error object if request failed
1837
+ #
1838
+ # @return [Google::Apis::ClassroomV1::GuardianInvitation]
1839
+ #
1840
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1841
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1842
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1843
+ def get_user_profile_guardian_invitation(student_id, invitation_id, fields: nil, quota_user: nil, options: nil, &block)
1844
+ command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options)
1845
+ command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
1846
+ command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
1847
+ command.params['studentId'] = student_id unless student_id.nil?
1848
+ command.params['invitationId'] = invitation_id unless invitation_id.nil?
1849
+ command.query['fields'] = fields unless fields.nil?
1850
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1851
+ execute_or_queue_command(command, &block)
1852
+ end
1853
+
1854
+ # Returns a list of guardian invitations that the requesting user is
1855
+ # permitted to view, filtered by the parameters provided.
1856
+ # This method returns the following error codes:
1857
+ # * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting
1858
+ # user is not permitted to view guardian invitations for that student, if
1859
+ # `"-"` is specified as the `student_id` and the user is not a domain
1860
+ # administrator, if guardians are not enabled for the domain in question,
1861
+ # or for other access errors.
1862
+ # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
1863
+ # be recognized (it is not an email address, nor a `student_id` from the
1864
+ # API, nor the literal string `me`). May also be returned if an invalid
1865
+ # `page_token` or `state` is provided.
1866
+ # * `NOT_FOUND` if a `student_id` is specified, and its format can be
1867
+ # recognized, but Classroom has no record of that student.
1868
+ # @param [String] student_id
1869
+ # The ID of the student whose guardian invitations are to be returned.
1870
+ # The identifier can be one of the following:
1871
+ # * the numeric identifier for the user
1872
+ # * the email address of the user
1873
+ # * the string literal `"me"`, indicating the requesting user
1874
+ # * the string literal `"-"`, indicating that results should be returned for
1875
+ # all students that the requesting user is permitted to view guardian
1876
+ # invitations.
1877
+ # @param [String] invited_email_address
1878
+ # If specified, only results with the specified `invited_email_address`
1879
+ # will be returned.
1880
+ # @param [Fixnum] page_size
1881
+ # Maximum number of items to return. Zero or unspecified indicates that the
1882
+ # server may assign a maximum.
1883
+ # The server may return fewer than the specified number of results.
1884
+ # @param [String] page_token
1885
+ # nextPageToken
1886
+ # value returned from a previous
1887
+ # list call,
1888
+ # indicating that the subsequent page of results should be returned.
1889
+ # The list request
1890
+ # must be otherwise identical to the one that resulted in this token.
1891
+ # @param [Array<String>, String] states
1892
+ # If specified, only results with the specified `state` values will be
1893
+ # returned. Otherwise, results with a `state` of `PENDING` will be returned.
1930
1894
  # @param [String] fields
1931
1895
  # Selector specifying which fields to include in a partial response.
1932
1896
  # @param [String] quota_user
@@ -1936,46 +1900,55 @@ module Google
1936
1900
  # Request-specific options
1937
1901
  #
1938
1902
  # @yield [result, err] Result & error if block supplied
1939
- # @yieldparam result [Google::Apis::ClassroomV1::StudentSubmission] parsed result object
1903
+ # @yieldparam result [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse] parsed result object
1940
1904
  # @yieldparam err [StandardError] error object if request failed
1941
1905
  #
1942
- # @return [Google::Apis::ClassroomV1::StudentSubmission]
1906
+ # @return [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse]
1943
1907
  #
1944
1908
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1945
1909
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1946
1910
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1947
- def modify_student_submission_attachments(course_id, course_work_id, id, modify_attachments_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1948
- command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments', options)
1949
- command.request_representation = Google::Apis::ClassroomV1::ModifyAttachmentsRequest::Representation
1950
- command.request_object = modify_attachments_request_object
1951
- command.response_representation = Google::Apis::ClassroomV1::StudentSubmission::Representation
1952
- command.response_class = Google::Apis::ClassroomV1::StudentSubmission
1953
- command.params['courseId'] = course_id unless course_id.nil?
1954
- command.params['courseWorkId'] = course_work_id unless course_work_id.nil?
1955
- command.params['id'] = id unless id.nil?
1911
+ def list_user_profile_guardian_invitations(student_id, invited_email_address: nil, page_size: nil, page_token: nil, states: nil, fields: nil, quota_user: nil, options: nil, &block)
1912
+ command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations', options)
1913
+ command.response_representation = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse::Representation
1914
+ command.response_class = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse
1915
+ command.params['studentId'] = student_id unless student_id.nil?
1916
+ command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil?
1917
+ command.query['pageSize'] = page_size unless page_size.nil?
1918
+ command.query['pageToken'] = page_token unless page_token.nil?
1919
+ command.query['states'] = states unless states.nil?
1956
1920
  command.query['fields'] = fields unless fields.nil?
1957
1921
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1958
1922
  execute_or_queue_command(command, &block)
1959
1923
  end
1960
1924
 
1961
- # Deletes a teacher of a course.
1925
+ # Modifies a guardian invitation.
1926
+ # Currently, the only valid modification is to change the `state` from
1927
+ # `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation.
1962
1928
  # This method returns the following error codes:
1963
- # * `PERMISSION_DENIED` if the requesting user is not permitted to delete
1964
- # teachers of this course or for access errors.
1965
- # * `NOT_FOUND` if no teacher of this course has the requested ID or if the
1966
- # course does not exist.
1967
- # * `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher
1968
- # of this course.
1969
- # @param [String] course_id
1970
- # Identifier of the course.
1971
- # This identifier can be either the Classroom-assigned identifier or an
1972
- # alias.
1973
- # @param [String] user_id
1974
- # Identifier of the teacher to delete. The identifier can be one of the
1975
- # following:
1976
- # * the numeric identifier for the user
1977
- # * the email address of the user
1978
- # * the string literal `"me"`, indicating the requesting user
1929
+ # * `PERMISSION_DENIED` if the current user does not have permission to
1930
+ # manage guardians, if guardians are not enabled for the domain in question
1931
+ # or for other access errors.
1932
+ # * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state.
1933
+ # * `INVALID_ARGUMENT` if the format of the student ID provided
1934
+ # cannot be recognized (it is not an email address, nor a `user_id` from
1935
+ # this API), or if the passed `GuardianInvitation` has a `state` other than
1936
+ # `COMPLETE`, or if it modifies fields other than `state`.
1937
+ # * `NOT_FOUND` if the student ID provided is a valid student ID, but
1938
+ # Classroom has no record of that student, or if the `id` field does not
1939
+ # refer to a guardian invitation known to Classroom.
1940
+ # @param [String] student_id
1941
+ # The ID of the student whose guardian invitation is to be modified.
1942
+ # @param [String] invitation_id
1943
+ # The `id` field of the `GuardianInvitation` to be modified.
1944
+ # @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object
1945
+ # @param [String] update_mask
1946
+ # Mask that identifies which fields on the course to update.
1947
+ # This field is required to do an update. The update will fail if invalid
1948
+ # fields are specified. The following fields are valid:
1949
+ # * `state`
1950
+ # When set in a query parameter, this field should be specified as
1951
+ # `updateMask=<field1>,<field2>,...`
1979
1952
  # @param [String] fields
1980
1953
  # Selector specifying which fields to include in a partial response.
1981
1954
  # @param [String] quota_user
@@ -1985,44 +1958,50 @@ module Google
1985
1958
  # Request-specific options
1986
1959
  #
1987
1960
  # @yield [result, err] Result & error if block supplied
1988
- # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
1961
+ # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
1989
1962
  # @yieldparam err [StandardError] error object if request failed
1990
1963
  #
1991
- # @return [Google::Apis::ClassroomV1::Empty]
1964
+ # @return [Google::Apis::ClassroomV1::GuardianInvitation]
1992
1965
  #
1993
1966
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1994
1967
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1995
1968
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1996
- def delete_course_teacher(course_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
1997
- command = make_simple_command(:delete, 'v1/courses/{courseId}/teachers/{userId}', options)
1998
- command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
1999
- command.response_class = Google::Apis::ClassroomV1::Empty
2000
- command.params['courseId'] = course_id unless course_id.nil?
2001
- command.params['userId'] = user_id unless user_id.nil?
1969
+ def patch_user_profile_guardian_invitation(student_id, invitation_id, guardian_invitation_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1970
+ command = make_simple_command(:patch, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options)
1971
+ command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
1972
+ command.request_object = guardian_invitation_object
1973
+ command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
1974
+ command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
1975
+ command.params['studentId'] = student_id unless student_id.nil?
1976
+ command.params['invitationId'] = invitation_id unless invitation_id.nil?
1977
+ command.query['updateMask'] = update_mask unless update_mask.nil?
2002
1978
  command.query['fields'] = fields unless fields.nil?
2003
1979
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2004
1980
  execute_or_queue_command(command, &block)
2005
1981
  end
2006
1982
 
2007
- # Returns a list of teachers of this course that the requester
2008
- # is permitted to view.
1983
+ # Deletes a guardian.
1984
+ # The guardian will no longer receive guardian notifications and the guardian
1985
+ # will no longer be accessible via the API.
2009
1986
  # This method returns the following error codes:
2010
- # * `NOT_FOUND` if the course does not exist.
2011
- # * `PERMISSION_DENIED` for access errors.
2012
- # @param [String] course_id
2013
- # Identifier of the course.
2014
- # This identifier can be either the Classroom-assigned identifier or an
2015
- # alias.
2016
- # @param [String] page_token
2017
- # nextPageToken
2018
- # value returned from a previous
2019
- # list call, indicating that
2020
- # the subsequent page of results should be returned.
2021
- # The list request must be
2022
- # otherwise identical to the one that resulted in this token.
2023
- # @param [Fixnum] page_size
2024
- # Maximum number of items to return. Zero means no maximum.
2025
- # The server may return fewer than the specified number of results.
1987
+ # * `PERMISSION_DENIED` if no user that matches the provided `student_id`
1988
+ # is visible to the requesting user, if the requesting user is not
1989
+ # permitted to manage guardians for the student identified by the
1990
+ # `student_id`, if guardians are not enabled for the domain in question,
1991
+ # or for other access errors.
1992
+ # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
1993
+ # be recognized (it is not an email address, nor a `student_id` from the
1994
+ # API).
1995
+ # * `NOT_FOUND` if the requesting user is permitted to modify guardians for
1996
+ # the requested `student_id`, but no `Guardian` record exists for that
1997
+ # student with the provided `guardian_id`.
1998
+ # @param [String] student_id
1999
+ # The student whose guardian is to be deleted. One of the following:
2000
+ # * the numeric identifier for the user
2001
+ # * the email address of the user
2002
+ # * the string literal `"me"`, indicating the requesting user
2003
+ # @param [String] guardian_id
2004
+ # The `id` field from a `Guardian`.
2026
2005
  # @param [String] fields
2027
2006
  # Selector specifying which fields to include in a partial response.
2028
2007
  # @param [String] quota_user
@@ -2032,42 +2011,45 @@ module Google
2032
2011
  # Request-specific options
2033
2012
  #
2034
2013
  # @yield [result, err] Result & error if block supplied
2035
- # @yieldparam result [Google::Apis::ClassroomV1::ListTeachersResponse] parsed result object
2014
+ # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
2036
2015
  # @yieldparam err [StandardError] error object if request failed
2037
2016
  #
2038
- # @return [Google::Apis::ClassroomV1::ListTeachersResponse]
2017
+ # @return [Google::Apis::ClassroomV1::Empty]
2039
2018
  #
2040
2019
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2041
2020
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2042
2021
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2043
- def list_course_teachers(course_id, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
2044
- command = make_simple_command(:get, 'v1/courses/{courseId}/teachers', options)
2045
- command.response_representation = Google::Apis::ClassroomV1::ListTeachersResponse::Representation
2046
- command.response_class = Google::Apis::ClassroomV1::ListTeachersResponse
2047
- command.params['courseId'] = course_id unless course_id.nil?
2048
- command.query['pageToken'] = page_token unless page_token.nil?
2049
- command.query['pageSize'] = page_size unless page_size.nil?
2022
+ def delete_user_profile_guardian(student_id, guardian_id, fields: nil, quota_user: nil, options: nil, &block)
2023
+ command = make_simple_command(:delete, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options)
2024
+ command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
2025
+ command.response_class = Google::Apis::ClassroomV1::Empty
2026
+ command.params['studentId'] = student_id unless student_id.nil?
2027
+ command.params['guardianId'] = guardian_id unless guardian_id.nil?
2050
2028
  command.query['fields'] = fields unless fields.nil?
2051
2029
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2052
2030
  execute_or_queue_command(command, &block)
2053
2031
  end
2054
2032
 
2055
- # Returns a teacher of a course.
2033
+ # Returns a specific guardian.
2056
2034
  # This method returns the following error codes:
2057
- # * `PERMISSION_DENIED` if the requesting user is not permitted to view
2058
- # teachers of this course or for access errors.
2059
- # * `NOT_FOUND` if no teacher of this course has the requested ID or if the
2060
- # course does not exist.
2061
- # @param [String] course_id
2062
- # Identifier of the course.
2063
- # This identifier can be either the Classroom-assigned identifier or an
2064
- # alias.
2065
- # @param [String] user_id
2066
- # Identifier of the teacher to return. The identifier can be one of the
2067
- # following:
2035
+ # * `PERMISSION_DENIED` if no user that matches the provided `student_id`
2036
+ # is visible to the requesting user, if the requesting user is not
2037
+ # permitted to view guardian information for the student identified by the
2038
+ # `student_id`, if guardians are not enabled for the domain in question,
2039
+ # or for other access errors.
2040
+ # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
2041
+ # be recognized (it is not an email address, nor a `student_id` from the
2042
+ # API, nor the literal string `me`).
2043
+ # * `NOT_FOUND` if the requesting user is permitted to view guardians for
2044
+ # the requested `student_id`, but no `Guardian` record exists for that
2045
+ # student that matches the provided `guardian_id`.
2046
+ # @param [String] student_id
2047
+ # The student whose guardian is being requested. One of the following:
2068
2048
  # * the numeric identifier for the user
2069
2049
  # * the email address of the user
2070
2050
  # * the string literal `"me"`, indicating the requesting user
2051
+ # @param [String] guardian_id
2052
+ # The `id` field from a `Guardian`.
2071
2053
  # @param [String] fields
2072
2054
  # Selector specifying which fields to include in a partial response.
2073
2055
  # @param [String] quota_user
@@ -2077,43 +2059,65 @@ module Google
2077
2059
  # Request-specific options
2078
2060
  #
2079
2061
  # @yield [result, err] Result & error if block supplied
2080
- # @yieldparam result [Google::Apis::ClassroomV1::Teacher] parsed result object
2062
+ # @yieldparam result [Google::Apis::ClassroomV1::Guardian] parsed result object
2081
2063
  # @yieldparam err [StandardError] error object if request failed
2082
2064
  #
2083
- # @return [Google::Apis::ClassroomV1::Teacher]
2065
+ # @return [Google::Apis::ClassroomV1::Guardian]
2084
2066
  #
2085
2067
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2086
2068
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2087
2069
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2088
- def get_course_teacher(course_id, user_id, fields: nil, quota_user: nil, options: nil, &block)
2089
- command = make_simple_command(:get, 'v1/courses/{courseId}/teachers/{userId}', options)
2090
- command.response_representation = Google::Apis::ClassroomV1::Teacher::Representation
2091
- command.response_class = Google::Apis::ClassroomV1::Teacher
2092
- command.params['courseId'] = course_id unless course_id.nil?
2093
- command.params['userId'] = user_id unless user_id.nil?
2070
+ def get_user_profile_guardian(student_id, guardian_id, fields: nil, quota_user: nil, options: nil, &block)
2071
+ command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options)
2072
+ command.response_representation = Google::Apis::ClassroomV1::Guardian::Representation
2073
+ command.response_class = Google::Apis::ClassroomV1::Guardian
2074
+ command.params['studentId'] = student_id unless student_id.nil?
2075
+ command.params['guardianId'] = guardian_id unless guardian_id.nil?
2094
2076
  command.query['fields'] = fields unless fields.nil?
2095
2077
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2096
2078
  execute_or_queue_command(command, &block)
2097
2079
  end
2098
2080
 
2099
- # Creates a teacher of a course.
2081
+ # Returns a list of guardians that the requesting user is permitted to
2082
+ # view, restricted to those that match the request.
2083
+ # To list guardians for any student that the requesting user may view
2084
+ # guardians for, use the literal character `-` for the student ID.
2100
2085
  # This method returns the following error codes:
2101
- # * `PERMISSION_DENIED` if the requesting user is not permitted to create
2102
- # teachers in this course or for access errors.
2103
- # * `NOT_FOUND` if the requested course ID does not exist.
2104
- # * `FAILED_PRECONDITION` if the requested user's account is disabled,
2105
- # for the following request errors:
2106
- # * CourseMemberLimitReached
2107
- # * CourseNotModifiable
2108
- # * CourseTeacherLimitReached
2109
- # * UserGroupsMembershipLimitReached
2110
- # * `ALREADY_EXISTS` if the user is already a teacher or student in the
2111
- # course.
2112
- # @param [String] course_id
2113
- # Identifier of the course.
2114
- # This identifier can be either the Classroom-assigned identifier or an
2115
- # alias.
2116
- # @param [Google::Apis::ClassroomV1::Teacher] teacher_object
2086
+ # * `PERMISSION_DENIED` if a `student_id` is specified, and the requesting
2087
+ # user is not permitted to view guardian information for that student, if
2088
+ # `"-"` is specified as the `student_id` and the user is not a domain
2089
+ # administrator, if guardians are not enabled for the domain in question,
2090
+ # if the `invited_email_address` filter is set by a user who is not a
2091
+ # domain administrator, or for other access errors.
2092
+ # * `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot
2093
+ # be recognized (it is not an email address, nor a `student_id` from the
2094
+ # API, nor the literal string `me`). May also be returned if an invalid
2095
+ # `page_token` is provided.
2096
+ # * `NOT_FOUND` if a `student_id` is specified, and its format can be
2097
+ # recognized, but Classroom has no record of that student.
2098
+ # @param [String] student_id
2099
+ # Filter results by the student who the guardian is linked to.
2100
+ # The identifier can be one of the following:
2101
+ # * the numeric identifier for the user
2102
+ # * the email address of the user
2103
+ # * the string literal `"me"`, indicating the requesting user
2104
+ # * the string literal `"-"`, indicating that results should be returned for
2105
+ # all students that the requesting user has access to view.
2106
+ # @param [String] invited_email_address
2107
+ # Filter results by the email address that the original invitation was sent
2108
+ # to, resulting in this guardian link.
2109
+ # This filter can only be used by domain administrators.
2110
+ # @param [Fixnum] page_size
2111
+ # Maximum number of items to return. Zero or unspecified indicates that the
2112
+ # server may assign a maximum.
2113
+ # The server may return fewer than the specified number of results.
2114
+ # @param [String] page_token
2115
+ # nextPageToken
2116
+ # value returned from a previous
2117
+ # list call,
2118
+ # indicating that the subsequent page of results should be returned.
2119
+ # The list request
2120
+ # must be otherwise identical to the one that resulted in this token.
2117
2121
  # @param [String] fields
2118
2122
  # Selector specifying which fields to include in a partial response.
2119
2123
  # @param [String] quota_user
@@ -2123,21 +2127,22 @@ module Google
2123
2127
  # Request-specific options
2124
2128
  #
2125
2129
  # @yield [result, err] Result & error if block supplied
2126
- # @yieldparam result [Google::Apis::ClassroomV1::Teacher] parsed result object
2130
+ # @yieldparam result [Google::Apis::ClassroomV1::ListGuardiansResponse] parsed result object
2127
2131
  # @yieldparam err [StandardError] error object if request failed
2128
2132
  #
2129
- # @return [Google::Apis::ClassroomV1::Teacher]
2133
+ # @return [Google::Apis::ClassroomV1::ListGuardiansResponse]
2130
2134
  #
2131
2135
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2132
2136
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2133
2137
  # @raise [Google::Apis::AuthorizationError] Authorization is required
2134
- def create_course_teacher(course_id, teacher_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2135
- command = make_simple_command(:post, 'v1/courses/{courseId}/teachers', options)
2136
- command.request_representation = Google::Apis::ClassroomV1::Teacher::Representation
2137
- command.request_object = teacher_object
2138
- command.response_representation = Google::Apis::ClassroomV1::Teacher::Representation
2139
- command.response_class = Google::Apis::ClassroomV1::Teacher
2140
- command.params['courseId'] = course_id unless course_id.nil?
2138
+ def list_user_profile_guardians(student_id, invited_email_address: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
2139
+ command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians', options)
2140
+ command.response_representation = Google::Apis::ClassroomV1::ListGuardiansResponse::Representation
2141
+ command.response_class = Google::Apis::ClassroomV1::ListGuardiansResponse
2142
+ command.params['studentId'] = student_id unless student_id.nil?
2143
+ command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil?
2144
+ command.query['pageSize'] = page_size unless page_size.nil?
2145
+ command.query['pageToken'] = page_token unless page_token.nil?
2141
2146
  command.query['fields'] = fields unless fields.nil?
2142
2147
  command.query['quotaUser'] = quota_user unless quota_user.nil?
2143
2148
  execute_or_queue_command(command, &block)