google-api-client 0.9.8 → 0.9.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (197) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/Gemfile +9 -1
  4. data/README.md +10 -2
  5. data/api_names.yaml +61 -110
  6. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  7. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +160 -9
  8. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +46 -0
  9. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +22 -8
  10. data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
  11. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
  12. data/generated/google/apis/admin_directory_v1.rb +1 -1
  13. data/generated/google/apis/admin_directory_v1/classes.rb +6 -0
  14. data/generated/google/apis/admin_directory_v1/representations.rb +1 -0
  15. data/generated/google/apis/admin_directory_v1/service.rb +2 -2
  16. data/generated/google/apis/admin_reports_v1.rb +3 -3
  17. data/generated/google/apis/admin_reports_v1/service.rb +2 -2
  18. data/generated/google/apis/adsense_v1_4.rb +1 -1
  19. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  20. data/generated/google/apis/analytics_v3.rb +1 -1
  21. data/generated/google/apis/analytics_v3/classes.rb +371 -1
  22. data/generated/google/apis/analytics_v3/representations.rb +135 -0
  23. data/generated/google/apis/analytics_v3/service.rb +218 -0
  24. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  25. data/generated/google/apis/analyticsreporting_v4/classes.rb +50 -22
  26. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  27. data/generated/google/apis/androidenterprise_v1/classes.rb +722 -48
  28. data/generated/google/apis/androidenterprise_v1/representations.rb +305 -0
  29. data/generated/google/apis/androidenterprise_v1/service.rb +1180 -146
  30. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  31. data/generated/google/apis/androidpublisher_v2/classes.rb +9 -8
  32. data/generated/google/apis/appengine_v1beta5.rb +1 -1
  33. data/generated/google/apis/appengine_v1beta5/classes.rb +430 -288
  34. data/generated/google/apis/appengine_v1beta5/representations.rb +84 -10
  35. data/generated/google/apis/appengine_v1beta5/service.rb +285 -25
  36. data/generated/google/apis/appsactivity_v1.rb +1 -1
  37. data/generated/google/apis/appstate_v1.rb +1 -1
  38. data/generated/google/apis/bigquery_v2.rb +1 -1
  39. data/generated/google/apis/bigquery_v2/classes.rb +254 -6
  40. data/generated/google/apis/bigquery_v2/representations.rb +85 -0
  41. data/generated/google/apis/bigquery_v2/service.rb +8 -2
  42. data/generated/google/apis/books_v1.rb +2 -2
  43. data/generated/google/apis/books_v1/classes.rb +77 -0
  44. data/generated/google/apis/books_v1/representations.rb +34 -0
  45. data/generated/google/apis/books_v1/service.rb +7 -3
  46. data/generated/google/apis/calendar_v3.rb +1 -1
  47. data/generated/google/apis/civicinfo_v2.rb +3 -2
  48. data/generated/google/apis/civicinfo_v2/classes.rb +16 -4
  49. data/generated/google/apis/civicinfo_v2/representations.rb +2 -0
  50. data/generated/google/apis/civicinfo_v2/service.rb +8 -2
  51. data/generated/google/apis/classroom_v1.rb +1 -1
  52. data/generated/google/apis/classroom_v1/classes.rb +176 -37
  53. data/generated/google/apis/classroom_v1/representations.rb +73 -9
  54. data/generated/google/apis/classroom_v1/service.rb +392 -37
  55. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  56. data/generated/google/apis/cloudbuild_v1/classes.rb +320 -12
  57. data/generated/google/apis/cloudbuild_v1/representations.rb +136 -2
  58. data/generated/google/apis/cloudbuild_v1/service.rb +174 -1
  59. data/generated/google/apis/clouddebugger_v2.rb +3 -6
  60. data/generated/google/apis/clouddebugger_v2/service.rb +4 -4
  61. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  62. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  63. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +157 -3
  64. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +33 -0
  65. data/generated/google/apis/cloudresourcemanager_v1/service.rb +60 -21
  66. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  67. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +22 -5
  68. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +2 -0
  69. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +61 -39
  70. data/generated/google/apis/compute_beta.rb +1 -1
  71. data/generated/google/apis/compute_beta/classes.rb +1620 -199
  72. data/generated/google/apis/compute_beta/representations.rb +563 -0
  73. data/generated/google/apis/compute_beta/service.rb +5123 -2690
  74. data/generated/google/apis/compute_v1.rb +1 -1
  75. data/generated/google/apis/compute_v1/classes.rb +1717 -295
  76. data/generated/google/apis/compute_v1/representations.rb +536 -0
  77. data/generated/google/apis/compute_v1/service.rb +2038 -1041
  78. data/generated/google/apis/content_v2.rb +1 -1
  79. data/generated/google/apis/content_v2/classes.rb +709 -1
  80. data/generated/google/apis/content_v2/representations.rb +319 -0
  81. data/generated/google/apis/content_v2/service.rb +244 -0
  82. data/generated/google/apis/datastore_v1.rb +38 -0
  83. data/generated/google/apis/datastore_v1/classes.rb +1284 -0
  84. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  85. data/generated/google/apis/datastore_v1/service.rb +259 -0
  86. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  87. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  88. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  89. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  90. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  91. data/generated/google/apis/deploymentmanager_v2/classes.rb +384 -2
  92. data/generated/google/apis/deploymentmanager_v2/representations.rb +161 -0
  93. data/generated/google/apis/deploymentmanager_v2/service.rb +162 -50
  94. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  95. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  96. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  97. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  98. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  99. data/generated/google/apis/dfareporting_v2_6/classes.rb +11585 -0
  100. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  101. data/generated/google/apis/dfareporting_v2_6/service.rb +9006 -0
  102. data/generated/google/apis/dns_v1.rb +1 -1
  103. data/generated/google/apis/dns_v1/classes.rb +1 -1
  104. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  105. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  106. data/generated/google/apis/drive_v2.rb +1 -1
  107. data/generated/google/apis/drive_v2/classes.rb +11 -3
  108. data/generated/google/apis/drive_v2/representations.rb +2 -0
  109. data/generated/google/apis/drive_v2/service.rb +8 -2
  110. data/generated/google/apis/drive_v3.rb +1 -1
  111. data/generated/google/apis/drive_v3/classes.rb +36 -16
  112. data/generated/google/apis/drive_v3/representations.rb +2 -0
  113. data/generated/google/apis/drive_v3/service.rb +4 -1
  114. data/generated/google/apis/fitness_v1.rb +8 -2
  115. data/generated/google/apis/fitness_v1/classes.rb +64 -6
  116. data/generated/google/apis/fitness_v1/representations.rb +20 -0
  117. data/generated/google/apis/fitness_v1/service.rb +17 -18
  118. data/generated/google/apis/fusiontables_v2.rb +1 -1
  119. data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
  120. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  121. data/generated/google/apis/games_management_v1management.rb +1 -1
  122. data/generated/google/apis/games_v1.rb +1 -1
  123. data/generated/google/apis/genomics_v1.rb +2 -4
  124. data/generated/google/apis/genomics_v1/classes.rb +111 -9
  125. data/generated/google/apis/genomics_v1/representations.rb +36 -0
  126. data/generated/google/apis/genomics_v1/service.rb +4 -7
  127. data/generated/google/apis/gmail_v1.rb +7 -1
  128. data/generated/google/apis/gmail_v1/classes.rb +540 -0
  129. data/generated/google/apis/gmail_v1/representations.rb +213 -0
  130. data/generated/google/apis/gmail_v1/service.rb +898 -1
  131. data/generated/google/apis/groupssettings_v1.rb +1 -1
  132. data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
  133. data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
  134. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  135. data/generated/google/apis/identitytoolkit_v3/classes.rb +154 -1
  136. data/generated/google/apis/identitytoolkit_v3/representations.rb +35 -0
  137. data/generated/google/apis/language_v1beta1.rb +36 -0
  138. data/generated/google/apis/language_v1beta1/classes.rb +596 -0
  139. data/generated/google/apis/language_v1beta1/representations.rb +289 -0
  140. data/generated/google/apis/language_v1beta1/service.rb +154 -0
  141. data/generated/google/apis/mirror_v1.rb +2 -2
  142. data/generated/google/apis/mirror_v1/service.rb +1 -1
  143. data/generated/google/apis/monitoring_v3.rb +45 -0
  144. data/generated/google/apis/monitoring_v3/classes.rb +1328 -0
  145. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  146. data/generated/google/apis/monitoring_v3/service.rb +711 -0
  147. data/generated/google/apis/oauth2_v2.rb +1 -1
  148. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  149. data/generated/google/apis/plus_domains_v1.rb +1 -1
  150. data/generated/google/apis/plus_v1.rb +1 -1
  151. data/generated/google/apis/qpx_express_v1.rb +1 -1
  152. data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
  153. data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
  154. data/generated/google/apis/replicapool_v1beta2.rb +1 -1
  155. data/generated/google/apis/script_v1.rb +1 -1
  156. data/generated/google/apis/script_v1/classes.rb +6 -0
  157. data/generated/google/apis/script_v1/representations.rb +1 -0
  158. data/generated/google/apis/sheets_v4.rb +1 -1
  159. data/generated/google/apis/sheets_v4/classes.rb +35 -0
  160. data/generated/google/apis/sheets_v4/representations.rb +16 -0
  161. data/generated/google/apis/sheets_v4/service.rb +55 -0
  162. data/generated/google/apis/speech_v1beta1.rb +34 -0
  163. data/generated/google/apis/speech_v1beta1/classes.rb +521 -0
  164. data/generated/google/apis/speech_v1beta1/representations.rb +219 -0
  165. data/generated/google/apis/speech_v1beta1/service.rb +268 -0
  166. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  167. data/generated/google/apis/sqladmin_v1beta4/classes.rb +26 -8
  168. data/generated/google/apis/sqladmin_v1beta4/representations.rb +2 -0
  169. data/generated/google/apis/sqladmin_v1beta4/service.rb +42 -0
  170. data/generated/google/apis/storage_v1.rb +1 -1
  171. data/generated/google/apis/storage_v1/classes.rb +19 -10
  172. data/generated/google/apis/translate_v2.rb +2 -2
  173. data/generated/google/apis/translate_v2/service.rb +1 -1
  174. data/generated/google/apis/vision_v1.rb +1 -1
  175. data/generated/google/apis/vision_v1/classes.rb +10 -9
  176. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  177. data/generated/google/apis/youtube_partner_v1/classes.rb +6 -0
  178. data/generated/google/apis/youtube_partner_v1/representations.rb +2 -0
  179. data/generated/google/apis/youtube_partner_v1/service.rb +15 -3
  180. data/generated/google/apis/youtube_v3.rb +1 -1
  181. data/generated/google/apis/youtube_v3/classes.rb +163 -2
  182. data/generated/google/apis/youtube_v3/representations.rb +82 -0
  183. data/generated/google/apis/youtube_v3/service.rb +6 -2
  184. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  185. data/google-api-client.gemspec +2 -1
  186. data/lib/google/apis/core/api_command.rb +4 -0
  187. data/lib/google/apis/core/base_service.rb +10 -4
  188. data/lib/google/apis/core/download.rb +7 -2
  189. data/lib/google/apis/core/http_command.rb +5 -1
  190. data/lib/google/apis/core/upload.rb +7 -1
  191. data/lib/google/apis/errors.rb +2 -2
  192. data/lib/google/apis/generator/annotator.rb +6 -0
  193. data/lib/google/apis/version.rb +1 -1
  194. data/samples/cli/lib/samples/bigquery.rb +101 -0
  195. data/samples/cli/lib/samples/sheets.rb +61 -0
  196. data/sync.rb +71 -0
  197. metadata +43 -13
