{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cesnet/json-schema/cesnet-rich-destination-schema.json",
  "title": "RichDestination",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cesnet-servicesmanager-api-openapi.yml#/components/schemas/RichDestination",
  "allOf": [
    {
      "$ref": "#/$defs/Destination"
    }
  ],
  "properties": {
    "blocked": {
      "type": "boolean"
    },
    "service": {
      "$ref": "#/$defs/Service"
    },
    "facility": {
      "$ref": "#/$defs/Facility"
    },
    "lastSuccessfulPropagation": {
      "type": "string"
    },
    "lastAttemptedPropagation": {
      "type": "string"
    }
  },
  "$defs": {
    "Auditable": {
      "description": "represents audit information",
      "allOf": [
        {
          "$ref": "#/$defs/PerunBean"
        }
      ],
      "properties": {
        "createdAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "createdBy": {
          "type": [
            "string",
            "null"
          ]
        },
        "modifiedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "modifiedBy": {
          "type": [
            "string",
            "null"
          ]
        },
        "createdByUid": {
          "type": [
            "integer",
            "null"
          ]
        },
        "modifiedByUid": {
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "Destination": {
      "allOf": [
        {
          "$ref": "#/$defs/Auditable"
        }
      ],
      "properties": {
        "destination": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/DestinationType"
        },
        "propagationType": {
          "$ref": "#/$defs/DestinationPropagationType"
        }
      }
    },
    "DestinationPropagationType": {
      "type": "string",
      "description": "type of propagation of service settings to a destination",
      "enum": [
        "PARALLEL",
        "SERIAL",
        "DUMMY"
      ]
    },
    "DestinationType": {
      "type": "string",
      "description": "type of destination, i.e. way of delivery of service settings",
      "enum": [
        "host",
        "url",
        "user@host",
        "user@host:port",
        "service-specific",
        "user@host-windows",
        "host-windows-proxy",
        "s3",
        "s3-json",
        "url-json"
      ]
    },
    "Facility": {
      "allOf": [
        {
          "$ref": "#/$defs/Auditable"
        }
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "uuid": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "PerunBean": {
      "description": "identifiable entity in Perun, common ancestor of all entity classes",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "beanName": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "beanName"
      ]
    },
    "Service": {
      "allOf": [
        {
          "$ref": "#/$defs/Auditable"
        }
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "delay": {
          "type": "integer"
        },
        "recurrence": {
          "type": "integer"
        },
        "enabled": {
          "type": "boolean"
        },
        "script": {
          "type": "string"
        },
        "useExpiredMembers": {
          "type": "boolean"
        },
        "useExpiredVoMembers": {
          "type": "boolean"
        },
        "useBannedMembers": {
          "type": "boolean"
        }
      }
    }
  }
}