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

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


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

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

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

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

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

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

/**
 * 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_openDoveEndpoint_H
#define DEF_full_ns0_openDoveEndpoint_H

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


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

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

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

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

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

/**
 * Writes a OpenDoveEndpoint to XML under element name "openDoveEndpoint".
 *
 * @param writer The XML writer.
 * @param _openDoveEndpoint The OpenDoveEndpoint to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveEndpoint(xmlTextWriterPtr writer, struct full_ns0_openDoveEndpoint *_openDoveEndpoint);

/**
 * Frees a OpenDoveEndpoint.
 *
 * @param _openDoveEndpoint The OpenDoveEndpoint to free.
 */
void free_full_ns0_openDoveEndpoint(struct full_ns0_openDoveEndpoint *_openDoveEndpoint);

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

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

/**
 * Writes a OpenDoveEndpoint to XML under element name "openDoveEndpoint".
 *
 * @param writer The XML writer.
 * @param _openDoveEndpoint The OpenDoveEndpoint 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 xmlTextWriterWriteNs0OpenDoveEndpointElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveEndpoint *_openDoveEndpoint, int writeNamespaces);

/**
 * Frees the children of a OpenDoveEndpoint.
 *
 * @param _openDoveEndpoint The OpenDoveEndpoint whose children are to be free.
 */
static void freeNs0OpenDoveEndpointElement(struct full_ns0_openDoveEndpoint *_openDoveEndpoint);

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

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

/**
 * Frees the elements of a OpenDoveEndpoint.
 *
 * @param _openDoveEndpoint The OpenDoveEndpoint to free.
 */
static void freeNs0OpenDoveEndpointType(struct full_ns0_openDoveEndpoint *_openDoveEndpoint);

#endif /* DEF_full_ns0_openDoveEndpoint_H */
#ifndef DEF_full_ns0_openDoveGWSession_H
#define DEF_full_ns0_openDoveGWSession_H

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/**
 * Writes a OpenDoveGWSession to XML under element name "openDoveGWSession".
 *
 * @param writer The XML writer.
 * @param _openDoveGWSession The OpenDoveGWSession to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveGWSession(xmlTextWriterPtr writer, struct full_ns0_openDoveGWSession *_openDoveGWSession);

/**
 * Frees a OpenDoveGWSession.
 *
 * @param _openDoveGWSession The OpenDoveGWSession to free.
 */
void free_full_ns0_openDoveGWSession(struct full_ns0_openDoveGWSession *_openDoveGWSession);

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

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

/**
 * Writes a OpenDoveGWSession to XML under element name "openDoveGWSession".
 *
 * @param writer The XML writer.
 * @param _openDoveGWSession The OpenDoveGWSession 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 xmlTextWriterWriteNs0OpenDoveGWSessionElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveGWSession *_openDoveGWSession, int writeNamespaces);

/**
 * Frees the children of a OpenDoveGWSession.
 *
 * @param _openDoveGWSession The OpenDoveGWSession whose children are to be free.
 */
static void freeNs0OpenDoveGWSessionElement(struct full_ns0_openDoveGWSession *_openDoveGWSession);

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

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

/**
 * Frees the elements of a OpenDoveGWSession.
 *
 * @param _openDoveGWSession The OpenDoveGWSession to free.
 */
static void freeNs0OpenDoveGWSessionType(struct full_ns0_openDoveGWSession *_openDoveGWSession);

#endif /* DEF_full_ns0_openDoveGWSession_H */
#ifndef DEF_full_ns0_openDoveGwIpv4_H
#define DEF_full_ns0_openDoveGwIpv4_H

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


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

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

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

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

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

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

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

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

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

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

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

/**
 * Writes a OpenDoveGwIpv4 to XML under element name "openDoveGwIpv4".
 *
 * @param writer The XML writer.
 * @param _openDoveGwIpv4 The OpenDoveGwIpv4 to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveGwIpv4(xmlTextWriterPtr writer, struct full_ns0_openDoveGwIpv4 *_openDoveGwIpv4);

/**
 * Frees a OpenDoveGwIpv4.
 *
 * @param _openDoveGwIpv4 The OpenDoveGwIpv4 to free.
 */
void free_full_ns0_openDoveGwIpv4(struct full_ns0_openDoveGwIpv4 *_openDoveGwIpv4);

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

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

/**
 * Writes a OpenDoveGwIpv4 to XML under element name "openDoveGwIpv4".
 *
 * @param writer The XML writer.
 * @param _openDoveGwIpv4 The OpenDoveGwIpv4 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 xmlTextWriterWriteNs0OpenDoveGwIpv4ElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveGwIpv4 *_openDoveGwIpv4, int writeNamespaces);

/**
 * Frees the children of a OpenDoveGwIpv4.
 *
 * @param _openDoveGwIpv4 The OpenDoveGwIpv4 whose children are to be free.
 */
static void freeNs0OpenDoveGwIpv4Element(struct full_ns0_openDoveGwIpv4 *_openDoveGwIpv4);

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

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

/**
 * Frees the elements of a OpenDoveGwIpv4.
 *
 * @param _openDoveGwIpv4 The OpenDoveGwIpv4 to free.
 */
static void freeNs0OpenDoveGwIpv4Type(struct full_ns0_openDoveGwIpv4 *_openDoveGwIpv4);

#endif /* DEF_full_ns0_openDoveGwIpv4_H */
#ifndef DEF_full_ns0_openDoveNVP_H
#define DEF_full_ns0_openDoveNVP_H

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


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

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

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

/**
 * Writes a OpenDoveNVP to XML under element name "openDoveNVP".
 *
 * @param writer The XML writer.
 * @param _openDoveNVP The OpenDoveNVP to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveNVP(xmlTextWriterPtr writer, struct full_ns0_openDoveNVP *_openDoveNVP);

/**
 * Frees a OpenDoveNVP.
 *
 * @param _openDoveNVP The OpenDoveNVP to free.
 */
void free_full_ns0_openDoveNVP(struct full_ns0_openDoveNVP *_openDoveNVP);

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

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

/**
 * Writes a OpenDoveNVP to XML under element name "openDoveNVP".
 *
 * @param writer The XML writer.
 * @param _openDoveNVP The OpenDoveNVP 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 xmlTextWriterWriteNs0OpenDoveNVPElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveNVP *_openDoveNVP, int writeNamespaces);

/**
 * Frees the children of a OpenDoveNVP.
 *
 * @param _openDoveNVP The OpenDoveNVP whose children are to be free.
 */
static void freeNs0OpenDoveNVPElement(struct full_ns0_openDoveNVP *_openDoveNVP);

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

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

/**
 * Frees the elements of a OpenDoveNVP.
 *
 * @param _openDoveNVP The OpenDoveNVP to free.
 */
static void freeNs0OpenDoveNVPType(struct full_ns0_openDoveNVP *_openDoveNVP);

#endif /* DEF_full_ns0_openDoveNVP_H */
#ifndef DEF_full_ns0_openDoveNetwork_H
#define DEF_full_ns0_openDoveNetwork_H

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


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

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

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

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

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

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

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

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

/**
 * 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_openDoveNeutronControlBlock_H
#define DEF_full_ns0_openDoveNeutronControlBlock_H

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


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

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

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

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

/**
 * Writes a OpenDoveNeutronControlBlock to XML under element name "openDoveNeutronControlBlock".
 *
 * @param writer The XML writer.
 * @param _openDoveNeutronControlBlock The OpenDoveNeutronControlBlock to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveNeutronControlBlock(xmlTextWriterPtr writer, struct full_ns0_openDoveNeutronControlBlock *_openDoveNeutronControlBlock);

/**
 * Frees a OpenDoveNeutronControlBlock.
 *
 * @param _openDoveNeutronControlBlock The OpenDoveNeutronControlBlock to free.
 */
void free_full_ns0_openDoveNeutronControlBlock(struct full_ns0_openDoveNeutronControlBlock *_openDoveNeutronControlBlock);

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

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

/**
 * Writes a OpenDoveNeutronControlBlock to XML under element name "openDoveNeutronControlBlock".
 *
 * @param writer The XML writer.
 * @param _openDoveNeutronControlBlock The OpenDoveNeutronControlBlock 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 xmlTextWriterWriteNs0OpenDoveNeutronControlBlockElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveNeutronControlBlock *_openDoveNeutronControlBlock, int writeNamespaces);

/**
 * Frees the children of a OpenDoveNeutronControlBlock.
 *
 * @param _openDoveNeutronControlBlock The OpenDoveNeutronControlBlock whose children are to be free.
 */
static void freeNs0OpenDoveNeutronControlBlockElement(struct full_ns0_openDoveNeutronControlBlock *_openDoveNeutronControlBlock);

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

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

/**
 * Frees the elements of a OpenDoveNeutronControlBlock.
 *
 * @param _openDoveNeutronControlBlock The OpenDoveNeutronControlBlock to free.
 */
static void freeNs0OpenDoveNeutronControlBlockType(struct full_ns0_openDoveNeutronControlBlock *_openDoveNeutronControlBlock);

#endif /* DEF_full_ns0_openDoveNeutronControlBlock_H */
#ifndef DEF_full_ns0_openDoveServiceAppliance_H
#define DEF_full_ns0_openDoveServiceAppliance_H

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

/**
 * 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_openDoveSwitch_H
#define DEF_full_ns0_openDoveSwitch_H

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


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

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

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

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

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

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

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

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

/**
 * 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_openDoveVGWVNIDMapping_H
#define DEF_full_ns0_openDoveVGWVNIDMapping_H

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


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

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

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

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

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

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

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

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

/**
 * Writes a OpenDoveVGWVNIDMapping to XML under element name "openDoveVGWVNIDMapping".
 *
 * @param writer The XML writer.
 * @param _openDoveVGWVNIDMapping The OpenDoveVGWVNIDMapping to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveVGWVNIDMapping(xmlTextWriterPtr writer, struct full_ns0_openDoveVGWVNIDMapping *_openDoveVGWVNIDMapping);

/**
 * Frees a OpenDoveVGWVNIDMapping.
 *
 * @param _openDoveVGWVNIDMapping The OpenDoveVGWVNIDMapping to free.
 */
void free_full_ns0_openDoveVGWVNIDMapping(struct full_ns0_openDoveVGWVNIDMapping *_openDoveVGWVNIDMapping);

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

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

/**
 * Writes a OpenDoveVGWVNIDMapping to XML under element name "openDoveVGWVNIDMapping".
 *
 * @param writer The XML writer.
 * @param _openDoveVGWVNIDMapping The OpenDoveVGWVNIDMapping 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 xmlTextWriterWriteNs0OpenDoveVGWVNIDMappingElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveVGWVNIDMapping *_openDoveVGWVNIDMapping, int writeNamespaces);

/**
 * Frees the children of a OpenDoveVGWVNIDMapping.
 *
 * @param _openDoveVGWVNIDMapping The OpenDoveVGWVNIDMapping whose children are to be free.
 */
static void freeNs0OpenDoveVGWVNIDMappingElement(struct full_ns0_openDoveVGWVNIDMapping *_openDoveVGWVNIDMapping);

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

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

/**
 * Frees the elements of a OpenDoveVGWVNIDMapping.
 *
 * @param _openDoveVGWVNIDMapping The OpenDoveVGWVNIDMapping to free.
 */
static void freeNs0OpenDoveVGWVNIDMappingType(struct full_ns0_openDoveVGWVNIDMapping *_openDoveVGWVNIDMapping);

#endif /* DEF_full_ns0_openDoveVGWVNIDMapping_H */
#ifndef DEF_full_ns0_openDoveDCSList_H
#define DEF_full_ns0_openDoveDCSList_H

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


  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveServiceAppliance *bulkEndpoints;

  /**
   * Size of the bulkEndpoints array.
   */
  int _sizeof_bulkEndpoints;

  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveServiceAppliance *singletonEndpoint;
};

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

/**
 * Writes a OpenDoveDCSList to XML under element name "openDoveDCSList".
 *
 * @param writer The XML writer.
 * @param _openDoveDCSList The OpenDoveDCSList to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveDCSList(xmlTextWriterPtr writer, struct full_ns0_openDoveDCSList *_openDoveDCSList);

/**
 * Frees a OpenDoveDCSList.
 *
 * @param _openDoveDCSList The OpenDoveDCSList to free.
 */
void free_full_ns0_openDoveDCSList(struct full_ns0_openDoveDCSList *_openDoveDCSList);

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

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

/**
 * Writes a OpenDoveDCSList to XML under element name "openDoveDCSList".
 *
 * @param writer The XML writer.
 * @param _openDoveDCSList The OpenDoveDCSList 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 xmlTextWriterWriteNs0OpenDoveDCSListElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveDCSList *_openDoveDCSList, int writeNamespaces);

/**
 * Frees the children of a OpenDoveDCSList.
 *
 * @param _openDoveDCSList The OpenDoveDCSList whose children are to be free.
 */
static void freeNs0OpenDoveDCSListElement(struct full_ns0_openDoveDCSList *_openDoveDCSList);

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

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

/**
 * Frees the elements of a OpenDoveDCSList.
 *
 * @param _openDoveDCSList The OpenDoveDCSList to free.
 */
static void freeNs0OpenDoveDCSListType(struct full_ns0_openDoveDCSList *_openDoveDCSList);

#endif /* DEF_full_ns0_openDoveDCSList_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 *bulkDomains;

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

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

/**
 * 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_openDoveEndpointRequest_H
#define DEF_full_ns0_openDoveEndpointRequest_H

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


  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveEndpoint *singletonEndpoint;

  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveEndpoint *bulkEndpoints;

  /**
   * Size of the bulkEndpoints array.
   */
  int _sizeof_bulkEndpoints;
};

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

/**
 * Writes a OpenDoveEndpointRequest to XML under element name "openDoveEndpointRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveEndpointRequest The OpenDoveEndpointRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveEndpointRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveEndpointRequest *_openDoveEndpointRequest);

/**
 * Frees a OpenDoveEndpointRequest.
 *
 * @param _openDoveEndpointRequest The OpenDoveEndpointRequest to free.
 */
void free_full_ns0_openDoveEndpointRequest(struct full_ns0_openDoveEndpointRequest *_openDoveEndpointRequest);

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

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

/**
 * Writes a OpenDoveEndpointRequest to XML under element name "openDoveEndpointRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveEndpointRequest The OpenDoveEndpointRequest 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 xmlTextWriterWriteNs0OpenDoveEndpointRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveEndpointRequest *_openDoveEndpointRequest, int writeNamespaces);

/**
 * Frees the children of a OpenDoveEndpointRequest.
 *
 * @param _openDoveEndpointRequest The OpenDoveEndpointRequest whose children are to be free.
 */
static void freeNs0OpenDoveEndpointRequestElement(struct full_ns0_openDoveEndpointRequest *_openDoveEndpointRequest);

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

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

/**
 * Frees the elements of a OpenDoveEndpointRequest.
 *
 * @param _openDoveEndpointRequest The OpenDoveEndpointRequest to free.
 */
static void freeNs0OpenDoveEndpointRequestType(struct full_ns0_openDoveEndpointRequest *_openDoveEndpointRequest);

#endif /* DEF_full_ns0_openDoveEndpointRequest_H */
#ifndef DEF_full_ns0_openDoveGWSessionStatsRequest_H
#define DEF_full_ns0_openDoveGWSessionStatsRequest_H

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


  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveGWSession *bulkSessions;

  /**
   * Size of the bulkSessions array.
   */
  int _sizeof_bulkSessions;

  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveGWSession *singletonSession;
};

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

/**
 * Writes a OpenDoveGWSessionStatsRequest to XML under element name "openDoveGWSessionStatsRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveGWSessionStatsRequest The OpenDoveGWSessionStatsRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveGWSessionStatsRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveGWSessionStatsRequest *_openDoveGWSessionStatsRequest);

/**
 * Frees a OpenDoveGWSessionStatsRequest.
 *
 * @param _openDoveGWSessionStatsRequest The OpenDoveGWSessionStatsRequest to free.
 */
void free_full_ns0_openDoveGWSessionStatsRequest(struct full_ns0_openDoveGWSessionStatsRequest *_openDoveGWSessionStatsRequest);

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

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

/**
 * Writes a OpenDoveGWSessionStatsRequest to XML under element name "openDoveGWSessionStatsRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveGWSessionStatsRequest The OpenDoveGWSessionStatsRequest 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 xmlTextWriterWriteNs0OpenDoveGWSessionStatsRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveGWSessionStatsRequest *_openDoveGWSessionStatsRequest, int writeNamespaces);

/**
 * Frees the children of a OpenDoveGWSessionStatsRequest.
 *
 * @param _openDoveGWSessionStatsRequest The OpenDoveGWSessionStatsRequest whose children are to be free.
 */
static void freeNs0OpenDoveGWSessionStatsRequestElement(struct full_ns0_openDoveGWSessionStatsRequest *_openDoveGWSessionStatsRequest);

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

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

/**
 * Frees the elements of a OpenDoveGWSessionStatsRequest.
 *
 * @param _openDoveGWSessionStatsRequest The OpenDoveGWSessionStatsRequest to free.
 */
static void freeNs0OpenDoveGWSessionStatsRequestType(struct full_ns0_openDoveGWSessionStatsRequest *_openDoveGWSessionStatsRequest);

#endif /* DEF_full_ns0_openDoveGWSessionStatsRequest_H */
#ifndef DEF_full_ns0_openDoveGWStats_H
#define DEF_full_ns0_openDoveGWStats_H

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/**
 * Writes a OpenDoveGWStats to XML under element name "openDoveGWStats".
 *
 * @param writer The XML writer.
 * @param _openDoveGWStats The OpenDoveGWStats to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveGWStats(xmlTextWriterPtr writer, struct full_ns0_openDoveGWStats *_openDoveGWStats);

/**
 * Frees a OpenDoveGWStats.
 *
 * @param _openDoveGWStats The OpenDoveGWStats to free.
 */
void free_full_ns0_openDoveGWStats(struct full_ns0_openDoveGWStats *_openDoveGWStats);

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

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

/**
 * Writes a OpenDoveGWStats to XML under element name "openDoveGWStats".
 *
 * @param writer The XML writer.
 * @param _openDoveGWStats The OpenDoveGWStats 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 xmlTextWriterWriteNs0OpenDoveGWStatsElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveGWStats *_openDoveGWStats, int writeNamespaces);

/**
 * Frees the children of a OpenDoveGWStats.
 *
 * @param _openDoveGWStats The OpenDoveGWStats whose children are to be free.
 */
static void freeNs0OpenDoveGWStatsElement(struct full_ns0_openDoveGWStats *_openDoveGWStats);

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

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

/**
 * Frees the elements of a OpenDoveGWStats.
 *
 * @param _openDoveGWStats The OpenDoveGWStats to free.
 */
