{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/adobe/json-schema/adobe-calculated-metrics-save-request-data-schema.json",
  "title": "calculatedMetricsSaveRequestData",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/adobe-analytics-1-4-openapi.yml#/components/schemas/calculatedMetricsSaveRequestData",
  "type": "object",
  "properties": {
    "definition": {
      "$ref": "#/$defs/calc_metric_definition"
    },
    "description": {
      "type": "string"
    },
    "favorite": {
      "type": "boolean"
    },
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "owner": {
      "type": "string"
    },
    "polarity": {
      "type": "string"
    },
    "precision": {
      "type": "integer",
      "format": "int32"
    },
    "reportSuiteID": {
      "type": "string"
    },
    "shares": {
      "$ref": "#/$defs/calc_metric_share_array"
    },
    "tags": {
      "$ref": "#/$defs/string_array"
    },
    "type": {
      "type": "string"
    }
  },
  "$defs": {
    "calc_metric_definition": {
      "type": "object",
      "properties": {
        "calculatedMetric": {
          "$ref": "#/$defs/calc_metric_definition"
        },
        "metric": {
          "type": "string"
        },
        "segments": {
          "$ref": "#/$defs/string_array"
        },
        "allocation": {
          "type": "string"
        },
        "function": {
          "type": "string"
        },
        "parameters": {
          "$ref": "#/$defs/calc_metric_definition_array"
        },
        "columns": {
          "$ref": "#/$defs/calc_metric_definition_array"
        },
        "number": {
          "type": "number",
          "format": "double"
        },
        "boolean": {
          "type": "boolean"
        }
      }
    },
    "calc_metric_definition_array": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/calc_metric_definition"
      }
    },
    "calc_metric_share": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "calc_metric_share_array": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/calc_metric_share"
      }
    },
    "string_array": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}