Class FileSharingInfo


  • public class FileSharingInfo
    extends SharingInfo
    Sharing info for a file which is contained by a shared folder.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileSharingInfo​(boolean readOnly, java.lang.String parentSharedFolderId)
      Sharing info for a file which is contained by a shared folder.
      FileSharingInfo​(boolean readOnly, java.lang.String parentSharedFolderId, java.lang.String modifiedBy)
      Sharing info for a file which is contained by a shared folder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getModifiedBy()
      The last user who modified the file.
      java.lang.String getParentSharedFolderId()
      ID of shared folder that holds this file.
      boolean getReadOnly()
      True if the file or folder is inside a read-only shared folder.
      int hashCode()  
      java.lang.String toString()  
      java.lang.String toStringMultiline()
      Returns a String representation of this object formatted for easier readability.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • parentSharedFolderId

        @Nonnull
        protected final java.lang.String parentSharedFolderId
      • modifiedBy

        @Nullable
        protected final java.lang.String modifiedBy
    • Constructor Detail

      • FileSharingInfo

        public FileSharingInfo​(boolean readOnly,
                               @Nonnull
                               java.lang.String parentSharedFolderId,
                               @Nullable
                               java.lang.String modifiedBy)
        Sharing info for a file which is contained by a shared folder.
        Parameters:
        readOnly - True if the file or folder is inside a read-only shared folder.
        parentSharedFolderId - ID of shared folder that holds this file. Must match pattern "[-_0-9a-zA-Z:]+" and not be null.
        modifiedBy - The last user who modified the file. This field will be null if the user's account has been deleted. Must have length of at least 40 and have length of at most 40.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • FileSharingInfo

        public FileSharingInfo​(boolean readOnly,
                               @Nonnull
                               java.lang.String parentSharedFolderId)
        Sharing info for a file which is contained by a shared folder.

        The default values for unset fields will be used.

        Parameters:
        readOnly - True if the file or folder is inside a read-only shared folder.
        parentSharedFolderId - ID of shared folder that holds this file. Must match pattern "[-_0-9a-zA-Z:]+" and not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
    • Method Detail

      • getReadOnly

        public boolean getReadOnly()
        True if the file or folder is inside a read-only shared folder.
        Overrides:
        getReadOnly in class SharingInfo
        Returns:
        value for this field.
      • getParentSharedFolderId

        @Nonnull
        public java.lang.String getParentSharedFolderId()
        ID of shared folder that holds this file.
        Returns:
        value for this field, never null.
      • getModifiedBy

        @Nullable
        public java.lang.String getModifiedBy()
        The last user who modified the file. This field will be null if the user's account has been deleted.
        Returns:
        value for this field, or null if not present.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class SharingInfo
      • toStringMultiline

        public java.lang.String toStringMultiline()
        Returns a String representation of this object formatted for easier readability.

        The returned String may contain newlines.

        Overrides:
        toStringMultiline in class SharingInfo
        Returns:
        Formatted, multiline String representation of this object