Class CreateFolderError

java.lang.Object
com.dropbox.core.v2.files.CreateFolderError

public final class CreateFolderError extends Object
This class is a tagged union. Tagged unions instances are always associated to a specific tag. This means only one of the isAbc() methods will return true. You can use tag() to determine the tag associated with this instance.
  • Method Details

    • tag

      public CreateFolderError.Tag tag()
      Returns the tag for this instance.

      This class is a tagged union. Tagged unions instances are always associated to a specific tag. This means only one of the isXyz() methods will return true. Callers are recommended to use the tag value in a switch statement to properly handle the different values for this CreateFolderError.

      Returns:
      the tag for this instance.
    • isPath

      public boolean isPath()
      Returns true if this instance has the tag CreateFolderError.Tag.PATH, false otherwise.
      Returns:
      true if this instance is tagged as CreateFolderError.Tag.PATH, false otherwise.
    • path

      public static CreateFolderError path(WriteError value)
      Returns an instance of CreateFolderError that has its tag set to CreateFolderError.Tag.PATH.

      None

      Parameters:
      value - value to assign to this instance.
      Returns:
      Instance of CreateFolderError with its tag set to CreateFolderError.Tag.PATH.
      Throws:
      IllegalArgumentException - if value is null.
    • getPathValue

      public WriteError getPathValue()
      This instance must be tagged as CreateFolderError.Tag.PATH.
      Returns:
      The WriteError value associated with this instance if isPath() is true.
      Throws:
      IllegalStateException - If isPath() is false.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

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

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

      The returned String may contain newlines.

      Returns:
      Formatted, multiline String representation of this object