google-api-client 0.9.8 → 0.9.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -0
- data/Gemfile +9 -1
- data/README.md +10 -2
- data/api_names.yaml +63 -110
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +298 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +122 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +458 -0
- data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +260 -13
- data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +81 -0
- data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
- data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
- data/generated/google/apis/admin_directory_v1.rb +1 -1
- data/generated/google/apis/admin_directory_v1/classes.rb +86 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +24 -0
- data/generated/google/apis/admin_directory_v1/service.rb +41 -2
- data/generated/google/apis/admin_reports_v1.rb +3 -3
- data/generated/google/apis/admin_reports_v1/service.rb +2 -2
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
- data/generated/google/apis/analytics_v3.rb +1 -1
- data/generated/google/apis/analytics_v3/classes.rb +379 -3
- data/generated/google/apis/analytics_v3/representations.rb +136 -0
- data/generated/google/apis/analytics_v3/service.rb +217 -0
- data/generated/google/apis/analyticsreporting_v4.rb +1 -1
- data/generated/google/apis/analyticsreporting_v4/classes.rb +50 -22
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +813 -49
- data/generated/google/apis/androidenterprise_v1/representations.rb +336 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +1234 -145
- data/generated/google/apis/androidpublisher_v2.rb +1 -1
- data/generated/google/apis/androidpublisher_v2/classes.rb +47 -8
- data/generated/google/apis/androidpublisher_v2/representations.rb +27 -0
- data/generated/google/apis/androidpublisher_v2/service.rb +55 -0
- data/generated/google/apis/appengine_v1beta5.rb +7 -1
- data/generated/google/apis/appengine_v1beta5/classes.rb +516 -313
- data/generated/google/apis/appengine_v1beta5/representations.rb +115 -22
- data/generated/google/apis/appengine_v1beta5/service.rb +329 -33
- data/generated/google/apis/appsactivity_v1.rb +1 -1
- data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
- data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +277 -20
- data/generated/google/apis/bigquery_v2/representations.rb +86 -0
- data/generated/google/apis/bigquery_v2/service.rb +8 -2
- data/generated/google/apis/books_v1.rb +2 -2
- data/generated/google/apis/books_v1/classes.rb +79 -1
- data/generated/google/apis/books_v1/representations.rb +34 -0
- data/generated/google/apis/books_v1/service.rb +7 -3
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/civicinfo_v2.rb +3 -2
- data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
- data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
- data/generated/google/apis/civicinfo_v2/service.rb +27 -6
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/classroom_v1/classes.rb +183 -37
- data/generated/google/apis/classroom_v1/representations.rb +74 -9
- data/generated/google/apis/classroom_v1/service.rb +403 -38
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +381 -17
- data/generated/google/apis/cloudbuild_v1/representations.rb +137 -2
- data/generated/google/apis/cloudbuild_v1/service.rb +174 -1
- data/generated/google/apis/clouddebugger_v2.rb +3 -6
- data/generated/google/apis/clouddebugger_v2/service.rb +4 -4
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +502 -111
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +162 -24
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +274 -30
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +121 -9
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +46 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +71 -58
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +2299 -434
- data/generated/google/apis/compute_beta/representations.rb +752 -33
- data/generated/google/apis/compute_beta/service.rb +6067 -3153
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +1681 -207
- data/generated/google/apis/compute_v1/representations.rb +552 -0
- data/generated/google/apis/compute_v1/service.rb +2797 -1171
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/classes.rb +757 -1
- data/generated/google/apis/content_v2/representations.rb +337 -0
- data/generated/google/apis/content_v2/service.rb +244 -0
- data/generated/google/apis/dataflow_v1b3.rb +38 -0
- data/generated/google/apis/dataflow_v1b3/classes.rb +4053 -0
- data/generated/google/apis/dataflow_v1b3/representations.rb +1736 -0
- data/generated/google/apis/dataflow_v1b3/service.rb +875 -0
- data/generated/google/apis/dataproc_v1.rb +2 -2
- data/generated/google/apis/dataproc_v1/classes.rb +213 -68
- data/generated/google/apis/dataproc_v1/representations.rb +38 -0
- data/generated/google/apis/dataproc_v1/service.rb +78 -48
- data/generated/google/apis/datastore_v1.rb +38 -0
- data/generated/google/apis/datastore_v1/classes.rb +1284 -0
- data/generated/google/apis/datastore_v1/representations.rb +572 -0
- data/generated/google/apis/datastore_v1/service.rb +259 -0
- data/generated/google/apis/datastore_v1beta3.rb +38 -0
- data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
- data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
- data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
- data/generated/google/apis/deploymentmanager_v2.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2/classes.rb +384 -2
- data/generated/google/apis/deploymentmanager_v2/representations.rb +161 -0
- data/generated/google/apis/deploymentmanager_v2/service.rb +217 -55
- data/generated/google/apis/dfareporting_v2_5.rb +40 -0
- data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
- data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
- data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
- data/generated/google/apis/dfareporting_v2_6.rb +40 -0
- data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
- data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
- data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
- data/generated/google/apis/dns_v1.rb +1 -1
- data/generated/google/apis/dns_v1/classes.rb +1 -1
- data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +27 -3
- data/generated/google/apis/drive_v2/representations.rb +4 -0
- data/generated/google/apis/drive_v2/service.rb +16 -3
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +50 -16
- data/generated/google/apis/drive_v3/representations.rb +4 -0
- data/generated/google/apis/drive_v3/service.rb +12 -2
- data/generated/google/apis/fitness_v1.rb +8 -2
- data/generated/google/apis/fitness_v1/classes.rb +64 -6
- data/generated/google/apis/fitness_v1/representations.rb +20 -0
- data/generated/google/apis/fitness_v1/service.rb +17 -18
- data/generated/google/apis/fusiontables_v2.rb +1 -1
- data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/genomics_v1.rb +2 -4
- data/generated/google/apis/genomics_v1/classes.rb +143 -34
- data/generated/google/apis/genomics_v1/representations.rb +48 -11
- data/generated/google/apis/genomics_v1/service.rb +35 -37
- data/generated/google/apis/gmail_v1.rb +10 -1
- data/generated/google/apis/gmail_v1/classes.rb +542 -4
- data/generated/google/apis/gmail_v1/representations.rb +213 -0
- data/generated/google/apis/gmail_v1/service.rb +898 -1
- data/generated/google/apis/groupssettings_v1.rb +1 -1
- data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
- data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
- data/generated/google/apis/iam_v1.rb +2 -2
- data/generated/google/apis/iam_v1/classes.rb +181 -206
- data/generated/google/apis/iam_v1/representations.rb +36 -45
- data/generated/google/apis/iam_v1/service.rb +101 -67
- data/generated/google/apis/identitytoolkit_v3.rb +4 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +171 -1
- data/generated/google/apis/identitytoolkit_v3/representations.rb +26 -0
- data/generated/google/apis/language_v1beta1.rb +36 -0
- data/generated/google/apis/language_v1beta1/classes.rb +599 -0
- data/generated/google/apis/language_v1beta1/representations.rb +289 -0
- data/generated/google/apis/language_v1beta1/service.rb +152 -0
- data/generated/google/apis/logging_v2beta1.rb +6 -6
- data/generated/google/apis/logging_v2beta1/classes.rb +760 -731
- data/generated/google/apis/logging_v2beta1/representations.rb +136 -147
- data/generated/google/apis/logging_v2beta1/service.rb +290 -209
- data/generated/google/apis/mirror_v1.rb +2 -2
- data/generated/google/apis/mirror_v1/service.rb +1 -1
- data/generated/google/apis/monitoring_v3.rb +45 -0
- data/generated/google/apis/monitoring_v3/classes.rb +1337 -0
- data/generated/google/apis/monitoring_v3/representations.rb +516 -0
- data/generated/google/apis/monitoring_v3/service.rb +711 -0
- data/generated/google/apis/oauth2_v2.rb +1 -1
- data/generated/google/apis/pagespeedonline_v2.rb +1 -1
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1/classes.rb +10 -9
- data/generated/google/apis/pubsub_v1/service.rb +128 -27
- data/generated/google/apis/qpx_express_v1.rb +1 -1
- data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
- data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
- data/generated/google/apis/replicapool_v1beta2.rb +1 -1
- data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
- data/generated/google/apis/script_v1.rb +1 -1
- data/generated/google/apis/script_v1/classes.rb +6 -0
- data/generated/google/apis/script_v1/representations.rb +1 -0
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/sheets_v4/classes.rb +910 -89
- data/generated/google/apis/sheets_v4/representations.rb +194 -10
- data/generated/google/apis/sheets_v4/service.rb +216 -49
- data/generated/google/apis/slides_v1.rb +49 -0
- data/generated/google/apis/slides_v1/classes.rb +3926 -0
- data/generated/google/apis/slides_v1/representations.rb +1722 -0
- data/generated/google/apis/slides_v1/service.rb +202 -0
- data/generated/google/apis/speech_v1beta1.rb +34 -0
- data/generated/google/apis/speech_v1beta1/classes.rb +511 -0
- data/generated/google/apis/speech_v1beta1/representations.rb +218 -0
- data/generated/google/apis/speech_v1beta1/service.rb +271 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +32 -8
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +3 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +42 -0
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +43 -18
- data/generated/google/apis/storage_v1/representations.rb +4 -1
- data/generated/google/apis/storage_v1/service.rb +5 -2
- data/generated/google/apis/translate_v2.rb +2 -2
- data/generated/google/apis/translate_v2/service.rb +1 -1
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +12 -11
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1/classes.rb +6 -0
- data/generated/google/apis/youtube_partner_v1/representations.rb +2 -0
- data/generated/google/apis/youtube_partner_v1/service.rb +15 -3
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +183 -21
- data/generated/google/apis/youtube_v3/representations.rb +85 -4
- data/generated/google/apis/youtube_v3/service.rb +41 -5
- data/generated/google/apis/youtubereporting_v1.rb +1 -1
- data/google-api-client.gemspec +2 -1
- data/lib/google/apis/core/api_command.rb +4 -0
- data/lib/google/apis/core/base_service.rb +10 -4
- data/lib/google/apis/core/download.rb +7 -2
- data/lib/google/apis/core/http_command.rb +5 -1
- data/lib/google/apis/core/upload.rb +7 -1
- data/lib/google/apis/errors.rb +2 -2
- data/lib/google/apis/generator/annotator.rb +6 -0
- data/lib/google/apis/version.rb +1 -1
- data/samples/cli/lib/samples/bigquery.rb +101 -0
- data/samples/cli/lib/samples/sheets.rb +61 -0
- data/sync.rb +71 -0
- metadata +55 -13
@@ -94,13 +94,25 @@ module Google
|
|
94
94
|
include Google::Apis::Core::JsonObjectSupport
|
95
95
|
end
|
96
96
|
|
97
|
-
class
|
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
|
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
|
|
@@ -277,6 +301,7 @@ module Google
|
|
277
301
|
|
278
302
|
collection :course_material_sets, as: 'courseMaterialSets', class: Google::Apis::ClassroomV1::CourseMaterialSet, decorator: Google::Apis::ClassroomV1::CourseMaterialSet::Representation
|
279
303
|
|
304
|
+
property :guardians_enabled, as: 'guardiansEnabled'
|
280
305
|
end
|
281
306
|
end
|
282
307
|
|
@@ -382,25 +407,46 @@ module Google
|
|
382
407
|
end
|
383
408
|
end
|
384
409
|
|
385
|
-
class
|
410
|
+
class ListGuardianInvitationsResponse
|
386
411
|
# @private
|
387
412
|
class Representation < Google::Apis::Core::JsonRepresentation
|
388
|
-
|
389
|
-
|
390
|
-
property :
|
391
|
-
property :role, as: 'role'
|
413
|
+
collection :guardian_invitations, as: 'guardianInvitations', class: Google::Apis::ClassroomV1::GuardianInvitation, decorator: Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
414
|
+
|
415
|
+
property :next_page_token, as: 'nextPageToken'
|
392
416
|
end
|
393
417
|
end
|
394
418
|
|
395
|
-
class
|
419
|
+
class GuardianInvitation
|
396
420
|
# @private
|
397
421
|
class Representation < Google::Apis::Core::JsonRepresentation
|
398
|
-
|
422
|
+
property :student_id, as: 'studentId'
|
423
|
+
property :invitation_id, as: 'invitationId'
|
424
|
+
property :invited_email_address, as: 'invitedEmailAddress'
|
425
|
+
property :state, as: 'state'
|
426
|
+
property :creation_time, as: 'creationTime'
|
427
|
+
end
|
428
|
+
end
|
429
|
+
|
430
|
+
class ListGuardiansResponse
|
431
|
+
# @private
|
432
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
433
|
+
collection :guardians, as: 'guardians', class: Google::Apis::ClassroomV1::Guardian, decorator: Google::Apis::ClassroomV1::Guardian::Representation
|
399
434
|
|
400
435
|
property :next_page_token, as: 'nextPageToken'
|
401
436
|
end
|
402
437
|
end
|
403
438
|
|
439
|
+
class Guardian
|
440
|
+
# @private
|
441
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
442
|
+
property :student_id, as: 'studentId'
|
443
|
+
property :guardian_id, as: 'guardianId'
|
444
|
+
property :guardian_profile, as: 'guardianProfile', class: Google::Apis::ClassroomV1::UserProfile, decorator: Google::Apis::ClassroomV1::UserProfile::Representation
|
445
|
+
|
446
|
+
property :invited_email_address, as: 'invitedEmailAddress'
|
447
|
+
end
|
448
|
+
end
|
449
|
+
|
404
450
|
class UserProfile
|
405
451
|
# @private
|
406
452
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -470,6 +516,25 @@ module Google
|
|
470
516
|
end
|
471
517
|
end
|
472
518
|
|
519
|
+
class Invitation
|
520
|
+
# @private
|
521
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
522
|
+
property :id, as: 'id'
|
523
|
+
property :user_id, as: 'userId'
|
524
|
+
property :course_id, as: 'courseId'
|
525
|
+
property :role, as: 'role'
|
526
|
+
end
|
527
|
+
end
|
528
|
+
|
529
|
+
class ListInvitationsResponse
|
530
|
+
# @private
|
531
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
532
|
+
collection :invitations, as: 'invitations', class: Google::Apis::ClassroomV1::Invitation, decorator: Google::Apis::ClassroomV1::Invitation::Representation
|
533
|
+
|
534
|
+
property :next_page_token, as: 'nextPageToken'
|
535
|
+
end
|
536
|
+
end
|
537
|
+
|
473
538
|
class CourseWork
|
474
539
|
# @private
|
475
540
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -249,6 +249,8 @@ module Google
|
|
249
249
|
# identifier. The identifier can be one of the following: * the numeric
|
250
250
|
# identifier for the user * the email address of the user * the string literal `"
|
251
251
|
# me"`, indicating the requesting user
|
252
|
+
# @param [Array<String>, String] course_states
|
253
|
+
# Restricts returned courses to those in one of the specified states
|
252
254
|
# @param [Fixnum] page_size
|
253
255
|
# Maximum number of items to return. Zero or unspecified indicates that the
|
254
256
|
# server may assign a maximum. The server may return fewer than the specified
|
@@ -274,12 +276,13 @@ module Google
|
|
274
276
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
275
277
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
276
278
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
277
|
-
def list_courses(student_id: nil, teacher_id: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
279
|
+
def list_courses(student_id: nil, teacher_id: nil, course_states: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
278
280
|
command = make_simple_command(:get, 'v1/courses', options)
|
279
281
|
command.response_representation = Google::Apis::ClassroomV1::ListCoursesResponse::Representation
|
280
282
|
command.response_class = Google::Apis::ClassroomV1::ListCoursesResponse
|
281
283
|
command.query['studentId'] = student_id unless student_id.nil?
|
282
284
|
command.query['teacherId'] = teacher_id unless teacher_id.nil?
|
285
|
+
command.query['courseStates'] = course_states unless course_states.nil?
|
283
286
|
command.query['pageSize'] = page_size unless page_size.nil?
|
284
287
|
command.query['pageToken'] = page_token unless page_token.nil?
|
285
288
|
command.query['fields'] = fields unless fields.nil?
|
@@ -980,9 +983,9 @@ module Google
|
|
980
983
|
# Identifier of the course. This identifier can be either the Classroom-assigned
|
981
984
|
# identifier or an alias.
|
982
985
|
# @param [String] course_work_id
|
983
|
-
# Identifer of the student work to request.
|
984
|
-
#
|
985
|
-
#
|
986
|
+
# Identifer of the student work to request. This may be set to the string
|
987
|
+
# literal `"-"` to request student work for all course work in the specified
|
988
|
+
# course.
|
986
989
|
# @param [String] user_id
|
987
990
|
# Optional argument to restrict returned student work to those owned by the
|
988
991
|
# student with the specified identifier. The identifier can be one of the
|
@@ -1239,6 +1242,402 @@ module Google
|
|
1239
1242
|
execute_or_queue_command(command, &block)
|
1240
1243
|
end
|
1241
1244
|
|
1245
|
+
# Returns a user profile. This method returns the following error codes: * `
|
1246
|
+
# PERMISSION_DENIED` if the requesting user is not permitted to access this user
|
1247
|
+
# profile or if no profile exists with the requested ID or for access errors.
|
1248
|
+
# @param [String] user_id
|
1249
|
+
# Identifier of the profile to return. The identifier can be one of the
|
1250
|
+
# following: * the numeric identifier for the user * the email address of the
|
1251
|
+
# user * the string literal `"me"`, indicating the requesting user
|
1252
|
+
# @param [String] fields
|
1253
|
+
# Selector specifying which fields to include in a partial response.
|
1254
|
+
# @param [String] quota_user
|
1255
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1256
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1257
|
+
# @param [Google::Apis::RequestOptions] options
|
1258
|
+
# Request-specific options
|
1259
|
+
#
|
1260
|
+
# @yield [result, err] Result & error if block supplied
|
1261
|
+
# @yieldparam result [Google::Apis::ClassroomV1::UserProfile] parsed result object
|
1262
|
+
# @yieldparam err [StandardError] error object if request failed
|
1263
|
+
#
|
1264
|
+
# @return [Google::Apis::ClassroomV1::UserProfile]
|
1265
|
+
#
|
1266
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1267
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1268
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1269
|
+
def get_user_profile(user_id, fields: nil, quota_user: nil, options: nil, &block)
|
1270
|
+
command = make_simple_command(:get, 'v1/userProfiles/{userId}', options)
|
1271
|
+
command.response_representation = Google::Apis::ClassroomV1::UserProfile::Representation
|
1272
|
+
command.response_class = Google::Apis::ClassroomV1::UserProfile
|
1273
|
+
command.params['userId'] = user_id unless user_id.nil?
|
1274
|
+
command.query['fields'] = fields unless fields.nil?
|
1275
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1276
|
+
execute_or_queue_command(command, &block)
|
1277
|
+
end
|
1278
|
+
|
1279
|
+
# Returns a list of guardian invitations that the requesting user is permitted
|
1280
|
+
# to view, filtered by the parameters provided. This method returns the
|
1281
|
+
# following error codes: * `PERMISSION_DENIED` if a `student_id` is specified,
|
1282
|
+
# and the requesting user is not permitted to view guardian invitations for that
|
1283
|
+
# student, if `"-"` is specified as the `student_id` and the user is not a
|
1284
|
+
# domain administrator, if guardians are not enabled for the domain in question,
|
1285
|
+
# or for other access errors. * `INVALID_ARGUMENT` if a `student_id` is
|
1286
|
+
# specified, but its format cannot be recognized (it is not an email address,
|
1287
|
+
# nor a `student_id` from the API, nor the literal string `me`). May also be
|
1288
|
+
# returned if an invalid `page_token` or `state` is provided. * `NOT_FOUND` if a
|
1289
|
+
# `student_id` is specified, and its format can be recognized, but Classroom has
|
1290
|
+
# no record of that student.
|
1291
|
+
# @param [String] student_id
|
1292
|
+
# The ID of the student whose guardian invitations are to be returned. The
|
1293
|
+
# identifier can be one of the following: * the numeric identifier for the user *
|
1294
|
+
# the email address of the user * the string literal `"me"`, indicating the
|
1295
|
+
# requesting user * the string literal `"-"`, indicating that results should be
|
1296
|
+
# returned for all students that the requesting user is permitted to view
|
1297
|
+
# guardian invitations.
|
1298
|
+
# @param [String] invited_email_address
|
1299
|
+
# If specified, only results with the specified `invited_email_address` will be
|
1300
|
+
# returned.
|
1301
|
+
# @param [Array<String>, String] states
|
1302
|
+
# If specified, only results with the specified `state` values will be returned.
|
1303
|
+
# Otherwise, results with a `state` of `PENDING` will be returned.
|
1304
|
+
# @param [String] page_token
|
1305
|
+
# nextPageToken value returned from a previous list call, indicating that the
|
1306
|
+
# subsequent page of results should be returned. The list request must be
|
1307
|
+
# otherwise identical to the one that resulted in this token.
|
1308
|
+
# @param [Fixnum] page_size
|
1309
|
+
# Maximum number of items to return. Zero or unspecified indicates that the
|
1310
|
+
# server may assign a maximum. The server may return fewer than the specified
|
1311
|
+
# number of results.
|
1312
|
+
# @param [String] fields
|
1313
|
+
# Selector specifying which fields to include in a partial response.
|
1314
|
+
# @param [String] quota_user
|
1315
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1316
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1317
|
+
# @param [Google::Apis::RequestOptions] options
|
1318
|
+
# Request-specific options
|
1319
|
+
#
|
1320
|
+
# @yield [result, err] Result & error if block supplied
|
1321
|
+
# @yieldparam result [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse] parsed result object
|
1322
|
+
# @yieldparam err [StandardError] error object if request failed
|
1323
|
+
#
|
1324
|
+
# @return [Google::Apis::ClassroomV1::ListGuardianInvitationsResponse]
|
1325
|
+
#
|
1326
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1327
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1328
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1329
|
+
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)
|
1330
|
+
command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations', options)
|
1331
|
+
command.response_representation = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse::Representation
|
1332
|
+
command.response_class = Google::Apis::ClassroomV1::ListGuardianInvitationsResponse
|
1333
|
+
command.params['studentId'] = student_id unless student_id.nil?
|
1334
|
+
command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil?
|
1335
|
+
command.query['states'] = states unless states.nil?
|
1336
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1337
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1338
|
+
command.query['fields'] = fields unless fields.nil?
|
1339
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1340
|
+
execute_or_queue_command(command, &block)
|
1341
|
+
end
|
1342
|
+
|
1343
|
+
# Returns a specific guardian invitation. This method returns the following
|
1344
|
+
# error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to
|
1345
|
+
# view guardian invitations for the student identified by the `student_id`, if
|
1346
|
+
# guardians are not enabled for the domain in question, or for other access
|
1347
|
+
# errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format
|
1348
|
+
# cannot be recognized (it is not an email address, nor a `student_id` from the
|
1349
|
+
# API, nor the literal string `me`). * `NOT_FOUND` if Classroom cannot find any
|
1350
|
+
# record of the given student or `invitation_id`. May also be returned if the
|
1351
|
+
# student exists, but the requesting user does not have access to see that
|
1352
|
+
# student.
|
1353
|
+
# @param [String] student_id
|
1354
|
+
# The ID of the student whose guardian invitation is being requested.
|
1355
|
+
# @param [String] invitation_id
|
1356
|
+
# The `id` field of the `GuardianInvitation` being requested.
|
1357
|
+
# @param [String] fields
|
1358
|
+
# Selector specifying which fields to include in a partial response.
|
1359
|
+
# @param [String] quota_user
|
1360
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1361
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1362
|
+
# @param [Google::Apis::RequestOptions] options
|
1363
|
+
# Request-specific options
|
1364
|
+
#
|
1365
|
+
# @yield [result, err] Result & error if block supplied
|
1366
|
+
# @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
|
1367
|
+
# @yieldparam err [StandardError] error object if request failed
|
1368
|
+
#
|
1369
|
+
# @return [Google::Apis::ClassroomV1::GuardianInvitation]
|
1370
|
+
#
|
1371
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1372
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1373
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1374
|
+
def get_user_profile_guardian_invitation(student_id, invitation_id, fields: nil, quota_user: nil, options: nil, &block)
|
1375
|
+
command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options)
|
1376
|
+
command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
1377
|
+
command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
|
1378
|
+
command.params['studentId'] = student_id unless student_id.nil?
|
1379
|
+
command.params['invitationId'] = invitation_id unless invitation_id.nil?
|
1380
|
+
command.query['fields'] = fields unless fields.nil?
|
1381
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1382
|
+
execute_or_queue_command(command, &block)
|
1383
|
+
end
|
1384
|
+
|
1385
|
+
# Creates a guardian invitation, and sends an email to the guardian asking them
|
1386
|
+
# to confirm that they are the student's guardian. Once the guardian accepts the
|
1387
|
+
# invitation, their `state` will change to `COMPLETED` and they will start
|
1388
|
+
# receiving guardian notifications. A `Guardian` resource will also be created
|
1389
|
+
# to represent the active guardian. The request object must have the `student_id`
|
1390
|
+
# and `invited_email_address` fields set. Failing to set these fields, or
|
1391
|
+
# setting any other fields in the request, will result in an error. This method
|
1392
|
+
# returns the following error codes: * `PERMISSION_DENIED` if the current user
|
1393
|
+
# does not have permission to manage guardians, if the guardian in question has
|
1394
|
+
# already rejected too many requests for that student, if guardians are not
|
1395
|
+
# enabled for the domain in question, or for other access errors. * `
|
1396
|
+
# RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian link
|
1397
|
+
# limit. * `INVALID_ARGUMENT` if the guardian email address is not valid (for
|
1398
|
+
# example, if it is too long), or if the format of the student ID provided
|
1399
|
+
# cannot be recognized (it is not an email address, nor a `user_id` from this
|
1400
|
+
# API). This error will also be returned if read-only fields are set, or if the `
|
1401
|
+
# state` field is set to to a value other than `PENDING`. * `NOT_FOUND` if the
|
1402
|
+
# student ID provided is a valid student ID, but Classroom has no record of that
|
1403
|
+
# student. * `ALREADY_EXISTS` if there is already a pending guardian invitation
|
1404
|
+
# for the student and `invited_email_address` provided, or if the provided `
|
1405
|
+
# invited_email_address` matches the Google account of an existing `Guardian`
|
1406
|
+
# for this user.
|
1407
|
+
# @param [String] student_id
|
1408
|
+
# ID of the student (in standard format)
|
1409
|
+
# @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object
|
1410
|
+
# @param [String] fields
|
1411
|
+
# Selector specifying which fields to include in a partial response.
|
1412
|
+
# @param [String] quota_user
|
1413
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1414
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1415
|
+
# @param [Google::Apis::RequestOptions] options
|
1416
|
+
# Request-specific options
|
1417
|
+
#
|
1418
|
+
# @yield [result, err] Result & error if block supplied
|
1419
|
+
# @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
|
1420
|
+
# @yieldparam err [StandardError] error object if request failed
|
1421
|
+
#
|
1422
|
+
# @return [Google::Apis::ClassroomV1::GuardianInvitation]
|
1423
|
+
#
|
1424
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1425
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1426
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1427
|
+
def create_user_profile_guardian_invitation(student_id, guardian_invitation_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1428
|
+
command = make_simple_command(:post, 'v1/userProfiles/{studentId}/guardianInvitations', options)
|
1429
|
+
command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
1430
|
+
command.request_object = guardian_invitation_object
|
1431
|
+
command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
1432
|
+
command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
|
1433
|
+
command.params['studentId'] = student_id unless student_id.nil?
|
1434
|
+
command.query['fields'] = fields unless fields.nil?
|
1435
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1436
|
+
execute_or_queue_command(command, &block)
|
1437
|
+
end
|
1438
|
+
|
1439
|
+
# Modifies a guardian invitation. Currently, the only valid modification is to
|
1440
|
+
# change the `state` from `PENDING` to `COMPLETE`. This has the effect of
|
1441
|
+
# withdrawing the invitation. This method returns the following error codes: * `
|
1442
|
+
# PERMISSION_DENIED` if the current user does not have permission to manage
|
1443
|
+
# guardians, if guardians are not enabled for the domain in question or for
|
1444
|
+
# other access errors. * `FAILED_PRECONDITION` if the guardian link is not in
|
1445
|
+
# the `PENDING` state. * `INVALID_ARGUMENT` if the format of the student ID
|
1446
|
+
# provided cannot be recognized (it is not an email address, nor a `user_id`
|
1447
|
+
# from this API), or if the passed `GuardianInvitation` has a `state` other than
|
1448
|
+
# `COMPLETE`, or if it modifies fields other than `state`. * `NOT_FOUND` if the
|
1449
|
+
# student ID provided is a valid student ID, but Classroom has no record of that
|
1450
|
+
# student, or if the `id` field does not refer to a guardian invitation known to
|
1451
|
+
# Classroom.
|
1452
|
+
# @param [String] student_id
|
1453
|
+
# The ID of the student whose guardian invitation is to be modified.
|
1454
|
+
# @param [String] invitation_id
|
1455
|
+
# The `id` field of the `GuardianInvitation` to be modified.
|
1456
|
+
# @param [Google::Apis::ClassroomV1::GuardianInvitation] guardian_invitation_object
|
1457
|
+
# @param [String] update_mask
|
1458
|
+
# Mask that identifies which fields on the course to update. This field is
|
1459
|
+
# required to do an update. The update will fail if invalid fields are specified.
|
1460
|
+
# The following fields are valid: * `state` When set in a query parameter, this
|
1461
|
+
# field should be specified as `updateMask=,,...`
|
1462
|
+
# @param [String] fields
|
1463
|
+
# Selector specifying which fields to include in a partial response.
|
1464
|
+
# @param [String] quota_user
|
1465
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1466
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1467
|
+
# @param [Google::Apis::RequestOptions] options
|
1468
|
+
# Request-specific options
|
1469
|
+
#
|
1470
|
+
# @yield [result, err] Result & error if block supplied
|
1471
|
+
# @yieldparam result [Google::Apis::ClassroomV1::GuardianInvitation] parsed result object
|
1472
|
+
# @yieldparam err [StandardError] error object if request failed
|
1473
|
+
#
|
1474
|
+
# @return [Google::Apis::ClassroomV1::GuardianInvitation]
|
1475
|
+
#
|
1476
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1477
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1478
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1479
|
+
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)
|
1480
|
+
command = make_simple_command(:patch, 'v1/userProfiles/{studentId}/guardianInvitations/{invitationId}', options)
|
1481
|
+
command.request_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
1482
|
+
command.request_object = guardian_invitation_object
|
1483
|
+
command.response_representation = Google::Apis::ClassroomV1::GuardianInvitation::Representation
|
1484
|
+
command.response_class = Google::Apis::ClassroomV1::GuardianInvitation
|
1485
|
+
command.params['studentId'] = student_id unless student_id.nil?
|
1486
|
+
command.params['invitationId'] = invitation_id unless invitation_id.nil?
|
1487
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
1488
|
+
command.query['fields'] = fields unless fields.nil?
|
1489
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1490
|
+
execute_or_queue_command(command, &block)
|
1491
|
+
end
|
1492
|
+
|
1493
|
+
# Returns a list of guardians that the requesting user is permitted to view,
|
1494
|
+
# restricted to those that match the request. To list guardians for any student
|
1495
|
+
# that the requesting user may view guardians for, use the literal character `-`
|
1496
|
+
# for the student ID. This method returns the following error codes: * `
|
1497
|
+
# PERMISSION_DENIED` if a `student_id` is specified, and the requesting user is
|
1498
|
+
# not permitted to view guardian information for that student, if `"-"` is
|
1499
|
+
# specified as the `student_id` and the user is not a domain administrator, if
|
1500
|
+
# guardians are not enabled for the domain in question, if the `
|
1501
|
+
# invited_email_address` filter is set by a user who is not a domain
|
1502
|
+
# administrator, or for other access errors. * `INVALID_ARGUMENT` if a `
|
1503
|
+
# student_id` is specified, but its format cannot be recognized (it is not an
|
1504
|
+
# email address, nor a `student_id` from the API, nor the literal string `me`).
|
1505
|
+
# May also be returned if an invalid `page_token` is provided. * `NOT_FOUND` if
|
1506
|
+
# a `student_id` is specified, and its format can be recognized, but Classroom
|
1507
|
+
# has no record of that student.
|
1508
|
+
# @param [String] student_id
|
1509
|
+
# Filter results by the student who the guardian is linked to. The identifier
|
1510
|
+
# can be one of the following: * the numeric identifier for the user * the email
|
1511
|
+
# address of the user * the string literal `"me"`, indicating the requesting
|
1512
|
+
# user * the string literal `"-"`, indicating that results should be returned
|
1513
|
+
# for all students that the requesting user has access to view.
|
1514
|
+
# @param [String] invited_email_address
|
1515
|
+
# Filter results by the email address that the original invitation was sent to,
|
1516
|
+
# resulting in this guardian link. This filter can only be used by domain
|
1517
|
+
# administrators.
|
1518
|
+
# @param [String] page_token
|
1519
|
+
# nextPageToken value returned from a previous list call, indicating that the
|
1520
|
+
# subsequent page of results should be returned. The list request must be
|
1521
|
+
# otherwise identical to the one that resulted in this token.
|
1522
|
+
# @param [Fixnum] page_size
|
1523
|
+
# Maximum number of items to return. Zero or unspecified indicates that the
|
1524
|
+
# server may assign a maximum. The server may return fewer than the specified
|
1525
|
+
# number of results.
|
1526
|
+
# @param [String] fields
|
1527
|
+
# Selector specifying which fields to include in a partial response.
|
1528
|
+
# @param [String] quota_user
|
1529
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1530
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1531
|
+
# @param [Google::Apis::RequestOptions] options
|
1532
|
+
# Request-specific options
|
1533
|
+
#
|
1534
|
+
# @yield [result, err] Result & error if block supplied
|
1535
|
+
# @yieldparam result [Google::Apis::ClassroomV1::ListGuardiansResponse] parsed result object
|
1536
|
+
# @yieldparam err [StandardError] error object if request failed
|
1537
|
+
#
|
1538
|
+
# @return [Google::Apis::ClassroomV1::ListGuardiansResponse]
|
1539
|
+
#
|
1540
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1541
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1542
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1543
|
+
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)
|
1544
|
+
command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians', options)
|
1545
|
+
command.response_representation = Google::Apis::ClassroomV1::ListGuardiansResponse::Representation
|
1546
|
+
command.response_class = Google::Apis::ClassroomV1::ListGuardiansResponse
|
1547
|
+
command.params['studentId'] = student_id unless student_id.nil?
|
1548
|
+
command.query['invitedEmailAddress'] = invited_email_address unless invited_email_address.nil?
|
1549
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1550
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1551
|
+
command.query['fields'] = fields unless fields.nil?
|
1552
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1553
|
+
execute_or_queue_command(command, &block)
|
1554
|
+
end
|
1555
|
+
|
1556
|
+
# Returns a specific guardian. This method returns the following error codes: * `
|
1557
|
+
# PERMISSION_DENIED` if the requesting user is not permitted to view guardian
|
1558
|
+
# information for the student identified by the `student_id`, if guardians are
|
1559
|
+
# not enabled for the domain in question, or for other access errors. * `
|
1560
|
+
# INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot be
|
1561
|
+
# recognized (it is not an email address, nor a `student_id` from the API, nor
|
1562
|
+
# the literal string `me`). * `NOT_FOUND` if Classroom cannot find any record of
|
1563
|
+
# the given student or `guardian_id`, or if the guardian has been disabled.
|
1564
|
+
# @param [String] student_id
|
1565
|
+
# The student whose guardian is being requested. One of the following: * the
|
1566
|
+
# numeric identifier for the user * the email address of the user * the string
|
1567
|
+
# literal `"me"`, indicating the requesting user
|
1568
|
+
# @param [String] guardian_id
|
1569
|
+
# The `id` field from a `Guardian`.
|
1570
|
+
# @param [String] fields
|
1571
|
+
# Selector specifying which fields to include in a partial response.
|
1572
|
+
# @param [String] quota_user
|
1573
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1574
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1575
|
+
# @param [Google::Apis::RequestOptions] options
|
1576
|
+
# Request-specific options
|
1577
|
+
#
|
1578
|
+
# @yield [result, err] Result & error if block supplied
|
1579
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Guardian] parsed result object
|
1580
|
+
# @yieldparam err [StandardError] error object if request failed
|
1581
|
+
#
|
1582
|
+
# @return [Google::Apis::ClassroomV1::Guardian]
|
1583
|
+
#
|
1584
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1585
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1586
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1587
|
+
def get_user_profile_guardian(student_id, guardian_id, fields: nil, quota_user: nil, options: nil, &block)
|
1588
|
+
command = make_simple_command(:get, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options)
|
1589
|
+
command.response_representation = Google::Apis::ClassroomV1::Guardian::Representation
|
1590
|
+
command.response_class = Google::Apis::ClassroomV1::Guardian
|
1591
|
+
command.params['studentId'] = student_id unless student_id.nil?
|
1592
|
+
command.params['guardianId'] = guardian_id unless guardian_id.nil?
|
1593
|
+
command.query['fields'] = fields unless fields.nil?
|
1594
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1595
|
+
execute_or_queue_command(command, &block)
|
1596
|
+
end
|
1597
|
+
|
1598
|
+
# Deletes a guardian. The guardian will no longer receive guardian notifications
|
1599
|
+
# and the guardian will no longer be accessible via the API. This method returns
|
1600
|
+
# the following error codes: * `PERMISSION_DENIED` if the requesting user is not
|
1601
|
+
# permitted to manage guardians for the student identified by the `student_id`,
|
1602
|
+
# if guardians are not enabled for the domain in question, or for other access
|
1603
|
+
# errors. * `INVALID_ARGUMENT` if a `student_id` is specified, but its format
|
1604
|
+
# cannot be recognized (it is not an email address, nor a `student_id` from the
|
1605
|
+
# API). * `NOT_FOUND` if Classroom cannot find any record of the given `
|
1606
|
+
# student_id` or `guardian_id`, or if the guardian has already been disabled.
|
1607
|
+
# @param [String] student_id
|
1608
|
+
# The student whose guardian is to be deleted. One of the following: * the
|
1609
|
+
# numeric identifier for the user * the email address of the user * the string
|
1610
|
+
# literal `"me"`, indicating the requesting user
|
1611
|
+
# @param [String] guardian_id
|
1612
|
+
# The `id` field from a `Guardian`.
|
1613
|
+
# @param [String] fields
|
1614
|
+
# Selector specifying which fields to include in a partial response.
|
1615
|
+
# @param [String] quota_user
|
1616
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1617
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1618
|
+
# @param [Google::Apis::RequestOptions] options
|
1619
|
+
# Request-specific options
|
1620
|
+
#
|
1621
|
+
# @yield [result, err] Result & error if block supplied
|
1622
|
+
# @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
|
1623
|
+
# @yieldparam err [StandardError] error object if request failed
|
1624
|
+
#
|
1625
|
+
# @return [Google::Apis::ClassroomV1::Empty]
|
1626
|
+
#
|
1627
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1628
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1629
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1630
|
+
def delete_user_profile_guardian(student_id, guardian_id, fields: nil, quota_user: nil, options: nil, &block)
|
1631
|
+
command = make_simple_command(:delete, 'v1/userProfiles/{studentId}/guardians/{guardianId}', options)
|
1632
|
+
command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
|
1633
|
+
command.response_class = Google::Apis::ClassroomV1::Empty
|
1634
|
+
command.params['studentId'] = student_id unless student_id.nil?
|
1635
|
+
command.params['guardianId'] = guardian_id unless guardian_id.nil?
|
1636
|
+
command.query['fields'] = fields unless fields.nil?
|
1637
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1638
|
+
execute_or_queue_command(command, &block)
|
1639
|
+
end
|
1640
|
+
|
1242
1641
|
# Creates an invitation. Only one invitation for a user and course may exist at
|
1243
1642
|
# a time. Delete and re-create an invitation to make changes. This method
|
1244
1643
|
# returns the following error codes: * `PERMISSION_DENIED` if the requesting
|
@@ -1429,40 +1828,6 @@ module Google
|
|
1429
1828
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1430
1829
|
execute_or_queue_command(command, &block)
|
1431
1830
|
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
1831
|
|
1467
1832
|
protected
|
1468
1833
|
|