Collection
==========

.. _SettingsEntryAsRecursiveApproval: 

SettingsEntryAsRecursiveApproval
--------------------------------

Property for recursive approval.

.. code-block:: json

 message SettingsEntryAsRecursiveApproval {
  RecursiveApproval value = 1;
  bool editable = 2;
  optional string field_type = 3;
  optional string tooltip_type = 4;
 }

.. list-table::
   :widths: 20 20 60
   :header-rows: 1

   * - Field
     - Type
     - Description
   * - ``value``
     - :ref:`RecursiveApproval <RecursiveApproval>`
     -
   * - ``editable``
     - ``boolean``
     - 
   * - ``field_type``
     - ``string``
     - optional
   * - ``tooltip_type``
     - ``string``
     - optional

.. _SettingsEntryAsApprovalGroup:

SettingsEntryAsApprovalGroup
----------------------------

Property for approval group.

.. code-block:: json

 message SettingsEntryAsApprovalGroup {
  string value = 1;
  repeated Group available_groups = 5;
  bool editable = 2;
  optional string field_type = 3;
  optional string tooltip_type = 4;
 }

.. list-table::
   :widths: 20 20 60
   :header-rows: 1

   * - Field
     - Type
     - Description
   * - ``value``
     - ``string``
     -
   * - ``available_groups``
     - array of ``Group``
     - 
   * - ``editable``
     - ``boolean``
     - 
   * - ``field_type``
     - ``string``
     - optional
   * - ``tooltip_type``
     - ``string``
     - optional

.. _UserOrGroup: 

UserOrGroup
-----------

Identifies a user or group

.. code-block:: json

 message UserOrGroup {
  string title = 1;
  string id = 2;
  ItemType item_type = 3;
 }

.. list-table::
   :widths: 20 20 60
   :header-rows: 1

   * - Field
     - Type
     - Description
   * - ``title``
     - ``string``
     -
   * - ``id``
     - ``string``
     - 
   * - ``item_type``
     - ``ItemType``
     - 

.. _SettingsEntryAsNotificationsAdmin:

SettingsEntryAsNotificationsAdmin
---------------------------------

Property for notifications

.. code-block:: json

 message SettingsEntryAsNotificationsAdmin {
  // All SettingsEntry need a .value
  // protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED
  repeated UserOrGroup value = 1;
  bool editable = 2;
  optional string field_type = 3;
  optional string tooltip_type = 4;
 }

.. list-table::
   :widths: 20 20 60
   :header-rows: 1

   * - Field
     - Type
     - Description
   * - ``value``
     - array of ``UserOrGroup``
     - Array of :ref:`UserOrGroup <UserOrGroup>`
   * - ``editable``
     - ``boolean``
     - 
   * - ``field_type``
     - ``string``
     - optional
   * - ``tooltip_type``
     - ``string``
     - optional

.. _SettingsEntryAsNotification:

SettingsEntryAsNotification
---------------------------

Property for notification for non-admin

.. code-block:: json

 message SettingsEntryAsNotification {
  FolderNotification value = 1;
  bool editable = 2;
  optional string field_type = 3;
  optional string tooltip_type = 4;
 }

.. list-table::
   :widths: 20 20 60
   :header-rows: 1

   * - Field
     - Type
     - Description
   * - ``value``
     - ``FolderNotification``
     - :ref:`FolderNotification <FolderNotification>`
   * - ``editable``
     - ``boolean``
     - 
   * - ``field_type``
     - ``string``
     - optional
   * - ``tooltip_type``
     - ``string``
     - optional

.. _Collection:

Collection
----------

The object of 'Collection'. A collection is usually a folder, but there may be some other types as well.

Technically, a collection is anything that can have children without being a ``DOCUMENT``.

.. code-block:: json

 message Collection {
  string id = 1;
  string dataroom_id = 2;
  string parent_id = 3;
  string name = 4;
  string type = 5;
  string document_class = 6;
  optional string author = 7;
  string title = 8;
  optional string path = 9;
  string version = 10;
  string description = 11;
  google.protobuf.Timestamp creation_date = 12;
  google.protobuf.Timestamp modification_date = 13;
  string icon = 14;
  optional uint32 num_children = 15;
  EffectivePermission effective_permission = 16;
  optional uint32 sub_docs = 17;
  repeated ItemPermissionsEntry permissions = 18;
  optional string restore_path = 19;
  optional string sequence = 20;
  optional string index = 21;
  optional bool no_index = 22;
  optional Parents parents = 24;
  optional string parent_title = 25;
  optional Labels labels = 26;
  optional string approval_group = 27;
  optional FolderNotification notification = 28;
  ItemType item_type = 31;
  optional bool has_different_parent_rights = 35;
  optional uint32 comments_count = 36;
  optional Parent parent = 37;
  optional bool has_pdf_password = 38;
  optional bool has_children = 39;
  optional bool is_symlink = 40;
  optional uint64 sub_size = 41;
  optional uint32 sum_unread = 42;
  optional bool is_shared = 43;
  optional bool is_read = 44;
  optional google.protobuf.Timestamp read_date = 48;
  optional bool has_comments = 49;

  map<uint32, uint32> sum_children = 45;
  map<uint32, uint32> sum_decendents = 46;
  map<uint32, uint32> size_decendents = 47;
 }

