#include <enunciate-common.c>
#ifndef DEF_full_ns0_openDoveChange_H
#define DEF_full_ns0_openDoveChange_H

/**
 * (no documentation provided)
 */
struct full_ns0_openDoveChange {


  /**
   * (no documentation provided)
   */
  xmlChar *method;

  /**
   * (no documentation provided)
   */
  xmlChar *uri;

  /**
   * (no documentation provided)
   */
  int *nextChange;
};

/**
 * Reads a OpenDoveChange element from XML. The element to be read is "openDoveChange", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveChange, or NULL in case of error.
 */
struct full_ns0_openDoveChange *xml_read_full_ns0_openDoveChange(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveChange to XML under element name "openDoveChange".
 *
 * @param writer The XML writer.
 * @param _openDoveChange The OpenDoveChange to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveChange(xmlTextWriterPtr writer, struct full_ns0_openDoveChange *_openDoveChange);

/**
 * Frees a OpenDoveChange.
 *
 * @param _openDoveChange The OpenDoveChange to free.
 */
void free_full_ns0_openDoveChange(struct full_ns0_openDoveChange *_openDoveChange);

/**
 * Reads a OpenDoveChange element from XML. The element to be read is "openDoveChange", and
 * it is assumed that the reader is already pointing to the element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveChange, or NULL in case of error.
 */
struct full_ns0_openDoveChange *xmlTextReaderReadNs0OpenDoveChangeElement(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveChange to XML under element name "openDoveChange".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveChange The OpenDoveChange to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveChangeElement(xmlTextWriterPtr writer, struct full_ns0_openDoveChange *_openDoveChange);

/**
 * Writes a OpenDoveChange to XML under element name "openDoveChange".
 *
 * @param writer The XML writer.
 * @param _openDoveChange The OpenDoveChange to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveChangeElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveChange *_openDoveChange, int writeNamespaces);

/**
 * Frees the children of a OpenDoveChange.
 *
 * @param _openDoveChange The OpenDoveChange whose children are to be free.
 */
static void freeNs0OpenDoveChangeElement(struct full_ns0_openDoveChange *_openDoveChange);

/**
 * Reads a OpenDoveChange from XML. The reader is assumed to be at the start element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveChange, or NULL in case of error.
 */
static struct full_ns0_openDoveChange *xmlTextReaderReadNs0OpenDoveChangeType(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveChange to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveChange The OpenDoveChange to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveChangeType(xmlTextWriterPtr writer, struct full_ns0_openDoveChange *_openDoveChange);

/**
 * Frees the elements of a OpenDoveChange.
 *
 * @param _openDoveChange The OpenDoveChange to free.
 */
static void freeNs0OpenDoveChangeType(struct full_ns0_openDoveChange *_openDoveChange);

#endif /* DEF_full_ns0_openDoveChange_H */
#ifndef DEF_full_ns0_openDoveDomain_H
#define DEF_full_ns0_openDoveDomain_H

/**
 * (no documentation provided)
 */
struct full_ns0_openDoveDomain {


  /**
   * (no documentation provided)
   */
  int *lastChangeVersion;

  /**
   * (no documentation provided)
   */
  int *createVersion;

  /**
   * (no documentation provided)
   */
  xmlChar *uuid;

  /**
   * (no documentation provided)
   */
  int *tombstoneFlag;

  /**
   * (no documentation provided)
   */
  int *replicationFactor;

  /**
   * (no documentation provided)
   */
  xmlChar *name;
};

/**
 * Reads a OpenDoveDomain element from XML. The element to be read is "openDoveDomain", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveDomain, or NULL in case of error.
 */
struct full_ns0_openDoveDomain *xml_read_full_ns0_openDoveDomain(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveDomain to XML under element name "openDoveDomain".
 *
 * @param writer The XML writer.
 * @param _openDoveDomain The OpenDoveDomain to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveDomain(xmlTextWriterPtr writer, struct full_ns0_openDoveDomain *_openDoveDomain);

/**
 * Frees a OpenDoveDomain.
 *
 * @param _openDoveDomain The OpenDoveDomain to free.
 */
void free_full_ns0_openDoveDomain(struct full_ns0_openDoveDomain *_openDoveDomain);

/**
 * Reads a OpenDoveDomain element from XML. The element to be read is "openDoveDomain", and
 * it is assumed that the reader is already pointing to the element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveDomain, or NULL in case of error.
 */
struct full_ns0_openDoveDomain *xmlTextReaderReadNs0OpenDoveDomainElement(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveDomain to XML under element name "openDoveDomain".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveDomain The OpenDoveDomain to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveDomainElement(xmlTextWriterPtr writer, struct full_ns0_openDoveDomain *_openDoveDomain);

/**
 * Writes a OpenDoveDomain to XML under element name "openDoveDomain".
 *
 * @param writer The XML writer.
 * @param _openDoveDomain The OpenDoveDomain to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveDomainElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveDomain *_openDoveDomain, int writeNamespaces);

/**
 * Frees the children of a OpenDoveDomain.
 *
 * @param _openDoveDomain The OpenDoveDomain whose children are to be free.
 */
static void freeNs0OpenDoveDomainElement(struct full_ns0_openDoveDomain *_openDoveDomain);

/**
 * Reads a OpenDoveDomain from XML. The reader is assumed to be at the start element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveDomain, or NULL in case of error.
 */
static struct full_ns0_openDoveDomain *xmlTextReaderReadNs0OpenDoveDomainType(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveDomain to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveDomain The OpenDoveDomain to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveDomainType(xmlTextWriterPtr writer, struct full_ns0_openDoveDomain *_openDoveDomain);

/**
 * Frees the elements of a OpenDoveDomain.
 *
 * @param _openDoveDomain The OpenDoveDomain to free.
 */
static void freeNs0OpenDoveDomainType(struct full_ns0_openDoveDomain *_openDoveDomain);

#endif /* DEF_full_ns0_openDoveDomain_H */
#ifndef DEF_full_ns0_openDoveNetwork_H
#define DEF_full_ns0_openDoveNetwork_H

/**
 * (no documentation provided)
 */
struct full_ns0_openDoveNetwork {


  /**
   * (no documentation provided)
   */
  int *networkType;

  /**
   * (no documentation provided)
   */
  int *tombstoneFlag;

  /**
   * (no documentation provided)
   */
  xmlChar *uuid;

  /**
   * (no documentation provided)
   */
  int *lastChangeVersion;

  /**
   * (no documentation provided)
   */
  xmlChar *domain_uuid;

  /**
   * (no documentation provided)
   */
  xmlChar *name;

  /**
   * (no documentation provided)
   */
  int *createVersion;

  /**
   * (no documentation provided)
   */
  int *vnid;
};

/**
 * Reads a OpenDoveNetwork element from XML. The element to be read is "openDoveNetwork", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveNetwork, or NULL in case of error.
 */
struct full_ns0_openDoveNetwork *xml_read_full_ns0_openDoveNetwork(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveNetwork to XML under element name "openDoveNetwork".
 *
 * @param writer The XML writer.
 * @param _openDoveNetwork The OpenDoveNetwork to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveNetwork(xmlTextWriterPtr writer, struct full_ns0_openDoveNetwork *_openDoveNetwork);

/**
 * Frees a OpenDoveNetwork.
 *
 * @param _openDoveNetwork The OpenDoveNetwork to free.
 */
void free_full_ns0_openDoveNetwork(struct full_ns0_openDoveNetwork *_openDoveNetwork);

/**
 * Reads a OpenDoveNetwork element from XML. The element to be read is "openDoveNetwork", and
 * it is assumed that the reader is already pointing to the element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveNetwork, or NULL in case of error.
 */
struct full_ns0_openDoveNetwork *xmlTextReaderReadNs0OpenDoveNetworkElement(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveNetwork to XML under element name "openDoveNetwork".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveNetwork The OpenDoveNetwork to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveNetworkElement(xmlTextWriterPtr writer, struct full_ns0_openDoveNetwork *_openDoveNetwork);

/**
 * Writes a OpenDoveNetwork to XML under element name "openDoveNetwork".
 *
 * @param writer The XML writer.
 * @param _openDoveNetwork The OpenDoveNetwork to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveNetworkElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveNetwork *_openDoveNetwork, int writeNamespaces);

/**
 * Frees the children of a OpenDoveNetwork.
 *
 * @param _openDoveNetwork The OpenDoveNetwork whose children are to be free.
 */
static void freeNs0OpenDoveNetworkElement(struct full_ns0_openDoveNetwork *_openDoveNetwork);

/**
 * Reads a OpenDoveNetwork from XML. The reader is assumed to be at the start element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveNetwork, or NULL in case of error.
 */
static struct full_ns0_openDoveNetwork *xmlTextReaderReadNs0OpenDoveNetworkType(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveNetwork to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveNetwork The OpenDoveNetwork to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveNetworkType(xmlTextWriterPtr writer, struct full_ns0_openDoveNetwork *_openDoveNetwork);

/**
 * Frees the elements of a OpenDoveNetwork.
 *
 * @param _openDoveNetwork The OpenDoveNetwork to free.
 */
static void freeNs0OpenDoveNetworkType(struct full_ns0_openDoveNetwork *_openDoveNetwork);

#endif /* DEF_full_ns0_openDoveNetwork_H */
#ifndef DEF_full_ns0_openDovePolicy_H
#define DEF_full_ns0_openDovePolicy_H

/**
 * (no documentation provided)
 */
struct full_ns0_openDovePolicy {


  /**
   * (no documentation provided)
   */
  int *lastChangeVersion;

  /**
   * (no documentation provided)
   */
  int *createVersion;

  /**
   * (no documentation provided)
   */
  int *tombstoneFlag;

  /**
   * (no documentation provided)
   */
  int *policyType;

  /**
   * (no documentation provided)
   */
  int *policyAction;

  /**
   * (no documentation provided)
   */
  int *trafficType;

  /**
   * (no documentation provided)
   */
  int *sourceVNID;

  /**
   * (no documentation provided)
   */
  int *timeToLive;

  /**
   * (no documentation provided)
   */
  int *destinationVNID;

  /**
   * (no documentation provided)
   */
  xmlChar *domainUUID;

  /**
   * (no documentation provided)
   */
  xmlChar *uuid;
};

/**
 * Reads a OpenDovePolicy element from XML. The element to be read is "openDovePolicy", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDovePolicy, or NULL in case of error.
 */
struct full_ns0_openDovePolicy *xml_read_full_ns0_openDovePolicy(xmlTextReaderPtr reader);

/**
 * Writes a OpenDovePolicy to XML under element name "openDovePolicy".
 *
 * @param writer The XML writer.
 * @param _openDovePolicy The OpenDovePolicy to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDovePolicy(xmlTextWriterPtr writer, struct full_ns0_openDovePolicy *_openDovePolicy);

/**
 * Frees a OpenDovePolicy.
 *
 * @param _openDovePolicy The OpenDovePolicy to free.
 */
void free_full_ns0_openDovePolicy(struct full_ns0_openDovePolicy *_openDovePolicy);

/**
 * Reads a OpenDovePolicy element from XML. The element to be read is "openDovePolicy", and
 * it is assumed that the reader is already pointing to the element.
 *
 * @param reader The XML reader.
 * @return The OpenDovePolicy, or NULL in case of error.
 */
struct full_ns0_openDovePolicy *xmlTextReaderReadNs0OpenDovePolicyElement(xmlTextReaderPtr reader);

/**
 * Writes a OpenDovePolicy to XML under element name "openDovePolicy".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDovePolicy The OpenDovePolicy to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDovePolicyElement(xmlTextWriterPtr writer, struct full_ns0_openDovePolicy *_openDovePolicy);

/**
 * Writes a OpenDovePolicy to XML under element name "openDovePolicy".
 *
 * @param writer The XML writer.
 * @param _openDovePolicy The OpenDovePolicy to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDovePolicyElementNS(xmlTextWriterPtr writer, struct full_ns0_openDovePolicy *_openDovePolicy, int writeNamespaces);

/**
 * Frees the children of a OpenDovePolicy.
 *
 * @param _openDovePolicy The OpenDovePolicy whose children are to be free.
 */
static void freeNs0OpenDovePolicyElement(struct full_ns0_openDovePolicy *_openDovePolicy);

/**
 * Reads a OpenDovePolicy from XML. The reader is assumed to be at the start element.
 *
 * @param reader The XML reader.
 * @return The OpenDovePolicy, or NULL in case of error.
 */
static struct full_ns0_openDovePolicy *xmlTextReaderReadNs0OpenDovePolicyType(xmlTextReaderPtr reader);

/**
 * Writes a OpenDovePolicy to XML.
 *
 * @param writer The XML writer.
 * @param _openDovePolicy The OpenDovePolicy to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDovePolicyType(xmlTextWriterPtr writer, struct full_ns0_openDovePolicy *_openDovePolicy);

/**
 * Frees the elements of a OpenDovePolicy.
 *
 * @param _openDovePolicy The OpenDovePolicy to free.
 */
static void freeNs0OpenDovePolicyType(struct full_ns0_openDovePolicy *_openDovePolicy);

#endif /* DEF_full_ns0_openDovePolicy_H */
#ifndef DEF_full_ns0_openDoveServiceAppliance_H
#define DEF_full_ns0_openDoveServiceAppliance_H

/**
 * (no documentation provided)
 */
struct full_ns0_openDoveServiceAppliance {


  /**
   * (no documentation provided)
   */
  int *dcs_rest_service_port;

  /**
   * (no documentation provided)
   */
  int *dcs_config_version;

  /**
   * (no documentation provided)
   */
  int *isDGW;

  /**
   * (no documentation provided)
   */
  xmlChar *build_version;

  /**
   * (no documentation provided)
   */
  int *ip_family;

  /**
   * (no documentation provided)
   */
  int *canBeDCS;

  /**
   * (no documentation provided)
   */
  int *canBeDGW;

  /**
   * (no documentation provided)
   */
  int *isDCS;

  /**
   * (no documentation provided)
   */
  int *dgw_config_version;

  /**
   * (no documentation provided)
   */
  xmlChar *ip;

  /**
   * (no documentation provided)
   */
  int *dcs_raw_service_port;

  /**
   * (no documentation provided)
   */
  xmlChar *uuid;

  /**
   * (no documentation provided)
   */
  int *dgw_rest_service_port;

  /**
   * (no documentation provided)
   */
  xmlChar *timestamp;
};

/**
 * Reads a OpenDoveServiceAppliance element from XML. The element to be read is "openDoveServiceAppliance", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveServiceAppliance, or NULL in case of error.
 */
struct full_ns0_openDoveServiceAppliance *xml_read_full_ns0_openDoveServiceAppliance(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveServiceAppliance to XML under element name "openDoveServiceAppliance".
 *
 * @param writer The XML writer.
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveServiceAppliance(xmlTextWriterPtr writer, struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance);

/**
 * Frees a OpenDoveServiceAppliance.
 *
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance to free.
 */
void free_full_ns0_openDoveServiceAppliance(struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance);

/**
 * Reads a OpenDoveServiceAppliance element from XML. The element to be read is "openDoveServiceAppliance", and
 * it is assumed that the reader is already pointing to the element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveServiceAppliance, or NULL in case of error.
 */
struct full_ns0_openDoveServiceAppliance *xmlTextReaderReadNs0OpenDoveServiceApplianceElement(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveServiceAppliance to XML under element name "openDoveServiceAppliance".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveServiceApplianceElement(xmlTextWriterPtr writer, struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance);

/**
 * Writes a OpenDoveServiceAppliance to XML under element name "openDoveServiceAppliance".
 *
 * @param writer The XML writer.
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveServiceApplianceElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance, int writeNamespaces);

/**
 * Frees the children of a OpenDoveServiceAppliance.
 *
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance whose children are to be free.
 */
static void freeNs0OpenDoveServiceApplianceElement(struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance);

/**
 * Reads a OpenDoveServiceAppliance from XML. The reader is assumed to be at the start element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveServiceAppliance, or NULL in case of error.
 */
static struct full_ns0_openDoveServiceAppliance *xmlTextReaderReadNs0OpenDoveServiceApplianceType(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveServiceAppliance to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveServiceApplianceType(xmlTextWriterPtr writer, struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance);

/**
 * Frees the elements of a OpenDoveServiceAppliance.
 *
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance to free.
 */
static void freeNs0OpenDoveServiceApplianceType(struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance);

#endif /* DEF_full_ns0_openDoveServiceAppliance_H */
#ifndef DEF_full_ns0_openDoveSubnet_H
#define DEF_full_ns0_openDoveSubnet_H

/**
 * (no documentation provided)
 */
struct full_ns0_openDoveSubnet {


  /**
   * (no documentation provided)
   */
  xmlChar *domainUUID;

  /**
   * (no documentation provided)
   */
  xmlChar *subnet;

  /**
   * (no documentation provided)
   */
  int *lastChangeVersion;

  /**
   * (no documentation provided)
   */
  xmlChar *subnetType;

  /**
   * (no documentation provided)
   */
  xmlChar *networkUUIDs;

  /**
   * Size of the networkUUIDs array.
   */
  int _sizeof_networkUUIDs;

  /**
   * (no documentation provided)
   */
  int *createVersion;

  /**
   * (no documentation provided)
   */
  xmlChar *uuid;

  /**
   * (no documentation provided)
   */
  xmlChar *nexthop;

  /**
   * (no documentation provided)
   */
  int *tombstoneFlag;

  /**
   * (no documentation provided)
   */
  xmlChar *mask;
};

/**
 * Reads a OpenDoveSubnet element from XML. The element to be read is "openDoveSubnet", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveSubnet, or NULL in case of error.
 */
struct full_ns0_openDoveSubnet *xml_read_full_ns0_openDoveSubnet(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveSubnet to XML under element name "openDoveSubnet".
 *
 * @param writer The XML writer.
 * @param _openDoveSubnet The OpenDoveSubnet to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveSubnet(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnet *_openDoveSubnet);

/**
 * Frees a OpenDoveSubnet.
 *
 * @param _openDoveSubnet The OpenDoveSubnet to free.
 */
void free_full_ns0_openDoveSubnet(struct full_ns0_openDoveSubnet *_openDoveSubnet);

/**
 * Reads a OpenDoveSubnet element from XML. The element to be read is "openDoveSubnet", and
 * it is assumed that the reader is already pointing to the element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveSubnet, or NULL in case of error.
 */
struct full_ns0_openDoveSubnet *xmlTextReaderReadNs0OpenDoveSubnetElement(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveSubnet to XML under element name "openDoveSubnet".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveSubnet The OpenDoveSubnet to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveSubnetElement(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnet *_openDoveSubnet);

/**
 * Writes a OpenDoveSubnet to XML under element name "openDoveSubnet".
 *
 * @param writer The XML writer.
 * @param _openDoveSubnet The OpenDoveSubnet to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveSubnetElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnet *_openDoveSubnet, int writeNamespaces);

/**
 * Frees the children of a OpenDoveSubnet.
 *
 * @param _openDoveSubnet The OpenDoveSubnet whose children are to be free.
 */
static void freeNs0OpenDoveSubnetElement(struct full_ns0_openDoveSubnet *_openDoveSubnet);

/**
 * Reads a OpenDoveSubnet from XML. The reader is assumed to be at the start element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveSubnet, or NULL in case of error.
 */
static struct full_ns0_openDoveSubnet *xmlTextReaderReadNs0OpenDoveSubnetType(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveSubnet to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveSubnet The OpenDoveSubnet to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveSubnetType(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnet *_openDoveSubnet);

/**
 * Frees the elements of a OpenDoveSubnet.
 *
 * @param _openDoveSubnet The OpenDoveSubnet to free.
 */
static void freeNs0OpenDoveSubnetType(struct full_ns0_openDoveSubnet *_openDoveSubnet);

#endif /* DEF_full_ns0_openDoveSubnet_H */
#ifndef DEF_full_ns0_openDoveSwitch_H
#define DEF_full_ns0_openDoveSwitch_H

/**
 * (no documentation provided)
 */
struct full_ns0_openDoveSwitch {


  /**
   * (no documentation provided)
   */
  xmlChar *mgmtIP;

  /**
   * (no documentation provided)
   */
  int *tombstoneFlag;

  /**
   * (no documentation provided)
   */
  xmlChar *uuid;

  /**
   * (no documentation provided)
   */
  xmlChar *name;

  /**
   * (no documentation provided)
   */
  int *createVersion;

  /**
   * (no documentation provided)
   */
  int *lastChangeVersion;

  /**
   * (no documentation provided)
   */
  xmlChar *timestamp;

  /**
   * (no documentation provided)
   */
  xmlChar *tunnelIP;
};

/**
 * Reads a OpenDoveSwitch element from XML. The element to be read is "openDoveSwitch", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveSwitch, or NULL in case of error.
 */
struct full_ns0_openDoveSwitch *xml_read_full_ns0_openDoveSwitch(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveSwitch to XML under element name "openDoveSwitch".
 *
 * @param writer The XML writer.
 * @param _openDoveSwitch The OpenDoveSwitch to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveSwitch(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitch *_openDoveSwitch);

/**
 * Frees a OpenDoveSwitch.
 *
 * @param _openDoveSwitch The OpenDoveSwitch to free.
 */
void free_full_ns0_openDoveSwitch(struct full_ns0_openDoveSwitch *_openDoveSwitch);

/**
 * Reads a OpenDoveSwitch element from XML. The element to be read is "openDoveSwitch", and
 * it is assumed that the reader is already pointing to the element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveSwitch, or NULL in case of error.
 */
struct full_ns0_openDoveSwitch *xmlTextReaderReadNs0OpenDoveSwitchElement(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveSwitch to XML under element name "openDoveSwitch".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveSwitch The OpenDoveSwitch to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveSwitchElement(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitch *_openDoveSwitch);

/**
 * Writes a OpenDoveSwitch to XML under element name "openDoveSwitch".
 *
 * @param writer The XML writer.
 * @param _openDoveSwitch The OpenDoveSwitch to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveSwitchElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitch *_openDoveSwitch, int writeNamespaces);

/**
 * Frees the children of a OpenDoveSwitch.
 *
 * @param _openDoveSwitch The OpenDoveSwitch whose children are to be free.
 */
static void freeNs0OpenDoveSwitchElement(struct full_ns0_openDoveSwitch *_openDoveSwitch);

/**
 * Reads a OpenDoveSwitch from XML. The reader is assumed to be at the start element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveSwitch, or NULL in case of error.
 */
static struct full_ns0_openDoveSwitch *xmlTextReaderReadNs0OpenDoveSwitchType(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveSwitch to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveSwitch The OpenDoveSwitch to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveSwitchType(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitch *_openDoveSwitch);

/**
 * Frees the elements of a OpenDoveSwitch.
 *
 * @param _openDoveSwitch The OpenDoveSwitch to free.
 */
static void freeNs0OpenDoveSwitchType(struct full_ns0_openDoveSwitch *_openDoveSwitch);

#endif /* DEF_full_ns0_openDoveSwitch_H */
#ifndef DEF_full_ns0_openDoveDomainRequest_H
#define DEF_full_ns0_openDoveDomainRequest_H

/**
 * (no documentation provided)
 */
struct full_ns0_openDoveDomainRequest {


  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveDomain *singletonDomain;

  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveDomain *bulkDomains;

  /**
   * Size of the bulkDomains array.
   */
  int _sizeof_bulkDomains;
};

/**
 * Reads a OpenDoveDomainRequest element from XML. The element to be read is "openDoveDomainRequest", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveDomainRequest, or NULL in case of error.
 */
struct full_ns0_openDoveDomainRequest *xml_read_full_ns0_openDoveDomainRequest(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveDomainRequest to XML under element name "openDoveDomainRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveDomainRequest The OpenDoveDomainRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveDomainRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest);

/**
 * Frees a OpenDoveDomainRequest.
 *
 * @param _openDoveDomainRequest The OpenDoveDomainRequest to free.
 */
void free_full_ns0_openDoveDomainRequest(struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest);

/**
 * Reads a OpenDoveDomainRequest element from XML. The element to be read is "openDoveDomainRequest", and
 * it is assumed that the reader is already pointing to the element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveDomainRequest, or NULL in case of error.
 */
struct full_ns0_openDoveDomainRequest *xmlTextReaderReadNs0OpenDoveDomainRequestElement(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveDomainRequest to XML under element name "openDoveDomainRequest".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveDomainRequest The OpenDoveDomainRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveDomainRequestElement(xmlTextWriterPtr writer, struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest);

/**
 * Writes a OpenDoveDomainRequest to XML under element name "openDoveDomainRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveDomainRequest The OpenDoveDomainRequest to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveDomainRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest, int writeNamespaces);

/**
 * Frees the children of a OpenDoveDomainRequest.
 *
 * @param _openDoveDomainRequest The OpenDoveDomainRequest whose children are to be free.
 */
static void freeNs0OpenDoveDomainRequestElement(struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest);

/**
 * Reads a OpenDoveDomainRequest from XML. The reader is assumed to be at the start element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveDomainRequest, or NULL in case of error.
 */
static struct full_ns0_openDoveDomainRequest *xmlTextReaderReadNs0OpenDoveDomainRequestType(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveDomainRequest to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveDomainRequest The OpenDoveDomainRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveDomainRequestType(xmlTextWriterPtr writer, struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest);

/**
 * Frees the elements of a OpenDoveDomainRequest.
 *
 * @param _openDoveDomainRequest The OpenDoveDomainRequest to free.
 */
static void freeNs0OpenDoveDomainRequestType(struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest);

#endif /* DEF_full_ns0_openDoveDomainRequest_H */
#ifndef DEF_full_ns0_openDoveNetworkRequest_H
#define DEF_full_ns0_openDoveNetworkRequest_H

/**
 * (no documentation provided)
 */
struct full_ns0_openDoveNetworkRequest {


  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveNetwork *singletonNetwork;

  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveNetwork *bulkNetworks;

  /**
   * Size of the bulkNetworks array.
   */
  int _sizeof_bulkNetworks;
};

/**
 * Reads a OpenDoveNetworkRequest element from XML. The element to be read is "openDoveNetworkRequest", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveNetworkRequest, or NULL in case of error.
 */
struct full_ns0_openDoveNetworkRequest *xml_read_full_ns0_openDoveNetworkRequest(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveNetworkRequest to XML under element name "openDoveNetworkRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveNetworkRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest);

/**
 * Frees a OpenDoveNetworkRequest.
 *
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest to free.
 */
void free_full_ns0_openDoveNetworkRequest(struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest);

/**
 * Reads a OpenDoveNetworkRequest element from XML. The element to be read is "openDoveNetworkRequest", and
 * it is assumed that the reader is already pointing to the element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveNetworkRequest, or NULL in case of error.
 */
struct full_ns0_openDoveNetworkRequest *xmlTextReaderReadNs0OpenDoveNetworkRequestElement(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveNetworkRequest to XML under element name "openDoveNetworkRequest".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveNetworkRequestElement(xmlTextWriterPtr writer, struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest);

/**
 * Writes a OpenDoveNetworkRequest to XML under element name "openDoveNetworkRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveNetworkRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest, int writeNamespaces);

/**
 * Frees the children of a OpenDoveNetworkRequest.
 *
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest whose children are to be free.
 */
static void freeNs0OpenDoveNetworkRequestElement(struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest);

/**
 * Reads a OpenDoveNetworkRequest from XML. The reader is assumed to be at the start element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveNetworkRequest, or NULL in case of error.
 */
static struct full_ns0_openDoveNetworkRequest *xmlTextReaderReadNs0OpenDoveNetworkRequestType(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveNetworkRequest to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveNetworkRequestType(xmlTextWriterPtr writer, struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest);

/**
 * Frees the elements of a OpenDoveNetworkRequest.
 *
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest to free.
 */
static void freeNs0OpenDoveNetworkRequestType(struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest);

#endif /* DEF_full_ns0_openDoveNetworkRequest_H */
#ifndef DEF_full_ns0_openDovePolicyRequest_H
#define DEF_full_ns0_openDovePolicyRequest_H

/**
 * (no documentation provided)
 */
struct full_ns0_openDovePolicyRequest {


  /**
   * (no documentation provided)
   */
  struct full_ns0_openDovePolicy *bulkPolicies;

  /**
   * Size of the bulkPolicies array.
   */
  int _sizeof_bulkPolicies;

  /**
   * (no documentation provided)
   */
  struct full_ns0_openDovePolicy *singletonPolicy;
};

/**
 * Reads a OpenDovePolicyRequest element from XML. The element to be read is "openDovePolicyRequest", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDovePolicyRequest, or NULL in case of error.
 */
struct full_ns0_openDovePolicyRequest *xml_read_full_ns0_openDovePolicyRequest(xmlTextReaderPtr reader);

/**
 * Writes a OpenDovePolicyRequest to XML under element name "openDovePolicyRequest".
 *
 * @param writer The XML writer.
 * @param _openDovePolicyRequest The OpenDovePolicyRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDovePolicyRequest(xmlTextWriterPtr writer, struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest);

/**
 * Frees a OpenDovePolicyRequest.
 *
 * @param _openDovePolicyRequest The OpenDovePolicyRequest to free.
 */
void free_full_ns0_openDovePolicyRequest(struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest);

/**
 * Reads a OpenDovePolicyRequest element from XML. The element to be read is "openDovePolicyRequest", and
 * it is assumed that the reader is already pointing to the element.
 *
 * @param reader The XML reader.
 * @return The OpenDovePolicyRequest, or NULL in case of error.
 */
struct full_ns0_openDovePolicyRequest *xmlTextReaderReadNs0OpenDovePolicyRequestElement(xmlTextReaderPtr reader);

/**
 * Writes a OpenDovePolicyRequest to XML under element name "openDovePolicyRequest".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDovePolicyRequest The OpenDovePolicyRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDovePolicyRequestElement(xmlTextWriterPtr writer, struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest);

/**
 * Writes a OpenDovePolicyRequest to XML under element name "openDovePolicyRequest".
 *
 * @param writer The XML writer.
 * @param _openDovePolicyRequest The OpenDovePolicyRequest to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDovePolicyRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest, int writeNamespaces);

/**
 * Frees the children of a OpenDovePolicyRequest.
 *
 * @param _openDovePolicyRequest The OpenDovePolicyRequest whose children are to be free.
 */
static void freeNs0OpenDovePolicyRequestElement(struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest);

/**
 * Reads a OpenDovePolicyRequest from XML. The reader is assumed to be at the start element.
 *
 * @param reader The XML reader.
 * @return The OpenDovePolicyRequest, or NULL in case of error.
 */
static struct full_ns0_openDovePolicyRequest *xmlTextReaderReadNs0OpenDovePolicyRequestType(xmlTextReaderPtr reader);

/**
 * Writes a OpenDovePolicyRequest to XML.
 *
 * @param writer The XML writer.
 * @param _openDovePolicyRequest The OpenDovePolicyRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDovePolicyRequestType(xmlTextWriterPtr writer, struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest);

/**
 * Frees the elements of a OpenDovePolicyRequest.
 *
 * @param _openDovePolicyRequest The OpenDovePolicyRequest to free.
 */
static void freeNs0OpenDovePolicyRequestType(struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest);

#endif /* DEF_full_ns0_openDovePolicyRequest_H */
#ifndef DEF_full_ns0_openDoveSubnetRequest_H
#define DEF_full_ns0_openDoveSubnetRequest_H

/**
 * (no documentation provided)
 */
struct full_ns0_openDoveSubnetRequest {


  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveSubnet *bulkSubnets;

  /**
   * Size of the bulkSubnets array.
   */
  int _sizeof_bulkSubnets;

  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveSubnet *singletonSubnet;
};

/**
 * Reads a OpenDoveSubnetRequest element from XML. The element to be read is "openDoveSubnetRequest", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveSubnetRequest, or NULL in case of error.
 */
struct full_ns0_openDoveSubnetRequest *xml_read_full_ns0_openDoveSubnetRequest(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveSubnetRequest to XML under element name "openDoveSubnetRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveSubnetRequest The OpenDoveSubnetRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveSubnetRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest);

/**
 * Frees a OpenDoveSubnetRequest.
 *
 * @param _openDoveSubnetRequest The OpenDoveSubnetRequest to free.
 */
void free_full_ns0_openDoveSubnetRequest(struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest);

/**
 * Reads a OpenDoveSubnetRequest element from XML. The element to be read is "openDoveSubnetRequest", and
 * it is assumed that the reader is already pointing to the element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveSubnetRequest, or NULL in case of error.
 */
struct full_ns0_openDoveSubnetRequest *xmlTextReaderReadNs0OpenDoveSubnetRequestElement(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveSubnetRequest to XML under element name "openDoveSubnetRequest".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveSubnetRequest The OpenDoveSubnetRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveSubnetRequestElement(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest);

/**
 * Writes a OpenDoveSubnetRequest to XML under element name "openDoveSubnetRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveSubnetRequest The OpenDoveSubnetRequest to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveSubnetRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest, int writeNamespaces);

/**
 * Frees the children of a OpenDoveSubnetRequest.
 *
 * @param _openDoveSubnetRequest The OpenDoveSubnetRequest whose children are to be free.
 */
static void freeNs0OpenDoveSubnetRequestElement(struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest);

/**
 * Reads a OpenDoveSubnetRequest from XML. The reader is assumed to be at the start element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveSubnetRequest, or NULL in case of error.
 */
static struct full_ns0_openDoveSubnetRequest *xmlTextReaderReadNs0OpenDoveSubnetRequestType(xmlTextReaderPtr reader);

/**
 * Writes a OpenDoveSubnetRequest to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveSubnetRequest The OpenDoveSubnetRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
static int xmlTextWriterWriteNs0OpenDoveSubnetRequestType(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest);

/**
 * Frees the elements of a OpenDoveSubnetRequest.
 *
 * @param _openDoveSubnetRequest The OpenDoveSubnetRequest to free.
 */
static void freeNs0OpenDoveSubnetRequestType(struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest);

#endif /* DEF_full_ns0_openDoveSubnetRequest_H */
#ifndef DEF_full_ns0_openDoveChange_M
#define DEF_full_ns0_openDoveChange_M

/**
 * Reads a OpenDoveChange element from XML. The element to be read is "openDoveChange", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveChange, or NULL in case of error.
 */
struct full_ns0_openDoveChange *xml_read_full_ns0_openDoveChange(xmlTextReaderPtr reader) {
  int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
  return xmlTextReaderReadNs0OpenDoveChangeElement(reader);
}

/**
 * Writes a OpenDoveChange to XML under element name "openDoveChange".
 *
 * @param writer The XML writer.
 * @param _openDoveChange The OpenDoveChange to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveChange(xmlTextWriterPtr writer, struct full_ns0_openDoveChange *_openDoveChange) {
  return xmlTextWriterWriteNs0OpenDoveChangeElementNS(writer, _openDoveChange, 1);
}

/**
 * Frees a OpenDoveChange.
 *
 * @param _openDoveChange The OpenDoveChange to free.
 */
void free_full_ns0_openDoveChange(struct full_ns0_openDoveChange *_openDoveChange) {
  freeNs0OpenDoveChangeType(_openDoveChange);
  free(_openDoveChange);
}

/**
 * Reads a OpenDoveChange element from XML. The element to be read is "openDoveChange", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveChange, or NULL in case of error.
 */
struct full_ns0_openDoveChange *xmlTextReaderReadNs0OpenDoveChangeElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveChange *_openDoveChange = NULL;

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "openDoveChange", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Attempting to read root element {}openDoveChange.\n");
#endif
    _openDoveChange = xmlTextReaderReadNs0OpenDoveChangeType(reader);
  }
#if DEBUG_ENUNCIATE
  if (_openDoveChange == NULL) {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      printf("attempt to read {}openDoveChange failed. current element: {}%s\n",  xmlTextReaderConstLocalName(reader));
    }
    else {
      printf("attempt to read {}openDoveChange failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
    }
  }
#endif

  return _openDoveChange;
}

/**
 * Writes a OpenDoveChange to XML under element name "openDoveChange".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveChange The OpenDoveChange to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveChangeElement(xmlTextWriterPtr writer, struct full_ns0_openDoveChange *_openDoveChange) {
  return xmlTextWriterWriteNs0OpenDoveChangeElementNS(writer, _openDoveChange, 0);
}

/**
 * Writes a OpenDoveChange to XML under element name "openDoveChange".
 *
 * @param writer The XML writer.
 * @param _openDoveChange The OpenDoveChange to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveChangeElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveChange *_openDoveChange, int writeNamespaces) {
  int totalBytes = 0;
  int status;

  status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveChange", NULL);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write start element {}openDoveChange. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

#if DEBUG_ENUNCIATE > 1
  printf("writing type {}openDoveChange for root element {}openDoveChange...\n");
#endif
  status = xmlTextWriterWriteNs0OpenDoveChangeType(writer, _openDoveChange);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write type for start element {}openDoveChange. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  status = xmlTextWriterEndElement(writer);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to end element {}openDoveChange. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveChange.
 *
 * @param _openDoveChange The OpenDoveChange whose children are to be free.
 */
static void freeNs0OpenDoveChangeElement(struct full_ns0_openDoveChange *_openDoveChange) {
  freeNs0OpenDoveChangeType(_openDoveChange);
}

/**
 * Reads a OpenDoveChange from XML. The reader is assumed to be at the start element.
 *
 * @return the OpenDoveChange, or NULL in case of error.
 */
static struct full_ns0_openDoveChange *xmlTextReaderReadNs0OpenDoveChangeType(xmlTextReaderPtr reader) {
  int status, depth;
  void *_child_accessor;
  struct full_ns0_openDoveChange *_openDoveChange = calloc(1, sizeof(struct full_ns0_openDoveChange));



  if (xmlTextReaderIsEmptyElement(reader) == 0) {
    depth = xmlTextReaderDepth(reader);//track the depth.
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);

    while (xmlTextReaderDepth(reader) > depth) {
      if (status < 1) {
        //panic: XML read error.
#if DEBUG_ENUNCIATE
        printf("Failure to advance to next child element.\n");
#endif
        freeNs0OpenDoveChangeType(_openDoveChange);
        free(_openDoveChange);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "method", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}method of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}method of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveChangeType(_openDoveChange);
          free(_openDoveChange);
          return NULL;
        }

        _openDoveChange->method = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "uri", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}uri of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}uri of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveChangeType(_openDoveChange);
          free(_openDoveChange);
          return NULL;
        }

        _openDoveChange->uri = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "next_change", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}next_change of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}next_change of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveChangeType(_openDoveChange);
          free(_openDoveChange);
          return NULL;
        }

        _openDoveChange->nextChange = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else {
#if DEBUG_ENUNCIATE > 1
        if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
          printf("unknown child element {}%s for type {}openDoveChange.  Skipping...\n",  xmlTextReaderConstLocalName(reader));
        }
        else {
          printf("unknown child element {%s}%s for type {}openDoveChange. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
        }
#endif
        status = xmlTextReaderSkipElement(reader);
      }
    }
  }

  return _openDoveChange;
}

/**
 * Writes a OpenDoveChange to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveChange The OpenDoveChange to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveChangeType(xmlTextWriterPtr writer, struct full_ns0_openDoveChange *_openDoveChange) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveChange->method != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "method", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}method. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}method...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveChange->method));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}method. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}method. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveChange->uri != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "uri", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}uri. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}uri...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveChange->uri));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}uri. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}uri. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveChange->nextChange != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "next_change", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}next_change. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}next_change...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveChange->nextChange));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}next_change. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}next_change. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveChange.
 *
 * @param _openDoveChange The OpenDoveChange to free.
 */
static void freeNs0OpenDoveChangeType(struct full_ns0_openDoveChange *_openDoveChange) {
  int i;
  if (_openDoveChange->method != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor method of type full_ns0_openDoveChange...\n");
#endif
    freeXsStringType(_openDoveChange->method);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor method of type full_ns0_openDoveChange...\n");
#endif
    free(_openDoveChange->method);
  }
  if (_openDoveChange->uri != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor uri of type full_ns0_openDoveChange...\n");
#endif
    freeXsStringType(_openDoveChange->uri);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor uri of type full_ns0_openDoveChange...\n");
#endif
    free(_openDoveChange->uri);
  }
  if (_openDoveChange->nextChange != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor nextChange of type full_ns0_openDoveChange...\n");
#endif
    freeXsIntType(_openDoveChange->nextChange);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor nextChange of type full_ns0_openDoveChange...\n");
#endif
    free(_openDoveChange->nextChange);
  }
}
#endif /* DEF_full_ns0_openDoveChange_M */
#ifndef DEF_full_ns0_openDoveDomain_M
#define DEF_full_ns0_openDoveDomain_M

/**
 * Reads a OpenDoveDomain element from XML. The element to be read is "openDoveDomain", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveDomain, or NULL in case of error.
 */
struct full_ns0_openDoveDomain *xml_read_full_ns0_openDoveDomain(xmlTextReaderPtr reader) {
  int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
  return xmlTextReaderReadNs0OpenDoveDomainElement(reader);
}

/**
 * Writes a OpenDoveDomain to XML under element name "openDoveDomain".
 *
 * @param writer The XML writer.
 * @param _openDoveDomain The OpenDoveDomain to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveDomain(xmlTextWriterPtr writer, struct full_ns0_openDoveDomain *_openDoveDomain) {
  return xmlTextWriterWriteNs0OpenDoveDomainElementNS(writer, _openDoveDomain, 1);
}

/**
 * Frees a OpenDoveDomain.
 *
 * @param _openDoveDomain The OpenDoveDomain to free.
 */
void free_full_ns0_openDoveDomain(struct full_ns0_openDoveDomain *_openDoveDomain) {
  freeNs0OpenDoveDomainType(_openDoveDomain);
  free(_openDoveDomain);
}

/**
 * Reads a OpenDoveDomain element from XML. The element to be read is "openDoveDomain", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveDomain, or NULL in case of error.
 */
struct full_ns0_openDoveDomain *xmlTextReaderReadNs0OpenDoveDomainElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveDomain *_openDoveDomain = NULL;

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "openDoveDomain", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Attempting to read root element {}openDoveDomain.\n");
#endif
    _openDoveDomain = xmlTextReaderReadNs0OpenDoveDomainType(reader);
  }
#if DEBUG_ENUNCIATE
  if (_openDoveDomain == NULL) {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      printf("attempt to read {}openDoveDomain failed. current element: {}%s\n",  xmlTextReaderConstLocalName(reader));
    }
    else {
      printf("attempt to read {}openDoveDomain failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
    }
  }
#endif

  return _openDoveDomain;
}

/**
 * Writes a OpenDoveDomain to XML under element name "openDoveDomain".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveDomain The OpenDoveDomain to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveDomainElement(xmlTextWriterPtr writer, struct full_ns0_openDoveDomain *_openDoveDomain) {
  return xmlTextWriterWriteNs0OpenDoveDomainElementNS(writer, _openDoveDomain, 0);
}

/**
 * Writes a OpenDoveDomain to XML under element name "openDoveDomain".
 *
 * @param writer The XML writer.
 * @param _openDoveDomain The OpenDoveDomain to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveDomainElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveDomain *_openDoveDomain, int writeNamespaces) {
  int totalBytes = 0;
  int status;

  status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveDomain", NULL);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write start element {}openDoveDomain. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

#if DEBUG_ENUNCIATE > 1
  printf("writing type {}openDoveDomain for root element {}openDoveDomain...\n");
#endif
  status = xmlTextWriterWriteNs0OpenDoveDomainType(writer, _openDoveDomain);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write type for start element {}openDoveDomain. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  status = xmlTextWriterEndElement(writer);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to end element {}openDoveDomain. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveDomain.
 *
 * @param _openDoveDomain The OpenDoveDomain whose children are to be free.
 */
static void freeNs0OpenDoveDomainElement(struct full_ns0_openDoveDomain *_openDoveDomain) {
  freeNs0OpenDoveDomainType(_openDoveDomain);
}

/**
 * Reads a OpenDoveDomain from XML. The reader is assumed to be at the start element.
 *
 * @return the OpenDoveDomain, or NULL in case of error.
 */
static struct full_ns0_openDoveDomain *xmlTextReaderReadNs0OpenDoveDomainType(xmlTextReaderPtr reader) {
  int status, depth;
  void *_child_accessor;
  struct full_ns0_openDoveDomain *_openDoveDomain = calloc(1, sizeof(struct full_ns0_openDoveDomain));



  if (xmlTextReaderIsEmptyElement(reader) == 0) {
    depth = xmlTextReaderDepth(reader);//track the depth.
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);

    while (xmlTextReaderDepth(reader) > depth) {
      if (status < 1) {
        //panic: XML read error.
#if DEBUG_ENUNCIATE
        printf("Failure to advance to next child element.\n");
#endif
        freeNs0OpenDoveDomainType(_openDoveDomain);
        free(_openDoveDomain);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "change_version", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}change_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}change_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveDomainType(_openDoveDomain);
          free(_openDoveDomain);
          return NULL;
        }

        _openDoveDomain->lastChangeVersion = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "create_version", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}create_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}create_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveDomainType(_openDoveDomain);
          free(_openDoveDomain);
          return NULL;
        }

        _openDoveDomain->createVersion = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveDomainType(_openDoveDomain);
          free(_openDoveDomain);
          return NULL;
        }

        _openDoveDomain->uuid = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "is_tombstone", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}is_tombstone of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
        _child_accessor = xmlTextReaderReadXsBooleanType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}is_tombstone of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveDomainType(_openDoveDomain);
          free(_openDoveDomain);
          return NULL;
        }

        _openDoveDomain->tombstoneFlag = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "replication_factor", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}replication_factor of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}replication_factor of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveDomainType(_openDoveDomain);
          free(_openDoveDomain);
          return NULL;
        }

        _openDoveDomain->replicationFactor = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveDomainType(_openDoveDomain);
          free(_openDoveDomain);
          return NULL;
        }

        _openDoveDomain->name = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else {
#if DEBUG_ENUNCIATE > 1
        if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
          printf("unknown child element {}%s for type {}openDoveDomain.  Skipping...\n",  xmlTextReaderConstLocalName(reader));
        }
        else {
          printf("unknown child element {%s}%s for type {}openDoveDomain. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
        }
#endif
        status = xmlTextReaderSkipElement(reader);
      }
    }
  }

  return _openDoveDomain;
}

