{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-networking-services/json-schema/azure-networking-services-custom-ip-prefix-schema.json",
  "title": "CustomIpPrefix",
  "description": "Custom IP prefix resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-networking-services-customipprefixes-api-openapi.yml#/components/schemas/CustomIpPrefix",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/CustomIpPrefixPropertiesFormat",
      "description": "Custom IP prefix properties.",
      "x-ms-client-flatten": true
    },
    "extendedLocation": {
      "$ref": "#/$defs/ExtendedLocation",
      "description": "The extended location of the custom IP prefix."
    },
    "etag": {
      "type": "string",
      "description": "A unique read-only string that changes whenever the resource is updated.",
      "readOnly": true
    },
    "zones": {
      "type": "array",
      "description": "A list of availability zones denoting where the resource needs to come from.",
      "items": {
        "type": "string"
      }
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/Resource"
    }
  ],
  "$defs": {
    "CommissionedState": {
      "type": "string",
      "description": "The commissioned state of the Custom IP Prefix.",
      "enum": [
        "Provisioning",
        "Provisioned",
        "Commissioning",
        "CommissionedNoInternetAdvertise",
        "Commissioned",
        "Decommissioning",
        "Deprovisioning",
        "Deprovisioned"
      ],
      "x-ms-enum": {
        "name": "CommissionedState",
        "modelAsString": true,
        "values": [
          {
            "name": "Provisioning",
            "value": "Provisioning",
            "description": "Provisioning"
          },
          {
            "name": "Provisioned",
            "value": "Provisioned",
            "description": "Provisioned"
          },
          {
            "name": "Commissioning",
            "value": "Commissioning",
            "description": "Commissioning"
          },
          {
            "name": "CommissionedNoInternetAdvertise",
            "value": "CommissionedNoInternetAdvertise",
            "description": "CommissionedNoInternetAdvertise"
          },
          {
            "name": "Commissioned",
            "value": "Commissioned",
            "description": "Commissioned"
          },
          {
            "name": "Decommissioning",
            "value": "Decommissioning",
            "description": "Decommissioning"
          },
          {
            "name": "Deprovisioning",
            "value": "Deprovisioning",
            "description": "Deprovisioning"
          },
          {
            "name": "Deprovisioned",
            "value": "Deprovisioned",
            "description": "Deprovisioned"
          }
        ]
      }
    },
    "CustomIpPrefixPropertiesFormat": {
      "type": "object",
      "description": "Custom IP prefix properties.",
      "properties": {
        "asn": {
          "type": "string",
          "description": "The ASN for CIDR advertising. Should be an integer as string."
        },
        "cidr": {
          "type": "string",
          "description": "The prefix range in CIDR notation. Should include the start address and the prefix length."
        },
        "signedMessage": {
          "type": "string",
          "description": "Signed message for WAN validation."
        },
        "authorizationMessage": {
          "type": "string",
          "description": "Authorization message for WAN validation."
        },
        "customIpPrefixParent": {
          "$ref": "#/$defs/SubResource",
          "description": "The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix."
        },
        "childCustomIpPrefixes": {
          "type": "array",
          "description": "The list of all Children for IPv6 /48 CustomIpPrefix.",
          "items": {
            "$ref": "#/$defs/SubResource"
          },
          "readOnly": true
        },
        "commissionedState": {
          "$ref": "#/$defs/CommissionedState",
          "description": "The commissioned state of the Custom IP Prefix."
        },
        "expressRouteAdvertise": {
          "type": "boolean",
          "description": "Whether to do express route advertise."
        },
        "geo": {
          "$ref": "#/$defs/Geo",
          "description": "The Geo for CIDR advertising. Should be an Geo code."
        },
        "noInternetAdvertise": {
          "type": "boolean",
          "description": "Whether to Advertise the range to Internet."
        },
        "prefixType": {
          "$ref": "#/$defs/CustomIpPrefixType",
          "description": "Type of custom IP prefix. Should be Singular, Parent, or Child."
        },
        "publicIpPrefixes": {
          "type": "array",
          "description": "The list of all referenced PublicIpPrefixes.",
          "items": {
            "$ref": "#/$defs/SubResource"
          },
          "readOnly": true
        },
        "resourceGuid": {
          "type": "string",
          "description": "The resource GUID property of the custom IP prefix resource.",
          "readOnly": true
        },
        "failedReason": {
          "type": "string",
          "description": "The reason why resource is in failed state.",
          "readOnly": true
        },
        "provisioningState": {
          "$ref": "#/$defs/ProvisioningState",
          "description": "The provisioning state of the custom IP prefix resource.",
          "readOnly": true
        }
      }
    },
    "CustomIpPrefixType": {
      "type": "string",
      "description": "Type of custom IP prefix. Should be Singular, Parent, or Child.",
      "enum": [
        "Singular",
        "Parent",
        "Child"
      ],
      "x-ms-enum": {
        "name": "CustomIpPrefixType",
        "modelAsString": true,
        "values": [
          {
            "name": "Singular",
            "value": "Singular",
            "description": "Singular"
          },
          {
            "name": "Parent",
            "value": "Parent",
            "description": "Parent"
          },
          {
            "name": "Child",
            "value": "Child",
            "description": "Child"
          }
        ]
      }
    },
    "ExtendedLocation": {
      "type": "object",
      "description": "ExtendedLocation complex type.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the extended location."
        },
        "type": {
          "$ref": "#/$defs/ExtendedLocationTypes",
          "description": "The type of the extended location."
        }
      }
    },
    "Geo": {
      "type": "string",
      "description": "The Geo for CIDR advertising. Should be an Geo code.",
      "enum": [
        "GLOBAL",
        "AFRI",
        "APAC",
        "EURO",
        "LATAM",
        "NAM",
        "ME",
        "OCEANIA",
        "AQ"
      ],
      "x-ms-enum": {
        "name": "Geo",
        "modelAsString": true,
        "values": [
          {
            "name": "GLOBAL",
            "value": "GLOBAL",
            "description": "GLOBAL"
          },
          {
            "name": "AFRI",
            "value": "AFRI",
            "description": "AFRI"
          },
          {
            "name": "APAC",
            "value": "APAC",
            "description": "APAC"
          },
          {
            "name": "EURO",
            "value": "EURO",
            "description": "EURO"
          },
          {
            "name": "LATAM",
            "value": "LATAM",
            "description": "LATAM"
          },
          {
            "name": "NAM",
            "value": "NAM",
            "description": "NAM"
          },
          {
            "name": "ME",
            "value": "ME",
            "description": "ME"
          },
          {
            "name": "OCEANIA",
            "value": "OCEANIA",
            "description": "OCEANIA"
          },
          {
            "name": "AQ",
            "value": "AQ",
            "description": "AQ"
          }
        ]
      }
    },
    "ProvisioningState": {
      "type": "string",
      "description": "Provisioning states of a resource.",
      "enum": [
        "Failed",
        "Succeeded",
        "Canceled",
        "Creating",
        "Updating",
        "Deleting"
      ],
      "x-ms-enum": {
        "name": "ProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Succeeded"
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Canceled"
          },
          {
            "name": "Creating",
            "value": "Creating",
            "description": "Creating"
          },
          {
            "name": "Updating",
            "value": "Updating",
            "description": "Updating"
          },
          {
            "name": "Deleting",
            "value": "Deleting",
            "description": "Deleting"
          }
        ]
      }
    },
    "Resource": {
      "type": "object",
      "description": "Common resource representation.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID."
        },
        "name": {
          "type": "string",
          "description": "Resource name.",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "Resource type.",
          "readOnly": true
        },
        "location": {
          "type": "string",
          "description": "Resource location."
        },
        "tags": {
          "type": "object",
          "description": "Resource tags.",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "x-ms-azure-resource": true
    },
    "SubResource": {
      "type": "object",
      "description": "Reference to another subresource.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Resource ID."
        }
      }
    }
  }
}