<?xml version="1.0" encoding="UTF-8"?>

<!-- Schema for description of availability of a VObs service. -->
<xsd:schema targetNamespace="urn:ivoa:namespace:temporary:gtr:availability:v0.2"
	xmlns:tns="urn:ivoa:namespace:temporary:gtr:availability:v0.2"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:vr="http://www.ivoa.net/xml/VOResource/v0.10"
  elementFormDefault="qualified"
  attributeFormDefault="unqualified">
	
  <xsd:import namespace="http://www.ivoa.net/xml/VOResource/v0.10" 
 	    schemaLocation="http://www.ivoa.net/xml/VOResource/v0.10"/>

  <xsd:element name="availability" type="tns:Availability"/>
	
	<xsd:complexType name="Availability">
		<xsd:all>
			
			<!-- Indicates whether the service is currently available. -->
			<xsd:element name="available" type="xsd:boolean"/>
			
			<!-- Time since last restart of service. -->
			<xsd:element name="uptime" type="xsd:duration"/>
			
			<!-- Next scheduled down-time, if known. 
             Set nil=true if the value is unknown. -->
			<xsd:element name="validTo" type="xsd:dateTime" nillable="true"/>
			
			<!-- Contact details for the service owner or operator. -->
			<xsd:element name="contact" type="vr:Contact"/>
			
		</xsd:all>
	</xsd:complexType>
	
</xsd:schema>
