google-api-client 0.14.4 → 0.14.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +41 -0
  3. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  4. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  5. data/generated/google/apis/androidmanagement_v1/classes.rb +2 -2
  6. data/generated/google/apis/appengine_v1.rb +1 -1
  7. data/generated/google/apis/appengine_v1/classes.rb +111 -0
  8. data/generated/google/apis/appengine_v1/representations.rb +59 -0
  9. data/generated/google/apis/appengine_v1/service.rb +220 -0
  10. data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
  11. data/generated/google/apis/classroom_v1.rb +7 -1
  12. data/generated/google/apis/classroom_v1/classes.rb +361 -0
  13. data/generated/google/apis/classroom_v1/representations.rb +161 -0
  14. data/generated/google/apis/classroom_v1/service.rb +426 -0
  15. data/generated/google/apis/cloudfunctions_v1beta2.rb +1 -1
  16. data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +3 -3
  17. data/generated/google/apis/cloudiot_v1.rb +38 -0
  18. data/generated/google/apis/cloudiot_v1/classes.rb +1197 -0
  19. data/generated/google/apis/cloudiot_v1/representations.rb +473 -0
  20. data/generated/google/apis/cloudiot_v1/service.rb +657 -0
  21. data/generated/google/apis/cloudiot_v1beta1.rb +38 -0
  22. data/generated/google/apis/cloudiot_v1beta1/classes.rb +1064 -0
  23. data/generated/google/apis/cloudiot_v1beta1/representations.rb +442 -0
  24. data/generated/google/apis/cloudiot_v1beta1/service.rb +725 -0
  25. data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
  26. data/generated/google/apis/cloudtasks_v2beta2/classes.rb +4 -4
  27. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  28. data/generated/google/apis/cloudtrace_v2.rb +1 -1
  29. data/generated/google/apis/cloudtrace_v2/classes.rb +1 -1
  30. data/generated/google/apis/cloudtrace_v2/service.rb +1 -1
  31. data/generated/google/apis/container_v1.rb +1 -1
  32. data/generated/google/apis/container_v1/classes.rb +34 -4
  33. data/generated/google/apis/container_v1/representations.rb +15 -0
  34. data/generated/google/apis/container_v1beta1.rb +1 -1
  35. data/generated/google/apis/container_v1beta1/classes.rb +34 -4
  36. data/generated/google/apis/container_v1beta1/representations.rb +15 -0
  37. data/generated/google/apis/content_v2.rb +1 -1
  38. data/generated/google/apis/content_v2/classes.rb +91 -9
  39. data/generated/google/apis/content_v2/representations.rb +20 -0
  40. data/generated/google/apis/content_v2/service.rb +1 -2
  41. data/generated/google/apis/content_v2sandbox.rb +1 -1
  42. data/generated/google/apis/content_v2sandbox/classes.rb +90 -8
  43. data/generated/google/apis/content_v2sandbox/representations.rb +20 -0
  44. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  45. data/generated/google/apis/dataflow_v1b3/classes.rb +53 -3
  46. data/generated/google/apis/dataflow_v1b3/representations.rb +16 -0
  47. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  48. data/generated/google/apis/dataproc_v1beta2/classes.rb +461 -0
  49. data/generated/google/apis/dataproc_v1beta2/representations.rb +194 -0
  50. data/generated/google/apis/dataproc_v1beta2/service.rb +452 -0
  51. data/generated/google/apis/deploymentmanager_alpha.rb +1 -1
  52. data/generated/google/apis/deploymentmanager_alpha/classes.rb +30 -1
  53. data/generated/google/apis/deploymentmanager_alpha/representations.rb +8 -0
  54. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  55. data/generated/google/apis/deploymentmanager_v2/classes.rb +2 -1
  56. data/generated/google/apis/deploymentmanager_v2beta.rb +1 -1
  57. data/generated/google/apis/deploymentmanager_v2beta/classes.rb +2 -1
  58. data/generated/google/apis/dlp_v2beta1.rb +1 -1
  59. data/generated/google/apis/dlp_v2beta1/classes.rb +2 -2
  60. data/generated/google/apis/firebaserules_v1.rb +1 -1
  61. data/generated/google/apis/firebaserules_v1/classes.rb +44 -0
  62. data/generated/google/apis/firebaserules_v1/representations.rb +17 -0
  63. data/generated/google/apis/firebaserules_v1/service.rb +35 -0
  64. data/generated/google/apis/fitness_v1.rb +1 -1
  65. data/generated/google/apis/fitness_v1/classes.rb +3 -3
  66. data/generated/google/apis/fitness_v1/service.rb +4 -4
  67. data/generated/google/apis/iam_v1.rb +1 -1
  68. data/generated/google/apis/iam_v1/classes.rb +14 -14
  69. data/generated/google/apis/iam_v1/service.rb +29 -29
  70. data/generated/google/apis/kgsearch_v1.rb +1 -1
  71. data/generated/google/apis/logging_v2.rb +1 -1
  72. data/generated/google/apis/logging_v2/classes.rb +11 -9
  73. data/generated/google/apis/logging_v2beta1.rb +1 -1
  74. data/generated/google/apis/logging_v2beta1/classes.rb +11 -9
  75. data/generated/google/apis/ml_v1.rb +1 -1
  76. data/generated/google/apis/ml_v1/classes.rb +5 -4
  77. data/generated/google/apis/oslogin_v1alpha.rb +1 -1
  78. data/generated/google/apis/oslogin_v1beta.rb +1 -1
  79. data/generated/google/apis/pubsub_v1.rb +1 -1
  80. data/generated/google/apis/pubsub_v1/classes.rb +2 -1
  81. data/generated/google/apis/script_v1.rb +2 -2
  82. data/generated/google/apis/script_v1/service.rb +1 -1
  83. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  84. data/generated/google/apis/servicecontrol_v1/classes.rb +19 -23
  85. data/generated/google/apis/servicecontrol_v1/representations.rb +1 -1
  86. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  87. data/generated/google/apis/servicemanagement_v1/classes.rb +106 -0
  88. data/generated/google/apis/servicemanagement_v1/representations.rb +32 -0
  89. data/generated/google/apis/serviceuser_v1.rb +1 -1
  90. data/generated/google/apis/serviceuser_v1/classes.rb +92 -92
  91. data/generated/google/apis/serviceuser_v1/representations.rb +27 -15
  92. data/generated/google/apis/streetviewpublish_v1.rb +1 -1
  93. data/generated/google/apis/streetviewpublish_v1/service.rb +7 -0
  94. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  95. data/generated/google/apis/toolresults_v1beta3/classes.rb +2 -2
  96. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  97. data/generated/google/apis/youtube_partner_v1/classes.rb +53 -0
  98. data/generated/google/apis/youtube_partner_v1/representations.rb +29 -0
  99. data/generated/google/apis/youtube_partner_v1/service.rb +37 -0
  100. data/lib/google/apis/version.rb +1 -1
  101. metadata +10 -2
