{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-cognitive-services/json-schema/microsoft-cognitive-services-commitment-plan-schema.json",
  "title": "CommitmentPlan",
  "description": "Cognitive Services account commitment plan.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-cognitive-services-cognitiveservicescommitmentplans-api-openapi.yml#/components/schemas/CommitmentPlan",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/CommitmentPlanProperties",
      "description": "Properties of Cognitive Services account commitment plan."
    },
    "tags": {
      "type": "object",
      "description": "Resource tags.",
      "additionalProperties": {
        "type": "string"
      },
      "x-ms-mutability": [
        "read",
        "update",
        "create"
      ]
    },
    "location": {
      "type": "string",
      "description": "The geo-location where the resource lives",
      "x-ms-mutability": [
        "read",
        "create"
      ]
    },
    "etag": {
      "type": "string",
      "description": "Resource Etag.",
      "readOnly": true
    },
    "kind": {
      "type": "string",
      "description": "The kind (type) of cognitive service account."
    },
    "sku": {
      "$ref": "#/$defs/Sku",
      "description": "The resource model definition representing SKU"
    }
  },
  "allOf": [
    {
      "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource"
    }
  ],
  "$defs": {
    "CommitmentPeriod": {
      "type": "object",
      "description": "Cognitive Services account commitment period.",
      "properties": {
        "tier": {
          "type": "string",
          "description": "Commitment period commitment tier."
        },
        "count": {
          "type": "integer",
          "format": "int32",
          "description": "Commitment period commitment count."
        },
        "quota": {
          "$ref": "#/$defs/CommitmentQuota",
          "description": "Cognitive Services account commitment quota.",
          "readOnly": true
        },
        "startDate": {
          "type": "string",
          "description": "Commitment period start date.",
          "readOnly": true
        },
        "endDate": {
          "type": "string",
          "description": "Commitment period end date.",
          "readOnly": true
        }
      }
    },
    "CommitmentPlanProperties": {
      "type": "object",
      "description": "Properties of Cognitive Services account commitment plan.",
      "properties": {
        "provisioningState": {
          "$ref": "#/$defs/CommitmentPlanProvisioningState",
          "description": "Gets the status of the resource at the time the operation was called.",
          "readOnly": true
        },
        "commitmentPlanGuid": {
          "type": "string",
          "description": "Commitment plan guid."
        },
        "hostingModel": {
          "$ref": "#/$defs/HostingModel",
          "description": "Account hosting model."
        },
        "planType": {
          "type": "string",
          "description": "Commitment plan type."
        },
        "current": {
          "$ref": "#/$defs/CommitmentPeriod",
          "description": "Cognitive Services account commitment period."
        },
        "autoRenew": {
          "type": "boolean",
          "description": "AutoRenew commitment plan."
        },
        "next": {
          "$ref": "#/$defs/CommitmentPeriod",
          "description": "Cognitive Services account commitment period."
        },
        "last": {
          "$ref": "#/$defs/CommitmentPeriod",
          "description": "Cognitive Services account commitment period.",
          "readOnly": true
        },
        "provisioningIssues": {
          "type": "array",
          "description": "The list of ProvisioningIssue.",
          "items": {
            "type": "string"
          },
          "readOnly": true
        }
      }
    },
    "CommitmentPlanProvisioningState": {
      "type": "string",
      "description": "Gets the status of the resource at the time the operation was called.",
      "enum": [
        "Accepted",
        "Creating",
        "Deleting",
        "Moving",
        "Failed",
        "Succeeded",
        "Canceled"
      ],
      "x-ms-enum": {
        "name": "CommitmentPlanProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Accepted",
            "value": "Accepted"
          },
          {
            "name": "Creating",
            "value": "Creating"
          },
          {
            "name": "Deleting",
            "value": "Deleting"
          },
          {
            "name": "Moving",
            "value": "Moving"
          },
          {
            "name": "Failed",
            "value": "Failed"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded"
          },
          {
            "name": "Canceled",
            "value": "Canceled"
          }
        ]
      },
      "readOnly": true
    },
    "CommitmentQuota": {
      "type": "object",
      "description": "Cognitive Services account commitment quota.",
      "properties": {
        "quantity": {
          "type": "integer",
          "format": "int64",
          "description": "Commitment quota quantity."
        },
        "unit": {
          "type": "string",
          "description": "Commitment quota unit."
        }
      }
    },
    "HostingModel": {
      "type": "string",
      "description": "Account hosting model.",
      "enum": [
        "Web",
        "ConnectedContainer",
        "DisconnectedContainer",
        "ProvisionedWeb"
      ],
      "x-ms-enum": {
        "name": "HostingModel",
        "modelAsString": true,
        "values": [
          {
            "name": "Web",
            "value": "Web"
          },
          {
            "name": "ConnectedContainer",
            "value": "ConnectedContainer"
          },
          {
            "name": "DisconnectedContainer",
            "value": "DisconnectedContainer"
          },
          {
            "name": "ProvisionedWeb",
            "value": "ProvisionedWeb"
          }
        ]
      }
    },
    "Sku": {
      "type": "object",
      "description": "The resource model definition representing SKU",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the SKU. Ex - P3. It is typically a letter+number code"
        },
        "tier": {
          "$ref": "#/$defs/SkuTier",
          "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT."
        },
        "size": {
          "type": "string",
          "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code."
        },
        "family": {
          "type": "string",
          "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here."
        },
        "capacity": {
          "type": "integer",
          "format": "int32",
          "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted."
        }
      },
      "required": [
        "name"
      ]
    },
    "SkuTier": {
      "type": "string",
      "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.",
      "enum": [
        "Free",
        "Basic",
        "Standard",
        "Premium",
        "Enterprise"
      ],
      "x-ms-enum": {
        "name": "SkuTier",
        "modelAsString": true,
        "values": [
          {
            "name": "Free",
            "value": "Free"
          },
          {
            "name": "Basic",
            "value": "Basic"
          },
          {
            "name": "Standard",
            "value": "Standard"
          },
          {
            "name": "Premium",
            "value": "Premium"
          },
          {
            "name": "Enterprise",
            "value": "Enterprise"
          }
        ]
      }
    }
  }
}