google-api-client 0.9.11 → 0.9.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/Gemfile +1 -1
  4. data/README.md +1 -1
  5. data/api_names.yaml +55 -117
  6. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +76 -8
  7. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +23 -0
  8. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +10 -4
  9. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  10. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
  11. data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
  12. data/generated/google/apis/admin_directory_v1/classes.rb +6 -0
  13. data/generated/google/apis/admin_directory_v1/representations.rb +1 -0
  14. data/generated/google/apis/admin_directory_v1/service.rb +2 -2
  15. data/generated/google/apis/admin_directory_v1.rb +1 -1
  16. data/generated/google/apis/admin_reports_v1/service.rb +2 -2
  17. data/generated/google/apis/admin_reports_v1.rb +3 -3
  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/classes.rb +371 -1
  21. data/generated/google/apis/analytics_v3/representations.rb +135 -0
  22. data/generated/google/apis/analytics_v3/service.rb +218 -0
  23. data/generated/google/apis/analytics_v3.rb +1 -1
  24. data/generated/google/apis/analyticsreporting_v4/classes.rb +18 -8
  25. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  26. data/generated/google/apis/androidenterprise_v1/classes.rb +208 -37
  27. data/generated/google/apis/androidenterprise_v1/representations.rb +83 -0
  28. data/generated/google/apis/androidenterprise_v1/service.rb +469 -20
  29. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  30. data/generated/google/apis/androidpublisher_v2/classes.rb +9 -8
  31. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  32. data/generated/google/apis/appengine_v1beta5/classes.rb +379 -297
  33. data/generated/google/apis/appengine_v1beta5/representations.rb +55 -10
  34. data/generated/google/apis/appengine_v1beta5/service.rb +281 -35
  35. data/generated/google/apis/appengine_v1beta5.rb +1 -1
  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/classes.rb +50 -2
  39. data/generated/google/apis/bigquery_v2/representations.rb +6 -0
  40. data/generated/google/apis/bigquery_v2/service.rb +8 -1
  41. data/generated/google/apis/bigquery_v2.rb +1 -1
  42. data/generated/google/apis/calendar_v3.rb +1 -1
  43. data/generated/google/apis/civicinfo_v2/classes.rb +6 -0
  44. data/generated/google/apis/civicinfo_v2/representations.rb +1 -0
  45. data/generated/google/apis/civicinfo_v2/service.rb +2 -1
  46. data/generated/google/apis/civicinfo_v2.rb +3 -2
  47. data/generated/google/apis/classroom_v1/classes.rb +176 -37
  48. data/generated/google/apis/classroom_v1/representations.rb +73 -9
  49. data/generated/google/apis/classroom_v1/service.rb +392 -37
  50. data/generated/google/apis/classroom_v1.rb +1 -1
  51. data/generated/google/apis/cloudbuild_v1/classes.rb +190 -12
  52. data/generated/google/apis/cloudbuild_v1/representations.rb +73 -2
  53. data/generated/google/apis/cloudbuild_v1/service.rb +170 -0
  54. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  55. data/generated/google/apis/clouddebugger_v2/service.rb +2 -2
  56. data/generated/google/apis/clouddebugger_v2.rb +3 -6
  57. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  58. data/generated/google/apis/compute_beta/classes.rb +599 -77
  59. data/generated/google/apis/compute_beta/representations.rb +240 -0
  60. data/generated/google/apis/compute_beta/service.rb +1999 -710
  61. data/generated/google/apis/compute_beta.rb +1 -1
  62. data/generated/google/apis/compute_v1/classes.rb +140 -58
  63. data/generated/google/apis/compute_v1/representations.rb +17 -0
  64. data/generated/google/apis/compute_v1/service.rb +462 -521
  65. data/generated/google/apis/compute_v1.rb +1 -1
  66. data/generated/google/apis/content_v2/classes.rb +689 -1
  67. data/generated/google/apis/content_v2/representations.rb +316 -0
  68. data/generated/google/apis/content_v2/service.rb +244 -0
  69. data/generated/google/apis/content_v2.rb +1 -1
  70. data/generated/google/apis/datastore_v1beta3/classes.rb +48 -0
  71. data/generated/google/apis/datastore_v1beta3/representations.rb +5 -0
  72. data/generated/google/apis/datastore_v1beta3.rb +1 -1
  73. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  74. data/generated/google/apis/dfareporting_v2_6/classes.rb +11585 -0
  75. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  76. data/generated/google/apis/dfareporting_v2_6/service.rb +9006 -0
  77. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  78. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  79. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  80. data/generated/google/apis/drive_v2/classes.rb +1 -1
  81. data/generated/google/apis/drive_v2.rb +1 -1
  82. data/generated/google/apis/drive_v3.rb +1 -1
  83. data/generated/google/apis/fitness_v1/classes.rb +8 -0
  84. data/generated/google/apis/fitness_v1/representations.rb +1 -0
  85. data/generated/google/apis/fitness_v1/service.rb +2 -2
  86. data/generated/google/apis/fitness_v1.rb +7 -1
  87. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  88. data/generated/google/apis/games_management_v1management.rb +1 -1
  89. data/generated/google/apis/games_v1.rb +1 -1
  90. data/generated/google/apis/genomics_v1/classes.rb +13 -2
  91. data/generated/google/apis/genomics_v1/representations.rb +1 -0
  92. data/generated/google/apis/genomics_v1/service.rb +2 -3
  93. data/generated/google/apis/genomics_v1.rb +1 -1
  94. data/generated/google/apis/gmail_v1/classes.rb +8 -11
  95. data/generated/google/apis/gmail_v1/service.rb +5 -5
  96. data/generated/google/apis/gmail_v1.rb +1 -1
  97. data/generated/google/apis/identitytoolkit_v3/classes.rb +38 -0
  98. data/generated/google/apis/identitytoolkit_v3/representations.rb +6 -0
  99. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  100. data/generated/google/apis/monitoring_v3/classes.rb +340 -421
  101. data/generated/google/apis/monitoring_v3/representations.rb +0 -17
  102. data/generated/google/apis/monitoring_v3/service.rb +136 -168
  103. data/generated/google/apis/monitoring_v3.rb +1 -1
  104. data/generated/google/apis/oauth2_v2.rb +1 -1
  105. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  106. data/generated/google/apis/plus_domains_v1.rb +1 -1
  107. data/generated/google/apis/plus_v1.rb +1 -1
  108. data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
  109. data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
  110. data/generated/google/apis/qpx_express_v1.rb +1 -1
  111. data/generated/google/apis/script_v1/classes.rb +6 -0
  112. data/generated/google/apis/script_v1/representations.rb +1 -0
  113. data/generated/google/apis/script_v1.rb +1 -1
  114. data/generated/google/apis/sheets_v4/classes.rb +35 -0
  115. data/generated/google/apis/sheets_v4/representations.rb +16 -0
  116. data/generated/google/apis/sheets_v4/service.rb +55 -0
  117. data/generated/google/apis/sheets_v4.rb +1 -1
  118. data/generated/google/apis/sqladmin_v1beta4/classes.rb +12 -0
  119. data/generated/google/apis/sqladmin_v1beta4/representations.rb +2 -0
  120. data/generated/google/apis/sqladmin_v1beta4/service.rb +41 -0
  121. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  122. data/generated/google/apis/storage_v1/classes.rb +36 -1
  123. data/generated/google/apis/storage_v1/representations.rb +16 -0
  124. data/generated/google/apis/storage_v1/service.rb +18 -3
  125. data/generated/google/apis/storage_v1.rb +1 -1
  126. data/generated/google/apis/vision_v1.rb +1 -1
  127. data/generated/google/apis/youtube_partner_v1/classes.rb +6 -0
  128. data/generated/google/apis/youtube_partner_v1/representations.rb +2 -0
  129. data/generated/google/apis/youtube_partner_v1/service.rb +15 -3
  130. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  131. data/generated/google/apis/youtube_v3.rb +1 -1
  132. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  133. data/lib/google/apis/generator/annotator.rb +6 -0
  134. data/lib/google/apis/version.rb +1 -1
  135. metadata +6 -3
