syntax = "proto3";

message ArrayRecursiveUnionExplicitPointer {
  repeated ArrayRecursiveUnionExplicitPointer.IBucket value = 1;
  message IBucket {
    oneof value {
      ArrayRecursiveUnionExplicitPointer.IDirectory v1 = 1;
      ArrayRecursiveUnionExplicitPointer.IImageFile v2 = 2;
      ArrayRecursiveUnionExplicitPointer.ITextFile v3 = 3;
      ArrayRecursiveUnionExplicitPointer.IZipFile v4 = 4;
      ArrayRecursiveUnionExplicitPointer.IShortcut v5 = 5;
    }
  }

  message IDirectory {
    required double id = 1;
    required string name = 2;
    required string path = 3;
    repeated ArrayRecursiveUnionExplicitPointer.IBucket children = 4;
    required string type = 5;
  }

  message IImageFile {
    required double id = 1;
    required string name = 2;
    required string path = 3;
    required double width = 4;
    required double height = 5;
    required string url = 6;
    required double size = 7;
    required string type = 8;
    required string extension = 9;
  }

  message ITextFile {
    required double id = 1;
    required string name = 2;
    required string path = 3;
    required double size = 4;
    required string content = 5;
    required string type = 6;
    required string extension = 7;
  }

  message IZipFile {
    required double id = 1;
    required string name = 2;
    required string path = 3;
    required double size = 4;
    required double count = 5;
    required string type = 6;
    required string extension = 7;
  }

  message IShortcut {
    required double id = 1;
    required string name = 2;
    required string path = 3;
    required ArrayRecursiveUnionExplicitPointer.IBucket target = 4;
    required string type = 5;
    required string extension = 6;
  }
}