<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
  <edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Common.xml">
    <edmx:Include Alias="Common" Namespace="com.sap.vocabularies.Common.v1"/>
  </edmx:Reference>
  <edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
    <edmx:Include Alias="Core" Namespace="Org.OData.Core.V1"/>
  </edmx:Reference>
  <edmx:DataServices>
    <Schema Namespace="MessageService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
      <Annotation Term="Core.Links">
        <Collection>
          <Record>
            <PropertyValue Property="rel" String="author"/>
            <PropertyValue Property="href" String="https://cap.cloud.sap"/>
          </Record>
        </Collection>
      </Annotation>
      <EntityContainer Name="EntityContainer">
        <EntitySet Name="Messages" EntityType="MessageService.Messages"/>
        <ActionImport Name="createMessage" Action="MessageService.createMessage"/>
        <ActionImport Name="replyMessage" Action="MessageService.replyMessage"/>
        <ActionImport Name="updateMessageStatus" Action="MessageService.updateMessageStatus"/>
        <ActionImport Name="deleteMessage" Action="MessageService.deleteMessage"/>
        <ActionImport Name="getMessage" Action="MessageService.getMessage" EntitySet="Messages"/>
        <ActionImport Name="getThread" Action="MessageService.getThread" EntitySet="Messages"/>
        <ActionImport Name="getAllMessages" Action="MessageService.getAllMessages" EntitySet="Messages"/>
      </EntityContainer>
      <EntityType Name="Messages">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="whenSent" Type="Edm.Date"/>
        <Property Name="fromUser" Type="Edm.String" MaxLength="200"/>
        <Property Name="toUser" Type="Edm.String" MaxLength="200"/>
        <Property Name="subject" Type="Edm.String" MaxLength="300"/>
        <Property Name="message" Type="Edm.String" MaxLength="2000"/>
        <Property Name="application" Type="Edm.String" MaxLength="100"/>
        <Property Name="status" Type="Edm.String" MaxLength="50"/>
        <Property Name="threadId" Type="Edm.Guid"/>
        <Property Name="createdAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="updatedAt" Type="Edm.DateTimeOffset" Precision="7"/>
      </EntityType>
      <ComplexType Name="return_MessageService_createMessage">
        <Property Name="success" Type="Edm.Boolean"/>
        <Property Name="message" Type="Edm.String"/>
        <Property Name="threadId" Type="Edm.Guid"/>
      </ComplexType>
      <ComplexType Name="return_MessageService_replyMessage">
        <Property Name="success" Type="Edm.Boolean"/>
        <Property Name="message" Type="Edm.String"/>
      </ComplexType>
      <ComplexType Name="return_MessageService_updateMessageStatus">
        <Property Name="success" Type="Edm.Boolean"/>
        <Property Name="message" Type="Edm.String"/>
      </ComplexType>
      <ComplexType Name="return_MessageService_deleteMessage">
        <Property Name="success" Type="Edm.Boolean"/>
        <Property Name="message" Type="Edm.String"/>
      </ComplexType>
      <Action Name="createMessage" IsBound="false">
        <Parameter Name="whenSent" Type="Edm.Date"/>
        <Parameter Name="fromUser" Type="Edm.String"/>
        <Parameter Name="toUser" Type="Edm.String"/>
        <Parameter Name="subject" Type="Edm.String"/>
        <Parameter Name="message" Type="Edm.String"/>
        <Parameter Name="application" Type="Edm.String"/>
        <Parameter Name="status" Type="Edm.String"/>
        <ReturnType Type="MessageService.return_MessageService_createMessage"/>
      </Action>
      <Action Name="replyMessage" IsBound="false">
        <Parameter Name="threadId" Type="Edm.Guid"/>
        <Parameter Name="whenSent" Type="Edm.Date"/>
        <Parameter Name="fromUser" Type="Edm.String"/>
        <Parameter Name="toUser" Type="Edm.String"/>
        <Parameter Name="subject" Type="Edm.String"/>
        <Parameter Name="message" Type="Edm.String"/>
        <Parameter Name="application" Type="Edm.String"/>
        <Parameter Name="status" Type="Edm.String"/>
        <ReturnType Type="MessageService.return_MessageService_replyMessage"/>
      </Action>
      <Action Name="updateMessageStatus" IsBound="false">
        <Parameter Name="ID" Type="Edm.String"/>
        <Parameter Name="status" Type="Edm.String"/>
        <ReturnType Type="MessageService.return_MessageService_updateMessageStatus"/>
      </Action>
      <Action Name="deleteMessage" IsBound="false">
        <Parameter Name="ID" Type="Edm.String"/>
        <ReturnType Type="MessageService.return_MessageService_deleteMessage"/>
      </Action>
      <Action Name="getMessage" IsBound="false">
        <Parameter Name="ID" Type="Edm.String"/>
        <ReturnType Type="MessageService.Messages"/>
      </Action>
      <Action Name="getThread" IsBound="false">
        <Parameter Name="threadId" Type="Edm.Guid"/>
        <ReturnType Type="Collection(MessageService.Messages)"/>
      </Action>
      <Action Name="getAllMessages" IsBound="false">
        <ReturnType Type="Collection(MessageService.Messages)"/>
      </Action>
      <Annotations Target="MessageService.Messages/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="MessageService.Messages/createdAt">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
    </Schema>
  </edmx:DataServices>
</edmx:Edmx>