<?xml version="1.0" encoding="UTF-8"?>
<!---->
<!--################################################################################       -->
<!--# Redfish Schema:  LicenseService v1.1.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://redfish.dmtf.org/schemas/v1/RedfishExtensions_v1.xml">
    <edmx:Include Namespace="RedfishExtensions.v1_0_0" Alias="Redfish"/>
  </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/LicenseCollection_v1.xml">
    <edmx:Include Namespace="LicenseCollection"/>
  </edmx:Reference>
  <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Manager_v1.xml">
    <edmx:Include Namespace="Manager"/>
  </edmx:Reference>

  <edmx:DataServices>

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

      <EntityType Name="LicenseService" BaseType="Resource.v1_0_0.Resource" Abstract="true">
        <Annotation Term="OData.Description" String="The LicenseService schema describes the license service and the properties for the service itself with a link to the collection of licenses.  The license service also provides methods for installing licenses in a Redfish service."/>
        <Annotation Term="OData.LongDescription" String="This resource shall represent an license service and the properties that affect the service itself 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/LicenseService</String>
          </Collection>
        </Annotation>
      </EntityType>

      <Action Name="Install" IsBound="true">
        <Annotation Term="OData.Description" String="This action installs one or more licenses from a remote file."/>
        <Annotation Term="OData.LongDescription" String="This action shall install one or more licenses from a remote file.  The service may update an existing License resource.  The `Location` header in the response shall contain the URI of the new or updated License resource."/>
        <Parameter Name="LicenseService" Type="LicenseService.v1_0_0.Actions"/>
        <Parameter Name="LicenseFileURI" Type="Edm.String" Nullable="false">
          <Annotation Term="OData.Description" String="The URI of the license file to install."/>
          <Annotation Term="OData.LongDescription" String="This parameter shall contain an RFC3986-defined URI that links to a file that the license service retrieves to install license in that file.  This URI should contain a scheme that describes the transfer protocol.  If the TransferProtocol parameter is absent or not supported, and a transfer protocol is not specified by a scheme contained within this URI, the service shall use HTTP to get the file."/>
        </Parameter>
        <Parameter Name="TransferProtocol" Type="LicenseService.v1_0_0.TransferProtocolType">
          <Annotation Term="OData.Description" String="The network protocol that the license service uses to retrieve the license file located at the URI provided in LicenseFileURI.  This parameter is ignored if the URI provided in LicenseFileURI contains a scheme."/>
          <Annotation Term="OData.LongDescription" String="This parameter shall contain the network protocol that the license service shall use to retrieve the license file located at the LicenseFileURI.  Services should ignore this parameter if the URI provided in LicenseFileURI contains a scheme.  If this parameter is not provided or supported, and a transfer protocol is not specified by a scheme contained within this URI, the service shall use HTTP to retrieve the file."/>
        </Parameter>
        <Parameter Name="Username" Type="Edm.String">
          <Annotation Term="OData.Description" String="The user name to access the URI specified by the LicenseFileURI parameter."/>
          <Annotation Term="OData.LongDescription" String="This parameter shall represent the user name to access the URI specified by the LicenseFileURI parameter."/>
        </Parameter>
        <Parameter Name="Password" Type="Edm.String">
          <Annotation Term="OData.Description" String="The password to access the URI specified by the LicenseFileURI parameter."/>
          <Annotation Term="OData.LongDescription" String="This parameter shall represent the password to access the URI specified by the LicenseFileURI parameter."/>
        </Parameter>
        <Parameter Name="AuthorizedDevices" Type="Collection(Resource.Item)">
          <Annotation Term="OData.Description" String="An array of links to the devices to be authorized by the license."/>
          <Annotation Term="OData.LongDescription" String="This parameter shall contain an array of links to the devices to be authorized by the license.  Clients can provide this parameter when installing a license to apply the license to specific devices.  If not provided when installing a license, the service may determine the devices to which the license applies.  This parameter shall not be present if the AuthorizationScope property contains the value `Service`."/>
          <Annotation Term="Redfish.Revisions">
            <Collection>
              <Record>
                <PropertyValue Property="Kind" EnumMember="Redfish.RevisionKind/Added"/>
                <PropertyValue Property="Version" String="v1_1_0"/>
              </Record>
            </Collection>
          </Annotation>
        </Parameter>
        <Parameter Name="TargetServices" Type="Collection(Manager.Manager)">
          <Annotation Term="OData.Description" String="An array of links to the managers where the license will be installed."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain an array of links to resources of type Manager that represent the services where the license will be installed, such as remote Redfish services.  This parameter shall only be present in aggregators when the AuthorizationScope property contains `Service` or `Capacity`."/>
          <Annotation Term="Redfish.Revisions">
            <Collection>
              <Record>
                <PropertyValue Property="Kind" EnumMember="Redfish.RevisionKind/Added"/>
                <PropertyValue Property="Version" String="v1_1_0"/>
              </Record>
            </Collection>
          </Annotation>
        </Parameter>
      </Action>
    </Schema>

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

      <EntityType Name="LicenseService" BaseType="LicenseService.LicenseService">
        <Property Name="ServiceEnabled" Type="Edm.Boolean">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/ReadWrite"/>
          <Annotation Term="OData.Description" String="An indication of whether this service is enabled."/>
          <Annotation Term="OData.LongDescription" String="This property shall indicate whether this service is enabled."/>
        </Property>
        <Property Name="LicenseExpirationWarningDays" Type="Edm.Int64">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/ReadWrite"/>
          <Annotation Term="OData.Description" String="The number of days prior to a license expiration that a warning message is sent.  A value of zero indicates no warning message is sent."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the number of days prior to a license expiration that the service shall send the `DaysBeforeExpiration` message from the License Message Registry at least once.  A value of zero shall indicate that no warning messages are sent prior to license expiration."/>
        </Property>
        <Property Name="Actions" Type="LicenseService.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>
        <NavigationProperty Name="Licenses" Type="LicenseCollection.LicenseCollection">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The link to the collection of licenses."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain a link to a resource collection of type LicenseCollection.  When installing a license with a POST operation to this collection, the service may update an existing License resource instead of creating a new resource.  In these cases, the service shall respond with the HTTP `200 OK` status code or HTTP `204 No Content` status code and the `Location` header in the response shall contain the URI of the updated License resource."/>
          <Annotation Term="OData.AutoExpandReferences"/>
        </NavigationProperty>
      </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="LicenseService.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="TransferProtocolType">
        <Member Name="CIFS">
          <Annotation Term="OData.Description" String="Common Internet File System (CIFS)."/>
        </Member>
        <Member Name="FTP">
          <Annotation Term="OData.Description" String="File Transfer Protocol (FTP)."/>
        </Member>
        <Member Name="SFTP">
          <Annotation Term="OData.Description" String="Secure File Transfer Protocol (SFTP)."/>
        </Member>
        <Member Name="HTTP">
          <Annotation Term="OData.Description" String="Hypertext Transfer Protocol (HTTP)."/>
        </Member>
        <Member Name="HTTPS">
          <Annotation Term="OData.Description" String="Hypertext Transfer Protocol Secure (HTTPS)."/>
        </Member>
        <Member Name="SCP">
          <Annotation Term="OData.Description" String="Secure Copy Protocol (SCP)."/>
        </Member>
        <Member Name="TFTP">
          <Annotation Term="OData.Description" String="Trivial File Transfer Protocol (TFTP)."/>
        </Member>
        <Member Name="OEM">
          <Annotation Term="OData.Description" String="A manufacturer-defined protocol."/>
        </Member>
        <Member Name="NFS">
          <Annotation Term="OData.Description" String="Network File System (NFS)."/>
        </Member>
      </EnumType>
    </Schema>

    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="LicenseService.v1_1_0">
      <Annotation Term="Redfish.OwningEntity" String="DMTF"/>
      <Annotation Term="Redfish.Release" String="2022.3"/>
      <Annotation Term="OData.Description" String="This version was created to add the AuthorizedDevices and TargetServices parameters to the Install action."/>

      <EntityType Name="LicenseService" BaseType="LicenseService.v1_0_0.LicenseService"/>
    </Schema>

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