<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="productionservices_standard" targetNamespace="http://api.dmds.com/api/v1/requestschemas/productionservices_standard" elementFormDefault="qualified" xmlns="http://api.dmds.com/api/v1/requestschemas/productionservices_standard" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:complexType name="ProductionServicesRequest">
    <xs:sequence>
      <xs:element name="ProductionService" type="ProductionService" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <!-- ProductionService type definition -->
  <xs:complexType name="ProductionService">
    <xs:all minOccurs="0">
      <!-- Note that the ServiceID is the type of service while the "ProducitonService" is an instance of a request for that service -->
      <xs:element name="ServiceID" type="xs:integer" minOccurs="1" maxOccurs="1" />
      <!-- The AD-ID of the asset for the production service to be applied to.
      If the asset is not yet ingested then no action will be taken on the asset has been uploaded.
      No pending orders containing this asset will be sent until production services have been applied. -->
      <xs:element name="ADID" type="DMDSString" minOccurs="1" maxOccurs="1" />
      <!-- For billing purposes, you can optionally associate this service request with an existing DMDS Order by specifying the Order ID -->
      <xs:element name="OrderID" type="xs:integer" minOccurs="0" maxOccurs="1" nillable="true" />
    </xs:all>
  </xs:complexType>
  <!-- Data field definitions -->
  <xs:simpleType name="DMDSString">
    <xs:annotation>
      <xs:documentation>Defines custom DMDS string length for All string values</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:minLength value="0" />
      <xs:maxLength value="400" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>