static void freeNs0OpenDoveGWStatsType(struct full_ns0_openDoveGWStats *_openDoveGWStats);

#endif /* DEF_full_ns0_openDoveGWStats_H */
#ifndef DEF_full_ns0_openDoveGwIpv4Request_H
#define DEF_full_ns0_openDoveGwIpv4Request_H

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


  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveGwIpv4 *singletonPool;

  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveGwIpv4 *bulkPools;

  /**
   * Size of the bulkPools array.
   */
  int _sizeof_bulkPools;
};

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

/**
 * Writes a OpenDoveGwIpv4Request to XML under element name "openDoveGwIpv4Request".
 *
 * @param writer The XML writer.
 * @param _openDoveGwIpv4Request The OpenDoveGwIpv4Request to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveGwIpv4Request(xmlTextWriterPtr writer, struct full_ns0_openDoveGwIpv4Request *_openDoveGwIpv4Request);

/**
 * Frees a OpenDoveGwIpv4Request.
 *
 * @param _openDoveGwIpv4Request The OpenDoveGwIpv4Request to free.
 */
void free_full_ns0_openDoveGwIpv4Request(struct full_ns0_openDoveGwIpv4Request *_openDoveGwIpv4Request);

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

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

/**
 * Writes a OpenDoveGwIpv4Request to XML under element name "openDoveGwIpv4Request".
 *
 * @param writer The XML writer.
 * @param _openDoveGwIpv4Request The OpenDoveGwIpv4Request 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 xmlTextWriterWriteNs0OpenDoveGwIpv4RequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveGwIpv4Request *_openDoveGwIpv4Request, int writeNamespaces);

/**
 * Frees the children of a OpenDoveGwIpv4Request.
 *
 * @param _openDoveGwIpv4Request The OpenDoveGwIpv4Request whose children are to be free.
 */
static void freeNs0OpenDoveGwIpv4RequestElement(struct full_ns0_openDoveGwIpv4Request *_openDoveGwIpv4Request);

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

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

/**
 * Frees the elements of a OpenDoveGwIpv4Request.
 *
 * @param _openDoveGwIpv4Request The OpenDoveGwIpv4Request to free.
 */
static void freeNs0OpenDoveGwIpv4RequestType(struct full_ns0_openDoveGwIpv4Request *_openDoveGwIpv4Request);

#endif /* DEF_full_ns0_openDoveGwIpv4Request_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 *bulkNetworks;

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

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

/**
 * 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_openDoveServiceApplianceRequest_H
#define DEF_full_ns0_openDoveServiceApplianceRequest_H

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


  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveServiceAppliance *singletonAppliance;

  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveServiceAppliance *bulkAppliances;

  /**
   * Size of the bulkAppliances array.
   */
  int _sizeof_bulkAppliances;
};

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

/**
 * Writes a OpenDoveServiceApplianceRequest to XML under element name "openDoveServiceApplianceRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveServiceApplianceRequest The OpenDoveServiceApplianceRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveServiceApplianceRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveServiceApplianceRequest *_openDoveServiceApplianceRequest);

/**
 * Frees a OpenDoveServiceApplianceRequest.
 *
 * @param _openDoveServiceApplianceRequest The OpenDoveServiceApplianceRequest to free.
 */
void free_full_ns0_openDoveServiceApplianceRequest(struct full_ns0_openDoveServiceApplianceRequest *_openDoveServiceApplianceRequest);

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

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

/**
 * Writes a OpenDoveServiceApplianceRequest to XML under element name "openDoveServiceApplianceRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveServiceApplianceRequest The OpenDoveServiceApplianceRequest 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 xmlTextWriterWriteNs0OpenDoveServiceApplianceRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveServiceApplianceRequest *_openDoveServiceApplianceRequest, int writeNamespaces);

/**
 * Frees the children of a OpenDoveServiceApplianceRequest.
 *
 * @param _openDoveServiceApplianceRequest The OpenDoveServiceApplianceRequest whose children are to be free.
 */
static void freeNs0OpenDoveServiceApplianceRequestElement(struct full_ns0_openDoveServiceApplianceRequest *_openDoveServiceApplianceRequest);

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

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

/**
 * Frees the elements of a OpenDoveServiceApplianceRequest.
 *
 * @param _openDoveServiceApplianceRequest The OpenDoveServiceApplianceRequest to free.
 */
static void freeNs0OpenDoveServiceApplianceRequestType(struct full_ns0_openDoveServiceApplianceRequest *_openDoveServiceApplianceRequest);

#endif /* DEF_full_ns0_openDoveServiceApplianceRequest_H */
#ifndef DEF_full_ns0_openDoveSwitchRequest_H
#define DEF_full_ns0_openDoveSwitchRequest_H

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


  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveSwitch *singletonSwitch;

  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveSwitch *bulkSwitches;

  /**
   * Size of the bulkSwitches array.
   */
  int _sizeof_bulkSwitches;
};

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

/**
 * Writes a OpenDoveSwitchRequest to XML under element name "openDoveSwitchRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveSwitchRequest The OpenDoveSwitchRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveSwitchRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitchRequest *_openDoveSwitchRequest);

/**
 * Frees a OpenDoveSwitchRequest.
 *
 * @param _openDoveSwitchRequest The OpenDoveSwitchRequest to free.
 */
void free_full_ns0_openDoveSwitchRequest(struct full_ns0_openDoveSwitchRequest *_openDoveSwitchRequest);

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

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

/**
 * Writes a OpenDoveSwitchRequest to XML under element name "openDoveSwitchRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveSwitchRequest The OpenDoveSwitchRequest 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 xmlTextWriterWriteNs0OpenDoveSwitchRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitchRequest *_openDoveSwitchRequest, int writeNamespaces);

/**
 * Frees the children of a OpenDoveSwitchRequest.
 *
 * @param _openDoveSwitchRequest The OpenDoveSwitchRequest whose children are to be free.
 */
static void freeNs0OpenDoveSwitchRequestElement(struct full_ns0_openDoveSwitchRequest *_openDoveSwitchRequest);

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

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

/**
 * Frees the elements of a OpenDoveSwitchRequest.
 *
 * @param _openDoveSwitchRequest The OpenDoveSwitchRequest to free.
 */
static void freeNs0OpenDoveSwitchRequestType(struct full_ns0_openDoveSwitchRequest *_openDoveSwitchRequest);

#endif /* DEF_full_ns0_openDoveSwitchRequest_H */
#ifndef DEF_full_ns0_openDoveSwitchStatsRequest_H
#define DEF_full_ns0_openDoveSwitchStatsRequest_H

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


  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveNVP *stat;

  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveNVP *bulkStats;

  /**
   * Size of the bulkStats array.
   */
  int _sizeof_bulkStats;
};

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

/**
 * Writes a OpenDoveSwitchStatsRequest to XML under element name "openDoveSwitchStatsRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveSwitchStatsRequest The OpenDoveSwitchStatsRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveSwitchStatsRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitchStatsRequest *_openDoveSwitchStatsRequest);

/**
 * Frees a OpenDoveSwitchStatsRequest.
 *
 * @param _openDoveSwitchStatsRequest The OpenDoveSwitchStatsRequest to free.
 */
void free_full_ns0_openDoveSwitchStatsRequest(struct full_ns0_openDoveSwitchStatsRequest *_openDoveSwitchStatsRequest);

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

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

/**
 * Writes a OpenDoveSwitchStatsRequest to XML under element name "openDoveSwitchStatsRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveSwitchStatsRequest The OpenDoveSwitchStatsRequest 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 xmlTextWriterWriteNs0OpenDoveSwitchStatsRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitchStatsRequest *_openDoveSwitchStatsRequest, int writeNamespaces);

/**
 * Frees the children of a OpenDoveSwitchStatsRequest.
 *
 * @param _openDoveSwitchStatsRequest The OpenDoveSwitchStatsRequest whose children are to be free.
 */
static void freeNs0OpenDoveSwitchStatsRequestElement(struct full_ns0_openDoveSwitchStatsRequest *_openDoveSwitchStatsRequest);

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

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

/**
 * Frees the elements of a OpenDoveSwitchStatsRequest.
 *
 * @param _openDoveSwitchStatsRequest The OpenDoveSwitchStatsRequest to free.
 */
static void freeNs0OpenDoveSwitchStatsRequestType(struct full_ns0_openDoveSwitchStatsRequest *_openDoveSwitchStatsRequest);

#endif /* DEF_full_ns0_openDoveSwitchStatsRequest_H */
#ifndef DEF_full_ns0_openDoveVGWVNIDMappingRequest_H
#define DEF_full_ns0_openDoveVGWVNIDMappingRequest_H

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


  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveVGWVNIDMapping *bulkMappings;

  /**
   * Size of the bulkMappings array.
   */
  int _sizeof_bulkMappings;

  /**
   * (no documentation provided)
   */
  struct full_ns0_openDoveVGWVNIDMapping *singletonMapping;
};

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

/**
 * Writes a OpenDoveVGWVNIDMappingRequest to XML under element name "openDoveVGWVNIDMappingRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveVGWVNIDMappingRequest The OpenDoveVGWVNIDMappingRequest to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveVGWVNIDMappingRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveVGWVNIDMappingRequest *_openDoveVGWVNIDMappingRequest);

/**
 * Frees a OpenDoveVGWVNIDMappingRequest.
 *
 * @param _openDoveVGWVNIDMappingRequest The OpenDoveVGWVNIDMappingRequest to free.
 */
void free_full_ns0_openDoveVGWVNIDMappingRequest(struct full_ns0_openDoveVGWVNIDMappingRequest *_openDoveVGWVNIDMappingRequest);

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

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

/**
 * Writes a OpenDoveVGWVNIDMappingRequest to XML under element name "openDoveVGWVNIDMappingRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveVGWVNIDMappingRequest The OpenDoveVGWVNIDMappingRequest 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 xmlTextWriterWriteNs0OpenDoveVGWVNIDMappingRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveVGWVNIDMappingRequest *_openDoveVGWVNIDMappingRequest, int writeNamespaces);

/**
 * Frees the children of a OpenDoveVGWVNIDMappingRequest.
 *
 * @param _openDoveVGWVNIDMappingRequest The OpenDoveVGWVNIDMappingRequest whose children are to be free.
 */
static void freeNs0OpenDoveVGWVNIDMappingRequestElement(struct full_ns0_openDoveVGWVNIDMappingRequest *_openDoveVGWVNIDMappingRequest);

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

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

/**
 * Frees the elements of a OpenDoveVGWVNIDMappingRequest.
 *
 * @param _openDoveVGWVNIDMappingRequest The OpenDoveVGWVNIDMappingRequest to free.
 */
static void freeNs0OpenDoveVGWVNIDMappingRequestType(struct full_ns0_openDoveVGWVNIDMappingRequest *_openDoveVGWVNIDMappingRequest);

#endif /* DEF_full_ns0_openDoveVGWVNIDMappingRequest_H */
#ifndef DEF_full_ns0_openDoveVNIDStats_H
#define DEF_full_ns0_openDoveVNIDStats_H

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/**
 * Writes a OpenDoveVNIDStats to XML under element name "openDoveVNIDStats".
 *
 * @param writer The XML writer.
 * @param _openDoveVNIDStats The OpenDoveVNIDStats to write.
 * @return The bytes written (may be 0 in case of buffering) or -1 in case of error.
 */
int xml_write_full_ns0_openDoveVNIDStats(xmlTextWriterPtr writer, struct full_ns0_openDoveVNIDStats *_openDoveVNIDStats);

/**
 * Frees a OpenDoveVNIDStats.
 *
 * @param _openDoveVNIDStats The OpenDoveVNIDStats to free.
 */
void free_full_ns0_openDoveVNIDStats(struct full_ns0_openDoveVNIDStats *_openDoveVNIDStats);

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

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

/**
 * Writes a OpenDoveVNIDStats to XML under element name "openDoveVNIDStats".
 *
 * @param writer The XML writer.
 * @param _openDoveVNIDStats The OpenDoveVNIDStats 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 xmlTextWriterWriteNs0OpenDoveVNIDStatsElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveVNIDStats *_openDoveVNIDStats, int writeNamespaces);

/**
 * Frees the children of a OpenDoveVNIDStats.
 *
 * @param _openDoveVNIDStats The OpenDoveVNIDStats whose children are to be free.
 */
static void freeNs0OpenDoveVNIDStatsElement(struct full_ns0_openDoveVNIDStats *_openDoveVNIDStats);

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

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

/**
 * Frees the elements of a OpenDoveVNIDStats.
 *
 * @param _openDoveVNIDStats The OpenDoveVNIDStats to free.
 */
static void freeNs0OpenDoveVNIDStatsType(struct full_ns0_openDoveVNIDStats *_openDoveVNIDStats);

#endif /* DEF_full_ns0_openDoveVNIDStats_H */
#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 "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 "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 "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 (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 "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 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->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->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->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;
  }
  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->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;
  }

  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->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->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->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);
  }
  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->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);
  }
}
#endif /* DEF_full_ns0_openDoveDomain_M */
#ifndef DEF_full_ns0_openDoveEndpoint_M
#define DEF_full_ns0_openDoveEndpoint_M

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

/**
 * Writes a OpenDoveEndpoint to XML under element name "openDoveEndpoint".
 *
 * @param writer The XML writer.
 * @param _openDoveEndpoint The OpenDoveEndpoint to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveEndpoint(xmlTextWriterPtr writer, struct full_ns0_openDoveEndpoint *_openDoveEndpoint) {
  return xmlTextWriterWriteNs0OpenDoveEndpointElementNS(writer, _openDoveEndpoint, 1);
}

/**
 * Frees a OpenDoveEndpoint.
 *
 * @param _openDoveEndpoint The OpenDoveEndpoint to free.
 */
void free_full_ns0_openDoveEndpoint(struct full_ns0_openDoveEndpoint *_openDoveEndpoint) {
  freeNs0OpenDoveEndpointType(_openDoveEndpoint);
  free(_openDoveEndpoint);
}

/**
 * Reads a OpenDoveEndpoint element from XML. The element to be read is "openDoveEndpoint", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveEndpoint, or NULL in case of error.
 */
struct full_ns0_openDoveEndpoint *xmlTextReaderReadNs0OpenDoveEndpointElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveEndpoint *_openDoveEndpoint = NULL;

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

  return _openDoveEndpoint;
}

/**
 * Writes a OpenDoveEndpoint to XML under element name "openDoveEndpoint".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveEndpoint The OpenDoveEndpoint to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveEndpointElement(xmlTextWriterPtr writer, struct full_ns0_openDoveEndpoint *_openDoveEndpoint) {
  return xmlTextWriterWriteNs0OpenDoveEndpointElementNS(writer, _openDoveEndpoint, 0);
}

/**
 * Writes a OpenDoveEndpoint to XML under element name "openDoveEndpoint".
 *
 * @param writer The XML writer.
 * @param _openDoveEndpoint The OpenDoveEndpoint to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveEndpointElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveEndpoint *_openDoveEndpoint, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveEndpoint.
 *
 * @param _openDoveEndpoint The OpenDoveEndpoint whose children are to be free.
 */
static void freeNs0OpenDoveEndpointElement(struct full_ns0_openDoveEndpoint *_openDoveEndpoint) {
  freeNs0OpenDoveEndpointType(_openDoveEndpoint);
}

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



  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
        freeNs0OpenDoveEndpointType(_openDoveEndpoint);
        free(_openDoveEndpoint);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "physical IPs", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}physical IPs 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 {}physical IPs of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveEndpointType(_openDoveEndpoint);
          free(_openDoveEndpoint);
          return NULL;
        }

        _openDoveEndpoint->physIP = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "virtual IPs", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}virtual IPs 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 {}virtual IPs of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveEndpointType(_openDoveEndpoint);
          free(_openDoveEndpoint);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}mac 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 {}mac of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveEndpointType(_openDoveEndpoint);
          free(_openDoveEndpoint);
          return NULL;
        }

        _openDoveEndpoint->mac = ((xmlChar*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "Host IP", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}Host 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 {}Host IP of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveEndpointType(_openDoveEndpoint);
          free(_openDoveEndpoint);
          return NULL;
        }

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

  return _openDoveEndpoint;
}

/**
 * Writes a OpenDoveEndpoint to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveEndpoint The OpenDoveEndpoint to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveEndpointType(xmlTextWriterPtr writer, struct full_ns0_openDoveEndpoint *_openDoveEndpoint) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveEndpoint->physIP != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "physical IPs", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}physical IPs. 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 {}physical IPs...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveEndpoint->physIP));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}physical IPs. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}physical IPs. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveEndpoint->virtIP != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "virtual IPs", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}virtual IPs. 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 {}virtual IPs...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveEndpoint->virtIP));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}virtual IPs. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}virtual IPs. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveEndpoint->mac != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "mac", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}mac. 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 {}mac...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveEndpoint->mac));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}mac. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}mac. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveEndpoint->hostIP != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "Host IP", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}Host 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 {}Host IP...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveEndpoint->hostIP));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}Host 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 {}Host IP. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveEndpoint.
 *
 * @param _openDoveEndpoint The OpenDoveEndpoint to free.
 */
static void freeNs0OpenDoveEndpointType(struct full_ns0_openDoveEndpoint *_openDoveEndpoint) {
  int i;
  if (_openDoveEndpoint->physIP != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor physIP of type full_ns0_openDoveEndpoint...\n");
#endif
    freeXsStringType(_openDoveEndpoint->physIP);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor physIP of type full_ns0_openDoveEndpoint...\n");
#endif
    free(_openDoveEndpoint->physIP);
  }
  if (_openDoveEndpoint->virtIP != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor virtIP of type full_ns0_openDoveEndpoint...\n");
#endif
    freeXsStringType(_openDoveEndpoint->virtIP);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor virtIP of type full_ns0_openDoveEndpoint...\n");
#endif
    free(_openDoveEndpoint->virtIP);
  }
  if (_openDoveEndpoint->mac != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor mac of type full_ns0_openDoveEndpoint...\n");
#endif
    freeXsStringType(_openDoveEndpoint->mac);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor mac of type full_ns0_openDoveEndpoint...\n");
#endif
    free(_openDoveEndpoint->mac);
  }
  if (_openDoveEndpoint->hostIP != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor hostIP of type full_ns0_openDoveEndpoint...\n");
#endif
    freeXsStringType(_openDoveEndpoint->hostIP);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor hostIP of type full_ns0_openDoveEndpoint...\n");
#endif
    free(_openDoveEndpoint->hostIP);
  }
}
#endif /* DEF_full_ns0_openDoveEndpoint_M */
#ifndef DEF_full_ns0_openDoveGWSession_M
#define DEF_full_ns0_openDoveGWSession_M

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

