{
  "$id": "port_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": "getPorts",
      "enum": [
        "getPorts",
        "createPort",
        "updatePort",
        "deletePort"
      ],
      "external_name": "ph_request_type"
    },
    "id": {
      "type": "integer",
      "description": "the port unique identifier",
      "parse": false,
      "encode": false,
      "encrypt": {
        "type": "AES",
        "key": ""
      },
      "external_name": "id"
    },
    "name": {
      "type": "string",
      "description": "the name of port",
      "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"
    },
    "connectortype": {
      "type": "string",
      "description": "the type of port connection",
      "parse": false,
      "encode": false,
      "encrypt": {
        "type": "AES",
        "key": ""
      },
      "external_name": "connectorType"
    },
    "role": {
      "type": "string",
      "description": "the role for the port",
      "parse": false,
      "encode": false,
      "encrypt": {
        "type": "AES",
        "key": ""
      },
      "external_name": "role"
    },
    "bandwidth": {
      "type": "string",
      "description": "the bandwidth for the port",
      "parse": false,
      "encode": false,
      "encrypt": {
        "type": "AES",
        "key": ""
      },
      "external_name": "bandWidth"
    },
    "status": {
      "type": "string",
      "description": "the status of the port",
      "parse": false,
      "encode": false,
      "encrypt": {
        "type": "AES",
        "key": ""
      },
      "external_name": "status"
    },
    "parentCard": {
      "type": "array",
      "items": {
        "translate": false,
        "type": "object"
      },
      "description": "",
      "parse": false,
      "encode": false,
      "encrypt": {
        "type": "AES",
        "key": ""
      },
      "external_name": "parentCard"
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "ph_request_type": {
            "enum": [
              "createPort"
            ]
          }
        }
      },
      "then": {
        "required": [
          "name",
          "type",
          "connectortype",
          "status",
          "bandwidth",
          "parentCard"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "ph_request_type": {
            "enum": [
              "updatePort"
            ]
          }
        }
      },
      "then": {
        "required": [
          "type"
        ]
      }
    }
  ],
  "definitions": {}
}