{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/monacloud/main/json-schema/monacloud-admin-plan-upsert-request-schema.json",
  "title": "AdminPlanUpsertRequest",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/monacloud-vn-openapi.json#/components/schemas/AdminPlanUpsertRequest",
  "properties": {
    "code": {
      "type": "string",
      "maxLength": 64,
      "minLength": 2,
      "title": "Code"
    },
    "name": {
      "type": "string",
      "maxLength": 120,
      "minLength": 2,
      "title": "Name"
    },
    "cpu": {
      "type": "integer",
      "maximum": 128,
      "minimum": 1,
      "title": "Cpu"
    },
    "ram_gb": {
      "type": "integer",
      "maximum": 1024,
      "minimum": 1,
      "title": "Ram Gb"
    },
    "disk_gb": {
      "type": "integer",
      "maximum": 32768,
      "minimum": 5,
      "title": "Disk Gb"
    },
    "price_month_vnd": {
      "type": "integer",
      "minimum": 0,
      "title": "Price Month Vnd"
    },
    "price_year_vnd": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0
        },
        {
          "type": "null"
        }
      ],
      "title": "Price Year Vnd"
    },
    "included_db": {
      "type": "integer",
      "minimum": -1,
      "title": "Included Db",
      "default": 0
    },
    "backup_policy": {
      "type": "string",
      "maxLength": 120,
      "minLength": 1,
      "title": "Backup Policy",
      "default": "none"
    },
    "active": {
      "type": "boolean",
      "title": "Active",
      "default": true
    },
    "admin_only": {
      "type": "boolean",
      "title": "Admin Only",
      "default": false
    }
  },
  "type": "object",
  "required": [
    "code",
    "name",
    "cpu",
    "ram_gb",
    "disk_gb",
    "price_month_vnd"
  ]
}