/**
 * Writes a OpenDoveGWSession to XML under element name "openDoveGWSession".
 *
 * @param writer The XML writer.
 * @param _openDoveGWSession The OpenDoveGWSession to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveGWSession(xmlTextWriterPtr writer, struct full_ns0_openDoveGWSession *_openDoveGWSession) {
  return xmlTextWriterWriteNs0OpenDoveGWSessionElementNS(writer, _openDoveGWSession, 1);
}

/**
 * Frees a OpenDoveGWSession.
 *
 * @param _openDoveGWSession The OpenDoveGWSession to free.
 */
void free_full_ns0_openDoveGWSession(struct full_ns0_openDoveGWSession *_openDoveGWSession) {
  freeNs0OpenDoveGWSessionType(_openDoveGWSession);
  free(_openDoveGWSession);
}

/**
 * Reads a OpenDoveGWSession element from XML. The element to be read is "openDoveGWSession", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveGWSession, or NULL in case of error.
 */
struct full_ns0_openDoveGWSession *xmlTextReaderReadNs0OpenDoveGWSessionElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveGWSession *_openDoveGWSession = NULL;

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

  return _openDoveGWSession;
}

/**
 * Writes a OpenDoveGWSession to XML under element name "openDoveGWSession".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveGWSession The OpenDoveGWSession to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveGWSessionElement(xmlTextWriterPtr writer, struct full_ns0_openDoveGWSession *_openDoveGWSession) {
  return xmlTextWriterWriteNs0OpenDoveGWSessionElementNS(writer, _openDoveGWSession, 0);
}

/**
 * Writes a OpenDoveGWSession to XML under element name "openDoveGWSession".
 *
 * @param writer The XML writer.
 * @param _openDoveGWSession The OpenDoveGWSession to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveGWSessionElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveGWSession *_openDoveGWSession, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveGWSession.
 *
 * @param _openDoveGWSession The OpenDoveGWSession whose children are to be free.
 */
static void freeNs0OpenDoveGWSessionElement(struct full_ns0_openDoveGWSession *_openDoveGWSession) {
  freeNs0OpenDoveGWSessionType(_openDoveGWSession);
}

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



  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
        freeNs0OpenDoveGWSessionType(_openDoveGWSession);
        free(_openDoveGWSession);
        return NULL;
      }
      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}string.\n");
#endif
        _child_accessor = xmlTextReaderReadXsStringType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}action of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}dport 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 {}dport of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}sip 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 {}sip of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}proto 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 {}proto of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}snat_sport 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 {}snat_sport of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}orig_sip 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 {}orig_sip of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_dip 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 {}ovl_dip of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}net_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 {}net_id of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}orig_sport 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 {}orig_sport of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}age 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 {}age of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}orig_dport 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 {}orig_dport of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}dip 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 {}dip of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_sip 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 {}ovl_sip of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}sport 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 {}sport of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_dport 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 {}ovl_dport of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}snat_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 {}snat_ip of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}orig_dip 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 {}orig_dip of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_sport 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 {}ovl_sport of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionType(_openDoveGWSession);
          free(_openDoveGWSession);
          return NULL;
        }

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

  return _openDoveGWSession;
}

/**
 * Writes a OpenDoveGWSession to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveGWSession The OpenDoveGWSession to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveGWSessionType(xmlTextWriterPtr writer, struct full_ns0_openDoveGWSession *_openDoveGWSession) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveGWSession->action != 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}string for element {}action...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWSession->action));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string 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 (_openDoveGWSession->destinationPort != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dport", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}dport. 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 {}dport...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveGWSession->destinationPort));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}dport. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}dport. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->sourceIP != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "sip", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}sip. 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 {}sip...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWSession->sourceIP));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}sip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}sip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->protocol != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "proto", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}proto. 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 {}proto...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveGWSession->protocol));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}proto. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}proto. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->sNATPort != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "snat_sport", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}snat_sport. 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 {}snat_sport...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveGWSession->sNATPort));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}snat_sport. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}snat_sport. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->originalSourceIP != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "orig_sip", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}orig_sip. 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 {}orig_sip...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWSession->originalSourceIP));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}orig_sip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}orig_sip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->overlayDestinationIP != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_dip", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_dip. 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 {}ovl_dip...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWSession->overlayDestinationIP));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_dip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_dip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->vnid != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "net_id", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}net_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 {}net_id...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWSession->vnid));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}net_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 {}net_id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->originalSourcePort != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "orig_sport", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}orig_sport. 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 {}orig_sport...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveGWSession->originalSourcePort));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}orig_sport. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}orig_sport. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->age != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "age", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}age. 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 {}age...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWSession->age));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}age. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}age. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->originalDestinationPort != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "orig_dport", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}orig_dport. 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 {}orig_dport...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveGWSession->originalDestinationPort));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}orig_dport. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}orig_dport. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->destinationIP != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "dip", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}dip. 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 {}dip...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWSession->destinationIP));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}dip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}dip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->overlaySourceIP != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_sip", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_sip. 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 {}ovl_sip...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWSession->overlaySourceIP));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_sip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_sip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->sourcePort != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "sport", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}sport. 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 {}sport...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveGWSession->sourcePort));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}sport. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}sport. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->overlayDestinationPort != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_dport", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_dport. 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 {}ovl_dport...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveGWSession->overlayDestinationPort));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}ovl_dport. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_dport. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->sNATIP != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "snat_ip", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}snat_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 {}snat_ip...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWSession->sNATIP));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}snat_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 {}snat_ip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->originalDestinationIP != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "orig_dip", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}orig_dip. 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 {}orig_dip...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWSession->originalDestinationIP));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}orig_dip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}orig_dip. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSession->overlaySourcePort != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_sport", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_sport. 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 {}ovl_sport...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveGWSession->overlaySourcePort));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}ovl_sport. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

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

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveGWSession.
 *
 * @param _openDoveGWSession The OpenDoveGWSession to free.
 */
static void freeNs0OpenDoveGWSessionType(struct full_ns0_openDoveGWSession *_openDoveGWSession) {
  int i;
  if (_openDoveGWSession->action != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor action of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsStringType(_openDoveGWSession->action);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor action of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->action);
  }
  if (_openDoveGWSession->destinationPort != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor destinationPort of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsIntType(_openDoveGWSession->destinationPort);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor destinationPort of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->destinationPort);
  }
  if (_openDoveGWSession->sourceIP != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor sourceIP of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsStringType(_openDoveGWSession->sourceIP);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor sourceIP of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->sourceIP);
  }
  if (_openDoveGWSession->protocol != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor protocol of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsIntType(_openDoveGWSession->protocol);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor protocol of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->protocol);
  }
  if (_openDoveGWSession->sNATPort != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor sNATPort of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsIntType(_openDoveGWSession->sNATPort);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor sNATPort of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->sNATPort);
  }
  if (_openDoveGWSession->originalSourceIP != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor originalSourceIP of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsStringType(_openDoveGWSession->originalSourceIP);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor originalSourceIP of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->originalSourceIP);
  }
  if (_openDoveGWSession->overlayDestinationIP != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor overlayDestinationIP of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsStringType(_openDoveGWSession->overlayDestinationIP);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor overlayDestinationIP of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->overlayDestinationIP);
  }
  if (_openDoveGWSession->vnid != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor vnid of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsStringType(_openDoveGWSession->vnid);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor vnid of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->vnid);
  }
  if (_openDoveGWSession->originalSourcePort != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor originalSourcePort of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsIntType(_openDoveGWSession->originalSourcePort);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor originalSourcePort of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->originalSourcePort);
  }
  if (_openDoveGWSession->age != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor age of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsStringType(_openDoveGWSession->age);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor age of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->age);
  }
  if (_openDoveGWSession->originalDestinationPort != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor originalDestinationPort of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsIntType(_openDoveGWSession->originalDestinationPort);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor originalDestinationPort of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->originalDestinationPort);
  }
  if (_openDoveGWSession->destinationIP != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor destinationIP of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsStringType(_openDoveGWSession->destinationIP);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor destinationIP of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->destinationIP);
  }
  if (_openDoveGWSession->overlaySourceIP != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor overlaySourceIP of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsStringType(_openDoveGWSession->overlaySourceIP);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor overlaySourceIP of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->overlaySourceIP);
  }
  if (_openDoveGWSession->sourcePort != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor sourcePort of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsIntType(_openDoveGWSession->sourcePort);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor sourcePort of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->sourcePort);
  }
  if (_openDoveGWSession->overlayDestinationPort != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor overlayDestinationPort of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsIntType(_openDoveGWSession->overlayDestinationPort);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor overlayDestinationPort of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->overlayDestinationPort);
  }
  if (_openDoveGWSession->sNATIP != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor sNATIP of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsStringType(_openDoveGWSession->sNATIP);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor sNATIP of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->sNATIP);
  }
  if (_openDoveGWSession->originalDestinationIP != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor originalDestinationIP of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsStringType(_openDoveGWSession->originalDestinationIP);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor originalDestinationIP of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->originalDestinationIP);
  }
  if (_openDoveGWSession->overlaySourcePort != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor overlaySourcePort of type full_ns0_openDoveGWSession...\n");
#endif
    freeXsIntType(_openDoveGWSession->overlaySourcePort);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor overlaySourcePort of type full_ns0_openDoveGWSession...\n");
#endif
    free(_openDoveGWSession->overlaySourcePort);
  }
}
#endif /* DEF_full_ns0_openDoveGWSession_M */
#ifndef DEF_full_ns0_openDoveGwIpv4_M
#define DEF_full_ns0_openDoveGwIpv4_M

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

/**
 * Writes a OpenDoveGwIpv4 to XML under element name "openDoveGwIpv4".
 *
 * @param writer The XML writer.
 * @param _openDoveGwIpv4 The OpenDoveGwIpv4 to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveGwIpv4(xmlTextWriterPtr writer, struct full_ns0_openDoveGwIpv4 *_openDoveGwIpv4) {
  return xmlTextWriterWriteNs0OpenDoveGwIpv4ElementNS(writer, _openDoveGwIpv4, 1);
}

/**
 * Frees a OpenDoveGwIpv4.
 *
 * @param _openDoveGwIpv4 The OpenDoveGwIpv4 to free.
 */
void free_full_ns0_openDoveGwIpv4(struct full_ns0_openDoveGwIpv4 *_openDoveGwIpv4) {
  freeNs0OpenDoveGwIpv4Type(_openDoveGwIpv4);
  free(_openDoveGwIpv4);
}

/**
 * Reads a OpenDoveGwIpv4 element from XML. The element to be read is "openDoveGwIpv4", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveGwIpv4, or NULL in case of error.
 */
struct full_ns0_openDoveGwIpv4 *xmlTextReaderReadNs0OpenDoveGwIpv4Element(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveGwIpv4 *_openDoveGwIpv4 = NULL;

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

  return _openDoveGwIpv4;
}

/**
 * Writes a OpenDoveGwIpv4 to XML under element name "openDoveGwIpv4".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveGwIpv4 The OpenDoveGwIpv4 to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveGwIpv4Element(xmlTextWriterPtr writer, struct full_ns0_openDoveGwIpv4 *_openDoveGwIpv4) {
  return xmlTextWriterWriteNs0OpenDoveGwIpv4ElementNS(writer, _openDoveGwIpv4, 0);
}

/**
 * Writes a OpenDoveGwIpv4 to XML under element name "openDoveGwIpv4".
 *
 * @param writer The XML writer.
 * @param _openDoveGwIpv4 The OpenDoveGwIpv4 to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveGwIpv4ElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveGwIpv4 *_openDoveGwIpv4, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveGwIpv4.
 *
 * @param _openDoveGwIpv4 The OpenDoveGwIpv4 whose children are to be free.
 */
static void freeNs0OpenDoveGwIpv4Element(struct full_ns0_openDoveGwIpv4 *_openDoveGwIpv4) {
  freeNs0OpenDoveGwIpv4Type(_openDoveGwIpv4);
}

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



  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
        freeNs0OpenDoveGwIpv4Type(_openDoveGwIpv4);
        free(_openDoveGwIpv4);
        return NULL;
      }
      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.
          freeNs0OpenDoveGwIpv4Type(_openDoveGwIpv4);
          free(_openDoveGwIpv4);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}intf_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 {}intf_type of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGwIpv4Type(_openDoveGwIpv4);
          free(_openDoveGwIpv4);
          return NULL;
        }

        _openDoveGwIpv4->type = ((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.
          freeNs0OpenDoveGwIpv4Type(_openDoveGwIpv4);
          free(_openDoveGwIpv4);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}gwUUID 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 {}gwUUID of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGwIpv4Type(_openDoveGwIpv4);
          free(_openDoveGwIpv4);
          return NULL;
        }

        _openDoveGwIpv4->gwUUID = ((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.
          freeNs0OpenDoveGwIpv4Type(_openDoveGwIpv4);
          free(_openDoveGwIpv4);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}vlan 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 {}vlan of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGwIpv4Type(_openDoveGwIpv4);
          free(_openDoveGwIpv4);
          return NULL;
        }

        _openDoveGwIpv4->vlan = ((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.
          freeNs0OpenDoveGwIpv4Type(_openDoveGwIpv4);
          free(_openDoveGwIpv4);
          return NULL;
        }

        _openDoveGwIpv4->createVersion = ((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.
          freeNs0OpenDoveGwIpv4Type(_openDoveGwIpv4);
          free(_openDoveGwIpv4);
          return NULL;
        }

        _openDoveGwIpv4->ip = ((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.
          freeNs0OpenDoveGwIpv4Type(_openDoveGwIpv4);
          free(_openDoveGwIpv4);
          return NULL;
        }

        _openDoveGwIpv4->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.
          freeNs0OpenDoveGwIpv4Type(_openDoveGwIpv4);
          free(_openDoveGwIpv4);
          return NULL;
        }

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

  return _openDoveGwIpv4;
}

/**
 * Writes a OpenDoveGwIpv4 to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveGwIpv4 The OpenDoveGwIpv4 to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveGwIpv4Type(xmlTextWriterPtr writer, struct full_ns0_openDoveGwIpv4 *_openDoveGwIpv4) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveGwIpv4->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, (_openDoveGwIpv4->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;
  }
  if (_openDoveGwIpv4->type != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "intf_type", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}intf_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 {}intf_type...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGwIpv4->type));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}intf_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 {}intf_type. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGwIpv4->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, (_openDoveGwIpv4->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 (_openDoveGwIpv4->gwUUID != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "gwUUID", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}gwUUID. 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 {}gwUUID...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGwIpv4->gwUUID));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}gwUUID. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}gwUUID. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGwIpv4->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, (_openDoveGwIpv4->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 (_openDoveGwIpv4->vlan != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}vlan. 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 {}vlan...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveGwIpv4->vlan));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}vlan. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}vlan. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGwIpv4->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, (_openDoveGwIpv4->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 (_openDoveGwIpv4->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, (_openDoveGwIpv4->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 (_openDoveGwIpv4->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, (_openDoveGwIpv4->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 (_openDoveGwIpv4->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, (_openDoveGwIpv4->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;
  }

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveGwIpv4.
 *
 * @param _openDoveGwIpv4 The OpenDoveGwIpv4 to free.
 */
static void freeNs0OpenDoveGwIpv4Type(struct full_ns0_openDoveGwIpv4 *_openDoveGwIpv4) {
  int i;
  if (_openDoveGwIpv4->mask != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor mask of type full_ns0_openDoveGwIpv4...\n");
#endif
    freeXsStringType(_openDoveGwIpv4->mask);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor mask of type full_ns0_openDoveGwIpv4...\n");
#endif
    free(_openDoveGwIpv4->mask);
  }
  if (_openDoveGwIpv4->type != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor type of type full_ns0_openDoveGwIpv4...\n");
#endif
    freeXsStringType(_openDoveGwIpv4->type);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor type of type full_ns0_openDoveGwIpv4...\n");
#endif
    free(_openDoveGwIpv4->type);
  }
  if (_openDoveGwIpv4->tombstoneFlag != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor tombstoneFlag of type full_ns0_openDoveGwIpv4...\n");
#endif
    freeXsBooleanType(_openDoveGwIpv4->tombstoneFlag);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor tombstoneFlag of type full_ns0_openDoveGwIpv4...\n");
#endif
    free(_openDoveGwIpv4->tombstoneFlag);
  }
  if (_openDoveGwIpv4->gwUUID != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor gwUUID of type full_ns0_openDoveGwIpv4...\n");
#endif
    freeXsStringType(_openDoveGwIpv4->gwUUID);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor gwUUID of type full_ns0_openDoveGwIpv4...\n");
#endif
    free(_openDoveGwIpv4->gwUUID);
  }
  if (_openDoveGwIpv4->lastChangeVersion != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor lastChangeVersion of type full_ns0_openDoveGwIpv4...\n");
#endif
    freeXsIntType(_openDoveGwIpv4->lastChangeVersion);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor lastChangeVersion of type full_ns0_openDoveGwIpv4...\n");
#endif
    free(_openDoveGwIpv4->lastChangeVersion);
  }
  if (_openDoveGwIpv4->vlan != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor vlan of type full_ns0_openDoveGwIpv4...\n");
#endif
    freeXsIntType(_openDoveGwIpv4->vlan);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor vlan of type full_ns0_openDoveGwIpv4...\n");
#endif
    free(_openDoveGwIpv4->vlan);
  }
  if (_openDoveGwIpv4->createVersion != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor createVersion of type full_ns0_openDoveGwIpv4...\n");
#endif
    freeXsIntType(_openDoveGwIpv4->createVersion);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor createVersion of type full_ns0_openDoveGwIpv4...\n");
#endif
    free(_openDoveGwIpv4->createVersion);
  }
  if (_openDoveGwIpv4->ip != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ip of type full_ns0_openDoveGwIpv4...\n");
#endif
    freeXsStringType(_openDoveGwIpv4->ip);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ip of type full_ns0_openDoveGwIpv4...\n");
#endif
    free(_openDoveGwIpv4->ip);
  }
  if (_openDoveGwIpv4->uuid != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor uuid of type full_ns0_openDoveGwIpv4...\n");
#endif
    freeXsStringType(_openDoveGwIpv4->uuid);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor uuid of type full_ns0_openDoveGwIpv4...\n");
#endif
    free(_openDoveGwIpv4->uuid);
  }
  if (_openDoveGwIpv4->nexthop != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor nexthop of type full_ns0_openDoveGwIpv4...\n");
#endif
    freeXsStringType(_openDoveGwIpv4->nexthop);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor nexthop of type full_ns0_openDoveGwIpv4...\n");
#endif
    free(_openDoveGwIpv4->nexthop);
  }
}
#endif /* DEF_full_ns0_openDoveGwIpv4_M */
#ifndef DEF_full_ns0_openDoveNVP_M
#define DEF_full_ns0_openDoveNVP_M

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

/**
 * Writes a OpenDoveNVP to XML under element name "openDoveNVP".
 *
 * @param writer The XML writer.
 * @param _openDoveNVP The OpenDoveNVP to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveNVP(xmlTextWriterPtr writer, struct full_ns0_openDoveNVP *_openDoveNVP) {
  return xmlTextWriterWriteNs0OpenDoveNVPElementNS(writer, _openDoveNVP, 1);
}

/**
 * Frees a OpenDoveNVP.
 *
 * @param _openDoveNVP The OpenDoveNVP to free.
 */
void free_full_ns0_openDoveNVP(struct full_ns0_openDoveNVP *_openDoveNVP) {
  freeNs0OpenDoveNVPType(_openDoveNVP);
  free(_openDoveNVP);
}

/**
 * Reads a OpenDoveNVP element from XML. The element to be read is "openDoveNVP", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveNVP, or NULL in case of error.
 */
struct full_ns0_openDoveNVP *xmlTextReaderReadNs0OpenDoveNVPElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveNVP *_openDoveNVP = NULL;

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

  return _openDoveNVP;
}

