{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Service",
  "description": "A service object defining a protocol and port combination for use in security policy rules.",
  "$id": "https://raw.githubusercontent.com/api-evangelist/palo-alto-networks/refs/heads/main/json-schema/strata-cloud-manager-api-service-schema.json",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "name": {
      "type": "string"
    },
    "folder": {
      "type": "string",
      "readOnly": true
    },
    "protocol": {
      "type": "object",
      "properties": {
        "tcp": {
          "type": "object",
          "properties": {
            "port": {
              "type": "string",
              "description": "TCP destination port or range (e.g., 80, 8080-8090)."
            },
            "source_port": {
              "type": "string"
            }
          }
        },
        "udp": {
          "type": "object",
          "properties": {
            "port": {
              "type": "string",
              "description": "UDP destination port or range (e.g., 53)."
            },
            "source_port": {
              "type": "string"
            }
          }
        }
      }
    },
    "description": {
      "type": "string"
    },
    "tag": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