.. list-table::
   :widths: 20 20 60
   :header-rows: 1

   * - Field
     - Type
     - Description
   * - ``id``
     - ``string``
     -
   * - ``dataroom_id``
     - ``string``
     -
   * - ``parent_id``
     - ``string``
     -
   * - ``name``
     - ``string``
     -
   * - ``type``
     - ``string``
     -
   * - ``document_class``
     - ``string``
     -
   * - ``author``
     - ``string``
     - optional 
   * - ``title``
     - ``string``
     -
   * - ``path``
     - ``string``
     - optional 
   * - ``version``
     - ``string``
     -
   * - ``description``
     - ``string``
     -
   * - ``creation_date``
     - ``google.protobuf.Timestamp``
     -
   * - ``modification_date``
     - ``google.protobuf.Timestamp``
     -
   * - ``icon``
     - ``string``
     -
   * - ``num_children``
     - ``uint32``
     - optional 
   * - ``effective_permission``
     - ``EffectivePermission``
     -
   * - ``sub_docs``
     - ``uint32``
     - optional 
   * - ``permissions``
     - array of ``ItemPermissionsEntry``
     -
   * - ``restore_path``
     - ``string``
     - optional 
   * - ``sequence``
     - ``string``
     - optional 
   * - ``index``
     - ``string``
     - optional 
   * - ``no_index``
     - ``bool``
     - optional 
   * - ``parents``
     - ``Parents``
     - optional 
   * - ``parent_title``
     - ``string``
     - optional 
   * - ``labels``
     - ``Labels``
     - optional 
   * - ``approval_group``
     - ``string``
     - optional 
   * - ``notification``
     - ``FolderNotification``
     - optional 
   * - ``item_type``
     - ``ItemType``
     - optional 
   * - ``has_different_parent_rights``
     - ``bool``
     - optional 
   * - ``comments_count``
     - ``uint32``
     - optional 
   * - ``parent``
     - ``Parent``
     - optional 
   * - ``has_pdf_password``
     - ``bool``
     - optional 
   * - ``has_children``
     - ``bool``
     - optional 
   * - ``is_symlink``
     - ``bool``
     - optional 
   * - ``sub_size``
     - ``uint64``
     - optional 
   * - ``sum_unread``
     - ``uint32``
     - optional 
   * - ``is_shared``
     - ``bool``
     - optional 
   * - ``is_read``
     - ``bool``
     - optional 
   * - ``read_date``
     - ``google.protobuf.Timestamp``
     - optional 
   * - ``has_comments``
     - ``bool``
     - optional 
   * - ``sum_children``
     - ``map<uint32, uint32>``
     -
   * - ``sum_decendents``
     - ``map<uint32, uint32>``
     -
   * - ``size_decendents``
     - ``map<uint32, uint32>``
     -

.. _CollectionProperties:

CollectionProperties
--------------------

The properties of the collection item shown in ``properties``-dialogs.

.. code-block:: json

 message CollectionProperties {
  string id = 1;
  optional SettingsEntryAsString name = 4;
  optional SettingsEntryAsString author = 6;
  optional SettingsEntryAsString title = 7;
  optional SettingsEntryAsString sequence = 8;
  optional SettingsEntryAsString index = 9;
  optional SettingsEntryAsBool no_index = 10;
  optional SettingsEntryAsString path = 11;
  optional SettingsEntryAsDate creation_date = 14;
  optional SettingsEntryAsDate modification_date = 15;
  optional SettingsEntryAsString tags = 16;
  optional SettingsEntryAsString url = 17;
  optional SettingsEntryAsString description = 19;
  optional SettingsEntryAsApprovalGroup approval_group = 20;
  optional SettingsEntryAsRecursiveApproval recursive_approval_type = 21;
  optional SettingsEntryAsBool recursive_approval = 34;
  optional SettingsEntryAsString pdf_password = 22;
  optional SettingsEntryAsBool recursive_pdf_password_enabled = 23;
  optional SettingsEntryAsBool set_expiration_date = 24;
  optional SettingsEntryAsBool recursive_set_expiration_date = 25;
  optional SettingsEntryAsNumber collection_size = 26;
  optional SettingsEntryAsNumber sub_docs = 27;
  optional SettingsEntryAsString short_url = 28;
  optional SettingsEntryAsNotificationsAdmin user_notifications = 29;
  optional SettingsEntryAsNotification notification = 30;
  optional SettingsEntryAsBool recursive_notifications = 31;
  optional SettingsEntryAsDate delation_date = 38;
  optional SettingsEntryAsBool has_different_parent_rights = 35;
  ItemType item_type = 32;
  optional ItemSubType item_subtype = 33;
  optional SettingsEntryAsDocumentState document_state = 36;
 }

