<!--
		SIF Implementation Specification (New Zealand) 3.1
		(8 December, 2020
)
		
		Infrastructure Version: v3.1
	-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sifassociation.org/datamodel/nz/3.1" targetNamespace="http://www.sifassociation.org/datamodel/nz/3.1" elementFormDefault="qualified" version="3.1 (rc 5)">
  <xs:complexType name="ScheduleAcademicDayType">
    <xs:annotation>
      <xs:appinfo>
        <sifChar />
        <privacyRating>Low</privacyRating>
      </xs:appinfo>
      <xs:documentation>
			An academic day that makes up all or part of a schedule for a
			provider. An academic day represents a structured day that
			reoccurs consistently e.g. Day A has five periods that occurs
			Mon-Wed and Day B has four periods and occurs Thurs-Fri.
		</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ScheduleAcademicDayRefId" minOccurs="0" nillable="true" type="RefIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The universally unique identifier for the data object record that is used across systems.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ScheduleAcademicDayLocalId" minOccurs="0" nillable="true" type="LocalIdType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Medium</privacyRating>
          </xs:appinfo>
          <xs:documentation>The Id of the data object record that was provided by the system that the information 
			was originally sourced from.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AcademicDayName" minOccurs="0" type="xs:normalizedString">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The name of the Academic Day.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Provider" minOccurs="0" type="ProviderObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The provider the academic day belongs to.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Schedule" minOccurs="0" type="ObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The provider schedule the academic day belongs to.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="BellSchedule" minOccurs="0" nillable="true" type="ObjectReferenceType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The bell schedule the academic day is following.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PeriodList" minOccurs="0" type="PeriodListType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>M</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>A list of periods that make up this academic day, e.g. Period 1, Period 2 etc.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType">
        <xs:annotation>
          <xs:appinfo>
            <sifChar>O</sifChar>
            <privacyRating>Low</privacyRating>
          </xs:appinfo>
          <xs:documentation>The audit details for a record, e.g. Created/Last Updated DateTime and Created/Last Updated By.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:element name="ScheduleAcademicDay" type="ScheduleAcademicDayType">
    <xs:unique name="ScheduleAcademicDayKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./ScheduleAcademicDayRefId" />
    </xs:unique>
  </xs:element>

  <xs:complexType name="ScheduleAcademicDayCollectionType">
    <xs:sequence>
      <xs:element name="ScheduleAcademicDay" type="ScheduleAcademicDayType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ScheduleAcademicDays" type="ScheduleAcademicDayCollectionType" />

</xs:schema>