/**
 * Writes a OpenDoveNVP to XML under element name "openDoveNVP".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveNVP The OpenDoveNVP to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveNVPElement(xmlTextWriterPtr writer, struct full_ns0_openDoveNVP *_openDoveNVP) {
  return xmlTextWriterWriteNs0OpenDoveNVPElementNS(writer, _openDoveNVP, 0);
}

/**
 * Writes a OpenDoveNVP to XML under element name "openDoveNVP".
 *
 * @param writer The XML writer.
 * @param _openDoveNVP The OpenDoveNVP to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveNVPElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveNVP *_openDoveNVP, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveNVP.
 *
 * @param _openDoveNVP The OpenDoveNVP whose children are to be free.
 */
static void freeNs0OpenDoveNVPElement(struct full_ns0_openDoveNVP *_openDoveNVP) {
  freeNs0OpenDoveNVPType(_openDoveNVP);
}

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



  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
        freeNs0OpenDoveNVPType(_openDoveNVP);
        free(_openDoveNVP);
        return NULL;
      }
      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.
          freeNs0OpenDoveNVPType(_openDoveNVP);
          free(_openDoveNVP);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}Value 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 {}Value of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveNVPType(_openDoveNVP);
          free(_openDoveNVP);
          return NULL;
        }

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

  return _openDoveNVP;
}

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

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

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveNVP.
 *
 * @param _openDoveNVP The OpenDoveNVP to free.
 */
static void freeNs0OpenDoveNVPType(struct full_ns0_openDoveNVP *_openDoveNVP) {
  int i;
  if (_openDoveNVP->name != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor name of type full_ns0_openDoveNVP...\n");
#endif
    freeXsStringType(_openDoveNVP->name);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor name of type full_ns0_openDoveNVP...\n");
#endif
    free(_openDoveNVP->name);
  }
  if (_openDoveNVP->value != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor value of type full_ns0_openDoveNVP...\n");
#endif
    freeXsStringType(_openDoveNVP->value);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor value of type full_ns0_openDoveNVP...\n");
#endif
    free(_openDoveNVP->value);
  }
}
#endif /* DEF_full_ns0_openDoveNVP_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 "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 "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 (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 "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 "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 "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 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->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->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;
  }
  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->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->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->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;
  }

  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->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->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);
  }
  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->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->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->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);
  }
}
#endif /* DEF_full_ns0_openDoveNetwork_M */
#ifndef DEF_full_ns0_openDoveNeutronControlBlock_M
#define DEF_full_ns0_openDoveNeutronControlBlock_M

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

/**
 * Writes a OpenDoveNeutronControlBlock to XML under element name "openDoveNeutronControlBlock".
 *
 * @param writer The XML writer.
 * @param _openDoveNeutronControlBlock The OpenDoveNeutronControlBlock to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveNeutronControlBlock(xmlTextWriterPtr writer, struct full_ns0_openDoveNeutronControlBlock *_openDoveNeutronControlBlock) {
  return xmlTextWriterWriteNs0OpenDoveNeutronControlBlockElementNS(writer, _openDoveNeutronControlBlock, 1);
}

/**
 * Frees a OpenDoveNeutronControlBlock.
 *
 * @param _openDoveNeutronControlBlock The OpenDoveNeutronControlBlock to free.
 */
void free_full_ns0_openDoveNeutronControlBlock(struct full_ns0_openDoveNeutronControlBlock *_openDoveNeutronControlBlock) {
  freeNs0OpenDoveNeutronControlBlockType(_openDoveNeutronControlBlock);
  free(_openDoveNeutronControlBlock);
}

/**
 * Reads a OpenDoveNeutronControlBlock element from XML. The element to be read is "openDoveNeutronControlBlock", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveNeutronControlBlock, or NULL in case of error.
 */
struct full_ns0_openDoveNeutronControlBlock *xmlTextReaderReadNs0OpenDoveNeutronControlBlockElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveNeutronControlBlock *_openDoveNeutronControlBlock = NULL;

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

  return _openDoveNeutronControlBlock;
}

/**
 * Writes a OpenDoveNeutronControlBlock to XML under element name "openDoveNeutronControlBlock".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveNeutronControlBlock The OpenDoveNeutronControlBlock to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveNeutronControlBlockElement(xmlTextWriterPtr writer, struct full_ns0_openDoveNeutronControlBlock *_openDoveNeutronControlBlock) {
  return xmlTextWriterWriteNs0OpenDoveNeutronControlBlockElementNS(writer, _openDoveNeutronControlBlock, 0);
}

/**
 * Writes a OpenDoveNeutronControlBlock to XML under element name "openDoveNeutronControlBlock".
 *
 * @param writer The XML writer.
 * @param _openDoveNeutronControlBlock The OpenDoveNeutronControlBlock to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveNeutronControlBlockElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveNeutronControlBlock *_openDoveNeutronControlBlock, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveNeutronControlBlock.
 *
 * @param _openDoveNeutronControlBlock The OpenDoveNeutronControlBlock whose children are to be free.
 */
static void freeNs0OpenDoveNeutronControlBlockElement(struct full_ns0_openDoveNeutronControlBlock *_openDoveNeutronControlBlock) {
  freeNs0OpenDoveNeutronControlBlockType(_openDoveNeutronControlBlock);
}

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



  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
        freeNs0OpenDoveNeutronControlBlockType(_openDoveNeutronControlBlock);
        free(_openDoveNeutronControlBlock);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "domain_separation", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}domain_separation 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 {}domain_separation of type {http://www.w3.org/2001/XMLSchema}boolean.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveNeutronControlBlockType(_openDoveNeutronControlBlock);
          free(_openDoveNeutronControlBlock);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}egw_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 {}egw_replication_factor of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveNeutronControlBlockType(_openDoveNeutronControlBlock);
          free(_openDoveNeutronControlBlock);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}snat_pool_size 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 {}snat_pool_size of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveNeutronControlBlockType(_openDoveNeutronControlBlock);
          free(_openDoveNeutronControlBlock);
          return NULL;
        }

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

  return _openDoveNeutronControlBlock;
}

/**
 * Writes a OpenDoveNeutronControlBlock to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveNeutronControlBlock The OpenDoveNeutronControlBlock to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveNeutronControlBlockType(xmlTextWriterPtr writer, struct full_ns0_openDoveNeutronControlBlock *_openDoveNeutronControlBlock) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveNeutronControlBlock->domainSeparation != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "domain_separation", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}domain_separation. 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 {}domain_separation...\n");
#endif
    status = xmlTextWriterWriteXsBooleanType(writer, (_openDoveNeutronControlBlock->domainSeparation));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}boolean for element {}domain_separation. 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_separation. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveNeutronControlBlock->egwReplicationFactor != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "egw_replication_factor", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}egw_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 {}egw_replication_factor...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveNeutronControlBlock->egwReplicationFactor));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}egw_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 {}egw_replication_factor. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveNeutronControlBlock->snatPoolSize != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "snat_pool_size", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}snat_pool_size. 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 {}snat_pool_size...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveNeutronControlBlock->snatPoolSize));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}snat_pool_size. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

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

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveNeutronControlBlock.
 *
 * @param _openDoveNeutronControlBlock The OpenDoveNeutronControlBlock to free.
 */
static void freeNs0OpenDoveNeutronControlBlockType(struct full_ns0_openDoveNeutronControlBlock *_openDoveNeutronControlBlock) {
  int i;
  if (_openDoveNeutronControlBlock->domainSeparation != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor domainSeparation of type full_ns0_openDoveNeutronControlBlock...\n");
#endif
    freeXsBooleanType(_openDoveNeutronControlBlock->domainSeparation);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor domainSeparation of type full_ns0_openDoveNeutronControlBlock...\n");
#endif
    free(_openDoveNeutronControlBlock->domainSeparation);
  }
  if (_openDoveNeutronControlBlock->egwReplicationFactor != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor egwReplicationFactor of type full_ns0_openDoveNeutronControlBlock...\n");
#endif
    freeXsIntType(_openDoveNeutronControlBlock->egwReplicationFactor);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor egwReplicationFactor of type full_ns0_openDoveNeutronControlBlock...\n");
#endif
    free(_openDoveNeutronControlBlock->egwReplicationFactor);
  }
  if (_openDoveNeutronControlBlock->snatPoolSize != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor snatPoolSize of type full_ns0_openDoveNeutronControlBlock...\n");
#endif
    freeXsIntType(_openDoveNeutronControlBlock->snatPoolSize);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor snatPoolSize of type full_ns0_openDoveNeutronControlBlock...\n");
#endif
    free(_openDoveNeutronControlBlock->snatPoolSize);
  }
}
#endif /* DEF_full_ns0_openDoveNeutronControlBlock_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 "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 "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 "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 "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 "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 "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 "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 "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 (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 "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 "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 "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 "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 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->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->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->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->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->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->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->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->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;
  }
  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->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->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->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->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;
  }

  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->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->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->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->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->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->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->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->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);
  }
  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->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->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->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->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);
  }
}
#endif /* DEF_full_ns0_openDoveServiceAppliance_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 "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 "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 "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 "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 (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 "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 "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 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->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->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->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->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;
  }
  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->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->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;
  }

  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->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->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->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->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);
  }
  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->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->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);
  }
}
#endif /* DEF_full_ns0_openDoveSwitch_M */
#ifndef DEF_full_ns0_openDoveVGWVNIDMapping_M
#define DEF_full_ns0_openDoveVGWVNIDMapping_M

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

/**
 * Writes a OpenDoveVGWVNIDMapping to XML under element name "openDoveVGWVNIDMapping".
 *
 * @param writer The XML writer.
 * @param _openDoveVGWVNIDMapping The OpenDoveVGWVNIDMapping to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveVGWVNIDMapping(xmlTextWriterPtr writer, struct full_ns0_openDoveVGWVNIDMapping *_openDoveVGWVNIDMapping) {
  return xmlTextWriterWriteNs0OpenDoveVGWVNIDMappingElementNS(writer, _openDoveVGWVNIDMapping, 1);
}

/**
 * Frees a OpenDoveVGWVNIDMapping.
 *
 * @param _openDoveVGWVNIDMapping The OpenDoveVGWVNIDMapping to free.
 */
void free_full_ns0_openDoveVGWVNIDMapping(struct full_ns0_openDoveVGWVNIDMapping *_openDoveVGWVNIDMapping) {
  freeNs0OpenDoveVGWVNIDMappingType(_openDoveVGWVNIDMapping);
  free(_openDoveVGWVNIDMapping);
}

/**
 * Reads a OpenDoveVGWVNIDMapping element from XML. The element to be read is "openDoveVGWVNIDMapping", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveVGWVNIDMapping, or NULL in case of error.
 */
struct full_ns0_openDoveVGWVNIDMapping *xmlTextReaderReadNs0OpenDoveVGWVNIDMappingElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveVGWVNIDMapping *_openDoveVGWVNIDMapping = NULL;

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

  return _openDoveVGWVNIDMapping;
}

/**
 * Writes a OpenDoveVGWVNIDMapping to XML under element name "openDoveVGWVNIDMapping".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveVGWVNIDMapping The OpenDoveVGWVNIDMapping to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveVGWVNIDMappingElement(xmlTextWriterPtr writer, struct full_ns0_openDoveVGWVNIDMapping *_openDoveVGWVNIDMapping) {
  return xmlTextWriterWriteNs0OpenDoveVGWVNIDMappingElementNS(writer, _openDoveVGWVNIDMapping, 0);
}

/**
 * Writes a OpenDoveVGWVNIDMapping to XML under element name "openDoveVGWVNIDMapping".
 *
 * @param writer The XML writer.
 * @param _openDoveVGWVNIDMapping The OpenDoveVGWVNIDMapping to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveVGWVNIDMappingElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveVGWVNIDMapping *_openDoveVGWVNIDMapping, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveVGWVNIDMapping.
 *
 * @param _openDoveVGWVNIDMapping The OpenDoveVGWVNIDMapping whose children are to be free.
 */
static void freeNs0OpenDoveVGWVNIDMappingElement(struct full_ns0_openDoveVGWVNIDMapping *_openDoveVGWVNIDMapping) {
  freeNs0OpenDoveVGWVNIDMappingType(_openDoveVGWVNIDMapping);
}

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



  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
        freeNs0OpenDoveVGWVNIDMappingType(_openDoveVGWVNIDMapping);
        free(_openDoveVGWVNIDMapping);
        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.
          freeNs0OpenDoveVGWVNIDMappingType(_openDoveVGWVNIDMapping);
          free(_openDoveVGWVNIDMapping);
          return NULL;
        }

        _openDoveVGWVNIDMapping->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.
          freeNs0OpenDoveVGWVNIDMappingType(_openDoveVGWVNIDMapping);
          free(_openDoveVGWVNIDMapping);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}net_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 {}net_id of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVGWVNIDMappingType(_openDoveVGWVNIDMapping);
          free(_openDoveVGWVNIDMapping);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}vlan 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 {}vlan of type {http://www.w3.org/2001/XMLSchema}int.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVGWVNIDMappingType(_openDoveVGWVNIDMapping);
          free(_openDoveVGWVNIDMapping);
          return NULL;
        }

        _openDoveVGWVNIDMapping->vlanID = ((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.
          freeNs0OpenDoveVGWVNIDMappingType(_openDoveVGWVNIDMapping);
          free(_openDoveVGWVNIDMapping);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}gatewayUUID 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 {}gatewayUUID of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVGWVNIDMappingType(_openDoveVGWVNIDMapping);
          free(_openDoveVGWVNIDMapping);
          return NULL;
        }

        _openDoveVGWVNIDMapping->gatewayUUID = ((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.
          freeNs0OpenDoveVGWVNIDMappingType(_openDoveVGWVNIDMapping);
          free(_openDoveVGWVNIDMapping);
          return NULL;
        }

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

  return _openDoveVGWVNIDMapping;
}

/**
 * Writes a OpenDoveVGWVNIDMapping to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveVGWVNIDMapping The OpenDoveVGWVNIDMapping to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveVGWVNIDMappingType(xmlTextWriterPtr writer, struct full_ns0_openDoveVGWVNIDMapping *_openDoveVGWVNIDMapping) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveVGWVNIDMapping->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, (_openDoveVGWVNIDMapping->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 (_openDoveVGWVNIDMapping->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, (_openDoveVGWVNIDMapping->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 (_openDoveVGWVNIDMapping->vnid != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "net_id", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}net_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 {}net_id...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveVGWVNIDMapping->vnid));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}net_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 {}net_id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVGWVNIDMapping->vlanID != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}vlan. 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 {}vlan...\n");
#endif
    status = xmlTextWriterWriteXsIntType(writer, (_openDoveVGWVNIDMapping->vlanID));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}int for element {}vlan. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}vlan. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVGWVNIDMapping->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, (_openDoveVGWVNIDMapping->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 (_openDoveVGWVNIDMapping->gatewayUUID != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "gatewayUUID", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}gatewayUUID. 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 {}gatewayUUID...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVGWVNIDMapping->gatewayUUID));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}gatewayUUID. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}gatewayUUID. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVGWVNIDMapping->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, (_openDoveVGWVNIDMapping->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 OpenDoveVGWVNIDMapping.
 *
 * @param _openDoveVGWVNIDMapping The OpenDoveVGWVNIDMapping to free.
 */
static void freeNs0OpenDoveVGWVNIDMappingType(struct full_ns0_openDoveVGWVNIDMapping *_openDoveVGWVNIDMapping) {
  int i;
  if (_openDoveVGWVNIDMapping->lastChangeVersion != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor lastChangeVersion of type full_ns0_openDoveVGWVNIDMapping...\n");
#endif
    freeXsIntType(_openDoveVGWVNIDMapping->lastChangeVersion);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor lastChangeVersion of type full_ns0_openDoveVGWVNIDMapping...\n");
#endif
    free(_openDoveVGWVNIDMapping->lastChangeVersion);
  }
  if (_openDoveVGWVNIDMapping->createVersion != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor createVersion of type full_ns0_openDoveVGWVNIDMapping...\n");
#endif
    freeXsIntType(_openDoveVGWVNIDMapping->createVersion);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor createVersion of type full_ns0_openDoveVGWVNIDMapping...\n");
#endif
    free(_openDoveVGWVNIDMapping->createVersion);
  }
  if (_openDoveVGWVNIDMapping->vnid != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor vnid of type full_ns0_openDoveVGWVNIDMapping...\n");
#endif
    freeXsIntType(_openDoveVGWVNIDMapping->vnid);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor vnid of type full_ns0_openDoveVGWVNIDMapping...\n");
#endif
    free(_openDoveVGWVNIDMapping->vnid);
  }
  if (_openDoveVGWVNIDMapping->vlanID != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor vlanID of type full_ns0_openDoveVGWVNIDMapping...\n");
#endif
    freeXsIntType(_openDoveVGWVNIDMapping->vlanID);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor vlanID of type full_ns0_openDoveVGWVNIDMapping...\n");
#endif
    free(_openDoveVGWVNIDMapping->vlanID);
  }
  if (_openDoveVGWVNIDMapping->tombstoneFlag != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor tombstoneFlag of type full_ns0_openDoveVGWVNIDMapping...\n");
#endif
    freeXsBooleanType(_openDoveVGWVNIDMapping->tombstoneFlag);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor tombstoneFlag of type full_ns0_openDoveVGWVNIDMapping...\n");
#endif
    free(_openDoveVGWVNIDMapping->tombstoneFlag);
  }
  if (_openDoveVGWVNIDMapping->gatewayUUID != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor gatewayUUID of type full_ns0_openDoveVGWVNIDMapping...\n");
#endif
    freeXsStringType(_openDoveVGWVNIDMapping->gatewayUUID);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor gatewayUUID of type full_ns0_openDoveVGWVNIDMapping...\n");
#endif
    free(_openDoveVGWVNIDMapping->gatewayUUID);
  }
  if (_openDoveVGWVNIDMapping->uuid != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor uuid of type full_ns0_openDoveVGWVNIDMapping...\n");
#endif
    freeXsStringType(_openDoveVGWVNIDMapping->uuid);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor uuid of type full_ns0_openDoveVGWVNIDMapping...\n");
#endif
    free(_openDoveVGWVNIDMapping->uuid);
  }
}
#endif /* DEF_full_ns0_openDoveVGWVNIDMapping_M */
#ifndef DEF_full_ns0_openDoveDCSList_M
#define DEF_full_ns0_openDoveDCSList_M

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