@@ -22,6 +22,12 @@ module Google
22
22
  module Apis
23
23
  module ClassroomV1
24
24
 
25
+ class Announcement
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
25
31
  class Assignment
26
32
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
33
 
@@ -40,6 +46,12 @@ module Google
40
46
  include Google::Apis::Core::JsonObjectSupport
41
47
  end
42
48
 
49
+ class CloudPubsubTopic
50
+ class Representation < Google::Apis::Core::JsonRepresentation; end
51
+
52
+ include Google::Apis::Core::JsonObjectSupport
53
+ end
54
+
43
55
  class Course
44
56
  class Representation < Google::Apis::Core::JsonRepresentation; end
45
57
 
@@ -64,6 +76,12 @@ module Google
64
76
  include Google::Apis::Core::JsonObjectSupport
65
77
  end
66
78
 
79
+ class CourseRosterChangesInfo
80
+ class Representation < Google::Apis::Core::JsonRepresentation; end
81
+
82
+ include Google::Apis::Core::JsonObjectSupport
83
+ end
84
+
67
85
  class CourseWork
68
86
  class Representation < Google::Apis::Core::JsonRepresentation; end
69
87
 
@@ -94,6 +112,12 @@ module Google
94
112
  include Google::Apis::Core::JsonObjectSupport
95
113
  end
96
114
 
115
+ class Feed
116
+ class Representation < Google::Apis::Core::JsonRepresentation; end
117
+
118
+ include Google::Apis::Core::JsonObjectSupport
119
+ end
120
+
97
121
  class Form
98
122
  class Representation < Google::Apis::Core::JsonRepresentation; end
99
123
 
@@ -124,6 +148,12 @@ module Google
124
148
  include Google::Apis::Core::JsonObjectSupport
125
149
  end
126
150
 
151
+ class IndividualStudentsOptions
152
+ class Representation < Google::Apis::Core::JsonRepresentation; end
153
+
154
+ include Google::Apis::Core::JsonObjectSupport
155
+ end
156
+
127
157
  class Invitation
128
158
  class Representation < Google::Apis::Core::JsonRepresentation; end
129
159
 
@@ -136,6 +166,12 @@ module Google
136
166
  include Google::Apis::Core::JsonObjectSupport
137
167
  end
138
168
 
169
+ class ListAnnouncementsResponse
170
+ class Representation < Google::Apis::Core::JsonRepresentation; end
171
+
172
+ include Google::Apis::Core::JsonObjectSupport
173
+ end
174
+
139
175
  class ListCourseAliasesResponse
140
176
  class Representation < Google::Apis::Core::JsonRepresentation; end
141
177
 
@@ -196,12 +232,30 @@ module Google
196
232
  include Google::Apis::Core::JsonObjectSupport
197
233
  end
198
234
 
235
+ class ModifyAnnouncementAssigneesRequest
236
+ class Representation < Google::Apis::Core::JsonRepresentation; end
237
+
238
+ include Google::Apis::Core::JsonObjectSupport
239
+ end
240
+
199
241
  class ModifyAttachmentsRequest
200
242
  class Representation < Google::Apis::Core::JsonRepresentation; end
201
243
 
202
244
  include Google::Apis::Core::JsonObjectSupport
