<commit_before><?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="2.0">
	
	<!-- 
		XML schema describing the documents that can be exchanged between MoTeCH Server
		and the INTELLIVR system
	-->


	<!-- 

		Document from INTELLIVR to MoTeCH requesting the IVR config for one user

		Example:

		<getIVRConfigRequest>
			<userid>12345</userid>
		</getIVRConfigRequest>

	-->
	<xsd:element name="getIVRConfigRequest" type="getIVRConfigRequestType"/>

	<xsd:complexType name="getIVRConfigRequestType">
		<xsd:sequence>
			<xsd:element name="userid" type="xsd:string"/>
		</xsd:sequence>
	</xsd:complexType>


	<!-- 
		Wrapper for most documents from/to INTELLIVR system
	-->

	<xsd:element name="AutoCreate" type="autoCreateWrapper"/>

	<xsd:complexType name="autoCreateWrapper">
		<xsd:sequence>
			<xsd:choice>
				<xsd:element name="Response" type="responseType"/>
				<xsd:element name="Request" type="requestType"/>
				<xsd:element name="Report" type="reportType"/>
			</xsd:choice>
		</xsd:sequence>
	</xsd:complexType>

	<!-- 

		Sent to INTELLIVR from MoTeCH to initate outbound call

		<AutoCreate>
			<Request>
				<ApiId>abcdef</ApiId>
				<Callee>+2345667898495</Callee>
				<Method>ivroriginate</Method>
				<vxml>
					<prompt>
						<break time="1s"/>
						<audio src="message1.wav"/>
						<break time="1s"/>
						<audio src="message2.wav"/>
						<break time="1s"/> 
					</prompt>
				</vxml>

				<Language>English</Language>
				<Tree>MainMenu</Tree>
				<ReportUrl>http://192.168.1.252/postback</ReportUrl>
				<Private>IDENTIFIER</Private>

			</Request>
		</AutoCreate>

	-->

	<xsd:complexType name="requestType">
		<xsd:sequence>
			<xsd:element name="ApiId" type="xsd:string"/>
			<xsd:element name="Callee" type="xsd:string"/>
			<xsd:element name="Method" type="xsd:string"/>
			<xsd:group ref="ivrConfigGroup"/>
		</xsd:sequence>
	</xsd:complexType>

	<!--

		Sent from INTELLIVR to MoTeCH to report status of a call
		
		<AutoCreate>
			<Report>
				<Status>COMPLETED</Status>
				<Callee>2334921920193</Callee>
				<Duration>43</Duration>
				<ConnectTime>2010-10-01T00:00:00.000Z</ConnectTime>
				<DisconnectTime>2010-10-01T00:00:43.000Z</DisconnectTime>
				<INTELLIVREntryCount>4</INTELLIVREntryCount>
				<Private>IDENTIFIER</Private>
				<INTELLIVREntry menu="message1.wav" entrytime="2010-10-01T00:00:01.000Z" duration="7" keypress="" file=""/>
				<INTELLIVREntry menu="message2.wav" entrytime="2010-10-01T00:00:08.000Z" duration="8" keypress="" file=""/>
				<INTELLIVREntry menu="main_menu" entrytime="2010-10-01T00:00:16.000Z" duration="8" keypress="2" file=""/>
				<INTELLIVREntry menu="pregnancy_info" entrytime="2010-10-01T00:00:24.000Z" duration="10" keypress="1" file=""/>
				<INTELLIVREntry menu="feedback_section" entrytime="2010-10-01T00:00:34.000Z" duration="10" keypress="" file="http://ivr/file.wav"/>
			</Report>
		</AutoCreate>

	-->

	<xsd:complexType name="reportType">
		<xsd:sequence>
			<xsd:element name="Status" type="reportStatusType"/>		
			<xsd:element name="Callee" type="xsd:string"/>
			<xsd:element name="Duration" type="xsd:positiveInteger"/>
			<xsd:element name="ConnectTime" type="xsd:dateTime"/>
			<xsd:element name="DisconnectTime" type="xsd:dateTime"/>
			<xsd:element name="INTELLIVREntryCount" type="xsd:int"/>
			<xsd:element name="Private" type="xsd:string"/>
			<xsd:element name="INTELLIVREntry" type="ivrEntryType" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>	
	</xsd:complexType>

	<xsd:simpleType name="reportStatusType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="COMPLETED"/>
			<xsd:enumeration value="REJECTED"/>
			<xsd:enumeration value="BUSY"/>
			<xsd:enumeration value="CONGESTION"/>
			<xsd:enumeration value="NOANSWER"/>
			<xsd:enumeration value="INTERNALERROR"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:complexType name="ivrEntryType">
		<xsd:attribute name="menu" type="xsd:string"/>
		<xsd:attribute name="entrytime" type="xsd:dateTime"/>
		<xsd:attribute name="duration" type="xsd:positiveInteger"/>
		<xsd:attribute name="keypress" type="xsd:string"/>
		<xsd:attribute name="file" type="xsd:string"/>

	</xsd:complexType>

	<!-- 

		Sent from MoTeCH to INTELLIVR in response to getIVRConfigRequest document

		Example:
		
		<?xml version="1.0" encoding="UTF-8"?>
		<AutoCreate>
			<Response>
				<Status>OK</Status>
				<vxml>
					<prompt>
						<break time="1s"/>
						<audio src="message1.wav"/>
						<break time="1s"/>
						<audio src="message2.wav"/>
						<break time="1s"/>
					</prompt>
				</vxml>
				<Language>English</Language>
				<Tree>Main Menu</Tree>
				<ReportUrl>http://192.168.1.252/postback</ReportUrl>
				<Private>IDENTIFIER</Private>
			</Response>
		</AutoCreate>

		<AutoCreate>
			<Response>
				<Status>OK</Status>
				<ErrorCode>001</ErrorCode>
				<ErrorString>Error String</ErrorString>
			</Response>
		</AutoCreate>

	-->


	<xsd:complexType name="responseType">
		<xsd:sequence>
			<xsd:element name="Status" type="statusType"/>
			<xsd:choice>
				<xsd:group ref="errorDetailsGroup"/>
				<xsd:group ref="ivrConfigGroup"/>
			</xsd:choice>
		</xsd:sequence>
	</xsd:complexType>


	<xsd:group name="errorDetailsGroup">
		<xsd:sequence>
			<xsd:element name="ErrorCode" type="errorCodeType"/>
			<xsd:element name="ErrorString" type="xsd:string"/>
		</xsd:sequence>
	</xsd:group>
	
	<xsd:complexType name="breakType">
		<xsd:attribute name="time" type="xsd:string" use="required"/>
	</xsd:complexType>

	<xsd:complexType name="audioType">
		<xsd:attribute name="src" type="xsd:string" use="required"/>
	</xsd:complexType>

	<xsd:simpleType name="statusType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="OK"/>
			<xsd:enumeration value="ERROR"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="errorCodeType">
		<xsd:annotation>
			<xsd:appinfo>
				<jxb:typesafeEnumClass>
					<jxb:typesafeEnumMember value="000" name="MOTECH_UNKNOWN_ERROR"/>
					<jxb:typesafeEnumMember value="001" name="MOTECH_MALFORMED_XML"/>
					<jxb:typesafeEnumMember value="002" name="MOTECH_INVALID_USER_ID"/>
					<jxb:typesafeEnumMember value="0000" name="IVR_UNKNOWN_ERROR"/>
					<jxb:typesafeEnumMember value="0001" name="IVR_NO_ACTION"/>
					<jxb:typesafeEnumMember value="0002" name="IVR_MALFORMED_XML"/>
					<jxb:typesafeEnumMember value="0003" name="IVR_INVALID_SOUND_FILENAME_FROMAT"/>
					<jxb:typesafeEnumMember value="0004" name="IVR_INVALID_URL_FORMAT"/>
					<jxb:typesafeEnumMember value="0005" name="IVR_UNSUPPORTED_REPORT_TYPE"/>
					<jxb:typesafeEnumMember value="0006" name="IVR_INVALID_API_ID"/>
					<jxb:typesafeEnumMember value="0007" name="IVR_INVALID_TREE"/>
					<jxb:typesafeEnumMember value="0008" name="IVR_INVALID_LANGUAGE"/>
				</jxb:typesafeEnumClass>
			</xsd:appinfo>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="000"/>
			<xsd:enumeration value="001"/>
			<xsd:enumeration value="002"/>
			<xsd:enumeration value="0000"/>
			<xsd:enumeration value="0001"/>
			<xsd:enumeration value="0002"/>
			<xsd:enumeration value="0003"/>
			<xsd:enumeration value="0004"/>
			<xsd:enumeration value="0005"/>
			<xsd:enumeration value="0006"/>
			<xsd:enumeration value="0007"/>
			<xsd:enumeration value="0008"/>
		</xsd:restriction>
	</xsd:simpleType>


	<!-- 

		IVR Config Type - common group of elements used above

	-->
	<xsd:group name="ivrConfigGroup">
		<xsd:sequence>
			<xsd:element name="vxml">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="prompt">
							<xsd:complexType>
								<xsd:sequence>
									<xsd:choice minOccurs="0" maxOccurs="unbounded">
										<xsd:element name="audio" type="audioType"/>
										<xsd:element name="break" type="breakType"/>
									</xsd:choice>
								</xsd:sequence>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="Language" type="xsd:string"/>
			<xsd:element name="Tree" type="xsd:string"/>
			<xsd:element name="ReportUrl" type="xsd:anyURI"/>
			<xsd:element name="Private" type="xsd:string"/>
		</xsd:sequence>
	</xsd:group>

