Class GetMetadataError

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

public final class GetMetadataError 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 GetMetadataError.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 GetMetadataError.

      Returns:
      the tag for this instance.
    • isPath

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

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

      None

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

      public LookupError getPathValue()
      This instance must be tagged as GetMetadataError.Tag.PATH.
      Returns:
      The LookupError 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