/**
 * Writes a OpenDoveDomain to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveDomain The OpenDoveDomain to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveDomainType(xmlTextWriterPtr writer, struct full_ns0_openDoveDomain *_openDoveDomain) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveDomain->lastChangeVersion != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "change_version", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}change_version...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveDomain->lastChangeVersion));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveDomain->createVersion != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "create_version", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}create_version...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveDomain->createVersion));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveDomain->uuid != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "id", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}id...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveDomain->uuid));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveDomain->tombstoneFlag != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "is_tombstone", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}is_tombstone...\n");
#endif
    status = xmlTextWriterWriteXsBooleanType(writer, (_openDoveDomain->tombstoneFlag));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveDomain->replicationFactor != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "replication_factor", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}replication_factor. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}replication_factor...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveDomain->replicationFactor));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}replication_factor. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}replication_factor. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveDomain->name != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}name. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}name...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveDomain->name));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}name. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}name. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveDomain.
 *
 * @param _openDoveDomain The OpenDoveDomain to free.
 */
static void freeNs0OpenDoveDomainType(struct full_ns0_openDoveDomain *_openDoveDomain) {
  int i;
  if (_openDoveDomain->lastChangeVersion != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor lastChangeVersion of type full_ns0_openDoveDomain...\n");
#endif
    freeXsIntType(_openDoveDomain->lastChangeVersion);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor lastChangeVersion of type full_ns0_openDoveDomain...\n");
#endif
    free(_openDoveDomain->lastChangeVersion);
  }
  if (_openDoveDomain->createVersion != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor createVersion of type full_ns0_openDoveDomain...\n");
#endif
    freeXsIntType(_openDoveDomain->createVersion);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor createVersion of type full_ns0_openDoveDomain...\n");
#endif
    free(_openDoveDomain->createVersion);
  }
  if (_openDoveDomain->uuid != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor uuid of type full_ns0_openDoveDomain...\n");
#endif
    freeXsStringType(_openDoveDomain->uuid);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor uuid of type full_ns0_openDoveDomain...\n");
#endif
    free(_openDoveDomain->uuid);
  }
  if (_openDoveDomain->tombstoneFlag != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor tombstoneFlag of type full_ns0_openDoveDomain...\n");
#endif
    freeXsBooleanType(_openDoveDomain->tombstoneFlag);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor tombstoneFlag of type full_ns0_openDoveDomain...\n");
#endif
    free(_openDoveDomain->tombstoneFlag);
  }
  if (_openDoveDomain->replicationFactor != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor replicationFactor of type full_ns0_openDoveDomain...\n");
#endif
    freeXsIntType(_openDoveDomain->replicationFactor);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor replicationFactor of type full_ns0_openDoveDomain...\n");
#endif
    free(_openDoveDomain->replicationFactor);
  }
  if (_openDoveDomain->name != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor name of type full_ns0_openDoveDomain...\n");
#endif
    freeXsStringType(_openDoveDomain->name);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor name of type full_ns0_openDoveDomain...\n");
#endif
    free(_openDoveDomain->name);
  }
}
#endif /* DEF_full_ns0_openDoveDomain_M */
#ifndef DEF_full_ns0_openDoveNetwork_M
#define DEF_full_ns0_openDoveNetwork_M

