{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/graphiant/main/json-schema/graphiant-v1-extranets-b2b-consumer-post-response-schema.json",
  "title": "v1ExtranetsB2bConsumerPostResponse",
  "x-generated": "2026-10-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/graphiant-extranets-b2b-api-openapi.yml#/components/schemas/v1ExtranetsB2bConsumerPostResponse",
  "type": "object",
  "properties": {
    "device": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/manaV2ConsumerDeviceInformation"
      }
    },
    "id": {
      "type": "integer",
      "format": "int64"
    },
    "policy": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/manaV2ExtranetConsumerLanSegmentPolicyResponse"
      }
    },
    "siteInformation": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/manaV2B2bSiteInformation"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "googleProtobufTimestamp": {
      "type": "object",
      "properties": {
        "nanos": {
          "type": "integer",
          "format": "int32"
        },
        "seconds": {
          "type": "integer",
          "format": "int64"
        }
      },
      "additionalProperties": false
    },
    "manaV2B2bSiteInformation": {
      "type": "object",
      "properties": {
        "bwAllocationSiteLists": {
          "type": "integer",
          "format": "int32",
          "description": "Total Bandwidth allocation for the service on these site lists"
        },
        "bwAllocationSites": {
          "type": "integer",
          "format": "int32",
          "description": "Total Bandwidth allocation for the service on these sites"
        },
        "policerSiteLists": {
          "$ref": "#/$defs/manaV2Policer"
        },
        "policerSites": {
          "$ref": "#/$defs/manaV2Policer"
        },
        "siteLists": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64",
            "description": "Site list IDs where the service is deployed"
          }
        },
        "sites": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "int64",
            "description": "Site IDs where the service is deployed"
          }
        }
      },
      "additionalProperties": false
    },
    "manaV2ConsumerDeviceInformation": {
      "type": "object",
      "properties": {
        "deviceId": {
          "type": "integer",
          "format": "int64"
        },
        "lastUpdated": {
          "$ref": "#/$defs/googleProtobufTimestamp"
        },
        "site": {
          "type": "integer",
          "format": "int64"
        },
        "status": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "manaV2ExtranetConsumerLanSegmentPolicyResponse": {
      "type": "object",
      "properties": {
        "consumerLanSegment": {
          "type": "integer",
          "format": "int64"
        },
        "inboundSecurityRules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/manaV2SecurityPolicyRule"
          }
        },
        "outboundSecurityRules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/manaV2SecurityPolicyRule"
          }
        },
        "restrictedPrefixes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "rules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/manaV2ExtranetConsumerNatRule"
          }
        },
        "trafficRules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/manaV2TrafficPolicyRule"
          }
        }
      },
      "additionalProperties": false
    },
    "manaV2ExtranetConsumerNatRule": {
      "type": "object",
      "properties": {
        "outsideNatPrefix": {
          "type": "string",
          "description": "Optional nat prefix associated with a service prefix with an empty string indicating no NATing"
        },
        "servicePrefix": {
          "type": "string",
          "description": "Service prefix for the NAT rule (required)"
        }
      },
      "additionalProperties": false,
      "required": [
        "servicePrefix"
      ]
    },
    "manaV2Policer": {
      "type": "object",
      "properties": {
        "burstSize": {
          "type": "integer",
          "format": "int32",
          "description": "Burst size for the policer (required)"
        },
        "bw": {
          "type": "integer",
          "format": "int32",
          "description": "Bandwidth for the policer (required)"
        }
      },
      "additionalProperties": false,
      "required": [
        "burstSize",
        "bw"
      ]
    },
    "manaV2PolicyMatch": {
      "type": "object",
      "properties": {
        "destinationPort": {
          "type": "integer",
          "format": "int32",
          "minimum": 0
        },
        "destinationPrefix": {
          "type": "string"
        },
        "icmpType": {
          "type": "integer",
          "format": "int32",
          "minimum": 0
        },
        "protocol": {
          "type": "integer",
          "format": "int32",
          "minimum": 0
        },
        "sourcePort": {
          "type": "integer",
          "format": "int32",
          "minimum": 0
        },
        "sourcePrefix": {
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "manaV2SecurityPolicyRule": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string"
        },
        "implicit": {
          "type": "boolean"
        },
        "match": {
          "$ref": "#/$defs/manaV2PolicyMatch"
        },
        "policyRuleIndex": {
          "type": "integer",
          "format": "int64"
        },
        "seq": {
          "type": "integer",
          "format": "int32",
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "manaV2TrafficPolicyAction": {
      "type": "object",
      "properties": {
        "backup": {
          "type": "string",
          "description": "Backup circuit for the traffic policy action"
        },
        "class": {
          "type": "string",
          "description": "Class for the traffic policy action"
        },
        "primary": {
          "type": "string",
          "description": "Primary circuit for the traffic policy action"
        },
        "result": {
          "type": "string",
          "description": "Result for the traffic policy action"
        }
      },
      "additionalProperties": false
    },
    "manaV2TrafficPolicyRule": {
      "type": "object",
      "properties": {
        "action": {
          "$ref": "#/$defs/manaV2TrafficPolicyAction"
        },
        "match": {
          "$ref": "#/$defs/manaV2PolicyMatch"
        },
        "policyRuleIndex": {
          "type": "integer",
          "format": "int64"
        },
        "seq": {
          "type": "integer",
          "format": "int32",
          "minimum": 0
        }
      },
      "additionalProperties": false
    }
  }
}