</xsd:schema>

<commit_msg>intellivr.xsd - changed way root elements are defined in the schema.  Does not change the meaning but makes it behave better in jaxb.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="2.0">
	
	<!-- 
		XML schema describing the documents that can be exchanged between MoTeCH Server
		and the INTELLIVR system
	-->


	<!-- 

		Document from INTELLIVR to MoTeCH requesting the IVR config for one user

		Example:

		<getIVRConfigRequest>
			<userid>12345</userid>
		</getIVRConfigRequest>

	-->
	<xsd:element name="getIVRConfigRequest">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="userid" type="xsd:string"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>


	<!-- 
		Wrapper for most documents from/to INTELLIVR system
	-->

	<xsd:element name="AutoCreate">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:choice>
					<xsd:element name="Response" type="responseType"/>
					<xsd:element name="Request" type="requestType"/>
					<xsd:element name="Report" type="reportType"/>
				</xsd:choice>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>

	<!-- 

		Sent to INTELLIVR from MoTeCH to initate outbound call

		<AutoCreate>
			<Request>
				<ApiId>abcdef</ApiId>
				<Callee>+2345667898495</Callee>
				<Method>ivroriginate</Method>
				<vxml>
					<prompt>
						<break time="1s"/>
						<audio src="message1.wav"/>
						<break time="1s"/>
						<audio src="message2.wav"/>
						<break time="1s"/> 
					</prompt>
				</vxml>

				<Language>English</Language>
				<Tree>MainMenu</Tree>
				<ReportUrl>http://192.168.1.252/postback</ReportUrl>
				<Private>IDENTIFIER</Private>

			</Request>
		</AutoCreate>

	-->

	<xsd:complexType name="requestType">
		<xsd:sequence>
			<xsd:element name="ApiId" type="xsd:string"/>
			<xsd:element name="Callee" type="xsd:string"/>
			<xsd:element name="Method" type="xsd:string"/>
			<xsd:group ref="ivrConfigGroup"/>
		</xsd:sequence>
	</xsd:complexType>

	<!--

		Sent from INTELLIVR to MoTeCH to report status of a call
		
		<AutoCreate>
			<Report>
				<Status>COMPLETED</Status>
				<Callee>2334921920193</Callee>
				<Duration>43</Duration>
				<ConnectTime>2010-10-01T00:00:00.000Z</ConnectTime>
				<DisconnectTime>2010-10-01T00:00:43.000Z</DisconnectTime>
				<INTELLIVREntryCount>4</INTELLIVREntryCount>
				<Private>IDENTIFIER</Private>
				<INTELLIVREntry menu="message1.wav" entrytime="2010-10-01T00:00:01.000Z" duration="7" keypress="" file=""/>
				<INTELLIVREntry menu="message2.wav" entrytime="2010-10-01T00:00:08.000Z" duration="8" keypress="" file=""/>
				<INTELLIVREntry menu="main_menu" entrytime="2010-10-01T00:00:16.000Z" duration="8" keypress="2" file=""/>
				<INTELLIVREntry menu="pregnancy_info" entrytime="2010-10-01T00:00:24.000Z" duration="10" keypress="1" file=""/>
				<INTELLIVREntry menu="feedback_section" entrytime="2010-10-01T00:00:34.000Z" duration="10" keypress="" file="http://ivr/file.wav"/>
			</Report>
		</AutoCreate>

	-->

	<xsd:complexType name="reportType">
		<xsd:sequence>
			<xsd:element name="Status" type="reportStatusType"/>		
			<xsd:element name="Callee" type="xsd:string"/>
			<xsd:element name="Duration" type="xsd:positiveInteger"/>
			<xsd:element name="ConnectTime" type="xsd:dateTime"/>
			<xsd:element name="DisconnectTime" type="xsd:dateTime"/>
			<xsd:element name="INTELLIVREntryCount" type="xsd:int"/>
			<xsd:element name="Private" type="xsd:string"/>
			<xsd:element name="INTELLIVREntry" type="ivrEntryType" minOccurs="0" maxOccurs="unbounded"/>
		</xsd:sequence>	
	</xsd:complexType>

	<xsd:simpleType name="reportStatusType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="COMPLETED"/>
			<xsd:enumeration value="REJECTED"/>
			<xsd:enumeration value="BUSY"/>
			<xsd:enumeration value="CONGESTION"/>
			<xsd:enumeration value="NOANSWER"/>
			<xsd:enumeration value="INTERNALERROR"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:complexType name="ivrEntryType">
		<xsd:attribute name="menu" type="xsd:string"/>
		<xsd:attribute name="entrytime" type="xsd:dateTime"/>
		<xsd:attribute name="duration" type="xsd:positiveInteger"/>
		<xsd:attribute name="keypress" type="xsd:string"/>
		<xsd:attribute name="file" type="xsd:string"/>

	</xsd:complexType>

	<!-- 

		Sent from MoTeCH to INTELLIVR in response to getIVRConfigRequest document

		Example:
		
		<?xml version="1.0" encoding="UTF-8"?>
		<AutoCreate>
			<Response>
				<Status>OK</Status>
				<vxml>
					<prompt>
						<break time="1s"/>
						<audio src="message1.wav"/>
						<break time="1s"/>
						<audio src="message2.wav"/>
						<break time="1s"/>
					</prompt>
				</vxml>
				<Language>English</Language>
				<Tree>Main Menu</Tree>
				<ReportUrl>http://192.168.1.252/postback</ReportUrl>
				<Private>IDENTIFIER</Private>
			</Response>
		</AutoCreate>

		<AutoCreate>
			<Response>
				<Status>OK</Status>
				<ErrorCode>001</ErrorCode>
				<ErrorString>Error String</ErrorString>
			</Response>
		</AutoCreate>

	-->


	<xsd:complexType name="responseType">
		<xsd:sequence>
			<xsd:element name="Status" type="statusType"/>
			<xsd:choice>
				<xsd:group ref="errorDetailsGroup"/>
				<xsd:group ref="ivrConfigGroup"/>
			</xsd:choice>
		</xsd:sequence>
	</xsd:complexType>


	<xsd:group name="errorDetailsGroup">
		<xsd:sequence>
			<xsd:element name="ErrorCode" type="errorCodeType"/>
			<xsd:element name="ErrorString" type="xsd:string"/>
		</xsd:sequence>
	</xsd:group>
	
	<xsd:complexType name="breakType">
		<xsd:attribute name="time" type="xsd:string" use="required"/>
	</xsd:complexType>

	<xsd:complexType name="audioType">
		<xsd:attribute name="src" type="xsd:string" use="required"/>
	</xsd:complexType>

	<xsd:simpleType name="statusType">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="OK"/>
			<xsd:enumeration value="ERROR"/>
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:simpleType name="errorCodeType">
		<xsd:annotation>
			<xsd:appinfo>
				<jxb:typesafeEnumClass>
					<jxb:typesafeEnumMember value="000" name="MOTECH_UNKNOWN_ERROR"/>
					<jxb:typesafeEnumMember value="001" name="MOTECH_MALFORMED_XML"/>
					<jxb:typesafeEnumMember value="002" name="MOTECH_INVALID_USER_ID"/>
					<jxb:typesafeEnumMember value="0000" name="IVR_UNKNOWN_ERROR"/>
					<jxb:typesafeEnumMember value="0001" name="IVR_NO_ACTION"/>
					<jxb:typesafeEnumMember value="0002" name="IVR_MALFORMED_XML"/>
					<jxb:typesafeEnumMember value="0003" name="IVR_INVALID_SOUND_FILENAME_FROMAT"/>
					<jxb:typesafeEnumMember value="0004" name="IVR_INVALID_URL_FORMAT"/>
					<jxb:typesafeEnumMember value="0005" name="IVR_UNSUPPORTED_REPORT_TYPE"/>
					<jxb:typesafeEnumMember value="0006" name="IVR_INVALID_API_ID"/>
					<jxb:typesafeEnumMember value="0007" name="IVR_INVALID_TREE"/>
					<jxb:typesafeEnumMember value="0008" name="IVR_INVALID_LANGUAGE"/>
				</jxb:typesafeEnumClass>
			</xsd:appinfo>
		</xsd:annotation>
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="000"/>
			<xsd:enumeration value="001"/>
			<xsd:enumeration value="002"/>
			<xsd:enumeration value="0000"/>
			<xsd:enumeration value="0001"/>
			<xsd:enumeration value="0002"/>
			<xsd:enumeration value="0003"/>
			<xsd:enumeration value="0004"/>
			<xsd:enumeration value="0005"/>
			<xsd:enumeration value="0006"/>
			<xsd:enumeration value="0007"/>
			<xsd:enumeration value="0008"/>
		</xsd:restriction>
	</xsd:simpleType>


	<!-- 

		IVR Config Type - common group of elements used above

	-->
	<xsd:group name="ivrConfigGroup">
		<xsd:sequence>
			<xsd:element name="vxml">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="prompt">
							<xsd:complexType>
								<xsd:sequence>
									<xsd:choice minOccurs="0" maxOccurs="unbounded">
										<xsd:element name="audio" type="audioType"/>
										<xsd:element name="break" type="breakType"/>
									</xsd:choice>
								</xsd:sequence>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="Language" type="xsd:string"/>
			<xsd:element name="Tree" type="xsd:string"/>
			<xsd:element name="ReportUrl" type="xsd:anyURI"/>
			<xsd:element name="Private" type="xsd:string"/>
		</xsd:sequence>
	</xsd:group>

</xsd:schema>


{'fraction_non_alphanumeric': 0.16973224679860302, 'fraction_numerical': 0.035157159487776486, 'mean_word_length': 3.807218802462227, 'pattern_counts': {'":': 0, '<': 477, '<?xml version=': 4, '>': 477, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 20}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '670133', 'n_tokens_mistral': 7923, 'n_tokens_neox': 5842, 'n_words': 945}