.. list-table::
   :widths: 20 20 60
   :header-rows: 1

   * - Field
     - Type
     - Description
   * - ``id``
     - ``string``
     -
   * - ``name``
     - ``SettingsEntryAsString``
     - optional 
   * - ``author``
     - ``SettingsEntryAsString``
     - optional 
   * - ``title``
     - ``SettingsEntryAsString``
     - optional 
   * - ``sequence``
     - ``SettingsEntryAsString``
     - optional 
   * - ``index``
     - ``SettingsEntryAsString``
     - optional 
   * - ``no_index``
     - ``SettingsEntryAsBool``
     - optional 
   * - ``path``
     - ``SettingsEntryAsString``
     - optional 
   * - ``creation_date``
     - ``SettingsEntryAsDate``
     - optional 
   * - ``modification_date``
     - ``SettingsEntryAsDate``
     - optional 
   * - ``tags``
     - ``SettingsEntryAsString``
     - optional 
   * - ``url``
     - ``SettingsEntryAsString``
     - optional 
   * - ``description``
     - ``SettingsEntryAsString``
     - optional 
   * - ``approval_group``
     - ``SettingsEntryAsApprovalGroup``
     - optional 
   * - ``recursive_approval_type``
     - ``SettingsEntryAsRecursiveApproval``
     - optional 
   * - ``recursive_approval``
     - ``SettingsEntryAsBool``
     - optional 
   * - ``pdf_password``
     - ``SettingsEntryAsString``
     - optional 
   * - ``recursive_pdf_password_enabled``
     - ``SettingsEntryAsBool``
     - optional 
   * - ``set_expiration_date``
     - ``SettingsEntryAsBool``
     - optional 
   * - ``recursive_set_expiration_date``
     - ``SettingsEntryAsBool``
     - optional 
   * - ``collection_size``
     - ``SettingsEntryAsNumber``
     - optional 
   * - ``sub_docs``
     - ``SettingsEntryAsNumber``
     - optional 
   * - ``short_url``
     - ``SettingsEntryAsString``
     - optional 
   * - ``user_notifications``
     - ``SettingsEntryAsNotificationsAdmin``
     - optional 
   * - ``notification``
     - ``SettingsEntryAsNotification``
     - optional 
   * - ``recursive_notifications``
     - ``SettingsEntryAsBool``
     - optional 
   * - ``delation_date``
     - ``SettingsEntryAsDate``
     - optional 
   * - ``has_different_parent_rights``
     - ``SettingsEntryAsBool``
     - optional 
   * - ``item_type``
     - ``ItemType``
     -
   * - ``item_subtype``
     - ``ItemSubType``
     - optional 
   * - ``document_state``
     - ``SettingsEntryAsDocumentState``
     - optional 

.. _Comment:

Comment
-------

The object representing a comment

.. code-block:: json

 message Comment {
  string id = 1;
  string dataroom_id = 2;
  string name = 4;
  string type = 5;
  string author = 6;
  string text = 7;
  string title = 8;
  google.protobuf.Timestamp creation_date = 11;
  google.protobuf.Timestamp modification_date = 12;
  EffectivePermission effective_permission = 15;
  optional Parent target_parent = 16;
  optional Parent target = 17;
  ItemType item_type = 31;
 }

.. list-table::
   :widths: 20 20 60
   :header-rows: 1

   * - Field
     - Type
     - Description
   * - ``id``
     - ``string``
     -
   * - ``dataroom_id``
     - ``string``
     -  
   * - ``name``
     - ``string``
     - 
   * - ``type``
     - ``string``
     -  
   * - ``author``
     - ``string``
     - 
   * - ``text``
     - ``string``
     -  
   * - ``title``
     - ``string``
     - 
   * - ``creation_date``
     - ``google.protobuf.Timestamp``
     -  
   * - ``modification_date``
     - ``google.protobuf.Timestamp``
     -  
   * - ``effective_permission``
     - ``EffectivePermission``
     - 
   * - ``target_parent``
     - ``Parent``
     - optional 
   * - ``target``
     - ``Parent``
     - optional 
   * - ``item_type``
     - ``ItemType``
     - 