{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-test-labs/json-schema/azure-test-labs-service-fabric-schema.json",
  "title": "ServiceFabric",
  "description": "A Service Fabric.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-test-labs-servicefabrics-api-openapi.yml#/components/schemas/ServiceFabric",
  "allOf": [
    {
      "$ref": "#/$defs/Resource"
    }
  ],
  "properties": {
    "properties": {
      "$ref": "#/$defs/ServiceFabricProperties",
      "description": "The properties of the resource.",
      "x-ms-client-flatten": true
    }
  },
  "required": [
    "properties"
  ],
  "type": "object",
  "$defs": {
    "ApplicableSchedule": {
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ],
      "description": "Schedules applicable to a virtual machine. The schedules may have been defined on a VM or on lab level.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/ApplicableScheduleProperties",
          "description": "The properties of the resource.",
          "x-ms-client-flatten": true
        }
      },
      "required": [
        "properties"
      ],
      "type": "object"
    },
    "ApplicableScheduleProperties": {
      "description": "Properties of a schedules applicable to a virtual machine.",
      "properties": {
        "labVmsShutdown": {
          "$ref": "#/$defs/Schedule",
          "description": "The auto-shutdown schedule, if one has been set at the lab or lab resource level."
        },
        "labVmsStartup": {
          "$ref": "#/$defs/Schedule",
          "description": "The auto-startup schedule, if one has been set at the lab or lab resource level."
        }
      },
      "type": "object"
    },
    "DayDetails": {
      "description": "Properties of a daily schedule.",
      "properties": {
        "time": {
          "description": "The time of day the schedule will occur.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "HourDetails": {
      "description": "Properties of an hourly schedule.",
      "properties": {
        "minute": {
          "description": "Minutes of the hour the schedule will run.",
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "NotificationSettings": {
      "description": "Notification settings for a schedule.",
      "properties": {
        "emailRecipient": {
          "description": "The email recipient to send notifications to (can be a list of semi-colon separated email addresses).",
          "type": "string"
        },
        "notificationLocale": {
          "description": "The locale to use when sending a notification (fallback for unsupported languages is EN).",
          "type": "string"
        },
        "status": {
          "description": "If notifications are enabled for this schedule (i.e. Enabled, Disabled).",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "EnableStatus"
          }
        },
        "timeInMinutes": {
          "description": "Time in minutes before event at which notification will be sent.",
          "format": "int32",
          "type": "integer"
        },
        "webhookUrl": {
          "description": "The webhook URL to which the notification will be sent.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "Resource": {
      "description": "An Azure resource.",
      "properties": {
        "id": {
          "description": "The identifier of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "location": {
          "description": "The location of the resource.",
          "type": "string"
        },
        "name": {
          "description": "The name of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "tags": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "The tags of the resource.",
          "type": "object"
        },
        "type": {
          "description": "The type of the resource.",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object",
      "x-ms-azure-resource": true
    },
    "Schedule": {
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ],
      "description": "A schedule.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/ScheduleProperties",
          "description": "The properties of the resource.",
          "x-ms-client-flatten": true
        }
      },
      "required": [
        "properties"
      ],
      "type": "object"
    },
    "ScheduleProperties": {
      "description": "Properties of a schedule.",
      "properties": {
        "createdDate": {
          "description": "The creation date of the schedule.",
          "format": "date-time",
          "readOnly": true,
          "type": "string"
        },
        "dailyRecurrence": {
          "$ref": "#/$defs/DayDetails",
          "description": "If the schedule will occur once each day of the week, specify the daily recurrence."
        },
        "hourlyRecurrence": {
          "$ref": "#/$defs/HourDetails",
          "description": "If the schedule will occur multiple times a day, specify the hourly recurrence."
        },
        "notificationSettings": {
          "$ref": "#/$defs/NotificationSettings",
          "description": "Notification settings."
        },
        "provisioningState": {
          "description": "The provisioning status of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "status": {
          "description": "The status of the schedule (i.e. Enabled, Disabled)",
          "enum": [
            "Enabled",
            "Disabled"
          ],
          "type": "string",
          "x-ms-enum": {
            "modelAsString": true,
            "name": "EnableStatus"
          }
        },
        "targetResourceId": {
          "description": "The resource ID to which the schedule belongs",
          "type": "string"
        },
        "taskType": {
          "description": "The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart).",
          "type": "string"
        },
        "timeZoneId": {
          "description": "The time zone ID (e.g. Pacific Standard time).",
          "type": "string"
        },
        "uniqueIdentifier": {
          "description": "The unique immutable identifier of a resource (Guid).",
          "readOnly": true,
          "type": "string"
        },
        "weeklyRecurrence": {
          "$ref": "#/$defs/WeekDetails",
          "description": "If the schedule will occur only some days of the week, specify the weekly recurrence."
        }
      },
      "type": "object"
    },
    "ServiceFabricProperties": {
      "description": "Properties of a service fabric.",
      "properties": {
        "applicableSchedule": {
          "$ref": "#/$defs/ApplicableSchedule",
          "description": "The applicable schedule for the virtual machine.",
          "readOnly": true
        },
        "environmentId": {
          "description": "The resource id of the environment under which the service fabric resource is present",
          "type": "string"
        },
        "externalServiceFabricId": {
          "description": "The backing service fabric resource's id",
          "type": "string"
        },
        "provisioningState": {
          "description": "The provisioning status of the resource.",
          "readOnly": true,
          "type": "string"
        },
        "uniqueIdentifier": {
          "description": "The unique immutable identifier of a resource (Guid).",
          "readOnly": true,
          "type": "string"
        }
      },
      "type": "object"
    },
    "WeekDetails": {
      "description": "Properties of a weekly schedule.",
      "properties": {
        "time": {
          "description": "The time of the day the schedule will occur.",
          "type": "string"
        },
        "weekdays": {
          "description": "The days of the week for which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.).",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    }
  }
}