/**
 * Reads a OpenDoveNetwork element from XML. The element to be read is "openDoveNetwork", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveNetwork, or NULL in case of error.
 */
struct full_ns0_openDoveNetwork *xml_read_full_ns0_openDoveNetwork(xmlTextReaderPtr reader) {
  int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
  return xmlTextReaderReadNs0OpenDoveNetworkElement(reader);
}

/**
 * Writes a OpenDoveNetwork to XML under element name "openDoveNetwork".
 *
 * @param writer The XML writer.
 * @param _openDoveNetwork The OpenDoveNetwork to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveNetwork(xmlTextWriterPtr writer, struct full_ns0_openDoveNetwork *_openDoveNetwork) {
  return xmlTextWriterWriteNs0OpenDoveNetworkElementNS(writer, _openDoveNetwork, 1);
}

/**
 * Frees a OpenDoveNetwork.
 *
 * @param _openDoveNetwork The OpenDoveNetwork to free.
 */
void free_full_ns0_openDoveNetwork(struct full_ns0_openDoveNetwork *_openDoveNetwork) {
  freeNs0OpenDoveNetworkType(_openDoveNetwork);
  free(_openDoveNetwork);
}

/**
 * Reads a OpenDoveNetwork element from XML. The element to be read is "openDoveNetwork", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveNetwork, or NULL in case of error.
 */
struct full_ns0_openDoveNetwork *xmlTextReaderReadNs0OpenDoveNetworkElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveNetwork *_openDoveNetwork = NULL;

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "openDoveNetwork", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Attempting to read root element {}openDoveNetwork.\n");
#endif
    _openDoveNetwork = xmlTextReaderReadNs0OpenDoveNetworkType(reader);
  }
#if DEBUG_ENUNCIATE
  if (_openDoveNetwork == NULL) {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      printf("attempt to read {}openDoveNetwork failed. current element: {}%s\n",  xmlTextReaderConstLocalName(reader));
    }
    else {
      printf("attempt to read {}openDoveNetwork failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
    }
  }
#endif

  return _openDoveNetwork;
}

/**
 * Writes a OpenDoveNetwork to XML under element name "openDoveNetwork".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveNetwork The OpenDoveNetwork to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveNetworkElement(xmlTextWriterPtr writer, struct full_ns0_openDoveNetwork *_openDoveNetwork) {
  return xmlTextWriterWriteNs0OpenDoveNetworkElementNS(writer, _openDoveNetwork, 0);
}

/**
 * Writes a OpenDoveNetwork to XML under element name "openDoveNetwork".
 *
 * @param writer The XML writer.
 * @param _openDoveNetwork The OpenDoveNetwork to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveNetworkElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveNetwork *_openDoveNetwork, int writeNamespaces) {
  int totalBytes = 0;
  int status;

  status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveNetwork", NULL);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write start element {}openDoveNetwork. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

#if DEBUG_ENUNCIATE > 1
  printf("writing type {}openDoveNetwork for root element {}openDoveNetwork...\n");
#endif
  status = xmlTextWriterWriteNs0OpenDoveNetworkType(writer, _openDoveNetwork);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write type for start element {}openDoveNetwork. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  status = xmlTextWriterEndElement(writer);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to end element {}openDoveNetwork. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveNetwork.
 *
 * @param _openDoveNetwork The OpenDoveNetwork whose children are to be free.
 */
static void freeNs0OpenDoveNetworkElement(struct full_ns0_openDoveNetwork *_openDoveNetwork) {
  freeNs0OpenDoveNetworkType(_openDoveNetwork);
}

/**
 * Reads a OpenDoveNetwork from XML. The reader is assumed to be at the start element.
 *
 * @return the OpenDoveNetwork, or NULL in case of error.
 */
static struct full_ns0_openDoveNetwork *xmlTextReaderReadNs0OpenDoveNetworkType(xmlTextReaderPtr reader) {
  int status, depth;
  void *_child_accessor;
  struct full_ns0_openDoveNetwork *_openDoveNetwork = calloc(1, sizeof(struct full_ns0_openDoveNetwork));



  if (xmlTextReaderIsEmptyElement(reader) == 0) {
    depth = xmlTextReaderDepth(reader);//track the depth.
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);