/**
 * Writes a OpenDoveDCSList to XML under element name "openDoveDCSList".
 *
 * @param writer The XML writer.
 * @param _openDoveDCSList The OpenDoveDCSList to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveDCSList(xmlTextWriterPtr writer, struct full_ns0_openDoveDCSList *_openDoveDCSList) {
  return xmlTextWriterWriteNs0OpenDoveDCSListElementNS(writer, _openDoveDCSList, 1);
}

/**
 * Frees a OpenDoveDCSList.
 *
 * @param _openDoveDCSList The OpenDoveDCSList to free.
 */
void free_full_ns0_openDoveDCSList(struct full_ns0_openDoveDCSList *_openDoveDCSList) {
  freeNs0OpenDoveDCSListType(_openDoveDCSList);
  free(_openDoveDCSList);
}

/**
 * Reads a OpenDoveDCSList element from XML. The element to be read is "openDoveDCSList", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveDCSList, or NULL in case of error.
 */
struct full_ns0_openDoveDCSList *xmlTextReaderReadNs0OpenDoveDCSListElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveDCSList *_openDoveDCSList = NULL;

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

  return _openDoveDCSList;
}

/**
 * Writes a OpenDoveDCSList to XML under element name "openDoveDCSList".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveDCSList The OpenDoveDCSList to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveDCSListElement(xmlTextWriterPtr writer, struct full_ns0_openDoveDCSList *_openDoveDCSList) {
  return xmlTextWriterWriteNs0OpenDoveDCSListElementNS(writer, _openDoveDCSList, 0);
}

/**
 * Writes a OpenDoveDCSList to XML under element name "openDoveDCSList".
 *
 * @param writer The XML writer.
 * @param _openDoveDCSList The OpenDoveDCSList to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveDCSListElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveDCSList *_openDoveDCSList, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveDCSList.
 *
 * @param _openDoveDCSList The OpenDoveDCSList whose children are to be free.
 */
static void freeNs0OpenDoveDCSListElement(struct full_ns0_openDoveDCSList *_openDoveDCSList) {
  freeNs0OpenDoveDCSListType(_openDoveDCSList);
}

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



  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
        freeNs0OpenDoveDCSListType(_openDoveDCSList);
        free(_openDoveDCSList);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "oDCS_list", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}oDCS_list of type {}openDoveServiceAppliance.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveServiceApplianceType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}oDCS_list of type {}openDoveServiceAppliance.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveDCSListType(_openDoveDCSList);
          free(_openDoveDCSList);
          return NULL;
        }

        _openDoveDCSList->bulkEndpoints = realloc(_openDoveDCSList->bulkEndpoints, (_openDoveDCSList->_sizeof_bulkEndpoints + 1) * sizeof(struct full_ns0_openDoveServiceAppliance));
        memcpy(&(_openDoveDCSList->bulkEndpoints[_openDoveDCSList->_sizeof_bulkEndpoints++]), _child_accessor, sizeof(struct full_ns0_openDoveServiceAppliance));
        free(_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "oDCS", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}oDCS of type {}openDoveServiceAppliance.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveServiceApplianceType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}oDCS of type {}openDoveServiceAppliance.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveDCSListType(_openDoveDCSList);
          free(_openDoveDCSList);
          return NULL;
        }

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

  return _openDoveDCSList;
}

/**
 * Writes a OpenDoveDCSList to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveDCSList The OpenDoveDCSList to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveDCSListType(xmlTextWriterPtr writer, struct full_ns0_openDoveDCSList *_openDoveDCSList) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  for (i = 0; i < _openDoveDCSList->_sizeof_bulkEndpoints; i++) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oDCS_list", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}oDCS_list. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveServiceAppliance for element {}oDCS_list...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveServiceApplianceType(writer, &(_openDoveDCSList->bulkEndpoints[i]));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveServiceAppliance for element {}oDCS_list. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}oDCS_list. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveDCSList->singletonEndpoint != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "oDCS", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}oDCS. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveServiceAppliance for element {}oDCS...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveServiceApplianceType(writer, (_openDoveDCSList->singletonEndpoint));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveServiceAppliance for element {}oDCS. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

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

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveDCSList.
 *
 * @param _openDoveDCSList The OpenDoveDCSList to free.
 */
static void freeNs0OpenDoveDCSListType(struct full_ns0_openDoveDCSList *_openDoveDCSList) {
  int i;
  if (_openDoveDCSList->bulkEndpoints != NULL) {
    for (i = 0; i < _openDoveDCSList->_sizeof_bulkEndpoints; i++) {
#if DEBUG_ENUNCIATE > 1
      printf("Freeing accessor bulkEndpoints[%i] of type full_ns0_openDoveDCSList...\n", i);
#endif
      freeNs0OpenDoveServiceApplianceType(&(_openDoveDCSList->bulkEndpoints[i]));
    }
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor bulkEndpoints of type full_ns0_openDoveDCSList...\n");
#endif
    free(_openDoveDCSList->bulkEndpoints);
  }
  if (_openDoveDCSList->singletonEndpoint != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor singletonEndpoint of type full_ns0_openDoveDCSList...\n");
#endif
    freeNs0OpenDoveServiceApplianceType(_openDoveDCSList->singletonEndpoint);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor singletonEndpoint of type full_ns0_openDoveDCSList...\n");
#endif
    free(_openDoveDCSList->singletonEndpoint);
  }
}
#endif /* DEF_full_ns0_openDoveDCSList_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 "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 (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 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;
  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;
  }
  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;
  }

  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->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);
  }
  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);
  }
}
#endif /* DEF_full_ns0_openDoveDomainRequest_M */
#ifndef DEF_full_ns0_openDoveEndpointRequest_M
#define DEF_full_ns0_openDoveEndpointRequest_M

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

/**
 * Writes a OpenDoveEndpointRequest to XML under element name "openDoveEndpointRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveEndpointRequest The OpenDoveEndpointRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveEndpointRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveEndpointRequest *_openDoveEndpointRequest) {
  return xmlTextWriterWriteNs0OpenDoveEndpointRequestElementNS(writer, _openDoveEndpointRequest, 1);
}

/**
 * Frees a OpenDoveEndpointRequest.
 *
 * @param _openDoveEndpointRequest The OpenDoveEndpointRequest to free.
 */
void free_full_ns0_openDoveEndpointRequest(struct full_ns0_openDoveEndpointRequest *_openDoveEndpointRequest) {
  freeNs0OpenDoveEndpointRequestType(_openDoveEndpointRequest);
  free(_openDoveEndpointRequest);
}

/**
 * Reads a OpenDoveEndpointRequest element from XML. The element to be read is "openDoveEndpointRequest", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveEndpointRequest, or NULL in case of error.
 */
struct full_ns0_openDoveEndpointRequest *xmlTextReaderReadNs0OpenDoveEndpointRequestElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveEndpointRequest *_openDoveEndpointRequest = NULL;

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

  return _openDoveEndpointRequest;
}

/**
 * Writes a OpenDoveEndpointRequest to XML under element name "openDoveEndpointRequest".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveEndpointRequest The OpenDoveEndpointRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveEndpointRequestElement(xmlTextWriterPtr writer, struct full_ns0_openDoveEndpointRequest *_openDoveEndpointRequest) {
  return xmlTextWriterWriteNs0OpenDoveEndpointRequestElementNS(writer, _openDoveEndpointRequest, 0);
}

/**
 * Writes a OpenDoveEndpointRequest to XML under element name "openDoveEndpointRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveEndpointRequest The OpenDoveEndpointRequest to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveEndpointRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveEndpointRequest *_openDoveEndpointRequest, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveEndpointRequest.
 *
 * @param _openDoveEndpointRequest The OpenDoveEndpointRequest whose children are to be free.
 */
static void freeNs0OpenDoveEndpointRequestElement(struct full_ns0_openDoveEndpointRequest *_openDoveEndpointRequest) {
  freeNs0OpenDoveEndpointRequestType(_openDoveEndpointRequest);
}

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



  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
        freeNs0OpenDoveEndpointRequestType(_openDoveEndpointRequest);
        free(_openDoveEndpointRequest);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "endpoint", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}endpoint of type {}openDoveEndpoint.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveEndpointType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}endpoint of type {}openDoveEndpoint.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveEndpointRequestType(_openDoveEndpointRequest);
          free(_openDoveEndpointRequest);
          return NULL;
        }

        _openDoveEndpointRequest->singletonEndpoint = ((struct full_ns0_openDoveEndpoint*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "endpoints", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}endpoints of type {}openDoveEndpoint.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveEndpointType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}endpoints of type {}openDoveEndpoint.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveEndpointRequestType(_openDoveEndpointRequest);
          free(_openDoveEndpointRequest);
          return NULL;
        }

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

  return _openDoveEndpointRequest;
}

/**
 * Writes a OpenDoveEndpointRequest to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveEndpointRequest The OpenDoveEndpointRequest to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveEndpointRequestType(xmlTextWriterPtr writer, struct full_ns0_openDoveEndpointRequest *_openDoveEndpointRequest) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveEndpointRequest->singletonEndpoint != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "endpoint", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}endpoint. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveEndpoint for element {}endpoint...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveEndpointType(writer, (_openDoveEndpointRequest->singletonEndpoint));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveEndpoint for element {}endpoint. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}endpoint. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  for (i = 0; i < _openDoveEndpointRequest->_sizeof_bulkEndpoints; i++) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "endpoints", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}endpoints. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveEndpoint for element {}endpoints...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveEndpointType(writer, &(_openDoveEndpointRequest->bulkEndpoints[i]));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveEndpoint for element {}endpoints. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

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

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveEndpointRequest.
 *
 * @param _openDoveEndpointRequest The OpenDoveEndpointRequest to free.
 */
static void freeNs0OpenDoveEndpointRequestType(struct full_ns0_openDoveEndpointRequest *_openDoveEndpointRequest) {
  int i;
  if (_openDoveEndpointRequest->singletonEndpoint != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor singletonEndpoint of type full_ns0_openDoveEndpointRequest...\n");
#endif
    freeNs0OpenDoveEndpointType(_openDoveEndpointRequest->singletonEndpoint);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor singletonEndpoint of type full_ns0_openDoveEndpointRequest...\n");
#endif
    free(_openDoveEndpointRequest->singletonEndpoint);
  }
  if (_openDoveEndpointRequest->bulkEndpoints != NULL) {
    for (i = 0; i < _openDoveEndpointRequest->_sizeof_bulkEndpoints; i++) {
#if DEBUG_ENUNCIATE > 1
      printf("Freeing accessor bulkEndpoints[%i] of type full_ns0_openDoveEndpointRequest...\n", i);
#endif
      freeNs0OpenDoveEndpointType(&(_openDoveEndpointRequest->bulkEndpoints[i]));
    }
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor bulkEndpoints of type full_ns0_openDoveEndpointRequest...\n");
#endif
    free(_openDoveEndpointRequest->bulkEndpoints);
  }
}
#endif /* DEF_full_ns0_openDoveEndpointRequest_M */
#ifndef DEF_full_ns0_openDoveGWSessionStatsRequest_M
#define DEF_full_ns0_openDoveGWSessionStatsRequest_M

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

/**
 * Writes a OpenDoveGWSessionStatsRequest to XML under element name "openDoveGWSessionStatsRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveGWSessionStatsRequest The OpenDoveGWSessionStatsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveGWSessionStatsRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveGWSessionStatsRequest *_openDoveGWSessionStatsRequest) {
  return xmlTextWriterWriteNs0OpenDoveGWSessionStatsRequestElementNS(writer, _openDoveGWSessionStatsRequest, 1);
}

/**
 * Frees a OpenDoveGWSessionStatsRequest.
 *
 * @param _openDoveGWSessionStatsRequest The OpenDoveGWSessionStatsRequest to free.
 */
void free_full_ns0_openDoveGWSessionStatsRequest(struct full_ns0_openDoveGWSessionStatsRequest *_openDoveGWSessionStatsRequest) {
  freeNs0OpenDoveGWSessionStatsRequestType(_openDoveGWSessionStatsRequest);
  free(_openDoveGWSessionStatsRequest);
}

/**
 * Reads a OpenDoveGWSessionStatsRequest element from XML. The element to be read is "openDoveGWSessionStatsRequest", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveGWSessionStatsRequest, or NULL in case of error.
 */
struct full_ns0_openDoveGWSessionStatsRequest *xmlTextReaderReadNs0OpenDoveGWSessionStatsRequestElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveGWSessionStatsRequest *_openDoveGWSessionStatsRequest = NULL;

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

  return _openDoveGWSessionStatsRequest;
}

/**
 * Writes a OpenDoveGWSessionStatsRequest to XML under element name "openDoveGWSessionStatsRequest".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveGWSessionStatsRequest The OpenDoveGWSessionStatsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveGWSessionStatsRequestElement(xmlTextWriterPtr writer, struct full_ns0_openDoveGWSessionStatsRequest *_openDoveGWSessionStatsRequest) {
  return xmlTextWriterWriteNs0OpenDoveGWSessionStatsRequestElementNS(writer, _openDoveGWSessionStatsRequest, 0);
}

/**
 * Writes a OpenDoveGWSessionStatsRequest to XML under element name "openDoveGWSessionStatsRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveGWSessionStatsRequest The OpenDoveGWSessionStatsRequest to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveGWSessionStatsRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveGWSessionStatsRequest *_openDoveGWSessionStatsRequest, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveGWSessionStatsRequest.
 *
 * @param _openDoveGWSessionStatsRequest The OpenDoveGWSessionStatsRequest whose children are to be free.
 */
static void freeNs0OpenDoveGWSessionStatsRequestElement(struct full_ns0_openDoveGWSessionStatsRequest *_openDoveGWSessionStatsRequest) {
  freeNs0OpenDoveGWSessionStatsRequestType(_openDoveGWSessionStatsRequest);
}

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



  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
        freeNs0OpenDoveGWSessionStatsRequestType(_openDoveGWSessionStatsRequest);
        free(_openDoveGWSessionStatsRequest);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "sessions", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}sessions of type {}openDoveGWSession.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveGWSessionType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}sessions of type {}openDoveGWSession.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionStatsRequestType(_openDoveGWSessionStatsRequest);
          free(_openDoveGWSessionStatsRequest);
          return NULL;
        }

        _openDoveGWSessionStatsRequest->bulkSessions = realloc(_openDoveGWSessionStatsRequest->bulkSessions, (_openDoveGWSessionStatsRequest->_sizeof_bulkSessions + 1) * sizeof(struct full_ns0_openDoveGWSession));
        memcpy(&(_openDoveGWSessionStatsRequest->bulkSessions[_openDoveGWSessionStatsRequest->_sizeof_bulkSessions++]), _child_accessor, sizeof(struct full_ns0_openDoveGWSession));
        free(_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "session", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}session of type {}openDoveGWSession.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveGWSessionType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}session of type {}openDoveGWSession.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWSessionStatsRequestType(_openDoveGWSessionStatsRequest);
          free(_openDoveGWSessionStatsRequest);
          return NULL;
        }

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

  return _openDoveGWSessionStatsRequest;
}

/**
 * Writes a OpenDoveGWSessionStatsRequest to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveGWSessionStatsRequest The OpenDoveGWSessionStatsRequest to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveGWSessionStatsRequestType(xmlTextWriterPtr writer, struct full_ns0_openDoveGWSessionStatsRequest *_openDoveGWSessionStatsRequest) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  for (i = 0; i < _openDoveGWSessionStatsRequest->_sizeof_bulkSessions; i++) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "sessions", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}sessions. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveGWSession for element {}sessions...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveGWSessionType(writer, &(_openDoveGWSessionStatsRequest->bulkSessions[i]));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveGWSession for element {}sessions. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}sessions. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWSessionStatsRequest->singletonSession != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "session", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}session. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveGWSession for element {}session...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveGWSessionType(writer, (_openDoveGWSessionStatsRequest->singletonSession));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveGWSession for element {}session. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

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

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveGWSessionStatsRequest.
 *
 * @param _openDoveGWSessionStatsRequest The OpenDoveGWSessionStatsRequest to free.
 */
static void freeNs0OpenDoveGWSessionStatsRequestType(struct full_ns0_openDoveGWSessionStatsRequest *_openDoveGWSessionStatsRequest) {
  int i;
  if (_openDoveGWSessionStatsRequest->bulkSessions != NULL) {
    for (i = 0; i < _openDoveGWSessionStatsRequest->_sizeof_bulkSessions; i++) {
#if DEBUG_ENUNCIATE > 1
      printf("Freeing accessor bulkSessions[%i] of type full_ns0_openDoveGWSessionStatsRequest...\n", i);
#endif
      freeNs0OpenDoveGWSessionType(&(_openDoveGWSessionStatsRequest->bulkSessions[i]));
    }
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor bulkSessions of type full_ns0_openDoveGWSessionStatsRequest...\n");
#endif
    free(_openDoveGWSessionStatsRequest->bulkSessions);
  }
  if (_openDoveGWSessionStatsRequest->singletonSession != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor singletonSession of type full_ns0_openDoveGWSessionStatsRequest...\n");
#endif
    freeNs0OpenDoveGWSessionType(_openDoveGWSessionStatsRequest->singletonSession);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor singletonSession of type full_ns0_openDoveGWSessionStatsRequest...\n");
#endif
    free(_openDoveGWSessionStatsRequest->singletonSession);
  }
}
#endif /* DEF_full_ns0_openDoveGWSessionStatsRequest_M */
#ifndef DEF_full_ns0_openDoveGWStats_M
#define DEF_full_ns0_openDoveGWStats_M

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

/**
 * Writes a OpenDoveGWStats to XML under element name "openDoveGWStats".
 *
 * @param writer The XML writer.
 * @param _openDoveGWStats The OpenDoveGWStats to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveGWStats(xmlTextWriterPtr writer, struct full_ns0_openDoveGWStats *_openDoveGWStats) {
  return xmlTextWriterWriteNs0OpenDoveGWStatsElementNS(writer, _openDoveGWStats, 1);
}

/**
 * Frees a OpenDoveGWStats.
 *
 * @param _openDoveGWStats The OpenDoveGWStats to free.
 */
