2026-01-27 14:48:39 +01:00

178 lines
8.0 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) Revenue Collection Systems France S.A.S. - 2018-2025 ALL RIGHTS RESERVED
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:head="http://www.thales.dc/Headers"
xmlns="http://www.thales.dc/Device"
targetNamespace="http://www.thales.dc/Device"
version="1.0.0">
<!-- Import of xsd file -->
<xs:import namespace="http://www.thales.dc/Headers" schemaLocation="../../common/Headers.xsd"/>
<!-- Annotate all modification of the xsd file according to version -->
<xs:annotation>
<xs:documentation>-----------------------------------------------------------------------------------------------------------------------</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>Version List</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>-----------------------------------------------------------------------------------------------------------------------</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>04/11/2021 - Version 1.0.0</xs:documentation>
<xs:documentation>
1st part: Add the AuditMessages, AuditMessage, Headers and Payload element for the XML validation
2nd part: Add version to xsd schema
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>-----------------------------------------------------------------------------------------------------------------------</xs:documentation>
</xs:annotation>
<!-- Description of the AuditMessages structure -->
<xs:element name="AuditMessages" type="AuditMessagesType"/>
<xs:complexType name="AuditMessagesType">
<xs:sequence>
<!-- List of AuditMessage -->
<xs:element name="AuditMessage" type="AuditMessageType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<!-- version of AuditMessages structure -->
<xs:attribute name="DeviceXsdVersion" type="xs:string" fixed="1.0"/>
</xs:complexType>
<!-- Description of the AuditMessage structure -->
<xs:complexType name="AuditMessageType">
<xs:sequence>
<!-- Headers structure -->
<xs:element name="Headers" type="head:HeadersType" minOccurs="0"/>
<!-- Payload is a DeviceAuditExchange structure -->
<xs:element name="Payload" type="DeviceAuditExchange"/>
</xs:sequence>
</xs:complexType>
<!-- Description of the DeviceAuditExchange structure -->
<xs:complexType name="DeviceAuditExchange">
<xs:annotation>
<xs:documentation>dem_devices_post: At device creation</xs:documentation>
<xs:documentation>dem_device_post: At device update</xs:documentation>
<xs:documentation>dem_device_configuration_upload_post: At device configuration upload</xs:documentation>
<xs:documentation>Used to export payment means of a customer for analytics.</xs:documentation>
</xs:annotation>
<xs:all>
<xs:element name="BusinessEntityId" type="xs:string">
<xs:annotation>
<xs:documentation>Dictionary prefix: BusinessEntity</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DeviceId" type="xs:string">
<xs:annotation>
<xs:documentation>Device technical identifier</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DeviceNumber" type="xs:string">
<xs:annotation>
<xs:documentation>Device number</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DeviceStatus" type="DeviceStatus">
<xs:annotation>
<xs:documentation>Dictionary prefix: DeviceStatus</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DeviceTypeId" type="xs:int">
<xs:annotation>
<xs:documentation>Dictionary prefix: DeviceType</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DiscrepancyDuration" type="xs:duration" minOccurs="0">
<xs:annotation>
<xs:documentation>Duration since discrepancyStatus has changed from/to value = NO_DISCREPANCY</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="FarePointId" type="xs:int">
<xs:annotation>
<xs:documentation>Dictionary prefix: FarePointId</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Mobile" type="xs:boolean">
<xs:annotation>
<xs:documentation>Is device mobile or fixed</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Offline" type="xs:boolean">
<xs:annotation>
<xs:documentation>Is device offline</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StockEntityId" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Id of the stock entity to which the device is attached (can be empty)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="DeviceSamData">
<xs:annotation>
<xs:documentation>List of SAM associated to device</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="DeviceSamData" type="DeviceSam" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="Tags">
<xs:annotation>
<xs:documentation>List of tags associated to device</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Tag" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>
<xs:complexType name="DeviceSam">
<xs:all>
<xs:element name="DeviceSamId" type="xs:string" minOccurs="0"/>
<xs:element name="DeviceSamStatus" type="LocalizedDeviceSamStatus" minOccurs="0"/>
<xs:element name="DeviceSamType" type="LocalizedDeviceSamType" minOccurs="0"/>
</xs:all>
</xs:complexType>
<xs:complexType name="LocalizedDeviceSamStatus">
<xs:all>
<xs:element name="Value" type="DeviceSamStatus"/>
<xs:element name="Label" type="xs:string"/>
</xs:all>
</xs:complexType>
<xs:complexType name="LocalizedDeviceSamType">
<xs:all>
<xs:element name="Value" type="DeviceSamType"/>
<xs:element name="Label" type="xs:string"/>
</xs:all>
</xs:complexType>
<xs:simpleType name="DeviceSamStatus">
<xs:restriction base="xs:string">
<xs:enumeration value="UNKNOWN"/>
<xs:enumeration value="VALID"/>
<xs:enumeration value="REVOKED"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DeviceSamType">
<xs:restriction base="xs:string">
<xs:enumeration value="TICKETING"/>
<xs:enumeration value="BANKING"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DeviceStatus">
<xs:restriction base="xs:string">
<xs:enumeration value="IN_OPERATION"/>
<xs:enumeration value="OUT_OF_OPERATION"/>
<xs:enumeration value="DENIED"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>