    while (xmlTextReaderDepth(reader) > depth) {
      if (status < 1) {
        //panic: XML read error.
#if DEBUG_ENUNCIATE
        printf("Failure to advance to next child element.\n");
#endif
        freeNs0OpenDoveNetworkType(_openDoveNetwork);
        free(_openDoveNetwork);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "type", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}type of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}type of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveNetworkType(_openDoveNetwork);
          free(_openDoveNetwork);
          return NULL;
        }

        _openDoveNetwork->networkType = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "is_tombstone", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}is_tombstone of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
        _child_accessor = xmlTextReaderReadXsBooleanType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}is_tombstone of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveNetworkType(_openDoveNetwork);
          free(_openDoveNetwork);
          return NULL;
        }

        _openDoveNetwork->tombstoneFlag = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveNetworkType(_openDoveNetwork);
          free(_openDoveNetwork);
          return NULL;
        }

        _openDoveNetwork->uuid = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "change_version", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}change_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}change_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveNetworkType(_openDoveNetwork);
          free(_openDoveNetwork);
          return NULL;
        }

        _openDoveNetwork->lastChangeVersion = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "domain_uuid", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}domain_uuid of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}domain_uuid of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveNetworkType(_openDoveNetwork);
          free(_openDoveNetwork);
          return NULL;
        }

        _openDoveNetwork->domain_uuid = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveNetworkType(_openDoveNetwork);
          free(_openDoveNetwork);
          return NULL;
        }

        _openDoveNetwork->name = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "create_version", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}create_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}create_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveNetworkType(_openDoveNetwork);
          free(_openDoveNetwork);
          return NULL;
        }

        _openDoveNetwork->createVersion = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "network_id", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}network_id of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}network_id of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveNetworkType(_openDoveNetwork);
          free(_openDoveNetwork);
          return NULL;
        }

        _openDoveNetwork->vnid = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else {
#if DEBUG_ENUNCIATE > 1
        if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
          printf("unknown child element {}%s for type {}openDoveNetwork.  Skipping...\n",  xmlTextReaderConstLocalName(reader));
        }
        else {
          printf("unknown child element {%s}%s for type {}openDoveNetwork. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
        }
#endif
        status = xmlTextReaderSkipElement(reader);
      }
    }
  }

  return _openDoveNetwork;
}

/**
 * Writes a OpenDoveNetwork to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveNetwork The OpenDoveNetwork to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveNetworkType(xmlTextWriterPtr writer, struct full_ns0_openDoveNetwork *_openDoveNetwork) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveNetwork->networkType != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "type", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}type. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}type...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveNetwork->networkType));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}type. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}type. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveNetwork->tombstoneFlag != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "is_tombstone", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}is_tombstone...\n");
#endif
    status = xmlTextWriterWriteXsBooleanType(writer, (_openDoveNetwork->tombstoneFlag));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveNetwork->uuid != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "id", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}id...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveNetwork->uuid));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveNetwork->lastChangeVersion != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "change_version", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}change_version...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveNetwork->lastChangeVersion));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveNetwork->domain_uuid != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "domain_uuid", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}domain_uuid. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}domain_uuid...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveNetwork->domain_uuid));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}domain_uuid. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}domain_uuid. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveNetwork->name != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}name. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}name...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveNetwork->name));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}name. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}name. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveNetwork->createVersion != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "create_version", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}create_version...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveNetwork->createVersion));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveNetwork->vnid != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "network_id", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}network_id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}network_id...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveNetwork->vnid));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}network_id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}network_id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveNetwork.
 *
 * @param _openDoveNetwork The OpenDoveNetwork to free.
 */
static void freeNs0OpenDoveNetworkType(struct full_ns0_openDoveNetwork *_openDoveNetwork) {
  int i;
  if (_openDoveNetwork->networkType != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor networkType of type full_ns0_openDoveNetwork...\n");
#endif
    freeXsIntType(_openDoveNetwork->networkType);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor networkType of type full_ns0_openDoveNetwork...\n");
#endif
    free(_openDoveNetwork->networkType);
  }
  if (_openDoveNetwork->tombstoneFlag != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor tombstoneFlag of type full_ns0_openDoveNetwork...\n");
#endif
    freeXsBooleanType(_openDoveNetwork->tombstoneFlag);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor tombstoneFlag of type full_ns0_openDoveNetwork...\n");
#endif
    free(_openDoveNetwork->tombstoneFlag);
  }
  if (_openDoveNetwork->uuid != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor uuid of type full_ns0_openDoveNetwork...\n");
#endif
    freeXsStringType(_openDoveNetwork->uuid);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor uuid of type full_ns0_openDoveNetwork...\n");
#endif
    free(_openDoveNetwork->uuid);
  }
  if (_openDoveNetwork->lastChangeVersion != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor lastChangeVersion of type full_ns0_openDoveNetwork...\n");
#endif
    freeXsIntType(_openDoveNetwork->lastChangeVersion);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor lastChangeVersion of type full_ns0_openDoveNetwork...\n");
#endif
    free(_openDoveNetwork->lastChangeVersion);
  }
  if (_openDoveNetwork->domain_uuid != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor domain_uuid of type full_ns0_openDoveNetwork...\n");
#endif
    freeXsStringType(_openDoveNetwork->domain_uuid);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor domain_uuid of type full_ns0_openDoveNetwork...\n");
#endif
    free(_openDoveNetwork->domain_uuid);
  }
  if (_openDoveNetwork->name != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor name of type full_ns0_openDoveNetwork...\n");
#endif
    freeXsStringType(_openDoveNetwork->name);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor name of type full_ns0_openDoveNetwork...\n");
#endif
    free(_openDoveNetwork->name);
  }
  if (_openDoveNetwork->createVersion != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor createVersion of type full_ns0_openDoveNetwork...\n");
#endif
    freeXsIntType(_openDoveNetwork->createVersion);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor createVersion of type full_ns0_openDoveNetwork...\n");
#endif
    free(_openDoveNetwork->createVersion);
  }
  if (_openDoveNetwork->vnid != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor vnid of type full_ns0_openDoveNetwork...\n");
#endif
    freeXsIntType(_openDoveNetwork->vnid);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor vnid of type full_ns0_openDoveNetwork...\n");
#endif
    free(_openDoveNetwork->vnid);
  }
}
#endif /* DEF_full_ns0_openDoveNetwork_M */
#ifndef DEF_full_ns0_openDovePolicy_M
#define DEF_full_ns0_openDovePolicy_M

/**
 * Reads a OpenDovePolicy element from XML. The element to be read is "openDovePolicy", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDovePolicy, or NULL in case of error.
 */
struct full_ns0_openDovePolicy *xml_read_full_ns0_openDovePolicy(xmlTextReaderPtr reader) {
  int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
  return xmlTextReaderReadNs0OpenDovePolicyElement(reader);
}

/**
 * Writes a OpenDovePolicy to XML under element name "openDovePolicy".
 *
 * @param writer The XML writer.
 * @param _openDovePolicy The OpenDovePolicy to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDovePolicy(xmlTextWriterPtr writer, struct full_ns0_openDovePolicy *_openDovePolicy) {
  return xmlTextWriterWriteNs0OpenDovePolicyElementNS(writer, _openDovePolicy, 1);
}

/**
 * Frees a OpenDovePolicy.
 *
 * @param _openDovePolicy The OpenDovePolicy to free.
 */
void free_full_ns0_openDovePolicy(struct full_ns0_openDovePolicy *_openDovePolicy) {
  freeNs0OpenDovePolicyType(_openDovePolicy);
  free(_openDovePolicy);
}

/**
 * Reads a OpenDovePolicy element from XML. The element to be read is "openDovePolicy", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDovePolicy, or NULL in case of error.
 */
struct full_ns0_openDovePolicy *xmlTextReaderReadNs0OpenDovePolicyElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDovePolicy *_openDovePolicy = NULL;

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "openDovePolicy", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Attempting to read root element {}openDovePolicy.\n");
#endif
    _openDovePolicy = xmlTextReaderReadNs0OpenDovePolicyType(reader);
  }
#if DEBUG_ENUNCIATE
  if (_openDovePolicy == NULL) {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      printf("attempt to read {}openDovePolicy failed. current element: {}%s\n",  xmlTextReaderConstLocalName(reader));
    }
    else {
      printf("attempt to read {}openDovePolicy failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
    }
  }
#endif

  return _openDovePolicy;
}

/**
 * Writes a OpenDovePolicy to XML under element name "openDovePolicy".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDovePolicy The OpenDovePolicy to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDovePolicyElement(xmlTextWriterPtr writer, struct full_ns0_openDovePolicy *_openDovePolicy) {
  return xmlTextWriterWriteNs0OpenDovePolicyElementNS(writer, _openDovePolicy, 0);
}

/**
 * Writes a OpenDovePolicy to XML under element name "openDovePolicy".
 *
 * @param writer The XML writer.
 * @param _openDovePolicy The OpenDovePolicy to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDovePolicyElementNS(xmlTextWriterPtr writer, struct full_ns0_openDovePolicy *_openDovePolicy, int writeNamespaces) {
  int totalBytes = 0;
  int status;

  status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDovePolicy", NULL);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write start element {}openDovePolicy. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

#if DEBUG_ENUNCIATE > 1
  printf("writing type {}openDovePolicy for root element {}openDovePolicy...\n");
#endif
  status = xmlTextWriterWriteNs0OpenDovePolicyType(writer, _openDovePolicy);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write type for start element {}openDovePolicy. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  status = xmlTextWriterEndElement(writer);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to end element {}openDovePolicy. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  return totalBytes;
}

/**
 * Frees the children of a OpenDovePolicy.
 *
 * @param _openDovePolicy The OpenDovePolicy whose children are to be free.
 */
static void freeNs0OpenDovePolicyElement(struct full_ns0_openDovePolicy *_openDovePolicy) {
  freeNs0OpenDovePolicyType(_openDovePolicy);
}

/**
 * Reads a OpenDovePolicy from XML. The reader is assumed to be at the start element.
 *
 * @return the OpenDovePolicy, or NULL in case of error.
 */
static struct full_ns0_openDovePolicy *xmlTextReaderReadNs0OpenDovePolicyType(xmlTextReaderPtr reader) {
  int status, depth;
  void *_child_accessor;
  struct full_ns0_openDovePolicy *_openDovePolicy = calloc(1, sizeof(struct full_ns0_openDovePolicy));



  if (xmlTextReaderIsEmptyElement(reader) == 0) {
    depth = xmlTextReaderDepth(reader);//track the depth.
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);

    while (xmlTextReaderDepth(reader) > depth) {
      if (status < 1) {
        //panic: XML read error.
#if DEBUG_ENUNCIATE
        printf("Failure to advance to next child element.\n");
#endif
        freeNs0OpenDovePolicyType(_openDovePolicy);
        free(_openDovePolicy);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "change_version", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}change_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}change_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDovePolicyType(_openDovePolicy);
          free(_openDovePolicy);
          return NULL;
        }

        _openDovePolicy->lastChangeVersion = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "create_version", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}create_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}create_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDovePolicyType(_openDovePolicy);
          free(_openDovePolicy);
          return NULL;
        }

        _openDovePolicy->createVersion = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "is_tombstone", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}is_tombstone of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
        _child_accessor = xmlTextReaderReadXsBooleanType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}is_tombstone of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDovePolicyType(_openDovePolicy);
          free(_openDovePolicy);
          return NULL;
        }

        _openDovePolicy->tombstoneFlag = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "type", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}type of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}type of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDovePolicyType(_openDovePolicy);
          free(_openDovePolicy);
          return NULL;
        }

        _openDovePolicy->policyType = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "action", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}action of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}action of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDovePolicyType(_openDovePolicy);
          free(_openDovePolicy);
          return NULL;
        }

        _openDovePolicy->policyAction = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "traffic_type", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}traffic_type of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}traffic_type of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDovePolicyType(_openDovePolicy);
          free(_openDovePolicy);
          return NULL;
        }

        _openDovePolicy->trafficType = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "src_network", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}src_network of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}src_network of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDovePolicyType(_openDovePolicy);
          free(_openDovePolicy);
          return NULL;
        }

        _openDovePolicy->sourceVNID = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "ttl", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ttl of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}ttl of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDovePolicyType(_openDovePolicy);
          free(_openDovePolicy);
          return NULL;
        }

        _openDovePolicy->timeToLive = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "dst_network", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}dst_network of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}dst_network of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDovePolicyType(_openDovePolicy);
          free(_openDovePolicy);
          return NULL;
        }

        _openDovePolicy->destinationVNID = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "domain_uuid", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}domain_uuid of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}domain_uuid of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDovePolicyType(_openDovePolicy);
          free(_openDovePolicy);
          return NULL;
        }

        _openDovePolicy->domainUUID = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDovePolicyType(_openDovePolicy);
          free(_openDovePolicy);
          return NULL;
        }

        _openDovePolicy->uuid = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else {
#if DEBUG_ENUNCIATE > 1
        if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
          printf("unknown child element {}%s for type {}openDovePolicy.  Skipping...\n",  xmlTextReaderConstLocalName(reader));
        }
        else {
          printf("unknown child element {%s}%s for type {}openDovePolicy. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
        }
#endif
        status = xmlTextReaderSkipElement(reader);
      }
    }
  }

  return _openDovePolicy;
}

/**
 * Writes a OpenDovePolicy to XML.
 *
 * @param writer The XML writer.
 * @param _openDovePolicy The OpenDovePolicy to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDovePolicyType(xmlTextWriterPtr writer, struct full_ns0_openDovePolicy *_openDovePolicy) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDovePolicy->lastChangeVersion != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "change_version", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}change_version...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDovePolicy->lastChangeVersion));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDovePolicy->createVersion != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "create_version", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}create_version...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDovePolicy->createVersion));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDovePolicy->tombstoneFlag != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "is_tombstone", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}is_tombstone...\n");
#endif
    status = xmlTextWriterWriteXsBooleanType(writer, (_openDovePolicy->tombstoneFlag));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDovePolicy->policyType != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "type", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}type. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}type...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDovePolicy->policyType));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}type. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}type. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDovePolicy->policyAction != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "action", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}action. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}action...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDovePolicy->policyAction));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}action. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}action. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDovePolicy->trafficType != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "traffic_type", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}traffic_type. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}traffic_type...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDovePolicy->trafficType));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}traffic_type. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}traffic_type. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDovePolicy->sourceVNID != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "src_network", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}src_network. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}src_network...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDovePolicy->sourceVNID));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}src_network. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}src_network. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDovePolicy->timeToLive != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ttl", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ttl. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}ttl...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDovePolicy->timeToLive));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}ttl. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ttl. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDovePolicy->destinationVNID != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dst_network", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}dst_network. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}dst_network...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDovePolicy->destinationVNID));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}dst_network. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}dst_network. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDovePolicy->domainUUID != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "domain_uuid", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}domain_uuid. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}domain_uuid...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDovePolicy->domainUUID));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}domain_uuid. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}domain_uuid. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDovePolicy->uuid != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "id", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}id...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDovePolicy->uuid));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }

  return totalBytes;
}

/**
 * Frees the elements of a OpenDovePolicy.
 *
 * @param _openDovePolicy The OpenDovePolicy to free.
 */
static void freeNs0OpenDovePolicyType(struct full_ns0_openDovePolicy *_openDovePolicy) {
  int i;
  if (_openDovePolicy->lastChangeVersion != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor lastChangeVersion of type full_ns0_openDovePolicy...\n");
#endif
    freeXsIntType(_openDovePolicy->lastChangeVersion);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor lastChangeVersion of type full_ns0_openDovePolicy...\n");
#endif
    free(_openDovePolicy->lastChangeVersion);
  }
  if (_openDovePolicy->createVersion != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor createVersion of type full_ns0_openDovePolicy...\n");
#endif
    freeXsIntType(_openDovePolicy->createVersion);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor createVersion of type full_ns0_openDovePolicy...\n");
#endif
    free(_openDovePolicy->createVersion);
  }
  if (_openDovePolicy->tombstoneFlag != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor tombstoneFlag of type full_ns0_openDovePolicy...\n");
#endif
    freeXsBooleanType(_openDovePolicy->tombstoneFlag);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor tombstoneFlag of type full_ns0_openDovePolicy...\n");
#endif
    free(_openDovePolicy->tombstoneFlag);
  }
  if (_openDovePolicy->policyType != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor policyType of type full_ns0_openDovePolicy...\n");
#endif
    freeXsIntType(_openDovePolicy->policyType);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor policyType of type full_ns0_openDovePolicy...\n");
#endif
    free(_openDovePolicy->policyType);
  }
  if (_openDovePolicy->policyAction != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor policyAction of type full_ns0_openDovePolicy...\n");
#endif
    freeXsIntType(_openDovePolicy->policyAction);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor policyAction of type full_ns0_openDovePolicy...\n");
#endif
    free(_openDovePolicy->policyAction);
  }
  if (_openDovePolicy->trafficType != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor trafficType of type full_ns0_openDovePolicy...\n");
#endif
    freeXsIntType(_openDovePolicy->trafficType);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor trafficType of type full_ns0_openDovePolicy...\n");
#endif
    free(_openDovePolicy->trafficType);
  }
  if (_openDovePolicy->sourceVNID != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor sourceVNID of type full_ns0_openDovePolicy...\n");
#endif
    freeXsIntType(_openDovePolicy->sourceVNID);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor sourceVNID of type full_ns0_openDovePolicy...\n");
#endif
    free(_openDovePolicy->sourceVNID);
  }
  if (_openDovePolicy->timeToLive != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor timeToLive of type full_ns0_openDovePolicy...\n");
#endif
    freeXsIntType(_openDovePolicy->timeToLive);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor timeToLive of type full_ns0_openDovePolicy...\n");
#endif
    free(_openDovePolicy->timeToLive);
  }
  if (_openDovePolicy->destinationVNID != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor destinationVNID of type full_ns0_openDovePolicy...\n");
#endif
    freeXsIntType(_openDovePolicy->destinationVNID);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor destinationVNID of type full_ns0_openDovePolicy...\n");
#endif
    free(_openDovePolicy->destinationVNID);
  }
  if (_openDovePolicy->domainUUID != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor domainUUID of type full_ns0_openDovePolicy...\n");
#endif
    freeXsStringType(_openDovePolicy->domainUUID);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor domainUUID of type full_ns0_openDovePolicy...\n");
#endif
    free(_openDovePolicy->domainUUID);
  }
  if (_openDovePolicy->uuid != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor uuid of type full_ns0_openDovePolicy...\n");
#endif
    freeXsStringType(_openDovePolicy->uuid);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor uuid of type full_ns0_openDovePolicy...\n");
#endif
    free(_openDovePolicy->uuid);
  }
}
#endif /* DEF_full_ns0_openDovePolicy_M */
#ifndef DEF_full_ns0_openDoveServiceAppliance_M
#define DEF_full_ns0_openDoveServiceAppliance_M