203
245
  end
204
246
 
247
+ class ModifyCourseWorkAssigneesRequest
248
+ class Representation < Google::Apis::Core::JsonRepresentation; end
249
+
250
+ include Google::Apis::Core::JsonObjectSupport
251
+ end
252
+
253
+ class ModifyIndividualStudentsOptions
254
+ class Representation < Google::Apis::Core::JsonRepresentation; end
255
+
256
+ include Google::Apis::Core::JsonObjectSupport
257
+ end
258
+
205
259
  class MultipleChoiceQuestion
206
260
  class Representation < Google::Apis::Core::JsonRepresentation; end
207
261
 
@@ -226,6 +280,12 @@ module Google
226
280
  include Google::Apis::Core::JsonObjectSupport
227
281
  end
228
282
 
283
+ class Registration
284
+ class Representation < Google::Apis::Core::JsonRepresentation; end
285
+
286
+ include Google::Apis::Core::JsonObjectSupport
287
+ end
288
+
229
289
  class ReturnStudentSubmissionRequest
230
290
  class Representation < Google::Apis::Core::JsonRepresentation; end
231
291
 
@@ -298,6 +358,26 @@ module Google
298
358
  include Google::Apis::Core::JsonObjectSupport
299
359
  end
300
360
 
361
+ class Announcement
362
+ # @private
363
+ class Representation < Google::Apis::Core::JsonRepresentation
364
+ property :alternate_link, as: 'alternateLink'
365
+ property :assignee_mode, as: 'assigneeMode'
366
+ property :course_id, as: 'courseId'
367
+ property :creation_time, as: 'creationTime'
368
+ property :creator_user_id, as: 'creatorUserId'
369
+ property :id, as: 'id'
370
+ property :individual_students_options, as: 'individualStudentsOptions', class: Google::Apis::ClassroomV1::IndividualStudentsOptions, decorator: Google::Apis::ClassroomV1::IndividualStudentsOptions::Representation
371
+
372
+ collection :materials, as: 'materials', class: Google::Apis::ClassroomV1::Material, decorator: Google::Apis::ClassroomV1::Material::Representation
373
+
374
+ property :scheduled_time, as: 'scheduledTime'
375
+ property :state, as: 'state'
376
+ property :text, as: 'text'
377
+ property :update_time, as: 'updateTime'
378
+ end
379
+ end
380
+
301
381
  class Assignment
302
382
  # @private
303
383
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -328,6 +408,13 @@ module Google
328
408
  end
329
409
  end
330
410
 
411
+ class CloudPubsubTopic
412
+ # @private
413
+ class Representation < Google::Apis::Core::JsonRepresentation
414
+ property :topic_name, as: 'topicName'
415
+ end
416
+ end
417
+
331
418
  class Course
332
419
  # @private
333
420
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -384,21 +471,32 @@ module Google
384
471
  end
385
472
  end
386
473
 
474
+ class CourseRosterChangesInfo
475
+ # @private
476
+ class Representation < Google::Apis::Core::JsonRepresentation
477
+ property :course_id, as: 'courseId'
478
+ end
479
+ end
480
+
387
481
  class CourseWork
388
482
  # @private
389
483
  class Representation < Google::Apis::Core::JsonRepresentation
390
484
  property :alternate_link, as: 'alternateLink'
485
+ property :assignee_mode, as: 'assigneeMode'
391
486
  property :assignment, as: 'assignment', class: Google::Apis::ClassroomV1::Assignment, decorator: Google::Apis::ClassroomV1::Assignment::Representation
392
487
 
393
488
  property :associated_with_developer, as: 'associatedWithDeveloper'
394
489
  property :course_id, as: 'courseId'
395
490
  property :creation_time, as: 'creationTime'
491
+ property :creator_user_id, as: 'creatorUserId'
396
492
  property :description, as: 'description'
397
493
  property :due_date, as: 'dueDate', class: Google::Apis::ClassroomV1::Date, decorator: Google::Apis::ClassroomV1::Date::Representation
398
494
 
399
495
  property :due_time, as: 'dueTime', class: Google::Apis::ClassroomV1::TimeOfDay, decorator: Google::Apis::ClassroomV1::TimeOfDay::Representation
400
496
 
401
497
  property :id, as: 'id'
498
+ property :individual_students_options, as: 'individualStudentsOptions', class: Google::Apis::ClassroomV1::IndividualStudentsOptions, decorator: Google::Apis::ClassroomV1::IndividualStudentsOptions::Representation
499
+
402
500
  collection :materials, as: 'materials', class: Google::Apis::ClassroomV1::Material, decorator: Google::Apis::ClassroomV1::Material::Representation
403
501
 
404
502
  property :max_points, as: 'maxPoints'
@@ -447,6 +545,15 @@ module Google
447
545
  end
448
546
  end
449
547
 
548
+ class Feed
549
+ # @private
550
+ class Representation < Google::Apis::Core::JsonRepresentation
551
+ property :course_roster_changes_info, as: 'courseRosterChangesInfo', class: Google::Apis::ClassroomV1::CourseRosterChangesInfo, decorator: Google::Apis::ClassroomV1::CourseRosterChangesInfo::Representation
552
+
553
+ property :feed_type, as: 'feedType'
554
+ end
555
+ end
556
+
450
557
  class Form
