---
$schema: "http://json-schema.org/draft-04/schema#"
title: UserGroupWithInheritable
type: object
example: {
  "id": "5",
  "parent_id": "1",
  "name": "A Child Usergroup",
  "children": [
    {
      "id": "2",
      "name": "Some child user group"
    },
    {
      "id": "3",
      "name": "Yet another child user group"
    }
  ],
  "settings": {
    "inherited_from": null,
    "data_retention_policy": {
      "idle_doc_timeout_preparation": null,
      "idle_doc_timeout_closed": null,
      "idle_doc_timeout_canceled": 42,
      "idle_doc_timeout_timedout": null,
      "idle_doc_timeout_rejected": null,
      "idle_doc_timeout_error": null,
      "immediate_trash": false
    },
    "inheritable_preview": {
      "inherited_from": "1",
      "data_retention_policy": {
        "idle_doc_timeout_preparation": null,
        "idle_doc_timeout_closed": null,
        "idle_doc_timeout_canceled": null,
        "idle_doc_timeout_timedout": null,
        "idle_doc_timeout_rejected": 23,
        "idle_doc_timeout_error": null,
        "immediate_trash": true
      }
    }
  },
  "contact_details": {
    "inherited_from": "1",
    "address": {
      "company_number": "5568166804",
      "company_name": "Scrive",
      "address": "Grev Turegatan 11A",
      "zip": "114 46",
      "city": "Stockholm",
      "country": "Sweden"
    },
    "inheritable_preview": {
      "inherited_from": "1",
      "address": {
        "company_number": "5568166804",
        "company_name": "Scrive",
        "address": "Grev Turegatan 11A",
        "zip": "114 46",
        "city": "Stockholm",
        "country": "Sweden"
      }
    }
  },
  "tags": [
    {
      "name": "home-planet",
      "value": "Earth"
    }
  ]
}
description: |
  JSON representation of a User Group (with Inheritable Previews).
properties:
  id:
    type: string
  parent_id:
    type: string
  name:
    type: string
  children:
    type: array
    default: []
    items:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
  settings:
    $ref: ./UserGroupSettingsWithInheritable.yaml
  contact_details:
    $ref: ./UserGroupContactDetailsWithInheritable.yaml
  tags:
    $ref: ./Tags.yaml