/**
 * Reads a OpenDoveServiceAppliance element from XML. The element to be read is "openDoveServiceAppliance", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveServiceAppliance, or NULL in case of error.
 */
struct full_ns0_openDoveServiceAppliance *xml_read_full_ns0_openDoveServiceAppliance(xmlTextReaderPtr reader) {
  int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
  return xmlTextReaderReadNs0OpenDoveServiceApplianceElement(reader);
}

/**
 * Writes a OpenDoveServiceAppliance to XML under element name "openDoveServiceAppliance".
 *
 * @param writer The XML writer.
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveServiceAppliance(xmlTextWriterPtr writer, struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance) {
  return xmlTextWriterWriteNs0OpenDoveServiceApplianceElementNS(writer, _openDoveServiceAppliance, 1);
}

/**
 * Frees a OpenDoveServiceAppliance.
 *
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance to free.
 */
void free_full_ns0_openDoveServiceAppliance(struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance) {
  freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
  free(_openDoveServiceAppliance);
}

/**
 * Reads a OpenDoveServiceAppliance element from XML. The element to be read is "openDoveServiceAppliance", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveServiceAppliance, or NULL in case of error.
 */
struct full_ns0_openDoveServiceAppliance *xmlTextReaderReadNs0OpenDoveServiceApplianceElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance = NULL;

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "openDoveServiceAppliance", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Attempting to read root element {}openDoveServiceAppliance.\n");
#endif
    _openDoveServiceAppliance = xmlTextReaderReadNs0OpenDoveServiceApplianceType(reader);
  }
#if DEBUG_ENUNCIATE
  if (_openDoveServiceAppliance == NULL) {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      printf("attempt to read {}openDoveServiceAppliance failed. current element: {}%s\n",  xmlTextReaderConstLocalName(reader));
    }
    else {
      printf("attempt to read {}openDoveServiceAppliance failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
    }
  }
#endif

  return _openDoveServiceAppliance;
}

/**
 * Writes a OpenDoveServiceAppliance to XML under element name "openDoveServiceAppliance".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveServiceApplianceElement(xmlTextWriterPtr writer, struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance) {
  return xmlTextWriterWriteNs0OpenDoveServiceApplianceElementNS(writer, _openDoveServiceAppliance, 0);
}

/**
 * Writes a OpenDoveServiceAppliance to XML under element name "openDoveServiceAppliance".
 *
 * @param writer The XML writer.
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveServiceApplianceElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance, int writeNamespaces) {
  int totalBytes = 0;
  int status;

  status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveServiceAppliance", NULL);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write start element {}openDoveServiceAppliance. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

#if DEBUG_ENUNCIATE > 1
  printf("writing type {}openDoveServiceAppliance for root element {}openDoveServiceAppliance...\n");
#endif
  status = xmlTextWriterWriteNs0OpenDoveServiceApplianceType(writer, _openDoveServiceAppliance);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write type for start element {}openDoveServiceAppliance. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  status = xmlTextWriterEndElement(writer);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to end element {}openDoveServiceAppliance. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveServiceAppliance.
 *
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance whose children are to be free.
 */
static void freeNs0OpenDoveServiceApplianceElement(struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance) {
  freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
}

/**
 * Reads a OpenDoveServiceAppliance from XML. The reader is assumed to be at the start element.
 *
 * @return the OpenDoveServiceAppliance, or NULL in case of error.
 */
static struct full_ns0_openDoveServiceAppliance *xmlTextReaderReadNs0OpenDoveServiceApplianceType(xmlTextReaderPtr reader) {
  int status, depth;
  void *_child_accessor;
  struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance = calloc(1, sizeof(struct full_ns0_openDoveServiceAppliance));



  if (xmlTextReaderIsEmptyElement(reader) == 0) {
    depth = xmlTextReaderDepth(reader);//track the depth.
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);

    while (xmlTextReaderDepth(reader) > depth) {
      if (status < 1) {
        //panic: XML read error.
#if DEBUG_ENUNCIATE
        printf("Failure to advance to next child element.\n");
#endif
        freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
        free(_openDoveServiceAppliance);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "dcs_rest_service_port", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}dcs_rest_service_port of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}dcs_rest_service_port of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
          free(_openDoveServiceAppliance);
          return NULL;
        }

        _openDoveServiceAppliance->dcs_rest_service_port = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "dcs_config_version", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}dcs_config_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}dcs_config_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
          free(_openDoveServiceAppliance);
          return NULL;
        }

        _openDoveServiceAppliance->dcs_config_version = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "isDGW", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}isDGW of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
        _child_accessor = xmlTextReaderReadXsBooleanType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}isDGW of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
          free(_openDoveServiceAppliance);
          return NULL;
        }

        _openDoveServiceAppliance->isDGW = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "build_version", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}build_version of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}build_version of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
          free(_openDoveServiceAppliance);
          return NULL;
        }

        _openDoveServiceAppliance->build_version = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "ip_family", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ip_family of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}ip_family of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
          free(_openDoveServiceAppliance);
          return NULL;
        }

        _openDoveServiceAppliance->ip_family = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "canBeDCS", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}canBeDCS of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
        _child_accessor = xmlTextReaderReadXsBooleanType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}canBeDCS of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
          free(_openDoveServiceAppliance);
          return NULL;
        }

        _openDoveServiceAppliance->canBeDCS = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "canBeDGW", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}canBeDGW of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
        _child_accessor = xmlTextReaderReadXsBooleanType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}canBeDGW of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
          free(_openDoveServiceAppliance);
          return NULL;
        }

        _openDoveServiceAppliance->canBeDGW = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "isDCS", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}isDCS of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
        _child_accessor = xmlTextReaderReadXsBooleanType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}isDCS of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
          free(_openDoveServiceAppliance);
          return NULL;
        }

        _openDoveServiceAppliance->isDCS = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "dgw_config_version", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}dgw_config_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}dgw_config_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
          free(_openDoveServiceAppliance);
          return NULL;
        }

        _openDoveServiceAppliance->dgw_config_version = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "ip", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ip of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}ip of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
          free(_openDoveServiceAppliance);
          return NULL;
        }

        _openDoveServiceAppliance->ip = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "dcs_raw_service_port", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}dcs_raw_service_port of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}dcs_raw_service_port of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
          free(_openDoveServiceAppliance);
          return NULL;
        }

        _openDoveServiceAppliance->dcs_raw_service_port = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "uuid", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}uuid of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}uuid of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
          free(_openDoveServiceAppliance);
          return NULL;
        }

        _openDoveServiceAppliance->uuid = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "dgw_rest_service_port", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}dgw_rest_service_port of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}dgw_rest_service_port of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
          free(_openDoveServiceAppliance);
          return NULL;
        }

        _openDoveServiceAppliance->dgw_rest_service_port = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "timestamp", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}timestamp of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}timestamp of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceType(_openDoveServiceAppliance);
          free(_openDoveServiceAppliance);
          return NULL;
        }

        _openDoveServiceAppliance->timestamp = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else {
#if DEBUG_ENUNCIATE > 1
        if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
          printf("unknown child element {}%s for type {}openDoveServiceAppliance.  Skipping...\n",  xmlTextReaderConstLocalName(reader));
        }
        else {
          printf("unknown child element {%s}%s for type {}openDoveServiceAppliance. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
        }
#endif
        status = xmlTextReaderSkipElement(reader);
      }
    }
  }

  return _openDoveServiceAppliance;
}

/**
 * Writes a OpenDoveServiceAppliance to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveServiceApplianceType(xmlTextWriterPtr writer, struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveServiceAppliance->dcs_rest_service_port != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dcs_rest_service_port", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}dcs_rest_service_port. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}dcs_rest_service_port...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveServiceAppliance->dcs_rest_service_port));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}dcs_rest_service_port. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}dcs_rest_service_port. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveServiceAppliance->dcs_config_version != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dcs_config_version", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}dcs_config_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}dcs_config_version...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveServiceAppliance->dcs_config_version));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}dcs_config_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}dcs_config_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveServiceAppliance->isDGW != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "isDGW", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}isDGW. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}isDGW...\n");
#endif
    status = xmlTextWriterWriteXsBooleanType(writer, (_openDoveServiceAppliance->isDGW));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}isDGW. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}isDGW. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveServiceAppliance->build_version != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "build_version", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}build_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}build_version...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveServiceAppliance->build_version));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}build_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}build_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveServiceAppliance->ip_family != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ip_family", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ip_family. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}ip_family...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveServiceAppliance->ip_family));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}ip_family. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ip_family. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveServiceAppliance->canBeDCS != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "canBeDCS", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}canBeDCS. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}canBeDCS...\n");
#endif
    status = xmlTextWriterWriteXsBooleanType(writer, (_openDoveServiceAppliance->canBeDCS));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}canBeDCS. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}canBeDCS. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveServiceAppliance->canBeDGW != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "canBeDGW", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}canBeDGW. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}canBeDGW...\n");
#endif
    status = xmlTextWriterWriteXsBooleanType(writer, (_openDoveServiceAppliance->canBeDGW));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}canBeDGW. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}canBeDGW. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveServiceAppliance->isDCS != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "isDCS", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}isDCS. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}isDCS...\n");
#endif
    status = xmlTextWriterWriteXsBooleanType(writer, (_openDoveServiceAppliance->isDCS));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}isDCS. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}isDCS. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveServiceAppliance->dgw_config_version != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dgw_config_version", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}dgw_config_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}dgw_config_version...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveServiceAppliance->dgw_config_version));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}dgw_config_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}dgw_config_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveServiceAppliance->ip != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ip", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}ip...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveServiceAppliance->ip));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveServiceAppliance->dcs_raw_service_port != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dcs_raw_service_port", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}dcs_raw_service_port. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}dcs_raw_service_port...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveServiceAppliance->dcs_raw_service_port));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}dcs_raw_service_port. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}dcs_raw_service_port. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveServiceAppliance->uuid != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "uuid", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}uuid. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}uuid...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveServiceAppliance->uuid));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}uuid. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}uuid. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveServiceAppliance->dgw_rest_service_port != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dgw_rest_service_port", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}dgw_rest_service_port. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}dgw_rest_service_port...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveServiceAppliance->dgw_rest_service_port));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}dgw_rest_service_port. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}dgw_rest_service_port. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveServiceAppliance->timestamp != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "timestamp", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}timestamp. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}timestamp...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveServiceAppliance->timestamp));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}timestamp. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}timestamp. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveServiceAppliance.
 *
 * @param _openDoveServiceAppliance The OpenDoveServiceAppliance to free.
 */
static void freeNs0OpenDoveServiceApplianceType(struct full_ns0_openDoveServiceAppliance *_openDoveServiceAppliance) {
  int i;
  if (_openDoveServiceAppliance->dcs_rest_service_port != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor dcs_rest_service_port of type full_ns0_openDoveServiceAppliance...\n");
#endif
    freeXsIntType(_openDoveServiceAppliance->dcs_rest_service_port);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor dcs_rest_service_port of type full_ns0_openDoveServiceAppliance...\n");
#endif
    free(_openDoveServiceAppliance->dcs_rest_service_port);
  }
  if (_openDoveServiceAppliance->dcs_config_version != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor dcs_config_version of type full_ns0_openDoveServiceAppliance...\n");
#endif
    freeXsIntType(_openDoveServiceAppliance->dcs_config_version);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor dcs_config_version of type full_ns0_openDoveServiceAppliance...\n");
#endif
    free(_openDoveServiceAppliance->dcs_config_version);
  }
  if (_openDoveServiceAppliance->isDGW != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor isDGW of type full_ns0_openDoveServiceAppliance...\n");
#endif
    freeXsBooleanType(_openDoveServiceAppliance->isDGW);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor isDGW of type full_ns0_openDoveServiceAppliance...\n");
#endif
    free(_openDoveServiceAppliance->isDGW);
  }
  if (_openDoveServiceAppliance->build_version != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor build_version of type full_ns0_openDoveServiceAppliance...\n");
#endif
    freeXsStringType(_openDoveServiceAppliance->build_version);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor build_version of type full_ns0_openDoveServiceAppliance...\n");
#endif
    free(_openDoveServiceAppliance->build_version);
  }
  if (_openDoveServiceAppliance->ip_family != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ip_family of type full_ns0_openDoveServiceAppliance...\n");
#endif
    freeXsIntType(_openDoveServiceAppliance->ip_family);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ip_family of type full_ns0_openDoveServiceAppliance...\n");
#endif
    free(_openDoveServiceAppliance->ip_family);
  }
  if (_openDoveServiceAppliance->canBeDCS != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor canBeDCS of type full_ns0_openDoveServiceAppliance...\n");
#endif
    freeXsBooleanType(_openDoveServiceAppliance->canBeDCS);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor canBeDCS of type full_ns0_openDoveServiceAppliance...\n");
#endif
    free(_openDoveServiceAppliance->canBeDCS);
  }
  if (_openDoveServiceAppliance->canBeDGW != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor canBeDGW of type full_ns0_openDoveServiceAppliance...\n");
#endif
    freeXsBooleanType(_openDoveServiceAppliance->canBeDGW);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor canBeDGW of type full_ns0_openDoveServiceAppliance...\n");
#endif
    free(_openDoveServiceAppliance->canBeDGW);
  }
  if (_openDoveServiceAppliance->isDCS != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor isDCS of type full_ns0_openDoveServiceAppliance...\n");
#endif
    freeXsBooleanType(_openDoveServiceAppliance->isDCS);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor isDCS of type full_ns0_openDoveServiceAppliance...\n");
#endif
    free(_openDoveServiceAppliance->isDCS);
  }
  if (_openDoveServiceAppliance->dgw_config_version != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor dgw_config_version of type full_ns0_openDoveServiceAppliance...\n");
#endif
    freeXsIntType(_openDoveServiceAppliance->dgw_config_version);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor dgw_config_version of type full_ns0_openDoveServiceAppliance...\n");
#endif
    free(_openDoveServiceAppliance->dgw_config_version);
  }
  if (_openDoveServiceAppliance->ip != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ip of type full_ns0_openDoveServiceAppliance...\n");
#endif
    freeXsStringType(_openDoveServiceAppliance->ip);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ip of type full_ns0_openDoveServiceAppliance...\n");
#endif
    free(_openDoveServiceAppliance->ip);
  }
  if (_openDoveServiceAppliance->dcs_raw_service_port != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor dcs_raw_service_port of type full_ns0_openDoveServiceAppliance...\n");
#endif
    freeXsIntType(_openDoveServiceAppliance->dcs_raw_service_port);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor dcs_raw_service_port of type full_ns0_openDoveServiceAppliance...\n");
#endif
    free(_openDoveServiceAppliance->dcs_raw_service_port);
  }
  if (_openDoveServiceAppliance->uuid != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor uuid of type full_ns0_openDoveServiceAppliance...\n");
#endif
    freeXsStringType(_openDoveServiceAppliance->uuid);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor uuid of type full_ns0_openDoveServiceAppliance...\n");
#endif
    free(_openDoveServiceAppliance->uuid);
  }
  if (_openDoveServiceAppliance->dgw_rest_service_port != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor dgw_rest_service_port of type full_ns0_openDoveServiceAppliance...\n");
#endif
    freeXsIntType(_openDoveServiceAppliance->dgw_rest_service_port);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor dgw_rest_service_port of type full_ns0_openDoveServiceAppliance...\n");
#endif
    free(_openDoveServiceAppliance->dgw_rest_service_port);
  }
  if (_openDoveServiceAppliance->timestamp != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor timestamp of type full_ns0_openDoveServiceAppliance...\n");
#endif
    freeXsStringType(_openDoveServiceAppliance->timestamp);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor timestamp of type full_ns0_openDoveServiceAppliance...\n");
#endif
    free(_openDoveServiceAppliance->timestamp);
  }
}
#endif /* DEF_full_ns0_openDoveServiceAppliance_M */
#ifndef DEF_full_ns0_openDoveSubnet_M
#define DEF_full_ns0_openDoveSubnet_M

/**
 * Reads a OpenDoveSubnet element from XML. The element to be read is "openDoveSubnet", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveSubnet, or NULL in case of error.
 */
struct full_ns0_openDoveSubnet *xml_read_full_ns0_openDoveSubnet(xmlTextReaderPtr reader) {
  int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
  return xmlTextReaderReadNs0OpenDoveSubnetElement(reader);
}

/**
 * Writes a OpenDoveSubnet to XML under element name "openDoveSubnet".
 *
 * @param writer The XML writer.
 * @param _openDoveSubnet The OpenDoveSubnet to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveSubnet(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnet *_openDoveSubnet) {
  return xmlTextWriterWriteNs0OpenDoveSubnetElementNS(writer, _openDoveSubnet, 1);
}

/**
 * Frees a OpenDoveSubnet.
 *
 * @param _openDoveSubnet The OpenDoveSubnet to free.
 */
void free_full_ns0_openDoveSubnet(struct full_ns0_openDoveSubnet *_openDoveSubnet) {
  freeNs0OpenDoveSubnetType(_openDoveSubnet);
  free(_openDoveSubnet);
}