@@ -980,9 +980,9 @@ module Google
980
980
  # Identifier of the course. This identifier can be either the Classroom-assigned
981
981
  # identifier or an alias.
982
982
  # @param [String] course_work_id
983
- # Identifer of the student work to request. If `user_id` is specified, this may
984
- # be set to the string literal `"-"` to request student work for all course work
985
- # in the specified course.
983
+ # Identifer of the student work to request. This may be set to the string
984
+ # literal `"-"` to request student work for all course work in the specified
985
+ # course.
986
986
  # @param [String] user_id
987
987
  # Optional argument to restrict returned student work to those owned by the
988
988
  # student with the specified identifier. The identifier can be one of the
@@ -1239,6 +1239,395 @@ module Google
1239
1239
  execute_or_queue_command(command, &block)
1240
1240
  end
1241
1241
 
1242
+ # Returns a user profile. This method returns the following error codes: * `
1243
+ # PERMISSION_DENIED` if the requesting user is not permitted to access this user
1244
+ # profile or if no profile exists with the requested ID or for access errors.
1245
+ # @param [String] user_id
1246
+ # Identifier of the profile to return. The identifier can be one of the
1247
+ # following: * the numeric identifier for the user * the email address of the
1248
+ # user * the string literal `"me"`, indicating the requesting user
1249
+ # @param [String] fields
1250
+ # Selector specifying which fields to include in a partial response.
1251
+ # @param [String] quota_user
1252
+ # Available to use for quota purposes for server-side applications. Can be any
1253
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1254
+ # @param [Google::Apis::RequestOptions] options
1255
+ # Request-specific options
1256
+ #
1257
+ # @yield [result, err] Result & error if block supplied
1258
+ # @yieldparam result [Google::Apis::ClassroomV1::UserProfile] parsed result object
1259
+ # @yieldparam err [StandardError] error object if request failed
1260
+ #
1261
+ # @return [Google::Apis::ClassroomV1::UserProfile]
1262
+ #
1263
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1264
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1265
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1266
+ def get_user_profile(user_id, fields: nil, quota_user: nil, options: nil, &block)
1267
+ command = make_simple_command(:get, 'v1/userProfiles/{userId}', options)
1268
+ command.response_representation = Google::Apis::ClassroomV1::UserProfile::Representation
1269
+ command.response_class = Google::Apis::ClassroomV1::UserProfile
1270
+ command.params['userId'] = user_id unless user_id.nil?
1271
+ command.query['fields'] = fields unless fields.nil?
1272
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1273
+ execute_or_queue_command(command, &block)
1274
+ end
1275
+
1276
+ # Returns a list of guardian invitations that the requesting user is permitted
1277
+ # to view, filtered by the parameters provided. This method returns the
1278
+ # following error codes: * `PERMISSION_DENIED` if a `student_id` is specified,
1279
+ # and the requesting user is not permitted to view guardian invitations for that
1280
+ # student, if guardians are not enabled for the domain in question, or for other
1281
+ # access errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its
1282
+ # format cannot be recognized (it is not an email address, nor a `student_id`
1283
+ # from the API, nor the literal string `me`). May also be returned if an invalid
1284
+ # `page_token` or `state` is provided. * `NOT_FOUND` if a `student_id` is
1285
+ # specified, and its format can be recognized, but Classroom has no record of
1286
+ # that student.
1287
+ # @param [String] student_id
1288
+ # The ID of the student whose guardian invitations are to be returned. The
1289
+ # identifier can be one of the following: * the numeric identifier for the user *
1290
+ # the email address of the user * the string literal `"me"`, indicating the
1291
+ # requesting user
1292
+ # @param [String] invited_email_address
1293
+ # If specified, only results with the specified `invited_email_address` will be
1294
+ # returned.
1295
+ # @param [Array<String>, String] states
1296
+ # If specified, only results with the specified `state` values will be returned.
1297
+ # Otherwise, results with a `state` of `PENDING` will be returned.
1298
+ # @param [String] page_token
1299
+ # nextPageToken value returned from a previous list call, indicating that the
1300
+ # subsequent page of results should be returned. The list request must be
1301
+ # otherwise identical to the one that resulted in this token.
1302
+ # @param [Fixnum] page_size
1303
+ # Maximum number of items to return. Zero or unspecified indicates that the
1304
+ # server may assign a maximum. The server may return fewer than the specified
1305
+ # number of results.
1306
+ # @param [String] fields
1307
+ # Selector specifying which fields to include in a partial response.
1308
+ # @param [String] quota_user
1309
+ # Available to use for quota purposes for server-side applications. Can be any
1310
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1311
+ # @param [Google::Apis::RequestOptions] options
1312
+ # Request-specific options
1313
+ #
1314
+ # @yield [result, err] Result & error if block supplied
1315
+ # @yieldparam result [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse] parsed result object
1316
+ # @yieldparam err [StandardError] error object if request failed
1317
+ #
1318
+ # @return [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse]
1319
+ #
1320
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1321
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1322
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1323
+ def list_user_profile_guardian_invitations(student_id, invited_email_address: nil, states: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1324
+ command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations', options)
1325
+ command.response_representation = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse::Representation
1326
+ command.response_class = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse
1327
+ command.params['studentId'] = student_id unless student_id.nil?
1328
+ command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil?
1329
+ command.query['states'] = states unless states.nil?
1330
+ command.query['pageToken'] = page_token unless page_token.nil?
1331
+ command.query['pageSize'] = page_size unless page_size.nil?
1332
+ command.query['fields'] = fields unless fields.nil?
1333
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1334
+ execute_or_queue_command(command, &block)
1335
+ end
1336
+
1337
+ # Returns a specific guardian invitation. This method returns the following
1338
+ # error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
1339
+ # view guardian invitations for the student identified by the `student_id`, if
1340
+ # guardians are not enabled for the domain in question, or for other access
1341
+ # errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format
1342
+ # cannot be recognized (it is not an email address, nor a `student_id` from the
1343
+ # API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any
1344
+ # record of the given student or `invitation_id`. May also be returned if the
1345
+ # student exists, but the requesting user does not have access to see that
1346
+ # student.
1347
+ # @param [String] student_id
1348
+ # The ID of the student whose guardian invitation is being requested.
1349
+ # @param [String] invitation_id
1350
+ # The `id` field of the `GuardianInvitation` being requested.
1351
+ # @param [String] fields
1352
+ # Selector specifying which fields to include in a partial response.
1353
+ # @param [String] quota_user
1354
+ # Available to use for quota purposes for server-side applications. Can be any
1355
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1356
+ # @param [Google::Apis::RequestOptions] options
1357
+ # Request-specific options
1358
+ #
1359
+ # @yield [result, err] Result & error if block supplied
1360
+ # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
1361
+ # @yieldparam err [StandardError] error object if request failed
1362
+ #
1363
+ # @return [Google::Apis::ClassroomV1::GuardianInvitation]
1364
+ #
1365
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1366
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1367
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1368
+ def get_user_profile_guardian_invitation(student_id, invitation_id, fields: nil, quota_user: nil, options: nil, &block)
1369
+ command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options)
1370
+ command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
1371
+ command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
1372
+ command.params['studentId'] = student_id unless student_id.nil?
1373
+ command.params['invitationId'] = invitation_id unless invitation_id.nil?
1374
+ command.query['fields'] = fields unless fields.nil?
1375
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1376
+ execute_or_queue_command(command, &block)
1377
+ end
1378
+
1379
+ # Creates a guardian invitation, and sends an email to the guardian asking them
1380
+ # to confirm that they are the student's guardian. Once the guardian accepts the
1381
+ # invitation, their `state` will change to `COMPLETED` and they will start
1382
+ # receiving guardian notifications. A `Guardian` resource will also be created
1383
+ # to represent the active guardian. The request object must have the `student_id`
1384
+ # and `invited_email_address` fields set. Failing to set these fields, or
1385
+ # setting any other fields in the request, will result in an error. This method
1386
+ # returns the following error codes: * `PERMISSION_DENIED` if the current user
1387
+ # does not have permission to manage guardians, if the guardian in question has
1388
+ # already rejected too many requests for that student, if guardians are not
1389
+ # enabled for the domain in question, or for other access errors. * `
1390
+ # RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian link
1391
+ # limit. * `INVALID_ARGUMENT` if the guardian email address is not valid (for
1392
+ # example, if it is too long), or if the format of the student ID provided
1393
+ # cannot be recognized (it is not an email address, nor a `user_id` from this
1394
+ # API). This error will also be returned if read-only fields are set, or if the `
1395
+ # state` field is set to to a value other than `PENDING`. * `NOT_FOUND` if the
1396
+ # student ID provided is a valid student ID, but Classroom has no record of that
1397
+ # student. * `ALREADY_EXISTS` if there is already a pending guardian invitation
1398
+ # for the student and `invited_email_address` provided, or if the provided `
1399
+ # invited_email_address` matches the Google account of an existing `Guardian`
1400
+ # for this user.
1401
+ # @param [String] student_id
1402
+ # ID of the student (in standard format)
1403
+ # @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object
1404
+ # @param [String] fields
1405
+ # Selector specifying which fields to include in a partial response.
1406
+ # @param [String] quota_user
1407
+ # Available to use for quota purposes for server-side applications. Can be any
1408
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1409
+ # @param [Google::Apis::RequestOptions] options
1410
+ # Request-specific options
1411
+ #
1412
+ # @yield [result, err] Result & error if block supplied
1413
+ # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
1414
+ # @yieldparam err [StandardError] error object if request failed
1415
+ #
1416
+ # @return [Google::Apis::ClassroomV1::GuardianInvitation]
1417
+ #
1418
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1419
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1420
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1421
+ def create_user_profile_guardian_invitation(student_id, guardian_invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1422
+ command = make_simple_command(:post, 'v1/userProfiles/{studentId}/guardianInvitations', options)
1423
+ command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
1424
+ command.request_object = guardian_invitation_object
1425
+ command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
1426
+ command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
1427
+ command.params['studentId'] = student_id unless student_id.nil?
1428
+ command.query['fields'] = fields unless fields.nil?
1429
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1430
+ execute_or_queue_command(command, &block)
1431
+ end
1432
+
1433
+ # Modifies a guardian invitation. Currently, the only valid modification is to
1434
+ # change the `state` from `PENDING` to `COMPLETE`. This has the effect of
1435
+ # withdrawing the invitation. This method returns the following error codes: * `
1436
+ # PERMISSION_DENIED` if the current user does not have permission to manage
1437
+ # guardians, if guardians are not enabled for the domain in question or for
1438
+ # other access errors. * `FAILED_PRECONDITION` if the guardian link is not in
1439
+ # the `PENDING` state. * `INVALID_ARGUMENT` if the format of the student ID
1440
+ # provided cannot be recognized (it is not an email address, nor a `user_id`
1441
+ # from this API), or if the passed `GuardianInvitation` has a `state` other than
1442
+ # `COMPLETE`, or if it modifies fields other than `state`. * `NOT_FOUND` if the
1443
+ # student ID provided is a valid student ID, but Classroom has no record of that
1444
+ # student, or if the `id` field does not refer to a guardian invitation known to
1445
+ # Classroom.
1446
+ # @param [String] student_id
1447
+ # The ID of the student whose guardian invitation is to be modified.
1448
+ # @param [String] invitation_id
1449
+ # The `id` field of the `GuardianInvitation` to be modified.
1450
+ # @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object
1451
+ # @param [String] update_mask
1452
+ # Mask that identifies which fields on the course to update. This field is
1453
+ # required to do an update. The update will fail if invalid fields are specified.
1454
+ # The following fields are valid: * `state` When set in a query parameter, this
1455
+ # field should be specified as `updateMask=,,...`
1456
+ # @param [String] fields
1457
+ # Selector specifying which fields to include in a partial response.
1458
+ # @param [String] quota_user
1459
+ # Available to use for quota purposes for server-side applications. Can be any
1460
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1461
+ # @param [Google::Apis::RequestOptions] options
1462
+ # Request-specific options
1463
+ #
1464
+ # @yield [result, err] Result & error if block supplied
1465
+ # @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
1466
+ # @yieldparam err [StandardError] error object if request failed
1467
+ #
1468
+ # @return [Google::Apis::ClassroomV1::GuardianInvitation]
1469
+ #
1470
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1471
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1472
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1473
+ 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)
1474
+ command = make_simple_command(:patch, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options)
1475
+ command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
1476
+ command.request_object = guardian_invitation_object
1477
+ command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
1478
+ command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
1479
+ command.params['studentId'] = student_id unless student_id.nil?
1480
+ command.params['invitationId'] = invitation_id unless invitation_id.nil?
1481
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1482
+ command.query['fields'] = fields unless fields.nil?
1483
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1484
+ execute_or_queue_command(command, &block)
1485
+ end
1486
+
1487
+ # Returns a list of guardians that the requesting user is permitted to view,
1488
+ # restricted to those that match the request. This method returns the following
1489
+ # error codes: * `PERMISSION_DENIED` if a `student_id` is specified, and the
1490
+ # requesting user is not permitted to view guardian information for that student,
1491
+ # if guardians are not enabled for the domain in question, if the `
1492
+ # invited_email_address` filter is set by a user who is not a domain
1493
+ # administrator, or for other access errors. * `INVALID_ARGUMENT` if a `
1494
+ # student_id` is specified, but its format cannot be recognized (it is not an
1495
+ # email address, nor a `student_id` from the API, nor the literal string `me`).
1496
+ # May also be returned if an invalid `page_token` is provided. * `NOT_FOUND` if
1497
+ # a `student_id` is specified, and its format can be recognized, but Classroom
1498
+ # has no record of that student.
1499
+ # @param [String] student_id
1500
+ # Filter results by the student who the guardian is linked to. The identifier
1501
+ # can be one of the following: * the numeric identifier for the user * the email
1502
+ # address of the user * the string literal `"me"`, indicating the requesting
1503
+ # user
1504
+ # @param [String] invited_email_address
1505
+ # Filter results by the email address that the original invitation was sent to,
1506
+ # resulting in this guardian link. This filter can only be used by domain
1507
+ # administrators.
1508
+ # @param [String] page_token
1509
+ # nextPageToken value returned from a previous list call, indicating that the
1510
+ # subsequent page of results should be returned. The list request must be
1511
+ # otherwise identical to the one that resulted in this token.
1512
+ # @param [Fixnum] page_size
1513
+ # Maximum number of items to return. Zero or unspecified indicates that the
1514
+ # server may assign a maximum. The server may return fewer than the specified
1515
+ # number of results.
1516
+ # @param [String] fields
1517
+ # Selector specifying which fields to include in a partial response.
1518
+ # @param [String] quota_user
1519
+ # Available to use for quota purposes for server-side applications. Can be any
1520
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1521
+ # @param [Google::Apis::RequestOptions] options
1522
+ # Request-specific options
1523
+ #
1524
+ # @yield [result, err] Result & error if block supplied
1525
+ # @yieldparam result [Google::Apis::ClassroomV1::ListGuardiansResponse] parsed result object
1526
+ # @yieldparam err [StandardError] error object if request failed
1527
+ #
1528
+ # @return [Google::Apis::ClassroomV1::ListGuardiansResponse]
1529
+ #
1530
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1531
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1532
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1533
+ def list_user_profile_guardians(student_id, invited_email_address: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1534
+ command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians', options)
1535
+ command.response_representation = Google::Apis::ClassroomV1::ListGuardiansResponse::Representation
1536
+ command.response_class = Google::Apis::ClassroomV1::ListGuardiansResponse
1537
+ command.params['studentId'] = student_id unless student_id.nil?
1538
+ command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil?
1539
+ command.query['pageToken'] = page_token unless page_token.nil?
1540
+ command.query['pageSize'] = page_size unless page_size.nil?
1541
+ command.query['fields'] = fields unless fields.nil?
1542
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1543
+ execute_or_queue_command(command, &block)
1544
+ end
1545
+
1546
+ # Returns a specific guardian. This method returns the following error codes: * `
1547
+ # PERMISSION_DENIED` if the requesting user is not permitted to view guardian
1548
+ # information for the student identified by the `student_id`, if guardians are
1549
+ # not enabled for the domain in question, or for other access errors. * `
1550
+ # INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be
1551
+ # recognized (it is not an email address, nor a `student_id` from the API, nor
1552
+ # the literal string `me`). * `NOT_FOUND` if Classroom cannot find any record of
1553
+ # the given student or `guardian_id`, or if the guardian has been disabled.
1554
+ # @param [String] student_id
1555
+ # The student whose guardian is being requested. One of the following: * the
1556
+ # numeric identifier for the user * the email address of the user * the string
1557
+ # literal `"me"`, indicating the requesting user
1558
+ # @param [String] guardian_id
1559
+ # The `id` field from a `Guardian`.
1560
+ # @param [String] fields
1561
+ # Selector specifying which fields to include in a partial response.
1562
+ # @param [String] quota_user
1563
+ # Available to use for quota purposes for server-side applications. Can be any
1564
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1565
+ # @param [Google::Apis::RequestOptions] options
1566
+ # Request-specific options
1567
+ #
1568
+ # @yield [result, err] Result & error if block supplied
1569
+ # @yieldparam result [Google::Apis::ClassroomV1::Guardian] parsed result object
1570
+ # @yieldparam err [StandardError] error object if request failed
1571
+ #
1572
+ # @return [Google::Apis::ClassroomV1::Guardian]
1573
+ #
1574
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1575
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1576
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1577
+ def get_user_profile_guardian(student_id, guardian_id, fields: nil, quota_user: nil, options: nil, &block)
1578
+ command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options)
1579
+ command.response_representation = Google::Apis::ClassroomV1::Guardian::Representation
1580
+ command.response_class = Google::Apis::ClassroomV1::Guardian
1581
+ command.params['studentId'] = student_id unless student_id.nil?
1582
+ command.params['guardianId'] = guardian_id unless guardian_id.nil?
1583
+ command.query['fields'] = fields unless fields.nil?
1584
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1585
+ execute_or_queue_command(command, &block)
1586
+ end
1587
+
1588
+ # Deletes a guardian. The guardian will no longer receive guardian notifications
1589
+ # and the guardian will no longer be accessible via the API. This method returns
1590
+ # the following error codes: * `PERMISSION_DENIED` if the requesting user is not
1591
+ # permitted to manage guardians for the student identified by the `student_id`,
1592
+ # if guardians are not enabled for the domain in question, or for other access
1593
+ # errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format
1594
+ # cannot be recognized (it is not an email address, nor a `student_id` from the
1595
+ # API). * `NOT_FOUND` if Classroom cannot find any record of the given `
1596
+ # student_id` or `guardian_id`, or if the guardian has already been disabled.
1597
+ # @param [String] student_id
1598
+ # The student whose guardian is to be deleted. One of the following: * the
1599
+ # numeric identifier for the user * the email address of the user * the string
1600
+ # literal `"me"`, indicating the requesting user
1601
+ # @param [String] guardian_id
1602
+ # The `id` field from a `Guardian`.
1603
+ # @param [String] fields
1604
+ # Selector specifying which fields to include in a partial response.
1605
+ # @param [String] quota_user
1606
+ # Available to use for quota purposes for server-side applications. Can be any
1607
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1608
+ # @param [Google::Apis::RequestOptions] options
1609
+ # Request-specific options
1610
+ #
1611
+ # @yield [result, err] Result & error if block supplied
1612
+ # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
1613
+ # @yieldparam err [StandardError] error object if request failed
1614
+ #
1615
+ # @return [Google::Apis::ClassroomV1::Empty]
1616
+ #
1617
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1618
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1619
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1620
+ def delete_user_profile_guardian(student_id, guardian_id, fields: nil, quota_user: nil, options: nil, &block)
1621
+ command = make_simple_command(:delete, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options)
1622
+ command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
1623
+ command.response_class = Google::Apis::ClassroomV1::Empty
1624
+ command.params['studentId'] = student_id unless student_id.nil?
1625
+ command.params['guardianId'] = guardian_id unless guardian_id.nil?
1626
+ command.query['fields'] = fields unless fields.nil?
1627
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1628
+ execute_or_queue_command(command, &block)
1629
+ end
1630
+
1242
1631
  # Creates an invitation. Only one invitation for a user and course may exist at
