Class: FlatApi::ClassAssignment
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- FlatApi::ClassAssignment
- Defined in:
- lib/flat_api/models/class_assignment.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#allow_backing_track ⇒ Object
For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing.
-
#allow_metronome ⇒ Object
For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time.
-
#allow_speed_change ⇒ Object
For performance assignments: whether students can adjust the playback speed of the score during recording.
-
#assigned_groups ⇒ Object
Groups that have access to the assignment (for shared writing assignments).
-
#assigned_students ⇒ Object
Identifiers for the students that have access to the assignment.
-
#assignee_mode ⇒ Object
Possible modes of assigning assignments.
-
#attachments ⇒ Object
Reference material handed to the students with the assignment: scores, videos, links and Drive files.
-
#canvas ⇒ Object
Returns the value of attribute canvas.
-
#capabilities ⇒ Object
Returns the value of attribute capabilities.
-
#classroom ⇒ Object
The unique identifier of the class where this assignment was posted.
-
#cover ⇒ Object
The URL of the cover to display.
-
#cover_file ⇒ Object
The id of the cover to display.
-
#creation_date ⇒ Object
The creation date of this assignment.
-
#creator ⇒ Object
The User unique identifier of the creator of this assignment.
-
#description ⇒ Object
Student instructions and content of the assignment (plain text).
-
#description_html ⇒ Object
HTML version of student instructions with rich text formatting.
-
#due_date ⇒ Object
The due date of this assignment, late submissions will be marked as paste due.
-
#free_record ⇒ Object
For performance assignments: "Free Record" mode.
-
#google_classroom ⇒ Object
Returns the value of attribute google_classroom.
-
#id ⇒ Object
Unique identifier of the assignment.
-
#issue ⇒ Object
Detected issue for this assignment.
-
#lti ⇒ Object
Returns the value of attribute lti.
-
#max_points ⇒ Object
If set, the grading will be enabled for the assignement.
-
#mfc ⇒ Object
Returns the value of attribute mfc.
-
#microsoft_graph ⇒ Object
Returns the value of attribute microsoft_graph.
-
#nb_playback_authorized ⇒ Object
The number of playback authorized on the scores of the assignment.
-
#recording_type ⇒ Object
For performance assignments: recording type that will be either 'audio' or 'video'.
-
#release_grades ⇒ Object
For worksheets, how grading will work for the assignment: - If set to
auto, the grades will be automatically released when the student submits the submissions - If set tomanual, the grades will only be set asdraftGradeand will be released when the teacher returns the submissions. -
#restrict_play_note ⇒ Object
Restrict the ability to get an audio feedback every time a student adds or selects a note.
-
#restrict_to_audio_tracks ⇒ Object
Restrict the audio source to provided audio tracks on a score.
-
#scheduled_date ⇒ Object
The publication (scheduled) date of the assignment.
-
#shuffle_exercises ⇒ Object
Mixing worksheets exercises for each student.
-
#state ⇒ Object
State of the assignment.
-
#submission_students_mode ⇒ Object
Returns the value of attribute submission_students_mode.
-
#submissions ⇒ Object
Returns the value of attribute submissions.
-
#teacher_instructions ⇒ Object
Teacher-only instructions for this assignment.
-
#teacher_instructions_html ⇒ Object
HTML version of teacher-only instructions with rich text formatting.
-
#title ⇒ Object
Title of the assignment.
-
#toolset ⇒ Object
The id of the associated toolset.
-
#type ⇒ Object
Returns the value of attribute type.
-
#use_dedicated_attachments ⇒ Object
For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3).
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ClassAssignment
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ ClassAssignment
Initializes the object
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 |
# File 'lib/flat_api/models/class_assignment.rb', line 273 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `FlatApi::ClassAssignment` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `FlatApi::ClassAssignment`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'id') self.id = attributes[:'id'] else self.id = nil end if attributes.key?(:'type') self.type = attributes[:'type'] else self.type = nil end if attributes.key?(:'capabilities') self.capabilities = attributes[:'capabilities'] else self.capabilities = nil end if attributes.key?(:'title') self.title = attributes[:'title'] else self.title = nil end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'description_html') self.description_html = attributes[:'description_html'] end if attributes.key?(:'teacher_instructions') self.teacher_instructions = attributes[:'teacher_instructions'] end if attributes.key?(:'teacher_instructions_html') self.teacher_instructions_html = attributes[:'teacher_instructions_html'] end if attributes.key?(:'cover') self.cover = attributes[:'cover'] end if attributes.key?(:'cover_file') self.cover_file = attributes[:'cover_file'] end if attributes.key?(:'attachments') if (value = attributes[:'attachments']).is_a?(Array) self. = value end else self. = nil end if attributes.key?(:'use_dedicated_attachments') self. = attributes[:'use_dedicated_attachments'] end if attributes.key?(:'max_points') self.max_points = attributes[:'max_points'] end if attributes.key?(:'release_grades') self.release_grades = attributes[:'release_grades'] end if attributes.key?(:'shuffle_exercises') self.shuffle_exercises = attributes[:'shuffle_exercises'] end if attributes.key?(:'toolset') self.toolset = attributes[:'toolset'] end if attributes.key?(:'nb_playback_authorized') self. = attributes[:'nb_playback_authorized'] end if attributes.key?(:'restrict_play_note') self.restrict_play_note = attributes[:'restrict_play_note'] end if attributes.key?(:'restrict_to_audio_tracks') self.restrict_to_audio_tracks = attributes[:'restrict_to_audio_tracks'] end if attributes.key?(:'submission_students_mode') self.submission_students_mode = attributes[:'submission_students_mode'] end if attributes.key?(:'recording_type') self.recording_type = attributes[:'recording_type'] end if attributes.key?(:'allow_metronome') self.allow_metronome = attributes[:'allow_metronome'] end if attributes.key?(:'allow_backing_track') self.allow_backing_track = attributes[:'allow_backing_track'] end if attributes.key?(:'allow_speed_change') self.allow_speed_change = attributes[:'allow_speed_change'] end if attributes.key?(:'free_record') self.free_record = attributes[:'free_record'] end if attributes.key?(:'creator') self.creator = attributes[:'creator'] end if attributes.key?(:'state') self.state = attributes[:'state'] else self.state = nil end if attributes.key?(:'classroom') self.classroom = attributes[:'classroom'] end if attributes.key?(:'creation_date') self.creation_date = attributes[:'creation_date'] else self.creation_date = nil end if attributes.key?(:'scheduled_date') self.scheduled_date = attributes[:'scheduled_date'] end if attributes.key?(:'due_date') self.due_date = attributes[:'due_date'] end if attributes.key?(:'assignee_mode') self.assignee_mode = attributes[:'assignee_mode'] end if attributes.key?(:'assigned_students') if (value = attributes[:'assigned_students']).is_a?(Array) self.assigned_students = value end end if attributes.key?(:'assigned_groups') if (value = attributes[:'assigned_groups']).is_a?(Array) self.assigned_groups = value end end if attributes.key?(:'submissions') if (value = attributes[:'submissions']).is_a?(Array) self.submissions = value end else self.submissions = nil end if attributes.key?(:'google_classroom') self.google_classroom = attributes[:'google_classroom'] end if attributes.key?(:'microsoft_graph') self.microsoft_graph = attributes[:'microsoft_graph'] end if attributes.key?(:'mfc') self.mfc = attributes[:'mfc'] end if attributes.key?(:'canvas') self.canvas = attributes[:'canvas'] end if attributes.key?(:'lti') self.lti = attributes[:'lti'] end if attributes.key?(:'issue') self.issue = attributes[:'issue'] end end |
Instance Attribute Details
#allow_backing_track ⇒ Object
For performance assignments: Enable students to listen to the accompaniment without their instrument part while they are playing. Only set when type is 'performance'.
82 83 84 |
# File 'lib/flat_api/models/class_assignment.rb', line 82 def allow_backing_track @allow_backing_track end |
#allow_metronome ⇒ Object
For performance assignments: Enable students to use the metronome while they are recording, helping them stay in time. Only set when type is 'performance'.
79 80 81 |
# File 'lib/flat_api/models/class_assignment.rb', line 79 def allow_metronome @allow_metronome end |
#allow_speed_change ⇒ Object
For performance assignments: whether students can adjust the playback speed of the score during recording. * true: Students can change the tempo/speed during practice and recording * false: Tempo is fixed to the original score tempo Only set when type is 'performance'.
85 86 87 |
# File 'lib/flat_api/models/class_assignment.rb', line 85 def allow_speed_change @allow_speed_change end |
#assigned_groups ⇒ Object
Groups that have access to the assignment (for shared writing assignments)
115 116 117 |
# File 'lib/flat_api/models/class_assignment.rb', line 115 def assigned_groups @assigned_groups end |
#assigned_students ⇒ Object
Identifiers for the students that have access to the assignment
112 113 114 |
# File 'lib/flat_api/models/class_assignment.rb', line 112 def assigned_students @assigned_students end |
#assignee_mode ⇒ Object
Possible modes of assigning assignments
109 110 111 |
# File 'lib/flat_api/models/class_assignment.rb', line 109 def assignee_mode @assignee_mode end |
#attachments ⇒ Object
Reference material handed to the students with the assignment: scores, videos, links and Drive files. A score attached here is the one each student receives their own copy of.
47 48 49 |
# File 'lib/flat_api/models/class_assignment.rb', line 47 def @attachments end |
#canvas ⇒ Object
Returns the value of attribute canvas.
125 126 127 |
# File 'lib/flat_api/models/class_assignment.rb', line 125 def canvas @canvas end |
#capabilities ⇒ Object
Returns the value of attribute capabilities.
23 24 25 |
# File 'lib/flat_api/models/class_assignment.rb', line 23 def capabilities @capabilities end |
#classroom ⇒ Object
The unique identifier of the class where this assignment was posted
97 98 99 |
# File 'lib/flat_api/models/class_assignment.rb', line 97 def classroom @classroom end |
#cover ⇒ Object
The URL of the cover to display
41 42 43 |
# File 'lib/flat_api/models/class_assignment.rb', line 41 def cover @cover end |
#cover_file ⇒ Object
The id of the cover to display
44 45 46 |
# File 'lib/flat_api/models/class_assignment.rb', line 44 def cover_file @cover_file end |
#creation_date ⇒ Object
The creation date of this assignment
100 101 102 |
# File 'lib/flat_api/models/class_assignment.rb', line 100 def creation_date @creation_date end |
#creator ⇒ Object
The User unique identifier of the creator of this assignment
91 92 93 |
# File 'lib/flat_api/models/class_assignment.rb', line 91 def creator @creator end |
#description ⇒ Object
Student instructions and content of the assignment (plain text)
29 30 31 |
# File 'lib/flat_api/models/class_assignment.rb', line 29 def description @description end |
#description_html ⇒ Object
HTML version of student instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs.
32 33 34 |
# File 'lib/flat_api/models/class_assignment.rb', line 32 def description_html @description_html end |
#due_date ⇒ Object
The due date of this assignment, late submissions will be marked as paste due.
106 107 108 |
# File 'lib/flat_api/models/class_assignment.rb', line 106 def due_date @due_date end |
#free_record ⇒ Object
For performance assignments: "Free Record" mode. When true, no score is attached to the assignment. Students freely record a varied repertoire or an ensemble performance without being constrained by a single score's structure or duration, and all score-dependent options (playback, metronome, backtracking, speed control) are hidden. Only set when type is 'performance'.
88 89 90 |
# File 'lib/flat_api/models/class_assignment.rb', line 88 def free_record @free_record end |
#google_classroom ⇒ Object
Returns the value of attribute google_classroom.
119 120 121 |
# File 'lib/flat_api/models/class_assignment.rb', line 119 def google_classroom @google_classroom end |
#id ⇒ Object
Unique identifier of the assignment
19 20 21 |
# File 'lib/flat_api/models/class_assignment.rb', line 19 def id @id end |
#issue ⇒ Object
Detected issue for this assignment
130 131 132 |
# File 'lib/flat_api/models/class_assignment.rb', line 130 def issue @issue end |
#lti ⇒ Object
Returns the value of attribute lti.
127 128 129 |
# File 'lib/flat_api/models/class_assignment.rb', line 127 def lti @lti end |
#max_points ⇒ Object
If set, the grading will be enabled for the assignement
53 54 55 |
# File 'lib/flat_api/models/class_assignment.rb', line 53 def max_points @max_points end |
#mfc ⇒ Object
Returns the value of attribute mfc.
123 124 125 |
# File 'lib/flat_api/models/class_assignment.rb', line 123 def mfc @mfc end |
#microsoft_graph ⇒ Object
Returns the value of attribute microsoft_graph.
121 122 123 |
# File 'lib/flat_api/models/class_assignment.rb', line 121 def microsoft_graph @microsoft_graph end |
#nb_playback_authorized ⇒ Object
The number of playback authorized on the scores of the assignment.
65 66 67 |
# File 'lib/flat_api/models/class_assignment.rb', line 65 def @nb_playback_authorized end |
#recording_type ⇒ Object
For performance assignments: recording type that will be either 'audio' or 'video'. * audio: Only audio will be required during the recording. * video: Camera will be required during the recording. Only set when type is 'performance'.
76 77 78 |
# File 'lib/flat_api/models/class_assignment.rb', line 76 def recording_type @recording_type end |
#release_grades ⇒ Object
For worksheets, how grading will work for the assignment: - If set to auto, the grades will be automatically released when the student submits the submissions - If set to manual, the grades will only be set as draftGrade and will be released when the teacher returns the submissions
56 57 58 |
# File 'lib/flat_api/models/class_assignment.rb', line 56 def release_grades @release_grades end |
#restrict_play_note ⇒ Object
Restrict the ability to get an audio feedback every time a student adds or selects a note.
68 69 70 |
# File 'lib/flat_api/models/class_assignment.rb', line 68 def restrict_play_note @restrict_play_note end |
#restrict_to_audio_tracks ⇒ Object
Restrict the audio source to provided audio tracks on a score. Students won't be able to use the editor playback.
71 72 73 |
# File 'lib/flat_api/models/class_assignment.rb', line 71 def restrict_to_audio_tracks @restrict_to_audio_tracks end |
#scheduled_date ⇒ Object
The publication (scheduled) date of the assignment. If this one is specified, the assignment will only be listed to the teachers of the class.
103 104 105 |
# File 'lib/flat_api/models/class_assignment.rb', line 103 def scheduled_date @scheduled_date end |
#shuffle_exercises ⇒ Object
Mixing worksheets exercises for each student
59 60 61 |
# File 'lib/flat_api/models/class_assignment.rb', line 59 def shuffle_exercises @shuffle_exercises end |
#state ⇒ Object
State of the assignment
94 95 96 |
# File 'lib/flat_api/models/class_assignment.rb', line 94 def state @state end |
#submission_students_mode ⇒ Object
Returns the value of attribute submission_students_mode.
73 74 75 |
# File 'lib/flat_api/models/class_assignment.rb', line 73 def submission_students_mode @submission_students_mode end |
#submissions ⇒ Object
Returns the value of attribute submissions.
117 118 119 |
# File 'lib/flat_api/models/class_assignment.rb', line 117 def submissions @submissions end |
#teacher_instructions ⇒ Object
Teacher-only instructions for this assignment. These instructions are only visible to teachers and are not returned when students view the assignment. If teacherInstructionsHtml is provided, this field will contain the plain text version for compatibility.
35 36 37 |
# File 'lib/flat_api/models/class_assignment.rb', line 35 def teacher_instructions @teacher_instructions end |
#teacher_instructions_html ⇒ Object
HTML version of teacher-only instructions with rich text formatting. Supports the following HTML tags: p, br, strong, b, em, i, u, a, ul, ol, li, h1, h2, h3, img. Images are served as absolute http(s) URLs.
38 39 40 |
# File 'lib/flat_api/models/class_assignment.rb', line 38 def teacher_instructions_html @teacher_instructions_html end |
#title ⇒ Object
Title of the assignment
26 27 28 |
# File 'lib/flat_api/models/class_assignment.rb', line 26 def title @title end |
#toolset ⇒ Object
The id of the associated toolset
62 63 64 |
# File 'lib/flat_api/models/class_assignment.rb', line 62 def toolset @toolset end |
#type ⇒ Object
Returns the value of attribute type.
21 22 23 |
# File 'lib/flat_api/models/class_assignment.rb', line 21 def type @type end |
#use_dedicated_attachments ⇒ Object
For all assignments created after 02/2023, all the underlying resources must be dedicated and stored in the assignment. This boolean indicates that this assignment only supports dedicated attachments.
50 51 52 |
# File 'lib/flat_api/models/class_assignment.rb', line 50 def @use_dedicated_attachments end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
202 203 204 |
# File 'lib/flat_api/models/class_assignment.rb', line 202 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
207 208 209 |
# File 'lib/flat_api/models/class_assignment.rb', line 207 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/flat_api/models/class_assignment.rb', line 155 def self.attribute_map { :'id' => :'id', :'type' => :'type', :'capabilities' => :'capabilities', :'title' => :'title', :'description' => :'description', :'description_html' => :'descriptionHtml', :'teacher_instructions' => :'teacherInstructions', :'teacher_instructions_html' => :'teacherInstructionsHtml', :'cover' => :'cover', :'cover_file' => :'coverFile', :'attachments' => :'attachments', :'use_dedicated_attachments' => :'useDedicatedAttachments', :'max_points' => :'maxPoints', :'release_grades' => :'releaseGrades', :'shuffle_exercises' => :'shuffleExercises', :'toolset' => :'toolset', :'nb_playback_authorized' => :'nbPlaybackAuthorized', :'restrict_play_note' => :'restrictPlayNote', :'restrict_to_audio_tracks' => :'restrictToAudioTracks', :'submission_students_mode' => :'submissionStudentsMode', :'recording_type' => :'recordingType', :'allow_metronome' => :'allowMetronome', :'allow_backing_track' => :'allowBackingTrack', :'allow_speed_change' => :'allowSpeedChange', :'free_record' => :'freeRecord', :'creator' => :'creator', :'state' => :'state', :'classroom' => :'classroom', :'creation_date' => :'creationDate', :'scheduled_date' => :'scheduledDate', :'due_date' => :'dueDate', :'assignee_mode' => :'assigneeMode', :'assigned_students' => :'assignedStudents', :'assigned_groups' => :'assignedGroups', :'submissions' => :'submissions', :'google_classroom' => :'googleClassroom', :'microsoft_graph' => :'microsoftGraph', :'mfc' => :'mfc', :'canvas' => :'canvas', :'lti' => :'lti', :'issue' => :'issue' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 |
# File 'lib/flat_api/models/class_assignment.rb', line 712 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
265 266 267 268 269 |
# File 'lib/flat_api/models/class_assignment.rb', line 265 def self.openapi_all_of [ :'Assignment' ] end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
259 260 261 262 |
# File 'lib/flat_api/models/class_assignment.rb', line 259 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/flat_api/models/class_assignment.rb', line 212 def self.openapi_types { :'id' => :'String', :'type' => :'AssignmentType', :'capabilities' => :'AssignmentCapabilities', :'title' => :'String', :'description' => :'String', :'description_html' => :'String', :'teacher_instructions' => :'String', :'teacher_instructions_html' => :'String', :'cover' => :'String', :'cover_file' => :'String', :'attachments' => :'Array<MediaAttachment>', :'use_dedicated_attachments' => :'Boolean', :'max_points' => :'Float', :'release_grades' => :'String', :'shuffle_exercises' => :'Boolean', :'toolset' => :'String', :'nb_playback_authorized' => :'Float', :'restrict_play_note' => :'Boolean', :'restrict_to_audio_tracks' => :'Boolean', :'submission_students_mode' => :'AssignmentSubmissionStudentsMode', :'recording_type' => :'String', :'allow_metronome' => :'Boolean', :'allow_backing_track' => :'Boolean', :'allow_speed_change' => :'Boolean', :'free_record' => :'Boolean', :'creator' => :'String', :'state' => :'String', :'classroom' => :'String', :'creation_date' => :'Time', :'scheduled_date' => :'Time', :'due_date' => :'Time', :'assignee_mode' => :'String', :'assigned_students' => :'Array<String>', :'assigned_groups' => :'Array<AssignmentGroup>', :'submissions' => :'Array<AssignmentSubmission>', :'google_classroom' => :'GoogleClassroomCoursework', :'microsoft_graph' => :'MicrosoftGraphAssignment', :'mfc' => :'ClassAssignmentAllOfMfc', :'canvas' => :'ClassAssignmentAllOfCanvas', :'lti' => :'ClassAssignmentAllOfLti', :'issue' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 |
# File 'lib/flat_api/models/class_assignment.rb', line 651 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && type == o.type && capabilities == o.capabilities && title == o.title && description == o.description && description_html == o.description_html && teacher_instructions == o.teacher_instructions && teacher_instructions_html == o.teacher_instructions_html && cover == o.cover && cover_file == o.cover_file && == o. && == o. && max_points == o.max_points && release_grades == o.release_grades && shuffle_exercises == o.shuffle_exercises && toolset == o.toolset && == o. && restrict_play_note == o.restrict_play_note && restrict_to_audio_tracks == o.restrict_to_audio_tracks && submission_students_mode == o.submission_students_mode && recording_type == o.recording_type && allow_metronome == o.allow_metronome && allow_backing_track == o.allow_backing_track && allow_speed_change == o.allow_speed_change && free_record == o.free_record && creator == o.creator && state == o.state && classroom == o.classroom && creation_date == o.creation_date && scheduled_date == o.scheduled_date && due_date == o.due_date && assignee_mode == o.assignee_mode && assigned_students == o.assigned_students && assigned_groups == o.assigned_groups && submissions == o.submissions && google_classroom == o.google_classroom && microsoft_graph == o.microsoft_graph && mfc == o.mfc && canvas == o.canvas && lti == o.lti && issue == o.issue end |
#eql?(o) ⇒ Boolean
699 700 701 |
# File 'lib/flat_api/models/class_assignment.rb', line 699 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
705 706 707 |
# File 'lib/flat_api/models/class_assignment.rb', line 705 def hash [id, type, capabilities, title, description, description_html, teacher_instructions, teacher_instructions_html, cover, cover_file, , , max_points, release_grades, shuffle_exercises, toolset, , restrict_play_note, restrict_to_audio_tracks, submission_students_mode, recording_type, allow_metronome, allow_backing_track, allow_speed_change, free_record, creator, state, classroom, creation_date, scheduled_date, due_date, assignee_mode, assigned_students, assigned_groups, submissions, google_classroom, microsoft_graph, mfc, canvas, lti, issue].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 |
# File 'lib/flat_api/models/class_assignment.rb', line 478 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') end if @capabilities.nil? invalid_properties.push('invalid value for "capabilities", capabilities cannot be nil.') end if @title.nil? invalid_properties.push('invalid value for "title", title cannot be nil.') end if @attachments.nil? invalid_properties.push('invalid value for "attachments", attachments cannot be nil.') end if @state.nil? invalid_properties.push('invalid value for "state", state cannot be nil.') end if @creation_date.nil? invalid_properties.push('invalid value for "creation_date", creation_date cannot be nil.') end if @submissions.nil? invalid_properties.push('invalid value for "submissions", submissions cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
734 735 736 737 738 739 740 741 742 743 744 745 746 |
# File 'lib/flat_api/models/class_assignment.rb', line 734 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 |
# File 'lib/flat_api/models/class_assignment.rb', line 518 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @id.nil? return false if @type.nil? return false if @capabilities.nil? return false if @title.nil? return false if @attachments.nil? release_grades_validator = EnumAttributeValidator.new('String', ["auto", "manual"]) return false unless release_grades_validator.valid?(@release_grades) recording_type_validator = EnumAttributeValidator.new('String', ["audio", "video"]) return false unless recording_type_validator.valid?(@recording_type) return false if @state.nil? state_validator = EnumAttributeValidator.new('String', ["draft", "active", "archived"]) return false unless state_validator.valid?(@state) return false if @creation_date.nil? assignee_mode_validator = EnumAttributeValidator.new('String', ["everyone", "selected"]) return false unless assignee_mode_validator.valid?(@assignee_mode) return false if @submissions.nil? true end |