<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://water.usgs.gov/XML/AQ" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://water.usgs.gov/XML/AQ" elementFormDefault="qualified" version="1.0">
  <xsd:include schemaLocation="SensorType.xsd"/>
  <xsd:include schemaLocation="../shared/HistoryGroup.xsd"/>

  <xsd:complexType name="Sensor" abstract="false">
    <xsd:annotation>
      <xsd:documentation>
        <Definition>A specific type of data sensing device used to measure environmental parameters.</Definition>
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element ref="SensorType" />
      <xsd:element name="SerialNumber" type="xsd:string">
        <xsd:annotation>
          <xsd:documentation>
            <Definition>The serial number identifing the specific sensor.</Definition>
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="SensorName" type="xsd:string" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            <Definition>The name identifing the sensor.</Definition>
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="OfficeName" type="xsd:string" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            <Definition>The name of the office where the sensor is owned or managed.</Definition>
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="UserName" type="xsd:string" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            <Definition>The name of the person that uses and manages the sensor.</Definition>
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="PurchaseDate" type="xsd:date" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            <Definition>The date that the sensor was purchased</Definition>
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="RetireDate" type="xsd:date" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            <Definition>The date that the sensor was retired from service</Definition>
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:element name="Comment" type="xsd:string" minOccurs="0">
        <xsd:annotation>
          <xsd:documentation>
            <Definition>Comments about the sensor</Definition>
          </xsd:documentation>
        </xsd:annotation>
      </xsd:element>
      <xsd:group ref="HistoryGroup"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>
