Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions core/api/core.api
Original file line number Diff line number Diff line change
Expand Up @@ -11176,6 +11176,7 @@ public final class com/dropbox/core/v2/sharing/MountFolderError {
public fun equals (Ljava/lang/Object;)Z
public fun getAccessErrorValue ()Lcom/dropbox/core/v2/sharing/SharedFolderAccessError;
public fun getInsufficientQuotaValue ()Lcom/dropbox/core/v2/sharing/InsufficientQuotaAmounts;
public fun getTooManyMountsValue ()Lcom/dropbox/core/v2/sharing/TooManyMountsError;
public fun hashCode ()I
public static fun insufficientQuota (Lcom/dropbox/core/v2/sharing/InsufficientQuotaAmounts;)Lcom/dropbox/core/v2/sharing/MountFolderError;
public fun isAccessError ()Z
Expand All @@ -11186,9 +11187,11 @@ public final class com/dropbox/core/v2/sharing/MountFolderError {
public fun isNoPermission ()Z
public fun isNotMountable ()Z
public fun isOther ()Z
public fun isTooManyMounts ()Z
public fun tag ()Lcom/dropbox/core/v2/sharing/MountFolderError$Tag;
public fun toString ()Ljava/lang/String;
public fun toStringMultiline ()Ljava/lang/String;
public static fun tooManyMounts (Lcom/dropbox/core/v2/sharing/TooManyMountsError;)Lcom/dropbox/core/v2/sharing/MountFolderError;
}

public final class com/dropbox/core/v2/sharing/MountFolderError$Tag : java/lang/Enum {
Expand All @@ -11200,6 +11203,7 @@ public final class com/dropbox/core/v2/sharing/MountFolderError$Tag : java/lang/
public static final field NOT_MOUNTABLE Lcom/dropbox/core/v2/sharing/MountFolderError$Tag;
public static final field NO_PERMISSION Lcom/dropbox/core/v2/sharing/MountFolderError$Tag;
public static final field OTHER Lcom/dropbox/core/v2/sharing/MountFolderError$Tag;
public static final field TOO_MANY_MOUNTS Lcom/dropbox/core/v2/sharing/MountFolderError$Tag;
public static fun valueOf (Ljava/lang/String;)Lcom/dropbox/core/v2/sharing/MountFolderError$Tag;
public static fun values ()[Lcom/dropbox/core/v2/sharing/MountFolderError$Tag;
}
Expand All @@ -11209,6 +11213,20 @@ public class com/dropbox/core/v2/sharing/MountFolderErrorException : com/dropbox
public fun <init> (Ljava/lang/String;Ljava/lang/String;Lcom/dropbox/core/LocalizedText;Lcom/dropbox/core/v2/sharing/MountFolderError;)V
}

public class com/dropbox/core/v2/sharing/MountLimitsInfo {
protected final field currentCount J
protected final field limit J
protected final field newCount J
public fun <init> (JJJ)V
public fun equals (Ljava/lang/Object;)Z
public fun getCurrentCount ()J
public fun getLimit ()J
public fun getNewCount ()J
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public fun toStringMultiline ()Ljava/lang/String;
}

public class com/dropbox/core/v2/sharing/ParentFolderAccessInfo {
protected final field folderName Ljava/lang/String;
protected final field path Ljava/lang/String;
Expand Down Expand Up @@ -11604,16 +11622,19 @@ public final class com/dropbox/core/v2/sharing/ShareFolderError {
public static fun badPath (Lcom/dropbox/core/v2/sharing/SharePathError;)Lcom/dropbox/core/v2/sharing/ShareFolderError;
public fun equals (Ljava/lang/Object;)Z
public fun getBadPathValue ()Lcom/dropbox/core/v2/sharing/SharePathError;
public fun getTooManyMountsValue ()Lcom/dropbox/core/v2/sharing/TooManyMountsError;
public fun hashCode ()I
public fun isBadPath ()Z
public fun isDisallowedSharedLinkPolicy ()Z
public fun isEmailUnverified ()Z
public fun isNoPermission ()Z
public fun isOther ()Z
public fun isTeamPolicyDisallowsMemberPolicy ()Z
public fun isTooManyMounts ()Z
public fun tag ()Lcom/dropbox/core/v2/sharing/ShareFolderError$Tag;
public fun toString ()Ljava/lang/String;
public fun toStringMultiline ()Ljava/lang/String;
public static fun tooManyMounts (Lcom/dropbox/core/v2/sharing/TooManyMountsError;)Lcom/dropbox/core/v2/sharing/ShareFolderError;
}

public final class com/dropbox/core/v2/sharing/ShareFolderError$Tag : java/lang/Enum {
Expand All @@ -11623,6 +11644,7 @@ public final class com/dropbox/core/v2/sharing/ShareFolderError$Tag : java/lang/
public static final field NO_PERMISSION Lcom/dropbox/core/v2/sharing/ShareFolderError$Tag;
public static final field OTHER Lcom/dropbox/core/v2/sharing/ShareFolderError$Tag;
public static final field TEAM_POLICY_DISALLOWS_MEMBER_POLICY Lcom/dropbox/core/v2/sharing/ShareFolderError$Tag;
public static final field TOO_MANY_MOUNTS Lcom/dropbox/core/v2/sharing/ShareFolderError$Tag;
public static fun valueOf (Ljava/lang/String;)Lcom/dropbox/core/v2/sharing/ShareFolderError$Tag;
public static fun values ()[Lcom/dropbox/core/v2/sharing/ShareFolderError$Tag;
}
Expand Down Expand Up @@ -12272,6 +12294,34 @@ public class com/dropbox/core/v2/sharing/TeamMemberInfo {
public fun toStringMultiline ()Ljava/lang/String;
}

public final class com/dropbox/core/v2/sharing/TooManyMountsError {
public static final field OTHER Lcom/dropbox/core/v2/sharing/TooManyMountsError;
public fun equals (Ljava/lang/Object;)Z
public fun getHomeMountsExceededValue ()Lcom/dropbox/core/v2/sharing/MountLimitsInfo;
public fun getTotalMountsExceededValue ()Lcom/dropbox/core/v2/sharing/MountLimitsInfo;
public fun getTreeSizeExceededValue ()Lcom/dropbox/core/v2/sharing/MountLimitsInfo;
public fun hashCode ()I
public static fun homeMountsExceeded (Lcom/dropbox/core/v2/sharing/MountLimitsInfo;)Lcom/dropbox/core/v2/sharing/TooManyMountsError;
public fun isHomeMountsExceeded ()Z
public fun isOther ()Z
public fun isTotalMountsExceeded ()Z
public fun isTreeSizeExceeded ()Z
public fun tag ()Lcom/dropbox/core/v2/sharing/TooManyMountsError$Tag;
public fun toString ()Ljava/lang/String;
public fun toStringMultiline ()Ljava/lang/String;
public static fun totalMountsExceeded (Lcom/dropbox/core/v2/sharing/MountLimitsInfo;)Lcom/dropbox/core/v2/sharing/TooManyMountsError;
public static fun treeSizeExceeded (Lcom/dropbox/core/v2/sharing/MountLimitsInfo;)Lcom/dropbox/core/v2/sharing/TooManyMountsError;
}

public final class com/dropbox/core/v2/sharing/TooManyMountsError$Tag : java/lang/Enum {
public static final field HOME_MOUNTS_EXCEEDED Lcom/dropbox/core/v2/sharing/TooManyMountsError$Tag;
public static final field OTHER Lcom/dropbox/core/v2/sharing/TooManyMountsError$Tag;
public static final field TOTAL_MOUNTS_EXCEEDED Lcom/dropbox/core/v2/sharing/TooManyMountsError$Tag;
public static final field TREE_SIZE_EXCEEDED Lcom/dropbox/core/v2/sharing/TooManyMountsError$Tag;
public static fun valueOf (Ljava/lang/String;)Lcom/dropbox/core/v2/sharing/TooManyMountsError$Tag;
public static fun values ()[Lcom/dropbox/core/v2/sharing/TooManyMountsError$Tag;
}

public final class com/dropbox/core/v2/sharing/TransferFolderError {
public static final field INVALID_DROPBOX_ID Lcom/dropbox/core/v2/sharing/TransferFolderError;
public static final field NEW_OWNER_EMAIL_UNVERIFIED Lcom/dropbox/core/v2/sharing/TransferFolderError;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ public enum Tag {
* automounter is responsible for mounting it.
*/
MUST_AUTOMOUNT,
/**
* User will have too many mounts after this operation.
*/
TOO_MANY_MOUNTS, // TooManyMountsError
/**
* Catch-all used for unknown tag values returned by the Dropbox
* servers.
Expand Down Expand Up @@ -110,6 +114,7 @@ public enum Tag {
private Tag _tag;
private SharedFolderAccessError accessErrorValue;
private InsufficientQuotaAmounts insufficientQuotaValue;
private TooManyMountsError tooManyMountsValue;

/**
* Private default constructor, so that object is uninitializable publicly.
Expand Down Expand Up @@ -159,6 +164,22 @@ private MountFolderError withTagAndInsufficientQuota(Tag _tag, InsufficientQuota
return result;
}

/**
*
* @param tooManyMountsValue User will have too many mounts after this
* operation. Must not be {@code null}.
* @param _tag Discriminating tag for this instance.
*
* @throws IllegalArgumentException If any argument does not meet its
* preconditions.
*/
private MountFolderError withTagAndTooManyMounts(Tag _tag, TooManyMountsError tooManyMountsValue) {
MountFolderError result = new MountFolderError();
result._tag = _tag;
result.tooManyMountsValue = tooManyMountsValue;
return result;
}

/**
* Returns the tag for this instance.
*
Expand Down Expand Up @@ -329,6 +350,55 @@ public boolean isMustAutomount() {
return this._tag == Tag.MUST_AUTOMOUNT;
}

/**
* Returns {@code true} if this instance has the tag {@link
* Tag#TOO_MANY_MOUNTS}, {@code false} otherwise.
*
* @return {@code true} if this instance is tagged as {@link
* Tag#TOO_MANY_MOUNTS}, {@code false} otherwise.
*/
public boolean isTooManyMounts() {
return this._tag == Tag.TOO_MANY_MOUNTS;
}

/**
* Returns an instance of {@code MountFolderError} that has its tag set to
* {@link Tag#TOO_MANY_MOUNTS}.
*
* <p> User will have too many mounts after this operation. </p>
*
* @param value value to assign to this instance.
*
* @return Instance of {@code MountFolderError} with its tag set to {@link
* Tag#TOO_MANY_MOUNTS}.
*
* @throws IllegalArgumentException if {@code value} is {@code null}.
*/
public static MountFolderError tooManyMounts(TooManyMountsError value) {
if (value == null) {
throw new IllegalArgumentException("Value is null");
}
return new MountFolderError().withTagAndTooManyMounts(Tag.TOO_MANY_MOUNTS, value);
}

/**
* User will have too many mounts after this operation.
*
* <p> This instance must be tagged as {@link Tag#TOO_MANY_MOUNTS}. </p>
*
* @return The {@link TooManyMountsError} value associated with this
* instance if {@link #isTooManyMounts} is {@code true}.
*
* @throws IllegalStateException If {@link #isTooManyMounts} is {@code
* false}.
*/
public TooManyMountsError getTooManyMountsValue() {
if (this._tag != Tag.TOO_MANY_MOUNTS) {
throw new IllegalStateException("Invalid tag: required Tag.TOO_MANY_MOUNTS, but was Tag." + this._tag.name());
}
return tooManyMountsValue;
}

/**
* Returns {@code true} if this instance has the tag {@link Tag#OTHER},
* {@code false} otherwise.
Expand All @@ -345,7 +415,8 @@ public int hashCode() {
int hash = Arrays.hashCode(new Object [] {
this._tag,
this.accessErrorValue,
this.insufficientQuotaValue
this.insufficientQuotaValue,
this.tooManyMountsValue
});
return hash;
}
Expand Down Expand Up @@ -378,6 +449,8 @@ else if (obj instanceof MountFolderError) {
return true;
case MUST_AUTOMOUNT:
return true;
case TOO_MANY_MOUNTS:
return (this.tooManyMountsValue == other.tooManyMountsValue) || (this.tooManyMountsValue.equals(other.tooManyMountsValue));
case OTHER:
return true;
default:
Expand Down Expand Up @@ -450,6 +523,14 @@ public void serialize(MountFolderError value, JsonGenerator g) throws IOExceptio
g.writeString("must_automount");
break;
}
case TOO_MANY_MOUNTS: {
g.writeStartObject();
writeTag("too_many_mounts", g);
g.writeFieldName("too_many_mounts");
TooManyMountsError.Serializer.INSTANCE.serialize(value.tooManyMountsValue, g);
g.writeEndObject();
break;
}
default: {
g.writeString("other");
}
Expand Down Expand Up @@ -500,6 +581,12 @@ else if ("not_mountable".equals(tag)) {
else if ("must_automount".equals(tag)) {
value = MountFolderError.MUST_AUTOMOUNT;
}
else if ("too_many_mounts".equals(tag)) {
TooManyMountsError fieldValue = null;
expectField("too_many_mounts", p);
fieldValue = TooManyMountsError.Serializer.INSTANCE.deserialize(p);
value = MountFolderError.tooManyMounts(fieldValue);
}
else {
value = MountFolderError.OTHER;
}
Expand Down
Loading
Loading