<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
  <edmx:DataServices>
    <Schema Namespace="DataScope.Select.Api.Quota" xmlns="http://docs.oasis-open.org/odata/ns/edm">
      <ComplexType Name="Quota">
        <Property Name="Count" Type="Edm.Int32" Nullable="false" />
        <Property Name="Limit" Type="Edm.Int32" />
        <Property Name="Category" Type="DataScope.Select.Api.Quota.QuotaCategory" />
      </ComplexType>
      <ComplexType Name="QuotaRecord">
        <Property Name="AssetClass" Type="Edm.String" />
        <Property Name="AuthorizedValue" Type="Edm.String" />
        <Property Name="AuthorizationDate" Type="Edm.DateTimeOffset" Nullable="false" />
        <Property Name="AuthorizationDescription" Type="Edm.String" />
        <Property Name="AuthorizationUserId" Type="Edm.Int32" Nullable="false" />
      </ComplexType>
      <ComplexType Name="QuotaCategory">
        <Property Name="Code" Type="Edm.String" />
        <Property Name="Name" Type="Edm.String" />
      </ComplexType>
      <Function Name="GetQuotaInformation">
        <ReturnType Type="Collection(DataScope.Select.Api.Quota.Quota)" />
      </Function>
      <Function Name="GetAuthorizedRicList">
        <Parameter Name="CategoryCode" Type="Edm.String" Unicode="false" />
        <ReturnType Type="Collection(DataScope.Select.Api.Quota.QuotaRecord)" />
      </Function>
      <EntityContainer Name="Quota">
        <FunctionImport Name="GetQuotaInformation" Function="DataScope.Select.Api.Quota.GetQuotaInformation" IncludeInServiceDocument="true">
          <Annotation Term="Org.OData.Core.V1.Description" String="Returns the quota summary for the logged in user. Quota limitations apply at the client level. All the users pertaining to a client have the same quota restrictions." />
          <Annotation Term="Org.OData.Core.V1.LongDescription" String="" />
        </FunctionImport>
        <FunctionImport Name="GetAuthorizedRicList" Function="DataScope.Select.Api.Quota.GetAuthorizedRicList" IncludeInServiceDocument="true">
          <Annotation Term="Org.OData.Core.V1.Description" String="Returns the AuthorizedRicList that the user is authorized to use." />
          <Annotation Term="Org.OData.Core.V1.LongDescription" String="If the quota service sees a new RIC it gets added to the authorized list unless the cumulative quota has been reached for that asset class" />
        </FunctionImport>
      </EntityContainer>
    </Schema>
  </edmx:DataServices>
</edmx:Edmx>