{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-health/json-schema/azure-health-iot-fhir-destination-collection-schema.json",
  "title": "IotFhirDestinationCollection",
  "description": "A collection of IoT Connector FHIR destinations.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-health-iotconnectors-api-openapi.yml#/components/schemas/IotFhirDestinationCollection",
  "type": "object",
  "properties": {
    "nextLink": {
      "description": "The link used to get the next page of IoT FHIR destinations.",
      "type": "string"
    },
    "value": {
      "description": "The list of IoT Connector FHIR destinations.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/IotFhirDestination"
      }
    }
  },
  "$defs": {
    "IotDestinationProperties": {
      "type": "object",
      "description": "Common IoT Connector destination properties.",
      "properties": {
        "provisioningState": {
          "description": "The provisioning state.",
          "$ref": "#/$defs/ProvisioningState",
          "x-ms-client-flatten": true
        }
      }
    },
    "IotFhirDestination": {
      "required": [
        "properties"
      ],
      "type": "object",
      "description": "IoT Connector FHIR destination definition.",
      "allOf": [
        {
          "$ref": "#/$defs/LocationBasedResource"
        }
      ],
      "properties": {
        "properties": {
          "description": "IoT FHIR Destination settings.",
          "$ref": "#/$defs/IotFhirDestinationProperties",
          "x-ms-client-flatten": true
        },
        "systemData": {
          "description": "Metadata pertaining to creation and last modification of the resource.",
          "$ref": "#/$defs/systemData"
        }
      }
    },
    "IotFhirDestinationProperties": {
      "required": [
        "resourceIdentityResolutionType",
        "fhirServiceResourceId",
        "fhirMapping"
      ],
      "type": "object",
      "allOf": [
        {
          "$ref": "#/$defs/IotDestinationProperties"
        }
      ],
      "description": "IoT Connector destination properties for an Azure FHIR service.",
      "properties": {
        "resourceIdentityResolutionType": {
          "description": "Determines how resource identity is resolved on the destination.",
          "$ref": "#/$defs/IotIdentityResolutionType"
        },
        "fhirServiceResourceId": {
          "type": "string",
          "description": "Fully qualified resource id of the FHIR service to connect to."
        },
        "fhirMapping": {
          "description": "FHIR Mappings",
          "$ref": "#/$defs/IotMappingProperties"
        }
      }
    },
    "IotIdentityResolutionType": {
      "description": "The type of IoT identity resolution to use with the destination.",
      "enum": [
        "Create",
        "Lookup"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "IotIdentityResolutionType",
        "modelAsString": true
      }
    },
    "IotMappingProperties": {
      "description": "The mapping content.",
      "type": "object",
      "properties": {
        "content": {
          "description": "The mapping.",
          "type": "object"
        }
      }
    },
    "LocationBasedResource": {
      "type": "object",
      "description": "The common properties for any location based resource, tracked or proxy.",
      "allOf": [
        {
          "$ref": "#/$defs/ResourceCore"
        }
      ],
      "properties": {
        "location": {
          "type": "string",
          "description": "The resource location.",
          "x-ms-mutability": [
            "create",
            "read"
          ]
        }
      },
      "x-ms-azure-resource": true
    },
    "ProvisioningState": {
      "description": "The provisioning state.",
      "enum": [
        "Deleting",
        "Succeeded",
        "Creating",
        "Accepted",
        "Verifying",
        "Updating",
        "Failed",
        "Canceled",
        "Deprovisioned",
        "Moving",
        "Suspended",
        "Warned",
        "SystemMaintenance"
      ],
      "type": "string",
      "readOnly": true,
      "x-ms-enum": {
        "name": "provisioningState",
        "modelAsString": true
      }
    },
    "ResourceCore": {
      "type": "object",
      "description": "The common properties for any resource, tracked or proxy.",
      "properties": {
        "id": {
          "readOnly": true,
          "type": "string",
          "description": "The resource identifier."
        },
        "name": {
          "readOnly": true,
          "type": "string",
          "description": "The resource name.",
          "pattern": "^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$"
        },
        "type": {
          "readOnly": true,
          "type": "string",
          "description": "The resource type."
        },
        "etag": {
          "description": "An etag associated with the resource, used for optimistic concurrency when editing it.",
          "type": "string"
        }
      },
      "x-ms-azure-resource": true
    },
    "systemData": {
      "description": "Metadata pertaining to creation and last modification of the resource.",
      "type": "object",
      "readOnly": true,
      "properties": {
        "createdBy": {
          "type": "string",
          "description": "The identity that created the resource."
        },
        "createdByType": {
          "type": "string",
          "description": "The type of identity that created the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource creation (UTC)."
        },
        "lastModifiedBy": {
          "type": "string",
          "description": "The identity that last modified the resource."
        },
        "lastModifiedByType": {
          "type": "string",
          "description": "The type of identity that last modified the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "x-ms-enum": {
            "name": "createdByType",
            "modelAsString": true
          }
        },
        "lastModifiedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource last modification (UTC)"
        }
      }
    }
  }
}