Class: FlatApi::ClassAssignmentUpdate
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- FlatApi::ClassAssignmentUpdate
- Defined in:
- lib/flat_api/models/class_assignment_update.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_students ⇒ Object
Identifiers for the students that have access to the assignment.
-
#assignee_mode ⇒ Object
Possible modes of assigning assignments.
-
#attachments ⇒ Object
The complete attachment list.
-
#class_group_ids ⇒ Object
Optional list of specific class group IDs to apply to the assignment.
-
#cover ⇒ Object
The URL of the cover to display.
-
#cover_file ⇒ Object
The id of the cover to display.
-
#description ⇒ Object
Student instructions and content of the assignment (plain text).
-
#description_html ⇒ Object
HTML version of student instructions.
-
#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.
-
#max_points ⇒ Object
If set, the grading will be enabled for the assignement with this value as the maximum of points.
-
#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.
-
#teacher_instructions ⇒ Object
Teacher-only instructions (plain text).
-
#teacher_instructions_html ⇒ Object
HTML version of teacher-only instructions.
-
#title ⇒ Object
Title of the assignment.
-
#toolset ⇒ Object
The id of the toolset to apply to this assignment.
-
#type ⇒ Object
Returns the value of attribute type.
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 = {}) ⇒ ClassAssignmentUpdate
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 = {}) ⇒ ClassAssignmentUpdate
Initializes the object
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 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 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 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 226 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `FlatApi::ClassAssignmentUpdate` 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::ClassAssignmentUpdate`. 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?(:'type') self.type = attributes[:'type'] end if attributes.key?(:'title') self.title = attributes[:'title'] 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?(:'attachments') if (value = attributes[:'attachments']).is_a?(Array) self. = value end 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?(:'toolset') self.toolset = attributes[:'toolset'] end if attributes.key?(:'cover_file') self.cover_file = attributes[:'cover_file'] end if attributes.key?(:'cover') self.cover = attributes[:'cover'] 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?(:'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?(:'state') self.state = attributes[:'state'] end if attributes.key?(:'due_date') self.due_date = attributes[:'due_date'] end if attributes.key?(:'scheduled_date') self.scheduled_date = attributes[:'scheduled_date'] 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?(:'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?(:'class_group_ids') if (value = attributes[:'class_group_ids']).is_a?(Array) self.class_group_ids = value end 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'.
74 75 76 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 74 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'.
71 72 73 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 71 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'.
77 78 79 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 77 def allow_speed_change @allow_speed_change end |
#assigned_students ⇒ Object
Identifiers for the students that have access to the assignment
99 100 101 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 99 def assigned_students @assigned_students end |
#assignee_mode ⇒ Object
Possible modes of assigning assignments
96 97 98 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 96 def assignee_mode @assignee_mode end |
#attachments ⇒ Object
The complete attachment list. Omitting this property on an update leaves the existing attachments alone; sending it replaces them. Dropping a dedicated score from the list deletes the students' copies of it, so send the full set you want to keep rather than only the additions. Duplicates, judged by url, score, worksheet or googleDriveFileId, are discarded silently, and exceeding the per-assignment limit fails with ASSIGNMENT_ATTACHMENTS_LIMIT.
36 37 38 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 36 def @attachments end |
#class_group_ids ⇒ Object
Optional list of specific class group IDs to apply to the assignment. When transitioning to active state with group submission mode: - If provided: Only these specific groups will be applied - If not provided: All class groups will be applied, or randomized groups created if none exist
102 103 104 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 102 def class_group_ids @class_group_ids end |
#cover ⇒ Object
The URL of the cover to display
54 55 56 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 54 def cover @cover end |
#cover_file ⇒ Object
The id of the cover to display
51 52 53 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 51 def cover_file @cover_file end |
#description ⇒ Object
Student instructions and content of the assignment (plain text)
24 25 26 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 24 def description @description end |
#description_html ⇒ Object
HTML version of student instructions. Pasted images may be sent as inline base64 data: URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility.
27 28 29 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 27 def description_html @description_html end |
#due_date ⇒ Object
The due date of this assignment, late submissions will be marked as paste due. If not set, the assignment won't have a due date.
86 87 88 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 86 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'.
80 81 82 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 80 def free_record @free_record end |
#google_classroom ⇒ Object
Returns the value of attribute google_classroom.
91 92 93 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 91 def google_classroom @google_classroom end |
#max_points ⇒ Object
If set, the grading will be enabled for the assignement with this value as the maximum of points
57 58 59 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 57 def max_points @max_points end |
#microsoft_graph ⇒ Object
Returns the value of attribute microsoft_graph.
93 94 95 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 93 def microsoft_graph @microsoft_graph end |
#nb_playback_authorized ⇒ Object
The number of playback authorized on the scores of the assignment.
39 40 41 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 39 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'.
68 69 70 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 68 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
60 61 62 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 60 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.
42 43 44 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 42 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.
45 46 47 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 45 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.
89 90 91 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 89 def scheduled_date @scheduled_date end |
#shuffle_exercises ⇒ Object
Mixing worksheets exercises for each student
63 64 65 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 63 def shuffle_exercises @shuffle_exercises end |
#state ⇒ Object
State of the assignment
83 84 85 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 83 def state @state end |
#submission_students_mode ⇒ Object
Returns the value of attribute submission_students_mode.
65 66 67 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 65 def submission_students_mode @submission_students_mode end |
#teacher_instructions ⇒ Object
Teacher-only instructions (plain text)
30 31 32 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 30 def teacher_instructions @teacher_instructions end |
#teacher_instructions_html ⇒ Object
HTML version of teacher-only instructions. Pasted images may be sent as inline base64 data: URIs; they are uploaded to storage and rewritten to hosted URLs on save. The final HTML is limited to 100000 characters. When provided, the plain text version will be automatically extracted for compatibility.
33 34 35 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 33 def teacher_instructions_html @teacher_instructions_html end |
#title ⇒ Object
Title of the assignment
21 22 23 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 21 def title @title end |
#toolset ⇒ Object
The id of the toolset to apply to this assignment. The toolset will be copied to the assignment as a dedicated object to prevent unexpected changes when making modifications to the template toolset. This property can be set to null to delete the linked toolset and switch back to all the tools available for this assignment.
48 49 50 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 48 def toolset @toolset end |
#type ⇒ Object
Returns the value of attribute type.
18 19 20 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 18 def type @type end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
163 164 165 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 163 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
168 169 170 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 168 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 127 def self.attribute_map { :'type' => :'type', :'title' => :'title', :'description' => :'description', :'description_html' => :'descriptionHtml', :'teacher_instructions' => :'teacherInstructions', :'teacher_instructions_html' => :'teacherInstructionsHtml', :'attachments' => :'attachments', :'nb_playback_authorized' => :'nbPlaybackAuthorized', :'restrict_play_note' => :'restrictPlayNote', :'restrict_to_audio_tracks' => :'restrictToAudioTracks', :'toolset' => :'toolset', :'cover_file' => :'coverFile', :'cover' => :'cover', :'max_points' => :'maxPoints', :'release_grades' => :'releaseGrades', :'shuffle_exercises' => :'shuffleExercises', :'submission_students_mode' => :'submissionStudentsMode', :'recording_type' => :'recordingType', :'allow_metronome' => :'allowMetronome', :'allow_backing_track' => :'allowBackingTrack', :'allow_speed_change' => :'allowSpeedChange', :'free_record' => :'freeRecord', :'state' => :'state', :'due_date' => :'dueDate', :'scheduled_date' => :'scheduledDate', :'google_classroom' => :'googleClassroom', :'microsoft_graph' => :'microsoftGraph', :'assignee_mode' => :'assigneeMode', :'assigned_students' => :'assignedStudents', :'class_group_ids' => :'classGroupIds' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 614 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)
218 219 220 221 222 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 218 def self.openapi_all_of [ :'AssignmentUpdate' ] end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
209 210 211 212 213 214 215 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 209 def self.openapi_nullable Set.new([ :'due_date', :'scheduled_date', :'class_group_ids' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 200 201 202 203 204 205 206 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 173 def self.openapi_types { :'type' => :'AssignmentType', :'title' => :'String', :'description' => :'String', :'description_html' => :'String', :'teacher_instructions' => :'String', :'teacher_instructions_html' => :'String', :'attachments' => :'Array<ClassAttachmentCreation>', :'nb_playback_authorized' => :'Float', :'restrict_play_note' => :'Boolean', :'restrict_to_audio_tracks' => :'Boolean', :'toolset' => :'String', :'cover_file' => :'String', :'cover' => :'String', :'max_points' => :'Float', :'release_grades' => :'String', :'shuffle_exercises' => :'Boolean', :'submission_students_mode' => :'AssignmentSubmissionStudentsMode', :'recording_type' => :'String', :'allow_metronome' => :'Boolean', :'allow_backing_track' => :'Boolean', :'allow_speed_change' => :'Boolean', :'free_record' => :'Boolean', :'state' => :'String', :'due_date' => :'Time', :'scheduled_date' => :'Time', :'google_classroom' => :'ClassAssignmentUpdateAllOfGoogleClassroom', :'microsoft_graph' => :'ClassAssignmentUpdateAllOfMicrosoftGraph', :'assignee_mode' => :'String', :'assigned_students' => :'Array<String>', :'class_group_ids' => :'Array<String>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 564 def ==(o) return true if self.equal?(o) self.class == o.class && type == o.type && title == o.title && description == o.description && description_html == o.description_html && teacher_instructions == o.teacher_instructions && teacher_instructions_html == o.teacher_instructions_html && == o. && == o. && restrict_play_note == o.restrict_play_note && restrict_to_audio_tracks == o.restrict_to_audio_tracks && toolset == o.toolset && cover_file == o.cover_file && cover == o.cover && max_points == o.max_points && release_grades == o.release_grades && shuffle_exercises == o.shuffle_exercises && 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 && state == o.state && due_date == o.due_date && scheduled_date == o.scheduled_date && google_classroom == o.google_classroom && microsoft_graph == o.microsoft_graph && assignee_mode == o.assignee_mode && assigned_students == o.assigned_students && class_group_ids == o.class_group_ids end |
#eql?(o) ⇒ Boolean
601 602 603 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 601 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
607 608 609 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 607 def hash [type, title, description, description_html, teacher_instructions, teacher_instructions_html, , , restrict_play_note, restrict_to_audio_tracks, toolset, cover_file, cover, max_points, release_grades, shuffle_exercises, submission_students_mode, recording_type, allow_metronome, allow_backing_track, allow_speed_change, free_record, state, due_date, scheduled_date, google_classroom, microsoft_graph, assignee_mode, assigned_students, class_group_ids].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 369 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@title.nil? && @title.to_s.length > 1000 invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 1000.') end if !@title.nil? && @title.to_s.length < 1 invalid_properties.push('invalid value for "title", the character length must be greater than or equal to 1.') end if !@description.nil? && @description.to_s.length > 100000 invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 100000.') end if !@description_html.nil? && @description_html.to_s.length > 20000000 invalid_properties.push('invalid value for "description_html", the character length must be smaller than or equal to 20000000.') end if !@teacher_instructions.nil? && @teacher_instructions.to_s.length > 100000 invalid_properties.push('invalid value for "teacher_instructions", the character length must be smaller than or equal to 100000.') end if !@teacher_instructions_html.nil? && @teacher_instructions_html.to_s.length > 20000000 invalid_properties.push('invalid value for "teacher_instructions_html", the character length must be smaller than or equal to 20000000.') end if !@max_points.nil? && @max_points > 10000 invalid_properties.push('invalid value for "max_points", must be smaller than or equal to 10000.') end if !@max_points.nil? && @max_points < 0 invalid_properties.push('invalid value for "max_points", must be greater than or equal to 0.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
636 637 638 639 640 641 642 643 644 645 646 647 648 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 636 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
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 |
# File 'lib/flat_api/models/class_assignment_update.rb', line 409 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@title.nil? && @title.to_s.length > 1000 return false if !@title.nil? && @title.to_s.length < 1 return false if !@description.nil? && @description.to_s.length > 100000 return false if !@description_html.nil? && @description_html.to_s.length > 20000000 return false if !@teacher_instructions.nil? && @teacher_instructions.to_s.length > 100000 return false if !@teacher_instructions_html.nil? && @teacher_instructions_html.to_s.length > 20000000 return false if !@max_points.nil? && @max_points > 10000 return false if !@max_points.nil? && @max_points < 0 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) state_validator = EnumAttributeValidator.new('String', ["draft", "active"]) return false unless state_validator.valid?(@state) assignee_mode_validator = EnumAttributeValidator.new('String', ["everyone", "selected"]) return false unless assignee_mode_validator.valid?(@assignee_mode) true end |