@@ -94,13 +94,25 @@ module Google
94
94
  include Google::Apis::Core::JsonObjectSupport
95
95
  end
96
96
 
97
- class Invitation
97
+ class ListGuardianInvitationsResponse
98
98
  class Representation < Google::Apis::Core::JsonRepresentation; end
99
99
 
100
100
  include Google::Apis::Core::JsonObjectSupport
101
101
  end
102
102
 
103
- class ListInvitationsResponse
103
+ class GuardianInvitation
104
+ class Representation < Google::Apis::Core::JsonRepresentation; end
105
+
106
+ include Google::Apis::Core::JsonObjectSupport
107
+ end
108
+
109
+ class ListGuardiansResponse
110
+ class Representation < Google::Apis::Core::JsonRepresentation; end
111
+
112
+ include Google::Apis::Core::JsonObjectSupport
113
+ end
114
+
115
+ class Guardian
104
116
  class Representation < Google::Apis::Core::JsonRepresentation; end
105
117
 
106
118
  include Google::Apis::Core::JsonObjectSupport
@@ -148,6 +160,18 @@ module Google
148
160
  include Google::Apis::Core::JsonObjectSupport
149
161
  end
150
162
 
163
+ class Invitation
164
+ class Representation < Google::Apis::Core::JsonRepresentation; end
165
+
166
+ include Google::Apis::Core::JsonObjectSupport
167
+ end
168
+
169
+ class ListInvitationsResponse
170
+ class Representation < Google::Apis::Core::JsonRepresentation; end
171
+
172
+ include Google::Apis::Core::JsonObjectSupport
173
+ end
174
+
151
175
  class CourseWork
