Class Drive

java.lang.Object
com.amilesend.onedrive.resource.Drive

public class Drive extends Object
A wrapper around a Drive that represents a drive associated with the authenticated user.
  • Constructor Details

    • Drive

      public Drive(Drive delegate)
  • Method Details

    • getId

      public String getId()
      Gets the drive identifier.
      Returns:
      the drive identifier
    • getCreatedBy

      public IdentitySet getCreatedBy()
      Gets the identity set that indicates who created this drive.
      Returns:
      the identity set
      See Also:
    • getCreatedDateTime

      public String getCreatedDateTime()
      Gets the timestamp (formatted as a string) that indicates when this drive was created.
      Returns:
      the timestamp
    • getDescription

      public String getDescription()
      Gets the description associated with this drive.
      Returns:
      the description
    • getETag

      public String getETag()
      Gets the eTag associated with this drive.
      Returns:
      the etag
    • getLastModifiedBy

      public IdentitySet getLastModifiedBy()
      Gets the identity set that indicates who made the last modification to this drive.
      Returns:
      the identity set
      See Also:
    • getLastModifiedDateTime

      public String getLastModifiedDateTime()
      Gets the timestamp (formatted as a string) that indicate when this drive was last modified.
      Returns:
      the timestamp
    • getName

      public String getName()
      Gets the name of this drive.
      Returns:
      the name
    • getParentReference

      public ItemReference getParentReference()
      Gets the parent reference of this drive.
      Returns:
      the parent reference
      See Also:
    • getWebUrl

      public String getWebUrl()
      Gets the web URL formatted as a string for this drive.
      Returns:
      the web URL
    • getDriveType

      public String getDriveType()
      Gets the type for this drive.
      Returns:
      the drive type
    • getOwner

      public IdentitySet getOwner()
      Gets the owner information for this drive.
      Returns:
      the identity set
      See Also:
    • getQuota

      public Quota getQuota()
      Gets the quota information for this drive.
      Returns:
      the quota information
      See Also:
    • getSharepointIds

      public SharePointIds getSharepointIds()
      Gets the Sharepoint identifiers for this drive.
      Returns:
      the sharepoint identifiers
      See Also:
    • isSystemManaged

      public boolean isSystemManaged()
      Describes if this drive is a system-managed drive. Most consumers should ignore this drive type for use in their application.
      Returns:
      true if this drive is system managed; else, false
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getRootFolder

      public DriveFolder getRootFolder()
      Gets the root folder for this drive.
      Returns:
      the root drive folder
      See Also:
    • search

      public List<? extends DriveItemType> search(String query)
      Searches this drive for the given query (e.g., file name).
      Parameters:
      query - the search query
      Returns:
      the list of drive item types (either a DriveFolder or DriveFile).
      See Also:
    • getChanges

      public List<? extends DriveItemType> getChanges()
      Gets the list of changes associated with this drive.
      Returns:
      the list of drive item types (either a DriveFolder or DriveFile).
      See Also:
    • getSpecialFolder

      public DriveFolder getSpecialFolder(SpecialFolder.Type type)
      Gets the special folder for the given SpecialFolder.Type.
      Parameters:
      type - the type
      Returns:
      the special drive folder
      See Also:
    • getActivities

      public List<ItemActivity> getActivities()
      Gets the list of activities that took place for this drive.
      Returns:
      the list of activities
      See Also:
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object