{
  "$id": "trail_template_schema.json",
  "type": "object",
  "schema": "http://json-schema.org/draft-07/schema#",
  "translate": true,
  "dynamicfields": true,
  "properties": {
    "ph_request_type": {
      "type": "string",
      "description": "type of request (internal to adapter)",
      "default": "getTrailTemplates",
      "enum": [
        "getTrailTemplates",
        "createTrailTemplate",
        "updateTrailTemplate",
        "deleteTrailTemplate"
      ],
      "external_name": "ph_request_type"
    },
    "id": {
      "type": "integer",
      "description": "The unique id for the trail",
      "parse": false,
      "encode": false,
      "encrypt": {
        "type": "AES",
        "key": ""
      },
      "external_name": "id"
    },
    "name": {
      "type": "string",
      "description": "the name of trail",
      "parse": false,
      "encode": false,
      "encrypt": {
        "type": "AES",
        "key": ""
      },
      "external_name": "name"
    },
    "type": {
      "type": "string",
      "description": "the entity",
      "parse": false,
      "encode": false,
      "encrypt": {
        "type": "AES",
        "key": ""
      },
      "external_name": "type"
    },
    "trailTemplateType": {
      "type": "string",
      "description": "the entity",
      "parse": false,
      "encode": false,
      "encrypt": {
        "type": "AES",
        "key": ""
      },
      "external_name": "_type"
    },
    "bandwidth": {
      "type": "string",
      "description": "The bandwidth for the trail",
      "parse": false,
      "encode": false,
      "encrypt": {
        "type": "AES",
        "key": ""
      },
      "external_name": "bandWidth"
    },
    "assignmentType": {
      "type": "string",
      "description": "The assignment type for the trail",
      "parse": false,
      "encode": false,
      "encrypt": {
        "type": "AES",
        "key": ""
      },
      "external_name": "assignmentType"
    },
    "protectionType": {
      "type": "string",
      "description": "The protection type for the trail",
      "parse": false,
      "encode": false,
      "encrypt": {
        "type": "AES",
        "key": ""
      },
      "external_name": "protectionType"
    },
    "status": {
      "type": "string",
      "description": "the status of the trail",
      "parse": false,
      "encode": false,
      "encrypt": {
        "type": "AES",
        "key": ""
      },
      "external_name": "status"
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "ph_request_type": {
            "enum": [
              "createTrailTemplate"
            ]
          }
        }
      },
      "then": {
        "required": [
          "name",
          "type",
          "trailTemplateType",
          "status",
          "bandwidth",
          "assignmentType",
          "protectionType"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "ph_request_type": {
            "enum": [
              "updateTrailTemplate"
            ]
          }
        }
      },
      "then": {
        "required": [
          "type"
        ]
      }
    }
  ],
  "definitions": {}
}