forked from kstateome/canvas-api
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIS Import: Support errorsAttachment objects to download SIS import f… #37
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
222 changes: 222 additions & 0 deletions
222
src/main/java/edu/ksu/canvas/model/sisimport/SisImportErrorsAttachment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,222 @@ | ||
package edu.ksu.canvas.model.sisimport; | ||
import edu.ksu.canvas.annotation.CanvasField; | ||
import edu.ksu.canvas.annotation.CanvasObject; | ||
import edu.ksu.canvas.model.BaseCanvasModel; | ||
|
||
import java.io.Serializable; | ||
import java.time.Instant; | ||
|
||
/** | ||
* Class to represent Canvas Sis Imports Errors Attachment | ||
* See <a href="https://canvas.instructure.com/doc/api/sis_imports.html#SisImport">SisImport</a> documentation. | ||
*/ | ||
@CanvasObject(postKey = "errors_attachment") | ||
public class SisImportErrorsAttachment extends BaseCanvasModel implements Serializable { | ||
public static final long serialVersionUID = 1L; | ||
|
||
private Integer id; | ||
private String uuid; | ||
private String folderId; | ||
private String displayName; | ||
private String filename; | ||
private String uploadStatus; | ||
private String contentType; | ||
private String url; | ||
private Integer size; | ||
private Instant createdAt; | ||
private Instant updatedAt; | ||
private Instant unlockAt; | ||
private boolean locked; | ||
private boolean hidden; | ||
private Instant lockAt; | ||
private boolean hiddenForUser; | ||
private String thumbnailUrl; | ||
private Instant modifiedAt; | ||
private String mimeClass; | ||
private String mediaEntryId; | ||
private boolean lockedForUser; | ||
|
||
public Integer getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Integer id) { | ||
this.id = id; | ||
} | ||
|
||
public String getUuid() { | ||
return uuid; | ||
} | ||
|
||
public void setUuid(String uuid) { | ||
this.uuid = uuid; | ||
} | ||
|
||
@CanvasField(postKey = "folder_id") | ||
public String getFolderId() { | ||
return folderId; | ||
} | ||
|
||
public void setFolderId(String folderId) { | ||
this.folderId = folderId; | ||
} | ||
|
||
@CanvasField(postKey = "display_name") | ||
public String getDisplayName() { | ||
return displayName; | ||
} | ||
|
||
public void setDisplayName(String displayName) { | ||
this.displayName = displayName; | ||
} | ||
|
||
public String getFileName() { | ||
return filename; | ||
} | ||
|
||
public void setFileName(String filename) { | ||
this.filename = filename; | ||
} | ||
|
||
@CanvasField(postKey = "upload_status") | ||
public String getUploadStatus() { | ||
return uploadStatus; | ||
} | ||
|
||
public void setUploadStatus(String uploadStatus) { | ||
this.uploadStatus = uploadStatus; | ||
} | ||
|
||
@CanvasField(postKey = "content-type") | ||
public String getContentType() { | ||
return contentType; | ||
} | ||
|
||
public void setContentType(String contentType) { | ||
this.contentType = contentType; | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public void setUrl(String url) { | ||
this.url = url; | ||
} | ||
|
||
public Integer getSize() { | ||
return size; | ||
} | ||
|
||
public void setSize(Integer size) { | ||
this.size = size; | ||
} | ||
|
||
@CanvasField(postKey = "created_at") | ||
public Instant getCreatedAt() { | ||
return createdAt; | ||
} | ||
|
||
public void setCreatedAt(Instant createdAt) { | ||
this.createdAt = createdAt; | ||
} | ||
|
||
@CanvasField(postKey = "updated_at") | ||
public Instant getUpdatedAt() { | ||
return updatedAt; | ||
} | ||
|
||
public void setUpdatedAt(Instant updatedAt) { | ||
this.updatedAt = updatedAt; | ||
} | ||
|
||
@CanvasField(postKey = "unlock_at") | ||
public Instant getUnlockAt() { | ||
return unlockAt; | ||
} | ||
|
||
public void setUnlockAt(Instant unlockAt) { | ||
this.unlockAt = unlockAt; | ||
} | ||
|
||
public boolean isLocked() { | ||
return locked; | ||
} | ||
|
||
public void setLocked(boolean locked) { | ||
this.locked = locked; | ||
} | ||
|
||
public boolean getHidden() { | ||
return hidden; | ||
} | ||
|
||
public void setHidden(boolean hidden) { | ||
this.hidden = hidden; | ||
} | ||
|
||
@CanvasField(postKey = "lock_at") | ||
public Instant getLockAt() { | ||
return lockAt; | ||
} | ||
|
||
public void setLockAt(Instant lockAt) { | ||
this.lockAt = lockAt; | ||
} | ||
|
||
@CanvasField(postKey = "hidden_for_user") | ||
public boolean getHiddenForUser() { | ||
return hiddenForUser; | ||
} | ||
|
||
public void setHiddenForUser(boolean hiddenForUser) { | ||
this.hiddenForUser = hiddenForUser; | ||
} | ||
|
||
@CanvasField(postKey = "thumbnail_url") | ||
public String getThumbnailUrl() { | ||
return thumbnailUrl; | ||
} | ||
|
||
public void setThumbnailUrl(String thumbnailUrl) { | ||
this.thumbnailUrl = thumbnailUrl; | ||
} | ||
|
||
@CanvasField(postKey = "modified_at") | ||
public Instant getModifiedAt() { | ||
return modifiedAt; | ||
} | ||
|
||
public void setModifiedAt(Instant modifiedAt) { | ||
this.modifiedAt = modifiedAt; | ||
} | ||
|
||
@CanvasField(postKey = "mime_class") | ||
public String getMimeClass() { | ||
return mimeClass; | ||
} | ||
|
||
public void setMimeClass(String mimeClass) { | ||
this.mimeClass = mimeClass; | ||
} | ||
|
||
@CanvasField(postKey = "media_entry_id") | ||
public String getMediaEntryId() { | ||
return mediaEntryId; | ||
} | ||
|
||
public void setMediaEntryId(String mediaEntryId) { | ||
this.mediaEntryId = mediaEntryId; | ||
} | ||
|
||
@CanvasField(postKey = "locked_for_user") | ||
public boolean getLockedForUser() { | ||
return lockedForUser; | ||
} | ||
|
||
public void setLockedForUser(boolean lockedForUser) { | ||
this.lockedForUser = lockedForUser; | ||
} | ||
|
||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure you need the
@CanvasObject
and@CanvasField
annotations as this object shouldn't ever be POSTed back to Canvas. The only place they are used is inedu.ksu.canvas.model.BaseCanvasModel
when building POST request parameters.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, pure imitation, let me address this and re-test, thanks @buckett.