/**
 * Reads a OpenDoveSubnet element from XML. The element to be read is "openDoveSubnet", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveSubnet, or NULL in case of error.
 */
struct full_ns0_openDoveSubnet *xmlTextReaderReadNs0OpenDoveSubnetElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveSubnet *_openDoveSubnet = NULL;

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "openDoveSubnet", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Attempting to read root element {}openDoveSubnet.\n");
#endif
    _openDoveSubnet = xmlTextReaderReadNs0OpenDoveSubnetType(reader);
  }
#if DEBUG_ENUNCIATE
  if (_openDoveSubnet == NULL) {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      printf("attempt to read {}openDoveSubnet failed. current element: {}%s\n",  xmlTextReaderConstLocalName(reader));
    }
    else {
      printf("attempt to read {}openDoveSubnet failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
    }
  }
#endif

  return _openDoveSubnet;
}

/**
 * Writes a OpenDoveSubnet to XML under element name "openDoveSubnet".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveSubnet The OpenDoveSubnet to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveSubnetElement(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnet *_openDoveSubnet) {
  return xmlTextWriterWriteNs0OpenDoveSubnetElementNS(writer, _openDoveSubnet, 0);
}

/**
 * Writes a OpenDoveSubnet to XML under element name "openDoveSubnet".
 *
 * @param writer The XML writer.
 * @param _openDoveSubnet The OpenDoveSubnet to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveSubnetElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnet *_openDoveSubnet, int writeNamespaces) {
  int totalBytes = 0;
  int status;

  status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveSubnet", NULL);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write start element {}openDoveSubnet. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

#if DEBUG_ENUNCIATE > 1
  printf("writing type {}openDoveSubnet for root element {}openDoveSubnet...\n");
#endif
  status = xmlTextWriterWriteNs0OpenDoveSubnetType(writer, _openDoveSubnet);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write type for start element {}openDoveSubnet. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  status = xmlTextWriterEndElement(writer);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to end element {}openDoveSubnet. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveSubnet.
 *
 * @param _openDoveSubnet The OpenDoveSubnet whose children are to be free.
 */
static void freeNs0OpenDoveSubnetElement(struct full_ns0_openDoveSubnet *_openDoveSubnet) {
  freeNs0OpenDoveSubnetType(_openDoveSubnet);
}

/**
 * Reads a OpenDoveSubnet from XML. The reader is assumed to be at the start element.
 *
 * @return the OpenDoveSubnet, or NULL in case of error.
 */
static struct full_ns0_openDoveSubnet *xmlTextReaderReadNs0OpenDoveSubnetType(xmlTextReaderPtr reader) {
  int status, depth;
  void *_child_accessor;
  struct full_ns0_openDoveSubnet *_openDoveSubnet = calloc(1, sizeof(struct full_ns0_openDoveSubnet));



  if (xmlTextReaderIsEmptyElement(reader) == 0) {
    depth = xmlTextReaderDepth(reader);//track the depth.
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);

    while (xmlTextReaderDepth(reader) > depth) {
      if (status < 1) {
        //panic: XML read error.
#if DEBUG_ENUNCIATE
        printf("Failure to advance to next child element.\n");
#endif
        freeNs0OpenDoveSubnetType(_openDoveSubnet);
        free(_openDoveSubnet);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "domain_id", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}domain_id of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}domain_id of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSubnetType(_openDoveSubnet);
          free(_openDoveSubnet);
          return NULL;
        }

        _openDoveSubnet->domainUUID = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "subnet", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}subnet of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}subnet of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSubnetType(_openDoveSubnet);
          free(_openDoveSubnet);
          return NULL;
        }

        _openDoveSubnet->subnet = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "change_version", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}change_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}change_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSubnetType(_openDoveSubnet);
          free(_openDoveSubnet);
          return NULL;
        }

        _openDoveSubnet->lastChangeVersion = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "type", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}type of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}type of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSubnetType(_openDoveSubnet);
          free(_openDoveSubnet);
          return NULL;
        }

        _openDoveSubnet->subnetType = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "network_ids", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}network_ids of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}network_ids of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSubnetType(_openDoveSubnet);
          free(_openDoveSubnet);
          return NULL;
        }

        _openDoveSubnet->networkUUIDs = realloc(_openDoveSubnet->networkUUIDs, (_openDoveSubnet->_sizeof_networkUUIDs + 1) * sizeof(xmlChar));
        memcpy(&(_openDoveSubnet->networkUUIDs[_openDoveSubnet->_sizeof_networkUUIDs++]), _child_accessor, sizeof(xmlChar));
        free(_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "create_version", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}create_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}create_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSubnetType(_openDoveSubnet);
          free(_openDoveSubnet);
          return NULL;
        }

        _openDoveSubnet->createVersion = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSubnetType(_openDoveSubnet);
          free(_openDoveSubnet);
          return NULL;
        }

        _openDoveSubnet->uuid = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "nexthop", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}nexthop of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}nexthop of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSubnetType(_openDoveSubnet);
          free(_openDoveSubnet);
          return NULL;
        }

        _openDoveSubnet->nexthop = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "is_tombstone", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}is_tombstone of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
        _child_accessor = xmlTextReaderReadXsBooleanType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}is_tombstone of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSubnetType(_openDoveSubnet);
          free(_openDoveSubnet);
          return NULL;
        }

        _openDoveSubnet->tombstoneFlag = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "mask", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}mask of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}mask of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSubnetType(_openDoveSubnet);
          free(_openDoveSubnet);
          return NULL;
        }

        _openDoveSubnet->mask = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else {
#if DEBUG_ENUNCIATE > 1
        if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
          printf("unknown child element {}%s for type {}openDoveSubnet.  Skipping...\n",  xmlTextReaderConstLocalName(reader));
        }
        else {
          printf("unknown child element {%s}%s for type {}openDoveSubnet. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
        }
#endif
        status = xmlTextReaderSkipElement(reader);
      }
    }
  }

  return _openDoveSubnet;
}

/**
 * Writes a OpenDoveSubnet to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveSubnet The OpenDoveSubnet to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveSubnetType(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnet *_openDoveSubnet) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveSubnet->domainUUID != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "domain_id", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}domain_id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}domain_id...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveSubnet->domainUUID));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}domain_id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}domain_id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSubnet->subnet != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subnet", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}subnet. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}subnet...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveSubnet->subnet));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}subnet. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}subnet. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSubnet->lastChangeVersion != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "change_version", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}change_version...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveSubnet->lastChangeVersion));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSubnet->subnetType != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "type", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}type. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}type...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveSubnet->subnetType));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}type. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}type. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  for (i = 0; i < _openDoveSubnet->_sizeof_networkUUIDs; i++) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "network_ids", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}network_ids. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}network_ids...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, &(_openDoveSubnet->networkUUIDs[i]));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}network_ids. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}network_ids. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSubnet->createVersion != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "create_version", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}create_version...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveSubnet->createVersion));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSubnet->uuid != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "id", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}id...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveSubnet->uuid));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSubnet->nexthop != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "nexthop", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}nexthop. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}nexthop...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveSubnet->nexthop));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}nexthop. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}nexthop. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSubnet->tombstoneFlag != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "is_tombstone", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}is_tombstone...\n");
#endif
    status = xmlTextWriterWriteXsBooleanType(writer, (_openDoveSubnet->tombstoneFlag));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSubnet->mask != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "mask", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}mask. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}mask...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveSubnet->mask));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}mask. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}mask. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveSubnet.
 *
 * @param _openDoveSubnet The OpenDoveSubnet to free.
 */
static void freeNs0OpenDoveSubnetType(struct full_ns0_openDoveSubnet *_openDoveSubnet) {
  int i;
  if (_openDoveSubnet->domainUUID != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor domainUUID of type full_ns0_openDoveSubnet...\n");
#endif
    freeXsStringType(_openDoveSubnet->domainUUID);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor domainUUID of type full_ns0_openDoveSubnet...\n");
#endif
    free(_openDoveSubnet->domainUUID);
  }
  if (_openDoveSubnet->subnet != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor subnet of type full_ns0_openDoveSubnet...\n");
#endif
    freeXsStringType(_openDoveSubnet->subnet);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor subnet of type full_ns0_openDoveSubnet...\n");
#endif
    free(_openDoveSubnet->subnet);
  }
  if (_openDoveSubnet->lastChangeVersion != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor lastChangeVersion of type full_ns0_openDoveSubnet...\n");
#endif
    freeXsIntType(_openDoveSubnet->lastChangeVersion);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor lastChangeVersion of type full_ns0_openDoveSubnet...\n");
#endif
    free(_openDoveSubnet->lastChangeVersion);
  }
  if (_openDoveSubnet->subnetType != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor subnetType of type full_ns0_openDoveSubnet...\n");
#endif
    freeXsStringType(_openDoveSubnet->subnetType);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor subnetType of type full_ns0_openDoveSubnet...\n");
#endif
    free(_openDoveSubnet->subnetType);
  }
  if (_openDoveSubnet->networkUUIDs != NULL) {
    for (i = 0; i < _openDoveSubnet->_sizeof_networkUUIDs; i++) {
#if DEBUG_ENUNCIATE > 1
      printf("Freeing accessor networkUUIDs[%i] of type full_ns0_openDoveSubnet...\n", i);
#endif
      freeXsStringType(&(_openDoveSubnet->networkUUIDs[i]));
    }
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor networkUUIDs of type full_ns0_openDoveSubnet...\n");
#endif
    free(_openDoveSubnet->networkUUIDs);
  }
  if (_openDoveSubnet->createVersion != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor createVersion of type full_ns0_openDoveSubnet...\n");
#endif
    freeXsIntType(_openDoveSubnet->createVersion);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor createVersion of type full_ns0_openDoveSubnet...\n");
#endif
    free(_openDoveSubnet->createVersion);
  }
  if (_openDoveSubnet->uuid != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor uuid of type full_ns0_openDoveSubnet...\n");
#endif
    freeXsStringType(_openDoveSubnet->uuid);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor uuid of type full_ns0_openDoveSubnet...\n");
#endif
    free(_openDoveSubnet->uuid);
  }
  if (_openDoveSubnet->nexthop != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor nexthop of type full_ns0_openDoveSubnet...\n");
#endif
    freeXsStringType(_openDoveSubnet->nexthop);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor nexthop of type full_ns0_openDoveSubnet...\n");
#endif
    free(_openDoveSubnet->nexthop);
  }
  if (_openDoveSubnet->tombstoneFlag != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor tombstoneFlag of type full_ns0_openDoveSubnet...\n");
#endif
    freeXsBooleanType(_openDoveSubnet->tombstoneFlag);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor tombstoneFlag of type full_ns0_openDoveSubnet...\n");
#endif
    free(_openDoveSubnet->tombstoneFlag);
  }
  if (_openDoveSubnet->mask != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor mask of type full_ns0_openDoveSubnet...\n");
#endif
    freeXsStringType(_openDoveSubnet->mask);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor mask of type full_ns0_openDoveSubnet...\n");
#endif
    free(_openDoveSubnet->mask);
  }
}
#endif /* DEF_full_ns0_openDoveSubnet_M */
#ifndef DEF_full_ns0_openDoveSwitch_M
#define DEF_full_ns0_openDoveSwitch_M

/**
 * Reads a OpenDoveSwitch element from XML. The element to be read is "openDoveSwitch", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveSwitch, or NULL in case of error.
 */
struct full_ns0_openDoveSwitch *xml_read_full_ns0_openDoveSwitch(xmlTextReaderPtr reader) {
  int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
  return xmlTextReaderReadNs0OpenDoveSwitchElement(reader);
}

/**
 * Writes a OpenDoveSwitch to XML under element name "openDoveSwitch".
 *
 * @param writer The XML writer.
 * @param _openDoveSwitch The OpenDoveSwitch to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveSwitch(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitch *_openDoveSwitch) {
  return xmlTextWriterWriteNs0OpenDoveSwitchElementNS(writer, _openDoveSwitch, 1);
}

/**
 * Frees a OpenDoveSwitch.
 *
 * @param _openDoveSwitch The OpenDoveSwitch to free.
 */
void free_full_ns0_openDoveSwitch(struct full_ns0_openDoveSwitch *_openDoveSwitch) {
  freeNs0OpenDoveSwitchType(_openDoveSwitch);
  free(_openDoveSwitch);
}

/**
 * Reads a OpenDoveSwitch element from XML. The element to be read is "openDoveSwitch", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveSwitch, or NULL in case of error.
 */
struct full_ns0_openDoveSwitch *xmlTextReaderReadNs0OpenDoveSwitchElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveSwitch *_openDoveSwitch = NULL;

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "openDoveSwitch", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Attempting to read root element {}openDoveSwitch.\n");
#endif
    _openDoveSwitch = xmlTextReaderReadNs0OpenDoveSwitchType(reader);
  }
#if DEBUG_ENUNCIATE
  if (_openDoveSwitch == NULL) {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      printf("attempt to read {}openDoveSwitch failed. current element: {}%s\n",  xmlTextReaderConstLocalName(reader));
    }
    else {
      printf("attempt to read {}openDoveSwitch failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
    }
  }
#endif

  return _openDoveSwitch;
}

/**
 * Writes a OpenDoveSwitch to XML under element name "openDoveSwitch".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveSwitch The OpenDoveSwitch to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveSwitchElement(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitch *_openDoveSwitch) {
  return xmlTextWriterWriteNs0OpenDoveSwitchElementNS(writer, _openDoveSwitch, 0);
}

/**
 * Writes a OpenDoveSwitch to XML under element name "openDoveSwitch".
 *
 * @param writer The XML writer.
 * @param _openDoveSwitch The OpenDoveSwitch to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveSwitchElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitch *_openDoveSwitch, int writeNamespaces) {
  int totalBytes = 0;
  int status;

  status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveSwitch", NULL);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write start element {}openDoveSwitch. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

#if DEBUG_ENUNCIATE > 1
  printf("writing type {}openDoveSwitch for root element {}openDoveSwitch...\n");
#endif
  status = xmlTextWriterWriteNs0OpenDoveSwitchType(writer, _openDoveSwitch);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write type for start element {}openDoveSwitch. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  status = xmlTextWriterEndElement(writer);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to end element {}openDoveSwitch. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveSwitch.
 *
 * @param _openDoveSwitch The OpenDoveSwitch whose children are to be free.
 */
static void freeNs0OpenDoveSwitchElement(struct full_ns0_openDoveSwitch *_openDoveSwitch) {
  freeNs0OpenDoveSwitchType(_openDoveSwitch);
}

/**
 * Reads a OpenDoveSwitch from XML. The reader is assumed to be at the start element.
 *
 * @return the OpenDoveSwitch, or NULL in case of error.
 */
static struct full_ns0_openDoveSwitch *xmlTextReaderReadNs0OpenDoveSwitchType(xmlTextReaderPtr reader) {
  int status, depth;
  void *_child_accessor;
  struct full_ns0_openDoveSwitch *_openDoveSwitch = calloc(1, sizeof(struct full_ns0_openDoveSwitch));



  if (xmlTextReaderIsEmptyElement(reader) == 0) {
    depth = xmlTextReaderDepth(reader);//track the depth.
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);

    while (xmlTextReaderDepth(reader) > depth) {
      if (status < 1) {
        //panic: XML read error.
#if DEBUG_ENUNCIATE
        printf("Failure to advance to next child element.\n");
#endif
        freeNs0OpenDoveSwitchType(_openDoveSwitch);
        free(_openDoveSwitch);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "managementip", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}managementip of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}managementip of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSwitchType(_openDoveSwitch);
          free(_openDoveSwitch);
          return NULL;
        }

        _openDoveSwitch->mgmtIP = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "is_tombstone", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}is_tombstone of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
        _child_accessor = xmlTextReaderReadXsBooleanType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}is_tombstone of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSwitchType(_openDoveSwitch);
          free(_openDoveSwitch);
          return NULL;
        }

        _openDoveSwitch->tombstoneFlag = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "id", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}id of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSwitchType(_openDoveSwitch);
          free(_openDoveSwitch);
          return NULL;
        }

        _openDoveSwitch->uuid = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "name", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}name of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSwitchType(_openDoveSwitch);
          free(_openDoveSwitch);
          return NULL;
        }

        _openDoveSwitch->name = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "create_version", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}create_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}create_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSwitchType(_openDoveSwitch);
          free(_openDoveSwitch);
          return NULL;
        }

        _openDoveSwitch->createVersion = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "change_version", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}change_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
        _child_accessor = xmlTextReaderReadXsIntType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}change_version of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSwitchType(_openDoveSwitch);
          free(_openDoveSwitch);
          return NULL;
        }

        _openDoveSwitch->lastChangeVersion = ((int*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "timestamp", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}timestamp of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}timestamp of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSwitchType(_openDoveSwitch);
          free(_openDoveSwitch);
          return NULL;
        }

        _openDoveSwitch->timestamp = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "tunnelip", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}tunnelip of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}tunnelip of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSwitchType(_openDoveSwitch);
          free(_openDoveSwitch);
          return NULL;
        }

        _openDoveSwitch->tunnelIP = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else {
#if DEBUG_ENUNCIATE > 1
        if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
          printf("unknown child element {}%s for type {}openDoveSwitch.  Skipping...\n",  xmlTextReaderConstLocalName(reader));
        }
        else {
          printf("unknown child element {%s}%s for type {}openDoveSwitch. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
        }
#endif
        status = xmlTextReaderSkipElement(reader);
      }
    }
  }

  return _openDoveSwitch;
}

