{
  "$defs": {
    "HarnessDistributionKind": {
      "enum": [
        "bus_volume",
        "route_spine"
      ],
      "title": "HarnessDistributionKind",
      "type": "string"
    },
    "MassBucketResultV2": {
      "additionalProperties": false,
      "properties": {
        "bucket_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Bucket Id",
          "type": "string"
        },
        "final_mass_kg": {
          "minimum": 0.0,
          "title": "Final Mass Kg",
          "type": "number"
        },
        "margin_added_kg": {
          "title": "Margin Added Kg",
          "type": "number"
        },
        "margin_factor": {
          "minimum": 0.0,
          "title": "Margin Factor",
          "type": "number"
        },
        "policy_owned_mass_kg": {
          "default": 0.0,
          "minimum": 0.0,
          "title": "Policy Owned Mass Kg",
          "type": "number"
        },
        "raw_mass_kg": {
          "minimum": 0.0,
          "title": "Raw Mass Kg",
          "type": "number"
        },
        "source_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Source Id",
          "type": "string"
        }
      },
      "required": [
        "bucket_id",
        "raw_mass_kg",
        "margin_factor",
        "margin_added_kg",
        "final_mass_kg",
        "source_id"
      ],
      "title": "MassBucketResultV2",
      "type": "object"
    },
    "MassCaseResult": {
      "additionalProperties": false,
      "properties": {
        "assumption_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Assumption Ids",
          "type": "array"
        },
        "buckets": {
          "items": {
            "$ref": "#/$defs/MassBucketResultV2"
          },
          "minItems": 1,
          "title": "Buckets",
          "type": "array"
        },
        "case_id": {
          "enum": [
            "low",
            "nominal",
            "high"
          ],
          "title": "Case Id",
          "type": "string"
        },
        "cg_body_m": {
          "maxItems": 3,
          "minItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "title": "Cg Body M",
          "type": "array"
        },
        "dry_mass_kg": {
          "minimum": 0.0,
          "title": "Dry Mass Kg",
          "type": "number"
        },
        "inertia_about_cg_body_kg_m2": {
          "maxItems": 3,
          "minItems": 3,
          "prefixItems": [
            {
              "maxItems": 3,
              "minItems": 3,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            },
            {
              "maxItems": 3,
              "minItems": 3,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            },
            {
              "maxItems": 3,
              "minItems": 3,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            }
          ],
          "title": "Inertia About Cg Body Kg M2",
          "type": "array"
        },
        "limitation_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Limitation Ids",
          "type": "array"
        },
        "owned_contributions": {
          "default": [],
          "items": {
            "$ref": "#/$defs/OwnedMassContribution"
          },
          "title": "Owned Contributions",
          "type": "array"
        },
        "payload_effective_mass_kg": {
          "minimum": 0.0,
          "title": "Payload Effective Mass Kg",
          "type": "number"
        },
        "propellant_mass_kg": {
          "minimum": 0.0,
          "title": "Propellant Mass Kg",
          "type": "number"
        },
        "spatial_contributions": {
          "items": {
            "$ref": "#/$defs/PolicyMassSpatialContribution"
          },
          "minItems": 1,
          "title": "Spatial Contributions",
          "type": "array"
        },
        "wet_mass_kg": {
          "minimum": 0.0,
          "title": "Wet Mass Kg",
          "type": "number"
        }
      },
      "required": [
        "case_id",
        "dry_mass_kg",
        "propellant_mass_kg",
        "wet_mass_kg",
        "payload_effective_mass_kg",
        "buckets",
        "spatial_contributions",
        "cg_body_m",
        "inertia_about_cg_body_kg_m2"
      ],
      "title": "MassCaseResult",
      "type": "object"
    },
    "MassCoverage": {
      "additionalProperties": false,
      "properties": {
        "issues": {
          "default": [],
          "items": {
            "$ref": "#/$defs/MassCoverageIssue"
          },
          "title": "Issues",
          "type": "array"
        },
        "source_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Source Ids",
          "type": "array"
        },
        "status": {
          "default": "unrecorded",
          "enum": [
            "complete",
            "incomplete",
            "unrecorded"
          ],
          "title": "Status",
          "type": "string"
        }
      },
      "title": "MassCoverage",
      "type": "object"
    },
    "MassCoverageIssue": {
      "additionalProperties": false,
      "properties": {
        "bucket_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Bucket Id",
          "type": "string"
        },
        "reason_code": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Reason Code",
          "type": "string"
        },
        "role_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Role Id",
          "type": "string"
        },
        "source_ids": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "minItems": 1,
          "title": "Source Ids",
          "type": "array"
        }
      },
      "required": [
        "bucket_id",
        "role_id",
        "reason_code",
        "source_ids"
      ],
      "title": "MassCoverageIssue",
      "type": "object"
    },
    "ModelApplicabilityAssessment": {
      "additionalProperties": false,
      "properties": {
        "active_limitation_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Active Limitation Ids",
          "type": "array"
        },
        "applicability_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Applicability Id",
          "type": "string"
        },
        "applied_default_policy_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Applied Default Policy Ids",
          "type": "array"
        },
        "authority_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Authority Id",
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/ModelApplicabilityStatus"
        }
      },
      "required": [
        "authority_id",
        "applicability_id",
        "status"
      ],
      "title": "ModelApplicabilityAssessment",
      "type": "object"
    },
    "ModelApplicabilityStatus": {
      "enum": [
        "applicable",
        "degraded",
        "unsupported"
      ],
      "title": "ModelApplicabilityStatus",
      "type": "string"
    },
    "OwnedMassContribution": {
      "additionalProperties": false,
      "properties": {
        "basis_quantity": {
          "anyOf": [
            {
              "minimum": 0.0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Basis Quantity"
        },
        "basis_unit": {
          "anyOf": [
            {
              "enum": [
                "m2",
                "m",
                "count",
                "assembly"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Basis Unit"
        },
        "bucket_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Bucket Id",
          "type": "string"
        },
        "cg_body_m": {
          "anyOf": [
            {
              "maxItems": 3,
              "minItems": 3,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cg Body M"
        },
        "component_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Component Id"
        },
        "dimensions_m": {
          "anyOf": [
            {
              "maxItems": 3,
              "minItems": 3,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Dimensions M"
        },
        "distribution": {
          "default": "unsited",
          "enum": [
            "unsited",
            "point",
            "box",
            "panel",
            "frame"
          ],
          "title": "Distribution",
          "type": "string"
        },
        "inertia_about_cg_body_kg_m2": {
          "anyOf": [
            {
              "maxItems": 3,
              "minItems": 3,
              "prefixItems": [
                {
                  "maxItems": 3,
                  "minItems": 3,
                  "prefixItems": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "number"
                    }
                  ],
                  "type": "array"
                },
                {
                  "maxItems": 3,
                  "minItems": 3,
                  "prefixItems": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "number"
                    }
                  ],
                  "type": "array"
                },
                {
                  "maxItems": 3,
                  "minItems": 3,
                  "prefixItems": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "number"
                    }
                  ],
                  "type": "array"
                }
              ],
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Inertia About Cg Body Kg M2"
        },
        "item_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Item Id",
          "type": "string"
        },
        "mass_kg": {
          "minimum": 0.0,
          "title": "Mass Kg",
          "type": "number"
        },
        "owner_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Owner Id",
          "type": "string"
        },
        "parent_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Parent Id"
        },
        "role_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Role Id",
          "type": "string"
        },
        "source_ids": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "minItems": 1,
          "title": "Source Ids",
          "type": "array"
        },
        "unit_mass_kg": {
          "anyOf": [
            {
              "minimum": 0.0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Unit Mass Kg"
        }
      },
      "required": [
        "item_id",
        "bucket_id",
        "role_id",
        "owner_id",
        "mass_kg",
        "source_ids"
      ],
      "title": "OwnedMassContribution",
      "type": "object"
    },
    "PolicyMassSpatialContribution": {
      "additionalProperties": false,
      "properties": {
        "bucket_id": {
          "enum": [
            "structure",
            "harness_integration"
          ],
          "title": "Bucket Id",
          "type": "string"
        },
        "case_id": {
          "enum": [
            "low",
            "nominal",
            "high"
          ],
          "title": "Case Id",
          "type": "string"
        },
        "cg_body_m": {
          "maxItems": 3,
          "minItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "title": "Cg Body M",
          "type": "array"
        },
        "contribution_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Contribution Id",
          "type": "string"
        },
        "distribution_kind": {
          "anyOf": [
            {
              "$ref": "#/$defs/StructureDistributionKind"
            },
            {
              "$ref": "#/$defs/HarnessDistributionKind"
            }
          ],
          "title": "Distribution Kind"
        },
        "inertia_about_cg_body_kg_m2": {
          "maxItems": 3,
          "minItems": 3,
          "prefixItems": [
            {
              "maxItems": 3,
              "minItems": 3,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            },
            {
              "maxItems": 3,
              "minItems": 3,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            },
            {
              "maxItems": 3,
              "minItems": 3,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            }
          ],
          "title": "Inertia About Cg Body Kg M2",
          "type": "array"
        },
        "mass_kg": {
          "exclusiveMinimum": 0.0,
          "title": "Mass Kg",
          "type": "number"
        },
        "policy_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Policy Id",
          "type": "string"
        },
        "source_ids": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "minItems": 1,
          "title": "Source Ids",
          "type": "array"
        }
      },
      "required": [
        "contribution_id",
        "policy_id",
        "bucket_id",
        "case_id",
        "distribution_kind",
        "mass_kg",
        "cg_body_m",
        "inertia_about_cg_body_kg_m2",
        "source_ids"
      ],
      "title": "PolicyMassSpatialContribution",
      "type": "object"
    },
    "ResolvedMassPolicySelection": {
      "additionalProperties": false,
      "properties": {
        "harness_applicability": {
          "$ref": "#/$defs/ModelApplicabilityAssessment"
        },
        "harness_policy_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Harness Policy Id",
          "type": "string"
        },
        "structure_applicability": {
          "$ref": "#/$defs/ModelApplicabilityAssessment"
        },
        "structure_policy_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Structure Policy Id",
          "type": "string"
        }
      },
      "required": [
        "structure_policy_id",
        "harness_policy_id",
        "structure_applicability",
        "harness_applicability"
      ],
      "title": "ResolvedMassPolicySelection",
      "type": "object"
    },
    "StructureDistributionKind": {
      "enum": [
        "bus_shell",
        "edge_frame",
        "panel_frame"
      ],
      "title": "StructureDistributionKind",
      "type": "string"
    }
  },
  "$id": "urn:sindri:contracts:1.0.0:mass-result-v2",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "cases": {
      "items": {
        "$ref": "#/$defs/MassCaseResult"
      },
      "maxItems": 3,
      "minItems": 3,
      "title": "Cases",
      "type": "array"
    },
    "coverage": {
      "$ref": "#/$defs/MassCoverage"
    },
    "mission_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Mission Id",
      "type": "string"
    },
    "nominal_convergence_dry_mass_kg": {
      "minimum": 0.0,
      "title": "Nominal Convergence Dry Mass Kg",
      "type": "number"
    },
    "payload_kind": {
      "const": "mass",
      "default": "mass",
      "title": "Payload Kind",
      "type": "string"
    },
    "payload_version": {
      "const": "2.0.0",
      "default": "2.0.0",
      "title": "Payload Version",
      "type": "string"
    },
    "policy_resource_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Policy Resource Id",
      "type": "string"
    },
    "projection_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Projection Id",
      "type": "string"
    },
    "result_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Result Id",
      "type": "string"
    },
    "selection": {
      "$ref": "#/$defs/ResolvedMassPolicySelection"
    },
    "spacecraft_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Spacecraft Id",
      "type": "string"
    }
  },
  "required": [
    "result_id",
    "projection_id",
    "mission_id",
    "spacecraft_id",
    "policy_resource_id",
    "selection",
    "cases",
    "nominal_convergence_dry_mass_kg"
  ],
  "title": "MassResultPayloadV2",
  "type": "object",
  "x-sindri-contract-suite": "sindri.contracts",
  "x-sindri-contract-version": "1.0.0"
}
