{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-communication-services/json-schema/microsoft-azure-communication-services-email-service-resource-schema.json",
  "title": "EmailServiceResource",
  "description": "A class representing an EmailService resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-communication-services-emailservices-api-openapi.yml#/components/schemas/EmailServiceResource",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/EmailServiceProperties",
      "description": "The properties of the service.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/TrackedResource"
    }
  ],
  "$defs": {
    "EmailServiceProperties": {
      "type": "object",
      "description": "A class that describes the properties of the EmailService.",
      "properties": {
        "provisioningState": {
          "$ref": "#/$defs/EmailServices_ProvisioningState",
          "description": "Provisioning state of the resource.",
          "readOnly": true
        },
        "dataLocation": {
          "type": "string",
          "description": "The location where the email service stores its data at rest.",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      },
      "required": [
        "dataLocation"
      ]
    },
    "EmailServices_ProvisioningState": {
      "type": "string",
      "description": "Provisioning state of the resource.",
      "enum": [
        "Unknown",
        "Succeeded",
        "Failed",
        "Canceled",
        "Running",
        "Creating",
        "Updating",
        "Deleting",
        "Moving"
      ],
      "x-ms-enum": {
        "name": "EmailServices_ProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Unknown",
            "value": "Unknown",
            "description": "Unknown"
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Succeeded"
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Failed"
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Canceled"
          },
          {
            "name": "Running",
            "value": "Running",
            "description": "Running"
          },
          {
            "name": "Creating",
            "value": "Creating",
            "description": "Creating"
          },
          {
            "name": "Updating",
            "value": "Updating",
            "description": "Updating"
          },
          {
            "name": "Deleting",
            "value": "Deleting",
            "description": "Deleting"
          },
          {
            "name": "Moving",
            "value": "Moving",
            "description": "Moving"
          }
        ]
      }
    },
    "TrackedResource": {
      "type": "object",
      "title": "Tracked Resource",
      "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'",
      "properties": {
        "tags": {
          "type": "object",
          "description": "Resource tags.",
          "additionalProperties": {
            "type": "string"
          },
          "x-ms-mutability": [
            "read",
            "create",
            "update"
          ]
        },
        "location": {
          "type": "string",
          "description": "The geo-location where the resource lives",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      },
      "required": [
        "location"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    }
  }
}