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
9 changes: 9 additions & 0 deletions core/api/core.api
Original file line number Diff line number Diff line change
Expand Up @@ -11570,6 +11570,7 @@ public final class com/dropbox/core/v2/sharing/PendingUploadMode : java/lang/Enu
}

public final class com/dropbox/core/v2/sharing/PermissionDeniedReason {
public static final field FOLDER_CONTAINS_SHARED_FOLDER Lcom/dropbox/core/v2/sharing/PermissionDeniedReason;
public static final field FOLDER_IS_INSIDE_SHARED_FOLDER Lcom/dropbox/core/v2/sharing/PermissionDeniedReason;
public static final field FOLDER_IS_LIMITED_TEAM_FOLDER Lcom/dropbox/core/v2/sharing/PermissionDeniedReason;
public static final field OTHER Lcom/dropbox/core/v2/sharing/PermissionDeniedReason;
Expand All @@ -11589,6 +11590,7 @@ public final class com/dropbox/core/v2/sharing/PermissionDeniedReason {
public fun getInsufficientPlanValue ()Lcom/dropbox/core/v2/sharing/InsufficientPlan;
public fun hashCode ()I
public static fun insufficientPlan (Lcom/dropbox/core/v2/sharing/InsufficientPlan;)Lcom/dropbox/core/v2/sharing/PermissionDeniedReason;
public fun isFolderContainsSharedFolder ()Z
public fun isFolderIsInsideSharedFolder ()Z
public fun isFolderIsLimitedTeamFolder ()Z
public fun isInsufficientPlan ()Z
Expand All @@ -11611,6 +11613,7 @@ public final class com/dropbox/core/v2/sharing/PermissionDeniedReason {
}

public final class com/dropbox/core/v2/sharing/PermissionDeniedReason$Tag : java/lang/Enum {
public static final field FOLDER_CONTAINS_SHARED_FOLDER Lcom/dropbox/core/v2/sharing/PermissionDeniedReason$Tag;
public static final field FOLDER_IS_INSIDE_SHARED_FOLDER Lcom/dropbox/core/v2/sharing/PermissionDeniedReason$Tag;
public static final field FOLDER_IS_LIMITED_TEAM_FOLDER Lcom/dropbox/core/v2/sharing/PermissionDeniedReason$Tag;
public static final field INSUFFICIENT_PLAN Lcom/dropbox/core/v2/sharing/PermissionDeniedReason$Tag;
Expand Down Expand Up @@ -12739,6 +12742,8 @@ public class com/dropbox/core/v2/sharing/UnshareFileErrorException : com/dropbox
}

public final class com/dropbox/core/v2/sharing/UnshareFolderError {
public static final field FOLDER_CONTAINS_SHARED_FOLDER Lcom/dropbox/core/v2/sharing/UnshareFolderError;
public static final field FOLDER_IS_INSIDE_SHARED_FOLDER Lcom/dropbox/core/v2/sharing/UnshareFolderError;
public static final field NO_PERMISSION Lcom/dropbox/core/v2/sharing/UnshareFolderError;
public static final field OTHER Lcom/dropbox/core/v2/sharing/UnshareFolderError;
public static final field TEAM_FOLDER Lcom/dropbox/core/v2/sharing/UnshareFolderError;
Expand All @@ -12748,6 +12753,8 @@ public final class com/dropbox/core/v2/sharing/UnshareFolderError {
public fun getAccessErrorValue ()Lcom/dropbox/core/v2/sharing/SharedFolderAccessError;
public fun hashCode ()I
public fun isAccessError ()Z
public fun isFolderContainsSharedFolder ()Z
public fun isFolderIsInsideSharedFolder ()Z
public fun isNoPermission ()Z
public fun isOther ()Z
public fun isTeamFolder ()Z
Expand All @@ -12759,6 +12766,8 @@ public final class com/dropbox/core/v2/sharing/UnshareFolderError {

public final class com/dropbox/core/v2/sharing/UnshareFolderError$Tag : java/lang/Enum {
public static final field ACCESS_ERROR Lcom/dropbox/core/v2/sharing/UnshareFolderError$Tag;
public static final field FOLDER_CONTAINS_SHARED_FOLDER Lcom/dropbox/core/v2/sharing/UnshareFolderError$Tag;
public static final field FOLDER_IS_INSIDE_SHARED_FOLDER Lcom/dropbox/core/v2/sharing/UnshareFolderError$Tag;
public static final field NO_PERMISSION Lcom/dropbox/core/v2/sharing/UnshareFolderError$Tag;
public static final field OTHER Lcom/dropbox/core/v2/sharing/UnshareFolderError$Tag;
public static final field TEAM_FOLDER Lcom/dropbox/core/v2/sharing/UnshareFolderError$Tag;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ public enum Tag {
*/
RESTRICTED_BY_PARENT_FOLDER,
INSUFFICIENT_PLAN, // InsufficientPlan
/**
* Folder contains another shared folder.
*/
FOLDER_CONTAINS_SHARED_FOLDER,
/**
* Catch-all used for unknown tag values returned by the Dropbox
* servers.
Expand Down Expand Up @@ -162,6 +166,10 @@ public enum Tag {
* Policy cannot be changed due to restrictions from parent folder.
*/
public static final PermissionDeniedReason RESTRICTED_BY_PARENT_FOLDER = new PermissionDeniedReason().withTag(Tag.RESTRICTED_BY_PARENT_FOLDER);
/**
* Folder contains another shared folder.
*/
public static final PermissionDeniedReason FOLDER_CONTAINS_SHARED_FOLDER = new PermissionDeniedReason().withTag(Tag.FOLDER_CONTAINS_SHARED_FOLDER);
/**
* Catch-all used for unknown tag values returned by the Dropbox servers.
*
Expand Down Expand Up @@ -427,6 +435,17 @@ public InsufficientPlan getInsufficientPlanValue() {
return insufficientPlanValue;
}

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

/**
* Returns {@code true} if this instance has the tag {@link Tag#OTHER},
* {@code false} otherwise.
Expand Down Expand Up @@ -491,6 +510,8 @@ else if (obj instanceof PermissionDeniedReason) {
return true;
case INSUFFICIENT_PLAN:
return (this.insufficientPlanValue == other.insufficientPlanValue) || (this.insufficientPlanValue.equals(other.insufficientPlanValue));
case FOLDER_CONTAINS_SHARED_FOLDER:
return true;
case OTHER:
return true;
default:
Expand Down Expand Up @@ -591,6 +612,10 @@ public void serialize(PermissionDeniedReason value, JsonGenerator g) throws IOEx
g.writeEndObject();
break;
}
case FOLDER_CONTAINS_SHARED_FOLDER: {
g.writeString("folder_contains_shared_folder");
break;
}
default: {
g.writeString("other");
}
Expand Down Expand Up @@ -662,6 +687,9 @@ else if ("insufficient_plan".equals(tag)) {
fieldValue = InsufficientPlan.Serializer.INSTANCE.deserialize(p, true);
value = PermissionDeniedReason.insufficientPlan(fieldValue);
}
else if ("folder_contains_shared_folder".equals(tag)) {
value = PermissionDeniedReason.FOLDER_CONTAINS_SHARED_FOLDER;
}
else {
value = PermissionDeniedReason.OTHER;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ public enum Tag {
* This shared folder has too many files to be unshared.
*/
TOO_MANY_FILES,
/**
* This shared folder is inside another shared folder
*/
FOLDER_IS_INSIDE_SHARED_FOLDER,
/**
* This shared folder contains another shared folder.
*/
FOLDER_CONTAINS_SHARED_FOLDER,
/**
* Catch-all used for unknown tag values returned by the Dropbox
* servers.
Expand All @@ -69,6 +77,14 @@ public enum Tag {
* This shared folder has too many files to be unshared.
*/
public static final UnshareFolderError TOO_MANY_FILES = new UnshareFolderError().withTag(Tag.TOO_MANY_FILES);
/**
* This shared folder is inside another shared folder
*/
public static final UnshareFolderError FOLDER_IS_INSIDE_SHARED_FOLDER = new UnshareFolderError().withTag(Tag.FOLDER_IS_INSIDE_SHARED_FOLDER);
/**
* This shared folder contains another shared folder.
*/
public static final UnshareFolderError FOLDER_CONTAINS_SHARED_FOLDER = new UnshareFolderError().withTag(Tag.FOLDER_CONTAINS_SHARED_FOLDER);
/**
* Catch-all used for unknown tag values returned by the Dropbox servers.
*
Expand Down Expand Up @@ -211,6 +227,28 @@ public boolean isTooManyFiles() {
return this._tag == Tag.TOO_MANY_FILES;
}

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

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

/**
* Returns {@code true} if this instance has the tag {@link Tag#OTHER},
* {@code false} otherwise.
Expand Down Expand Up @@ -253,6 +291,10 @@ else if (obj instanceof UnshareFolderError) {
return true;
case TOO_MANY_FILES:
return true;
case FOLDER_IS_INSIDE_SHARED_FOLDER:
return true;
case FOLDER_CONTAINS_SHARED_FOLDER:
return true;
case OTHER:
return true;
default:
Expand Down Expand Up @@ -310,6 +352,14 @@ public void serialize(UnshareFolderError value, JsonGenerator g) throws IOExcept
g.writeString("too_many_files");
break;
}
case FOLDER_IS_INSIDE_SHARED_FOLDER: {
g.writeString("folder_is_inside_shared_folder");
break;
}
case FOLDER_CONTAINS_SHARED_FOLDER: {
g.writeString("folder_contains_shared_folder");
break;
}
default: {
g.writeString("other");
}
Expand Down Expand Up @@ -349,6 +399,12 @@ else if ("no_permission".equals(tag)) {
else if ("too_many_files".equals(tag)) {
value = UnshareFolderError.TOO_MANY_FILES;
}
else if ("folder_is_inside_shared_folder".equals(tag)) {
value = UnshareFolderError.FOLDER_IS_INSIDE_SHARED_FOLDER;
}
else if ("folder_contains_shared_folder".equals(tag)) {
value = UnshareFolderError.FOLDER_CONTAINS_SHARED_FOLDER;
}
else {
value = UnshareFolderError.OTHER;
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/stone