{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudovna-eu/json-schema/cloudovna-eu-service-response-schema.json",
  "title": "ServiceResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudovna-eu-openapi.yml#/components/schemas/ServiceResponse",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "format": "guid"
    },
    "name": {
      "type": "string"
    },
    "type": {
      "$ref": "#/$defs/ServiceType"
    },
    "status": {
      "$ref": "#/$defs/ServiceStatus"
    },
    "statusMessage": {
      "type": [
        "string",
        "null"
      ]
    },
    "interval": {
      "$ref": "#/$defs/BillingInterval"
    },
    "price": {
      "type": "number",
      "format": "decimal"
    },
    "paidUntil": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "cancelAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "suspendedOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "removedOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "neverSuspend": {
      "type": "boolean"
    },
    "unbilled": {
      "type": "boolean"
    },
    "changeAtRenewal": {
      "nullable": true,
      "oneOf": [
        {
          "$ref": "#/$defs/PlannedChange"
        }
      ]
    },
    "changeOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "container": {
      "nullable": true,
      "oneOf": [
        {
          "$ref": "#/$defs/ContainerDto"
        }
      ]
    },
    "database": {
      "nullable": true,
      "oneOf": [
        {
          "$ref": "#/$defs/DatabaseDto"
        }
      ]
    },
    "managed": {
      "nullable": true,
      "oneOf": [
        {
          "$ref": "#/$defs/ManagedDto"
        }
      ]
    },
    "owner": {
      "nullable": true,
      "oneOf": [
        {
          "$ref": "#/$defs/OwnerDto"
        }
      ]
    },
    "node": {
      "nullable": true,
      "oneOf": [
        {
          "$ref": "#/$defs/NodeRefDto"
        }
      ]
    },
    "stack": {
      "nullable": true,
      "oneOf": [
        {
          "$ref": "#/$defs/StackRefDto"
        }
      ]
    },
    "links": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/LinkDto"
      }
    },
    "usedBy": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/LinkUserDto"
      }
    },
    "brokenReferences": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "trialEndsAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "poolId": {
      "type": [
        "string",
        "null"
      ],
      "format": "guid"
    },
    "poolSize": {
      "nullable": true,
      "oneOf": [
        {
          "$ref": "#/$defs/PoolSizeDto"
        }
      ]
    },
    "unlimited": {
      "type": "boolean"
    }
  },
  "$defs": {
    "BackupFrequency": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "Off",
        "Daily",
        "Weekly"
      ],
      "enum": [
        "Off",
        "Daily",
        "Weekly"
      ]
    },
    "BackupScheduleDto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "frequency": {
          "$ref": "#/$defs/BackupFrequency"
        },
        "hour": {
          "type": "integer",
          "format": "int32"
        },
        "weekday": {
          "$ref": "#/$defs/DayOfWeek"
        },
        "keep": {
          "type": "integer",
          "format": "int32"
        },
        "nextAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "minute": {
          "type": "integer",
          "format": "int32"
        },
        "maxKeep": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "BillingInterval": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "Monthly",
        "Annual"
      ],
      "enum": [
        "Monthly",
        "Annual"
      ]
    },
    "ConnectionLoginDto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "format": "guid"
        },
        "name": {
          "type": "string"
        },
        "username": {
          "type": "string"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "linkedContainerId": {
          "type": [
            "string",
            "null"
          ],
          "format": "guid"
        }
      }
    },
    "ContainerDomainDto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "hostname": {
          "type": "string"
        },
        "display": {
          "type": "string"
        },
        "active": {
          "type": "boolean"
        }
      }
    },
    "ContainerDto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "image": {
          "type": "string"
        },
        "containerPort": {
          "type": "integer",
          "format": "int32"
        },
        "domain": {
          "nullable": true,
          "oneOf": [
            {
              "$ref": "#/$defs/ContainerDomainDto"
            }
          ]
        },
        "ramMb": {
          "type": "integer",
          "format": "int32"
        },
        "cpu": {
          "type": "number",
          "format": "decimal"
        },
        "diskGb": {
          "type": "integer",
          "format": "int32"
        },
        "environment": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "volumes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "imageDigest": {
          "type": [
            "string",
            "null"
          ]
        },
        "registry": {
          "nullable": true,
          "oneOf": [
            {
              "$ref": "#/$defs/ContainerRegistryDto"
            }
          ]
        },
        "autoUpdate": {
          "type": "boolean"
        },
        "webhookToken": {
          "type": [
            "string",
            "null"
          ]
        },
        "region": {
          "type": "string"
        },
        "backupSchedule": {
          "$ref": "#/$defs/BackupScheduleDto"
        },
        "diskMb": {
          "type": "integer",
          "format": "int32"
        },
        "unsandboxed": {
          "type": "boolean"
        }
      }
    },
    "ContainerRegistryDto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "format": "guid"
        },
        "username": {
          "type": "string"
        }
      }
    },
    "DatabaseDto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "engine": {
          "$ref": "#/$defs/DatabaseEngine"
        },
        "quotaGb": {
          "type": "integer",
          "format": "int32"
        },
        "host": {
          "type": [
            "string",
            "null"
          ]
        },
        "port": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "database": {
          "type": [
            "string",
            "null"
          ]
        },
        "username": {
          "type": [
            "string",
            "null"
          ]
        },
        "logins": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ConnectionLoginDto"
          }
        },
        "backupSchedule": {
          "$ref": "#/$defs/BackupScheduleDto"
        },
        "tlsVerified": {
          "type": "boolean"
        },
        "allowedSources": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "DatabaseEngine": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "Postgres",
        "SqlServer"
      ],
      "enum": [
        "Postgres",
        "SqlServer"
      ]
    },
    "DayOfWeek": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "Sunday",
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday",
        "Saturday"
      ],
      "enum": [
        "Sunday",
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday",
        "Friday",
        "Saturday"
      ]
    },
    "LinkDto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "format": "guid"
        },
        "alias": {
          "type": "string"
        },
        "databaseId": {
          "type": "string",
          "format": "guid"
        },
        "databaseName": {
          "type": "string"
        },
        "databaseStatus": {
          "$ref": "#/$defs/ServiceStatus"
        },
        "engine": {
          "$ref": "#/$defs/DatabaseEngine"
        },
        "host": {
          "type": [
            "string",
            "null"
          ]
        },
        "port": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "user": {
          "type": "string"
        },
        "ready": {
          "type": "boolean"
        },
        "rotating": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "rotatedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "tlsVerified": {
          "type": "boolean"
        }
      }
    },
    "LinkUserDto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "linkId": {
          "type": "string",
          "format": "guid"
        },
        "containerId": {
          "type": "string",
          "format": "guid"
        },
        "containerName": {
          "type": "string"
        },
        "alias": {
          "type": "string"
        }
      }
    },
    "ManagedDto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "description": {
          "type": "string"
        }
      }
    },
    "NodeRefDto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "format": "guid"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "OwnerDto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "format": "guid"
        },
        "name": {
          "type": "string"
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        },
        "staff": {
          "type": "boolean"
        }
      }
    },
    "PlannedChange": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "vcpu": {
          "type": [
            "number",
            "null"
          ],
          "format": "decimal"
        },
        "ramMb": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "diskMb": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "postgresGb": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "sqlServerGb": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        }
      }
    },
    "PoolSizeDto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "cpu": {
          "type": "number",
          "format": "decimal"
        },
        "ramMb": {
          "type": "integer",
          "format": "int32"
        },
        "diskMb": {
          "type": "integer",
          "format": "int32"
        },
        "postgresGb": {
          "type": "integer",
          "format": "int32"
        },
        "sqlServerGb": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "ServiceStatus": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "Pending",
        "Provisioning",
        "Running",
        "Failed",
        "Decommissioning",
        "Decommissioned",
        "Active",
        "AwaitingPayment",
        "Suspended",
        "Stopped"
      ],
      "enum": [
        "Pending",
        "Provisioning",
        "Running",
        "Failed",
        "Decommissioning",
        "Decommissioned",
        "Active",
        "AwaitingPayment",
        "Suspended",
        "Stopped"
      ]
    },
    "ServiceType": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "ContainerHosting",
        "DatabaseStorage",
        "Managed",
        "Pool"
      ],
      "enum": [
        "ContainerHosting",
        "DatabaseStorage",
        "Managed",
        "Pool"
      ]
    },
    "StackRefDto": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "format": "guid"
        },
        "name": {
          "type": "string"
        }
      }
    }
  }
}