void free_full_ns0_openDoveGWStats(struct full_ns0_openDoveGWStats *_openDoveGWStats) {
  freeNs0OpenDoveGWStatsType(_openDoveGWStats);
  free(_openDoveGWStats);
}

/**
 * Reads a OpenDoveGWStats element from XML. The element to be read is "openDoveGWStats", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveGWStats, or NULL in case of error.
 */
struct full_ns0_openDoveGWStats *xmlTextReaderReadNs0OpenDoveGWStatsElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveGWStats *_openDoveGWStats = NULL;

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

  return _openDoveGWStats;
}

/**
 * Writes a OpenDoveGWStats to XML under element name "openDoveGWStats".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveGWStats The OpenDoveGWStats to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveGWStatsElement(xmlTextWriterPtr writer, struct full_ns0_openDoveGWStats *_openDoveGWStats) {
  return xmlTextWriterWriteNs0OpenDoveGWStatsElementNS(writer, _openDoveGWStats, 0);
}

/**
 * Writes a OpenDoveGWStats to XML under element name "openDoveGWStats".
 *
 * @param writer The XML writer.
 * @param _openDoveGWStats The OpenDoveGWStats to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveGWStatsElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveGWStats *_openDoveGWStats, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveGWStats.
 *
 * @param _openDoveGWStats The OpenDoveGWStats whose children are to be free.
 */
static void freeNs0OpenDoveGWStatsElement(struct full_ns0_openDoveGWStats *_openDoveGWStats) {
  freeNs0OpenDoveGWStatsType(_openDoveGWStats);
}

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



  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
        freeNs0OpenDoveGWStatsType(_openDoveGWStats);
        free(_openDoveGWStats);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "ovl_to_ext_leave_pkts", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_ext_leave_pkts 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 {}ovl_to_ext_leave_pkts of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ext_to_ovl_enter_bytes 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 {}ext_to_ovl_enter_bytes of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ext_to_ovl_enter_pps 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 {}ext_to_ovl_enter_pps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_ext_leave_bps 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 {}ovl_to_ext_leave_bps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_vlan_leave_bps 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 {}ovl_to_vlan_leave_bps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}vlan_to_ovl_enter_bps 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 {}vlan_to_ovl_enter_bps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}vlan_to_ovl_enter_pkts 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 {}vlan_to_ovl_enter_pkts of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ext_to_ovl_enter_bps 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 {}ext_to_ovl_enter_bps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_vlan_leave_bytes 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 {}ovl_to_vlan_leave_bytes of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_vlan_leave_pkts 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 {}ovl_to_vlan_leave_pkts of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}vlan_to_ovl_enter_bytes 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 {}vlan_to_ovl_enter_bytes of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_ext_leave_bytes 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 {}ovl_to_ext_leave_bytes of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_ext_leave_pps 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 {}ovl_to_ext_leave_pps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_vlan_leave_pps 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 {}ovl_to_vlan_leave_pps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}vlan_to_ovl_enter_pps 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 {}vlan_to_ovl_enter_pps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ext_to_ovl_enter_pkts 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 {}ext_to_ovl_enter_pkts of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGWStatsType(_openDoveGWStats);
          free(_openDoveGWStats);
          return NULL;
        }

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

  return _openDoveGWStats;
}

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_ext_leave_pkts. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->extToOvlEnterBytes != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_bytes", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ext_to_ovl_enter_bytes. 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 {}ext_to_ovl_enter_bytes...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->extToOvlEnterBytes));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ext_to_ovl_enter_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ext_to_ovl_enter_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->extToOvlEnterPps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_pps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ext_to_ovl_enter_pps. 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 {}ext_to_ovl_enter_pps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->extToOvlEnterPps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ext_to_ovl_enter_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ext_to_ovl_enter_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->ovlToExtLeaveBps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_bps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_ext_leave_bps. 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 {}ovl_to_ext_leave_bps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->ovlToExtLeaveBps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_ext_leave_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_ext_leave_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->ovlToVlanLeaveBps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_bps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_vlan_leave_bps. 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 {}ovl_to_vlan_leave_bps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->ovlToVlanLeaveBps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_vlan_leave_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_vlan_leave_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->vlanToOvlEnterBps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_bps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}vlan_to_ovl_enter_bps. 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 {}vlan_to_ovl_enter_bps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->vlanToOvlEnterBps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}vlan_to_ovl_enter_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}vlan_to_ovl_enter_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->vlanToOvlEnterPkts != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_pkts", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}vlan_to_ovl_enter_pkts. 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 {}vlan_to_ovl_enter_pkts...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->vlanToOvlEnterPkts));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}vlan_to_ovl_enter_pkts. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}vlan_to_ovl_enter_pkts. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->extToOvlEnterBps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_bps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ext_to_ovl_enter_bps. 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 {}ext_to_ovl_enter_bps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->extToOvlEnterBps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ext_to_ovl_enter_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ext_to_ovl_enter_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->ovlToVlanLeaveBytes != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_bytes", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_vlan_leave_bytes. 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 {}ovl_to_vlan_leave_bytes...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->ovlToVlanLeaveBytes));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_vlan_leave_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_vlan_leave_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->ovlToVlanLeavePkts != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_pkts", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_vlan_leave_pkts. 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 {}ovl_to_vlan_leave_pkts...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->ovlToVlanLeavePkts));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_vlan_leave_pkts. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_vlan_leave_pkts. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->vlanToOvlEnterBytes != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_bytes", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}vlan_to_ovl_enter_bytes. 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 {}vlan_to_ovl_enter_bytes...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->vlanToOvlEnterBytes));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}vlan_to_ovl_enter_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}vlan_to_ovl_enter_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->ovlToExtLeaveBytes != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_bytes", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_ext_leave_bytes. 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 {}ovl_to_ext_leave_bytes...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->ovlToExtLeaveBytes));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_ext_leave_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_ext_leave_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->ovlToExtLeavePps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_pps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_ext_leave_pps. 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 {}ovl_to_ext_leave_pps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->ovlToExtLeavePps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_ext_leave_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_ext_leave_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->ovlToVlanLeavePps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_pps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_vlan_leave_pps. 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 {}ovl_to_vlan_leave_pps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->ovlToVlanLeavePps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_vlan_leave_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_vlan_leave_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->vlanToOvlEnterPps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_pps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}vlan_to_ovl_enter_pps. 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 {}vlan_to_ovl_enter_pps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->vlanToOvlEnterPps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}vlan_to_ovl_enter_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}vlan_to_ovl_enter_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveGWStats->extToOvlEnterPkts != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_pkts", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ext_to_ovl_enter_pkts. 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 {}ext_to_ovl_enter_pkts...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveGWStats->extToOvlEnterPkts));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ext_to_ovl_enter_pkts. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

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

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveGWStats.
 *
 * @param _openDoveGWStats The OpenDoveGWStats to free.
 */
static void freeNs0OpenDoveGWStatsType(struct full_ns0_openDoveGWStats *_openDoveGWStats) {
  int i;
  if (_openDoveGWStats->ovlToExtLeavePkts != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToExtLeavePkts of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->ovlToExtLeavePkts);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToExtLeavePkts of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->ovlToExtLeavePkts);
  }
  if (_openDoveGWStats->extToOvlEnterBytes != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor extToOvlEnterBytes of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->extToOvlEnterBytes);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor extToOvlEnterBytes of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->extToOvlEnterBytes);
  }
  if (_openDoveGWStats->extToOvlEnterPps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor extToOvlEnterPps of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->extToOvlEnterPps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor extToOvlEnterPps of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->extToOvlEnterPps);
  }
  if (_openDoveGWStats->ovlToExtLeaveBps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToExtLeaveBps of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->ovlToExtLeaveBps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToExtLeaveBps of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->ovlToExtLeaveBps);
  }
  if (_openDoveGWStats->ovlToVlanLeaveBps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToVlanLeaveBps of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->ovlToVlanLeaveBps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToVlanLeaveBps of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->ovlToVlanLeaveBps);
  }
  if (_openDoveGWStats->vlanToOvlEnterBps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor vlanToOvlEnterBps of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->vlanToOvlEnterBps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor vlanToOvlEnterBps of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->vlanToOvlEnterBps);
  }
  if (_openDoveGWStats->vlanToOvlEnterPkts != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor vlanToOvlEnterPkts of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->vlanToOvlEnterPkts);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor vlanToOvlEnterPkts of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->vlanToOvlEnterPkts);
  }
  if (_openDoveGWStats->extToOvlEnterBps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor extToOvlEnterBps of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->extToOvlEnterBps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor extToOvlEnterBps of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->extToOvlEnterBps);
  }
  if (_openDoveGWStats->ovlToVlanLeaveBytes != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToVlanLeaveBytes of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->ovlToVlanLeaveBytes);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToVlanLeaveBytes of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->ovlToVlanLeaveBytes);
  }
  if (_openDoveGWStats->ovlToVlanLeavePkts != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToVlanLeavePkts of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->ovlToVlanLeavePkts);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToVlanLeavePkts of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->ovlToVlanLeavePkts);
  }
  if (_openDoveGWStats->vlanToOvlEnterBytes != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor vlanToOvlEnterBytes of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->vlanToOvlEnterBytes);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor vlanToOvlEnterBytes of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->vlanToOvlEnterBytes);
  }
  if (_openDoveGWStats->ovlToExtLeaveBytes != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToExtLeaveBytes of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->ovlToExtLeaveBytes);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToExtLeaveBytes of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->ovlToExtLeaveBytes);
  }
  if (_openDoveGWStats->ovlToExtLeavePps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToExtLeavePps of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->ovlToExtLeavePps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToExtLeavePps of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->ovlToExtLeavePps);
  }
  if (_openDoveGWStats->ovlToVlanLeavePps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToVlanLeavePps of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->ovlToVlanLeavePps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToVlanLeavePps of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->ovlToVlanLeavePps);
  }
  if (_openDoveGWStats->vlanToOvlEnterPps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor vlanToOvlEnterPps of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->vlanToOvlEnterPps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor vlanToOvlEnterPps of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->vlanToOvlEnterPps);
  }
  if (_openDoveGWStats->extToOvlEnterPkts != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor extToOvlEnterPkts of type full_ns0_openDoveGWStats...\n");
#endif
    freeXsStringType(_openDoveGWStats->extToOvlEnterPkts);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor extToOvlEnterPkts of type full_ns0_openDoveGWStats...\n");
#endif
    free(_openDoveGWStats->extToOvlEnterPkts);
  }
}
#endif /* DEF_full_ns0_openDoveGWStats_M */
#ifndef DEF_full_ns0_openDoveGwIpv4Request_M
#define DEF_full_ns0_openDoveGwIpv4Request_M

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

/**
 * Writes a OpenDoveGwIpv4Request to XML under element name "openDoveGwIpv4Request".
 *
 * @param writer The XML writer.
 * @param _openDoveGwIpv4Request The OpenDoveGwIpv4Request to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveGwIpv4Request(xmlTextWriterPtr writer, struct full_ns0_openDoveGwIpv4Request *_openDoveGwIpv4Request) {
  return xmlTextWriterWriteNs0OpenDoveGwIpv4RequestElementNS(writer, _openDoveGwIpv4Request, 1);
}

/**
 * Frees a OpenDoveGwIpv4Request.
 *
 * @param _openDoveGwIpv4Request The OpenDoveGwIpv4Request to free.
 */
void free_full_ns0_openDoveGwIpv4Request(struct full_ns0_openDoveGwIpv4Request *_openDoveGwIpv4Request) {
  freeNs0OpenDoveGwIpv4RequestType(_openDoveGwIpv4Request);
  free(_openDoveGwIpv4Request);
}

/**
 * Reads a OpenDoveGwIpv4Request element from XML. The element to be read is "openDoveGwIpv4Request", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveGwIpv4Request, or NULL in case of error.
 */
struct full_ns0_openDoveGwIpv4Request *xmlTextReaderReadNs0OpenDoveGwIpv4RequestElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveGwIpv4Request *_openDoveGwIpv4Request = NULL;

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

  return _openDoveGwIpv4Request;
}

/**
 * Writes a OpenDoveGwIpv4Request to XML under element name "openDoveGwIpv4Request".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveGwIpv4Request The OpenDoveGwIpv4Request to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveGwIpv4RequestElement(xmlTextWriterPtr writer, struct full_ns0_openDoveGwIpv4Request *_openDoveGwIpv4Request) {
  return xmlTextWriterWriteNs0OpenDoveGwIpv4RequestElementNS(writer, _openDoveGwIpv4Request, 0);
}

/**
 * Writes a OpenDoveGwIpv4Request to XML under element name "openDoveGwIpv4Request".
 *
 * @param writer The XML writer.
 * @param _openDoveGwIpv4Request The OpenDoveGwIpv4Request to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveGwIpv4RequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveGwIpv4Request *_openDoveGwIpv4Request, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveGwIpv4Request.
 *
 * @param _openDoveGwIpv4Request The OpenDoveGwIpv4Request whose children are to be free.
 */
static void freeNs0OpenDoveGwIpv4RequestElement(struct full_ns0_openDoveGwIpv4Request *_openDoveGwIpv4Request) {
  freeNs0OpenDoveGwIpv4RequestType(_openDoveGwIpv4Request);
}

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



  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
        freeNs0OpenDoveGwIpv4RequestType(_openDoveGwIpv4Request);
        free(_openDoveGwIpv4Request);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "gw_ipv4_assignment", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}gw_ipv4_assignment of type {}openDoveGwIpv4.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveGwIpv4Type(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}gw_ipv4_assignment of type {}openDoveGwIpv4.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGwIpv4RequestType(_openDoveGwIpv4Request);
          free(_openDoveGwIpv4Request);
          return NULL;
        }

        _openDoveGwIpv4Request->singletonPool = ((struct full_ns0_openDoveGwIpv4*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "gw_ipv4_assignments", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}gw_ipv4_assignments of type {}openDoveGwIpv4.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveGwIpv4Type(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}gw_ipv4_assignments of type {}openDoveGwIpv4.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveGwIpv4RequestType(_openDoveGwIpv4Request);
          free(_openDoveGwIpv4Request);
          return NULL;
        }

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

  return _openDoveGwIpv4Request;
}

/**
 * Writes a OpenDoveGwIpv4Request to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveGwIpv4Request The OpenDoveGwIpv4Request to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveGwIpv4RequestType(xmlTextWriterPtr writer, struct full_ns0_openDoveGwIpv4Request *_openDoveGwIpv4Request) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveGwIpv4Request->singletonPool != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "gw_ipv4_assignment", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}gw_ipv4_assignment. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveGwIpv4 for element {}gw_ipv4_assignment...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveGwIpv4Type(writer, (_openDoveGwIpv4Request->singletonPool));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveGwIpv4 for element {}gw_ipv4_assignment. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}gw_ipv4_assignment. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  for (i = 0; i < _openDoveGwIpv4Request->_sizeof_bulkPools; i++) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "gw_ipv4_assignments", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}gw_ipv4_assignments. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveGwIpv4 for element {}gw_ipv4_assignments...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveGwIpv4Type(writer, &(_openDoveGwIpv4Request->bulkPools[i]));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveGwIpv4 for element {}gw_ipv4_assignments. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

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

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveGwIpv4Request.
 *
 * @param _openDoveGwIpv4Request The OpenDoveGwIpv4Request to free.
 */
static void freeNs0OpenDoveGwIpv4RequestType(struct full_ns0_openDoveGwIpv4Request *_openDoveGwIpv4Request) {
  int i;
  if (_openDoveGwIpv4Request->singletonPool != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor singletonPool of type full_ns0_openDoveGwIpv4Request...\n");
#endif
    freeNs0OpenDoveGwIpv4Type(_openDoveGwIpv4Request->singletonPool);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor singletonPool of type full_ns0_openDoveGwIpv4Request...\n");
#endif
    free(_openDoveGwIpv4Request->singletonPool);
  }
  if (_openDoveGwIpv4Request->bulkPools != NULL) {
    for (i = 0; i < _openDoveGwIpv4Request->_sizeof_bulkPools; i++) {
#if DEBUG_ENUNCIATE > 1
      printf("Freeing accessor bulkPools[%i] of type full_ns0_openDoveGwIpv4Request...\n", i);
#endif
      freeNs0OpenDoveGwIpv4Type(&(_openDoveGwIpv4Request->bulkPools[i]));
    }
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor bulkPools of type full_ns0_openDoveGwIpv4Request...\n");
#endif
    free(_openDoveGwIpv4Request->bulkPools);
  }
}
#endif /* DEF_full_ns0_openDoveGwIpv4Request_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 "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 (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 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;
  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;
  }
  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;
  }

  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->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);
  }
  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);
  }
}
#endif /* DEF_full_ns0_openDoveNetworkRequest_M */
#ifndef DEF_full_ns0_openDoveServiceApplianceRequest_M
#define DEF_full_ns0_openDoveServiceApplianceRequest_M

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

/**
 * Writes a OpenDoveServiceApplianceRequest to XML under element name "openDoveServiceApplianceRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveServiceApplianceRequest The OpenDoveServiceApplianceRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveServiceApplianceRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveServiceApplianceRequest *_openDoveServiceApplianceRequest) {
  return xmlTextWriterWriteNs0OpenDoveServiceApplianceRequestElementNS(writer, _openDoveServiceApplianceRequest, 1);
}

/**
 * Frees a OpenDoveServiceApplianceRequest.
 *
 * @param _openDoveServiceApplianceRequest The OpenDoveServiceApplianceRequest to free.
 */
void free_full_ns0_openDoveServiceApplianceRequest(struct full_ns0_openDoveServiceApplianceRequest *_openDoveServiceApplianceRequest) {
  freeNs0OpenDoveServiceApplianceRequestType(_openDoveServiceApplianceRequest);
  free(_openDoveServiceApplianceRequest);
}

/**
 * Reads a OpenDoveServiceApplianceRequest element from XML. The element to be read is "openDoveServiceApplianceRequest", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveServiceApplianceRequest, or NULL in case of error.
 */
struct full_ns0_openDoveServiceApplianceRequest *xmlTextReaderReadNs0OpenDoveServiceApplianceRequestElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveServiceApplianceRequest *_openDoveServiceApplianceRequest = NULL;

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

  return _openDoveServiceApplianceRequest;
}

