<?xml version="1.0" encoding="UTF-8"?>
<!--
   XML data type definitions for the RESTful Network API for Bot Management
   Version: 1.0 (1.0)
   Date: 29 May 2018
   
   FILE INFORMATION 
   
      OMA Permanent Document 
         File: OMA-SUP-XSD_rest_netapi_botManagement-V1_0-20180529-C
         Type: Text - Schema Description
   
   Public Reachable Information 
      Path: http://www.openmobilealliance.org/tech/profiles 
      Name: rest_netapi_botManagement-v1_0.xsd 
   
   NORMATIVE INFORMATION
   
   Information about this file can be found in the latest revision of the specification
 
       OMA-TS-REST_NetAPI_BotManagement-V1_0 
       
       This is available at http://www.openmobilealliance.org/
   
      Send comments to technical-comments@mail.openmobilealliance.org
   
   CHANGE HISTORY 
   20170922 File created, see OMA-ARC-Alias-2017-0005-INP_XSD_baseline
   20171107 CR see OMA-ARC-Alias-2017-0018-CR_provide_XSD_data_types
   20171116 CR see OMA-ARC-Alias-2017-0033-CR_XSD_update
   20180216 CR see OMA-ARC-Alias-2018-0002R01-CR_XSD_major_update_due_to_new_GSMA_req
   25042018 Fixed the document name
   22052018 Incorporated OMA-ARC-Bot-2018-0008-CR_XSD_bug_fix
   29052018 Status changed to Candidate by ARC, Doc Ref # OMA-ARC-2018-0018-INP_REST_NetAPI_Bot_Management_V1_0_ERP_for_Candidate_approval


   LEGAL DISCLAIMER
   
   Copyright 2018 Open Mobile Alliance All rights reserved.

   Redistribution and use in source and binary forms, with or without
   modification, are permitted provided that the following conditions
   are met:

   1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
   2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
   3. Neither the name of the copyright holder nor the names of its
   contributors may be used to endorse or promote products derived
   from this software without specific prior written permission.

   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
   BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
   ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   POSSIBILITY OF SUCH DAMAGE.

   The above license is used as a license under copyright only.  Please
   reference the OMA IPR Policy for patent licensing terms:
   http://www.openmobilealliance.org/ipr.html
-->




<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   targetNamespace="urn:oma:xml:rest:netapi:botmanagement:1"
   xmlns:common="urn:oma:xml:rest:netapi:common:1"
   xmlns="urn:oma:xml:rest:netapi:botmanagement:1" version="1.0">

   <xsd:annotation>
      <xsd:documentation>This schema defines the XML data types for the RESTful Network API for Bot

Management.</xsd:documentation>
   </xsd:annotation>

   <xsd:import namespace="urn:oma:xml:rest:netapi:common:1"
   schemaLocation="http://www.openmobilealliance.org/tech/profiles/rest_netapi_common-v1_0.xsd" />




   <!-- ============================================ -->
   <!--    Bot Mgmt Control Data type definitions     -->
   <!-- ============================================ -->

  
 <xsd:element name="empty" type="Empty"/>

   <!-- An empty (dummy) complex type in this version used in POST body -->
   <xsd:complexType name="Empty"/>


   <!-- =================================================== -->
   <!--  Subscription & Notification Data type definitions  -->
   <!-- =================================================== -->


   <xsd:element name="botSubscriptionList" type="BotSubscriptionList" />

   <xsd:complexType name="BotSubscriptionList">
      <xsd:sequence>
       <xsd:element name="subscription" type="BotSubscription" maxOccurs="unbounded" minOccurs="0" />
       <xsd:element name="resourceURL" type="xsd:anyURI" maxOccurs="1" minOccurs="1"/>
      </xsd:sequence>
   </xsd:complexType>


   <xsd:element name="botSubscription" type="BotSubscription" />

   <xsd:complexType name="BotSubscription">
      <xsd:sequence>
          <xsd:element name="callbackReference" type="common:CallbackReference" maxOccurs="1" minOccurs="1" 

/>
          <xsd:element name="duration" type="xsd:unsignedInt" maxOccurs="1" minOccurs="0" />
          <xsd:element name="listId" type="xsd:anyURI" maxOccurs="1" minOccurs="0" />
          <xsd:element name="clientCorrelator" type="xsd:string" maxOccurs="1" minOccurs="0" />
          <xsd:element name="resourceURL" type="xsd:anyURI" maxOccurs="1" minOccurs="0" />
      </xsd:sequence>
   </xsd:complexType>


   <xsd:complexType name="SpamReportInfo">
      <xsd:sequence>
         <xsd:element name="userId" type="xsd:anyURI" maxOccurs="1" minOccurs="1" />
         <xsd:element name="chatbotId" type="xsd:anyURI" maxOccurs="1" minOccurs="1" />
         <xsd:element name="messageId" type="xsd:string" maxOccurs="10" minOccurs="0" />
      </xsd:sequence>
   </xsd:complexType>


   <xsd:element name="spamReportNotification" type="SpamReportNotification" />

   <xsd:complexType name="SpamReportNotification">
      <xsd:sequence>
         <xsd:element name="callbackData" type="xsd:string" maxOccurs="1" minOccurs="0" />
         <xsd:element name="spamReportInfo" type="SpamReportInfo" maxOccurs="1" minOccurs="1" />
         <xsd:element name="link" type="common:Link" maxOccurs="unbounded" minOccurs="0" />
      </xsd:sequence>
   </xsd:complexType>


</xsd:schema>