451
558
  # @private
452
559
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -497,6 +604,13 @@ module Google
497
604
  end
498
605
  end
499
606
 
607
+ class IndividualStudentsOptions
608
+ # @private
609
+ class Representation < Google::Apis::Core::JsonRepresentation
610
+ collection :student_ids, as: 'studentIds'
611
+ end
612
+ end
613
+
500
614
  class Invitation
501
615
  # @private
502
616
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -516,6 +630,15 @@ module Google
516
630
  end
517
631
  end
518
632
 
633
+ class ListAnnouncementsResponse
634
+ # @private
635
+ class Representation < Google::Apis::Core::JsonRepresentation
636
+ collection :announcements, as: 'announcements', class: Google::Apis::ClassroomV1::Announcement, decorator: Google::Apis::ClassroomV1::Announcement::Representation
637
+
638
+ property :next_page_token, as: 'nextPageToken'
639
+ end
640
+ end
641
+
519
642
  class ListCourseAliasesResponse
520
643
  # @private
521
644
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -611,6 +734,15 @@ module Google
611
734
  end
612
735
  end
613
736
 
737
+ class ModifyAnnouncementAssigneesRequest
738
+ # @private
739
+ class Representation < Google::Apis::Core::JsonRepresentation
740
+ property :assignee_mode, as: 'assigneeMode'
741
+ property :modify_individual_students_options, as: 'modifyIndividualStudentsOptions', class: Google::Apis::ClassroomV1::ModifyIndividualStudentsOptions, decorator: Google::Apis::ClassroomV1::ModifyIndividualStudentsOptions::Representation
742
+
743
+ end
744
+ end
745
+
614
746
  class ModifyAttachmentsRequest
615
747
  # @private
616
748
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -619,6 +751,23 @@ module Google
619
751
  end
620
752
  end
621
753
 
754
+ class ModifyCourseWorkAssigneesRequest
755
+ # @private
756
+ class Representation < Google::Apis::Core::JsonRepresentation
757
+ property :assignee_mode, as: 'assigneeMode'
758
+ property :modify_individual_students_options, as: 'modifyIndividualStudentsOptions', class: Google::Apis::ClassroomV1::ModifyIndividualStudentsOptions, decorator: Google::Apis::ClassroomV1::ModifyIndividualStudentsOptions::Representation
759
+
760
+ end
761
+ end
762
+
763
+ class ModifyIndividualStudentsOptions
764
+ # @private
765
+ class Representation < Google::Apis::Core::JsonRepresentation
766
+ collection :add_student_ids, as: 'addStudentIds'
767
+ collection :remove_student_ids, as: 'removeStudentIds'
768
+ end
769
+ end
770
+
622
771
  class MultipleChoiceQuestion
623
772
  # @private
624
773
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -648,6 +797,18 @@ module Google
648
797
  end
649
798
  end
650
799
 
800
+ class Registration
801
+ # @private
802
+ class Representation < Google::Apis::Core::JsonRepresentation
803
+ property :cloud_pubsub_topic, as: 'cloudPubsubTopic', class: Google::Apis::ClassroomV1::CloudPubsubTopic, decorator: Google::Apis::ClassroomV1::CloudPubsubTopic::Representation
804
+
805
+ property :expiry_time, as: 'expiryTime'
806
+ property :feed, as: 'feed', class: Google::Apis::ClassroomV1::Feed, decorator: Google::Apis::ClassroomV1::Feed::Representation
807
+
808
+ property :registration_id, as: 'registrationId'
809
+ end
810
+ end
811
+
651
812
  class ReturnStudentSubmissionRequest
652
813
  # @private
653
814
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -460,6 +460,301 @@ module Google
460
460
  execute_or_queue_command(command, &block)
461
461
  end
462
462
 