152
176
  class Representation < Google::Apis::Core::JsonRepresentation; end
153
177
 
@@ -382,25 +406,46 @@ module Google
382
406
  end
383
407
  end
384
408
 
385
- class Invitation
409
+ class ListGuardianInvitationsResponse
386
410
  # @private
387
411
  class Representation < Google::Apis::Core::JsonRepresentation
388
- property :id, as: 'id'
389
- property :user_id, as: 'userId'
390
- property :course_id, as: 'courseId'
391
- property :role, as: 'role'
412
+ collection :guardian_invitations, as: 'guardianInvitations', class: Google::Apis::ClassroomV1::GuardianInvitation, decorator: Google::Apis::ClassroomV1::GuardianInvitation::Representation
413
+
414
+ property :next_page_token, as: 'nextPageToken'
392
415
  end
393
416
  end
394
417
 
395
- class ListInvitationsResponse
418
+ class GuardianInvitation
396
419
  # @private
397
420
  class Representation < Google::Apis::Core::JsonRepresentation
398
- collection :invitations, as: 'invitations', class: Google::Apis::ClassroomV1::Invitation, decorator: Google::Apis::ClassroomV1::Invitation::Representation
421
+ property :student_id, as: 'studentId'
422
+ property :invitation_id, as: 'invitationId'
423
+ property :invited_email_address, as: 'invitedEmailAddress'
424
+ property :state, as: 'state'
425
+ property :creation_time, as: 'creationTime'
426
+ end
427
+ end
428
+
429
+ class ListGuardiansResponse
430
+ # @private
431
+ class Representation < Google::Apis::Core::JsonRepresentation
432
+ collection :guardians, as: 'guardians', class: Google::Apis::ClassroomV1::Guardian, decorator: Google::Apis::ClassroomV1::Guardian::Representation
399
433
 
400
434
  property :next_page_token, as: 'nextPageToken'
401
435
  end
402
436
  end
403
437
 
438
+ class Guardian
439
+ # @private
440
+ class Representation < Google::Apis::Core::JsonRepresentation
441
+ property :student_id, as: 'studentId'
442
+ property :guardian_id, as: 'guardianId'
443
+ property :guardian_profile, as: 'guardianProfile', class: Google::Apis::ClassroomV1::UserProfile, decorator: Google::Apis::ClassroomV1::UserProfile::Representation
444
+
445
+ property :invited_email_address, as: 'invitedEmailAddress'
446
+ end
447
+ end
448
+
404
449
  class UserProfile
405
450
  # @private
406
451
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -470,6 +515,25 @@ module Google
470
515
  end
471
516
  end
472
517
 
518
+ class Invitation
519
+ # @private
520
+ class Representation < Google::Apis::Core::JsonRepresentation
521
+ property :id, as: 'id'
522
+ property :user_id, as: 'userId'
523
+ property :course_id, as: 'courseId'
524
+ property :role, as: 'role'
525
+ end
526
+ end
527
+
528
+ class ListInvitationsResponse
529
+ # @private
530
+ class Representation < Google::Apis::Core::JsonRepresentation
531
+ collection :invitations, as: 'invitations', class: Google::Apis::ClassroomV1::Invitation, decorator: Google::Apis::ClassroomV1::Invitation::Representation
532
+
533
+ property :next_page_token, as: 'nextPageToken'
534
+ end
535
+ end
536
+
473
537
  class CourseWork
474
538
  # @private
475
539
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -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