/**
 * Writes a OpenDoveServiceApplianceRequest to XML under element name "openDoveServiceApplianceRequest".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveServiceApplianceRequest The OpenDoveServiceApplianceRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveServiceApplianceRequestElement(xmlTextWriterPtr writer, struct full_ns0_openDoveServiceApplianceRequest *_openDoveServiceApplianceRequest) {
  return xmlTextWriterWriteNs0OpenDoveServiceApplianceRequestElementNS(writer, _openDoveServiceApplianceRequest, 0);
}

/**
 * Writes a OpenDoveServiceApplianceRequest to XML under element name "openDoveServiceApplianceRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveServiceApplianceRequest The OpenDoveServiceApplianceRequest to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveServiceApplianceRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveServiceApplianceRequest *_openDoveServiceApplianceRequest, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveServiceApplianceRequest.
 *
 * @param _openDoveServiceApplianceRequest The OpenDoveServiceApplianceRequest whose children are to be free.
 */
static void freeNs0OpenDoveServiceApplianceRequestElement(struct full_ns0_openDoveServiceApplianceRequest *_openDoveServiceApplianceRequest) {
  freeNs0OpenDoveServiceApplianceRequestType(_openDoveServiceApplianceRequest);
}

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



  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
        freeNs0OpenDoveServiceApplianceRequestType(_openDoveServiceApplianceRequest);
        free(_openDoveServiceApplianceRequest);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "service_appliance", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}service_appliance of type {}openDoveServiceAppliance.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveServiceApplianceType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}service_appliance of type {}openDoveServiceAppliance.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceRequestType(_openDoveServiceApplianceRequest);
          free(_openDoveServiceApplianceRequest);
          return NULL;
        }

        _openDoveServiceApplianceRequest->singletonAppliance = ((struct full_ns0_openDoveServiceAppliance*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "service_appliances", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}service_appliances of type {}openDoveServiceAppliance.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveServiceApplianceType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}service_appliances of type {}openDoveServiceAppliance.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveServiceApplianceRequestType(_openDoveServiceApplianceRequest);
          free(_openDoveServiceApplianceRequest);
          return NULL;
        }

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

  return _openDoveServiceApplianceRequest;
}

/**
 * Writes a OpenDoveServiceApplianceRequest to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveServiceApplianceRequest The OpenDoveServiceApplianceRequest to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveServiceApplianceRequestType(xmlTextWriterPtr writer, struct full_ns0_openDoveServiceApplianceRequest *_openDoveServiceApplianceRequest) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveServiceApplianceRequest->singletonAppliance != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "service_appliance", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}service_appliance. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveServiceAppliance for element {}service_appliance...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveServiceApplianceType(writer, (_openDoveServiceApplianceRequest->singletonAppliance));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveServiceAppliance for element {}service_appliance. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}service_appliance. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  for (i = 0; i < _openDoveServiceApplianceRequest->_sizeof_bulkAppliances; i++) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "service_appliances", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}service_appliances. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveServiceAppliance for element {}service_appliances...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveServiceApplianceType(writer, &(_openDoveServiceApplianceRequest->bulkAppliances[i]));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveServiceAppliance for element {}service_appliances. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

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

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveServiceApplianceRequest.
 *
 * @param _openDoveServiceApplianceRequest The OpenDoveServiceApplianceRequest to free.
 */
static void freeNs0OpenDoveServiceApplianceRequestType(struct full_ns0_openDoveServiceApplianceRequest *_openDoveServiceApplianceRequest) {
  int i;
  if (_openDoveServiceApplianceRequest->singletonAppliance != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor singletonAppliance of type full_ns0_openDoveServiceApplianceRequest...\n");
#endif
    freeNs0OpenDoveServiceApplianceType(_openDoveServiceApplianceRequest->singletonAppliance);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor singletonAppliance of type full_ns0_openDoveServiceApplianceRequest...\n");
#endif
    free(_openDoveServiceApplianceRequest->singletonAppliance);
  }
  if (_openDoveServiceApplianceRequest->bulkAppliances != NULL) {
    for (i = 0; i < _openDoveServiceApplianceRequest->_sizeof_bulkAppliances; i++) {
#if DEBUG_ENUNCIATE > 1
      printf("Freeing accessor bulkAppliances[%i] of type full_ns0_openDoveServiceApplianceRequest...\n", i);
#endif
      freeNs0OpenDoveServiceApplianceType(&(_openDoveServiceApplianceRequest->bulkAppliances[i]));
    }
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor bulkAppliances of type full_ns0_openDoveServiceApplianceRequest...\n");
#endif
    free(_openDoveServiceApplianceRequest->bulkAppliances);
  }
}
#endif /* DEF_full_ns0_openDoveServiceApplianceRequest_M */
#ifndef DEF_full_ns0_openDoveSwitchRequest_M
#define DEF_full_ns0_openDoveSwitchRequest_M

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

/**
 * Writes a OpenDoveSwitchRequest to XML under element name "openDoveSwitchRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveSwitchRequest The OpenDoveSwitchRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveSwitchRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitchRequest *_openDoveSwitchRequest) {
  return xmlTextWriterWriteNs0OpenDoveSwitchRequestElementNS(writer, _openDoveSwitchRequest, 1);
}

/**
 * Frees a OpenDoveSwitchRequest.
 *
 * @param _openDoveSwitchRequest The OpenDoveSwitchRequest to free.
 */
void free_full_ns0_openDoveSwitchRequest(struct full_ns0_openDoveSwitchRequest *_openDoveSwitchRequest) {
  freeNs0OpenDoveSwitchRequestType(_openDoveSwitchRequest);
  free(_openDoveSwitchRequest);
}

/**
 * Reads a OpenDoveSwitchRequest element from XML. The element to be read is "openDoveSwitchRequest", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveSwitchRequest, or NULL in case of error.
 */
struct full_ns0_openDoveSwitchRequest *xmlTextReaderReadNs0OpenDoveSwitchRequestElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveSwitchRequest *_openDoveSwitchRequest = NULL;

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

  return _openDoveSwitchRequest;
}

/**
 * Writes a OpenDoveSwitchRequest to XML under element name "openDoveSwitchRequest".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveSwitchRequest The OpenDoveSwitchRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveSwitchRequestElement(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitchRequest *_openDoveSwitchRequest) {
  return xmlTextWriterWriteNs0OpenDoveSwitchRequestElementNS(writer, _openDoveSwitchRequest, 0);
}

/**
 * Writes a OpenDoveSwitchRequest to XML under element name "openDoveSwitchRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveSwitchRequest The OpenDoveSwitchRequest to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveSwitchRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitchRequest *_openDoveSwitchRequest, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveSwitchRequest.
 *
 * @param _openDoveSwitchRequest The OpenDoveSwitchRequest whose children are to be free.
 */
static void freeNs0OpenDoveSwitchRequestElement(struct full_ns0_openDoveSwitchRequest *_openDoveSwitchRequest) {
  freeNs0OpenDoveSwitchRequestType(_openDoveSwitchRequest);
}

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



  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
        freeNs0OpenDoveSwitchRequestType(_openDoveSwitchRequest);
        free(_openDoveSwitchRequest);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "switch", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}switch of type {}openDoveSwitch.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveSwitchType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}switch of type {}openDoveSwitch.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSwitchRequestType(_openDoveSwitchRequest);
          free(_openDoveSwitchRequest);
          return NULL;
        }

        _openDoveSwitchRequest->singletonSwitch = ((struct full_ns0_openDoveSwitch*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "switches", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}switches of type {}openDoveSwitch.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveSwitchType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}switches of type {}openDoveSwitch.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSwitchRequestType(_openDoveSwitchRequest);
          free(_openDoveSwitchRequest);
          return NULL;
        }

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

  return _openDoveSwitchRequest;
}

/**
 * Writes a OpenDoveSwitchRequest to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveSwitchRequest The OpenDoveSwitchRequest to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveSwitchRequestType(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitchRequest *_openDoveSwitchRequest) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveSwitchRequest->singletonSwitch != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "switch", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}switch. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveSwitch for element {}switch...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveSwitchType(writer, (_openDoveSwitchRequest->singletonSwitch));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveSwitch for element {}switch. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}switch. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  for (i = 0; i < _openDoveSwitchRequest->_sizeof_bulkSwitches; i++) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "switches", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}switches. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveSwitch for element {}switches...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveSwitchType(writer, &(_openDoveSwitchRequest->bulkSwitches[i]));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveSwitch for element {}switches. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

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

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveSwitchRequest.
 *
 * @param _openDoveSwitchRequest The OpenDoveSwitchRequest to free.
 */
static void freeNs0OpenDoveSwitchRequestType(struct full_ns0_openDoveSwitchRequest *_openDoveSwitchRequest) {
  int i;
  if (_openDoveSwitchRequest->singletonSwitch != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor singletonSwitch of type full_ns0_openDoveSwitchRequest...\n");
#endif
    freeNs0OpenDoveSwitchType(_openDoveSwitchRequest->singletonSwitch);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor singletonSwitch of type full_ns0_openDoveSwitchRequest...\n");
#endif
    free(_openDoveSwitchRequest->singletonSwitch);
  }
  if (_openDoveSwitchRequest->bulkSwitches != NULL) {
    for (i = 0; i < _openDoveSwitchRequest->_sizeof_bulkSwitches; i++) {
#if DEBUG_ENUNCIATE > 1
      printf("Freeing accessor bulkSwitches[%i] of type full_ns0_openDoveSwitchRequest...\n", i);
#endif
      freeNs0OpenDoveSwitchType(&(_openDoveSwitchRequest->bulkSwitches[i]));
    }
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor bulkSwitches of type full_ns0_openDoveSwitchRequest...\n");
#endif
    free(_openDoveSwitchRequest->bulkSwitches);
  }
}
#endif /* DEF_full_ns0_openDoveSwitchRequest_M */
#ifndef DEF_full_ns0_openDoveSwitchStatsRequest_M
#define DEF_full_ns0_openDoveSwitchStatsRequest_M

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

/**
 * Writes a OpenDoveSwitchStatsRequest to XML under element name "openDoveSwitchStatsRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveSwitchStatsRequest The OpenDoveSwitchStatsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveSwitchStatsRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitchStatsRequest *_openDoveSwitchStatsRequest) {
  return xmlTextWriterWriteNs0OpenDoveSwitchStatsRequestElementNS(writer, _openDoveSwitchStatsRequest, 1);
}

/**
 * Frees a OpenDoveSwitchStatsRequest.
 *
 * @param _openDoveSwitchStatsRequest The OpenDoveSwitchStatsRequest to free.
 */
void free_full_ns0_openDoveSwitchStatsRequest(struct full_ns0_openDoveSwitchStatsRequest *_openDoveSwitchStatsRequest) {
  freeNs0OpenDoveSwitchStatsRequestType(_openDoveSwitchStatsRequest);
  free(_openDoveSwitchStatsRequest);
}

/**
 * Reads a OpenDoveSwitchStatsRequest element from XML. The element to be read is "openDoveSwitchStatsRequest", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveSwitchStatsRequest, or NULL in case of error.
 */
struct full_ns0_openDoveSwitchStatsRequest *xmlTextReaderReadNs0OpenDoveSwitchStatsRequestElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveSwitchStatsRequest *_openDoveSwitchStatsRequest = NULL;

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

  return _openDoveSwitchStatsRequest;
}

/**
 * Writes a OpenDoveSwitchStatsRequest to XML under element name "openDoveSwitchStatsRequest".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveSwitchStatsRequest The OpenDoveSwitchStatsRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveSwitchStatsRequestElement(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitchStatsRequest *_openDoveSwitchStatsRequest) {
  return xmlTextWriterWriteNs0OpenDoveSwitchStatsRequestElementNS(writer, _openDoveSwitchStatsRequest, 0);
}

/**
 * Writes a OpenDoveSwitchStatsRequest to XML under element name "openDoveSwitchStatsRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveSwitchStatsRequest The OpenDoveSwitchStatsRequest to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveSwitchStatsRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveSwitchStatsRequest *_openDoveSwitchStatsRequest, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveSwitchStatsRequest.
 *
 * @param _openDoveSwitchStatsRequest The OpenDoveSwitchStatsRequest whose children are to be free.
 */
static void freeNs0OpenDoveSwitchStatsRequestElement(struct full_ns0_openDoveSwitchStatsRequest *_openDoveSwitchStatsRequest) {
  freeNs0OpenDoveSwitchStatsRequestType(_openDoveSwitchStatsRequest);
}

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



  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
        freeNs0OpenDoveSwitchStatsRequestType(_openDoveSwitchStatsRequest);
        free(_openDoveSwitchStatsRequest);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "stat", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}stat of type {}openDoveNVP.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveNVPType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}stat of type {}openDoveNVP.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSwitchStatsRequestType(_openDoveSwitchStatsRequest);
          free(_openDoveSwitchStatsRequest);
          return NULL;
        }

        _openDoveSwitchStatsRequest->stat = ((struct full_ns0_openDoveNVP*)_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "stats", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}stats of type {}openDoveNVP.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveNVPType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}stats of type {}openDoveNVP.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveSwitchStatsRequestType(_openDoveSwitchStatsRequest);
          free(_openDoveSwitchStatsRequest);
          return NULL;
        }

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

  return _openDoveSwitchStatsRequest;
}

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

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}stat. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  for (i = 0; i < _openDoveSwitchStatsRequest->_sizeof_bulkStats; i++) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "stats", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}stats. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveNVP for element {}stats...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveNVPType(writer, &(_openDoveSwitchStatsRequest->bulkStats[i]));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveNVP for element {}stats. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

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

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveSwitchStatsRequest.
 *
 * @param _openDoveSwitchStatsRequest The OpenDoveSwitchStatsRequest to free.
 */
static void freeNs0OpenDoveSwitchStatsRequestType(struct full_ns0_openDoveSwitchStatsRequest *_openDoveSwitchStatsRequest) {
  int i;
  if (_openDoveSwitchStatsRequest->stat != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor stat of type full_ns0_openDoveSwitchStatsRequest...\n");
#endif
    freeNs0OpenDoveNVPType(_openDoveSwitchStatsRequest->stat);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor stat of type full_ns0_openDoveSwitchStatsRequest...\n");
#endif
    free(_openDoveSwitchStatsRequest->stat);
  }
  if (_openDoveSwitchStatsRequest->bulkStats != NULL) {
    for (i = 0; i < _openDoveSwitchStatsRequest->_sizeof_bulkStats; i++) {
#if DEBUG_ENUNCIATE > 1
      printf("Freeing accessor bulkStats[%i] of type full_ns0_openDoveSwitchStatsRequest...\n", i);
#endif
      freeNs0OpenDoveNVPType(&(_openDoveSwitchStatsRequest->bulkStats[i]));
    }
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor bulkStats of type full_ns0_openDoveSwitchStatsRequest...\n");
#endif
    free(_openDoveSwitchStatsRequest->bulkStats);
  }
}
#endif /* DEF_full_ns0_openDoveSwitchStatsRequest_M */
#ifndef DEF_full_ns0_openDoveVGWVNIDMappingRequest_M
#define DEF_full_ns0_openDoveVGWVNIDMappingRequest_M

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

/**
 * Writes a OpenDoveVGWVNIDMappingRequest to XML under element name "openDoveVGWVNIDMappingRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveVGWVNIDMappingRequest The OpenDoveVGWVNIDMappingRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveVGWVNIDMappingRequest(xmlTextWriterPtr writer, struct full_ns0_openDoveVGWVNIDMappingRequest *_openDoveVGWVNIDMappingRequest) {
  return xmlTextWriterWriteNs0OpenDoveVGWVNIDMappingRequestElementNS(writer, _openDoveVGWVNIDMappingRequest, 1);
}

/**
 * Frees a OpenDoveVGWVNIDMappingRequest.
 *
 * @param _openDoveVGWVNIDMappingRequest The OpenDoveVGWVNIDMappingRequest to free.
 */
void free_full_ns0_openDoveVGWVNIDMappingRequest(struct full_ns0_openDoveVGWVNIDMappingRequest *_openDoveVGWVNIDMappingRequest) {
  freeNs0OpenDoveVGWVNIDMappingRequestType(_openDoveVGWVNIDMappingRequest);
  free(_openDoveVGWVNIDMappingRequest);
}

/**
 * Reads a OpenDoveVGWVNIDMappingRequest element from XML. The element to be read is "openDoveVGWVNIDMappingRequest", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveVGWVNIDMappingRequest, or NULL in case of error.
 */
struct full_ns0_openDoveVGWVNIDMappingRequest *xmlTextReaderReadNs0OpenDoveVGWVNIDMappingRequestElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveVGWVNIDMappingRequest *_openDoveVGWVNIDMappingRequest = NULL;

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

  return _openDoveVGWVNIDMappingRequest;
}

/**
 * Writes a OpenDoveVGWVNIDMappingRequest to XML under element name "openDoveVGWVNIDMappingRequest".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveVGWVNIDMappingRequest The OpenDoveVGWVNIDMappingRequest to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveVGWVNIDMappingRequestElement(xmlTextWriterPtr writer, struct full_ns0_openDoveVGWVNIDMappingRequest *_openDoveVGWVNIDMappingRequest) {
  return xmlTextWriterWriteNs0OpenDoveVGWVNIDMappingRequestElementNS(writer, _openDoveVGWVNIDMappingRequest, 0);
}

/**
 * Writes a OpenDoveVGWVNIDMappingRequest to XML under element name "openDoveVGWVNIDMappingRequest".
 *
 * @param writer The XML writer.
 * @param _openDoveVGWVNIDMappingRequest The OpenDoveVGWVNIDMappingRequest to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveVGWVNIDMappingRequestElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveVGWVNIDMappingRequest *_openDoveVGWVNIDMappingRequest, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveVGWVNIDMappingRequest.
 *
 * @param _openDoveVGWVNIDMappingRequest The OpenDoveVGWVNIDMappingRequest whose children are to be free.
 */