1243
1632
  # a time. Delete and re-create an invitation to make changes. This method
1244
1633
  # returns the following error codes: * `PERMISSION_DENIED` if the requesting
@@ -1429,40 +1818,6 @@ module Google
1429
1818
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1430
1819
  execute_or_queue_command(command, &block)
1431
1820
  end
1432
-
1433
- # Returns a user profile. This method returns the following error codes: * `
1434
- # PERMISSION_DENIED` if the requesting user is not permitted to access this user
1435
- # profile or if no profile exists with the requested ID or for access errors.
1436
- # @param [String] user_id
1437
- # Identifier of the profile to return. The identifier can be one of the
1438
- # following: * the numeric identifier for the user * the email address of the
1439
- # user * the string literal `"me"`, indicating the requesting user
1440
- # @param [String] fields
1441
- # Selector specifying which fields to include in a partial response.
1442
- # @param [String] quota_user
1443
- # Available to use for quota purposes for server-side applications. Can be any
1444
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1445
- # @param [Google::Apis::RequestOptions] options
1446
- # Request-specific options
1447
- #
1448
- # @yield [result, err] Result & error if block supplied
1449
- # @yieldparam result [Google::Apis::ClassroomV1::UserProfile] parsed result object
1450
- # @yieldparam err [StandardError] error object if request failed
1451
- #
1452
- # @return [Google::Apis::ClassroomV1::UserProfile]
1453
- #
1454
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1455
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1456
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1457
- def get_user_profile(user_id, fields: nil, quota_user: nil, options: nil, &block)
1458
- command = make_simple_command(:get, 'v1/userProfiles/{userId}', options)
1459
- command.response_representation = Google::Apis::ClassroomV1::UserProfile::Representation
1460
- command.response_class = Google::Apis::ClassroomV1::UserProfile
1461
- command.params['userId'] = user_id unless user_id.nil?
1462
- command.query['fields'] = fields unless fields.nil?
1463
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1464
- execute_or_queue_command(command, &block)
1465
- end
1466
1821
 
1467
1822
  protected
1468
1823
 
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://cloud.google.com/container-builder/docs/
26
26
  module CloudbuildV1
27
27
  VERSION = 'V1'
28
- REVISION = '20160525'
28
+ REVISION = '20160920'
29
29
 
30
30
  # View and manage your data across Google Cloud Platform services
31
31
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'