/**
 * Writes a OpenDoveSwitch to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveSwitch The OpenDoveSwitch to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveSwitchType(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitch *_openDoveSwitch) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveSwitch->mgmtIP != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "managementip", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}managementip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}managementip...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveSwitch->mgmtIP));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}managementip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}managementip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSwitch->tombstoneFlag != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "is_tombstone", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}boolean for element {}is_tombstone...\n");
#endif
    status = xmlTextWriterWriteXsBooleanType(writer, (_openDoveSwitch->tombstoneFlag));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}is_tombstone. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSwitch->uuid != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "id", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}id...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveSwitch->uuid));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSwitch->name != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "name", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}name. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}name...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveSwitch->name));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}name. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}name. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSwitch->createVersion != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "create_version", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}create_version...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveSwitch->createVersion));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}create_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSwitch->lastChangeVersion != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "change_version", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}int for element {}change_version...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveSwitch->lastChangeVersion));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}change_version. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSwitch->timestamp != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "timestamp", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}timestamp. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}timestamp...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveSwitch->timestamp));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}timestamp. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}timestamp. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSwitch->tunnelIP != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "tunnelip", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}tunnelip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {http://www.w3.org/2001/XMLSchema}string for element {}tunnelip...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveSwitch->tunnelIP));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}tunnelip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}tunnelip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveSwitch.
 *
 * @param _openDoveSwitch The OpenDoveSwitch to free.
 */
static void freeNs0OpenDoveSwitchType(struct full_ns0_openDoveSwitch *_openDoveSwitch) {
  int i;
  if (_openDoveSwitch->mgmtIP != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor mgmtIP of type full_ns0_openDoveSwitch...\n");
#endif
    freeXsStringType(_openDoveSwitch->mgmtIP);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor mgmtIP of type full_ns0_openDoveSwitch...\n");
#endif
    free(_openDoveSwitch->mgmtIP);
  }
  if (_openDoveSwitch->tombstoneFlag != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor tombstoneFlag of type full_ns0_openDoveSwitch...\n");
#endif
    freeXsBooleanType(_openDoveSwitch->tombstoneFlag);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor tombstoneFlag of type full_ns0_openDoveSwitch...\n");
#endif
    free(_openDoveSwitch->tombstoneFlag);
  }
  if (_openDoveSwitch->uuid != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor uuid of type full_ns0_openDoveSwitch...\n");
#endif
    freeXsStringType(_openDoveSwitch->uuid);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor uuid of type full_ns0_openDoveSwitch...\n");
#endif
    free(_openDoveSwitch->uuid);
  }
  if (_openDoveSwitch->name != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor name of type full_ns0_openDoveSwitch...\n");
#endif
    freeXsStringType(_openDoveSwitch->name);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor name of type full_ns0_openDoveSwitch...\n");
#endif
    free(_openDoveSwitch->name);
  }
  if (_openDoveSwitch->createVersion != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor createVersion of type full_ns0_openDoveSwitch...\n");
#endif
    freeXsIntType(_openDoveSwitch->createVersion);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor createVersion of type full_ns0_openDoveSwitch...\n");
#endif
    free(_openDoveSwitch->createVersion);
  }
  if (_openDoveSwitch->lastChangeVersion != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor lastChangeVersion of type full_ns0_openDoveSwitch...\n");
#endif
    freeXsIntType(_openDoveSwitch->lastChangeVersion);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor lastChangeVersion of type full_ns0_openDoveSwitch...\n");
#endif
    free(_openDoveSwitch->lastChangeVersion);
  }
  if (_openDoveSwitch->timestamp != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor timestamp of type full_ns0_openDoveSwitch...\n");
#endif
    freeXsStringType(_openDoveSwitch->timestamp);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor timestamp of type full_ns0_openDoveSwitch...\n");
#endif
    free(_openDoveSwitch->timestamp);
  }
  if (_openDoveSwitch->tunnelIP != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor tunnelIP of type full_ns0_openDoveSwitch...\n");
#endif
    freeXsStringType(_openDoveSwitch->tunnelIP);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor tunnelIP of type full_ns0_openDoveSwitch...\n");
#endif
    free(_openDoveSwitch->tunnelIP);
  }
}
#endif /* DEF_full_ns0_openDoveSwitch_M */
#ifndef DEF_full_ns0_openDoveDomainRequest_M
#define DEF_full_ns0_openDoveDomainRequest_M

/**
 * Reads a OpenDoveDomainRequest element from XML. The element to be read is "openDoveDomainRequest", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveDomainRequest, or NULL in case of error.
 */
struct full_ns0_openDoveDomainRequest *xml_read_full_ns0_openDoveDomainRequest(xmlTextReaderPtr reader) {
  int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
  return xmlTextReaderReadNs0OpenDoveDomainRequestElement(reader);
}

/**
 * Writes a OpenDoveDomainRequest to XML under element name "openDoveDomainRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveDomainRequest The OpenDoveDomainRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveDomainRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest) {
  return xmlTextWriterWriteNs0OpenDoveDomainRequestElementNS(writer, _openDoveDomainRequest, 1);
}

/**
 * Frees a OpenDoveDomainRequest.
 *
 * @param _openDoveDomainRequest The OpenDoveDomainRequest to free.
 */
void free_full_ns0_openDoveDomainRequest(struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest) {
  freeNs0OpenDoveDomainRequestType(_openDoveDomainRequest);
  free(_openDoveDomainRequest);
}

/**
 * Reads a OpenDoveDomainRequest element from XML. The element to be read is "openDoveDomainRequest", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveDomainRequest, or NULL in case of error.
 */
struct full_ns0_openDoveDomainRequest *xmlTextReaderReadNs0OpenDoveDomainRequestElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest = NULL;

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "openDoveDomainRequest", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Attempting to read root element {}openDoveDomainRequest.\n");
#endif
    _openDoveDomainRequest = xmlTextReaderReadNs0OpenDoveDomainRequestType(reader);
  }
#if DEBUG_ENUNCIATE
  if (_openDoveDomainRequest == NULL) {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      printf("attempt to read {}openDoveDomainRequest failed. current element: {}%s\n",  xmlTextReaderConstLocalName(reader));
    }
    else {
      printf("attempt to read {}openDoveDomainRequest failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
    }
  }
#endif

  return _openDoveDomainRequest;
}

/**
 * Writes a OpenDoveDomainRequest to XML under element name "openDoveDomainRequest".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveDomainRequest The OpenDoveDomainRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveDomainRequestElement(xmlTextWriterPtr writer, struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest) {
  return xmlTextWriterWriteNs0OpenDoveDomainRequestElementNS(writer, _openDoveDomainRequest, 0);
}

/**
 * Writes a OpenDoveDomainRequest to XML under element name "openDoveDomainRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveDomainRequest The OpenDoveDomainRequest to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveDomainRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest, int writeNamespaces) {
  int totalBytes = 0;
  int status;

  status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveDomainRequest", NULL);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write start element {}openDoveDomainRequest. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

#if DEBUG_ENUNCIATE > 1
  printf("writing type {}openDoveDomainRequest for root element {}openDoveDomainRequest...\n");
#endif
  status = xmlTextWriterWriteNs0OpenDoveDomainRequestType(writer, _openDoveDomainRequest);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write type for start element {}openDoveDomainRequest. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  status = xmlTextWriterEndElement(writer);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to end element {}openDoveDomainRequest. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveDomainRequest.
 *
 * @param _openDoveDomainRequest The OpenDoveDomainRequest whose children are to be free.
 */
static void freeNs0OpenDoveDomainRequestElement(struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest) {
  freeNs0OpenDoveDomainRequestType(_openDoveDomainRequest);
}

/**
 * Reads a OpenDoveDomainRequest from XML. The reader is assumed to be at the start element.
 *
 * @return the OpenDoveDomainRequest, or NULL in case of error.
 */
static struct full_ns0_openDoveDomainRequest *xmlTextReaderReadNs0OpenDoveDomainRequestType(xmlTextReaderPtr reader) {
  int status, depth;
  void *_child_accessor;
  struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest = calloc(1, sizeof(struct full_ns0_openDoveDomainRequest));



  if (xmlTextReaderIsEmptyElement(reader) == 0) {
    depth = xmlTextReaderDepth(reader);//track the depth.
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);

    while (xmlTextReaderDepth(reader) > depth) {
      if (status < 1) {
        //panic: XML read error.
#if DEBUG_ENUNCIATE
        printf("Failure to advance to next child element.\n");
#endif
        freeNs0OpenDoveDomainRequestType(_openDoveDomainRequest);
        free(_openDoveDomainRequest);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "domain", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}domain of type {}openDoveDomain.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveDomainType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}domain of type {}openDoveDomain.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveDomainRequestType(_openDoveDomainRequest);
          free(_openDoveDomainRequest);
          return NULL;
        }

        _openDoveDomainRequest->singletonDomain = ((struct full_ns0_openDoveDomain*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "domains", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}domains of type {}openDoveDomain.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveDomainType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}domains of type {}openDoveDomain.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveDomainRequestType(_openDoveDomainRequest);
          free(_openDoveDomainRequest);
          return NULL;
        }

        _openDoveDomainRequest->bulkDomains = realloc(_openDoveDomainRequest->bulkDomains, (_openDoveDomainRequest->_sizeof_bulkDomains + 1) * sizeof(struct full_ns0_openDoveDomain));
        memcpy(&(_openDoveDomainRequest->bulkDomains[_openDoveDomainRequest->_sizeof_bulkDomains++]), _child_accessor, sizeof(struct full_ns0_openDoveDomain));
        free(_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else {
#if DEBUG_ENUNCIATE > 1
        if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
          printf("unknown child element {}%s for type {}openDoveDomainRequest.  Skipping...\n",  xmlTextReaderConstLocalName(reader));
        }
        else {
          printf("unknown child element {%s}%s for type {}openDoveDomainRequest. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
        }
#endif
        status = xmlTextReaderSkipElement(reader);
      }
    }
  }

  return _openDoveDomainRequest;
}

/**
 * Writes a OpenDoveDomainRequest to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveDomainRequest The OpenDoveDomainRequest to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveDomainRequestType(xmlTextWriterPtr writer, struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveDomainRequest->singletonDomain != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "domain", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}domain. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveDomain for element {}domain...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveDomainType(writer, (_openDoveDomainRequest->singletonDomain));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveDomain for element {}domain. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}domain. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  for (i = 0; i < _openDoveDomainRequest->_sizeof_bulkDomains; i++) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "domains", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}domains. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveDomain for element {}domains...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveDomainType(writer, &(_openDoveDomainRequest->bulkDomains[i]));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveDomain for element {}domains. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}domains. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveDomainRequest.
 *
 * @param _openDoveDomainRequest The OpenDoveDomainRequest to free.
 */
static void freeNs0OpenDoveDomainRequestType(struct full_ns0_openDoveDomainRequest *_openDoveDomainRequest) {
  int i;
  if (_openDoveDomainRequest->singletonDomain != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor singletonDomain of type full_ns0_openDoveDomainRequest...\n");
#endif
    freeNs0OpenDoveDomainType(_openDoveDomainRequest->singletonDomain);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor singletonDomain of type full_ns0_openDoveDomainRequest...\n");
#endif
    free(_openDoveDomainRequest->singletonDomain);
  }
  if (_openDoveDomainRequest->bulkDomains != NULL) {
    for (i = 0; i < _openDoveDomainRequest->_sizeof_bulkDomains; i++) {
#if DEBUG_ENUNCIATE > 1
      printf("Freeing accessor bulkDomains[%i] of type full_ns0_openDoveDomainRequest...\n", i);
#endif
      freeNs0OpenDoveDomainType(&(_openDoveDomainRequest->bulkDomains[i]));
    }
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor bulkDomains of type full_ns0_openDoveDomainRequest...\n");
#endif
    free(_openDoveDomainRequest->bulkDomains);
  }
}
#endif /* DEF_full_ns0_openDoveDomainRequest_M */
#ifndef DEF_full_ns0_openDoveNetworkRequest_M
#define DEF_full_ns0_openDoveNetworkRequest_M

/**
 * Reads a OpenDoveNetworkRequest element from XML. The element to be read is "openDoveNetworkRequest", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveNetworkRequest, or NULL in case of error.
 */
struct full_ns0_openDoveNetworkRequest *xml_read_full_ns0_openDoveNetworkRequest(xmlTextReaderPtr reader) {
  int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
  return xmlTextReaderReadNs0OpenDoveNetworkRequestElement(reader);
}

/**
 * Writes a OpenDoveNetworkRequest to XML under element name "openDoveNetworkRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveNetworkRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest) {
  return xmlTextWriterWriteNs0OpenDoveNetworkRequestElementNS(writer, _openDoveNetworkRequest, 1);
}

/**
 * Frees a OpenDoveNetworkRequest.
 *
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest to free.
 */
void free_full_ns0_openDoveNetworkRequest(struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest) {
  freeNs0OpenDoveNetworkRequestType(_openDoveNetworkRequest);
  free(_openDoveNetworkRequest);
}

/**
 * Reads a OpenDoveNetworkRequest element from XML. The element to be read is "openDoveNetworkRequest", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveNetworkRequest, or NULL in case of error.
 */
struct full_ns0_openDoveNetworkRequest *xmlTextReaderReadNs0OpenDoveNetworkRequestElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest = NULL;

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "openDoveNetworkRequest", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Attempting to read root element {}openDoveNetworkRequest.\n");
#endif
    _openDoveNetworkRequest = xmlTextReaderReadNs0OpenDoveNetworkRequestType(reader);
  }
#if DEBUG_ENUNCIATE
  if (_openDoveNetworkRequest == NULL) {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      printf("attempt to read {}openDoveNetworkRequest failed. current element: {}%s\n",  xmlTextReaderConstLocalName(reader));
    }
    else {
      printf("attempt to read {}openDoveNetworkRequest failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
    }
  }
#endif

  return _openDoveNetworkRequest;
}

/**
 * Writes a OpenDoveNetworkRequest to XML under element name "openDoveNetworkRequest".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveNetworkRequestElement(xmlTextWriterPtr writer, struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest) {
  return xmlTextWriterWriteNs0OpenDoveNetworkRequestElementNS(writer, _openDoveNetworkRequest, 0);
}

/**
 * Writes a OpenDoveNetworkRequest to XML under element name "openDoveNetworkRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveNetworkRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest, int writeNamespaces) {
  int totalBytes = 0;
  int status;

  status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveNetworkRequest", NULL);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write start element {}openDoveNetworkRequest. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

#if DEBUG_ENUNCIATE > 1
  printf("writing type {}openDoveNetworkRequest for root element {}openDoveNetworkRequest...\n");
#endif
  status = xmlTextWriterWriteNs0OpenDoveNetworkRequestType(writer, _openDoveNetworkRequest);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write type for start element {}openDoveNetworkRequest. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  status = xmlTextWriterEndElement(writer);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to end element {}openDoveNetworkRequest. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveNetworkRequest.
 *
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest whose children are to be free.
 */
static void freeNs0OpenDoveNetworkRequestElement(struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest) {
  freeNs0OpenDoveNetworkRequestType(_openDoveNetworkRequest);
}

/**
 * Reads a OpenDoveNetworkRequest from XML. The reader is assumed to be at the start element.
 *
 * @return the OpenDoveNetworkRequest, or NULL in case of error.
 */
static struct full_ns0_openDoveNetworkRequest *xmlTextReaderReadNs0OpenDoveNetworkRequestType(xmlTextReaderPtr reader) {
  int status, depth;
  void *_child_accessor;
  struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest = calloc(1, sizeof(struct full_ns0_openDoveNetworkRequest));



  if (xmlTextReaderIsEmptyElement(reader) == 0) {
    depth = xmlTextReaderDepth(reader);//track the depth.
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);

    while (xmlTextReaderDepth(reader) > depth) {
      if (status < 1) {
        //panic: XML read error.
#if DEBUG_ENUNCIATE
        printf("Failure to advance to next child element.\n");
#endif
        freeNs0OpenDoveNetworkRequestType(_openDoveNetworkRequest);
        free(_openDoveNetworkRequest);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "network", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}network of type {}openDoveNetwork.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveNetworkType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}network of type {}openDoveNetwork.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveNetworkRequestType(_openDoveNetworkRequest);
          free(_openDoveNetworkRequest);
          return NULL;
        }

        _openDoveNetworkRequest->singletonNetwork = ((struct full_ns0_openDoveNetwork*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "networks", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}networks of type {}openDoveNetwork.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveNetworkType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}networks of type {}openDoveNetwork.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveNetworkRequestType(_openDoveNetworkRequest);
          free(_openDoveNetworkRequest);
          return NULL;
        }

        _openDoveNetworkRequest->bulkNetworks = realloc(_openDoveNetworkRequest->bulkNetworks, (_openDoveNetworkRequest->_sizeof_bulkNetworks + 1) * sizeof(struct full_ns0_openDoveNetwork));
        memcpy(&(_openDoveNetworkRequest->bulkNetworks[_openDoveNetworkRequest->_sizeof_bulkNetworks++]), _child_accessor, sizeof(struct full_ns0_openDoveNetwork));
        free(_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else {
#if DEBUG_ENUNCIATE > 1
        if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
          printf("unknown child element {}%s for type {}openDoveNetworkRequest.  Skipping...\n",  xmlTextReaderConstLocalName(reader));
        }
        else {
          printf("unknown child element {%s}%s for type {}openDoveNetworkRequest. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
        }
#endif
        status = xmlTextReaderSkipElement(reader);
      }
    }
  }

  return _openDoveNetworkRequest;
}

/**
 * Writes a OpenDoveNetworkRequest to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveNetworkRequestType(xmlTextWriterPtr writer, struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveNetworkRequest->singletonNetwork != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "network", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}network. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveNetwork for element {}network...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveNetworkType(writer, (_openDoveNetworkRequest->singletonNetwork));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveNetwork for element {}network. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}network. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  for (i = 0; i < _openDoveNetworkRequest->_sizeof_bulkNetworks; i++) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "networks", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}networks. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveNetwork for element {}networks...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveNetworkType(writer, &(_openDoveNetworkRequest->bulkNetworks[i]));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveNetwork for element {}networks. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}networks. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveNetworkRequest.
 *
 * @param _openDoveNetworkRequest The OpenDoveNetworkRequest to free.
 */
