{
  "$defs": {
    "DirectionalSource": {
      "additionalProperties": false,
      "properties": {
        "body_frame": {
          "const": "spacecraft_body",
          "default": "spacecraft_body",
          "title": "Body Frame",
          "type": "string"
        },
        "body_from_source": {
          "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": "Body From Source",
          "type": "array"
        },
        "method": {
          "$ref": "#/$defs/DirectionalSourceMethod"
        },
        "method_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Method Id",
          "type": "string"
        },
        "sign_convention": {
          "const": "spacecraft_toward_source",
          "default": "spacecraft_toward_source",
          "title": "Sign Convention",
          "type": "string"
        },
        "source_frame": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Source Frame",
          "type": "string"
        },
        "source_kind": {
          "$ref": "#/$defs/DirectionalSourceKind"
        },
        "temporal_factor_paths": {
          "default": [],
          "items": {
            "type": "string"
          },
          "title": "Temporal Factor Paths",
          "type": "array"
        },
        "vector_body": {
          "maxItems": 3,
          "minItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "title": "Vector Body",
          "type": "array"
        }
      },
      "required": [
        "source_kind",
        "vector_body",
        "source_frame",
        "body_from_source",
        "method",
        "method_id"
      ],
      "title": "DirectionalSource",
      "type": "object"
    },
    "DirectionalSourceKind": {
      "enum": [
        "sun",
        "earth",
        "ram"
      ],
      "title": "DirectionalSourceKind",
      "type": "string"
    },
    "DirectionalSourceMethod": {
      "enum": [
        "analytic",
        "authored",
        "bounded",
        "external"
      ],
      "title": "DirectionalSourceMethod",
      "type": "string"
    },
    "ExternalSurfacePatch": {
      "additionalProperties": false,
      "properties": {
        "approximation_codes": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Approximation Codes",
          "type": "array"
        },
        "category": {
          "$ref": "#/$defs/SurfaceCategory"
        },
        "centroid_body_m": {
          "maxItems": 3,
          "minItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "title": "Centroid Body M",
          "type": "array"
        },
        "fidelity": {
          "$ref": "#/$defs/GeometryFidelity"
        },
        "geometry_source_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Geometry Source Id",
          "type": "string"
        },
        "gross_area_m2": {
          "exclusiveMinimum": 0.0,
          "title": "Gross Area M2",
          "type": "number"
        },
        "method_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Method Id",
          "type": "string"
        },
        "outward_normal_body": {
          "maxItems": 3,
          "minItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "title": "Outward Normal Body",
          "type": "array"
        },
        "owner_component_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Owner Component Id",
          "type": "string"
        },
        "roles": {
          "items": {
            "$ref": "#/$defs/SurfaceFunctionalRole"
          },
          "minItems": 1,
          "title": "Roles",
          "type": "array"
        },
        "sidedness": {
          "$ref": "#/$defs/SurfaceSidedness",
          "default": "one_sided"
        },
        "state_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "State Id",
          "type": "string"
        },
        "surface_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Surface Id",
          "type": "string"
        },
        "vertices_body_m": {
          "items": {
            "maxItems": 3,
            "minItems": 3,
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ],
            "type": "array"
          },
          "maxItems": 16,
          "minItems": 3,
          "title": "Vertices Body M",
          "type": "array"
        }
      },
      "required": [
        "surface_id",
        "owner_component_id",
        "geometry_source_id",
        "state_id",
        "category",
        "vertices_body_m",
        "outward_normal_body",
        "gross_area_m2",
        "centroid_body_m",
        "roles",
        "fidelity",
        "method_id"
      ],
      "title": "ExternalSurfacePatch",
      "type": "object"
    },
    "GeometryFidelity": {
      "enum": [
        "state_resolved",
        "authoritative_primitive",
        "equivalent_area",
        "analytic_bus"
      ],
      "title": "GeometryFidelity",
      "type": "string"
    },
    "GeometryLoadingProjection": {
      "additionalProperties": false,
      "properties": {
        "applicability": {
          "$ref": "#/$defs/ModelApplicabilityAssessment"
        },
        "cache_reused": {
          "default": false,
          "title": "Cache Reused",
          "type": "boolean"
        },
        "input_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Input Sha256",
          "type": "string"
        },
        "method_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Method Id",
          "type": "string"
        },
        "projection_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Projection Id",
          "type": "string"
        },
        "scenario_bindings": {
          "items": {
            "$ref": "#/$defs/LoadingScenarioBinding"
          },
          "maxItems": 32,
          "minItems": 1,
          "title": "Scenario Bindings",
          "type": "array"
        },
        "source_aggregates": {
          "items": {
            "$ref": "#/$defs/SourceExposureAggregate"
          },
          "title": "Source Aggregates",
          "type": "array"
        },
        "states": {
          "items": {
            "$ref": "#/$defs/GeometryLoadingState"
          },
          "maxItems": 32,
          "minItems": 1,
          "title": "States",
          "type": "array"
        },
        "surface_exposures": {
          "items": {
            "$ref": "#/$defs/SurfaceExposureResult"
          },
          "title": "Surface Exposures",
          "type": "array"
        }
      },
      "required": [
        "projection_id",
        "method_id",
        "input_sha256",
        "states",
        "scenario_bindings",
        "surface_exposures",
        "source_aggregates",
        "applicability"
      ],
      "title": "GeometryLoadingProjection",
      "type": "object"
    },
    "GeometryLoadingState": {
      "additionalProperties": false,
      "properties": {
        "approximation_codes": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Approximation Codes",
          "type": "array"
        },
        "cg_body_m": {
          "maxItems": 3,
          "minItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "title": "Cg Body M",
          "type": "array"
        },
        "geometry_method_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Geometry Method Id",
          "type": "string"
        },
        "patches": {
          "items": {
            "$ref": "#/$defs/ExternalSurfacePatch"
          },
          "maxItems": 128,
          "minItems": 1,
          "title": "Patches",
          "type": "array"
        },
        "state_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "State Id",
          "type": "string"
        },
        "state_label": {
          "maxLength": 64,
          "minLength": 1,
          "title": "State Label",
          "type": "string"
        }
      },
      "required": [
        "state_id",
        "state_label",
        "cg_body_m",
        "geometry_method_id",
        "patches"
      ],
      "title": "GeometryLoadingState",
      "type": "object"
    },
    "LoadingScenarioBinding": {
      "additionalProperties": false,
      "properties": {
        "environment_case_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Environment Case Id",
          "type": "string"
        },
        "geometry_state_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Geometry State Id",
          "type": "string"
        },
        "mode_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Mode Id",
          "type": "string"
        },
        "required": {
          "default": true,
          "title": "Required",
          "type": "boolean"
        },
        "scenario_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Scenario Id",
          "type": "string"
        },
        "sources": {
          "items": {
            "$ref": "#/$defs/DirectionalSource"
          },
          "maxItems": 3,
          "minItems": 1,
          "title": "Sources",
          "type": "array"
        }
      },
      "required": [
        "scenario_id",
        "mode_id",
        "geometry_state_id",
        "environment_case_id",
        "sources"
      ],
      "title": "LoadingScenarioBinding",
      "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"
    },
    "SourceExposureAggregate": {
      "additionalProperties": false,
      "properties": {
        "application_point_body_m": {
          "anyOf": [
            {
              "maxItems": 3,
              "minItems": 3,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Application Point Body M"
        },
        "contributing_surface_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Contributing Surface Ids",
          "type": "array"
        },
        "geometry_state_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Geometry State Id",
          "type": "string"
        },
        "lever_arm_body_m": {
          "anyOf": [
            {
              "maxItems": 3,
              "minItems": 3,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Lever Arm Body M"
        },
        "role": {
          "anyOf": [
            {
              "$ref": "#/$defs/SurfaceFunctionalRole"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "scenario_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Scenario Id",
          "type": "string"
        },
        "source_kind": {
          "$ref": "#/$defs/DirectionalSourceKind"
        },
        "unoccluded_projected_area_m2": {
          "minimum": 0.0,
          "title": "Unoccluded Projected Area M2",
          "type": "number"
        }
      },
      "required": [
        "scenario_id",
        "geometry_state_id",
        "source_kind",
        "unoccluded_projected_area_m2"
      ],
      "title": "SourceExposureAggregate",
      "type": "object"
    },
    "SurfaceCategory": {
      "enum": [
        "bus_face",
        "fixed_external",
        "deployable_leaf",
        "equivalent_area"
      ],
      "title": "SurfaceCategory",
      "type": "string"
    },
    "SurfaceExposureResult": {
      "additionalProperties": false,
      "properties": {
        "approximation_codes": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Approximation Codes",
          "type": "array"
        },
        "category": {
          "$ref": "#/$defs/SurfaceCategory"
        },
        "centroid_body_m": {
          "maxItems": 3,
          "minItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "title": "Centroid Body M",
          "type": "array"
        },
        "cosine": {
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Cosine",
          "type": "number"
        },
        "facing_projected_area_m2": {
          "minimum": 0.0,
          "title": "Facing Projected Area M2",
          "type": "number"
        },
        "fidelity": {
          "$ref": "#/$defs/GeometryFidelity"
        },
        "geometry_state_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Geometry State Id",
          "type": "string"
        },
        "gross_area_m2": {
          "exclusiveMinimum": 0.0,
          "title": "Gross Area M2",
          "type": "number"
        },
        "occluded_projected_area_m2": {
          "minimum": 0.0,
          "title": "Occluded Projected Area M2",
          "type": "number"
        },
        "outward_normal_body": {
          "maxItems": 3,
          "minItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "title": "Outward Normal Body",
          "type": "array"
        },
        "owner_component_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Owner Component Id",
          "type": "string"
        },
        "roles": {
          "items": {
            "$ref": "#/$defs/SurfaceFunctionalRole"
          },
          "minItems": 1,
          "title": "Roles",
          "type": "array"
        },
        "scenario_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Scenario Id",
          "type": "string"
        },
        "source_kind": {
          "$ref": "#/$defs/DirectionalSourceKind"
        },
        "surface_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Surface Id",
          "type": "string"
        },
        "unoccluded_centroid_body_m": {
          "anyOf": [
            {
              "maxItems": 3,
              "minItems": 3,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ],
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Unoccluded Centroid Body M"
        },
        "unoccluded_projected_area_m2": {
          "minimum": 0.0,
          "title": "Unoccluded Projected Area M2",
          "type": "number"
        }
      },
      "required": [
        "scenario_id",
        "geometry_state_id",
        "source_kind",
        "surface_id",
        "owner_component_id",
        "category",
        "roles",
        "gross_area_m2",
        "cosine",
        "facing_projected_area_m2",
        "occluded_projected_area_m2",
        "unoccluded_projected_area_m2",
        "centroid_body_m",
        "outward_normal_body",
        "fidelity"
      ],
      "title": "SurfaceExposureResult",
      "type": "object"
    },
    "SurfaceFunctionalRole": {
      "enum": [
        "solar_generation",
        "thermal_absorption",
        "thermal_rejection",
        "aerodynamic_exposure",
        "solar_pressure_exposure"
      ],
      "title": "SurfaceFunctionalRole",
      "type": "string"
    },
    "SurfaceSidedness": {
      "enum": [
        "one_sided",
        "two_sided"
      ],
      "title": "SurfaceSidedness",
      "type": "string"
    }
  },
  "$id": "urn:sindri:contracts:1.0.0:geometry-environment-loading-result",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "mission_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Mission Id",
      "type": "string"
    },
    "payload_kind": {
      "const": "geometry_environment_loading",
      "default": "geometry_environment_loading",
      "title": "Payload Kind",
      "type": "string"
    },
    "payload_version": {
      "const": "1.0.0",
      "default": "1.0.0",
      "title": "Payload Version",
      "type": "string"
    },
    "projection": {
      "$ref": "#/$defs/GeometryLoadingProjection"
    },
    "spacecraft_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Spacecraft Id",
      "type": "string"
    }
  },
  "required": [
    "mission_id",
    "spacecraft_id",
    "projection"
  ],
  "title": "GeometryEnvironmentLoadingResultPayload",
  "type": "object",
  "x-sindri-contract-suite": "sindri.contracts",
  "x-sindri-contract-version": "1.0.0"
}
