<?xml version="1.0" encoding="UTF-8"?>
<!---->
<!--################################################################################       -->
<!--# Redfish Schema:  Battery v1.2.0                                                      -->
<!--#                                                                                      -->
<!--# For a detailed change log, see the README file contained in the DSP8010 bundle,      -->
<!--# available at http://www.dmtf.org/standards/redfish                                   -->
<!--# Copyright 2014-2022 DMTF.                                                            -->
<!--# For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright -->
<!--################################################################################       -->
<!---->
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">

  <edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Core.V1.xml">
    <edmx:Include Namespace="Org.OData.Core.V1" Alias="OData"/>
  </edmx:Reference>
  <edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Capabilities.V1.xml">
    <edmx:Include Namespace="Org.OData.Capabilities.V1" Alias="Capabilities"/>
  </edmx:Reference>
  <edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Measures.V1.xml">
    <edmx:Include Namespace="Org.OData.Measures.V1" Alias="Measures"/>
  </edmx:Reference>
  <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/RedfishExtensions_v1.xml">
    <edmx:Include Namespace="RedfishExtensions.v1_0_0" Alias="Redfish"/>
    <edmx:Include Namespace="Validation.v1_0_0" Alias="Validation"/>
  </edmx:Reference>
  <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Resource_v1.xml">
    <edmx:Include Namespace="Resource"/>
    <edmx:Include Namespace="Resource.v1_0_0"/>
  </edmx:Reference>
  <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Assembly_v1.xml">
    <edmx:Include Namespace="Assembly"/>
  </edmx:Reference>
  <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/BatteryMetrics_v1.xml">
    <edmx:Include Namespace="BatteryMetrics"/>
  </edmx:Reference>
  <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Sensor_v1.xml">
    <edmx:Include Namespace="Sensor"/>
  </edmx:Reference>
  <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/StorageController_v1.xml">
    <edmx:Include Namespace="StorageController"/>
  </edmx:Reference>
  <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Memory_v1.xml">
    <edmx:Include Namespace="Memory"/>
  </edmx:Reference>

  <edmx:DataServices>

    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Battery">
      <Annotation Term="Redfish.OwningEntity" String="DMTF"/>

      <EntityType Name="Battery" BaseType="Resource.v1_0_0.Resource" Abstract="true">
        <Annotation Term="OData.Description" String="The Battery schema describes a battery unit, such as those used to provide systems with power during a power loss event."/>
        <Annotation Term="OData.LongDescription" String="This resource shall represent a battery for a Redfish implementation."/>
        <Annotation Term="Capabilities.InsertRestrictions">
          <Record>
            <PropertyValue Property="Insertable" Bool="false"/>
          </Record>
        </Annotation>
        <Annotation Term="Capabilities.UpdateRestrictions">
          <Record>
            <PropertyValue Property="Updatable" Bool="true"/>
          </Record>
        </Annotation>
        <Annotation Term="Capabilities.DeleteRestrictions">
          <Record>
            <PropertyValue Property="Deletable" Bool="false"/>
          </Record>
        </Annotation>
        <Annotation Term="Redfish.Uris">
          <Collection>
            <String>/redfish/v1/Chassis/{ChassisId}/PowerSubsystem/Batteries/{BatteryId}</String>
          </Collection>
        </Annotation>
      </EntityType>

      <Action Name="Reset" IsBound="true">
        <Annotation Term="OData.Description" String="This action resets the battery."/>
        <Annotation Term="OData.LongDescription" String="This action shall reset the battery."/>
        <Parameter Name="Battery" Type="Battery.v1_0_0.Actions"/>
        <Parameter Name="ResetType" Type="Resource.ResetType">
          <Annotation Term="OData.Description" String="The type of reset."/>
          <Annotation Term="OData.LongDescription" String="This parameter shall contain the type of reset.  The service can accept a request without the parameter and shall perform a `GracefulRestart`."/>
        </Parameter>
      </Action>

      <Action Name="SelfTest" IsBound="true">
        <Annotation Term="OData.Description" String="This action performs a self-test of the battery."/>
        <Annotation Term="OData.LongDescription" String="This action shall perform a self-test of the battery."/>
        <Parameter Name="Battery" Type="Battery.v1_0_0.Actions"/>
      </Action>

      <Action Name="Calibrate" IsBound="true">
        <Annotation Term="OData.Description" String="This action performs a self-calibration, or learn cycle, of the battery."/>
        <Annotation Term="OData.LongDescription" String="This action shall perform a self-calibration, or learn cycle, of the battery."/>
        <Parameter Name="Battery" Type="Battery.v1_0_0.Actions"/>
      </Action>
    </Schema>

    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Battery.v1_0_0">
      <Annotation Term="Redfish.OwningEntity" String="DMTF"/>
      <Annotation Term="Redfish.Release" String="2021.2"/>

      <EntityType Name="Battery" BaseType="Battery.Battery">
        <Property Name="Manufacturer" Type="Edm.String">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The manufacturer of this battery."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the name of the organization responsible for producing the battery.  This organization may be the entity from whom the battery is purchased, but this is not necessarily true."/>
        </Property>
        <Property Name="Model" Type="Edm.String">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The model number for this battery."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the model information as defined by the manufacturer for this battery."/>
        </Property>
        <Property Name="FirmwareVersion" Type="Edm.String">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The firmware version for this battery."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the firmware version as defined by the manufacturer for this battery."/>
        </Property>
        <Property Name="Version" Type="Edm.String">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The hardware version of this battery."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the hardware version of this battery as determined by the vendor or supplier."/>
        </Property>
        <Property Name="ProductionDate" Type="Edm.DateTimeOffset">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The production or manufacturing date of this battery."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the date of production or manufacture for this battery."/>
        </Property>
        <Property Name="SerialNumber" Type="Edm.String">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The serial number for this battery."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the serial number as defined by the manufacturer for this battery."/>
        </Property>
        <Property Name="PartNumber" Type="Edm.String">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The part number for this battery."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the part number as defined by the manufacturer for this battery."/>
        </Property>
        <Property Name="SparePartNumber" Type="Edm.String">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The spare part number for this battery."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the spare or replacement part number as defined by the manufacturer for this battery."/>
        </Property>
        <Property Name="Status" Type="Resource.Status" Nullable="false">
          <Annotation Term="OData.Description" String="The status and health of the resource and its subordinate or dependent resources."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain any status or health properties of the resource."/>
        </Property>
        <Property Name="Location" Type="Resource.Location" Nullable="false">
          <Annotation Term="OData.Description" String="The location of the battery."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain location information of this battery."/>
        </Property>
        <Property Name="LocationIndicatorActive" Type="Edm.Boolean">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/ReadWrite"/>
          <Annotation Term="OData.Description" String="An indicator allowing an operator to physically locate this resource."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the state of the indicator used to physically identify or locate this resource."/>
        </Property>
        <Property Name="HotPluggable" Type="Edm.Boolean">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="An indication of whether this device can be inserted or removed while the equipment is in operation."/>
          <Annotation Term="OData.LongDescription" String="This property shall indicate whether the device can be inserted or removed while the underlying equipment otherwise remains in its current operational state.  Devices indicated as hot-pluggable shall allow the device to become operable without altering the operational state of the underlying equipment.  Devices that cannot be inserted or removed from equipment in operation, or devices that cannot become operable without affecting the operational state of that equipment, shall be indicated as not hot-pluggable."/>
        </Property>
        <Property Name="CapacityRatedWattHours" Type="Edm.Decimal">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The rated maximum capacity of this battery in watt-hours."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the rated maximum capacity of this battery in watt-hours."/>
          <Annotation Term="Measures.Unit" String="W.h"/>
          <Annotation Term="Validation.Minimum" Int="0"/>
        </Property>
        <Property Name="CapacityActualWattHours" Type="Edm.Decimal">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The actual maximum capacity of this battery in watt-hours."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the actual maximum capacity of this battery in watt-hours."/>
          <Annotation Term="Measures.Unit" String="W.h"/>
          <Annotation Term="Validation.Minimum" Int="0"/>
        </Property>
        <Property Name="CapacityRatedAmpHours" Type="Edm.Decimal">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The rated maximum capacity of this battery in amp-hours."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the rated maximum capacity of this battery in amp-hours."/>
          <Annotation Term="Measures.Unit" String="A.h"/>
          <Annotation Term="Validation.Minimum" Int="0"/>
        </Property>
        <Property Name="CapacityActualAmpHours" Type="Edm.Decimal">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The actual maximum capacity of this battery in amp-hours."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the actual maximum capacity of this battery in amp-hours."/>
          <Annotation Term="Measures.Unit" String="A.h"/>
          <Annotation Term="Validation.Minimum" Int="0"/>
        </Property>
        <Property Name="MaxDischargeRateAmps" Type="Edm.Decimal">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The maximum discharge rate of this battery in amps."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the maximum discharge rate of this battery in amps."/>
          <Annotation Term="Measures.Unit" String="A"/>
          <Annotation Term="Validation.Minimum" Int="0"/>
        </Property>
        <Property Name="MaxChargeRateAmps" Type="Edm.Decimal">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The maximum charge rate of this battery in amps."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the maximum charge rate of this battery in amps."/>
          <Annotation Term="Measures.Unit" String="A"/>
          <Annotation Term="Validation.Minimum" Int="0"/>
        </Property>
        <Property Name="MaxChargeVoltage" Type="Edm.Decimal">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The maximum charge voltage of this battery."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the maximum charge voltage of this battery."/>
          <Annotation Term="Measures.Unit" String="V"/>
          <Annotation Term="Validation.Minimum" Int="0"/>
        </Property>
        <Property Name="ChargeState" Type="Battery.v1_0_0.ChargeState">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The charge state of this battery."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the charge state of this battery."/>
        </Property>
        <NavigationProperty Name="StateOfHealthPercent" Type="Sensor.Sensor" Nullable="false">
          <Annotation Term="OData.Description" String="The state of health (percent) of this battery."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the state of health, in percent units, of this battery.  The value of the DataSourceUri property, if present, shall reference a resource of type Sensor with the ReadingType property containing the value `Percent`."/>
          <Annotation Term="Redfish.ExcerptCopy"/>
        </NavigationProperty>
        <NavigationProperty Name="Assembly" Type="Assembly.Assembly" ContainsTarget="true" Nullable="false">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The link to the assembly associated with this battery."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain a link to a resource of type Assembly."/>
          <Annotation Term="OData.AutoExpandReferences"/>
        </NavigationProperty>
        <NavigationProperty Name="Metrics" Type="BatteryMetrics.BatteryMetrics" ContainsTarget="true" Nullable="false">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The link to the battery metrics resource associated with this battery."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain a link to a resource of type BatteryMetrics."/>
          <Annotation Term="OData.AutoExpandReferences"/>
        </NavigationProperty>
        <Property Name="Actions" Type="Battery.v1_0_0.Actions" Nullable="false">
          <Annotation Term="OData.Description" String="The available actions for this resource."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the available actions for this resource."/>
        </Property>
      </EntityType>

      <ComplexType Name="Actions">
        <Annotation Term="OData.AdditionalProperties" Bool="false"/>
        <Annotation Term="OData.Description" String="The available actions for this resource."/>
        <Annotation Term="OData.LongDescription" String="This type shall contain the available actions for this resource."/>
        <Property Name="Oem" Type="Battery.v1_0_0.OemActions" Nullable="false">
          <Annotation Term="OData.Description" String="The available OEM-specific actions for this resource."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the available OEM-specific actions for this resource."/>
        </Property>
      </ComplexType>

      <ComplexType Name="OemActions">
        <Annotation Term="OData.AdditionalProperties" Bool="true"/>
        <Annotation Term="OData.Description" String="The available OEM-specific actions for this resource."/>
        <Annotation Term="OData.LongDescription" String="This type shall contain the available OEM-specific actions for this resource."/>
      </ComplexType>

      <EnumType Name="ChargeState">
        <Member Name="Idle">
          <Annotation Term="OData.Description" String="The battery is idle."/>
          <Annotation Term="OData.LongDescription" String="This value shall indicate the battery is idle and energy is not entering or leaving the battery.  Small amounts of energy may enter or leave the battery while in this state if the battery is regulating itself."/>
        </Member>
        <Member Name="Charging">
          <Annotation Term="OData.Description" String="The battery is charging."/>
          <Annotation Term="OData.LongDescription" String="This value shall indicate the battery is charging and energy is entering the battery."/>
        </Member>
        <Member Name="Discharging">
          <Annotation Term="OData.Description" String="The battery is discharging."/>
          <Annotation Term="OData.LongDescription" String="This value shall indicate the battery is discharging and energy is leaving the battery."/>
        </Member>
      </EnumType>
    </Schema>

    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Battery.v1_0_1">
      <Annotation Term="Redfish.OwningEntity" String="DMTF"/>
      <Annotation Term="OData.Description" String="This version was created to update descriptions to tie excerpt property definitions to a specific type of Sensor or Control."/>
      <EntityType Name="Battery" BaseType="Battery.v1_0_0.Battery"/>
    </Schema>

    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Battery.v1_1_0">
      <Annotation Term="Redfish.OwningEntity" String="DMTF"/>
      <Annotation Term="Redfish.Release" String="2021.2"/>

      <EntityType Name="Battery" BaseType="Battery.v1_0_1.Battery">
        <Property Name="Links" Type="Battery.v1_1_0.Links" Nullable="false">
          <Annotation Term="OData.Description" String="The links to other resources that are related to this resource."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain links to resources that are related to but are not contained by, or subordinate to, this resource."/>
        </Property>
      </EntityType>

      <ComplexType Name="Links" BaseType="Resource.Links">
        <Annotation Term="OData.Description" String="The links to other resources that are related to this resource."/>
        <Annotation Term="OData.LongDescription" String="This Redfish Specification-described type shall contain links to resources that are related to but are not contained by, or subordinate to, this resource."/>
        <NavigationProperty Name="Memory" Type="Collection(Memory.Memory)">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="An array of links to the memory devices to which this battery provides power during a power loss event."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain an array of links to resources of type Memory that represent the memory devices to which this battery provides power during a power loss event, such as battery-backed NVDIMMs.  This property shall not be present if the battery powers the containing chassis as a whole rather than individual components in a chassis."/>
          <Annotation Term="OData.AutoExpandReferences"/>
        </NavigationProperty>
        <NavigationProperty Name="StorageControllers" Type="Collection(StorageController.StorageController)">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="An array of links to the storage controllers to which this battery provides power during a power loss event."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain an array of links to resources of type StorageController that represent the storage controllers to which this battery provides power during a power loss event, such as battery-backed RAID controllers.  This property shall not be present if the battery powers the containing chassis as a whole rather than individual components in a chassis."/>
          <Annotation Term="OData.AutoExpandReferences"/>
        </NavigationProperty>
      </ComplexType>
    </Schema>

    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Battery.v1_2_0">
      <Annotation Term="Redfish.OwningEntity" String="DMTF"/>
      <Annotation Term="Redfish.Release" String="2022.2"/>

      <EntityType Name="Battery" BaseType="Battery.v1_1_0.Battery">
        <Property Name="Replaceable" Type="Edm.Boolean">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="An indication of whether this component can be independently replaced as allowed by the vendor's replacement policy."/>
          <Annotation Term="OData.LongDescription" String="This property shall indicate whether this component can be independently replaced as allowed by the vendor's replacement policy.  A value of `false` indicates the component needs to be replaced by policy, as part of another component.  If the `LocationType` property of this component contains `Embedded`, this property shall contain `false`."/>
        </Property>
      </EntityType>
    </Schema>

  </edmx:DataServices>
</edmx:Edmx>
