{
  "$defs": {
    "CostComponentProjectionV2": {
      "additionalProperties": false,
      "properties": {
        "catalog_component_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Catalog Component Id"
        },
        "class_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Class Id",
          "type": "string"
        },
        "component_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Component Id",
          "type": "string"
        },
        "direct_cost": {
          "anyOf": [
            {
              "$ref": "#/$defs/CostMoneyRange"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "mass_kg": {
          "minimum": 0.0,
          "title": "Mass Kg",
          "type": "number"
        },
        "subsystem_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Subsystem Id",
          "type": "string"
        }
      },
      "required": [
        "component_id",
        "class_id",
        "subsystem_id",
        "mass_kg"
      ],
      "title": "CostComponentProjectionV2",
      "type": "object"
    },
    "CostMonetaryBasis": {
      "additionalProperties": false,
      "properties": {
        "currency": {
          "pattern": "^[A-Z]{3}$",
          "title": "Currency",
          "type": "string"
        },
        "price_year": {
          "maximum": 2100,
          "minimum": 1950,
          "title": "Price Year",
          "type": "integer"
        }
      },
      "required": [
        "currency",
        "price_year"
      ],
      "title": "CostMonetaryBasis",
      "type": "object"
    },
    "CostMoneyRange": {
      "additionalProperties": false,
      "properties": {
        "base": {
          "minimum": 0.0,
          "title": "Base",
          "type": "number"
        },
        "currency": {
          "pattern": "^[A-Z]{3}$",
          "title": "Currency",
          "type": "string"
        },
        "high": {
          "minimum": 0.0,
          "title": "High",
          "type": "number"
        },
        "low": {
          "minimum": 0.0,
          "title": "Low",
          "type": "number"
        },
        "price_year": {
          "maximum": 2100,
          "minimum": 1950,
          "title": "Price Year",
          "type": "integer"
        }
      },
      "required": [
        "low",
        "base",
        "high",
        "currency",
        "price_year"
      ],
      "title": "CostMoneyRange",
      "type": "object"
    },
    "CostNreInput": {
      "additionalProperties": false,
      "properties": {
        "amount": {
          "$ref": "#/$defs/CostMoneyRange"
        },
        "basis_kind": {
          "enum": [
            "user_supplied",
            "supplier_based",
            "calibrated_estimate"
          ],
          "title": "Basis Kind",
          "type": "string"
        },
        "bucket_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Bucket Id",
          "type": "string"
        },
        "description": {
          "maxLength": 300,
          "minLength": 1,
          "title": "Description",
          "type": "string"
        },
        "evidence_tier": {
          "$ref": "#/$defs/EvidenceTier"
        },
        "line_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Line Id",
          "type": "string"
        },
        "source_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Source Ids",
          "type": "array"
        }
      },
      "required": [
        "line_id",
        "bucket_id",
        "description",
        "amount",
        "basis_kind",
        "evidence_tier"
      ],
      "title": "CostNreInput",
      "type": "object"
    },
    "CostQuantityPlan": {
      "additionalProperties": false,
      "properties": {
        "flight_units": {
          "default": 1,
          "maximum": 1000,
          "minimum": 1,
          "title": "Flight Units",
          "type": "integer"
        },
        "qualification_units": {
          "default": 0,
          "maximum": 1000,
          "minimum": 0,
          "title": "Qualification Units",
          "type": "integer"
        },
        "spare_units": {
          "default": 0,
          "maximum": 1000,
          "minimum": 0,
          "title": "Spare Units",
          "type": "integer"
        }
      },
      "title": "CostQuantityPlan",
      "type": "object"
    },
    "EvidenceTier": {
      "enum": [
        "verified",
        "credible",
        "engineering_estimate",
        "policy_default",
        "unknown"
      ],
      "title": "EvidenceTier",
      "type": "string"
    },
    "SpacecraftClass": {
      "enum": [
        "nanosat",
        "microsat",
        "kw_class"
      ],
      "title": "SpacecraftClass",
      "type": "string"
    }
  },
  "$id": "urn:sindri:contracts:1.0.0:cost-projection-v2",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "components": {
      "items": {
        "$ref": "#/$defs/CostComponentProjectionV2"
      },
      "minItems": 1,
      "title": "Components",
      "type": "array"
    },
    "end_of_life_power_w": {
      "anyOf": [
        {
          "minimum": 0.0,
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "End Of Life Power W"
    },
    "explicit_nre_lines": {
      "default": [],
      "items": {
        "$ref": "#/$defs/CostNreInput"
      },
      "title": "Explicit Nre Lines",
      "type": "array"
    },
    "include_program_integration": {
      "title": "Include Program Integration",
      "type": "boolean"
    },
    "launch_interface_component_id": {
      "anyOf": [
        {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Launch Interface Component Id"
    },
    "launch_interface_cost": {
      "anyOf": [
        {
          "$ref": "#/$defs/CostMoneyRange"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "launch_interface_mass_kg": {
      "default": 0.0,
      "minimum": 0.0,
      "title": "Launch Interface Mass Kg",
      "type": "number"
    },
    "mission_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Mission Id",
      "type": "string"
    },
    "mode": {
      "enum": [
        "parametric",
        "catalog",
        "hybrid"
      ],
      "title": "Mode",
      "type": "string"
    },
    "nre_mode": {
      "default": "aggregate",
      "enum": [
        "aggregate",
        "explicit"
      ],
      "title": "Nre Mode",
      "type": "string"
    },
    "quantity_plan": {
      "$ref": "#/$defs/CostQuantityPlan"
    },
    "reporting_basis": {
      "$ref": "#/$defs/CostMonetaryBasis"
    },
    "reporting_fx_mode": {
      "default": "offline_profile",
      "enum": [
        "offline_profile",
        "snapshot"
      ],
      "title": "Reporting Fx Mode",
      "type": "string"
    },
    "spacecraft_class": {
      "$ref": "#/$defs/SpacecraftClass"
    },
    "spacecraft_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Spacecraft Id",
      "type": "string"
    },
    "strict_catalog": {
      "title": "Strict Catalog",
      "type": "boolean"
    },
    "strict_evidence": {
      "title": "Strict Evidence",
      "type": "boolean"
    }
  },
  "required": [
    "mission_id",
    "spacecraft_id",
    "spacecraft_class",
    "mode",
    "strict_catalog",
    "strict_evidence",
    "include_program_integration",
    "reporting_basis",
    "components"
  ],
  "title": "CostProjectionV2",
  "type": "object",
  "x-sindri-contract-suite": "sindri.contracts",
  "x-sindri-contract-version": "1.0.0"
}
