<?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="PolicyRulesService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
      <EntityContainer Name="EntityContainer">
        <EntitySet Name="PolicyRuleadmin" EntityType="PolicyRulesService.PolicyRuleadmin"/>
        <EntitySet Name="ExceptionModal" EntityType="PolicyRulesService.ExceptionModal"/>
        <ActionImport Name="createPolicyRule" Action="PolicyRulesService.createPolicyRule" EntitySet="PolicyRuleadmin"/>
        <ActionImport Name="updatePolicy" Action="PolicyRulesService.updatePolicy" EntitySet="PolicyRuleadmin"/>
        <ActionImport Name="deletePolicy" Action="PolicyRulesService.deletePolicy"/>
        <ActionImport Name="getPolicyByTenant" Action="PolicyRulesService.getPolicyByTenant" EntitySet="PolicyRuleadmin"/>
        <ActionImport Name="getActivePolicies" Action="PolicyRulesService.getActivePolicies" EntitySet="PolicyRuleadmin"/>
        <ActionImport Name="validatePolicyRules" Action="PolicyRulesService.validatePolicyRules"/>
        <ActionImport Name="createException" Action="PolicyRulesService.createException" EntitySet="ExceptionModal"/>
        <ActionImport Name="updateException" Action="PolicyRulesService.updateException" EntitySet="ExceptionModal"/>
        <ActionImport Name="deleteException" Action="PolicyRulesService.deleteException"/>
        <ActionImport Name="getExceptionsByVisibility" Action="PolicyRulesService.getExceptionsByVisibility" EntitySet="ExceptionModal"/>
        <ActionImport Name="getAllExceptions" Action="PolicyRulesService.getAllExceptions" EntitySet="ExceptionModal"/>
      </EntityContainer>
      <EntityType Name="PolicyRuleadmin">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="tenant_id" Type="Edm.Guid" Nullable="false"/>
        <Property Name="name" Type="Edm.String" Nullable="false"/>
        <Property Name="description" Type="Edm.String" MaxLength="500"/>
        <Property Name="event" Type="Edm.String" MaxLength="50"/>
        <Property Name="policy" Type="Edm.String"/>
        <Property Name="status" Type="Edm.String" Nullable="false" DefaultValue="ACTIVE"/>
        <Property Name="applicablefor" Type="Edm.String" Nullable="false"/>
        <Property Name="appliesTo" Type="Edm.String"/>
        <Property Name="priority" Type="Edm.Int32"/>
        <Property Name="whenLogic" Type="Edm.String" MaxLength="10"/>
        <Property Name="when" Type="Edm.String"/>
        <Property Name="validations" Type="Edm.String"/>
        <Property Name="segmentTypes" Type="Edm.String"/>
        <Property Name="exceptions" Type="Edm.String"/>
        <Property Name="rules" Type="Edm.String" Nullable="false"/>
        <Property Name="created_at" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="updated_at" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="createdBy_ID" Type="Edm.Guid"/>
        <Property Name="updatedBy_ID" Type="Edm.Guid"/>
      </EntityType>
      <EntityType Name="ExceptionModal">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="exceptionCode" Type="Edm.String" MaxLength="50" Nullable="false"/>
        <Property Name="exceptionLevel" Type="Edm.Int32" Nullable="false"/>
        <Property Name="message" Type="Edm.String" MaxLength="500" Nullable="false"/>
        <Property Name="visibility" Type="Edm.String" Nullable="false"/>
        <Property Name="created_at" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="updated_at" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="createdBy_ID" Type="Edm.Guid"/>
        <Property Name="updatedBy_ID" Type="Edm.Guid"/>
      </EntityType>
      <ComplexType Name="ap_PolicyRulesService_createPolicyRule_policy">
        <Property Name="tenant_id" Type="Edm.String"/>
        <Property Name="name" Type="Edm.String"/>
        <Property Name="description" Type="Edm.String"/>
        <Property Name="event" Type="Edm.String"/>
        <Property Name="policy" Type="Edm.String"/>
        <Property Name="status" Type="Edm.String"/>
        <Property Name="applicableFor" Type="Collection(Edm.String)" Nullable="false"/>
        <Property Name="appliesTo" Type="Collection(Edm.String)" Nullable="false"/>
        <Property Name="priority" Type="Edm.Int32"/>
        <Property Name="whenLogic" Type="Edm.String"/>
        <Property Name="when" Type="Collection(PolicyRulesService.ConditionObject)" Nullable="false"/>
        <Property Name="validations" Type="Collection(PolicyRulesService.ValidationObject)" Nullable="false"/>
        <Property Name="segmentTypes" Type="Collection(Edm.String)" Nullable="false"/>
        <Property Name="exceptions" Type="Collection(PolicyRulesService.ExceptionObject)" Nullable="false"/>
        <Property Name="rules" Type="Edm.String"/>
      </ComplexType>
      <ComplexType Name="ConditionObject">
        <Property Name="field" Type="Edm.String"/>
        <Property Name="operator" Type="Edm.String"/>
        <Property Name="value" Type="Edm.String"/>
        <Property Name="logic" Type="Edm.String"/>
      </ComplexType>
      <ComplexType Name="ValidationObject">
        <Property Name="field" Type="Edm.String"/>
        <Property Name="rule" Type="Edm.String"/>
        <Property Name="message" Type="Edm.String"/>
      </ComplexType>
      <ComplexType Name="ExceptionObject">
        <Property Name="id" Type="Edm.String"/>
        <Property Name="exceptionCode" Type="Edm.String"/>
        <Property Name="exceptionLevel" Type="Edm.Int32"/>
        <Property Name="message" Type="Edm.String"/>
        <Property Name="visibility" Type="Collection(Edm.String)" Nullable="false"/>
      </ComplexType>
      <ComplexType Name="ap_PolicyRulesService_updatePolicy_policy">
        <Property Name="name" Type="Edm.String"/>
        <Property Name="description" Type="Edm.String"/>
        <Property Name="event" Type="Edm.String"/>
        <Property Name="policy" Type="Edm.String"/>
        <Property Name="status" Type="Edm.String"/>
        <Property Name="applicableFor" Type="Collection(Edm.String)" Nullable="false"/>
        <Property Name="appliesTo" Type="Collection(Edm.String)" Nullable="false"/>
        <Property Name="priority" Type="Edm.Int32"/>
        <Property Name="whenLogic" Type="Edm.String"/>
        <Property Name="when" Type="Collection(PolicyRulesService.ConditionObject)" Nullable="false"/>
        <Property Name="validations" Type="Collection(PolicyRulesService.ValidationObject)" Nullable="false"/>
        <Property Name="segmentTypes" Type="Collection(Edm.String)" Nullable="false"/>
        <Property Name="exceptions" Type="Collection(PolicyRulesService.ExceptionObject)" Nullable="false"/>
        <Property Name="rules" Type="Edm.String"/>
      </ComplexType>
      <ComplexType Name="return_PolicyRulesService_validatePolicyRules">
        <Property Name="isValid" Type="Edm.Boolean"/>
        <Property Name="warnings" Type="Collection(Edm.String)" Nullable="false"/>
        <Property Name="errors" Type="Collection(Edm.String)" Nullable="false"/>
      </ComplexType>
      <ComplexType Name="ap_PolicyRulesService_createException_exception">
        <Property Name="exceptionCode" Type="Edm.String"/>
        <Property Name="exceptionLevel" Type="Edm.Int32"/>
        <Property Name="message" Type="Edm.String"/>
        <Property Name="visibility" Type="Collection(Edm.String)" Nullable="false"/>
      </ComplexType>
      <ComplexType Name="ap_PolicyRulesService_updateException_exception">
        <Property Name="exceptionCode" Type="Edm.String"/>
        <Property Name="exceptionLevel" Type="Edm.Int32"/>
        <Property Name="message" Type="Edm.String"/>
        <Property Name="visibility" Type="Collection(Edm.String)" Nullable="false"/>
      </ComplexType>
      <Action Name="createPolicyRule" IsBound="false">
        <Parameter Name="policy" Type="PolicyRulesService.ap_PolicyRulesService_createPolicyRule_policy"/>
        <ReturnType Type="PolicyRulesService.PolicyRuleadmin"/>
      </Action>
      <Action Name="updatePolicy" IsBound="false">
        <Parameter Name="id" Type="Edm.String"/>
        <Parameter Name="policy" Type="PolicyRulesService.ap_PolicyRulesService_updatePolicy_policy"/>
        <ReturnType Type="PolicyRulesService.PolicyRuleadmin"/>
      </Action>
      <Action Name="deletePolicy" IsBound="false">
        <Parameter Name="id" Type="Edm.String"/>
        <ReturnType Type="Edm.Boolean"/>
      </Action>
      <Action Name="getPolicyByTenant" IsBound="false">
        <Parameter Name="tenant_id" Type="Edm.String"/>
        <ReturnType Type="Collection(PolicyRulesService.PolicyRuleadmin)"/>
      </Action>
      <Action Name="getActivePolicies" IsBound="false">
        <ReturnType Type="Collection(PolicyRulesService.PolicyRuleadmin)"/>
      </Action>
      <Action Name="validatePolicyRules" IsBound="false">
        <Parameter Name="policyId" Type="Edm.String"/>
        <Parameter Name="requestData" Type="Edm.String"/>
        <ReturnType Type="PolicyRulesService.return_PolicyRulesService_validatePolicyRules"/>
      </Action>
      <Action Name="createException" IsBound="false">
        <Parameter Name="exception" Type="PolicyRulesService.ap_PolicyRulesService_createException_exception"/>
        <ReturnType Type="PolicyRulesService.ExceptionModal"/>
      </Action>
      <Action Name="updateException" IsBound="false">
        <Parameter Name="id" Type="Edm.String"/>
        <Parameter Name="exception" Type="PolicyRulesService.ap_PolicyRulesService_updateException_exception"/>
        <ReturnType Type="PolicyRulesService.ExceptionModal"/>
      </Action>
      <Action Name="deleteException" IsBound="false">
        <Parameter Name="id" Type="Edm.String"/>
        <ReturnType Type="Edm.Boolean"/>
      </Action>
      <Action Name="getExceptionsByVisibility" IsBound="false">
        <Parameter Name="visibility" Type="Edm.String"/>
        <ReturnType Type="Collection(PolicyRulesService.ExceptionModal)"/>
      </Action>
      <Action Name="getAllExceptions" IsBound="false">
        <ReturnType Type="Collection(PolicyRulesService.ExceptionModal)"/>
      </Action>
      <Annotations Target="PolicyRulesService.PolicyRuleadmin/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="PolicyRulesService.PolicyRuleadmin/created_at">
        <Annotation Term="Core.Computed" Bool="true"/>
      </Annotations>
      <Annotations Target="PolicyRulesService.PolicyRuleadmin/updated_at">
        <Annotation Term="Core.Computed" Bool="true"/>
      </Annotations>
      <Annotations Target="PolicyRulesService.ExceptionModal/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="PolicyRulesService.ExceptionModal/created_at">
        <Annotation Term="Core.Computed" Bool="true"/>
      </Annotations>
      <Annotations Target="PolicyRulesService.ExceptionModal/updated_at">
        <Annotation Term="Core.Computed" Bool="true"/>
      </Annotations>
    </Schema>
  </edmx:DataServices>
</edmx:Edmx>