{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cisco-crosswork/json-schema/cisco-crosswork-operations-cisco-crosswork-optimization-engine-sr-policy-operations-sr-policy-create-post-input-schema.json",
  "title": "operations_cisco-crosswork-optimization-engine-sr-policy-operations_sr-policy-create-post-input",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cisco-crosswork-operations-api-openapi.yml#/components/schemas/operations_cisco-crosswork-optimization-engine-sr-policy-operations_sr-policy-create-post-input",
  "type": "object",
  "properties": {
    "input": {
      "type": "object",
      "properties": {
        "sr-policies": {
          "type": "array",
          "description": "(list)",
          "items": {
            "type": "object",
            "properties": {
              "head-end": {
                "description": "The IP address of the SR policy source (leaf)",
                "type": "string",
                "format": "union"
              },
              "end-point": {
                "description": "The IP address of the SR policy destination (leaf)",
                "type": "string",
                "format": "union"
              },
              "color": {
                "description": "The color for the SR policy (leaf)",
                "type": "integer",
                "format": "uint32"
              },
              "path-name": {
                "description": "The path name of the SR policy (leaf)",
                "type": "string",
                "format": "string"
              },
              "description": {
                "description": "The description of the SR policy (leaf)",
                "type": "string",
                "format": "string"
              },
              "binding-sid": {
                "description": "The binding SID for the SR policy (leaf)",
                "type": "integer",
                "format": "uint32"
              },
              "profile-id": {
                "description": "The profile ID for the SR policy (leaf)",
                "type": "integer",
                "format": "uint32"
              },
              "sr-policy-path": {
                "description": "(non-presence)",
                "type": "object",
                "oneOf": [
                  {
                    "$ref": "#/$defs/operations_cisco-crosswork-optimization-engine-sr-policy-operations_sr-policy-path_explicit"
                  },
                  {
                    "$ref": "#/$defs/operations_cisco-crosswork-optimization-engine-sr-policy-operations_sr-policy-path_dynamic"
                  },
                  {
                    "$ref": "#/$defs/operations_cisco-crosswork-optimization-engine-sr-policy-operations_sr-policy-path_bwod"
                  }
                ]
              }
            }
          }
        }
      }
    }
  },
  "$defs": {
    "operations_cisco-crosswork-optimization-engine-sr-policy-operations_sr-policy-path_bwod": {
      "description": "Parameters specific to a BWOD SR policy path",
      "type": "object",
      "properties": {
        "bandwidth": {
          "description": "The desired bandwidth for the SR policy (leaf)",
          "type": "number",
          "format": "double"
        },
        "bw-path-optimization-objective": {
          "description": "The objective to minimize, igp-metric, te-metric or delay (leaf)",
          "type": "string",
          "format": "enumeration",
          "default": "igp-metric",
          "enum": [
            "igp-metric",
            "te-metric",
            "delay",
            "hop-count"
          ]
        }
      }
    },
    "operations_cisco-crosswork-optimization-engine-sr-policy-operations_sr-policy-path_dynamic": {
      "description": "Parameters specific to a Dynamic SR policy path",
      "type": "object",
      "properties": {
        "affinities": {
          "description": "(non-presence)",
          "type": "object",
          "properties": {
            "include-any": {
              "description": "include-any affinity bits combined into an unsigned integer (leaf)",
              "type": "integer",
              "format": "uint32"
            },
            "include-all": {
              "description": "include-any affinity bits combined into an unsigned integer (leaf)",
              "type": "integer",
              "format": "uint32"
            },
            "exclude-any": {
              "description": "include-any affinity bits combined into an unsigned integer (leaf)",
              "type": "integer",
              "format": "uint32"
            }
          }
        },
        "disjointness": {
          "description": "(non-presence)",
          "type": "object",
          "properties": {
            "disjointness-type": {
              "description": "(leaf)",
              "type": "string",
              "format": "enumeration",
              "default": "node",
              "enum": [
                "node",
                "circuit",
                "srlg",
                "srlg-node"
              ]
            },
            "association-group": {
              "description": "Association group (leaf)",
              "type": "integer",
              "format": "uint32"
            },
            "association-sub-group": {
              "description": "Association sub-group (leaf)",
              "type": "integer",
              "format": "uint32"
            }
          }
        },
        "path-optimization-objective": {
          "description": "The objective to minimize, igp-metric, te-metric or delay (leaf)",
          "type": "string",
          "format": "enumeration",
          "default": "igp-metric",
          "enum": [
            "igp-metric",
            "te-metric",
            "delay",
            "hop-count"
          ]
        },
        "protected": {
          "description": "Use protected adjacency SIDs in path computation, defaults to true (leaf)",
          "type": "string",
          "format": "boolean"
        }
      }
    },
    "operations_cisco-crosswork-optimization-engine-sr-policy-operations_sr-policy-path_explicit": {
      "description": "Parameters specific to an Explicit SR policy path",
      "type": "object",
      "properties": {
        "hops": {
          "type": "array",
          "description": "(list)",
          "items": {
            "type": "object",
            "properties": {
              "step": {
                "description": "The representation of the hop order in the path (leaf)",
                "type": "integer",
                "format": "uint32"
              },
              "hop": {
                "description": "(non-presence)",
                "type": "object",
                "properties": {
                  "node-ipv4-sid": {
                    "description": "The IPv4 node segment identifier (leaf)",
                    "type": "integer",
                    "format": "uint32"
                  },
                  "node-ipv4-address": {
                    "description": "The IPv4 node address (leaf)",
                    "type": "string",
                    "format": "union"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}