static void freeNs0OpenDoveNetworkRequestType(struct full_ns0_openDoveNetworkRequest *_openDoveNetworkRequest) {
  int i;
  if (_openDoveNetworkRequest->singletonNetwork != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor singletonNetwork of type full_ns0_openDoveNetworkRequest...\n");
#endif
    freeNs0OpenDoveNetworkType(_openDoveNetworkRequest->singletonNetwork);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor singletonNetwork of type full_ns0_openDoveNetworkRequest...\n");
#endif
    free(_openDoveNetworkRequest->singletonNetwork);
  }
  if (_openDoveNetworkRequest->bulkNetworks != NULL) {
    for (i = 0; i < _openDoveNetworkRequest->_sizeof_bulkNetworks; i++) {
#if DEBUG_ENUNCIATE > 1
      printf("Freeing accessor bulkNetworks[%i] of type full_ns0_openDoveNetworkRequest...\n", i);
#endif
      freeNs0OpenDoveNetworkType(&(_openDoveNetworkRequest->bulkNetworks[i]));
    }
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor bulkNetworks of type full_ns0_openDoveNetworkRequest...\n");
#endif
    free(_openDoveNetworkRequest->bulkNetworks);
  }
}
#endif /* DEF_full_ns0_openDoveNetworkRequest_M */
#ifndef DEF_full_ns0_openDovePolicyRequest_M
#define DEF_full_ns0_openDovePolicyRequest_M

/**
 * Reads a OpenDovePolicyRequest element from XML. The element to be read is "openDovePolicyRequest", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDovePolicyRequest, or NULL in case of error.
 */
struct full_ns0_openDovePolicyRequest *xml_read_full_ns0_openDovePolicyRequest(xmlTextReaderPtr reader) {
  int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
  return xmlTextReaderReadNs0OpenDovePolicyRequestElement(reader);
}

/**
 * Writes a OpenDovePolicyRequest to XML under element name "openDovePolicyRequest".
 *
 * @param writer The XML writer.
 * @param _openDovePolicyRequest The OpenDovePolicyRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDovePolicyRequest(xmlTextWriterPtr writer, struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest) {
  return xmlTextWriterWriteNs0OpenDovePolicyRequestElementNS(writer, _openDovePolicyRequest, 1);
}

/**
 * Frees a OpenDovePolicyRequest.
 *
 * @param _openDovePolicyRequest The OpenDovePolicyRequest to free.
 */
void free_full_ns0_openDovePolicyRequest(struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest) {
  freeNs0OpenDovePolicyRequestType(_openDovePolicyRequest);
  free(_openDovePolicyRequest);
}

/**
 * Reads a OpenDovePolicyRequest element from XML. The element to be read is "openDovePolicyRequest", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDovePolicyRequest, or NULL in case of error.
 */
struct full_ns0_openDovePolicyRequest *xmlTextReaderReadNs0OpenDovePolicyRequestElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest = NULL;

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "openDovePolicyRequest", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Attempting to read root element {}openDovePolicyRequest.\n");
#endif
    _openDovePolicyRequest = xmlTextReaderReadNs0OpenDovePolicyRequestType(reader);
  }
#if DEBUG_ENUNCIATE
  if (_openDovePolicyRequest == NULL) {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      printf("attempt to read {}openDovePolicyRequest failed. current element: {}%s\n",  xmlTextReaderConstLocalName(reader));
    }
    else {
      printf("attempt to read {}openDovePolicyRequest failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
    }
  }
#endif

  return _openDovePolicyRequest;
}

/**
 * Writes a OpenDovePolicyRequest to XML under element name "openDovePolicyRequest".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDovePolicyRequest The OpenDovePolicyRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDovePolicyRequestElement(xmlTextWriterPtr writer, struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest) {
  return xmlTextWriterWriteNs0OpenDovePolicyRequestElementNS(writer, _openDovePolicyRequest, 0);
}

/**
 * Writes a OpenDovePolicyRequest to XML under element name "openDovePolicyRequest".
 *
 * @param writer The XML writer.
 * @param _openDovePolicyRequest The OpenDovePolicyRequest to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDovePolicyRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest, int writeNamespaces) {
  int totalBytes = 0;
  int status;

  status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDovePolicyRequest", NULL);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write start element {}openDovePolicyRequest. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

#if DEBUG_ENUNCIATE > 1
  printf("writing type {}openDovePolicyRequest for root element {}openDovePolicyRequest...\n");
#endif
  status = xmlTextWriterWriteNs0OpenDovePolicyRequestType(writer, _openDovePolicyRequest);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write type for start element {}openDovePolicyRequest. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  status = xmlTextWriterEndElement(writer);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to end element {}openDovePolicyRequest. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  return totalBytes;
}

/**
 * Frees the children of a OpenDovePolicyRequest.
 *
 * @param _openDovePolicyRequest The OpenDovePolicyRequest whose children are to be free.
 */
static void freeNs0OpenDovePolicyRequestElement(struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest) {
  freeNs0OpenDovePolicyRequestType(_openDovePolicyRequest);
}

/**
 * Reads a OpenDovePolicyRequest from XML. The reader is assumed to be at the start element.
 *
 * @return the OpenDovePolicyRequest, or NULL in case of error.
 */
static struct full_ns0_openDovePolicyRequest *xmlTextReaderReadNs0OpenDovePolicyRequestType(xmlTextReaderPtr reader) {
  int status, depth;
  void *_child_accessor;
  struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest = calloc(1, sizeof(struct full_ns0_openDovePolicyRequest));



  if (xmlTextReaderIsEmptyElement(reader) == 0) {
    depth = xmlTextReaderDepth(reader);//track the depth.
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);

    while (xmlTextReaderDepth(reader) > depth) {
      if (status < 1) {
        //panic: XML read error.
#if DEBUG_ENUNCIATE
        printf("Failure to advance to next child element.\n");
#endif
        freeNs0OpenDovePolicyRequestType(_openDovePolicyRequest);
        free(_openDovePolicyRequest);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "policies", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}policies of type {}openDovePolicy.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDovePolicyType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}policies of type {}openDovePolicy.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDovePolicyRequestType(_openDovePolicyRequest);
          free(_openDovePolicyRequest);
          return NULL;
        }

        _openDovePolicyRequest->bulkPolicies = realloc(_openDovePolicyRequest->bulkPolicies, (_openDovePolicyRequest->_sizeof_bulkPolicies + 1) * sizeof(struct full_ns0_openDovePolicy));
        memcpy(&(_openDovePolicyRequest->bulkPolicies[_openDovePolicyRequest->_sizeof_bulkPolicies++]), _child_accessor, sizeof(struct full_ns0_openDovePolicy));
        free(_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "policy", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}policy of type {}openDovePolicy.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDovePolicyType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}policy of type {}openDovePolicy.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDovePolicyRequestType(_openDovePolicyRequest);
          free(_openDovePolicyRequest);
          return NULL;
        }

        _openDovePolicyRequest->singletonPolicy = ((struct full_ns0_openDovePolicy*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else {
#if DEBUG_ENUNCIATE > 1
        if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
          printf("unknown child element {}%s for type {}openDovePolicyRequest.  Skipping...\n",  xmlTextReaderConstLocalName(reader));
        }
        else {
          printf("unknown child element {%s}%s for type {}openDovePolicyRequest. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
        }
#endif
        status = xmlTextReaderSkipElement(reader);
      }
    }
  }

  return _openDovePolicyRequest;
}

/**
 * Writes a OpenDovePolicyRequest to XML.
 *
 * @param writer The XML writer.
 * @param _openDovePolicyRequest The OpenDovePolicyRequest to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDovePolicyRequestType(xmlTextWriterPtr writer, struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  for (i = 0; i < _openDovePolicyRequest->_sizeof_bulkPolicies; i++) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "policies", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}policies. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDovePolicy for element {}policies...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDovePolicyType(writer, &(_openDovePolicyRequest->bulkPolicies[i]));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDovePolicy for element {}policies. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}policies. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDovePolicyRequest->singletonPolicy != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "policy", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}policy. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDovePolicy for element {}policy...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDovePolicyType(writer, (_openDovePolicyRequest->singletonPolicy));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDovePolicy for element {}policy. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}policy. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }

  return totalBytes;
}

/**
 * Frees the elements of a OpenDovePolicyRequest.
 *
 * @param _openDovePolicyRequest The OpenDovePolicyRequest to free.
 */
static void freeNs0OpenDovePolicyRequestType(struct full_ns0_openDovePolicyRequest *_openDovePolicyRequest) {
  int i;
  if (_openDovePolicyRequest->bulkPolicies != NULL) {
    for (i = 0; i < _openDovePolicyRequest->_sizeof_bulkPolicies; i++) {
#if DEBUG_ENUNCIATE > 1
      printf("Freeing accessor bulkPolicies[%i] of type full_ns0_openDovePolicyRequest...\n", i);
#endif
      freeNs0OpenDovePolicyType(&(_openDovePolicyRequest->bulkPolicies[i]));
    }
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor bulkPolicies of type full_ns0_openDovePolicyRequest...\n");
#endif
    free(_openDovePolicyRequest->bulkPolicies);
  }
  if (_openDovePolicyRequest->singletonPolicy != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor singletonPolicy of type full_ns0_openDovePolicyRequest...\n");
#endif
    freeNs0OpenDovePolicyType(_openDovePolicyRequest->singletonPolicy);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor singletonPolicy of type full_ns0_openDovePolicyRequest...\n");
#endif
    free(_openDovePolicyRequest->singletonPolicy);
  }
}
#endif /* DEF_full_ns0_openDovePolicyRequest_M */
#ifndef DEF_full_ns0_openDoveSubnetRequest_M
#define DEF_full_ns0_openDoveSubnetRequest_M

/**
 * Reads a OpenDoveSubnetRequest element from XML. The element to be read is "openDoveSubnetRequest", and
 * it is assumed that the reader is pointing to the XML document (not the element).
 *
 * @param reader The XML reader.
 * @return The OpenDoveSubnetRequest, or NULL in case of error.
 */
struct full_ns0_openDoveSubnetRequest *xml_read_full_ns0_openDoveSubnetRequest(xmlTextReaderPtr reader) {
  int status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
  return xmlTextReaderReadNs0OpenDoveSubnetRequestElement(reader);
}

/**
 * Writes a OpenDoveSubnetRequest to XML under element name "openDoveSubnetRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveSubnetRequest The OpenDoveSubnetRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveSubnetRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest) {
  return xmlTextWriterWriteNs0OpenDoveSubnetRequestElementNS(writer, _openDoveSubnetRequest, 1);
}

/**
 * Frees a OpenDoveSubnetRequest.
 *
 * @param _openDoveSubnetRequest The OpenDoveSubnetRequest to free.
 */
void free_full_ns0_openDoveSubnetRequest(struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest) {
  freeNs0OpenDoveSubnetRequestType(_openDoveSubnetRequest);
  free(_openDoveSubnetRequest);
}

/**
 * Reads a OpenDoveSubnetRequest element from XML. The element to be read is "openDoveSubnetRequest", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveSubnetRequest, or NULL in case of error.
 */
struct full_ns0_openDoveSubnetRequest *xmlTextReaderReadNs0OpenDoveSubnetRequestElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest = NULL;

  if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
    && xmlStrcmp(BAD_CAST "openDoveSubnetRequest", xmlTextReaderConstLocalName(reader)) == 0
    && xmlTextReaderConstNamespaceUri(reader) == NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Attempting to read root element {}openDoveSubnetRequest.\n");
#endif
    _openDoveSubnetRequest = xmlTextReaderReadNs0OpenDoveSubnetRequestType(reader);
  }
#if DEBUG_ENUNCIATE
  if (_openDoveSubnetRequest == NULL) {
    if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
      printf("attempt to read {}openDoveSubnetRequest failed. current element: {}%s\n",  xmlTextReaderConstLocalName(reader));
    }
    else {
      printf("attempt to read {}openDoveSubnetRequest failed. current element: {%s}%s\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
    }
  }
#endif

  return _openDoveSubnetRequest;
}

/**
 * Writes a OpenDoveSubnetRequest to XML under element name "openDoveSubnetRequest".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveSubnetRequest The OpenDoveSubnetRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveSubnetRequestElement(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest) {
  return xmlTextWriterWriteNs0OpenDoveSubnetRequestElementNS(writer, _openDoveSubnetRequest, 0);
}

/**
 * Writes a OpenDoveSubnetRequest to XML under element name "openDoveSubnetRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveSubnetRequest The OpenDoveSubnetRequest to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveSubnetRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest, int writeNamespaces) {
  int totalBytes = 0;
  int status;

  status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "openDoveSubnetRequest", NULL);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write start element {}openDoveSubnetRequest. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

#if DEBUG_ENUNCIATE > 1
  printf("writing type {}openDoveSubnetRequest for root element {}openDoveSubnetRequest...\n");
#endif
  status = xmlTextWriterWriteNs0OpenDoveSubnetRequestType(writer, _openDoveSubnetRequest);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to write type for start element {}openDoveSubnetRequest. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  status = xmlTextWriterEndElement(writer);
  if (status < 0) {
#if DEBUG_ENUNCIATE
    printf("unable to end element {}openDoveSubnetRequest. status: %i\n", status);
#endif
    return status;
  }
  totalBytes += status;

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveSubnetRequest.
 *
 * @param _openDoveSubnetRequest The OpenDoveSubnetRequest whose children are to be free.
 */
static void freeNs0OpenDoveSubnetRequestElement(struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest) {
  freeNs0OpenDoveSubnetRequestType(_openDoveSubnetRequest);
}

/**
 * Reads a OpenDoveSubnetRequest from XML. The reader is assumed to be at the start element.
 *
 * @return the OpenDoveSubnetRequest, or NULL in case of error.
 */
static struct full_ns0_openDoveSubnetRequest *xmlTextReaderReadNs0OpenDoveSubnetRequestType(xmlTextReaderPtr reader) {
  int status, depth;
  void *_child_accessor;
  struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest = calloc(1, sizeof(struct full_ns0_openDoveSubnetRequest));



  if (xmlTextReaderIsEmptyElement(reader) == 0) {
    depth = xmlTextReaderDepth(reader);//track the depth.
    status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);

    while (xmlTextReaderDepth(reader) > depth) {
      if (status < 1) {
        //panic: XML read error.
#if DEBUG_ENUNCIATE
        printf("Failure to advance to next child element.\n");
#endif
        freeNs0OpenDoveSubnetRequestType(_openDoveSubnetRequest);
        free(_openDoveSubnetRequest);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "subnets", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}subnets of type {}openDoveSubnet.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveSubnetType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}subnets of type {}openDoveSubnet.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSubnetRequestType(_openDoveSubnetRequest);
          free(_openDoveSubnetRequest);
          return NULL;
        }

        _openDoveSubnetRequest->bulkSubnets = realloc(_openDoveSubnetRequest->bulkSubnets, (_openDoveSubnetRequest->_sizeof_bulkSubnets + 1) * sizeof(struct full_ns0_openDoveSubnet));
        memcpy(&(_openDoveSubnetRequest->bulkSubnets[_openDoveSubnetRequest->_sizeof_bulkSubnets++]), _child_accessor, sizeof(struct full_ns0_openDoveSubnet));
        free(_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "subnet", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}subnet of type {}openDoveSubnet.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveSubnetType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}subnet of type {}openDoveSubnet.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSubnetRequestType(_openDoveSubnetRequest);
          free(_openDoveSubnetRequest);
          return NULL;
        }

        _openDoveSubnetRequest->singletonSubnet = ((struct full_ns0_openDoveSubnet*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else {
#if DEBUG_ENUNCIATE > 1
        if (xmlTextReaderConstNamespaceUri(reader) == NULL) {
          printf("unknown child element {}%s for type {}openDoveSubnetRequest.  Skipping...\n",  xmlTextReaderConstLocalName(reader));
        }
        else {
          printf("unknown child element {%s}%s for type {}openDoveSubnetRequest. Skipping...\n", xmlTextReaderConstNamespaceUri(reader), xmlTextReaderConstLocalName(reader));
        }
#endif
        status = xmlTextReaderSkipElement(reader);
      }
    }
  }

  return _openDoveSubnetRequest;
}

/**
 * Writes a OpenDoveSubnetRequest to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveSubnetRequest The OpenDoveSubnetRequest to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveSubnetRequestType(xmlTextWriterPtr writer, struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  for (i = 0; i < _openDoveSubnetRequest->_sizeof_bulkSubnets; i++) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subnets", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}subnets. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveSubnet for element {}subnets...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveSubnetType(writer, &(_openDoveSubnetRequest->bulkSubnets[i]));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveSubnet for element {}subnets. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}subnets. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveSubnetRequest->singletonSubnet != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "subnet", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}subnet. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveSubnet for element {}subnet...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveSubnetType(writer, (_openDoveSubnetRequest->singletonSubnet));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveSubnet for element {}subnet. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}subnet. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveSubnetRequest.
 *
 * @param _openDoveSubnetRequest The OpenDoveSubnetRequest to free.
 */
static void freeNs0OpenDoveSubnetRequestType(struct full_ns0_openDoveSubnetRequest *_openDoveSubnetRequest) {
  int i;
  if (_openDoveSubnetRequest->bulkSubnets != NULL) {
    for (i = 0; i < _openDoveSubnetRequest->_sizeof_bulkSubnets; i++) {
#if DEBUG_ENUNCIATE > 1
      printf("Freeing accessor bulkSubnets[%i] of type full_ns0_openDoveSubnetRequest...\n", i);
#endif
      freeNs0OpenDoveSubnetType(&(_openDoveSubnetRequest->bulkSubnets[i]));
    }
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor bulkSubnets of type full_ns0_openDoveSubnetRequest...\n");
#endif
    free(_openDoveSubnetRequest->bulkSubnets);
  }
  if (_openDoveSubnetRequest->singletonSubnet != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor singletonSubnet of type full_ns0_openDoveSubnetRequest...\n");
#endif
    freeNs0OpenDoveSubnetType(_openDoveSubnetRequest->singletonSubnet);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor singletonSubnet of type full_ns0_openDoveSubnetRequest...\n");
#endif
    free(_openDoveSubnetRequest->singletonSubnet);
  }
}
#endif /* DEF_full_ns0_openDoveSubnetRequest_M */
