|
| 1 | +// Template Source: BaseEntity.java.tt |
| 2 | +// ------------------------------------------------------------------------------ |
| 3 | +// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. |
| 4 | +// ------------------------------------------------------------------------------ |
| 5 | + |
| 6 | +package com.microsoft.graph.models; |
| 7 | +import com.microsoft.graph.serializer.ISerializer; |
| 8 | +import com.microsoft.graph.serializer.IJsonBackedObject; |
| 9 | +import com.microsoft.graph.serializer.AdditionalDataManager; |
| 10 | +import java.util.EnumSet; |
| 11 | +import com.microsoft.graph.http.BaseCollectionPage; |
| 12 | +import com.microsoft.graph.models.EducationAddedStudentAction; |
| 13 | +import com.microsoft.graph.models.EducationAssignmentRecipient; |
| 14 | +import com.microsoft.graph.models.IdentitySet; |
| 15 | +import com.microsoft.graph.models.EducationAssignmentGradeType; |
| 16 | +import com.microsoft.graph.models.EducationItemBody; |
| 17 | +import com.microsoft.graph.models.EducationAssignmentStatus; |
| 18 | +import com.microsoft.graph.models.EducationCategory; |
| 19 | +import com.microsoft.graph.models.EducationAssignmentResource; |
| 20 | +import com.microsoft.graph.models.EducationRubric; |
| 21 | +import com.microsoft.graph.models.EducationSubmission; |
| 22 | +import com.microsoft.graph.models.Entity; |
| 23 | +import com.microsoft.graph.requests.EducationCategoryCollectionPage; |
| 24 | +import com.microsoft.graph.requests.EducationAssignmentResourceCollectionPage; |
| 25 | +import com.microsoft.graph.requests.EducationSubmissionCollectionPage; |
| 26 | + |
| 27 | + |
| 28 | +import com.google.gson.JsonObject; |
| 29 | +import com.google.gson.annotations.SerializedName; |
| 30 | +import com.google.gson.annotations.Expose; |
| 31 | +import javax.annotation.Nullable; |
| 32 | +import javax.annotation.Nonnull; |
| 33 | + |
| 34 | +// **NOTE** This file was generated by a tool and any changes will be overwritten. |
| 35 | + |
| 36 | +/** |
| 37 | + * The class for the Education Assignment. |
| 38 | + */ |
| 39 | +public class EducationAssignment extends Entity implements IJsonBackedObject { |
| 40 | + |
| 41 | + |
| 42 | + /** |
| 43 | + * The Added Student Action. |
| 44 | + * Optional field to control the assignment behavior for students who are added after the assignment is published. If not specified, defaults to none value. Currently supports only two values: none or assignIfOpen. |
| 45 | + */ |
| 46 | + @SerializedName(value = "addedStudentAction", alternate = {"AddedStudentAction"}) |
| 47 | + @Expose |
| 48 | + @Nullable |
| 49 | + public EducationAddedStudentAction addedStudentAction; |
| 50 | + |
| 51 | + /** |
| 52 | + * The Allow Late Submissions. |
| 53 | + * Identifies whether students can submit after the due date. If this property is not specified during create, it defaults to true. |
| 54 | + */ |
| 55 | + @SerializedName(value = "allowLateSubmissions", alternate = {"AllowLateSubmissions"}) |
| 56 | + @Expose |
| 57 | + @Nullable |
| 58 | + public Boolean allowLateSubmissions; |
| 59 | + |
| 60 | + /** |
| 61 | + * The Allow Students To Add Resources To Submission. |
| 62 | + * Identifies whether students can add their own resources to a submission or if they can only modify resources added by the teacher. |
| 63 | + */ |
| 64 | + @SerializedName(value = "allowStudentsToAddResourcesToSubmission", alternate = {"AllowStudentsToAddResourcesToSubmission"}) |
| 65 | + @Expose |
| 66 | + @Nullable |
| 67 | + public Boolean allowStudentsToAddResourcesToSubmission; |
| 68 | + |
| 69 | + /** |
| 70 | + * The Assign Date Time. |
| 71 | + * The date when the assignment should become active. If in the future, the assignment is not shown to the student until this date. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z |
| 72 | + */ |
| 73 | + @SerializedName(value = "assignDateTime", alternate = {"AssignDateTime"}) |
| 74 | + @Expose |
| 75 | + @Nullable |
| 76 | + public java.time.OffsetDateTime assignDateTime; |
| 77 | + |
| 78 | + /** |
| 79 | + * The Assigned Date Time. |
| 80 | + * The moment that the assignment was published to students and the assignment shows up on the students timeline. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z |
| 81 | + */ |
| 82 | + @SerializedName(value = "assignedDateTime", alternate = {"AssignedDateTime"}) |
| 83 | + @Expose |
| 84 | + @Nullable |
| 85 | + public java.time.OffsetDateTime assignedDateTime; |
| 86 | + |
| 87 | + /** |
| 88 | + * The Assign To. |
| 89 | + * Which users, or whole class should receive a submission object once the assignment is published. |
| 90 | + */ |
| 91 | + @SerializedName(value = "assignTo", alternate = {"AssignTo"}) |
| 92 | + @Expose |
| 93 | + @Nullable |
| 94 | + public EducationAssignmentRecipient assignTo; |
| 95 | + |
| 96 | + /** |
| 97 | + * The Class Id. |
| 98 | + * Class which this assignment belongs. |
| 99 | + */ |
| 100 | + @SerializedName(value = "classId", alternate = {"ClassId"}) |
| 101 | + @Expose |
| 102 | + @Nullable |
| 103 | + public String classId; |
| 104 | + |
| 105 | + /** |
| 106 | + * The Close Date Time. |
| 107 | + * Date when the assignment will be closed for submissions. This is an optional field that can be null if the assignment does not allowLateSubmissions or when the closeDateTime is the same as the dueDateTime. But if specified, then the closeDateTime must be greater than or equal to the dueDateTime. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z |
| 108 | + */ |
| 109 | + @SerializedName(value = "closeDateTime", alternate = {"CloseDateTime"}) |
| 110 | + @Expose |
| 111 | + @Nullable |
| 112 | + public java.time.OffsetDateTime closeDateTime; |
| 113 | + |
| 114 | + /** |
| 115 | + * The Created By. |
| 116 | + * Who created the assignment. |
| 117 | + */ |
| 118 | + @SerializedName(value = "createdBy", alternate = {"CreatedBy"}) |
| 119 | + @Expose |
| 120 | + @Nullable |
| 121 | + public IdentitySet createdBy; |
| 122 | + |
| 123 | + /** |
| 124 | + * The Created Date Time. |
| 125 | + * Moment when the assignment was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z |
| 126 | + */ |
| 127 | + @SerializedName(value = "createdDateTime", alternate = {"CreatedDateTime"}) |
| 128 | + @Expose |
| 129 | + @Nullable |
| 130 | + public java.time.OffsetDateTime createdDateTime; |
| 131 | + |
| 132 | + /** |
| 133 | + * The Display Name. |
| 134 | + * Name of the assignment. |
| 135 | + */ |
| 136 | + @SerializedName(value = "displayName", alternate = {"DisplayName"}) |
| 137 | + @Expose |
| 138 | + @Nullable |
| 139 | + public String displayName; |
| 140 | + |
| 141 | + /** |
| 142 | + * The Due Date Time. |
| 143 | + * Date when the students assignment is due. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z |
| 144 | + */ |
| 145 | + @SerializedName(value = "dueDateTime", alternate = {"DueDateTime"}) |
| 146 | + @Expose |
| 147 | + @Nullable |
| 148 | + public java.time.OffsetDateTime dueDateTime; |
| 149 | + |
| 150 | + /** |
| 151 | + * The Grading. |
| 152 | + * How the assignment will be graded. |
| 153 | + */ |
| 154 | + @SerializedName(value = "grading", alternate = {"Grading"}) |
| 155 | + @Expose |
| 156 | + @Nullable |
| 157 | + public EducationAssignmentGradeType grading; |
| 158 | + |
| 159 | + /** |
| 160 | + * The Instructions. |
| 161 | + * Instructions for the assignment. This along with the display name tell the student what to do. |
| 162 | + */ |
| 163 | + @SerializedName(value = "instructions", alternate = {"Instructions"}) |
| 164 | + @Expose |
| 165 | + @Nullable |
| 166 | + public EducationItemBody instructions; |
| 167 | + |
| 168 | + /** |
| 169 | + * The Last Modified By. |
| 170 | + * Who last modified the assignment. |
| 171 | + */ |
| 172 | + @SerializedName(value = "lastModifiedBy", alternate = {"LastModifiedBy"}) |
| 173 | + @Expose |
| 174 | + @Nullable |
| 175 | + public IdentitySet lastModifiedBy; |
| 176 | + |
| 177 | + /** |
| 178 | + * The Last Modified Date Time. |
| 179 | + * Moment when the assignment was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z |
| 180 | + */ |
| 181 | + @SerializedName(value = "lastModifiedDateTime", alternate = {"LastModifiedDateTime"}) |
| 182 | + @Expose |
| 183 | + @Nullable |
| 184 | + public java.time.OffsetDateTime lastModifiedDateTime; |
| 185 | + |
| 186 | + /** |
| 187 | + * The Notification Channel Url. |
| 188 | + * Optional field to specify the URL of the channel to post the assignment publish notification. If not specified or null, defaults to the General channel. This field only applies to assignments where the assignTo value is educationAssignmentClassRecipient. Updating the notificationChannelUrl is not allowed after the assignment has been published. |
| 189 | + */ |
| 190 | + @SerializedName(value = "notificationChannelUrl", alternate = {"NotificationChannelUrl"}) |
| 191 | + @Expose |
| 192 | + @Nullable |
| 193 | + public String notificationChannelUrl; |
| 194 | + |
| 195 | + /** |
| 196 | + * The Resources Folder Url. |
| 197 | + * Folder URL where all the file resources for this assignment are stored. |
| 198 | + */ |
| 199 | + @SerializedName(value = "resourcesFolderUrl", alternate = {"ResourcesFolderUrl"}) |
| 200 | + @Expose |
| 201 | + @Nullable |
| 202 | + public String resourcesFolderUrl; |
| 203 | + |
| 204 | + /** |
| 205 | + * The Status. |
| 206 | + * Status of the Assignment. You can not PATCH this value. Possible values are: draft, scheduled, published, assigned. |
| 207 | + */ |
| 208 | + @SerializedName(value = "status", alternate = {"Status"}) |
| 209 | + @Expose |
| 210 | + @Nullable |
| 211 | + public EducationAssignmentStatus status; |
| 212 | + |
| 213 | + /** |
| 214 | + * The Web Url. |
| 215 | + * The deep link URL for the given assignment. |
| 216 | + */ |
| 217 | + @SerializedName(value = "webUrl", alternate = {"WebUrl"}) |
| 218 | + @Expose |
| 219 | + @Nullable |
| 220 | + public String webUrl; |
| 221 | + |
| 222 | + /** |
| 223 | + * The Categories. |
| 224 | + * When set, enables users to easily find assignments of a given type. Read-only. Nullable. |
| 225 | + */ |
| 226 | + @SerializedName(value = "categories", alternate = {"Categories"}) |
| 227 | + @Expose |
| 228 | + @Nullable |
| 229 | + public EducationCategoryCollectionPage categories; |
| 230 | + |
| 231 | + /** |
| 232 | + * The Resources. |
| 233 | + * Learning objects that are associated with this assignment. Only teachers can modify this list. Nullable. |
| 234 | + */ |
| 235 | + @SerializedName(value = "resources", alternate = {"Resources"}) |
| 236 | + @Expose |
| 237 | + @Nullable |
| 238 | + public EducationAssignmentResourceCollectionPage resources; |
| 239 | + |
| 240 | + /** |
| 241 | + * The Rubric. |
| 242 | + * When set, the grading rubric attached to this assignment. |
| 243 | + */ |
| 244 | + @SerializedName(value = "rubric", alternate = {"Rubric"}) |
| 245 | + @Expose |
| 246 | + @Nullable |
| 247 | + public EducationRubric rubric; |
| 248 | + |
| 249 | + /** |
| 250 | + * The Submissions. |
| 251 | + * Once published, there is a submission object for each student representing their work and grade. Read-only. Nullable. |
| 252 | + */ |
| 253 | + @SerializedName(value = "submissions", alternate = {"Submissions"}) |
| 254 | + @Expose |
| 255 | + @Nullable |
| 256 | + public EducationSubmissionCollectionPage submissions; |
| 257 | + |
| 258 | + |
| 259 | + /** |
| 260 | + * Sets the raw JSON object |
| 261 | + * |
| 262 | + * @param serializer the serializer |
| 263 | + * @param json the JSON object to set this object to |
| 264 | + */ |
| 265 | + public void setRawObject(@Nonnull final ISerializer serializer, @Nonnull final JsonObject json) { |
| 266 | + |
| 267 | + |
| 268 | + if (json.has("categories")) { |
| 269 | + categories = serializer.deserializeObject(json.get("categories"), EducationCategoryCollectionPage.class); |
| 270 | + } |
| 271 | + |
| 272 | + if (json.has("resources")) { |
| 273 | + resources = serializer.deserializeObject(json.get("resources"), EducationAssignmentResourceCollectionPage.class); |
| 274 | + } |
| 275 | + |
| 276 | + if (json.has("submissions")) { |
| 277 | + submissions = serializer.deserializeObject(json.get("submissions"), EducationSubmissionCollectionPage.class); |
| 278 | + } |
| 279 | + } |
| 280 | +} |
0 commit comments