463
+ # Creates an announcement.
464
+ # This method returns the following error codes:
465
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
466
+ # requested course, create announcements in the requested course, share a
467
+ # Drive attachment, or for access errors.
468
+ # * `INVALID_ARGUMENT` if the request is malformed.
469
+ # * `NOT_FOUND` if the requested course does not exist.
470
+ # * `FAILED_PRECONDITION` for the following request error:
471
+ # * AttachmentNotVisible
472
+ # @param [String] course_id
473
+ # Identifier of the course.
474
+ # This identifier can be either the Classroom-assigned identifier or an
475
+ # alias.
476
+ # @param [Google::Apis::ClassroomV1::Announcement] announcement_object
477
+ # @param [String] fields
478
+ # Selector specifying which fields to include in a partial response.
479
+ # @param [String] quota_user
480
+ # Available to use for quota purposes for server-side applications. Can be any
481
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
482
+ # @param [Google::Apis::RequestOptions] options
483
+ # Request-specific options
484
+ #
485
+ # @yield [result, err] Result & error if block supplied
486
+ # @yieldparam result [Google::Apis::ClassroomV1::Announcement] parsed result object
487
+ # @yieldparam err [StandardError] error object if request failed
488
+ #
489
+ # @return [Google::Apis::ClassroomV1::Announcement]
490
+ #
491
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
492
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
493
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
494
+ def create_course_announcement(course_id, announcement_object = nil, fields: nil, quota_user: nil, options: nil, &block)
495
+ command = make_simple_command(:post, 'v1/courses/{courseId}/announcements', options)
496
+ command.request_representation = Google::Apis::ClassroomV1::Announcement::Representation
497
+ command.request_object = announcement_object
498
+ command.response_representation = Google::Apis::ClassroomV1::Announcement::Representation
499
+ command.response_class = Google::Apis::ClassroomV1::Announcement
500
+ command.params['courseId'] = course_id unless course_id.nil?
501
+ command.query['fields'] = fields unless fields.nil?
502
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
503
+ execute_or_queue_command(command, &block)
504
+ end
505
+
506
+ # Deletes an announcement.
507
+ # This request must be made by the Developer Console project of the
508
+ # [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to
509
+ # create the corresponding announcement item.
510
+ # This method returns the following error codes:
511
+ # * `PERMISSION_DENIED` if the requesting developer project did not create
512
+ # the corresponding announcement, if the requesting user is not permitted
513
+ # to delete the requested course or for access errors.
514
+ # * `FAILED_PRECONDITION` if the requested announcement has already been
515
+ # deleted.
516
+ # * `NOT_FOUND` if no course exists with the requested ID.
517
+ # @param [String] course_id
518
+ # Identifier of the course.
519
+ # This identifier can be either the Classroom-assigned identifier or an
520
+ # alias.
521
+ # @param [String] id
522
+ # Identifier of the announcement to delete.
523
+ # This identifier is a Classroom-assigned identifier.
524
+ # @param [String] fields
525
+ # Selector specifying which fields to include in a partial response.
526
+ # @param [String] quota_user
527
+ # Available to use for quota purposes for server-side applications. Can be any
528
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
529
+ # @param [Google::Apis::RequestOptions] options
530
+ # Request-specific options
531
+ #
532
+ # @yield [result, err] Result & error if block supplied
533
+ # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
534
+ # @yieldparam err [StandardError] error object if request failed
535
+ #
536
+ # @return [Google::Apis::ClassroomV1::Empty]
537
+ #
538
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
539
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
540
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
541
+ def delete_course_announcement(course_id, id, fields: nil, quota_user: nil, options: nil, &block)
542
+ command = make_simple_command(:delete, 'v1/courses/{courseId}/announcements/{id}', options)
543
+ command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
544
+ command.response_class = Google::Apis::ClassroomV1::Empty
545
+ command.params['courseId'] = course_id unless course_id.nil?
546
+ command.params['id'] = id unless id.nil?
547
+ command.query['fields'] = fields unless fields.nil?
548
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
549
+ execute_or_queue_command(command, &block)
550
+ end
551
+
552
+ # Returns an announcement.
553
+ # This method returns the following error codes:
554
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
555
+ # requested course or announcement, or for access errors.
556
+ # * `INVALID_ARGUMENT` if the request is malformed.
557
+ # * `NOT_FOUND` if the requested course or announcement does not exist.
558
+ # @param [String] course_id
559
+ # Identifier of the course.
560
+ # This identifier can be either the Classroom-assigned identifier or an
561
+ # alias.
562
+ # @param [String] id
563
+ # Identifier of the announcement.
564
+ # @param [String] fields
565
+ # Selector specifying which fields to include in a partial response.
566
+ # @param [String] quota_user
567
+ # Available to use for quota purposes for server-side applications. Can be any
568
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
569
+ # @param [Google::Apis::RequestOptions] options
570
+ # Request-specific options
571
+ #
572
+ # @yield [result, err] Result & error if block supplied
573
+ # @yieldparam result [Google::Apis::ClassroomV1::Announcement] parsed result object
574
+ # @yieldparam err [StandardError] error object if request failed
575
+ #
576
+ # @return [Google::Apis::ClassroomV1::Announcement]
577
+ #
578
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
579
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
580
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
581
+ def get_course_announcement(course_id, id, fields: nil, quota_user: nil, options: nil, &block)
582
+ command = make_simple_command(:get, 'v1/courses/{courseId}/announcements/{id}', options)
583
+ command.response_representation = Google::Apis::ClassroomV1::Announcement::Representation
584
+ command.response_class = Google::Apis::ClassroomV1::Announcement
585
+ command.params['courseId'] = course_id unless course_id.nil?
586
+ command.params['id'] = id unless id.nil?
587
+ command.query['fields'] = fields unless fields.nil?
588
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
589
+ execute_or_queue_command(command, &block)
590
+ end
591
+
592
+ # Returns a list of announcements that the requester is permitted to view.
593
+ # Course students may only view `PUBLISHED` announcements. Course teachers
594
+ # and domain administrators may view all announcements.
595
+ # This method returns the following error codes:
596
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access
597
+ # the requested course or for access errors.
598
+ # * `INVALID_ARGUMENT` if the request is malformed.
599
+ # * `NOT_FOUND` if the requested course does not exist.
600
+ # @param [String] course_id
601
+ # Identifier of the course.
602
+ # This identifier can be either the Classroom-assigned identifier or an
603
+ # alias.
604
+ # @param [Array<String>, String] announcement_states
605
+ # Restriction on the `state` of announcements returned.
606
+ # If this argument is left unspecified, the default value is `PUBLISHED`.
607
+ # @param [String] order_by
608
+ # Optional sort ordering for results. A comma-separated list of fields with
609
+ # an optional sort direction keyword. Supported field is `updateTime`.
610
+ # Supported direction keywords are `asc` and `desc`.
611
+ # If not specified, `updateTime desc` is the default behavior.
612
+ # Examples: `updateTime asc`, `updateTime`
613
+ # @param [Fixnum] page_size
614
+ # Maximum number of items to return. Zero or unspecified indicates that the
615
+ # server may assign a maximum.
616
+ # The server may return fewer than the specified number of results.
617
+ # @param [String] page_token
618
+ # nextPageToken
619
+ # value returned from a previous
620
+ # list call,
621
+ # indicating that the subsequent page of results should be returned.
622
+ # The list request
623
+ # must be otherwise identical to the one that resulted in this token.
624
+ # @param [String] fields
625
+ # Selector specifying which fields to include in a partial response.
626
+ # @param [String] quota_user
627
+ # Available to use for quota purposes for server-side applications. Can be any
628
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
629
+ # @param [Google::Apis::RequestOptions] options
630
+ # Request-specific options
631
+ #
632
+ # @yield [result, err] Result & error if block supplied
633
+ # @yieldparam result [Google::Apis::ClassroomV1::ListAnnouncementsResponse] parsed result object
634
+ # @yieldparam err [StandardError] error object if request failed
635
+ #
636
+ # @return [Google::Apis::ClassroomV1::ListAnnouncementsResponse]
637
+ #
638
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
639
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
640
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
641
+ def list_course_announcements(course_id, announcement_states: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
642
+ command = make_simple_command(:get, 'v1/courses/{courseId}/announcements', options)
643
+ command.response_representation = Google::Apis::ClassroomV1::ListAnnouncementsResponse::Representation
644
+ command.response_class = Google::Apis::ClassroomV1::ListAnnouncementsResponse
645
+ command.params['courseId'] = course_id unless course_id.nil?
646
+ command.query['announcementStates'] = announcement_states unless announcement_states.nil?
647
+ command.query['orderBy'] = order_by unless order_by.nil?
648
+ command.query['pageSize'] = page_size unless page_size.nil?
649
+ command.query['pageToken'] = page_token unless page_token.nil?
650
+ command.query['fields'] = fields unless fields.nil?
651
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
652
+ execute_or_queue_command(command, &block)
653
+ end
654
+
655
+ # Modifies assignee mode and options of an announcement.
656
+ # Only a teacher of the course that contains the announcement may
657
+ # call this method.
658
+ # This method returns the following error codes:
659
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
660
+ # requested course or course work or for access errors.
661
+ # * `INVALID_ARGUMENT` if the request is malformed.
662
+ # * `NOT_FOUND` if the requested course or course work does not exist.
663
+ # @param [String] course_id
664
+ # Identifier of the course.
665
+ # This identifier can be either the Classroom-assigned identifier or an
666
+ # alias.
667
+ # @param [String] id
668
+ # Identifier of the announcement.
669
+ # @param [Google::Apis::ClassroomV1::ModifyAnnouncementAssigneesRequest] modify_announcement_assignees_request_object
670
+ # @param [String] fields
671
+ # Selector specifying which fields to include in a partial response.
672
+ # @param [String] quota_user
673
+ # Available to use for quota purposes for server-side applications. Can be any
674
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
675
+ # @param [Google::Apis::RequestOptions] options
676
+ # Request-specific options
677
+ #
678
+ # @yield [result, err] Result & error if block supplied
679
+ # @yieldparam result [Google::Apis::ClassroomV1::Announcement] parsed result object
680
+ # @yieldparam err [StandardError] error object if request failed
681
+ #
682
+ # @return [Google::Apis::ClassroomV1::Announcement]
683
+ #
684
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
685
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
686
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
687
+ def modify_course_announcement_assignees(course_id, id, modify_announcement_assignees_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
688
+ command = make_simple_command(:post, 'v1/courses/{courseId}/announcements/{id}:modifyAssignees', options)
689
+ command.request_representation = Google::Apis::ClassroomV1::ModifyAnnouncementAssigneesRequest::Representation
690
+ command.request_object = modify_announcement_assignees_request_object
691
+ command.response_representation = Google::Apis::ClassroomV1::Announcement::Representation
692
+ command.response_class = Google::Apis::ClassroomV1::Announcement
693
+ command.params['courseId'] = course_id unless course_id.nil?
694
+ command.params['id'] = id unless id.nil?
695
+ command.query['fields'] = fields unless fields.nil?
696
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
697
+ execute_or_queue_command(command, &block)
698
+ end
699
+
700
+ # Updates one or more fields of an announcement.
701
+ # This method returns the following error codes:
702
+ # * `PERMISSION_DENIED` if the requesting developer project did not create
703
+ # the corresponding announcement or for access errors.
704
+ # * `INVALID_ARGUMENT` if the request is malformed.
705
+ # * `FAILED_PRECONDITION` if the requested announcement has already been
706
+ # deleted.
707
+ # * `NOT_FOUND` if the requested course or announcement does not exist
708
+ # @param [String] course_id
709
+ # Identifier of the course.
710
+ # This identifier can be either the Classroom-assigned identifier or an
711
+ # alias.
712
+ # @param [String] id
713
+ # Identifier of the announcement.
714
+ # @param [Google::Apis::ClassroomV1::Announcement] announcement_object
715
+ # @param [String] update_mask
716
+ # Mask that identifies which fields on the announcement to update.
717
+ # This field is required to do an update. The update fails if invalid
718
+ # fields are specified. If a field supports empty values, it can be cleared
719
+ # by specifying it in the update mask and not in the Announcement object. If
720
+ # a field that does not support empty values is included in the update mask
721
+ # and not set in the Announcement object, an `INVALID_ARGUMENT` error will be
722
+ # returned.
723
+ # The following fields may be specified by teachers:
724
+ # * `text`
725
+ # * `state`
726
+ # * `scheduled_time`
727
+ # @param [String] fields
728
+ # Selector specifying which fields to include in a partial response.
729
+ # @param [String] quota_user
730
+ # Available to use for quota purposes for server-side applications. Can be any
731
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
732
+ # @param [Google::Apis::RequestOptions] options
733
+ # Request-specific options
734
+ #
735
+ # @yield [result, err] Result & error if block supplied
736
+ # @yieldparam result [Google::Apis::ClassroomV1::Announcement] parsed result object
737
+ # @yieldparam err [StandardError] error object if request failed
738
+ #
739
+ # @return [Google::Apis::ClassroomV1::Announcement]
740
+ #
741
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
742
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
743
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
744
+ def patch_course_announcement(course_id, id, announcement_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
745
+ command = make_simple_command(:patch, 'v1/courses/{courseId}/announcements/{id}', options)
746
+ command.request_representation = Google::Apis::ClassroomV1::Announcement::Representation
747
+ command.request_object = announcement_object
748
+ command.response_representation = Google::Apis::ClassroomV1::Announcement::Representation
749
+ command.response_class = Google::Apis::ClassroomV1::Announcement
750
+ command.params['courseId'] = course_id unless course_id.nil?
751
+ command.params['id'] = id unless id.nil?
752
+ command.query['updateMask'] = update_mask unless update_mask.nil?
753
+ command.query['fields'] = fields unless fields.nil?
754
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
755
+ execute_or_queue_command(command, &block)
756
+ end
757
+
463
758
  # Creates course work.
464
759
  # The resulting course work (and corresponding student submissions) are
465
760
  # associated with the Developer Console project of the
@@ -659,6 +954,51 @@ module Google
659
954
  execute_or_queue_command(command, &block)
660
955
  end
661
956
 
957
+ # Modifies assignee mode and options of a coursework.
958
+ # Only a teacher of the course that contains the coursework may
959
+ # call this method.
960
+ # This method returns the following error codes:
961
+ # * `PERMISSION_DENIED` if the requesting user is not permitted to access the
962
+ # requested course or course work or for access errors.
963
+ # * `INVALID_ARGUMENT` if the request is malformed.
964
+ # * `NOT_FOUND` if the requested course or course work does not exist.
965
+ # @param [String] course_id
966
+ # Identifier of the course.
967
+ # This identifier can be either the Classroom-assigned identifier or an
968
+ # alias.
969
+ # @param [String] id
970
+ # Identifier of the coursework.
971
+ # @param [Google::Apis::ClassroomV1::ModifyCourseWorkAssigneesRequest] modify_course_work_assignees_request_object
972
+ # @param [String] fields
973
+ # Selector specifying which fields to include in a partial response.
974
+ # @param [String] quota_user
975
+ # Available to use for quota purposes for server-side applications. Can be any
976
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
977
+ # @param [Google::Apis::RequestOptions] options
978
+ # Request-specific options
979
+ #
980
+ # @yield [result, err] Result & error if block supplied
981
+ # @yieldparam result [Google::Apis::ClassroomV1::CourseWork] parsed result object
982
+ # @yieldparam err [StandardError] error object if request failed
983
+ #
984
+ # @return [Google::Apis::ClassroomV1::CourseWork]
985
+ #
986
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
987
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
988
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
989
+ def modify_course_course_work_assignees(course_id, id, modify_course_work_assignees_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
990
+ command = make_simple_command(:post, 'v1/courses/{courseId}/courseWork/{id}:modifyAssignees', options)
991
+ command.request_representation = Google::Apis::ClassroomV1::ModifyCourseWorkAssigneesRequest::Representation
992
+ command.request_object = modify_course_work_assignees_request_object
993
+ command.response_representation = Google::Apis::ClassroomV1::CourseWork::Representation
994
+ command.response_class = Google::Apis::ClassroomV1::CourseWork
995
+ command.params['courseId'] = course_id unless course_id.nil?
996
+ command.params['id'] = id unless id.nil?
997
+ command.query['fields'] = fields unless fields.nil?
998
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
999
+ execute_or_queue_command(command, &block)
1000
+ end
1001
+
662
1002
  # Updates one or more fields of a course work.
663
1003
  # See google.classroom.v1.CourseWork for details
664
1004
  # of which fields may be updated and who may change them.
@@ -1711,6 +2051,92 @@ module Google
1711
2051
  execute_or_queue_command(command, &block)
1712
2052
  end
1713
2053
 
2054
+ # Creates a `Registration`, causing Classroom to start sending notifications
2055
+ # from the provided `feed` to the provided `destination`.
2056
+ # Returns the created `Registration`. Currently, this will be the same as
2057
+ # the argument, but with server-assigned fields such as `expiry_time` and
2058
+ # `id` filled in.
2059
+ # Note that any value specified for the `expiry_time` or `id` fields will be
2060
+ # ignored.
2061
+ # While Classroom may validate the `destination` and return errors on a best
2062
+ # effort basis, it is the caller's responsibility to ensure that it exists
2063
+ # and that Classroom has permission to publish to it.
2064
+ # This method may return the following error codes:
2065
+ # * `PERMISSION_DENIED` if:
2066
+ # * the authenticated user does not have permission to receive
2067
+ # notifications from the requested field; or
2068
+ # * the credential provided does not include the appropriate scope for the
2069
+ # requested feed.
2070
+ # * another access error is encountered.
2071
+ # * `INVALID_ARGUMENT` if:
2072
+ # * no `destination` is specified, or the specified `destination` is not
2073
+ # valid; or
2074
+ # * no `feed` is specified, or the specified `feed` is not valid.
2075
+ # * `NOT_FOUND` if:
2076
+ # * the specified `feed` cannot be located, or the requesting user does not
2077
+ # have permission to determine whether or not it exists; or
2078
+ # * the specified `destination` cannot be located, or Classroom has not
2079
+ # been granted permission to publish to it.
2080
+ # @param [Google::Apis::ClassroomV1::Registration] registration_object
2081
+ # @param [String] fields
2082
+ # Selector specifying which fields to include in a partial response.
2083
+ # @param [String] quota_user
2084
+ # Available to use for quota purposes for server-side applications. Can be any
2085
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2086
+ # @param [Google::Apis::RequestOptions] options
2087
+ # Request-specific options
2088
+ #
2089
+ # @yield [result, err] Result & error if block supplied
2090
+ # @yieldparam result [Google::Apis::ClassroomV1::Registration] parsed result object
2091
+ # @yieldparam err [StandardError] error object if request failed
2092
+ #
2093
+ # @return [Google::Apis::ClassroomV1::Registration]
2094
+ #
2095
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2096
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2097
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2098
+ def create_registration(registration_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2099
+ command = make_simple_command(:post, 'v1/registrations', options)
2100
+ command.request_representation = Google::Apis::ClassroomV1::Registration::Representation
2101
+ command.request_object = registration_object
2102
+ command.response_representation = Google::Apis::ClassroomV1::Registration::Representation
2103
+ command.response_class = Google::Apis::ClassroomV1::Registration
2104
+ command.query['fields'] = fields unless fields.nil?
2105
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2106
+ execute_or_queue_command(command, &block)
2107
+ end
2108
+
2109
+ # Deletes a `Registration`, causing Classroom to stop sending notifications
2110
+ # for that `Registration`.
2111
+ # @param [String] registration_id
2112
+ # The `registration_id` of the `Registration` to be deleted.
2113
+ # @param [String] fields
2114
+ # Selector specifying which fields to include in a partial response.
2115
+ # @param [String] quota_user
2116
+ # Available to use for quota purposes for server-side applications. Can be any
2117
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2118
+ # @param [Google::Apis::RequestOptions] options
2119
+ # Request-specific options
2120
+ #
2121
+ # @yield [result, err] Result & error if block supplied
2122
+ # @yieldparam result [Google::Apis::ClassroomV1::Empty] parsed result object
2123
+ # @yieldparam err [StandardError] error object if request failed
2124
+ #
2125
+ # @return [Google::Apis::ClassroomV1::Empty]
2126
+ #
2127
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2128
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2129
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2130
+ def delete_registration(registration_id, fields: nil, quota_user: nil, options: nil, &block)
2131
+ command = make_simple_command(:delete, 'v1/registrations/{registrationId}', options)
2132
+ command.response_representation = Google::Apis::ClassroomV1::Empty::Representation
2133
+ command.response_class = Google::Apis::ClassroomV1::Empty
2134
+ command.params['registrationId'] = registration_id unless registration_id.nil?
2135
+ command.query['fields'] = fields unless fields.nil?
2136
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2137
+ execute_or_queue_command(command, &block)
2138
+ end
2139
+
1714
2140
  # Returns a user profile.
1715
2141
  # This method returns the following error codes:
1716
2142
  # * `PERMISSION_DENIED` if the requesting user is not permitted to access