#%RAML 1.0 Library
uses:
  app: app.raml
  pod: pod.raml
  podStatus: podStatus.raml
  strings: stringTypes.raml
  pragma: pragma.raml
types:
  GroupInfo:
    type: object
    (pragma.serializeOnly): # Used only for serialization
    description: |
      GroupInfo is a status report of a tree (or subtree) of the root-group hierarchy
      within Marathon. It is never used to update groups, it is only for reporting.
    properties:
      id: strings.PathId
      apps?:
        type: array
        items: app.AppInfo
        uniqueItems: true
      pods?:
        type: array
        items: podStatus.PodStatus
        uniqueItems: true
      groups?:
        type: array
        items: GroupInfo
        uniqueItems: true
        description: |
            Groups can build a tree.
            Each group can contain sub-groups.
            The sub-groups are defined here.
      dependencies?:
        type: array
        items: strings.PathId
        uniqueItems: true
        description: |
          A list of services that this group depends on.
          An order is derived from the dependencies for performing start/stop and
          upgrade of the application. For example, an application /a relies on the
          services /b which itself relies on /c. To start all 3 applications,
          first /c is started than /b than /a.
      version?:
        type: datetime
      enforceRole?:
        type: boolean
  GroupUpdate:
    type: object
    (pragma.asUpdateType):
    properties:
      id: strings.PathId
      apps?:
        type: array
        items: app.App
        uniqueItems: true
      groups?:
        type: array
        items: GroupUpdate
        uniqueItems: true
      dependencies?:
        type: array
        items: strings.PathId
        uniqueItems: true
      scaleBy?:
        type: number
        format: double
        minimum: 0
      version?:
        type: datetime
      enforceRole?:
        type: boolean
  GroupPartialUpdate:
    type: object
    properties:
      enforceRole?:
        type: boolean
