<?xml version="1.0" encoding="UTF-8"?>
<!---->
<!--################################################################################       -->
<!--# Redfish Schema:  Job  v1.0.1-->
<!--#                                                                                      -->
<!--# For a detailed change log, see the README file contained in the DSP8010 bundle,      -->
<!--# available at http://www.dmtf.org/standards/redfish                                   -->
<!--# Copyright 2014-2018 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: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/JobCollection_v1.xml">
    <edmx:Include Namespace="JobCollection"/>
  </edmx:Reference>
  <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Schedule_v1.xml">
    <edmx:Include Namespace="Schedule"/>
  </edmx:Reference>
  <edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Message_v1.xml">
    <edmx:Include Namespace="Message"/>
  </edmx:Reference>

  <edmx:DataServices>

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

      <EntityType Name="Job" BaseType="Resource.v1_0_0.Resource" Abstract="true">
        <Annotation Term="OData.Description" String="This resource contains information about a specific Job scheduled  or being executed by a Redfish service's Job Service."/>
        <Annotation Term="OData.LongDescription" String="This resource shall be used to represent a job in 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"/>
            <Annotation Term="OData.Description" String="A jobs can be modified with an Update operation."/>
          </Record>
        </Annotation>
        <Annotation Term="Capabilities.DeleteRestrictions">
          <Record>
            <PropertyValue Property="Deletable" Bool="true"/>
            <Annotation Term="OData.Description" String="Jobs can be removed with a Delete operation."/>
          </Record>
        </Annotation>
        <Annotation Term="Redfish.Uris">
          <Collection>
            <String>/redfish/v1/JobService/Jobs/{JobId}</String>
            <String>/redfish/v1/JobService/Jobs/{JobId}/Steps/{JobId2}</String>
          </Collection>
        </Annotation>
      </EntityType>

    </Schema>

    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Job.v1_0_0">
      <Annotation Term="Redfish.OwningEntity" String="DMTF"/>
      <Annotation Term="Redfish.Release" String="2018.2"/>
      <EntityType Name="Job" BaseType="Job.Job">
        <Property Name="JobStatus" Type="Resource.Health" Nullable="false">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The status of the job."/>
          <Annotation Term="OData.LongDescription" String="The value of this property shall indicate the health status of the job."/>
        </Property>
        <Property Name="JobState" Type="Job.v1_0_0.JobState" Nullable="false">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/ReadWrite"/>
          <Annotation Term="OData.Description" String="The state of the job."/>
          <Annotation Term="OData.LongDescription" String="The value of this property shall indicate the state of the job."/>
        </Property>
        <Property Name="StartTime" Type="Edm.DateTimeOffset" Nullable="false">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The date-time stamp that the job was started or is scheduled to start."/>
          <Annotation Term="OData.LongDescription" String="The value of this property shall indicate the time the job was last started or will start as scheduled."/>
        </Property>
        <Property Name="EndTime" Type="Edm.DateTimeOffset" Nullable="true">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The date-time stamp that the job was completed."/>
          <Annotation Term="OData.LongDescription" String="The value of this property shall indicate the time the job was completed. This property shall not appear if the job is running or has otherwise not been completed. This property shall appear only if the JobState is Completed, Cancelled, or Exception."/>
        </Property>
        <Property Name="MaxExecutionTime" Type="Edm.String">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/ReadWrite"/>
          <Annotation Term="OData.Description" String="The maximum amount of time the job is allowed to execute."/>
          <Annotation Term="OData.LongDescription" String="The value shall be an ISO 8601 conformant duration describing the maximum duration the job is allowed to execute before being stopped by the service."/>
        </Property>
        <Property Name="PercentComplete" Type="Edm.Int64">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The completion percentage of this job."/>
          <Annotation Term="OData.LongDescription" String="The value of this property shall indicate the completion progress of the job, reported in percent of completion. If the job has not been started, the value shall be zero."/>
          <Annotation Term="Measures.Unit" String="%"/>
        </Property>
        <Property Name="CreatedBy" Type="Edm.String" Nullable="false">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The person or program that created this job entry."/>
          <Annotation Term="OData.LongDescription" String="The value of this property shall be the user name, software program name, or other identifier indicating the creator of this job."/>
        </Property>
        <Property Name="Schedule" Type="Schedule.Schedule" Nullable="false">
          <Annotation Term="OData.Description" String="The Schedule Settings for this Job."/>
          <Annotation Term="OData.LongDescription" String="This object shall contain information detailing the scheduling for this job and the re-occurrence frequency for future instances of this job."/>
        </Property>
        <Property Name="HidePayload" Type="Edm.Boolean" Nullable="false">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="Indicates that the contents of the Payload should be hidden from view after the Job has been created.  When set to True, the Payload object will not be returned on GET."/>
          <Annotation Term="OData.LongDescription" String="This property shall be set to True if the Payload object  shall not be returned on GET operations, and set to False if the contents can be returned normally. If this property is not specified when the Job is created, the default value shall be False."/>
        </Property>
        <Property Name="Payload" Type="Job.v1_0_0.Payload" Nullable="false">
          <Annotation Term="OData.Description" String="The HTTP and JSON payload details for this job."/>
          <Annotation Term="OData.LongDescription" String="This object shall contain information detailing the HTTP and JSON payload information for executing this job. This object shall not be included in the response if the HidePayload property is set to True."/>
        </Property>
        <NavigationProperty Name="Steps" Type="JobCollection.JobCollection" ContainsTarget="true" Nullable="false">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="A link to a collection of Steps for this Job."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the link to a collection of type Job."/>
          <Annotation Term="OData.AutoExpandReferences"/>
        </NavigationProperty>
        <Property Name="StepOrder" Type="Collection(Edm.String)" Nullable="false">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="This represents the serialized execution order of the Job Steps."/>
          <Annotation Term="OData.LongDescription" String="The value of this property shall be an array of Ids for the Job Steps in the order that they shall be executed. Each step shall be completed prior to the execution of the next step in array order. An incomplete list of steps shall be considered an invalid configuration. If this property is not present or contains an empty array it shall indicate that the step execution order is not specified and may occur in parallel or in series as determined by the service."/>
        </Property>
        <Property Name="Messages" Type="Collection(Message.Message)" Nullable="false">
          <Annotation Term="OData.Description" String="This is an array of messages associated with the job."/>
          <Annotation Term="OData.LongDescription" String="The value of this property shall be an array of messages associated with the job."/>
        </Property>
        <Property Name="Actions" Type="Job.v1_0_0.Actions" Nullable="false">
          <Annotation Term="OData.Description" String="The available actions for this resource."/>
          <Annotation Term="OData.LongDescription" String="The Actions property shall contain the available actions for this resource."/>
        </Property>
      </EntityType>

      <EnumType Name="JobState">
        <Member Name="New">
          <Annotation Term="OData.Description" String="A new job."/>
          <Annotation Term="OData.LongDescription" String="This value shall represent that this job is newly created but the operation has not yet started."/>
        </Member>
        <Member Name="Starting">
          <Annotation Term="OData.Description" String="Job is starting."/>
          <Annotation Term="OData.LongDescription" String="This value shall represent that the operation is starting."/>
        </Member>
        <Member Name="Running">
          <Annotation Term="OData.Description" String="Job is running normally."/>
          <Annotation Term="OData.LongDescription" String="This value shall represent that the operation is executing."/>
        </Member>
        <Member Name="Suspended">
          <Annotation Term="OData.Description" String="Job has been suspended."/>
          <Annotation Term="OData.LongDescription" String="This value shall represent that the operation has been suspended but is expected to restart and is therefore not complete."/>
        </Member>
        <Member Name="Interrupted">
          <Annotation Term="OData.Description" String="Job has been interrupted."/>
          <Annotation Term="OData.LongDescription" String="This value shall represent that the operation has been interrupted but is expected to restart and is therefore not complete."/>
        </Member>
        <Member Name="Pending">
          <Annotation Term="OData.Description" String="Job is pending and has not started."/>
          <Annotation Term="OData.LongDescription" String="This value shall represent that the operation is pending some condition and has not yet begun to execute."/>
        </Member>
        <Member Name="Stopping">
          <Annotation Term="OData.Description" String="Job is in the process of stopping."/>
          <Annotation Term="OData.LongDescription" String="This value shall represent that the operation is stopping but is not yet complete."/>
        </Member>
        <Member Name="Completed">
          <Annotation Term="OData.Description" String="Job has completed."/>
          <Annotation Term="OData.LongDescription" String="This value shall represent that the operation is complete and completed successfully or with warnings."/>
        </Member>
        <Member Name="Cancelled">
          <Annotation Term="OData.Description" String="Job was cancelled.."/>
          <Annotation Term="OData.LongDescription" String="This value shall represent that the operation is complete because the job was cancelled by an operator."/>
        </Member>
        <Member Name="Exception">
          <Annotation Term="OData.Description" String="Job has stopped due to an exception condition."/>
          <Annotation Term="OData.LongDescription" String="This value shall represent that the operation is complete and completed with errors."/>
        </Member>
        <Member Name="Service">
          <Annotation Term="OData.Description" String="Job is running as a service."/>
          <Annotation Term="OData.LongDescription" String="This value shall represent that the operation is now running as a service and expected to continue operation until stopped or killed."/>
        </Member>
        <Member Name="UserIntervention">
          <Annotation Term="OData.Description" String="Job is waiting for user intervention."/>
          <Annotation Term="OData.LongDescription" String="This value shall represent that the operation is waiting for a user to intervene and must be manually continued, stopped or cancelled."/>
        </Member>
        <Member Name="Continue">
          <Annotation Term="OData.Description" String="Job is to resume operation."/>
          <Annotation Term="OData.LongDescription" String="This value shall represent that the operation has been resumed from a paused condition and should return to a Running state."/>
        </Member>
      </EnumType>

      <ComplexType Name="Payload">
        <Annotation Term="OData.Description" String="The HTTP and JSON payload details for this job."/>
        <Annotation Term="OData.LongDescription" String="This object shall contain information detailing the HTTP and JSON payload information for executing this job."/>
        <Annotation Term="OData.AdditionalProperties" Bool="false"/>
        <Property Name="TargetUri" Type="Edm.String" Nullable="false">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The URI of the target for this job."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain a URI referencing a location to be used as the target for an HTTP operation."/>
          <Annotation Term="OData.IsURL"/>
        </Property>
        <Property Name="HttpOperation" Type="Edm.String" Nullable="false">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The HTTP operation to perform to execute this job."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain the HTTP operation to execute for this job."/>
        </Property>
        <Property Name="HttpHeaders" Type="Collection(Edm.String)" Nullable="false">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="This represents the HTTP headers used in the operation of this job."/>
          <Annotation Term="OData.LongDescription" String="The value of this property shall be an array of HTTP headers used in the execution of this job."/>
        </Property>
        <Property Name="JsonBody" Type="Edm.String" Nullable="false">
          <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="This property contains the JSON payload to use in the execution of this Job."/>
          <Annotation Term="OData.LongDescription" String="The value of this property shall be JSON formatted payload used for this job."/>
        </Property>

      </ComplexType>

      <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="Job.v1_0_0.OemActions" Nullable="false">
          <Annotation Term="OData.Description" String="This property contains the available OEM specific actions for this resource."/>
          <Annotation Term="OData.LongDescription" String="This property shall contain any additional OEM 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 any additional OEM actions for this resource."/>
      </ComplexType>
    </Schema>

    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Job.v1_0_1">
      <Annotation Term="Redfish.OwningEntity" String="DMTF"/>
      <Annotation Term="OData.Description" String="This version was created to add the Measures.Unit annotation to PercentComplete."/>
      <EntityType Name="Job" BaseType="Job.v1_0_0.Job"/>
    </Schema>

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