static void freeNs0OpenDoveVGWVNIDMappingRequestElement(struct full_ns0_openDoveVGWVNIDMappingRequest *_openDoveVGWVNIDMappingRequest) {
  freeNs0OpenDoveVGWVNIDMappingRequestType(_openDoveVGWVNIDMappingRequest);
}

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



  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
        freeNs0OpenDoveVGWVNIDMappingRequestType(_openDoveVGWVNIDMappingRequest);
        free(_openDoveVGWVNIDMappingRequest);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "vnid_mapping_rules", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}vnid_mapping_rules of type {}openDoveVGWVNIDMapping.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveVGWVNIDMappingType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}vnid_mapping_rules of type {}openDoveVGWVNIDMapping.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVGWVNIDMappingRequestType(_openDoveVGWVNIDMappingRequest);
          free(_openDoveVGWVNIDMappingRequest);
          return NULL;
        }

        _openDoveVGWVNIDMappingRequest->bulkMappings = realloc(_openDoveVGWVNIDMappingRequest->bulkMappings, (_openDoveVGWVNIDMappingRequest->_sizeof_bulkMappings + 1) * sizeof(struct full_ns0_openDoveVGWVNIDMapping));
        memcpy(&(_openDoveVGWVNIDMappingRequest->bulkMappings[_openDoveVGWVNIDMappingRequest->_sizeof_bulkMappings++]), _child_accessor, sizeof(struct full_ns0_openDoveVGWVNIDMapping));
        free(_child_accessor);
        status = xmlTextReaderAdvanceToNextStartOrEndElement(reader);
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "vnid_mapping_rule", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}vnid_mapping_rule of type {}openDoveVGWVNIDMapping.\n");
#endif
        _child_accessor = xmlTextReaderReadNs0OpenDoveVGWVNIDMappingType(reader);
        if (_child_accessor == NULL) {
#if DEBUG_ENUNCIATE
          printf("Failed to read choice {}vnid_mapping_rule of type {}openDoveVGWVNIDMapping.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVGWVNIDMappingRequestType(_openDoveVGWVNIDMappingRequest);
          free(_openDoveVGWVNIDMappingRequest);
          return NULL;
        }

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

  return _openDoveVGWVNIDMappingRequest;
}

/**
 * Writes a OpenDoveVGWVNIDMappingRequest to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveVGWVNIDMappingRequest The OpenDoveVGWVNIDMappingRequest to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveVGWVNIDMappingRequestType(xmlTextWriterPtr writer, struct full_ns0_openDoveVGWVNIDMappingRequest *_openDoveVGWVNIDMappingRequest) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  for (i = 0; i < _openDoveVGWVNIDMappingRequest->_sizeof_bulkMappings; i++) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vnid_mapping_rules", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}vnid_mapping_rules. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveVGWVNIDMapping for element {}vnid_mapping_rules...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveVGWVNIDMappingType(writer, &(_openDoveVGWVNIDMappingRequest->bulkMappings[i]));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveVGWVNIDMapping for element {}vnid_mapping_rules. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}vnid_mapping_rules. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVGWVNIDMappingRequest->singletonMapping != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vnid_mapping_rule", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}vnid_mapping_rule. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
#if DEBUG_ENUNCIATE > 1
    printf("writing type {}openDoveVGWVNIDMapping for element {}vnid_mapping_rule...\n");
#endif
    status = xmlTextWriterWriteNs0OpenDoveVGWVNIDMappingType(writer, (_openDoveVGWVNIDMappingRequest->singletonMapping));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {}openDoveVGWVNIDMapping for element {}vnid_mapping_rule. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

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

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveVGWVNIDMappingRequest.
 *
 * @param _openDoveVGWVNIDMappingRequest The OpenDoveVGWVNIDMappingRequest to free.
 */
static void freeNs0OpenDoveVGWVNIDMappingRequestType(struct full_ns0_openDoveVGWVNIDMappingRequest *_openDoveVGWVNIDMappingRequest) {
  int i;
  if (_openDoveVGWVNIDMappingRequest->bulkMappings != NULL) {
    for (i = 0; i < _openDoveVGWVNIDMappingRequest->_sizeof_bulkMappings; i++) {
#if DEBUG_ENUNCIATE > 1
      printf("Freeing accessor bulkMappings[%i] of type full_ns0_openDoveVGWVNIDMappingRequest...\n", i);
#endif
      freeNs0OpenDoveVGWVNIDMappingType(&(_openDoveVGWVNIDMappingRequest->bulkMappings[i]));
    }
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor bulkMappings of type full_ns0_openDoveVGWVNIDMappingRequest...\n");
#endif
    free(_openDoveVGWVNIDMappingRequest->bulkMappings);
  }
  if (_openDoveVGWVNIDMappingRequest->singletonMapping != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor singletonMapping of type full_ns0_openDoveVGWVNIDMappingRequest...\n");
#endif
    freeNs0OpenDoveVGWVNIDMappingType(_openDoveVGWVNIDMappingRequest->singletonMapping);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor singletonMapping of type full_ns0_openDoveVGWVNIDMappingRequest...\n");
#endif
    free(_openDoveVGWVNIDMappingRequest->singletonMapping);
  }
}
#endif /* DEF_full_ns0_openDoveVGWVNIDMappingRequest_M */
#ifndef DEF_full_ns0_openDoveVNIDStats_M
#define DEF_full_ns0_openDoveVNIDStats_M

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

/**
 * Writes a OpenDoveVNIDStats to XML under element name "openDoveVNIDStats".
 *
 * @param writer The XML writer.
 * @param _openDoveVNIDStats The OpenDoveVNIDStats to write.
 * @return 1 if successful, 0 otherwise.
 */
int xml_write_full_ns0_openDoveVNIDStats(xmlTextWriterPtr writer, struct full_ns0_openDoveVNIDStats *_openDoveVNIDStats) {
  return xmlTextWriterWriteNs0OpenDoveVNIDStatsElementNS(writer, _openDoveVNIDStats, 1);
}

/**
 * Frees a OpenDoveVNIDStats.
 *
 * @param _openDoveVNIDStats The OpenDoveVNIDStats to free.
 */
void free_full_ns0_openDoveVNIDStats(struct full_ns0_openDoveVNIDStats *_openDoveVNIDStats) {
  freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
  free(_openDoveVNIDStats);
}

/**
 * Reads a OpenDoveVNIDStats element from XML. The element to be read is "openDoveVNIDStats", and
 * it is assumed that the reader is pointing to that element.
 *
 * @param reader The XML reader.
 * @return The OpenDoveVNIDStats, or NULL in case of error.
 */
struct full_ns0_openDoveVNIDStats *xmlTextReaderReadNs0OpenDoveVNIDStatsElement(xmlTextReaderPtr reader) {
  struct full_ns0_openDoveVNIDStats *_openDoveVNIDStats = NULL;

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

  return _openDoveVNIDStats;
}

/**
 * Writes a OpenDoveVNIDStats to XML under element name "openDoveVNIDStats".
 * Does NOT write the namespace prefixes.
 *
 * @param writer The XML writer.
 * @param _openDoveVNIDStats The OpenDoveVNIDStats to write.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveVNIDStatsElement(xmlTextWriterPtr writer, struct full_ns0_openDoveVNIDStats *_openDoveVNIDStats) {
  return xmlTextWriterWriteNs0OpenDoveVNIDStatsElementNS(writer, _openDoveVNIDStats, 0);
}

/**
 * Writes a OpenDoveVNIDStats to XML under element name "openDoveVNIDStats".
 *
 * @param writer The XML writer.
 * @param _openDoveVNIDStats The OpenDoveVNIDStats to write.
 * @param writeNamespaces Whether to write the namespace prefixes.
 * @return 1 if successful, 0 otherwise.
 */
static int xmlTextWriterWriteNs0OpenDoveVNIDStatsElementNS(xmlTextWriterPtr writer, struct full_ns0_openDoveVNIDStats *_openDoveVNIDStats, int writeNamespaces) {
  int totalBytes = 0;
  int status;

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

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

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

  return totalBytes;
}

/**
 * Frees the children of a OpenDoveVNIDStats.
 *
 * @param _openDoveVNIDStats The OpenDoveVNIDStats whose children are to be free.
 */
static void freeNs0OpenDoveVNIDStatsElement(struct full_ns0_openDoveVNIDStats *_openDoveVNIDStats) {
  freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
}

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



  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
        freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
        free(_openDoveVNIDStats);
        return NULL;
      }
      else if (xmlTextReaderNodeType(reader) == XML_READER_TYPE_ELEMENT
        && xmlStrcmp(BAD_CAST "net_id", xmlTextReaderConstLocalName(reader)) == 0
        && xmlTextReaderConstNamespaceUri(reader) == NULL) {

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}net_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 {}net_id of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_ext_leave_bps 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 {}ovl_to_ext_leave_bps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_vlan_leave_pps 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 {}ovl_to_vlan_leave_pps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_vlan_leave_bytes 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 {}ovl_to_vlan_leave_bytes of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}vlan_to_ovl_enter_pps 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 {}vlan_to_ovl_enter_pps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_ext_leave_bytes 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 {}ovl_to_ext_leave_bytes of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}vlan_to_ovl_enter_bps 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 {}vlan_to_ovl_enter_bps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ext_to_ovl_enter_bps 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 {}ext_to_ovl_enter_bps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}vlan_to_ovl_enter_bytes 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 {}vlan_to_ovl_enter_bytes of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ext_to_ovl_enter_bytes 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 {}ext_to_ovl_enter_bytes of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_vlan_leave_bps 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 {}ovl_to_vlan_leave_bps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_ext_leave_pps 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 {}ovl_to_ext_leave_pps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ext_to_ovl_enter_pkts 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 {}ext_to_ovl_enter_pkts of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_vlan_leave_pkts 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 {}ovl_to_vlan_leave_pkts of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ovl_to_ext_leave_pkts 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 {}ovl_to_ext_leave_pkts of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}vlan_to_ovl_enter_pkts 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 {}vlan_to_ovl_enter_pkts of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

#if DEBUG_ENUNCIATE > 1
        printf("Attempting to read choice {}ext_to_ovl_enter_pps 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 {}ext_to_ovl_enter_pps of type {http://www.w3.org/2001/XMLSchema}string.\n");
#endif
          //panic: unable to read the child element for some reason.
          freeNs0OpenDoveVNIDStatsType(_openDoveVNIDStats);
          free(_openDoveVNIDStats);
          return NULL;
        }

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

  return _openDoveVNIDStats;
}

/**
 * Writes a OpenDoveVNIDStats to XML.
 *
 * @param writer The XML writer.
 * @param _openDoveVNIDStats The OpenDoveVNIDStats to write.
 * @return The total bytes written, or -1 on error;
 */
static int xmlTextWriterWriteNs0OpenDoveVNIDStatsType(xmlTextWriterPtr writer, struct full_ns0_openDoveVNIDStats *_openDoveVNIDStats) {
  int status, totalBytes = 0, i;
  xmlChar *binaryData;
  if (_openDoveVNIDStats->vnid != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "net_id", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}net_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 {}net_id...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->vnid));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}net_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 {}net_id. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->ovlToExtLeaveBps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_bps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_ext_leave_bps. 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 {}ovl_to_ext_leave_bps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->ovlToExtLeaveBps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_ext_leave_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_ext_leave_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->ovlToVlanLeavePps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_pps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_vlan_leave_pps. 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 {}ovl_to_vlan_leave_pps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->ovlToVlanLeavePps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_vlan_leave_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_vlan_leave_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->ovlToVlanLeaveBytes != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_bytes", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_vlan_leave_bytes. 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 {}ovl_to_vlan_leave_bytes...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->ovlToVlanLeaveBytes));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_vlan_leave_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_vlan_leave_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->vlanToOvlEnterPps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_pps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}vlan_to_ovl_enter_pps. 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 {}vlan_to_ovl_enter_pps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->vlanToOvlEnterPps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}vlan_to_ovl_enter_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}vlan_to_ovl_enter_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->ovlToExtLeaveBytes != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_bytes", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_ext_leave_bytes. 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 {}ovl_to_ext_leave_bytes...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->ovlToExtLeaveBytes));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_ext_leave_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_ext_leave_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->vlanToOvlEnterBps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_bps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}vlan_to_ovl_enter_bps. 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 {}vlan_to_ovl_enter_bps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->vlanToOvlEnterBps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}vlan_to_ovl_enter_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}vlan_to_ovl_enter_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->extToOvlEnterBps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_bps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ext_to_ovl_enter_bps. 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 {}ext_to_ovl_enter_bps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->extToOvlEnterBps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ext_to_ovl_enter_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ext_to_ovl_enter_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->vlanToOvlEnterBytes != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_bytes", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}vlan_to_ovl_enter_bytes. 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 {}vlan_to_ovl_enter_bytes...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->vlanToOvlEnterBytes));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}vlan_to_ovl_enter_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}vlan_to_ovl_enter_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->extToOvlEnterBytes != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_bytes", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ext_to_ovl_enter_bytes. 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 {}ext_to_ovl_enter_bytes...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->extToOvlEnterBytes));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ext_to_ovl_enter_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ext_to_ovl_enter_bytes. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->ovlToVlanLeaveBps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_bps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_vlan_leave_bps. 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 {}ovl_to_vlan_leave_bps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->ovlToVlanLeaveBps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_vlan_leave_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_vlan_leave_bps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->ovlToExtLeavePps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_pps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_ext_leave_pps. 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 {}ovl_to_ext_leave_pps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->ovlToExtLeavePps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_ext_leave_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_ext_leave_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->extToOvlEnterPkts != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_pkts", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ext_to_ovl_enter_pkts. 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 {}ext_to_ovl_enter_pkts...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->extToOvlEnterPkts));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ext_to_ovl_enter_pkts. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ext_to_ovl_enter_pkts. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->ovlToVlanLeavePkts != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_vlan_leave_pkts", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_vlan_leave_pkts. 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 {}ovl_to_vlan_leave_pkts...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->ovlToVlanLeavePkts));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_vlan_leave_pkts. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_vlan_leave_pkts. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->ovlToExtLeavePkts != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ovl_to_ext_leave_pkts", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ovl_to_ext_leave_pkts. 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 {}ovl_to_ext_leave_pkts...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->ovlToExtLeavePkts));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ovl_to_ext_leave_pkts. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}ovl_to_ext_leave_pkts. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->vlanToOvlEnterPkts != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "vlan_to_ovl_enter_pkts", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}vlan_to_ovl_enter_pkts. 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 {}vlan_to_ovl_enter_pkts...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->vlanToOvlEnterPkts));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}vlan_to_ovl_enter_pkts. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

    status = xmlTextWriterEndElement(writer);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write end element {}vlan_to_ovl_enter_pkts. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;
  }
  if (_openDoveVNIDStats->extToOvlEnterPps != NULL) {
    status = xmlTextWriterStartElementNS(writer, NULL, BAD_CAST "ext_to_ovl_enter_pps", NULL);
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write start element {}ext_to_ovl_enter_pps. 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 {}ext_to_ovl_enter_pps...\n");
#endif
    status = xmlTextWriterWriteXsStringType(writer, (_openDoveVNIDStats->extToOvlEnterPps));
    if (status < 0) {
#if DEBUG_ENUNCIATE
      printf("Failed to write type {http://www.w3.org/2001/XMLSchema}string for element {}ext_to_ovl_enter_pps. status: %i\n", status);
#endif
      return status;
    }
    totalBytes += status;

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

  return totalBytes;
}

/**
 * Frees the elements of a OpenDoveVNIDStats.
 *
 * @param _openDoveVNIDStats The OpenDoveVNIDStats to free.
 */
static void freeNs0OpenDoveVNIDStatsType(struct full_ns0_openDoveVNIDStats *_openDoveVNIDStats) {
  int i;
  if (_openDoveVNIDStats->vnid != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor vnid of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->vnid);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor vnid of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->vnid);
  }
  if (_openDoveVNIDStats->ovlToExtLeaveBps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToExtLeaveBps of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->ovlToExtLeaveBps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToExtLeaveBps of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->ovlToExtLeaveBps);
  }
  if (_openDoveVNIDStats->ovlToVlanLeavePps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToVlanLeavePps of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->ovlToVlanLeavePps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToVlanLeavePps of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->ovlToVlanLeavePps);
  }
  if (_openDoveVNIDStats->ovlToVlanLeaveBytes != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToVlanLeaveBytes of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->ovlToVlanLeaveBytes);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToVlanLeaveBytes of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->ovlToVlanLeaveBytes);
  }
  if (_openDoveVNIDStats->vlanToOvlEnterPps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor vlanToOvlEnterPps of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->vlanToOvlEnterPps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor vlanToOvlEnterPps of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->vlanToOvlEnterPps);
  }
  if (_openDoveVNIDStats->ovlToExtLeaveBytes != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToExtLeaveBytes of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->ovlToExtLeaveBytes);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToExtLeaveBytes of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->ovlToExtLeaveBytes);
  }
  if (_openDoveVNIDStats->vlanToOvlEnterBps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor vlanToOvlEnterBps of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->vlanToOvlEnterBps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor vlanToOvlEnterBps of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->vlanToOvlEnterBps);
  }
  if (_openDoveVNIDStats->extToOvlEnterBps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor extToOvlEnterBps of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->extToOvlEnterBps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor extToOvlEnterBps of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->extToOvlEnterBps);
  }
  if (_openDoveVNIDStats->vlanToOvlEnterBytes != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor vlanToOvlEnterBytes of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->vlanToOvlEnterBytes);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor vlanToOvlEnterBytes of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->vlanToOvlEnterBytes);
  }
  if (_openDoveVNIDStats->extToOvlEnterBytes != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor extToOvlEnterBytes of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->extToOvlEnterBytes);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor extToOvlEnterBytes of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->extToOvlEnterBytes);
  }
  if (_openDoveVNIDStats->ovlToVlanLeaveBps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToVlanLeaveBps of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->ovlToVlanLeaveBps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToVlanLeaveBps of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->ovlToVlanLeaveBps);
  }
  if (_openDoveVNIDStats->ovlToExtLeavePps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToExtLeavePps of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->ovlToExtLeavePps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToExtLeavePps of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->ovlToExtLeavePps);
  }
  if (_openDoveVNIDStats->extToOvlEnterPkts != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor extToOvlEnterPkts of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->extToOvlEnterPkts);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor extToOvlEnterPkts of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->extToOvlEnterPkts);
  }
  if (_openDoveVNIDStats->ovlToVlanLeavePkts != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToVlanLeavePkts of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->ovlToVlanLeavePkts);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToVlanLeavePkts of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->ovlToVlanLeavePkts);
  }
  if (_openDoveVNIDStats->ovlToExtLeavePkts != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor ovlToExtLeavePkts of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->ovlToExtLeavePkts);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor ovlToExtLeavePkts of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->ovlToExtLeavePkts);
  }
  if (_openDoveVNIDStats->vlanToOvlEnterPkts != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor vlanToOvlEnterPkts of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->vlanToOvlEnterPkts);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor vlanToOvlEnterPkts of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->vlanToOvlEnterPkts);
  }
  if (_openDoveVNIDStats->extToOvlEnterPps != NULL) {
#if DEBUG_ENUNCIATE > 1
    printf("Freeing type of accessor extToOvlEnterPps of type full_ns0_openDoveVNIDStats...\n");
#endif
    freeXsStringType(_openDoveVNIDStats->extToOvlEnterPps);
#if DEBUG_ENUNCIATE > 1
    printf("Freeing accessor extToOvlEnterPps of type full_ns0_openDoveVNIDStats...\n");
#endif
    free(_openDoveVNIDStats->extToOvlEnterPps);
  }
}
#endif /* DEF_full_ns0_openDoveVNIDStats_M */
