{
  "$ref": "#/definitions/ppx_Message",
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "definitions": {
    "ppx_Bernoulli": {
      "additionalProperties": false,
      "properties": {
        "probs": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    },
    "ppx_Beta": {
      "additionalProperties": false,
      "properties": {
        "concentration0": {
          "$ref": "#/definitions/ppx_Tensor"
        },
        "concentration1": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    },
    "ppx_Binomial": {
      "additionalProperties": false,
      "properties": {
        "probs": {
          "$ref": "#/definitions/ppx_Tensor"
        },
        "total_count": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    },
    "ppx_Categorical": {
      "additionalProperties": false,
      "properties": {
        "probs": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    },
    "ppx_Distribution": {
      "enum": [
        "NONE",
        "Normal",
        "Uniform",
        "Categorical",
        "Poisson",
        "Bernoulli",
        "Beta",
        "Exponential",
        "Gamma",
        "LogNormal",
        "Binomial",
        "Weibull"
      ],
      "type": "string"
    },
    "ppx_Exponential": {
      "additionalProperties": false,
      "properties": {
        "rate": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    },
    "ppx_Gamma": {
      "additionalProperties": false,
      "properties": {
        "concentration": {
          "$ref": "#/definitions/ppx_Tensor"
        },
        "rate": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    },
    "ppx_Handshake": {
      "additionalProperties": false,
      "properties": {
        "system_name": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "ppx_HandshakeResult": {
      "additionalProperties": false,
      "properties": {
        "model_name": {
          "type": "string"
        },
        "system_name": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "ppx_LogNormal": {
      "additionalProperties": false,
      "properties": {
        "loc": {
          "$ref": "#/definitions/ppx_Tensor"
        },
        "scale": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    },
    "ppx_Message": {
      "additionalProperties": false,
      "properties": {
        "body": {
          "anyOf": [
            {
              "$ref": "#/definitions/ppx_Handshake"
            },
            {
              "$ref": "#/definitions/ppx_HandshakeResult"
            },
            {
              "$ref": "#/definitions/ppx_Run"
            },
            {
              "$ref": "#/definitions/ppx_RunResult"
            },
            {
              "$ref": "#/definitions/ppx_Sample"
            },
            {
              "$ref": "#/definitions/ppx_SampleResult"
            },
            {
              "$ref": "#/definitions/ppx_Observe"
            },
            {
              "$ref": "#/definitions/ppx_ObserveResult"
            },
            {
              "$ref": "#/definitions/ppx_Tag"
            },
            {
              "$ref": "#/definitions/ppx_TagResult"
            },
            {
              "$ref": "#/definitions/ppx_Reset"
            }
          ]
        },
        "body_type": {
          "$ref": "#/definitions/ppx_MessageBody"
        }
      },
      "type": "object"
    },
    "ppx_MessageBody": {
      "enum": [
        "NONE",
        "Handshake",
        "HandshakeResult",
        "Run",
        "RunResult",
        "Sample",
        "SampleResult",
        "Observe",
        "ObserveResult",
        "Tag",
        "TagResult",
        "Reset"
      ],
      "type": "string"
    },
    "ppx_Normal": {
      "additionalProperties": false,
      "properties": {
        "mean": {
          "$ref": "#/definitions/ppx_Tensor"
        },
        "stddev": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    },
    "ppx_Observe": {
      "additionalProperties": false,
      "properties": {
        "address": {
          "type": "string"
        },
        "distribution": {
          "anyOf": [
            {
              "$ref": "#/definitions/ppx_Normal"
            },
            {
              "$ref": "#/definitions/ppx_Uniform"
            },
            {
              "$ref": "#/definitions/ppx_Categorical"
            },
            {
              "$ref": "#/definitions/ppx_Poisson"
            },
            {
              "$ref": "#/definitions/ppx_Bernoulli"
            },
            {
              "$ref": "#/definitions/ppx_Beta"
            },
            {
              "$ref": "#/definitions/ppx_Exponential"
            },
            {
              "$ref": "#/definitions/ppx_Gamma"
            },
            {
              "$ref": "#/definitions/ppx_LogNormal"
            },
            {
              "$ref": "#/definitions/ppx_Binomial"
            },
            {
              "$ref": "#/definitions/ppx_Weibull"
            }
          ]
        },
        "distribution_type": {
          "$ref": "#/definitions/ppx_Distribution"
        },
        "name": {
          "type": "string"
        },
        "value": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    },
    "ppx_ObserveResult": {
      "additionalProperties": false,
      "properties": {},
      "type": "object"
    },
    "ppx_Poisson": {
      "additionalProperties": false,
      "properties": {
        "rate": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    },
    "ppx_Reset": {
      "additionalProperties": false,
      "properties": {},
      "type": "object"
    },
    "ppx_Run": {
      "additionalProperties": false,
      "properties": {},
      "type": "object"
    },
    "ppx_RunResult": {
      "additionalProperties": false,
      "properties": {
        "result": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    },
    "ppx_Sample": {
      "additionalProperties": false,
      "properties": {
        "address": {
          "type": "string"
        },
        "control": {
          "type": "boolean"
        },
        "distribution": {
          "anyOf": [
            {
              "$ref": "#/definitions/ppx_Normal"
            },
            {
              "$ref": "#/definitions/ppx_Uniform"
            },
            {
              "$ref": "#/definitions/ppx_Categorical"
            },
            {
              "$ref": "#/definitions/ppx_Poisson"
            },
            {
              "$ref": "#/definitions/ppx_Bernoulli"
            },
            {
              "$ref": "#/definitions/ppx_Beta"
            },
            {
              "$ref": "#/definitions/ppx_Exponential"
            },
            {
              "$ref": "#/definitions/ppx_Gamma"
            },
            {
              "$ref": "#/definitions/ppx_LogNormal"
            },
            {
              "$ref": "#/definitions/ppx_Binomial"
            },
            {
              "$ref": "#/definitions/ppx_Weibull"
            }
          ]
        },
        "distribution_type": {
          "$ref": "#/definitions/ppx_Distribution"
        },
        "name": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "ppx_SampleResult": {
      "additionalProperties": false,
      "properties": {
        "result": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    },
    "ppx_Tag": {
      "additionalProperties": false,
      "properties": {
        "address": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "value": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    },
    "ppx_TagResult": {
      "additionalProperties": false,
      "properties": {},
      "type": "object"
    },
    "ppx_Tensor": {
      "additionalProperties": false,
      "properties": {
        "data": {
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        "shape": {
          "items": {
            "maximum": 2147483647,
            "minimum": -2147483648,
            "type": "integer"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "ppx_Uniform": {
      "additionalProperties": false,
      "properties": {
        "high": {
          "$ref": "#/definitions/ppx_Tensor"
        },
        "low": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    },
    "ppx_Weibull": {
      "additionalProperties": false,
      "properties": {
        "concentration": {
          "$ref": "#/definitions/ppx_Tensor"
        },
        "scale": {
          "$ref": "#/definitions/ppx_Tensor"
        }
      },
      "type": "object"
    }
  }
}